diff --git a/gen/adexchangebuyer1d3-cli/Cargo.toml b/gen/adexchangebuyer1d3-cli/Cargo.toml index 9c56ecb4ee..d1ae7b3db7 100644 --- a/gen/adexchangebuyer1d3-cli/Cargo.toml +++ b/gen/adexchangebuyer1d3-cli/Cargo.toml @@ -4,7 +4,7 @@ [package] name = "google-adexchangebuyer1d3-cli" -version = "0.3.3+20160222" +version = "0.3.4+20160405" authors = ["Sebastian Thiel "] description = "A complete library to interact with Ad Exchange Buyer (protocol v1.3)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/adexchangebuyer1d3-cli" @@ -17,18 +17,18 @@ keywords = ["adexchangebuyer", "google", "cli"] name = "adexchangebuyer1d3" [dependencies] -hyper = "0.7" -mime = "0.1.0" -serde = ">= 0.7.0" -serde_json = ">= 0.7.0" -yup-oauth2 = ">= 0.5.4" +hyper = "0.8" +mime = "0.2.0" +serde = "0.6.0" +serde_json = "0.6.0" +yup-oauth2 = ">= 0.5.6" strsim = "0.4" yup-hyper-mock = "1.0" clap = "2.0" [build-dependencies] -syntex = { version = ">= 0.23" } -serde_codegen = { version = ">= 0.6" } +syntex = { version = "= 0.28" } +serde_codegen = { version = "= 0.6.13" } [dependencies.google-adexchangebuyer1d3] diff --git a/gen/adexchangebuyer1d3-cli/README.md b/gen/adexchangebuyer1d3-cli/README.md index f5ae7c8fa4..383aaed54e 100644 --- a/gen/adexchangebuyer1d3-cli/README.md +++ b/gen/adexchangebuyer1d3-cli/README.md @@ -17,14 +17,14 @@ Everything else about the *Ad Exchange Buyer* API can be found at the You can download the pre-compiled 64bit binaries for the following platforms: -* ![icon](http://megaicons.net/static/img/icons_sizes/6/140/16/ubuntu-icon.png) [ubuntu](http://dl.byronimo.de/google.rs/cli/0.3.3/ubuntu/adexchangebuyer1d3.tar.gz) -* ![icon](http://hydra-media.cursecdn.com/wow.gamepedia.com/a/a2/Apple-icon-16x16.png?version=25ddd67ac3dd3b634478e3978b76cb74) [osx](http://dl.byronimo.de/google.rs/cli/0.3.3/osx/adexchangebuyer1d3.tar.gz) +* ![icon](http://megaicons.net/static/img/icons_sizes/6/140/16/ubuntu-icon.png) [ubuntu](http://dl.byronimo.de/google.rs/cli/0.3.4/ubuntu/adexchangebuyer1d3.tar.gz) +* ![icon](http://hydra-media.cursecdn.com/wow.gamepedia.com/a/a2/Apple-icon-16x16.png?version=25ddd67ac3dd3b634478e3978b76cb74) [osx](http://dl.byronimo.de/google.rs/cli/0.3.4/osx/adexchangebuyer1d3.tar.gz) Find the source code [on github](https://github.com/Byron/google-apis-rs/tree/master/gen/adexchangebuyer1d3-cli). # Usage -This documentation was generated from the *Ad Exchange Buyer* API at revision *20160222*. The CLI is at version *0.3.3*. +This documentation was generated from the *Ad Exchange Buyer* API at revision *20160405*. The CLI is at version *0.3.4*. ```bash adexchangebuyer1d3 [options] diff --git a/gen/adexchangebuyer1d3-cli/mkdocs.yml b/gen/adexchangebuyer1d3-cli/mkdocs.yml index 49131e72fa..470051e2e0 100644 --- a/gen/adexchangebuyer1d3-cli/mkdocs.yml +++ b/gen/adexchangebuyer1d3-cli/mkdocs.yml @@ -1,4 +1,4 @@ -site_name: Ad Exchange Buyer v0.3.3+20160222 +site_name: Ad Exchange Buyer v0.3.4+20160405 site_url: http://byron.github.io/google-apis-rs/google-adexchangebuyer1d3-cli site_description: Write integrating applications with bcore diff --git a/gen/adexchangebuyer1d3-cli/src/cmn.rs b/gen/adexchangebuyer1d3-cli/src/cmn.rs index 188159ee80..ae86fdef65 100644 --- a/gen/adexchangebuyer1d3-cli/src/cmn.rs +++ b/gen/adexchangebuyer1d3-cli/src/cmn.rs @@ -414,7 +414,7 @@ impl TokenStorage for JsonTokenStorage { Err(err) => match err.kind() { io::ErrorKind::NotFound => Ok(()), - _ => Err(json::Error::Io(err)) + _ => Err(json::Error::IoError(err)) }, Ok(_) => Ok(()), } @@ -427,7 +427,7 @@ impl TokenStorage for JsonTokenStorage { Err(serde_err) => Err(serde_err), } }, - Err(io_err) => Err(json::Error::Io(io_err)) + Err(io_err) => Err(json::Error::IoError(io_err)) } } } @@ -444,7 +444,7 @@ impl TokenStorage for JsonTokenStorage { Err(io_err) => { match io_err.kind() { io::ErrorKind::NotFound => Ok(None), - _ => Err(json::Error::Io(io_err)) + _ => Err(json::Error::IoError(io_err)) } } } @@ -683,7 +683,7 @@ pub fn application_secret_from_directory(dir: &str, = json::from_str(json_console_secret).unwrap(); match json::to_writer_pretty(&mut f, &console_secret) { Err(serde_err) => match serde_err { - json::Error::Io(err) => err, + json::Error::IoError(err) => err, _ => panic!("Unexpected serde error: {:#?}", serde_err) }, Ok(_) => continue, @@ -696,7 +696,7 @@ pub fn application_secret_from_directory(dir: &str, }, Ok(f) => { match json::de::from_reader::<_, ConsoleApplicationSecret>(f) { - Err(json::Error::Io(err)) => + Err(json::Error::IoError(err)) => return secret_io_error(err), Err(json_err) => return Err(CLIError::Configuration( diff --git a/gen/adexchangebuyer1d3-cli/src/main.rs b/gen/adexchangebuyer1d3-cli/src/main.rs index c1be591f5a..9ad0d081c9 100644 --- a/gen/adexchangebuyer1d3-cli/src/main.rs +++ b/gen/adexchangebuyer1d3-cli/src/main.rs @@ -2303,7 +2303,7 @@ fn main() { let mut app = App::new("adexchangebuyer1d3") .author("Sebastian Thiel ") - .version("0.3.3+20160222") + .version("0.3.4+20160405") .about("Accesses your bidding-account information, submits creatives for validation, finds available direct deals, and retrieves performance reports.") .after_help("All documentation details can be found at http://byron.github.io/google-apis-rs/google_adexchangebuyer1d3_cli") .arg(Arg::with_name("url") diff --git a/gen/adexchangebuyer1d3/Cargo.toml b/gen/adexchangebuyer1d3/Cargo.toml index aa9d94c6fa..8d9ecb19e2 100644 --- a/gen/adexchangebuyer1d3/Cargo.toml +++ b/gen/adexchangebuyer1d3/Cargo.toml @@ -4,7 +4,7 @@ [package] name = "google-adexchangebuyer1d3" -version = "0.1.12+20160222" +version = "0.1.13+20160405" authors = ["Sebastian Thiel "] description = "A complete library to interact with Ad Exchange Buyer (protocol v1.3)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/adexchangebuyer1d3" @@ -16,14 +16,14 @@ build = "src/build.rs" [dependencies] -hyper = "0.7" -mime = "0.1.0" -serde = ">= 0.7.0" -serde_json = ">= 0.7.0" -yup-oauth2 = ">= 0.5.4" +hyper = "0.8" +mime = "0.2.0" +serde = "0.6.0" +serde_json = "0.6.0" +yup-oauth2 = ">= 0.5.6" url = ">= 0.5" [build-dependencies] -syntex = { version = ">= 0.23" } -serde_codegen = { version = ">= 0.6" } +syntex = { version = "= 0.28" } +serde_codegen = { version = "= 0.6.13" } diff --git a/gen/adexchangebuyer1d3/README.md b/gen/adexchangebuyer1d3/README.md index 1e659ac717..d9ab09c2ee 100644 --- a/gen/adexchangebuyer1d3/README.md +++ b/gen/adexchangebuyer1d3/README.md @@ -5,7 +5,7 @@ DO NOT EDIT ! --> The `google-adexchangebuyer1d3` library allows access to all features of the *Google Ad Exchange Buyer* service. -This documentation was generated from *Ad Exchange Buyer* crate version *0.1.12+20160222*, where *20160222* is the exact revision of the *adexchangebuyer:v1.3* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.12*. +This documentation was generated from *Ad Exchange Buyer* crate version *0.1.13+20160405*, where *20160405* is the exact revision of the *adexchangebuyer:v1.3* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.13*. Everything else about the *Ad Exchange Buyer* *v1d3* API can be found at the [official documentation site](https://developers.google.com/ad-exchange/buyer-rest). diff --git a/gen/adexchangebuyer1d3/src/cmn.rs b/gen/adexchangebuyer1d3/src/cmn.rs index 87b91a8986..c69621da55 100644 --- a/gen/adexchangebuyer1d3/src/cmn.rs +++ b/gen/adexchangebuyer1d3/src/cmn.rs @@ -12,7 +12,7 @@ use mime::{Mime, TopLevel, SubLevel, Attr, Value}; use oauth2::{TokenType, Retry, self}; use hyper; use hyper::header::{ContentType, ContentLength, Headers, UserAgent, Authorization, Header, - HeaderFormat}; + HeaderFormat, Bearer}; use hyper::http::h1::LINE_ENDING; use hyper::method::Method; use hyper::status::StatusCode; @@ -634,7 +634,7 @@ pub struct ResumableUploadHelper<'a, A: 'a> { pub start_at: Option, pub auth: &'a mut A, pub user_agent: &'a str, - pub auth_header: Authorization, + pub auth_header: Authorization, pub url: &'a str, pub reader: &'a mut ReadSeek, pub media_type: Mime, diff --git a/gen/adexchangebuyer1d3/src/lib.rs b/gen/adexchangebuyer1d3/src/lib.rs index b604bfee06..958e415296 100644 --- a/gen/adexchangebuyer1d3/src/lib.rs +++ b/gen/adexchangebuyer1d3/src/lib.rs @@ -2,7 +2,7 @@ // This file was generated automatically from 'src/mako/api/lib.rs.mako' // DO NOT EDIT ! -//! This documentation was generated from *Ad Exchange Buyer* crate version *0.1.12+20160222*, where *20160222* is the exact revision of the *adexchangebuyer:v1.3* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.12*. +//! This documentation was generated from *Ad Exchange Buyer* crate version *0.1.13+20160405*, where *20160405* is the exact revision of the *adexchangebuyer:v1.3* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.13*. //! //! Everything else about the *Ad Exchange Buyer* *v1d3* API can be found at the //! [official documentation site](https://developers.google.com/ad-exchange/buyer-rest). diff --git a/gen/adexchangebuyer1d3/src/lib.rs.in b/gen/adexchangebuyer1d3/src/lib.rs.in index 7257d11a7f..99f56dda47 100644 --- a/gen/adexchangebuyer1d3/src/lib.rs.in +++ b/gen/adexchangebuyer1d3/src/lib.rs.in @@ -133,7 +133,7 @@ impl<'a, C, A> AdExchangeBuyer AdExchangeBuyer { client: RefCell::new(client), auth: RefCell::new(authenticator), - _user_agent: "google-api-rust-client/0.1.12".to_string(), + _user_agent: "google-api-rust-client/0.1.13".to_string(), } } @@ -160,7 +160,7 @@ impl<'a, C, A> AdExchangeBuyer } /// Set the user-agent header field to use in all requests to the server. - /// It defaults to `google-api-rust-client/0.1.12`. + /// It defaults to `google-api-rust-client/0.1.13`. /// /// Returns the previously set user-agent. pub fn user_agent(&mut self, agent_name: String) -> String { @@ -453,6 +453,9 @@ pub struct DirectDeal { pub advertiser: Option, /// Resource type. pub kind: Option, + /// The account id that this deal was negotiated for. It is either the buyer or the client that this deal was negotiated on behalf of. + #[serde(rename="buyerAccountId")] + pub buyer_account_id: Option, /// The account id of the buyer this deal is for. #[serde(rename="accountId")] pub account_id: Option, @@ -507,13 +510,6 @@ pub struct AccountBidderLocation { /// - US_EAST /// - US_WEST pub region: Option, - /// The protocol that the bidder endpoint is using. By default, OpenRTB protocols use JSON, except PROTOCOL_OPENRTB_PROTOBUF. PROTOCOL_OPENRTB_PROTOBUF uses protobuf encoding over the latest OpenRTB protocol version, which is 2.3 right now. Allowed values: - /// - PROTOCOL_ADX - /// - PROTOCOL_OPENRTB_2_2 - /// - PROTOCOL_OPENRTB_2_3 - /// - PROTOCOL_OPENRTB_PROTOBUF - #[serde(rename="bidProtocol")] - pub bid_protocol: Option, /// The maximum queries per second the Ad Exchange will send. #[serde(rename="maximumQps")] pub maximum_qps: Option, @@ -739,7 +735,7 @@ pub struct PerformanceReport { impl Part for PerformanceReport {} -/// The configuration data for an Ad Exchange performance report list. https://sites.google.com/a/google.com/adx-integration/Home/engineering/binary-releases/rtb-api-release https://cs.corp.google.com/#piper///depot/google3/contentads/adx/tools/rtb_api/adxrtb.py +/// The configuration data for an Ad Exchange performance report list. /// /// # Activities /// @@ -1667,7 +1663,7 @@ impl<'a, C, A> BillingInfoGetCall<'a, C, A> where C: BorrowMut, A /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, BillingInfo)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -1736,8 +1732,7 @@ impl<'a, C, A> BillingInfoGetCall<'a, C, A> where C: BorrowMut, A } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -1902,7 +1897,7 @@ impl<'a, C, A> BillingInfoListCall<'a, C, A> where C: BorrowMut, /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, BillingInfoList)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -1949,8 +1944,7 @@ impl<'a, C, A> BillingInfoListCall<'a, C, A> where C: BorrowMut, } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -2105,7 +2099,7 @@ impl<'a, C, A> DirectDealListCall<'a, C, A> where C: BorrowMut, A /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, DirectDealsList)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -2152,8 +2146,7 @@ impl<'a, C, A> DirectDealListCall<'a, C, A> where C: BorrowMut, A } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -2309,7 +2302,7 @@ impl<'a, C, A> DirectDealGetCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, DirectDeal)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -2378,8 +2371,7 @@ impl<'a, C, A> DirectDealGetCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -2553,7 +2545,7 @@ impl<'a, C, A> BudgetPatchCall<'a, C, A> where C: BorrowMut, A: o /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Budget)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -2634,8 +2626,7 @@ impl<'a, C, A> BudgetPatchCall<'a, C, A> where C: BorrowMut, A: o } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -2832,7 +2823,7 @@ impl<'a, C, A> BudgetUpdateCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Budget)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -2913,8 +2904,7 @@ impl<'a, C, A> BudgetUpdateCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -3104,7 +3094,7 @@ impl<'a, C, A> BudgetGetCall<'a, C, A> where C: BorrowMut, A: oau /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Budget)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -3174,8 +3164,7 @@ impl<'a, C, A> BudgetGetCall<'a, C, A> where C: BorrowMut, A: oau } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -3357,7 +3346,7 @@ impl<'a, C, A> CreativeInsertCall<'a, C, A> where C: BorrowMut, A /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Creative)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -3415,8 +3404,7 @@ impl<'a, C, A> CreativeInsertCall<'a, C, A> where C: BorrowMut, A } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -3594,7 +3582,7 @@ impl<'a, C, A> CreativeListCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, CreativesList)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -3660,8 +3648,7 @@ impl<'a, C, A> CreativeListCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -3855,7 +3842,7 @@ impl<'a, C, A> CreativeGetCall<'a, C, A> where C: BorrowMut, A: o /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Creative)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -3925,8 +3912,7 @@ impl<'a, C, A> CreativeGetCall<'a, C, A> where C: BorrowMut, A: o } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -4109,7 +4095,7 @@ impl<'a, C, A> AccountUpdateCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Account)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -4189,8 +4175,7 @@ impl<'a, C, A> AccountUpdateCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -4376,7 +4361,7 @@ impl<'a, C, A> AccountPatchCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Account)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -4456,8 +4441,7 @@ impl<'a, C, A> AccountPatchCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -4635,7 +4619,7 @@ impl<'a, C, A> AccountListCall<'a, C, A> where C: BorrowMut, A: o /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, AccountsList)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -4682,8 +4666,7 @@ impl<'a, C, A> AccountListCall<'a, C, A> where C: BorrowMut, A: o } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -4839,7 +4822,7 @@ impl<'a, C, A> AccountGetCall<'a, C, A> where C: BorrowMut, A: oa /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Account)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -4908,8 +4891,7 @@ impl<'a, C, A> AccountGetCall<'a, C, A> where C: BorrowMut, A: oa } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -5081,7 +5063,7 @@ impl<'a, C, A> PerformanceReportListCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, PerformanceReportList)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -5137,8 +5119,7 @@ impl<'a, C, A> PerformanceReportListCall<'a, C, A> where C: BorrowMut PretargetingConfigDeleteCall<'a, C, A> where C: BorrowMut Result { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -5408,8 +5389,7 @@ impl<'a, C, A> PretargetingConfigDeleteCall<'a, C, A> where C: BorrowMut PretargetingConfigPatchCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, PretargetingConfig)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -5664,8 +5644,7 @@ impl<'a, C, A> PretargetingConfigPatchCall<'a, C, A> where C: BorrowMut PretargetingConfigGetCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, PretargetingConfig)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -5925,8 +5904,7 @@ impl<'a, C, A> PretargetingConfigGetCall<'a, C, A> where C: BorrowMut PretargetingConfigInsertCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, PretargetingConfig)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -6189,8 +6167,7 @@ impl<'a, C, A> PretargetingConfigInsertCall<'a, C, A> where C: BorrowMut PretargetingConfigListCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, PretargetingConfigList)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -6438,8 +6415,7 @@ impl<'a, C, A> PretargetingConfigListCall<'a, C, A> where C: BorrowMut PretargetingConfigUpdateCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, PretargetingConfig)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -6694,8 +6670,7 @@ impl<'a, C, A> PretargetingConfigUpdateCall<'a, C, A> where C: BorrowMut"] description = "A complete library to interact with Ad Exchange Buyer (protocol v1.4)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/adexchangebuyer1d4-cli" @@ -17,18 +17,18 @@ keywords = ["adexchangebuyer", "google", "cli"] name = "adexchangebuyer1d4" [dependencies] -hyper = "0.7" -mime = "0.1.0" -serde = ">= 0.7.0" -serde_json = ">= 0.7.0" -yup-oauth2 = ">= 0.5.4" +hyper = "0.8" +mime = "0.2.0" +serde = "0.6.0" +serde_json = "0.6.0" +yup-oauth2 = ">= 0.5.6" strsim = "0.4" yup-hyper-mock = "1.0" clap = "2.0" [build-dependencies] -syntex = { version = ">= 0.23" } -serde_codegen = { version = ">= 0.6" } +syntex = { version = "= 0.28" } +serde_codegen = { version = "= 0.6.13" } [dependencies.google-adexchangebuyer1d4] diff --git a/gen/adexchangebuyer1d4-cli/README.md b/gen/adexchangebuyer1d4-cli/README.md index 59765ecc4c..5b925994fb 100644 --- a/gen/adexchangebuyer1d4-cli/README.md +++ b/gen/adexchangebuyer1d4-cli/README.md @@ -17,14 +17,14 @@ Everything else about the *Ad Exchange Buyer* API can be found at the You can download the pre-compiled 64bit binaries for the following platforms: -* ![icon](http://megaicons.net/static/img/icons_sizes/6/140/16/ubuntu-icon.png) [ubuntu](http://dl.byronimo.de/google.rs/cli/0.3.3/ubuntu/adexchangebuyer1d4.tar.gz) -* ![icon](http://hydra-media.cursecdn.com/wow.gamepedia.com/a/a2/Apple-icon-16x16.png?version=25ddd67ac3dd3b634478e3978b76cb74) [osx](http://dl.byronimo.de/google.rs/cli/0.3.3/osx/adexchangebuyer1d4.tar.gz) +* ![icon](http://megaicons.net/static/img/icons_sizes/6/140/16/ubuntu-icon.png) [ubuntu](http://dl.byronimo.de/google.rs/cli/0.3.4/ubuntu/adexchangebuyer1d4.tar.gz) +* ![icon](http://hydra-media.cursecdn.com/wow.gamepedia.com/a/a2/Apple-icon-16x16.png?version=25ddd67ac3dd3b634478e3978b76cb74) [osx](http://dl.byronimo.de/google.rs/cli/0.3.4/osx/adexchangebuyer1d4.tar.gz) Find the source code [on github](https://github.com/Byron/google-apis-rs/tree/master/gen/adexchangebuyer1d4-cli). # Usage -This documentation was generated from the *Ad Exchange Buyer* API at revision *20160222*. The CLI is at version *0.3.3*. +This documentation was generated from the *Ad Exchange Buyer* API at revision *20160405*. The CLI is at version *0.3.4*. ```bash adexchangebuyer1d4 [options] @@ -54,6 +54,8 @@ adexchangebuyer1d4 [options] marketplacenotes insert (-r )... [-p ]... [-o ] list [-p ]... [-o ] + marketplaceprivateauction + updateproposal (-r )... [-p ]... performance-report list [-p ]... [-o ] pretargeting-config diff --git a/gen/adexchangebuyer1d4-cli/mkdocs.yml b/gen/adexchangebuyer1d4-cli/mkdocs.yml index 24ef3813ee..891f506568 100644 --- a/gen/adexchangebuyer1d4-cli/mkdocs.yml +++ b/gen/adexchangebuyer1d4-cli/mkdocs.yml @@ -1,4 +1,4 @@ -site_name: Ad Exchange Buyer v0.3.3+20160222 +site_name: Ad Exchange Buyer v0.3.4+20160405 site_url: http://byron.github.io/google-apis-rs/google-adexchangebuyer1d4-cli site_description: Write integrating applications with bcore @@ -29,6 +29,7 @@ pages: - ['marketplacedeals_update.md', 'Marketplacedeals', 'Update'] - ['marketplacenotes_insert.md', 'Marketplacenotes', 'Insert'] - ['marketplacenotes_list.md', 'Marketplacenotes', 'List'] +- ['marketplaceprivateauction_updateproposal.md', 'Marketplaceprivateauction', 'Updateproposal'] - ['performance-report_list.md', 'Performance Report', 'List'] - ['pretargeting-config_delete.md', 'Pretargeting Config', 'Delete'] - ['pretargeting-config_get.md', 'Pretargeting Config', 'Get'] diff --git a/gen/adexchangebuyer1d4-cli/src/cmn.rs b/gen/adexchangebuyer1d4-cli/src/cmn.rs index 188159ee80..ae86fdef65 100644 --- a/gen/adexchangebuyer1d4-cli/src/cmn.rs +++ b/gen/adexchangebuyer1d4-cli/src/cmn.rs @@ -414,7 +414,7 @@ impl TokenStorage for JsonTokenStorage { Err(err) => match err.kind() { io::ErrorKind::NotFound => Ok(()), - _ => Err(json::Error::Io(err)) + _ => Err(json::Error::IoError(err)) }, Ok(_) => Ok(()), } @@ -427,7 +427,7 @@ impl TokenStorage for JsonTokenStorage { Err(serde_err) => Err(serde_err), } }, - Err(io_err) => Err(json::Error::Io(io_err)) + Err(io_err) => Err(json::Error::IoError(io_err)) } } } @@ -444,7 +444,7 @@ impl TokenStorage for JsonTokenStorage { Err(io_err) => { match io_err.kind() { io::ErrorKind::NotFound => Ok(None), - _ => Err(json::Error::Io(io_err)) + _ => Err(json::Error::IoError(io_err)) } } } @@ -683,7 +683,7 @@ pub fn application_secret_from_directory(dir: &str, = json::from_str(json_console_secret).unwrap(); match json::to_writer_pretty(&mut f, &console_secret) { Err(serde_err) => match serde_err { - json::Error::Io(err) => err, + json::Error::IoError(err) => err, _ => panic!("Unexpected serde error: {:#?}", serde_err) }, Ok(_) => continue, @@ -696,7 +696,7 @@ pub fn application_secret_from_directory(dir: &str, }, Ok(f) => { match json::de::from_reader::<_, ConsoleApplicationSecret>(f) { - Err(json::Error::Io(err)) => + Err(json::Error::IoError(err)) => return secret_io_error(err), Err(json_err) => return Err(CLIError::Configuration( diff --git a/gen/adexchangebuyer1d4-cli/src/main.rs b/gen/adexchangebuyer1d4-cli/src/main.rs index 1aeaec42f2..1404cbe3f1 100644 --- a/gen/adexchangebuyer1d4-cli/src/main.rs +++ b/gen/adexchangebuyer1d4-cli/src/main.rs @@ -1478,6 +1478,93 @@ impl<'n> Engine<'n> { } } + fn _marketplaceprivateauction_updateproposal(&self, opt: &ArgMatches<'n>, dry_run: bool, err: &mut InvalidOptionsError) + -> Result<(), DoitError> { + + let mut field_cursor = FieldCursor::default(); + let mut object = json::value::Value::Object(Default::default()); + + for kvarg in opt.values_of("kv").map(|i|i.collect()).unwrap_or(Vec::new()).iter() { + let last_errc = err.issues.len(); + let (key, value) = parse_kv_arg(&*kvarg, err, false); + let mut temp_cursor = field_cursor.clone(); + if let Err(field_err) = temp_cursor.set(&*key) { + err.issues.push(field_err); + } + if value.is_none() { + field_cursor = temp_cursor.clone(); + if err.issues.len() > last_errc { + err.issues.remove(last_errc); + } + continue; + } + + let type_info: Option<(&'static str, JsonTypeInfo)> = + match &temp_cursor.to_string()[..] { + "note.kind" => Some(("note.kind", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "note.proposal-revision-number" => Some(("note.proposalRevisionNumber", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "note.deal-id" => Some(("note.dealId", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "note.note" => Some(("note.note", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "note.proposal-id" => Some(("note.proposalId", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "note.creator-role" => Some(("note.creatorRole", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "note.note-id" => Some(("note.noteId", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "note.timestamp-ms" => Some(("note.timestampMs", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "external-deal-id" => Some(("externalDealId", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "proposal-revision-number" => Some(("proposalRevisionNumber", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "update-action" => Some(("updateAction", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + _ => { + let suggestion = FieldCursor::did_you_mean(key, &vec!["creator-role", "deal-id", "external-deal-id", "kind", "note", "note-id", "proposal-id", "proposal-revision-number", "timestamp-ms", "update-action"]); + err.issues.push(CLIError::Field(FieldError::Unknown(temp_cursor.to_string(), suggestion, value.map(|v| v.to_string())))); + None + } + }; + if let Some((field_cursor_str, type_info)) = type_info { + FieldCursor::from(field_cursor_str).set_json_value(&mut object, value.unwrap(), type_info, err, &temp_cursor); + } + } + let mut request: api::UpdatePrivateAuctionProposalRequest = json::value::from_value(object).unwrap(); + let mut call = self.hub.marketplaceprivateauction().updateproposal(request, opt.value_of("private-auction-id").unwrap_or("")); + for parg in opt.values_of("v").map(|i|i.collect()).unwrap_or(Vec::new()).iter() { + let (key, value) = parse_kv_arg(&*parg, err, false); + match key { + _ => { + let mut found = false; + for param in &self.gp { + if key == *param { + found = true; + call = call.param(self.gpm.iter().find(|t| t.0 == key).unwrap_or(&("", key)).1, value.unwrap_or("unset")); + break; + } + } + if !found { + err.issues.push(CLIError::UnknownParameter(key.to_string(), + {let mut v = Vec::new(); + v.extend(self.gp.iter().map(|v|*v)); + v } )); + } + } + } + } + let protocol = CallType::Standard; + if dry_run { + Ok(()) + } else { + assert!(err.issues.len() == 0); + for scope in self.opt.values_of("url").map(|i|i.collect()).unwrap_or(Vec::new()).iter() { + call = call.add_scope(scope); + } + match match protocol { + CallType::Standard => call.doit(), + _ => unreachable!() + } { + Err(api_err) => Err(DoitError::ApiError(api_err)), + Ok(mut response) => { + Ok(()) + } + } + } + } + fn _performance_report_list(&self, opt: &ArgMatches<'n>, dry_run: bool, err: &mut InvalidOptionsError) -> Result<(), DoitError> { let mut call = self.hub.performance_report().list(opt.value_of("account-id").unwrap_or(""), opt.value_of("end-date-time").unwrap_or(""), opt.value_of("start-date-time").unwrap_or("")); @@ -2720,6 +2807,17 @@ impl<'n> Engine<'n> { } } }, + ("marketplaceprivateauction", Some(opt)) => { + match opt.subcommand() { + ("updateproposal", Some(opt)) => { + call_result = self._marketplaceprivateauction_updateproposal(opt, dry_run, &mut err); + }, + _ => { + err.issues.push(CLIError::MissingMethodError("marketplaceprivateauction".to_string())); + writeln!(io::stderr(), "{}\n", opt.usage()).ok(); + } + } + }, ("performance-report", Some(opt)) => { match opt.subcommand() { ("list", Some(opt)) => { @@ -3414,6 +3512,31 @@ fn main() { ]), ]), + ("marketplaceprivateauction", "methods: 'updateproposal'", vec![ + ("updateproposal", + Some(r##"Update a given private auction proposal"##), + "Details at http://byron.github.io/google-apis-rs/google_adexchangebuyer1d4_cli/marketplaceprivateauction_updateproposal", + vec![ + (Some(r##"private-auction-id"##), + None, + Some(r##"The private auction id to be updated."##), + Some(true), + Some(false)), + + (Some(r##"kv"##), + Some(r##"r"##), + Some(r##"Set various fields of the request structure, matching the key=value form"##), + Some(true), + Some(true)), + + (Some(r##"v"##), + Some(r##"p"##), + Some(r##"Set various optional parameters, matching the key=value form"##), + Some(false), + Some(true)), + ]), + ]), + ("performance-report", "methods: 'list'", vec![ ("list", Some(r##"Retrieves the authenticated user's list of performance metrics."##), @@ -3851,7 +3974,7 @@ fn main() { let mut app = App::new("adexchangebuyer1d4") .author("Sebastian Thiel ") - .version("0.3.3+20160222") + .version("0.3.4+20160405") .about("Accesses your bidding-account information, submits creatives for validation, finds available direct deals, and retrieves performance reports.") .after_help("All documentation details can be found at http://byron.github.io/google-apis-rs/google_adexchangebuyer1d4_cli") .arg(Arg::with_name("url") diff --git a/gen/adexchangebuyer1d4/Cargo.toml b/gen/adexchangebuyer1d4/Cargo.toml index 5d5f5d0e4f..965d6929df 100644 --- a/gen/adexchangebuyer1d4/Cargo.toml +++ b/gen/adexchangebuyer1d4/Cargo.toml @@ -4,7 +4,7 @@ [package] name = "google-adexchangebuyer1d4" -version = "0.1.12+20160222" +version = "0.1.13+20160405" authors = ["Sebastian Thiel "] description = "A complete library to interact with Ad Exchange Buyer (protocol v1.4)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/adexchangebuyer1d4" @@ -16,14 +16,14 @@ build = "src/build.rs" [dependencies] -hyper = "0.7" -mime = "0.1.0" -serde = ">= 0.7.0" -serde_json = ">= 0.7.0" -yup-oauth2 = ">= 0.5.4" +hyper = "0.8" +mime = "0.2.0" +serde = "0.6.0" +serde_json = "0.6.0" +yup-oauth2 = ">= 0.5.6" url = ">= 0.5" [build-dependencies] -syntex = { version = ">= 0.23" } -serde_codegen = { version = ">= 0.6" } +syntex = { version = "= 0.28" } +serde_codegen = { version = "= 0.6.13" } diff --git a/gen/adexchangebuyer1d4/README.md b/gen/adexchangebuyer1d4/README.md index bf845517d2..9aea5f9ad8 100644 --- a/gen/adexchangebuyer1d4/README.md +++ b/gen/adexchangebuyer1d4/README.md @@ -5,7 +5,7 @@ DO NOT EDIT ! --> The `google-adexchangebuyer1d4` library allows access to all features of the *Google Ad Exchange Buyer* service. -This documentation was generated from *Ad Exchange Buyer* crate version *0.1.12+20160222*, where *20160222* is the exact revision of the *adexchangebuyer:v1.4* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.12*. +This documentation was generated from *Ad Exchange Buyer* crate version *0.1.13+20160405*, where *20160405* is the exact revision of the *adexchangebuyer:v1.4* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.13*. Everything else about the *Ad Exchange Buyer* *v1d4* API can be found at the [official documentation site](https://developers.google.com/ad-exchange/buyer-rest). @@ -25,6 +25,8 @@ Handle the following *Resources* with ease from the central [hub](http://byron.g * [*delete*](http://byron.github.io/google-apis-rs/google_adexchangebuyer1d4/struct.MarketplacedealDeleteCall.html), [*insert*](http://byron.github.io/google-apis-rs/google_adexchangebuyer1d4/struct.MarketplacedealInsertCall.html), [*list*](http://byron.github.io/google-apis-rs/google_adexchangebuyer1d4/struct.MarketplacedealListCall.html) and [*update*](http://byron.github.io/google-apis-rs/google_adexchangebuyer1d4/struct.MarketplacedealUpdateCall.html) * marketplacenotes * [*insert*](http://byron.github.io/google-apis-rs/google_adexchangebuyer1d4/struct.MarketplacenoteInsertCall.html) and [*list*](http://byron.github.io/google-apis-rs/google_adexchangebuyer1d4/struct.MarketplacenoteListCall.html) +* marketplaceprivateauction + * [*updateproposal*](http://byron.github.io/google-apis-rs/google_adexchangebuyer1d4/struct.MarketplaceprivateauctionUpdateproposalCall.html) * [performance report](http://byron.github.io/google-apis-rs/google_adexchangebuyer1d4/struct.PerformanceReport.html) * [*list*](http://byron.github.io/google-apis-rs/google_adexchangebuyer1d4/struct.PerformanceReportListCall.html) * [pretargeting config](http://byron.github.io/google-apis-rs/google_adexchangebuyer1d4/struct.PretargetingConfig.html) diff --git a/gen/adexchangebuyer1d4/src/cmn.rs b/gen/adexchangebuyer1d4/src/cmn.rs index 87b91a8986..c69621da55 100644 --- a/gen/adexchangebuyer1d4/src/cmn.rs +++ b/gen/adexchangebuyer1d4/src/cmn.rs @@ -12,7 +12,7 @@ use mime::{Mime, TopLevel, SubLevel, Attr, Value}; use oauth2::{TokenType, Retry, self}; use hyper; use hyper::header::{ContentType, ContentLength, Headers, UserAgent, Authorization, Header, - HeaderFormat}; + HeaderFormat, Bearer}; use hyper::http::h1::LINE_ENDING; use hyper::method::Method; use hyper::status::StatusCode; @@ -634,7 +634,7 @@ pub struct ResumableUploadHelper<'a, A: 'a> { pub start_at: Option, pub auth: &'a mut A, pub user_agent: &'a str, - pub auth_header: Authorization, + pub auth_header: Authorization, pub url: &'a str, pub reader: &'a mut ReadSeek, pub media_type: Mime, diff --git a/gen/adexchangebuyer1d4/src/lib.rs b/gen/adexchangebuyer1d4/src/lib.rs index bd98d5f88b..542f2435f4 100644 --- a/gen/adexchangebuyer1d4/src/lib.rs +++ b/gen/adexchangebuyer1d4/src/lib.rs @@ -2,7 +2,7 @@ // This file was generated automatically from 'src/mako/api/lib.rs.mako' // DO NOT EDIT ! -//! This documentation was generated from *Ad Exchange Buyer* crate version *0.1.12+20160222*, where *20160222* is the exact revision of the *adexchangebuyer:v1.4* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.12*. +//! This documentation was generated from *Ad Exchange Buyer* crate version *0.1.13+20160405*, where *20160405* is the exact revision of the *adexchangebuyer:v1.4* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.13*. //! //! Everything else about the *Ad Exchange Buyer* *v1d4* API can be found at the //! [official documentation site](https://developers.google.com/ad-exchange/buyer-rest). @@ -23,6 +23,8 @@ //! * [*delete*](struct.MarketplacedealDeleteCall.html), [*insert*](struct.MarketplacedealInsertCall.html), [*list*](struct.MarketplacedealListCall.html) and [*update*](struct.MarketplacedealUpdateCall.html) //! * marketplacenotes //! * [*insert*](struct.MarketplacenoteInsertCall.html) and [*list*](struct.MarketplacenoteListCall.html) +//! * marketplaceprivateauction +//! * [*updateproposal*](struct.MarketplaceprivateauctionUpdateproposalCall.html) //! * [performance report](struct.PerformanceReport.html) //! * [*list*](struct.PerformanceReportListCall.html) //! * [pretargeting config](struct.PretargetingConfig.html) diff --git a/gen/adexchangebuyer1d4/src/lib.rs.in b/gen/adexchangebuyer1d4/src/lib.rs.in index e6f9424e43..353f6236ec 100644 --- a/gen/adexchangebuyer1d4/src/lib.rs.in +++ b/gen/adexchangebuyer1d4/src/lib.rs.in @@ -133,7 +133,7 @@ impl<'a, C, A> AdExchangeBuyer AdExchangeBuyer { client: RefCell::new(client), auth: RefCell::new(authenticator), - _user_agent: "google-api-rust-client/0.1.12".to_string(), + _user_agent: "google-api-rust-client/0.1.13".to_string(), } } @@ -155,6 +155,9 @@ impl<'a, C, A> AdExchangeBuyer pub fn marketplacenotes(&'a self) -> MarketplacenoteMethods<'a, C, A> { MarketplacenoteMethods { hub: &self } } + pub fn marketplaceprivateauction(&'a self) -> MarketplaceprivateauctionMethods<'a, C, A> { + MarketplaceprivateauctionMethods { hub: &self } + } pub fn performance_report(&'a self) -> PerformanceReportMethods<'a, C, A> { PerformanceReportMethods { hub: &self } } @@ -172,7 +175,7 @@ impl<'a, C, A> AdExchangeBuyer } /// Set the user-agent header field to use in all requests to the server. - /// It defaults to `google-api-rust-client/0.1.12`. + /// It defaults to `google-api-rust-client/0.1.13`. /// /// Returns the previously set user-agent. pub fn user_agent(&mut self, agent_name: String) -> String { @@ -186,6 +189,24 @@ impl<'a, C, A> AdExchangeBuyer // ############ // SCHEMAS ### // ########## +/// There is no detailed description. +/// +/// # Activities +/// +/// This type is used in activities, which are methods you may call on this type or where this type is involved in. +/// The list links the activity name, along with information about where it is used (one of *request* and *response*). +/// +/// * [insert marketplacenotes](struct.MarketplacenoteInsertCall.html) (response) +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct AddOrderNotesResponse { + /// no description provided + pub notes: Option>, +} + +impl ResponseResult for AddOrderNotesResponse {} + + /// There is no detailed description. /// /// This type is not used in any activity, and only used as *part* of another schema. @@ -611,8 +632,9 @@ pub struct Product { /// The set of fields around delivery control that are interesting for a buyer to see but are non-negotiable. These are set by the publisher. This message is assigned an id of 100 since some day we would want to model this as a protobuf extension. #[serde(rename="deliveryControl")] pub delivery_control: Option, - /// Optional List of labels for the product (optional, buyer-readonly). - pub labels: Option>, + /// Targeting that is shared between the buyer and the seller. Each targeting criteria has a specified key and for each key there is a list of inclusion value or exclusion values. (buyer-readonly) + #[serde(rename="sharedTargetings")] + pub shared_targetings: Option>, /// The negotiable terms of the deal (buyer-readonly) pub terms: Option, /// Optional private auction id if this offer is a private auction offer. @@ -621,12 +643,14 @@ pub struct Product { /// The proposed end time for the deal (ms since epoch) (buyer-readonly) #[serde(rename="flightEndTimeMs")] pub flight_end_time_ms: Option, - /// Targeting that is shared between the buyer and the seller. Each targeting criteria has a specified key and for each key there is a list of inclusion value or exclusion values. (buyer-readonly) - #[serde(rename="sharedTargetings")] - pub shared_targetings: Option>, + /// Optional List of labels for the product (optional, buyer-readonly). + pub labels: Option>, /// What exchange will provide this inventory (readonly, except on create). #[serde(rename="inventorySource")] pub inventory_source: Option, + /// Id of the publisher profile for a given seller. A (seller.account_id, publisher_profile_id) pair uniquely identifies a publisher profile. Buyers can call the PublisherProfiles::List endpoint to get a list of publisher profiles for a given seller. + #[serde(rename="publisherProfileId")] + pub publisher_profile_id: Option, /// Time of last update in ms. since epoch (readonly) #[serde(rename="lastUpdateTimeMs")] pub last_update_time_ms: Option, @@ -645,17 +669,17 @@ pub struct Product { pub syndication_product: Option, /// Information about the seller that created this product (readonly, except on create) pub seller: Option, - /// no description provided + /// The web property code for the seller. This field is meant to be copied over as is when creating deals. #[serde(rename="webPropertyCode")] pub web_property_code: Option, /// The state of the product. (buyer-readonly) pub state: Option, - /// Inventory availability dates. (times are in ms since epoch) The granularity is generally in the order of seconds. (buyer-readonly) - #[serde(rename="flightStartTimeMs")] - pub flight_start_time_ms: Option, /// If the creator has already signed off on the product, then the buyer can finalize the deal by accepting the product as is. When copying to a proposal, if any of the terms are changed, then auto_finalize is automatically set to false. #[serde(rename="hasCreatorSignedOff")] pub has_creator_signed_off: Option, + /// Inventory availability dates. (times are in ms since epoch) The granularity is generally in the order of seconds. (buyer-readonly) + #[serde(rename="flightStartTimeMs")] + pub flight_start_time_ms: Option, /// Creation time in ms. since epoch (readonly) #[serde(rename="creationTimeMs")] pub creation_time_ms: Option, @@ -863,15 +887,18 @@ impl ResponseResult for EditAllOrderDealsResponse {} /// This type is used in activities, which are methods you may call on this type or where this type is involved in. /// The list links the activity name, along with information about where it is used (one of *request* and *response*). /// -/// * [insert marketplacenotes](struct.MarketplacenoteInsertCall.html) (response) +/// * [insert proposals](struct.ProposalInsertCall.html) (request) /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] -pub struct AddOrderNotesResponse { +pub struct CreateOrdersRequest { /// no description provided - pub notes: Option>, + #[serde(rename="webPropertyCode")] + pub web_property_code: Option, + /// The list of proposals to create. + pub proposals: Option>, } -impl ResponseResult for AddOrderNotesResponse {} +impl RequestValue for CreateOrdersRequest {} /// There is no detailed description. @@ -931,6 +958,33 @@ impl NestedType for CreativeFilteringReasonsReasons {} impl Part for CreativeFilteringReasonsReasons {} +/// There is no detailed description. +/// +/// # Activities +/// +/// This type is used in activities, which are methods you may call on this type or where this type is involved in. +/// The list links the activity name, along with information about where it is used (one of *request* and *response*). +/// +/// * [updateproposal marketplaceprivateauction](struct.MarketplaceprivateauctionUpdateproposalCall.html) (request) +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct UpdatePrivateAuctionProposalRequest { + /// Optional note to be added. + pub note: Option, + /// The externalDealId of the deal to be updated. + #[serde(rename="externalDealId")] + pub external_deal_id: Option, + /// The current revision number of the proposal to be updated. + #[serde(rename="proposalRevisionNumber")] + pub proposal_revision_number: Option, + /// The proposed action on the private auction proposal. + #[serde(rename="updateAction")] + pub update_action: Option, +} + +impl RequestValue for UpdatePrivateAuctionProposalRequest {} + + /// There is no detailed description. /// /// # Activities @@ -995,6 +1049,40 @@ pub struct GetPublisherProfilesByAccountIdResponse { impl ResponseResult for GetPublisherProfilesByAccountIdResponse {} +/// Value of the dimension. +/// +/// This type is not used in any activity, and only used as *part* of another schema. +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct DimensionDimensionValue { + /// Id of the dimension. + pub id: Option, + /// Name of the dimension mainly for debugging purposes. + pub name: Option, +} + +impl Part for DimensionDimensionValue {} + + +/// This message carries publisher provided forecasting information. +/// +/// This type is not used in any activity, and only used as *part* of another schema. +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct PublisherProvidedForecast { + /// Publisher provided weekly impressions. + #[serde(rename="weeklyImpressions")] + pub weekly_impressions: Option, + /// Publisher provided dimensions. E.g. geo, sizes etc... + pub dimensions: Option>, + /// Publisher provided weekly uniques. + #[serde(rename="weeklyUniques")] + pub weekly_uniques: Option, +} + +impl Part for PublisherProvidedForecast {} + + /// Your bidder locations that have distinct URLs. /// /// This type is not used in any activity, and only used as *part* of another schema. @@ -1305,8 +1393,6 @@ impl Part for PerformanceReport {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct PublisherProfileApiProto { - /// Identifies what kind of resource this is. Value: the fixed string "adexchangebuyer#publisherProfileApiProto". - pub kind: Option, /// Link to publisher's Google+ page. #[serde(rename="googlePlusLink")] pub google_plus_link: Option, @@ -1315,30 +1401,58 @@ pub struct PublisherProfileApiProto { pub media_kit_link: Option, /// no description provided pub name: Option, - /// The list of domains represented in this publisher profile. Empty if this is a parent profile. - #[serde(rename="publisherDomains")] - pub publisher_domains: Option>, + /// Publisher provided forecasting information. + #[serde(rename="publisherProvidedForecast")] + pub publisher_provided_forecast: Option, /// Publisher provided overview. pub overview: Option, /// A pitch statement for the buyer #[serde(rename="buyerPitchStatement")] pub buyer_pitch_statement: Option, - /// Link to publisher rate card - #[serde(rename="rateCardInfoLink")] - pub rate_card_info_link: Option, /// True, if this is the parent profile, which represents all domains owned by the publisher. #[serde(rename="isParent")] pub is_parent: Option, - /// Link for a sample content page. - #[serde(rename="samplePageLink")] - pub sample_page_link: Option, /// Publisher provided key metrics and rankings. #[serde(rename="topHeadlines")] pub top_headlines: Option>, + /// Publisher provided info on its audience. + pub audience: Option, + /// Unique Id for publisher profile. + #[serde(rename="publisherProfileId")] + pub publisher_profile_id: Option, + /// The account id of the seller. + #[serde(rename="accountId")] + pub account_id: Option, + /// Identifies what kind of resource this is. Value: the fixed string "adexchangebuyer#publisherProfileApiProto". + pub kind: Option, + /// Programmatic contact for the publisher profile. + #[serde(rename="programmaticContact")] + pub programmatic_contact: Option, + /// The list of domains represented in this publisher profile. Empty if this is a parent profile. + #[serde(rename="publisherDomains")] + pub publisher_domains: Option>, + /// Exchange where this publisher profile is from. E.g. AdX, Rubicon etc... + pub exchange: Option, + /// Link to publisher rate card + #[serde(rename="rateCardInfoLink")] + pub rate_card_info_link: Option, + /// True, if this profile is published. Deprecated for state. + #[serde(rename="isPublished")] + pub is_published: Option, + /// Seller of the publisher profile. + pub seller: Option, + /// Direct contact for the publisher profile. + #[serde(rename="directContact")] + pub direct_contact: Option, + /// Link for a sample content page. + #[serde(rename="samplePageLink")] + pub sample_page_link: Option, + /// State of the publisher profile. + pub state: Option, /// The url to the logo for the publisher. #[serde(rename="logoUrl")] pub logo_url: Option, - /// Unique id for the publisher profile + /// The pair of (seller.account_id, profile_id) uniquely identifies a publisher profile for a given publisher. #[serde(rename="profileId")] pub profile_id: Option, } @@ -1621,25 +1735,21 @@ impl RequestValue for PretargetingConfig {} impl ResponseResult for PretargetingConfig {} -/// There is no detailed description. +/// This message carries publisher provided breakdown. E.g. {dimension_type: 'COUNTRY', [{dimension_value: {id: 1, name: 'US'}}, {dimension_value: {id: 2, name: 'UK'}}]} /// -/// # Activities -/// -/// This type is used in activities, which are methods you may call on this type or where this type is involved in. -/// The list links the activity name, along with information about where it is used (one of *request* and *response*). -/// -/// * [insert proposals](struct.ProposalInsertCall.html) (request) +/// This type is not used in any activity, and only used as *part* of another schema. /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] -pub struct CreateOrdersRequest { +pub struct Dimension { /// no description provided - #[serde(rename="webPropertyCode")] - pub web_property_code: Option, - /// The list of proposals to create. - pub proposals: Option>, + #[serde(rename="dimensionType")] + pub dimension_type: Option, + /// no description provided + #[serde(rename="dimensionValues")] + pub dimension_values: Option>, } -impl RequestValue for CreateOrdersRequest {} +impl Part for Dimension {} /// There is no detailed description. @@ -1752,7 +1862,7 @@ pub struct DeliveryControlFrequencyCap { impl Part for DeliveryControlFrequencyCap {} -/// The configuration data for an Ad Exchange performance report list. https://sites.google.com/a/google.com/adx-integration/Home/engineering/binary-releases/rtb-api-release https://cs.corp.google.com/#piper///depot/google3/contentads/adx/tools/rtb_api/adxrtb.py +/// The configuration data for an Ad Exchange performance report list. /// /// # Activities /// @@ -1956,26 +2066,29 @@ impl Part for TargetingValue {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct DealTerms { - /// Description for the proposed terms of the deal. - pub description: Option, - /// Non-binding estimate of the estimated gross spend for this deal Can be set by buyer or seller. - #[serde(rename="estimatedGrossSpend")] - pub estimated_gross_spend: Option, - /// The terms for guaranteed fixed price deals. - #[serde(rename="guaranteedFixedPriceTerms")] - pub guaranteed_fixed_price_terms: Option, - /// Non-binding estimate of the impressions served per day Can be set by buyer or seller. - #[serde(rename="estimatedImpressionsPerDay")] - pub estimated_impressions_per_day: Option, /// Visibilty of the URL in bid requests. #[serde(rename="brandingType")] pub branding_type: Option, - /// The terms for non-guaranteed auction deals. - #[serde(rename="nonGuaranteedAuctionTerms")] - pub non_guaranteed_auction_terms: Option, + /// Non-binding estimate of the estimated gross spend for this deal Can be set by buyer or seller. + #[serde(rename="estimatedGrossSpend")] + pub estimated_gross_spend: Option, + /// For deals with Cost Per Day billing, defines the timezone used to mark the boundaries of a day (buyer-readonly) + #[serde(rename="sellerTimeZone")] + pub seller_time_zone: Option, + /// Non-binding estimate of the impressions served per day Can be set by buyer or seller. + #[serde(rename="estimatedImpressionsPerDay")] + pub estimated_impressions_per_day: Option, /// The terms for non-guaranteed fixed price deals. #[serde(rename="nonGuaranteedFixedPriceTerms")] pub non_guaranteed_fixed_price_terms: Option, + /// The terms for guaranteed fixed price deals. + #[serde(rename="guaranteedFixedPriceTerms")] + pub guaranteed_fixed_price_terms: Option, + /// The terms for non-guaranteed auction deals. + #[serde(rename="nonGuaranteedAuctionTerms")] + pub non_guaranteed_auction_terms: Option, + /// Description for the proposed terms of the deal. + pub description: Option, } impl Part for DealTerms {} @@ -2229,6 +2342,66 @@ impl<'a, C, A> MarketplacedealMethods<'a, C, A> { +/// A builder providing access to all methods supported on *marketplaceprivateauction* resources. +/// It is not used directly, but through the `AdExchangeBuyer` hub. +/// +/// # Example +/// +/// Instantiate a resource builder +/// +/// ```test_harness,no_run +/// extern crate hyper; +/// extern crate yup_oauth2 as oauth2; +/// extern crate google_adexchangebuyer1d4 as adexchangebuyer1d4; +/// +/// # #[test] fn egal() { +/// use std::default::Default; +/// use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; +/// use adexchangebuyer1d4::AdExchangeBuyer; +/// +/// let secret: ApplicationSecret = Default::default(); +/// let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, +/// hyper::Client::new(), +/// ::default(), None); +/// let mut hub = AdExchangeBuyer::new(hyper::Client::new(), auth); +/// // Usually you wouldn't bind this to a variable, but keep calling *CallBuilders* +/// // like `updateproposal(...)` +/// // to build up your call. +/// let rb = hub.marketplaceprivateauction(); +/// # } +/// ``` +pub struct MarketplaceprivateauctionMethods<'a, C, A> + where C: 'a, A: 'a { + + hub: &'a AdExchangeBuyer, +} + +impl<'a, C, A> MethodsBuilder for MarketplaceprivateauctionMethods<'a, C, A> {} + +impl<'a, C, A> MarketplaceprivateauctionMethods<'a, C, A> { + + /// Create a builder to help you perform the following task: + /// + /// Update a given private auction proposal + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `privateAuctionId` - The private auction id to be updated. + pub fn updateproposal(&self, request: UpdatePrivateAuctionProposalRequest, private_auction_id: &str) -> MarketplaceprivateauctionUpdateproposalCall<'a, C, A> { + MarketplaceprivateauctionUpdateproposalCall { + hub: self.hub, + _request: request, + _private_auction_id: private_auction_id.to_string(), + _delegate: Default::default(), + _scopes: Default::default(), + _additional_params: Default::default(), + } + } +} + + + /// A builder providing access to all methods supported on *proposal* resources. /// It is not used directly, but through the `AdExchangeBuyer` hub. /// @@ -3150,7 +3323,7 @@ impl<'a, C, A> PubprofileListCall<'a, C, A> where C: BorrowMut, A /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, GetPublisherProfilesByAccountIdResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -3219,8 +3392,7 @@ impl<'a, C, A> PubprofileListCall<'a, C, A> where C: BorrowMut, A } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -3386,7 +3558,7 @@ impl<'a, C, A> BillingInfoGetCall<'a, C, A> where C: BorrowMut, A /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, BillingInfo)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -3455,8 +3627,7 @@ impl<'a, C, A> BillingInfoGetCall<'a, C, A> where C: BorrowMut, A } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -3621,7 +3792,7 @@ impl<'a, C, A> BillingInfoListCall<'a, C, A> where C: BorrowMut, /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, BillingInfoList)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -3668,8 +3839,7 @@ impl<'a, C, A> BillingInfoListCall<'a, C, A> where C: BorrowMut, } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -3832,7 +4002,7 @@ impl<'a, C, A> MarketplacedealDeleteCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, DeleteOrderDealsResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -3912,8 +4082,7 @@ impl<'a, C, A> MarketplacedealDeleteCall<'a, C, A> where C: BorrowMut MarketplacedealInsertCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, AddOrderDealsResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -4179,8 +4348,7 @@ impl<'a, C, A> MarketplacedealInsertCall<'a, C, A> where C: BorrowMut MarketplacedealUpdateCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, EditAllOrderDealsResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -4446,8 +4614,7 @@ impl<'a, C, A> MarketplacedealUpdateCall<'a, C, A> where C: BorrowMut MarketplacedealListCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, GetOrderDealsResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -4695,8 +4862,7 @@ impl<'a, C, A> MarketplacedealListCall<'a, C, A> where C: BorrowMut MarketplacedealListCall<'a, C, A> where C: BorrowMut::default(), None); +/// # let mut hub = AdExchangeBuyer::new(hyper::Client::new(), auth); +/// // As the method needs a request, you would usually fill it with the desired information +/// // into the respective structure. Some of the parts shown here might not be applicable ! +/// // Values shown here are possibly random and not representative ! +/// let mut req = UpdatePrivateAuctionProposalRequest::default(); +/// +/// // You can configure optional parameters by calling the respective setters at will, and +/// // execute the final call using `doit()`. +/// // Values shown here are possibly random and not representative ! +/// let result = hub.marketplaceprivateauction().updateproposal(req, "privateAuctionId") +/// .doit(); +/// # } +/// ``` +pub struct MarketplaceprivateauctionUpdateproposalCall<'a, C, A> + where C: 'a, A: 'a { + + hub: &'a AdExchangeBuyer, + _request: UpdatePrivateAuctionProposalRequest, + _private_auction_id: String, + _delegate: Option<&'a mut Delegate>, + _additional_params: HashMap, + _scopes: BTreeMap +} + +impl<'a, C, A> CallBuilder for MarketplaceprivateauctionUpdateproposalCall<'a, C, A> {} + +impl<'a, C, A> MarketplaceprivateauctionUpdateproposalCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { + + + /// Perform the operation you have build so far. + pub fn doit(mut self) -> Result { + use std::io::{Read, Seek}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; + let mut dd = DefaultDelegate; + let mut dlg: &mut Delegate = match self._delegate { + Some(d) => d, + None => &mut dd + }; + dlg.begin(MethodInfo { id: "adexchangebuyer.marketplaceprivateauction.updateproposal", + http_method: hyper::method::Method::Post }); + let mut params: Vec<(&str, String)> = Vec::with_capacity((3 + self._additional_params.len())); + params.push(("privateAuctionId", self._private_auction_id.to_string())); + for &field in ["privateAuctionId"].iter() { + if self._additional_params.contains_key(field) { + dlg.finished(false); + return Err(Error::FieldClash(field)); + } + } + for (name, value) in self._additional_params.iter() { + params.push((&name, value.clone())); + } + + + let mut url = "https://www.googleapis.com/adexchangebuyer/v1.4/privateauction/{privateAuctionId}/updateproposal".to_string(); + if self._scopes.len() == 0 { + self._scopes.insert(Scope::AdexchangeBuyer.as_ref().to_string(), ()); + } + + for &(find_this, param_name) in [("{privateAuctionId}", "privateAuctionId")].iter() { + let mut replace_with: Option<&str> = None; + for &(name, ref value) in params.iter() { + if name == param_name { + replace_with = Some(value); + break; + } + } + url = url.replace(find_this, replace_with.expect("to find substitution value in params")); + } + { + let mut indices_for_removal: Vec = Vec::with_capacity(1); + for param_name in ["privateAuctionId"].iter() { + if let Some(index) = params.iter().position(|t| &t.0 == param_name) { + indices_for_removal.push(index); + } + } + for &index in indices_for_removal.iter() { + params.remove(index); + } + } + + if params.len() > 0 { + url.push('?'); + url.push_str(&url::form_urlencoded::serialize(params)); + } + + let mut json_mime_type = mime::Mime(mime::TopLevel::Application, mime::SubLevel::Json, Default::default()); + let mut request_value_reader = + { + let mut value = json::value::to_value(&self._request); + remove_json_null_values(&mut value); + let mut dst = io::Cursor::new(Vec::with_capacity(128)); + json::to_writer(&mut dst, &value).unwrap(); + dst + }; + let request_size = request_value_reader.seek(io::SeekFrom::End(0)).unwrap(); + request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); + + + loop { + let token = match self.hub.auth.borrow_mut().token(self._scopes.keys()) { + Ok(token) => token, + Err(err) => { + match dlg.token(&*err) { + Some(token) => token, + None => { + dlg.finished(false); + return Err(Error::MissingToken(err)) + } + } + } + }; + let auth_header = Authorization(Bearer { token: token.access_token }); + request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); + let mut req_result = { + let mut client = &mut *self.hub.client.borrow_mut(); + let mut req = client.borrow_mut().request(hyper::method::Method::Post, &url) + .header(UserAgent(self.hub._user_agent.clone())) + .header(auth_header.clone()) + .header(ContentType(json_mime_type.clone())) + .header(ContentLength(request_size as u64)) + .body(&mut request_value_reader); + + dlg.pre_request(); + req.send() + }; + + match req_result { + Err(err) => { + if let oauth2::Retry::After(d) = dlg.http_error(&err) { + sleep(d); + continue; + } + dlg.finished(false); + return Err(Error::HttpError(err)) + } + Ok(mut res) => { + if !res.status.is_success() { + let mut json_err = String::new(); + res.read_to_string(&mut json_err).unwrap(); + if let oauth2::Retry::After(d) = dlg.http_failure(&res, + json::from_str(&json_err).ok(), + json::from_str(&json_err).ok()) { + sleep(d); + continue; + } + dlg.finished(false); + return match json::from_str::(&json_err){ + Err(_) => Err(Error::Failure(res)), + Ok(serr) => Err(Error::BadRequest(serr)) + } + } + let result_value = res; + + dlg.finished(true); + return Ok(result_value) + } + } + } + } + + + /// + /// Sets the *request* property to the given value. + /// + /// Even though the property as already been set when instantiating this call, + /// we provide this method for API completeness. + pub fn request(mut self, new_value: UpdatePrivateAuctionProposalRequest) -> MarketplaceprivateauctionUpdateproposalCall<'a, C, A> { + self._request = new_value; + self + } + /// The private auction id to be updated. + /// + /// Sets the *private auction id* path property to the given value. + /// + /// Even though the property as already been set when instantiating this call, + /// we provide this method for API completeness. + pub fn private_auction_id(mut self, new_value: &str) -> MarketplaceprivateauctionUpdateproposalCall<'a, C, A> { + self._private_auction_id = new_value.to_string(); + self + } + /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong + /// while executing the actual API request. + /// + /// It should be used to handle progress information, and to implement a certain level of resilience. + /// + /// Sets the *delegate* property to the given value. + pub fn delegate(mut self, new_value: &'a mut Delegate) -> MarketplaceprivateauctionUpdateproposalCall<'a, C, A> { + self._delegate = Some(new_value); + self + } + + /// Set any additional parameter of the query string used in the request. + /// It should be used to set parameters which are not yet available through their own + /// setters. + /// + /// Please note that this method must not be used to set any of the known paramters + /// which have their own setter method. If done anyway, the request will fail. + /// + /// # Additional Parameters + /// + /// * *quotaUser* (query-string) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. Overrides userIp if both are provided. + /// * *oauth_token* (query-string) - OAuth 2.0 token for the current user. + /// * *key* (query-string) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. + /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. + /// * *userIp* (query-string) - IP address of the site where the request originates. Use this if you want to enforce per-user limits. + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *alt* (query-string) - Data format for the response. + pub fn param(mut self, name: T, value: T) -> MarketplaceprivateauctionUpdateproposalCall<'a, C, A> + where T: AsRef { + self._additional_params.insert(name.as_ref().to_string(), value.as_ref().to_string()); + self + } + + /// Identifies the authorization scope for the method you are building. + /// + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::AdexchangeBuyer`. + /// + /// The `scope` will be added to a set of scopes. This is important as one can maintain access + /// tokens for more than one scope. + /// + /// Usually there is more than one suitable scope to authorize an operation, some of which may + /// encompass more rights than others. For example, for listing resources, a *read-only* scope will be + /// sufficient, a read-write scope will do as well. + pub fn add_scope(mut self, scope: T) -> MarketplaceprivateauctionUpdateproposalCall<'a, C, A> + where T: AsRef { + self._scopes.insert(scope.as_ref().to_string(), ()); + self + } +} + + /// Search for proposals using pql query /// /// A builder for the *search* method supported by a *proposal* resource. @@ -4841,7 +5262,7 @@ impl<'a, C, A> MarketplacedealListCall<'a, C, A> where C: BorrowMut ProposalSearchCall<'a, C, A> where C: BorrowMut, A /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, GetOrdersResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -4913,8 +5334,7 @@ impl<'a, C, A> ProposalSearchCall<'a, C, A> where C: BorrowMut, A } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -5083,7 +5503,7 @@ impl<'a, C, A> ProposalInsertCall<'a, C, A> where C: BorrowMut, A /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, CreateOrdersResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -5141,8 +5561,7 @@ impl<'a, C, A> ProposalInsertCall<'a, C, A> where C: BorrowMut, A } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -5320,7 +5739,7 @@ impl<'a, C, A> ProposalUpdateCall<'a, C, A> where C: BorrowMut, A /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Proposal)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -5402,8 +5821,7 @@ impl<'a, C, A> ProposalUpdateCall<'a, C, A> where C: BorrowMut, A } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -5602,7 +6020,7 @@ impl<'a, C, A> ProposalSetupcompleteCall<'a, C, A> where C: BorrowMut Result { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -5670,8 +6088,7 @@ impl<'a, C, A> ProposalSetupcompleteCall<'a, C, A> where C: BorrowMut ProposalPatchCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Proposal)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -5918,8 +6335,7 @@ impl<'a, C, A> ProposalPatchCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -6118,7 +6534,7 @@ impl<'a, C, A> ProposalGetCall<'a, C, A> where C: BorrowMut, A: o /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Proposal)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -6187,8 +6603,7 @@ impl<'a, C, A> ProposalGetCall<'a, C, A> where C: BorrowMut, A: o } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -6362,7 +6777,7 @@ impl<'a, C, A> BudgetUpdateCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Budget)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -6443,8 +6858,7 @@ impl<'a, C, A> BudgetUpdateCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -6634,7 +7048,7 @@ impl<'a, C, A> BudgetGetCall<'a, C, A> where C: BorrowMut, A: oau /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Budget)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -6704,8 +7118,7 @@ impl<'a, C, A> BudgetGetCall<'a, C, A> where C: BorrowMut, A: oau } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -6889,7 +7302,7 @@ impl<'a, C, A> BudgetPatchCall<'a, C, A> where C: BorrowMut, A: o /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Budget)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -6970,8 +7383,7 @@ impl<'a, C, A> BudgetPatchCall<'a, C, A> where C: BorrowMut, A: o } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -7139,8 +7551,8 @@ impl<'a, C, A> BudgetPatchCall<'a, C, A> where C: BorrowMut, A: o /// // execute the final call using `doit()`. /// // Values shown here are possibly random and not representative ! /// let result = hub.performance_report().list("accountId", "endDateTime", "startDateTime") -/// .page_token("aliquyam") -/// .max_results(92) +/// .page_token("sea") +/// .max_results(46) /// .doit(); /// # } /// ``` @@ -7166,7 +7578,7 @@ impl<'a, C, A> PerformanceReportListCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, PerformanceReportList)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -7222,8 +7634,7 @@ impl<'a, C, A> PerformanceReportListCall<'a, C, A> where C: BorrowMut PerformanceReportListCall<'a, C, A> where C: BorrowMut ProductSearchCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, GetOffersResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -7474,8 +7885,7 @@ impl<'a, C, A> ProductSearchCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -7638,7 +8048,7 @@ impl<'a, C, A> ProductGetCall<'a, C, A> where C: BorrowMut, A: oa /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Product)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -7707,8 +8117,7 @@ impl<'a, C, A> ProductGetCall<'a, C, A> where C: BorrowMut, A: oa } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -7874,7 +8283,7 @@ impl<'a, C, A> MarketplacenoteListCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, GetOrderNotesResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -7943,8 +8352,7 @@ impl<'a, C, A> MarketplacenoteListCall<'a, C, A> where C: BorrowMut MarketplacenoteInsertCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, AddOrderNotesResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -8197,8 +8605,7 @@ impl<'a, C, A> MarketplacenoteInsertCall<'a, C, A> where C: BorrowMut MarketplacenoteInsertCall<'a, C, A> where C: BorrowMut AccountPatchCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Account)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -8464,8 +8871,7 @@ impl<'a, C, A> AccountPatchCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -8643,7 +9049,7 @@ impl<'a, C, A> AccountListCall<'a, C, A> where C: BorrowMut, A: o /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, AccountsList)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -8690,8 +9096,7 @@ impl<'a, C, A> AccountListCall<'a, C, A> where C: BorrowMut, A: o } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -8825,7 +9230,7 @@ impl<'a, C, A> AccountListCall<'a, C, A> where C: BorrowMut, A: o /// // You can configure optional parameters by calling the respective setters at will, and /// // execute the final call using `doit()`. /// // Values shown here are possibly random and not representative ! -/// let result = hub.accounts().get(-39) +/// let result = hub.accounts().get(-43) /// .doit(); /// # } /// ``` @@ -8847,7 +9252,7 @@ impl<'a, C, A> AccountGetCall<'a, C, A> where C: BorrowMut, A: oa /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Account)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -8916,8 +9321,7 @@ impl<'a, C, A> AccountGetCall<'a, C, A> where C: BorrowMut, A: oa } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -9067,7 +9471,7 @@ impl<'a, C, A> AccountGetCall<'a, C, A> where C: BorrowMut, A: oa /// // You can configure optional parameters by calling the respective setters at will, and /// // execute the final call using `doit()`. /// // Values shown here are possibly random and not representative ! -/// let result = hub.accounts().update(req, -43) +/// let result = hub.accounts().update(req, -97) /// .doit(); /// # } /// ``` @@ -9090,7 +9494,7 @@ impl<'a, C, A> AccountUpdateCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Account)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -9170,8 +9574,7 @@ impl<'a, C, A> AccountUpdateCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -9329,12 +9732,12 @@ impl<'a, C, A> AccountUpdateCall<'a, C, A> where C: BorrowMut, A: /// // execute the final call using `doit()`. /// // Values shown here are possibly random and not representative ! /// let result = hub.creatives().list() -/// .page_token("amet") -/// .open_auction_status_filter("no") -/// .max_results(65) -/// .deals_status_filter("eirmod") -/// .add_buyer_creative_id("dolore") -/// .add_account_id(-37) +/// .page_token("no") +/// .open_auction_status_filter("labore") +/// .max_results(62) +/// .deals_status_filter("dolore") +/// .add_buyer_creative_id("invidunt") +/// .add_account_id(-82) /// .doit(); /// # } /// ``` @@ -9361,7 +9764,7 @@ impl<'a, C, A> CreativeListCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, CreativesList)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -9430,8 +9833,7 @@ impl<'a, C, A> CreativeListCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -9609,7 +10011,7 @@ impl<'a, C, A> CreativeListCall<'a, C, A> where C: BorrowMut, A: /// // You can configure optional parameters by calling the respective setters at will, and /// // execute the final call using `doit()`. /// // Values shown here are possibly random and not representative ! -/// let result = hub.creatives().remove_deal(-82, "buyerCreativeId", "dealId") +/// let result = hub.creatives().remove_deal(-73, "buyerCreativeId", "dealId") /// .doit(); /// # } /// ``` @@ -9633,7 +10035,7 @@ impl<'a, C, A> CreativeRemoveDealCall<'a, C, A> where C: BorrowMut Result { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -9703,8 +10105,7 @@ impl<'a, C, A> CreativeRemoveDealCall<'a, C, A> where C: BorrowMut CreativeRemoveDealCall<'a, C, A> where C: BorrowMut CreativeAddDealCall<'a, C, A> where C: BorrowMut, /// Perform the operation you have build so far. pub fn doit(mut self) -> Result { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -9952,8 +10353,7 @@ impl<'a, C, A> CreativeAddDealCall<'a, C, A> where C: BorrowMut, } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Post, &url) @@ -10107,7 +10507,7 @@ impl<'a, C, A> CreativeAddDealCall<'a, C, A> where C: BorrowMut, /// // You can configure optional parameters by calling the respective setters at will, and /// // execute the final call using `doit()`. /// // Values shown here are possibly random and not representative ! -/// let result = hub.creatives().get(-21, "buyerCreativeId") +/// let result = hub.creatives().get(-40, "buyerCreativeId") /// .doit(); /// # } /// ``` @@ -10130,7 +10530,7 @@ impl<'a, C, A> CreativeGetCall<'a, C, A> where C: BorrowMut, A: o /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Creative)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -10200,8 +10600,7 @@ impl<'a, C, A> CreativeGetCall<'a, C, A> where C: BorrowMut, A: o } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -10383,7 +10782,7 @@ impl<'a, C, A> CreativeInsertCall<'a, C, A> where C: BorrowMut, A /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Creative)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -10441,8 +10840,7 @@ impl<'a, C, A> CreativeInsertCall<'a, C, A> where C: BorrowMut, A } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -10618,7 +11016,7 @@ impl<'a, C, A> PretargetingConfigInsertCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, PretargetingConfig)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -10698,8 +11096,7 @@ impl<'a, C, A> PretargetingConfigInsertCall<'a, C, A> where C: BorrowMut PretargetingConfigListCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, PretargetingConfigList)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -10947,8 +11344,7 @@ impl<'a, C, A> PretargetingConfigListCall<'a, C, A> where C: BorrowMut PretargetingConfigUpdateCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, PretargetingConfig)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -11203,8 +11599,7 @@ impl<'a, C, A> PretargetingConfigUpdateCall<'a, C, A> where C: BorrowMut PretargetingConfigPatchCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, PretargetingConfig)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -11482,8 +11877,7 @@ impl<'a, C, A> PretargetingConfigPatchCall<'a, C, A> where C: BorrowMut PretargetingConfigDeleteCall<'a, C, A> where C: BorrowMut Result { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -11742,8 +12136,7 @@ impl<'a, C, A> PretargetingConfigDeleteCall<'a, C, A> where C: BorrowMut PretargetingConfigGetCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, PretargetingConfig)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -11980,8 +12373,7 @@ impl<'a, C, A> PretargetingConfigGetCall<'a, C, A> where C: BorrowMut"] description = "A complete library to interact with Ad Exchange Seller (protocol v2.0)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/adexchangeseller2-cli" @@ -17,18 +17,18 @@ keywords = ["adexchangeseller", "google", "cli"] name = "adexchangeseller2" [dependencies] -hyper = "0.7" -mime = "0.1.0" -serde = ">= 0.7.0" -serde_json = ">= 0.7.0" -yup-oauth2 = ">= 0.5.4" +hyper = "0.8" +mime = "0.2.0" +serde = "0.6.0" +serde_json = "0.6.0" +yup-oauth2 = ">= 0.5.6" strsim = "0.4" yup-hyper-mock = "1.0" clap = "2.0" [build-dependencies] -syntex = { version = ">= 0.23" } -serde_codegen = { version = ">= 0.6" } +syntex = { version = "= 0.28" } +serde_codegen = { version = "= 0.6.13" } [dependencies.google-adexchangeseller2] diff --git a/gen/adexchangeseller2-cli/README.md b/gen/adexchangeseller2-cli/README.md index f011960858..c9a72df8e2 100644 --- a/gen/adexchangeseller2-cli/README.md +++ b/gen/adexchangeseller2-cli/README.md @@ -17,14 +17,14 @@ Everything else about the *Ad Exchange Seller* API can be found at the You can download the pre-compiled 64bit binaries for the following platforms: -* ![icon](http://megaicons.net/static/img/icons_sizes/6/140/16/ubuntu-icon.png) [ubuntu](http://dl.byronimo.de/google.rs/cli/0.3.3/ubuntu/adexchangeseller2.tar.gz) -* ![icon](http://hydra-media.cursecdn.com/wow.gamepedia.com/a/a2/Apple-icon-16x16.png?version=25ddd67ac3dd3b634478e3978b76cb74) [osx](http://dl.byronimo.de/google.rs/cli/0.3.3/osx/adexchangeseller2.tar.gz) +* ![icon](http://megaicons.net/static/img/icons_sizes/6/140/16/ubuntu-icon.png) [ubuntu](http://dl.byronimo.de/google.rs/cli/0.3.4/ubuntu/adexchangeseller2.tar.gz) +* ![icon](http://hydra-media.cursecdn.com/wow.gamepedia.com/a/a2/Apple-icon-16x16.png?version=25ddd67ac3dd3b634478e3978b76cb74) [osx](http://dl.byronimo.de/google.rs/cli/0.3.4/osx/adexchangeseller2.tar.gz) Find the source code [on github](https://github.com/Byron/google-apis-rs/tree/master/gen/adexchangeseller2-cli). # Usage -This documentation was generated from the *Ad Exchange Seller* API at revision *20151127*. The CLI is at version *0.3.3*. +This documentation was generated from the *Ad Exchange Seller* API at revision *20151127*. The CLI is at version *0.3.4*. ```bash adexchangeseller2 [options] diff --git a/gen/adexchangeseller2-cli/mkdocs.yml b/gen/adexchangeseller2-cli/mkdocs.yml index 533aace6d3..27517db383 100644 --- a/gen/adexchangeseller2-cli/mkdocs.yml +++ b/gen/adexchangeseller2-cli/mkdocs.yml @@ -1,4 +1,4 @@ -site_name: Ad Exchange Seller v0.3.3+20151127 +site_name: Ad Exchange Seller v0.3.4+20151127 site_url: http://byron.github.io/google-apis-rs/google-adexchangeseller2-cli site_description: Write integrating applications with bcore diff --git a/gen/adexchangeseller2-cli/src/cmn.rs b/gen/adexchangeseller2-cli/src/cmn.rs index 188159ee80..ae86fdef65 100644 --- a/gen/adexchangeseller2-cli/src/cmn.rs +++ b/gen/adexchangeseller2-cli/src/cmn.rs @@ -414,7 +414,7 @@ impl TokenStorage for JsonTokenStorage { Err(err) => match err.kind() { io::ErrorKind::NotFound => Ok(()), - _ => Err(json::Error::Io(err)) + _ => Err(json::Error::IoError(err)) }, Ok(_) => Ok(()), } @@ -427,7 +427,7 @@ impl TokenStorage for JsonTokenStorage { Err(serde_err) => Err(serde_err), } }, - Err(io_err) => Err(json::Error::Io(io_err)) + Err(io_err) => Err(json::Error::IoError(io_err)) } } } @@ -444,7 +444,7 @@ impl TokenStorage for JsonTokenStorage { Err(io_err) => { match io_err.kind() { io::ErrorKind::NotFound => Ok(None), - _ => Err(json::Error::Io(io_err)) + _ => Err(json::Error::IoError(io_err)) } } } @@ -683,7 +683,7 @@ pub fn application_secret_from_directory(dir: &str, = json::from_str(json_console_secret).unwrap(); match json::to_writer_pretty(&mut f, &console_secret) { Err(serde_err) => match serde_err { - json::Error::Io(err) => err, + json::Error::IoError(err) => err, _ => panic!("Unexpected serde error: {:#?}", serde_err) }, Ok(_) => continue, @@ -696,7 +696,7 @@ pub fn application_secret_from_directory(dir: &str, }, Ok(f) => { match json::de::from_reader::<_, ConsoleApplicationSecret>(f) { - Err(json::Error::Io(err)) => + Err(json::Error::IoError(err)) => return secret_io_error(err), Err(json_err) => return Err(CLIError::Configuration( diff --git a/gen/adexchangeseller2-cli/src/main.rs b/gen/adexchangeseller2-cli/src/main.rs index 9e0041269d..fc2f65aa9e 100644 --- a/gen/adexchangeseller2-cli/src/main.rs +++ b/gen/adexchangeseller2-cli/src/main.rs @@ -1347,7 +1347,7 @@ fn main() { let mut app = App::new("adexchangeseller2") .author("Sebastian Thiel ") - .version("0.3.3+20151127") + .version("0.3.4+20151127") .about("Gives Ad Exchange seller users access to their inventory and the ability to generate reports") .after_help("All documentation details can be found at http://byron.github.io/google-apis-rs/google_adexchangeseller2_cli") .arg(Arg::with_name("url") diff --git a/gen/adexchangeseller2/Cargo.toml b/gen/adexchangeseller2/Cargo.toml index 3422f6f8d1..5d582f74cf 100644 --- a/gen/adexchangeseller2/Cargo.toml +++ b/gen/adexchangeseller2/Cargo.toml @@ -4,7 +4,7 @@ [package] name = "google-adexchangeseller2" -version = "0.1.12+20151127" +version = "0.1.13+20151127" authors = ["Sebastian Thiel "] description = "A complete library to interact with Ad Exchange Seller (protocol v2.0)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/adexchangeseller2" @@ -16,14 +16,14 @@ build = "src/build.rs" [dependencies] -hyper = "0.7" -mime = "0.1.0" -serde = ">= 0.7.0" -serde_json = ">= 0.7.0" -yup-oauth2 = ">= 0.5.4" +hyper = "0.8" +mime = "0.2.0" +serde = "0.6.0" +serde_json = "0.6.0" +yup-oauth2 = ">= 0.5.6" url = ">= 0.5" [build-dependencies] -syntex = { version = ">= 0.23" } -serde_codegen = { version = ">= 0.6" } +syntex = { version = "= 0.28" } +serde_codegen = { version = "= 0.6.13" } diff --git a/gen/adexchangeseller2/README.md b/gen/adexchangeseller2/README.md index c8a9bed019..685535dedc 100644 --- a/gen/adexchangeseller2/README.md +++ b/gen/adexchangeseller2/README.md @@ -5,7 +5,7 @@ DO NOT EDIT ! --> The `google-adexchangeseller2` library allows access to all features of the *Google Ad Exchange Seller* service. -This documentation was generated from *Ad Exchange Seller* crate version *0.1.12+20151127*, where *20151127* is the exact revision of the *adexchangeseller:v2.0* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.12*. +This documentation was generated from *Ad Exchange Seller* crate version *0.1.13+20151127*, where *20151127* is the exact revision of the *adexchangeseller:v2.0* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.13*. Everything else about the *Ad Exchange Seller* *v2* API can be found at the [official documentation site](https://developers.google.com/ad-exchange/seller-rest/). diff --git a/gen/adexchangeseller2/src/cmn.rs b/gen/adexchangeseller2/src/cmn.rs index 87b91a8986..c69621da55 100644 --- a/gen/adexchangeseller2/src/cmn.rs +++ b/gen/adexchangeseller2/src/cmn.rs @@ -12,7 +12,7 @@ use mime::{Mime, TopLevel, SubLevel, Attr, Value}; use oauth2::{TokenType, Retry, self}; use hyper; use hyper::header::{ContentType, ContentLength, Headers, UserAgent, Authorization, Header, - HeaderFormat}; + HeaderFormat, Bearer}; use hyper::http::h1::LINE_ENDING; use hyper::method::Method; use hyper::status::StatusCode; @@ -634,7 +634,7 @@ pub struct ResumableUploadHelper<'a, A: 'a> { pub start_at: Option, pub auth: &'a mut A, pub user_agent: &'a str, - pub auth_header: Authorization, + pub auth_header: Authorization, pub url: &'a str, pub reader: &'a mut ReadSeek, pub media_type: Mime, diff --git a/gen/adexchangeseller2/src/lib.rs b/gen/adexchangeseller2/src/lib.rs index 196bd82c64..13aba638b8 100644 --- a/gen/adexchangeseller2/src/lib.rs +++ b/gen/adexchangeseller2/src/lib.rs @@ -2,7 +2,7 @@ // This file was generated automatically from 'src/mako/api/lib.rs.mako' // DO NOT EDIT ! -//! This documentation was generated from *Ad Exchange Seller* crate version *0.1.12+20151127*, where *20151127* is the exact revision of the *adexchangeseller:v2.0* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.12*. +//! This documentation was generated from *Ad Exchange Seller* crate version *0.1.13+20151127*, where *20151127* is the exact revision of the *adexchangeseller:v2.0* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.13*. //! //! Everything else about the *Ad Exchange Seller* *v2* API can be found at the //! [official documentation site](https://developers.google.com/ad-exchange/seller-rest/). diff --git a/gen/adexchangeseller2/src/lib.rs.in b/gen/adexchangeseller2/src/lib.rs.in index 1bf6cc221c..c1a2340a2e 100644 --- a/gen/adexchangeseller2/src/lib.rs.in +++ b/gen/adexchangeseller2/src/lib.rs.in @@ -138,7 +138,7 @@ impl<'a, C, A> AdExchangeSeller AdExchangeSeller { client: RefCell::new(client), auth: RefCell::new(authenticator), - _user_agent: "google-api-rust-client/0.1.12".to_string(), + _user_agent: "google-api-rust-client/0.1.13".to_string(), } } @@ -147,7 +147,7 @@ impl<'a, C, A> AdExchangeSeller } /// Set the user-agent header field to use in all requests to the server. - /// It defaults to `google-api-rust-client/0.1.12`. + /// It defaults to `google-api-rust-client/0.1.13`. /// /// Returns the previously set user-agent. pub fn user_agent(&mut self, agent_name: String) -> String { @@ -1009,7 +1009,7 @@ impl<'a, C, A> AccountReportSavedGenerateCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, Report)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -1088,8 +1088,7 @@ impl<'a, C, A> AccountReportSavedGenerateCall<'a, C, A> where C: BorrowMut AccountMetadataMetricListCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, Metadata)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -1355,8 +1354,7 @@ impl<'a, C, A> AccountMetadataMetricListCall<'a, C, A> where C: BorrowMut AccountReportGenerateCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, Report)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -1659,8 +1657,7 @@ impl<'a, C, A> AccountReportGenerateCall<'a, C, A> where C: BorrowMut AccountUrlchannelListCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, UrlChannels)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -1980,8 +1977,7 @@ impl<'a, C, A> AccountUrlchannelListCall<'a, C, A> where C: BorrowMut AccountReportSavedListCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, SavedReports)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -2250,8 +2246,7 @@ impl<'a, C, A> AccountReportSavedListCall<'a, C, A> where C: BorrowMut AccountPreferreddealGetCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, PreferredDeal)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -2502,8 +2497,7 @@ impl<'a, C, A> AccountPreferreddealGetCall<'a, C, A> where C: BorrowMut AccountAdclientListCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, AdClients)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -2758,8 +2752,7 @@ impl<'a, C, A> AccountAdclientListCall<'a, C, A> where C: BorrowMut AccountMetadataDimensionListCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, Metadata)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -3008,8 +3001,7 @@ impl<'a, C, A> AccountMetadataDimensionListCall<'a, C, A> where C: BorrowMut AccountCustomchannelGetCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, CustomChannel)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -3248,8 +3240,7 @@ impl<'a, C, A> AccountCustomchannelGetCall<'a, C, A> where C: BorrowMut AccountCustomchannelListCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, CustomChannels)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -3516,8 +3507,7 @@ impl<'a, C, A> AccountCustomchannelListCall<'a, C, A> where C: BorrowMut AccountListCall<'a, C, A> where C: BorrowMut, A: o /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Accounts)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -3763,8 +3753,7 @@ impl<'a, C, A> AccountListCall<'a, C, A> where C: BorrowMut, A: o } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -3936,7 +3925,7 @@ impl<'a, C, A> AccountAlertListCall<'a, C, A> where C: BorrowMut, /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Alerts)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -4008,8 +3997,7 @@ impl<'a, C, A> AccountAlertListCall<'a, C, A> where C: BorrowMut, } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -4182,7 +4170,7 @@ impl<'a, C, A> AccountPreferreddealListCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, PreferredDeals)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -4251,8 +4239,7 @@ impl<'a, C, A> AccountPreferreddealListCall<'a, C, A> where C: BorrowMut AccountGetCall<'a, C, A> where C: BorrowMut, A: oa /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Account)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -4487,8 +4474,7 @@ impl<'a, C, A> AccountGetCall<'a, C, A> where C: BorrowMut, A: oa } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) diff --git a/gen/admin1_directory-cli/Cargo.toml b/gen/admin1_directory-cli/Cargo.toml index fd7145ebaa..27334ab0cd 100644 --- a/gen/admin1_directory-cli/Cargo.toml +++ b/gen/admin1_directory-cli/Cargo.toml @@ -4,7 +4,7 @@ [package] name = "google-admin1_directory-cli" -version = "0.3.3+20151208" +version = "0.3.4+20160323" authors = ["Sebastian Thiel "] description = "A complete library to interact with directory (protocol directory_v1)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/admin1_directory-cli" @@ -17,18 +17,18 @@ keywords = ["admin", "google", "cli"] name = "admin1-directory" [dependencies] -hyper = "0.7" -mime = "0.1.0" -serde = ">= 0.7.0" -serde_json = ">= 0.7.0" -yup-oauth2 = ">= 0.5.4" +hyper = "0.8" +mime = "0.2.0" +serde = "0.6.0" +serde_json = "0.6.0" +yup-oauth2 = ">= 0.5.6" strsim = "0.4" yup-hyper-mock = "1.0" clap = "2.0" [build-dependencies] -syntex = { version = ">= 0.23" } -serde_codegen = { version = ">= 0.6" } +syntex = { version = "= 0.28" } +serde_codegen = { version = "= 0.6.13" } [dependencies.google-admin1_directory] diff --git a/gen/admin1_directory-cli/README.md b/gen/admin1_directory-cli/README.md index 233c439770..ce9c45a0fb 100644 --- a/gen/admin1_directory-cli/README.md +++ b/gen/admin1_directory-cli/README.md @@ -17,14 +17,14 @@ Everything else about the *directory* API can be found at the You can download the pre-compiled 64bit binaries for the following platforms: -* ![icon](http://megaicons.net/static/img/icons_sizes/6/140/16/ubuntu-icon.png) [ubuntu](http://dl.byronimo.de/google.rs/cli/0.3.3/ubuntu/admin1-directory.tar.gz) -* ![icon](http://hydra-media.cursecdn.com/wow.gamepedia.com/a/a2/Apple-icon-16x16.png?version=25ddd67ac3dd3b634478e3978b76cb74) [osx](http://dl.byronimo.de/google.rs/cli/0.3.3/osx/admin1-directory.tar.gz) +* ![icon](http://megaicons.net/static/img/icons_sizes/6/140/16/ubuntu-icon.png) [ubuntu](http://dl.byronimo.de/google.rs/cli/0.3.4/ubuntu/admin1-directory.tar.gz) +* ![icon](http://hydra-media.cursecdn.com/wow.gamepedia.com/a/a2/Apple-icon-16x16.png?version=25ddd67ac3dd3b634478e3978b76cb74) [osx](http://dl.byronimo.de/google.rs/cli/0.3.4/osx/admin1-directory.tar.gz) Find the source code [on github](https://github.com/Byron/google-apis-rs/tree/master/gen/admin1_directory-cli). # Usage -This documentation was generated from the *directory* API at revision *20151208*. The CLI is at version *0.3.3*. +This documentation was generated from the *directory* API at revision *20160323*. The CLI is at version *0.3.4*. ```bash admin1-directory [options] diff --git a/gen/admin1_directory-cli/mkdocs.yml b/gen/admin1_directory-cli/mkdocs.yml index 13e3884494..61e684b6e8 100644 --- a/gen/admin1_directory-cli/mkdocs.yml +++ b/gen/admin1_directory-cli/mkdocs.yml @@ -1,4 +1,4 @@ -site_name: directory v0.3.3+20151208 +site_name: directory v0.3.4+20160323 site_url: http://byron.github.io/google-apis-rs/google-admin1_directory-cli site_description: Write integrating applications with bcore diff --git a/gen/admin1_directory-cli/src/cmn.rs b/gen/admin1_directory-cli/src/cmn.rs index 188159ee80..ae86fdef65 100644 --- a/gen/admin1_directory-cli/src/cmn.rs +++ b/gen/admin1_directory-cli/src/cmn.rs @@ -414,7 +414,7 @@ impl TokenStorage for JsonTokenStorage { Err(err) => match err.kind() { io::ErrorKind::NotFound => Ok(()), - _ => Err(json::Error::Io(err)) + _ => Err(json::Error::IoError(err)) }, Ok(_) => Ok(()), } @@ -427,7 +427,7 @@ impl TokenStorage for JsonTokenStorage { Err(serde_err) => Err(serde_err), } }, - Err(io_err) => Err(json::Error::Io(io_err)) + Err(io_err) => Err(json::Error::IoError(io_err)) } } } @@ -444,7 +444,7 @@ impl TokenStorage for JsonTokenStorage { Err(io_err) => { match io_err.kind() { io::ErrorKind::NotFound => Ok(None), - _ => Err(json::Error::Io(io_err)) + _ => Err(json::Error::IoError(io_err)) } } } @@ -683,7 +683,7 @@ pub fn application_secret_from_directory(dir: &str, = json::from_str(json_console_secret).unwrap(); match json::to_writer_pretty(&mut f, &console_secret) { Err(serde_err) => match serde_err { - json::Error::Io(err) => err, + json::Error::IoError(err) => err, _ => panic!("Unexpected serde error: {:#?}", serde_err) }, Ok(_) => continue, @@ -696,7 +696,7 @@ pub fn application_secret_from_directory(dir: &str, }, Ok(f) => { match json::de::from_reader::<_, ConsoleApplicationSecret>(f) { - Err(json::Error::Io(err)) => + Err(json::Error::IoError(err)) => return secret_io_error(err), Err(json_err) => return Err(CLIError::Configuration( diff --git a/gen/admin1_directory-cli/src/main.rs b/gen/admin1_directory-cli/src/main.rs index 6e38a4402a..beaf9e3568 100644 --- a/gen/admin1_directory-cli/src/main.rs +++ b/gen/admin1_directory-cli/src/main.rs @@ -9680,7 +9680,7 @@ fn main() { let mut app = App::new("admin1-directory") .author("Sebastian Thiel ") - .version("0.3.3+20151208") + .version("0.3.4+20160323") .about("The Admin SDK Directory API lets you view and manage enterprise resources such as users and groups, administrative notifications, security features, and more.") .after_help("All documentation details can be found at http://byron.github.io/google-apis-rs/google_admin1_directory_cli") .arg(Arg::with_name("url") diff --git a/gen/admin1_directory/Cargo.toml b/gen/admin1_directory/Cargo.toml index 194321739e..9eac92452d 100644 --- a/gen/admin1_directory/Cargo.toml +++ b/gen/admin1_directory/Cargo.toml @@ -4,7 +4,7 @@ [package] name = "google-admin1_directory" -version = "0.1.12+20151208" +version = "0.1.13+20160323" authors = ["Sebastian Thiel "] description = "A complete library to interact with directory (protocol directory_v1)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/admin1_directory" @@ -16,14 +16,14 @@ build = "src/build.rs" [dependencies] -hyper = "0.7" -mime = "0.1.0" -serde = ">= 0.7.0" -serde_json = ">= 0.7.0" -yup-oauth2 = ">= 0.5.4" +hyper = "0.8" +mime = "0.2.0" +serde = "0.6.0" +serde_json = "0.6.0" +yup-oauth2 = ">= 0.5.6" url = ">= 0.5" [build-dependencies] -syntex = { version = ">= 0.23" } -serde_codegen = { version = ">= 0.6" } +syntex = { version = "= 0.28" } +serde_codegen = { version = "= 0.6.13" } diff --git a/gen/admin1_directory/README.md b/gen/admin1_directory/README.md index fbce03af9f..08c25f2af4 100644 --- a/gen/admin1_directory/README.md +++ b/gen/admin1_directory/README.md @@ -5,7 +5,7 @@ DO NOT EDIT ! --> The `google-admin1_directory` library allows access to all features of the *Google directory* service. -This documentation was generated from *directory* crate version *0.1.12+20151208*, where *20151208* is the exact revision of the *admin:directory_v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.12*. +This documentation was generated from *directory* crate version *0.1.13+20160323*, where *20160323* is the exact revision of the *admin:directory_v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.13*. Everything else about the *directory* *v1_directory* API can be found at the [official documentation site](https://developers.google.com/admin-sdk/directory/). diff --git a/gen/admin1_directory/src/cmn.rs b/gen/admin1_directory/src/cmn.rs index 87b91a8986..c69621da55 100644 --- a/gen/admin1_directory/src/cmn.rs +++ b/gen/admin1_directory/src/cmn.rs @@ -12,7 +12,7 @@ use mime::{Mime, TopLevel, SubLevel, Attr, Value}; use oauth2::{TokenType, Retry, self}; use hyper; use hyper::header::{ContentType, ContentLength, Headers, UserAgent, Authorization, Header, - HeaderFormat}; + HeaderFormat, Bearer}; use hyper::http::h1::LINE_ENDING; use hyper::method::Method; use hyper::status::StatusCode; @@ -634,7 +634,7 @@ pub struct ResumableUploadHelper<'a, A: 'a> { pub start_at: Option, pub auth: &'a mut A, pub user_agent: &'a str, - pub auth_header: Authorization, + pub auth_header: Authorization, pub url: &'a str, pub reader: &'a mut ReadSeek, pub media_type: Mime, diff --git a/gen/admin1_directory/src/lib.rs b/gen/admin1_directory/src/lib.rs index 38f569684d..416d919052 100644 --- a/gen/admin1_directory/src/lib.rs +++ b/gen/admin1_directory/src/lib.rs @@ -2,7 +2,7 @@ // This file was generated automatically from 'src/mako/api/lib.rs.mako' // DO NOT EDIT ! -//! This documentation was generated from *directory* crate version *0.1.12+20151208*, where *20151208* is the exact revision of the *admin:directory_v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.12*. +//! This documentation was generated from *directory* crate version *0.1.13+20160323*, where *20160323* is the exact revision of the *admin:directory_v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.13*. //! //! Everything else about the *directory* *v1_directory* API can be found at the //! [official documentation site](https://developers.google.com/admin-sdk/directory/). diff --git a/gen/admin1_directory/src/lib.rs.in b/gen/admin1_directory/src/lib.rs.in index 8eea2c44c5..9aeca9f0ae 100644 --- a/gen/admin1_directory/src/lib.rs.in +++ b/gen/admin1_directory/src/lib.rs.in @@ -249,7 +249,7 @@ impl<'a, C, A> Directory Directory { client: RefCell::new(client), auth: RefCell::new(authenticator), - _user_agent: "google-api-rust-client/0.1.12".to_string(), + _user_agent: "google-api-rust-client/0.1.13".to_string(), } } @@ -312,7 +312,7 @@ impl<'a, C, A> Directory } /// Set the user-agent header field to use in all requests to the server. - /// It defaults to `google-api-rust-client/0.1.12`. + /// It defaults to `google-api-rust-client/0.1.13`. /// /// Returns the previously set user-agent. pub fn user_agent(&mut self, agent_name: String) -> String { @@ -4681,7 +4681,7 @@ impl<'a, C, A> VerificationCodeGenerateCall<'a, C, A> where C: BorrowMut Result { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -4749,8 +4749,7 @@ impl<'a, C, A> VerificationCodeGenerateCall<'a, C, A> where C: BorrowMut VerificationCodeInvalidateCall<'a, C, A> where C: BorrowMut Result { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -4974,8 +4973,7 @@ impl<'a, C, A> VerificationCodeInvalidateCall<'a, C, A> where C: BorrowMut VerificationCodeListCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, VerificationCodes)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -5200,8 +5198,7 @@ impl<'a, C, A> VerificationCodeListCall<'a, C, A> where C: BorrowMut CustomerPatchCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Customer)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -5454,8 +5451,7 @@ impl<'a, C, A> CustomerPatchCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -5634,7 +5630,7 @@ impl<'a, C, A> CustomerGetCall<'a, C, A> where C: BorrowMut, A: o /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Customer)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -5703,8 +5699,7 @@ impl<'a, C, A> CustomerGetCall<'a, C, A> where C: BorrowMut, A: o } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -5877,7 +5872,7 @@ impl<'a, C, A> CustomerUpdateCall<'a, C, A> where C: BorrowMut, A /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Customer)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -5957,8 +5952,7 @@ impl<'a, C, A> CustomerUpdateCall<'a, C, A> where C: BorrowMut, A } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -6141,7 +6135,7 @@ impl<'a, C, A> OrgunitListCall<'a, C, A> where C: BorrowMut, A: o /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, OrgUnits)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -6216,8 +6210,7 @@ impl<'a, C, A> OrgunitListCall<'a, C, A> where C: BorrowMut, A: o } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -6404,7 +6397,7 @@ impl<'a, C, A> OrgunitInsertCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, OrgUnit)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -6484,8 +6477,7 @@ impl<'a, C, A> OrgunitInsertCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -6672,7 +6664,7 @@ impl<'a, C, A> OrgunitUpdateCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, OrgUnit)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -6757,8 +6749,7 @@ impl<'a, C, A> OrgunitUpdateCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -6949,7 +6940,7 @@ impl<'a, C, A> OrgunitDeleteCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -7022,8 +7013,7 @@ impl<'a, C, A> OrgunitDeleteCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Delete, &url) @@ -7191,7 +7181,7 @@ impl<'a, C, A> OrgunitGetCall<'a, C, A> where C: BorrowMut, A: oa /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, OrgUnit)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -7265,8 +7255,7 @@ impl<'a, C, A> OrgunitGetCall<'a, C, A> where C: BorrowMut, A: oa } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -7451,7 +7440,7 @@ impl<'a, C, A> OrgunitPatchCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, OrgUnit)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -7536,8 +7525,7 @@ impl<'a, C, A> OrgunitPatchCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -7734,7 +7722,7 @@ impl<'a, C, A> MemberInsertCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Member)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -7814,8 +7802,7 @@ impl<'a, C, A> MemberInsertCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -8002,7 +7989,7 @@ impl<'a, C, A> MemberPatchCall<'a, C, A> where C: BorrowMut, A: o /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Member)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -8083,8 +8070,7 @@ impl<'a, C, A> MemberPatchCall<'a, C, A> where C: BorrowMut, A: o } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -8281,7 +8267,7 @@ impl<'a, C, A> MemberUpdateCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Member)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -8362,8 +8348,7 @@ impl<'a, C, A> MemberUpdateCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -8558,7 +8543,7 @@ impl<'a, C, A> MemberListCall<'a, C, A> where C: BorrowMut, A: oa /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Members)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -8636,8 +8621,7 @@ impl<'a, C, A> MemberListCall<'a, C, A> where C: BorrowMut, A: oa } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -8825,7 +8809,7 @@ impl<'a, C, A> MemberGetCall<'a, C, A> where C: BorrowMut, A: oau /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Member)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -8895,8 +8879,7 @@ impl<'a, C, A> MemberGetCall<'a, C, A> where C: BorrowMut, A: oau } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -9073,7 +9056,7 @@ impl<'a, C, A> MemberDeleteCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -9142,8 +9125,7 @@ impl<'a, C, A> MemberDeleteCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Delete, &url) @@ -9317,7 +9299,7 @@ impl<'a, C, A> RoleUpdateCall<'a, C, A> where C: BorrowMut, A: oa /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Role)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -9398,8 +9380,7 @@ impl<'a, C, A> RoleUpdateCall<'a, C, A> where C: BorrowMut, A: oa } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -9589,7 +9570,7 @@ impl<'a, C, A> RoleGetCall<'a, C, A> where C: BorrowMut, A: oauth /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Role)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -9659,8 +9640,7 @@ impl<'a, C, A> RoleGetCall<'a, C, A> where C: BorrowMut, A: oauth } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -9837,7 +9817,7 @@ impl<'a, C, A> RoleDeleteCall<'a, C, A> where C: BorrowMut, A: oa /// Perform the operation you have build so far. pub fn doit(mut self) -> Result { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -9906,8 +9886,7 @@ impl<'a, C, A> RoleDeleteCall<'a, C, A> where C: BorrowMut, A: oa } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Delete, &url) @@ -10081,7 +10060,7 @@ impl<'a, C, A> RolePatchCall<'a, C, A> where C: BorrowMut, A: oau /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Role)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -10162,8 +10141,7 @@ impl<'a, C, A> RolePatchCall<'a, C, A> where C: BorrowMut, A: oau } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -10359,7 +10337,7 @@ impl<'a, C, A> RoleInsertCall<'a, C, A> where C: BorrowMut, A: oa /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Role)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -10439,8 +10417,7 @@ impl<'a, C, A> RoleInsertCall<'a, C, A> where C: BorrowMut, A: oa } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -10623,7 +10600,7 @@ impl<'a, C, A> RoleListCall<'a, C, A> where C: BorrowMut, A: oaut /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Roles)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -10698,8 +10675,7 @@ impl<'a, C, A> RoleListCall<'a, C, A> where C: BorrowMut, A: oaut } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -10885,7 +10861,7 @@ impl<'a, C, A> NotificationListCall<'a, C, A> where C: BorrowMut, /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Notifications)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -10963,8 +10939,7 @@ impl<'a, C, A> NotificationListCall<'a, C, A> where C: BorrowMut, } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -11159,7 +11134,7 @@ impl<'a, C, A> NotificationUpdateCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, Notification)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -11240,8 +11215,7 @@ impl<'a, C, A> NotificationUpdateCall<'a, C, A> where C: BorrowMut NotificationDeleteCall<'a, C, A> where C: BorrowMut Result { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -11500,8 +11474,7 @@ impl<'a, C, A> NotificationDeleteCall<'a, C, A> where C: BorrowMut NotificationGetCall<'a, C, A> where C: BorrowMut, /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Notification)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -11738,8 +11711,7 @@ impl<'a, C, A> NotificationGetCall<'a, C, A> where C: BorrowMut, } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -11923,7 +11895,7 @@ impl<'a, C, A> NotificationPatchCall<'a, C, A> where C: BorrowMut /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Notification)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -12004,8 +11976,7 @@ impl<'a, C, A> NotificationPatchCall<'a, C, A> where C: BorrowMut } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -12194,7 +12165,7 @@ impl<'a, C, A> PrivilegeListCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Privileges)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -12263,8 +12234,7 @@ impl<'a, C, A> PrivilegeListCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -12436,7 +12406,7 @@ impl<'a, C, A> ChannelStopCall<'a, C, A> where C: BorrowMut, A: o /// Perform the operation you have build so far. pub fn doit(mut self) -> Result { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -12493,8 +12463,7 @@ impl<'a, C, A> ChannelStopCall<'a, C, A> where C: BorrowMut, A: o } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -12656,7 +12625,7 @@ impl<'a, C, A> MobiledeviceGetCall<'a, C, A> where C: BorrowMut, /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, MobileDevice)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -12729,8 +12698,7 @@ impl<'a, C, A> MobiledeviceGetCall<'a, C, A> where C: BorrowMut, } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -12925,7 +12893,7 @@ impl<'a, C, A> MobiledeviceListCall<'a, C, A> where C: BorrowMut, /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, MobileDevices)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -13012,8 +12980,7 @@ impl<'a, C, A> MobiledeviceListCall<'a, C, A> where C: BorrowMut, } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -13222,7 +13189,7 @@ impl<'a, C, A> MobiledeviceDeleteCall<'a, C, A> where C: BorrowMut Result { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -13291,8 +13258,7 @@ impl<'a, C, A> MobiledeviceDeleteCall<'a, C, A> where C: BorrowMut MobiledeviceActionCall<'a, C, A> where C: BorrowMut Result { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -13546,8 +13512,7 @@ impl<'a, C, A> MobiledeviceActionCall<'a, C, A> where C: BorrowMut TokenGetCall<'a, C, A> where C: BorrowMut, A: oaut /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Token)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -13797,8 +13762,7 @@ impl<'a, C, A> TokenGetCall<'a, C, A> where C: BorrowMut, A: oaut } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -13974,7 +13938,7 @@ impl<'a, C, A> TokenListCall<'a, C, A> where C: BorrowMut, A: oau /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Tokens)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -14043,8 +14007,7 @@ impl<'a, C, A> TokenListCall<'a, C, A> where C: BorrowMut, A: oau } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -14211,7 +14174,7 @@ impl<'a, C, A> TokenDeleteCall<'a, C, A> where C: BorrowMut, A: o /// Perform the operation you have build so far. pub fn doit(mut self) -> Result { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -14280,8 +14243,7 @@ impl<'a, C, A> TokenDeleteCall<'a, C, A> where C: BorrowMut, A: o } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Delete, &url) @@ -14454,7 +14416,7 @@ impl<'a, C, A> RoleAssignmentInsertCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, RoleAssignment)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -14534,8 +14496,7 @@ impl<'a, C, A> RoleAssignmentInsertCall<'a, C, A> where C: BorrowMut RoleAssignmentGetCall<'a, C, A> where C: BorrowMut /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, RoleAssignment)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -14785,8 +14746,7 @@ impl<'a, C, A> RoleAssignmentGetCall<'a, C, A> where C: BorrowMut } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -14963,7 +14923,7 @@ impl<'a, C, A> RoleAssignmentDeleteCall<'a, C, A> where C: BorrowMut Result { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -15032,8 +14992,7 @@ impl<'a, C, A> RoleAssignmentDeleteCall<'a, C, A> where C: BorrowMut RoleAssignmentListCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, RoleAssignments)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -15288,8 +15247,7 @@ impl<'a, C, A> RoleAssignmentListCall<'a, C, A> where C: BorrowMut ChromeosdeviceListCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, ChromeOsDevices)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -15582,8 +15540,7 @@ impl<'a, C, A> ChromeosdeviceListCall<'a, C, A> where C: BorrowMut ChromeosdevicePatchCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, ChromeOsDevice)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -15885,8 +15842,7 @@ impl<'a, C, A> ChromeosdevicePatchCall<'a, C, A> where C: BorrowMut ChromeosdeviceUpdateCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, ChromeOsDevice)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -16176,8 +16132,7 @@ impl<'a, C, A> ChromeosdeviceUpdateCall<'a, C, A> where C: BorrowMut ChromeosdeviceGetCall<'a, C, A> where C: BorrowMut /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, ChromeOsDevice)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -16449,8 +16404,7 @@ impl<'a, C, A> ChromeosdeviceGetCall<'a, C, A> where C: BorrowMut } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -16633,7 +16587,7 @@ impl<'a, C, A> GroupDeleteCall<'a, C, A> where C: BorrowMut, A: o /// Perform the operation you have build so far. pub fn doit(mut self) -> Result { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -16701,8 +16655,7 @@ impl<'a, C, A> GroupDeleteCall<'a, C, A> where C: BorrowMut, A: o } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Delete, &url) @@ -16867,7 +16820,7 @@ impl<'a, C, A> GroupListCall<'a, C, A> where C: BorrowMut, A: oau /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Groups)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -16929,8 +16882,7 @@ impl<'a, C, A> GroupListCall<'a, C, A> where C: BorrowMut, A: oau } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -17128,7 +17080,7 @@ impl<'a, C, A> GroupUpdateCall<'a, C, A> where C: BorrowMut, A: o /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Group)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -17208,8 +17160,7 @@ impl<'a, C, A> GroupUpdateCall<'a, C, A> where C: BorrowMut, A: o } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -17394,7 +17345,7 @@ impl<'a, C, A> GroupInsertCall<'a, C, A> where C: BorrowMut, A: o /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Group)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -17452,8 +17403,7 @@ impl<'a, C, A> GroupInsertCall<'a, C, A> where C: BorrowMut, A: o } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -17629,7 +17579,7 @@ impl<'a, C, A> GroupAliaseInsertCall<'a, C, A> where C: BorrowMut /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Alias)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -17709,8 +17659,7 @@ impl<'a, C, A> GroupAliaseInsertCall<'a, C, A> where C: BorrowMut } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -17889,7 +17838,7 @@ impl<'a, C, A> GroupAliaseListCall<'a, C, A> where C: BorrowMut, /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Aliases)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -17958,8 +17907,7 @@ impl<'a, C, A> GroupAliaseListCall<'a, C, A> where C: BorrowMut, } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -18125,7 +18073,7 @@ impl<'a, C, A> GroupGetCall<'a, C, A> where C: BorrowMut, A: oaut /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Group)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -18194,8 +18142,7 @@ impl<'a, C, A> GroupGetCall<'a, C, A> where C: BorrowMut, A: oaut } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -18368,7 +18315,7 @@ impl<'a, C, A> GroupPatchCall<'a, C, A> where C: BorrowMut, A: oa /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Group)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -18448,8 +18395,7 @@ impl<'a, C, A> GroupPatchCall<'a, C, A> where C: BorrowMut, A: oa } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -18629,7 +18575,7 @@ impl<'a, C, A> GroupAliaseDeleteCall<'a, C, A> where C: BorrowMut /// Perform the operation you have build so far. pub fn doit(mut self) -> Result { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -18698,8 +18644,7 @@ impl<'a, C, A> GroupAliaseDeleteCall<'a, C, A> where C: BorrowMut } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Delete, &url) @@ -18866,7 +18811,7 @@ impl<'a, C, A> AspGetCall<'a, C, A> where C: BorrowMut, A: oauth2 /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Asp)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -18936,8 +18881,7 @@ impl<'a, C, A> AspGetCall<'a, C, A> where C: BorrowMut, A: oauth2 } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -19114,7 +19058,7 @@ impl<'a, C, A> AspDeleteCall<'a, C, A> where C: BorrowMut, A: oau /// Perform the operation you have build so far. pub fn doit(mut self) -> Result { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -19183,8 +19127,7 @@ impl<'a, C, A> AspDeleteCall<'a, C, A> where C: BorrowMut, A: oau } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Delete, &url) @@ -19350,7 +19293,7 @@ impl<'a, C, A> AspListCall<'a, C, A> where C: BorrowMut, A: oauth /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Asps)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -19419,8 +19362,7 @@ impl<'a, C, A> AspListCall<'a, C, A> where C: BorrowMut, A: oauth } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -19586,7 +19528,7 @@ impl<'a, C, A> DomainListCall<'a, C, A> where C: BorrowMut, A: oa /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Domains2)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -19655,8 +19597,7 @@ impl<'a, C, A> DomainListCall<'a, C, A> where C: BorrowMut, A: oa } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -19823,7 +19764,7 @@ impl<'a, C, A> DomainGetCall<'a, C, A> where C: BorrowMut, A: oau /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Domains)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -19893,8 +19834,7 @@ impl<'a, C, A> DomainGetCall<'a, C, A> where C: BorrowMut, A: oau } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -20077,7 +20017,7 @@ impl<'a, C, A> DomainInsertCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Domains)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -20157,8 +20097,7 @@ impl<'a, C, A> DomainInsertCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -20338,7 +20277,7 @@ impl<'a, C, A> DomainDeleteCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -20407,8 +20346,7 @@ impl<'a, C, A> DomainDeleteCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Delete, &url) @@ -20581,7 +20519,7 @@ impl<'a, C, A> DomainAliaseInsertCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, DomainAlias)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -20661,8 +20599,7 @@ impl<'a, C, A> DomainAliaseInsertCall<'a, C, A> where C: BorrowMut DomainAliaseGetCall<'a, C, A> where C: BorrowMut, /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, DomainAlias)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -20912,8 +20849,7 @@ impl<'a, C, A> DomainAliaseGetCall<'a, C, A> where C: BorrowMut, } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -21091,7 +21027,7 @@ impl<'a, C, A> DomainAliaseListCall<'a, C, A> where C: BorrowMut, /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, DomainAliases)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -21163,8 +21099,7 @@ impl<'a, C, A> DomainAliaseListCall<'a, C, A> where C: BorrowMut, } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -21338,7 +21273,7 @@ impl<'a, C, A> DomainAliaseDeleteCall<'a, C, A> where C: BorrowMut Result { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -21407,8 +21342,7 @@ impl<'a, C, A> DomainAliaseDeleteCall<'a, C, A> where C: BorrowMut SchemaGetCall<'a, C, A> where C: BorrowMut, A: oau /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Schema)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -21645,8 +21579,7 @@ impl<'a, C, A> SchemaGetCall<'a, C, A> where C: BorrowMut, A: oau } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -21830,7 +21763,7 @@ impl<'a, C, A> SchemaUpdateCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Schema)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -21911,8 +21844,7 @@ impl<'a, C, A> SchemaUpdateCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -22101,7 +22033,7 @@ impl<'a, C, A> SchemaListCall<'a, C, A> where C: BorrowMut, A: oa /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Schemas)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -22170,8 +22102,7 @@ impl<'a, C, A> SchemaListCall<'a, C, A> where C: BorrowMut, A: oa } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -22345,7 +22276,7 @@ impl<'a, C, A> SchemaPatchCall<'a, C, A> where C: BorrowMut, A: o /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Schema)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -22426,8 +22357,7 @@ impl<'a, C, A> SchemaPatchCall<'a, C, A> where C: BorrowMut, A: o } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -22617,7 +22547,7 @@ impl<'a, C, A> SchemaDeleteCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -22686,8 +22616,7 @@ impl<'a, C, A> SchemaDeleteCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Delete, &url) @@ -22860,7 +22789,7 @@ impl<'a, C, A> SchemaInsertCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Schema)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -22940,8 +22869,7 @@ impl<'a, C, A> SchemaInsertCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -23124,7 +23052,7 @@ impl<'a, C, A> ResourceCalendarListCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, CalendarResources)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -23199,8 +23127,7 @@ impl<'a, C, A> ResourceCalendarListCall<'a, C, A> where C: BorrowMut ResourceCalendarGetCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, CalendarResource)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -23451,8 +23378,7 @@ impl<'a, C, A> ResourceCalendarGetCall<'a, C, A> where C: BorrowMut ResourceCalendarInsertCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, CalendarResource)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -23715,8 +23641,7 @@ impl<'a, C, A> ResourceCalendarInsertCall<'a, C, A> where C: BorrowMut ResourceCalendarPatchCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, CalendarResource)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -23984,8 +23909,7 @@ impl<'a, C, A> ResourceCalendarPatchCall<'a, C, A> where C: BorrowMut ResourceCalendarUpdateCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, CalendarResource)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -24263,8 +24187,7 @@ impl<'a, C, A> ResourceCalendarUpdateCall<'a, C, A> where C: BorrowMut ResourceCalendarDeleteCall<'a, C, A> where C: BorrowMut Result { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -24523,8 +24446,7 @@ impl<'a, C, A> ResourceCalendarDeleteCall<'a, C, A> where C: BorrowMut UserUndeleteCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -24776,8 +24698,7 @@ impl<'a, C, A> UserUndeleteCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -24946,7 +24867,7 @@ impl<'a, C, A> UserPhotoDeleteCall<'a, C, A> where C: BorrowMut, /// Perform the operation you have build so far. pub fn doit(mut self) -> Result { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -25014,8 +24935,7 @@ impl<'a, C, A> UserPhotoDeleteCall<'a, C, A> where C: BorrowMut, } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Delete, &url) @@ -25178,7 +25098,7 @@ impl<'a, C, A> UserPhotoPatchCall<'a, C, A> where C: BorrowMut, A /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, UserPhoto)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -25258,8 +25178,7 @@ impl<'a, C, A> UserPhotoPatchCall<'a, C, A> where C: BorrowMut, A } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -25444,7 +25363,7 @@ impl<'a, C, A> UserInsertCall<'a, C, A> where C: BorrowMut, A: oa /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, User)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -25502,8 +25421,7 @@ impl<'a, C, A> UserInsertCall<'a, C, A> where C: BorrowMut, A: oa } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -25681,7 +25599,7 @@ impl<'a, C, A> UserAliaseWatchCall<'a, C, A> where C: BorrowMut, /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Channel)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -25764,8 +25682,7 @@ impl<'a, C, A> UserAliaseWatchCall<'a, C, A> where C: BorrowMut, } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -25958,7 +25875,7 @@ impl<'a, C, A> UserPhotoUpdateCall<'a, C, A> where C: BorrowMut, /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, UserPhoto)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -26038,8 +25955,7 @@ impl<'a, C, A> UserPhotoUpdateCall<'a, C, A> where C: BorrowMut, } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -26248,7 +26164,7 @@ impl<'a, C, A> UserWatchCall<'a, C, A> where C: BorrowMut, A: oau /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Channel)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -26342,8 +26258,7 @@ impl<'a, C, A> UserWatchCall<'a, C, A> where C: BorrowMut, A: oau } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -26603,7 +26518,7 @@ impl<'a, C, A> UserUpdateCall<'a, C, A> where C: BorrowMut, A: oa /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, User)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -26683,8 +26598,7 @@ impl<'a, C, A> UserUpdateCall<'a, C, A> where C: BorrowMut, A: oa } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -26863,7 +26777,7 @@ impl<'a, C, A> UserPhotoGetCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, UserPhoto)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -26932,8 +26846,7 @@ impl<'a, C, A> UserPhotoGetCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -27122,7 +27035,7 @@ impl<'a, C, A> UserListCall<'a, C, A> where C: BorrowMut, A: oaut /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Users)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -27205,8 +27118,7 @@ impl<'a, C, A> UserListCall<'a, C, A> where C: BorrowMut, A: oaut } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -27452,7 +27364,7 @@ impl<'a, C, A> UserGetCall<'a, C, A> where C: BorrowMut, A: oauth /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, User)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -27530,8 +27442,7 @@ impl<'a, C, A> UserGetCall<'a, C, A> where C: BorrowMut, A: oauth } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -27725,7 +27636,7 @@ impl<'a, C, A> UserAliaseInsertCall<'a, C, A> where C: BorrowMut, /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Alias)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -27805,8 +27716,7 @@ impl<'a, C, A> UserAliaseInsertCall<'a, C, A> where C: BorrowMut, } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -27987,7 +27897,7 @@ impl<'a, C, A> UserAliaseListCall<'a, C, A> where C: BorrowMut, A /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Aliases)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -28059,8 +27969,7 @@ impl<'a, C, A> UserAliaseListCall<'a, C, A> where C: BorrowMut, A } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -28240,7 +28149,7 @@ impl<'a, C, A> UserMakeAdminCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -28319,8 +28228,7 @@ impl<'a, C, A> UserMakeAdminCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -28496,7 +28404,7 @@ impl<'a, C, A> UserPatchCall<'a, C, A> where C: BorrowMut, A: oau /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, User)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -28576,8 +28484,7 @@ impl<'a, C, A> UserPatchCall<'a, C, A> where C: BorrowMut, A: oau } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -28757,7 +28664,7 @@ impl<'a, C, A> UserAliaseDeleteCall<'a, C, A> where C: BorrowMut, /// Perform the operation you have build so far. pub fn doit(mut self) -> Result { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -28826,8 +28733,7 @@ impl<'a, C, A> UserAliaseDeleteCall<'a, C, A> where C: BorrowMut, } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Delete, &url) @@ -28993,7 +28899,7 @@ impl<'a, C, A> UserDeleteCall<'a, C, A> where C: BorrowMut, A: oa /// Perform the operation you have build so far. pub fn doit(mut self) -> Result { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -29061,8 +28967,7 @@ impl<'a, C, A> UserDeleteCall<'a, C, A> where C: BorrowMut, A: oa } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Delete, &url) diff --git a/gen/admin1_reports-cli/Cargo.toml b/gen/admin1_reports-cli/Cargo.toml index 0e3f1ab092..4eadcef84e 100644 --- a/gen/admin1_reports-cli/Cargo.toml +++ b/gen/admin1_reports-cli/Cargo.toml @@ -4,7 +4,7 @@ [package] name = "google-admin1_reports-cli" -version = "0.3.3+20151113" +version = "0.3.4+20151113" authors = ["Sebastian Thiel "] description = "A complete library to interact with reports (protocol reports_v1)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/admin1_reports-cli" @@ -17,18 +17,18 @@ keywords = ["admin", "google", "cli"] name = "admin1-reports" [dependencies] -hyper = "0.7" -mime = "0.1.0" -serde = ">= 0.7.0" -serde_json = ">= 0.7.0" -yup-oauth2 = ">= 0.5.4" +hyper = "0.8" +mime = "0.2.0" +serde = "0.6.0" +serde_json = "0.6.0" +yup-oauth2 = ">= 0.5.6" strsim = "0.4" yup-hyper-mock = "1.0" clap = "2.0" [build-dependencies] -syntex = { version = ">= 0.23" } -serde_codegen = { version = ">= 0.6" } +syntex = { version = "= 0.28" } +serde_codegen = { version = "= 0.6.13" } [dependencies.google-admin1_reports] diff --git a/gen/admin1_reports-cli/README.md b/gen/admin1_reports-cli/README.md index 78b2112f1f..ec50e33efd 100644 --- a/gen/admin1_reports-cli/README.md +++ b/gen/admin1_reports-cli/README.md @@ -17,14 +17,14 @@ Everything else about the *reports* API can be found at the You can download the pre-compiled 64bit binaries for the following platforms: -* ![icon](http://megaicons.net/static/img/icons_sizes/6/140/16/ubuntu-icon.png) [ubuntu](http://dl.byronimo.de/google.rs/cli/0.3.3/ubuntu/admin1-reports.tar.gz) -* ![icon](http://hydra-media.cursecdn.com/wow.gamepedia.com/a/a2/Apple-icon-16x16.png?version=25ddd67ac3dd3b634478e3978b76cb74) [osx](http://dl.byronimo.de/google.rs/cli/0.3.3/osx/admin1-reports.tar.gz) +* ![icon](http://megaicons.net/static/img/icons_sizes/6/140/16/ubuntu-icon.png) [ubuntu](http://dl.byronimo.de/google.rs/cli/0.3.4/ubuntu/admin1-reports.tar.gz) +* ![icon](http://hydra-media.cursecdn.com/wow.gamepedia.com/a/a2/Apple-icon-16x16.png?version=25ddd67ac3dd3b634478e3978b76cb74) [osx](http://dl.byronimo.de/google.rs/cli/0.3.4/osx/admin1-reports.tar.gz) Find the source code [on github](https://github.com/Byron/google-apis-rs/tree/master/gen/admin1_reports-cli). # Usage -This documentation was generated from the *reports* API at revision *20151113*. The CLI is at version *0.3.3*. +This documentation was generated from the *reports* API at revision *20151113*. The CLI is at version *0.3.4*. ```bash admin1-reports [options] diff --git a/gen/admin1_reports-cli/mkdocs.yml b/gen/admin1_reports-cli/mkdocs.yml index 040d4ccc8a..1ecfc2bf7a 100644 --- a/gen/admin1_reports-cli/mkdocs.yml +++ b/gen/admin1_reports-cli/mkdocs.yml @@ -1,4 +1,4 @@ -site_name: reports v0.3.3+20151113 +site_name: reports v0.3.4+20151113 site_url: http://byron.github.io/google-apis-rs/google-admin1_reports-cli site_description: Write integrating applications with bcore diff --git a/gen/admin1_reports-cli/src/cmn.rs b/gen/admin1_reports-cli/src/cmn.rs index 188159ee80..ae86fdef65 100644 --- a/gen/admin1_reports-cli/src/cmn.rs +++ b/gen/admin1_reports-cli/src/cmn.rs @@ -414,7 +414,7 @@ impl TokenStorage for JsonTokenStorage { Err(err) => match err.kind() { io::ErrorKind::NotFound => Ok(()), - _ => Err(json::Error::Io(err)) + _ => Err(json::Error::IoError(err)) }, Ok(_) => Ok(()), } @@ -427,7 +427,7 @@ impl TokenStorage for JsonTokenStorage { Err(serde_err) => Err(serde_err), } }, - Err(io_err) => Err(json::Error::Io(io_err)) + Err(io_err) => Err(json::Error::IoError(io_err)) } } } @@ -444,7 +444,7 @@ impl TokenStorage for JsonTokenStorage { Err(io_err) => { match io_err.kind() { io::ErrorKind::NotFound => Ok(None), - _ => Err(json::Error::Io(io_err)) + _ => Err(json::Error::IoError(io_err)) } } } @@ -683,7 +683,7 @@ pub fn application_secret_from_directory(dir: &str, = json::from_str(json_console_secret).unwrap(); match json::to_writer_pretty(&mut f, &console_secret) { Err(serde_err) => match serde_err { - json::Error::Io(err) => err, + json::Error::IoError(err) => err, _ => panic!("Unexpected serde error: {:#?}", serde_err) }, Ok(_) => continue, @@ -696,7 +696,7 @@ pub fn application_secret_from_directory(dir: &str, }, Ok(f) => { match json::de::from_reader::<_, ConsoleApplicationSecret>(f) { - Err(json::Error::Io(err)) => + Err(json::Error::IoError(err)) => return secret_io_error(err), Err(json_err) => return Err(CLIError::Configuration( diff --git a/gen/admin1_reports-cli/src/main.rs b/gen/admin1_reports-cli/src/main.rs index 605c512da6..7920e4f37f 100644 --- a/gen/admin1_reports-cli/src/main.rs +++ b/gen/admin1_reports-cli/src/main.rs @@ -735,7 +735,7 @@ fn main() { let mut app = App::new("admin1-reports") .author("Sebastian Thiel ") - .version("0.3.3+20151113") + .version("0.3.4+20151113") .about("Allows the administrators of Google Apps customers to fetch reports about the usage, collaboration, security and risk for their users.") .after_help("All documentation details can be found at http://byron.github.io/google-apis-rs/google_admin1_reports_cli") .arg(Arg::with_name("url") diff --git a/gen/admin1_reports/Cargo.toml b/gen/admin1_reports/Cargo.toml index 5fffb1716f..3c9bd4439e 100644 --- a/gen/admin1_reports/Cargo.toml +++ b/gen/admin1_reports/Cargo.toml @@ -4,7 +4,7 @@ [package] name = "google-admin1_reports" -version = "0.1.12+20151113" +version = "0.1.13+20151113" authors = ["Sebastian Thiel "] description = "A complete library to interact with reports (protocol reports_v1)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/admin1_reports" @@ -16,14 +16,14 @@ build = "src/build.rs" [dependencies] -hyper = "0.7" -mime = "0.1.0" -serde = ">= 0.7.0" -serde_json = ">= 0.7.0" -yup-oauth2 = ">= 0.5.4" +hyper = "0.8" +mime = "0.2.0" +serde = "0.6.0" +serde_json = "0.6.0" +yup-oauth2 = ">= 0.5.6" url = ">= 0.5" [build-dependencies] -syntex = { version = ">= 0.23" } -serde_codegen = { version = ">= 0.6" } +syntex = { version = "= 0.28" } +serde_codegen = { version = "= 0.6.13" } diff --git a/gen/admin1_reports/README.md b/gen/admin1_reports/README.md index bc7c231ff8..7ee51c57a0 100644 --- a/gen/admin1_reports/README.md +++ b/gen/admin1_reports/README.md @@ -5,7 +5,7 @@ DO NOT EDIT ! --> The `google-admin1_reports` library allows access to all features of the *Google reports* service. -This documentation was generated from *reports* crate version *0.1.12+20151113*, where *20151113* is the exact revision of the *admin:reports_v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.12*. +This documentation was generated from *reports* crate version *0.1.13+20151113*, where *20151113* is the exact revision of the *admin:reports_v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.13*. Everything else about the *reports* *v1_reports* API can be found at the [official documentation site](https://developers.google.com/admin-sdk/reports/). diff --git a/gen/admin1_reports/src/cmn.rs b/gen/admin1_reports/src/cmn.rs index 87b91a8986..c69621da55 100644 --- a/gen/admin1_reports/src/cmn.rs +++ b/gen/admin1_reports/src/cmn.rs @@ -12,7 +12,7 @@ use mime::{Mime, TopLevel, SubLevel, Attr, Value}; use oauth2::{TokenType, Retry, self}; use hyper; use hyper::header::{ContentType, ContentLength, Headers, UserAgent, Authorization, Header, - HeaderFormat}; + HeaderFormat, Bearer}; use hyper::http::h1::LINE_ENDING; use hyper::method::Method; use hyper::status::StatusCode; @@ -634,7 +634,7 @@ pub struct ResumableUploadHelper<'a, A: 'a> { pub start_at: Option, pub auth: &'a mut A, pub user_agent: &'a str, - pub auth_header: Authorization, + pub auth_header: Authorization, pub url: &'a str, pub reader: &'a mut ReadSeek, pub media_type: Mime, diff --git a/gen/admin1_reports/src/lib.rs b/gen/admin1_reports/src/lib.rs index 678618b5c4..bb23c888b5 100644 --- a/gen/admin1_reports/src/lib.rs +++ b/gen/admin1_reports/src/lib.rs @@ -2,7 +2,7 @@ // This file was generated automatically from 'src/mako/api/lib.rs.mako' // DO NOT EDIT ! -//! This documentation was generated from *reports* crate version *0.1.12+20151113*, where *20151113* is the exact revision of the *admin:reports_v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.12*. +//! This documentation was generated from *reports* crate version *0.1.13+20151113*, where *20151113* is the exact revision of the *admin:reports_v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.13*. //! //! Everything else about the *reports* *v1_reports* API can be found at the //! [official documentation site](https://developers.google.com/admin-sdk/reports/). diff --git a/gen/admin1_reports/src/lib.rs.in b/gen/admin1_reports/src/lib.rs.in index bfc11000d4..8885b94fba 100644 --- a/gen/admin1_reports/src/lib.rs.in +++ b/gen/admin1_reports/src/lib.rs.in @@ -145,7 +145,7 @@ impl<'a, C, A> Reports Reports { client: RefCell::new(client), auth: RefCell::new(authenticator), - _user_agent: "google-api-rust-client/0.1.12".to_string(), + _user_agent: "google-api-rust-client/0.1.13".to_string(), } } @@ -163,7 +163,7 @@ impl<'a, C, A> Reports } /// Set the user-agent header field to use in all requests to the server. - /// It defaults to `google-api-rust-client/0.1.12`. + /// It defaults to `google-api-rust-client/0.1.13`. /// /// Returns the previously set user-agent. pub fn user_agent(&mut self, agent_name: String) -> String { @@ -846,7 +846,7 @@ impl<'a, C, A> ChannelStopCall<'a, C, A> where C: BorrowMut, A: o /// Perform the operation you have build so far. pub fn doit(mut self) -> Result { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -903,8 +903,7 @@ impl<'a, C, A> ChannelStopCall<'a, C, A> where C: BorrowMut, A: o } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -1087,7 +1086,7 @@ impl<'a, C, A> ActivityWatchCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Channel)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -1192,8 +1191,7 @@ impl<'a, C, A> ActivityWatchCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -1455,7 +1453,7 @@ impl<'a, C, A> ActivityListCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Activities)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -1549,8 +1547,7 @@ impl<'a, C, A> ActivityListCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -1788,7 +1785,7 @@ impl<'a, C, A> CustomerUsageReportGetCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, UsageReports)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -1866,8 +1863,7 @@ impl<'a, C, A> CustomerUsageReportGetCall<'a, C, A> where C: BorrowMut UserUsageReportGetCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, UsageReports)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -2150,8 +2146,7 @@ impl<'a, C, A> UserUsageReportGetCall<'a, C, A> where C: BorrowMut"] description = "A complete library to interact with AdSense (protocol v1.4)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/adsense1d4-cli" @@ -17,18 +17,18 @@ keywords = ["adsense", "google", "cli"] name = "adsense1d4" [dependencies] -hyper = "0.7" -mime = "0.1.0" -serde = ">= 0.7.0" -serde_json = ">= 0.7.0" -yup-oauth2 = ">= 0.5.4" +hyper = "0.8" +mime = "0.2.0" +serde = "0.6.0" +serde_json = "0.6.0" +yup-oauth2 = ">= 0.5.6" strsim = "0.4" yup-hyper-mock = "1.0" clap = "2.0" [build-dependencies] -syntex = { version = ">= 0.23" } -serde_codegen = { version = ">= 0.6" } +syntex = { version = "= 0.28" } +serde_codegen = { version = "= 0.6.13" } [dependencies.google-adsense1d4] diff --git a/gen/adsense1d4-cli/README.md b/gen/adsense1d4-cli/README.md index 044e771db3..6a70ec06d8 100644 --- a/gen/adsense1d4-cli/README.md +++ b/gen/adsense1d4-cli/README.md @@ -17,14 +17,14 @@ Everything else about the *AdSense* API can be found at the You can download the pre-compiled 64bit binaries for the following platforms: -* ![icon](http://megaicons.net/static/img/icons_sizes/6/140/16/ubuntu-icon.png) [ubuntu](http://dl.byronimo.de/google.rs/cli/0.3.3/ubuntu/adsense1d4.tar.gz) -* ![icon](http://hydra-media.cursecdn.com/wow.gamepedia.com/a/a2/Apple-icon-16x16.png?version=25ddd67ac3dd3b634478e3978b76cb74) [osx](http://dl.byronimo.de/google.rs/cli/0.3.3/osx/adsense1d4.tar.gz) +* ![icon](http://megaicons.net/static/img/icons_sizes/6/140/16/ubuntu-icon.png) [ubuntu](http://dl.byronimo.de/google.rs/cli/0.3.4/ubuntu/adsense1d4.tar.gz) +* ![icon](http://hydra-media.cursecdn.com/wow.gamepedia.com/a/a2/Apple-icon-16x16.png?version=25ddd67ac3dd3b634478e3978b76cb74) [osx](http://dl.byronimo.de/google.rs/cli/0.3.4/osx/adsense1d4.tar.gz) Find the source code [on github](https://github.com/Byron/google-apis-rs/tree/master/gen/adsense1d4-cli). # Usage -This documentation was generated from the *AdSense* API at revision *20160223*. The CLI is at version *0.3.3*. +This documentation was generated from the *AdSense* API at revision *20160405*. The CLI is at version *0.3.4*. ```bash adsense1d4 [options] diff --git a/gen/adsense1d4-cli/mkdocs.yml b/gen/adsense1d4-cli/mkdocs.yml index 566efbe6f5..0a707c3d7f 100644 --- a/gen/adsense1d4-cli/mkdocs.yml +++ b/gen/adsense1d4-cli/mkdocs.yml @@ -1,4 +1,4 @@ -site_name: AdSense v0.3.3+20160223 +site_name: AdSense v0.3.4+20160405 site_url: http://byron.github.io/google-apis-rs/google-adsense1d4-cli site_description: Write integrating applications with bcore diff --git a/gen/adsense1d4-cli/src/cmn.rs b/gen/adsense1d4-cli/src/cmn.rs index 188159ee80..ae86fdef65 100644 --- a/gen/adsense1d4-cli/src/cmn.rs +++ b/gen/adsense1d4-cli/src/cmn.rs @@ -414,7 +414,7 @@ impl TokenStorage for JsonTokenStorage { Err(err) => match err.kind() { io::ErrorKind::NotFound => Ok(()), - _ => Err(json::Error::Io(err)) + _ => Err(json::Error::IoError(err)) }, Ok(_) => Ok(()), } @@ -427,7 +427,7 @@ impl TokenStorage for JsonTokenStorage { Err(serde_err) => Err(serde_err), } }, - Err(io_err) => Err(json::Error::Io(io_err)) + Err(io_err) => Err(json::Error::IoError(io_err)) } } } @@ -444,7 +444,7 @@ impl TokenStorage for JsonTokenStorage { Err(io_err) => { match io_err.kind() { io::ErrorKind::NotFound => Ok(None), - _ => Err(json::Error::Io(io_err)) + _ => Err(json::Error::IoError(io_err)) } } } @@ -683,7 +683,7 @@ pub fn application_secret_from_directory(dir: &str, = json::from_str(json_console_secret).unwrap(); match json::to_writer_pretty(&mut f, &console_secret) { Err(serde_err) => match serde_err { - json::Error::Io(err) => err, + json::Error::IoError(err) => err, _ => panic!("Unexpected serde error: {:#?}", serde_err) }, Ok(_) => continue, @@ -696,7 +696,7 @@ pub fn application_secret_from_directory(dir: &str, }, Ok(f) => { match json::de::from_reader::<_, ConsoleApplicationSecret>(f) { - Err(json::Error::Io(err)) => + Err(json::Error::IoError(err)) => return secret_io_error(err), Err(json_err) => return Err(CLIError::Configuration( diff --git a/gen/adsense1d4-cli/src/main.rs b/gen/adsense1d4-cli/src/main.rs index 7d7e90975d..915b90a1ae 100644 --- a/gen/adsense1d4-cli/src/main.rs +++ b/gen/adsense1d4-cli/src/main.rs @@ -3480,8 +3480,8 @@ fn main() { let mut app = App::new("adsense1d4") .author("Sebastian Thiel ") - .version("0.3.3+20160223") - .about("Gives AdSense publishers access to their inventory and the ability to generate reports") + .version("0.3.4+20160405") + .about("Accesses AdSense publishers' inventory and generates performance reports.") .after_help("All documentation details can be found at http://byron.github.io/google-apis-rs/google_adsense1d4_cli") .arg(Arg::with_name("url") .long("scope") diff --git a/gen/adsense1d4/Cargo.toml b/gen/adsense1d4/Cargo.toml index aa0fca4997..edf84a5e07 100644 --- a/gen/adsense1d4/Cargo.toml +++ b/gen/adsense1d4/Cargo.toml @@ -4,7 +4,7 @@ [package] name = "google-adsense1d4" -version = "0.1.12+20160223" +version = "0.1.13+20160405" authors = ["Sebastian Thiel "] description = "A complete library to interact with AdSense (protocol v1.4)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/adsense1d4" @@ -16,14 +16,14 @@ build = "src/build.rs" [dependencies] -hyper = "0.7" -mime = "0.1.0" -serde = ">= 0.7.0" -serde_json = ">= 0.7.0" -yup-oauth2 = ">= 0.5.4" +hyper = "0.8" +mime = "0.2.0" +serde = "0.6.0" +serde_json = "0.6.0" +yup-oauth2 = ">= 0.5.6" url = ">= 0.5" [build-dependencies] -syntex = { version = ">= 0.23" } -serde_codegen = { version = ">= 0.6" } +syntex = { version = "= 0.28" } +serde_codegen = { version = "= 0.6.13" } diff --git a/gen/adsense1d4/README.md b/gen/adsense1d4/README.md index ae4130977a..b39e8216af 100644 --- a/gen/adsense1d4/README.md +++ b/gen/adsense1d4/README.md @@ -5,7 +5,7 @@ DO NOT EDIT ! --> The `google-adsense1d4` library allows access to all features of the *Google AdSense* service. -This documentation was generated from *AdSense* crate version *0.1.12+20160223*, where *20160223* is the exact revision of the *adsense:v1.4* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.12*. +This documentation was generated from *AdSense* crate version *0.1.13+20160405*, where *20160405* is the exact revision of the *adsense:v1.4* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.13*. Everything else about the *AdSense* *v1d4* API can be found at the [official documentation site](https://developers.google.com/adsense/management/). diff --git a/gen/adsense1d4/src/cmn.rs b/gen/adsense1d4/src/cmn.rs index 87b91a8986..c69621da55 100644 --- a/gen/adsense1d4/src/cmn.rs +++ b/gen/adsense1d4/src/cmn.rs @@ -12,7 +12,7 @@ use mime::{Mime, TopLevel, SubLevel, Attr, Value}; use oauth2::{TokenType, Retry, self}; use hyper; use hyper::header::{ContentType, ContentLength, Headers, UserAgent, Authorization, Header, - HeaderFormat}; + HeaderFormat, Bearer}; use hyper::http::h1::LINE_ENDING; use hyper::method::Method; use hyper::status::StatusCode; @@ -634,7 +634,7 @@ pub struct ResumableUploadHelper<'a, A: 'a> { pub start_at: Option, pub auth: &'a mut A, pub user_agent: &'a str, - pub auth_header: Authorization, + pub auth_header: Authorization, pub url: &'a str, pub reader: &'a mut ReadSeek, pub media_type: Mime, diff --git a/gen/adsense1d4/src/lib.rs b/gen/adsense1d4/src/lib.rs index 674ce1ebc1..09b16873ff 100644 --- a/gen/adsense1d4/src/lib.rs +++ b/gen/adsense1d4/src/lib.rs @@ -2,7 +2,7 @@ // This file was generated automatically from 'src/mako/api/lib.rs.mako' // DO NOT EDIT ! -//! This documentation was generated from *AdSense* crate version *0.1.12+20160223*, where *20160223* is the exact revision of the *adsense:v1.4* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.12*. +//! This documentation was generated from *AdSense* crate version *0.1.13+20160405*, where *20160405* is the exact revision of the *adsense:v1.4* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.13*. //! //! Everything else about the *AdSense* *v1d4* API can be found at the //! [official documentation site](https://developers.google.com/adsense/management/). diff --git a/gen/adsense1d4/src/lib.rs.in b/gen/adsense1d4/src/lib.rs.in index 711db1ae20..6996186fb4 100644 --- a/gen/adsense1d4/src/lib.rs.in +++ b/gen/adsense1d4/src/lib.rs.in @@ -140,7 +140,7 @@ impl<'a, C, A> AdSense AdSense { client: RefCell::new(client), auth: RefCell::new(authenticator), - _user_agent: "google-api-rust-client/0.1.12".to_string(), + _user_agent: "google-api-rust-client/0.1.13".to_string(), } } @@ -176,7 +176,7 @@ impl<'a, C, A> AdSense } /// Set the user-agent header field to use in all requests to the server. - /// It defaults to `google-api-rust-client/0.1.12`. + /// It defaults to `google-api-rust-client/0.1.13`. /// /// Returns the previously set user-agent. pub fn user_agent(&mut self, agent_name: String) -> String { @@ -2179,7 +2179,7 @@ impl<'a, C, A> UrlchannelListCall<'a, C, A> where C: BorrowMut, A /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, UrlChannels)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -2254,8 +2254,7 @@ impl<'a, C, A> UrlchannelListCall<'a, C, A> where C: BorrowMut, A } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -2440,7 +2439,7 @@ impl<'a, C, A> AdunitCustomchannelListCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, CustomChannels)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -2516,8 +2515,7 @@ impl<'a, C, A> AdunitCustomchannelListCall<'a, C, A> where C: BorrowMut AdunitGetCall<'a, C, A> where C: BorrowMut, A: oau /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, AdUnit)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -2778,8 +2776,7 @@ impl<'a, C, A> AdunitGetCall<'a, C, A> where C: BorrowMut, A: oau } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -2961,7 +2958,7 @@ impl<'a, C, A> AdunitListCall<'a, C, A> where C: BorrowMut, A: oa /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, AdUnits)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -3039,8 +3036,7 @@ impl<'a, C, A> AdunitListCall<'a, C, A> where C: BorrowMut, A: oa } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -3228,7 +3224,7 @@ impl<'a, C, A> AdunitGetAdCodeCall<'a, C, A> where C: BorrowMut, /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, AdCode)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -3298,8 +3294,7 @@ impl<'a, C, A> AdunitGetAdCodeCall<'a, C, A> where C: BorrowMut, } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -3478,7 +3473,7 @@ impl<'a, C, A> AdclientListCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, AdClients)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -3531,8 +3526,7 @@ impl<'a, C, A> AdclientListCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -3702,7 +3696,7 @@ impl<'a, C, A> AlertDeleteCall<'a, C, A> where C: BorrowMut, A: o /// Perform the operation you have build so far. pub fn doit(mut self) -> Result { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -3770,8 +3764,7 @@ impl<'a, C, A> AlertDeleteCall<'a, C, A> where C: BorrowMut, A: o } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Delete, &url) @@ -3928,7 +3921,7 @@ impl<'a, C, A> AlertListCall<'a, C, A> where C: BorrowMut, A: oau /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Alerts)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -3978,8 +3971,7 @@ impl<'a, C, A> AlertListCall<'a, C, A> where C: BorrowMut, A: oau } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -4145,7 +4137,7 @@ impl<'a, C, A> SavedadstyleListCall<'a, C, A> where C: BorrowMut, /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, SavedAdStyles)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -4198,8 +4190,7 @@ impl<'a, C, A> SavedadstyleListCall<'a, C, A> where C: BorrowMut, } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -4369,7 +4360,7 @@ impl<'a, C, A> SavedadstyleGetCall<'a, C, A> where C: BorrowMut, /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, SavedAdStyle)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -4438,8 +4429,7 @@ impl<'a, C, A> SavedadstyleGetCall<'a, C, A> where C: BorrowMut, } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -4608,7 +4598,7 @@ impl<'a, C, A> ReportSavedListCall<'a, C, A> where C: BorrowMut, /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, SavedReports)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -4661,8 +4651,7 @@ impl<'a, C, A> ReportSavedListCall<'a, C, A> where C: BorrowMut, } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -4858,7 +4847,7 @@ impl<'a, C, A> ReportGenerateCall<'a, C, A> where C: BorrowMut, A /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, AdsenseReportsGenerateResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -4963,8 +4952,7 @@ impl<'a, C, A> ReportGenerateCall<'a, C, A> where C: BorrowMut, A } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -5221,7 +5209,7 @@ impl<'a, C, A> ReportSavedGenerateCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, AdsenseReportsGenerateResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -5299,8 +5287,7 @@ impl<'a, C, A> ReportSavedGenerateCall<'a, C, A> where C: BorrowMut AccountAlertDeleteCall<'a, C, A> where C: BorrowMut Result { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -5557,8 +5544,7 @@ impl<'a, C, A> AccountAlertDeleteCall<'a, C, A> where C: BorrowMut AccountAlertListCall<'a, C, A> where C: BorrowMut, /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Alerts)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -5798,8 +5784,7 @@ impl<'a, C, A> AccountAlertListCall<'a, C, A> where C: BorrowMut, } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -5979,7 +5964,7 @@ impl<'a, C, A> AccountReportSavedGenerateCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, AdsenseReportsGenerateResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -6058,8 +6043,7 @@ impl<'a, C, A> AccountReportSavedGenerateCall<'a, C, A> where C: BorrowMut AccountListCall<'a, C, A> where C: BorrowMut, A: o /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Accounts)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -6312,8 +6296,7 @@ impl<'a, C, A> AccountListCall<'a, C, A> where C: BorrowMut, A: o } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -6483,7 +6466,7 @@ impl<'a, C, A> AccountPaymentListCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, Payments)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -6552,8 +6535,7 @@ impl<'a, C, A> AccountPaymentListCall<'a, C, A> where C: BorrowMut AccountSavedadstyleGetCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, SavedAdStyle)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -6790,8 +6772,7 @@ impl<'a, C, A> AccountSavedadstyleGetCall<'a, C, A> where C: BorrowMut AccountAdunitGetCall<'a, C, A> where C: BorrowMut, /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, AdUnit)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -7040,8 +7021,7 @@ impl<'a, C, A> AccountAdunitGetCall<'a, C, A> where C: BorrowMut, } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -7229,7 +7209,7 @@ impl<'a, C, A> AccountCustomchannelGetCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, CustomChannel)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -7300,8 +7280,7 @@ impl<'a, C, A> AccountCustomchannelGetCall<'a, C, A> where C: BorrowMut AccountCustomchannelAdunitListCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, AdUnits)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -7575,8 +7554,7 @@ impl<'a, C, A> AccountCustomchannelAdunitListCall<'a, C, A> where C: BorrowMut AccountReportSavedListCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, SavedReports)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -7862,8 +7840,7 @@ impl<'a, C, A> AccountReportSavedListCall<'a, C, A> where C: BorrowMut AccountUrlchannelListCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, UrlChannels)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -8124,8 +8101,7 @@ impl<'a, C, A> AccountUrlchannelListCall<'a, C, A> where C: BorrowMut AccountAdunitListCall<'a, C, A> where C: BorrowMut /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, AdUnits)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -8401,8 +8377,7 @@ impl<'a, C, A> AccountAdunitListCall<'a, C, A> where C: BorrowMut } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -8624,7 +8599,7 @@ impl<'a, C, A> AccountReportGenerateCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, AdsenseReportsGenerateResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -8746,8 +8721,7 @@ impl<'a, C, A> AccountReportGenerateCall<'a, C, A> where C: BorrowMut AccountAdclientListCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, AdClients)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -9079,8 +9053,7 @@ impl<'a, C, A> AccountAdclientListCall<'a, C, A> where C: BorrowMut AccountCustomchannelListCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, CustomChannels)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -9341,8 +9314,7 @@ impl<'a, C, A> AccountCustomchannelListCall<'a, C, A> where C: BorrowMut AccountSavedadstyleListCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, SavedAdStyles)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -9611,8 +9583,7 @@ impl<'a, C, A> AccountSavedadstyleListCall<'a, C, A> where C: BorrowMut AccountAdunitGetAdCodeCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, AdCode)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -9865,8 +9836,7 @@ impl<'a, C, A> AccountAdunitGetAdCodeCall<'a, C, A> where C: BorrowMut AccountAdunitCustomchannelListCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, CustomChannels)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -10135,8 +10105,7 @@ impl<'a, C, A> AccountAdunitCustomchannelListCall<'a, C, A> where C: BorrowMut AccountGetCall<'a, C, A> where C: BorrowMut, A: oa /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Account)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -10410,8 +10379,7 @@ impl<'a, C, A> AccountGetCall<'a, C, A> where C: BorrowMut, A: oa } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -10583,7 +10551,7 @@ impl<'a, C, A> PaymentListCall<'a, C, A> where C: BorrowMut, A: o /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Payments)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -10630,8 +10598,7 @@ impl<'a, C, A> PaymentListCall<'a, C, A> where C: BorrowMut, A: o } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -10786,7 +10753,7 @@ impl<'a, C, A> MetadataDimensionListCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, Metadata)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -10833,8 +10800,7 @@ impl<'a, C, A> MetadataDimensionListCall<'a, C, A> where C: BorrowMut MetadataMetricListCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, Metadata)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -11036,8 +11002,7 @@ impl<'a, C, A> MetadataMetricListCall<'a, C, A> where C: BorrowMut CustomchannelGetCall<'a, C, A> where C: BorrowMut, /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, CustomChannel)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -11264,8 +11229,7 @@ impl<'a, C, A> CustomchannelGetCall<'a, C, A> where C: BorrowMut, } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -11445,7 +11409,7 @@ impl<'a, C, A> CustomchannelListCall<'a, C, A> where C: BorrowMut /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, CustomChannels)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -11520,8 +11484,7 @@ impl<'a, C, A> CustomchannelListCall<'a, C, A> where C: BorrowMut } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -11708,7 +11671,7 @@ impl<'a, C, A> CustomchannelAdunitListCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, AdUnits)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -11787,8 +11750,7 @@ impl<'a, C, A> CustomchannelAdunitListCall<'a, C, A> where C: BorrowMut"] description = "A complete library to interact with AdSense Host (protocol v4.1)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/adsensehost4d1-cli" @@ -17,18 +17,18 @@ keywords = ["adsensehost", "google", "cli"] name = "adsensehost4d1" [dependencies] -hyper = "0.7" -mime = "0.1.0" -serde = ">= 0.7.0" -serde_json = ">= 0.7.0" -yup-oauth2 = ">= 0.5.4" +hyper = "0.8" +mime = "0.2.0" +serde = "0.6.0" +serde_json = "0.6.0" +yup-oauth2 = ">= 0.5.6" strsim = "0.4" yup-hyper-mock = "1.0" clap = "2.0" [build-dependencies] -syntex = { version = ">= 0.23" } -serde_codegen = { version = ">= 0.6" } +syntex = { version = "= 0.28" } +serde_codegen = { version = "= 0.6.13" } [dependencies.google-adsensehost4d1] diff --git a/gen/adsensehost4d1-cli/README.md b/gen/adsensehost4d1-cli/README.md index a3da11dfd3..75dbbd5d35 100644 --- a/gen/adsensehost4d1-cli/README.md +++ b/gen/adsensehost4d1-cli/README.md @@ -17,14 +17,14 @@ Everything else about the *AdSense Host* API can be found at the You can download the pre-compiled 64bit binaries for the following platforms: -* ![icon](http://megaicons.net/static/img/icons_sizes/6/140/16/ubuntu-icon.png) [ubuntu](http://dl.byronimo.de/google.rs/cli/0.3.3/ubuntu/adsensehost4d1.tar.gz) -* ![icon](http://hydra-media.cursecdn.com/wow.gamepedia.com/a/a2/Apple-icon-16x16.png?version=25ddd67ac3dd3b634478e3978b76cb74) [osx](http://dl.byronimo.de/google.rs/cli/0.3.3/osx/adsensehost4d1.tar.gz) +* ![icon](http://megaicons.net/static/img/icons_sizes/6/140/16/ubuntu-icon.png) [ubuntu](http://dl.byronimo.de/google.rs/cli/0.3.4/ubuntu/adsensehost4d1.tar.gz) +* ![icon](http://hydra-media.cursecdn.com/wow.gamepedia.com/a/a2/Apple-icon-16x16.png?version=25ddd67ac3dd3b634478e3978b76cb74) [osx](http://dl.byronimo.de/google.rs/cli/0.3.4/osx/adsensehost4d1.tar.gz) Find the source code [on github](https://github.com/Byron/google-apis-rs/tree/master/gen/adsensehost4d1-cli). # Usage -This documentation was generated from the *AdSense Host* API at revision *20160223*. The CLI is at version *0.3.3*. +This documentation was generated from the *AdSense Host* API at revision *20160405*. The CLI is at version *0.3.4*. ```bash adsensehost4d1 [options] diff --git a/gen/adsensehost4d1-cli/mkdocs.yml b/gen/adsensehost4d1-cli/mkdocs.yml index e71a821661..08039e161d 100644 --- a/gen/adsensehost4d1-cli/mkdocs.yml +++ b/gen/adsensehost4d1-cli/mkdocs.yml @@ -1,4 +1,4 @@ -site_name: AdSense Host v0.3.3+20160223 +site_name: AdSense Host v0.3.4+20160405 site_url: http://byron.github.io/google-apis-rs/google-adsensehost4d1-cli site_description: Write integrating applications with bcore diff --git a/gen/adsensehost4d1-cli/src/cmn.rs b/gen/adsensehost4d1-cli/src/cmn.rs index 188159ee80..ae86fdef65 100644 --- a/gen/adsensehost4d1-cli/src/cmn.rs +++ b/gen/adsensehost4d1-cli/src/cmn.rs @@ -414,7 +414,7 @@ impl TokenStorage for JsonTokenStorage { Err(err) => match err.kind() { io::ErrorKind::NotFound => Ok(()), - _ => Err(json::Error::Io(err)) + _ => Err(json::Error::IoError(err)) }, Ok(_) => Ok(()), } @@ -427,7 +427,7 @@ impl TokenStorage for JsonTokenStorage { Err(serde_err) => Err(serde_err), } }, - Err(io_err) => Err(json::Error::Io(io_err)) + Err(io_err) => Err(json::Error::IoError(io_err)) } } } @@ -444,7 +444,7 @@ impl TokenStorage for JsonTokenStorage { Err(io_err) => { match io_err.kind() { io::ErrorKind::NotFound => Ok(None), - _ => Err(json::Error::Io(io_err)) + _ => Err(json::Error::IoError(io_err)) } } } @@ -683,7 +683,7 @@ pub fn application_secret_from_directory(dir: &str, = json::from_str(json_console_secret).unwrap(); match json::to_writer_pretty(&mut f, &console_secret) { Err(serde_err) => match serde_err { - json::Error::Io(err) => err, + json::Error::IoError(err) => err, _ => panic!("Unexpected serde error: {:#?}", serde_err) }, Ok(_) => continue, @@ -696,7 +696,7 @@ pub fn application_secret_from_directory(dir: &str, }, Ok(f) => { match json::de::from_reader::<_, ConsoleApplicationSecret>(f) { - Err(json::Error::Io(err)) => + Err(json::Error::IoError(err)) => return secret_io_error(err), Err(json_err) => return Err(CLIError::Configuration( diff --git a/gen/adsensehost4d1-cli/src/main.rs b/gen/adsensehost4d1-cli/src/main.rs index defe10891c..8fa15a566a 100644 --- a/gen/adsensehost4d1-cli/src/main.rs +++ b/gen/adsensehost4d1-cli/src/main.rs @@ -2761,8 +2761,8 @@ fn main() { let mut app = App::new("adsensehost4d1") .author("Sebastian Thiel ") - .version("0.3.3+20160223") - .about("Gives AdSense Hosts access to report generation, ad code generation, and publisher management capabilities.") + .version("0.3.4+20160405") + .about("Generates performance reports, generates ad codes, and provides publisher management capabilities for AdSense Hosts.") .after_help("All documentation details can be found at http://byron.github.io/google-apis-rs/google_adsensehost4d1_cli") .arg(Arg::with_name("url") .long("scope") diff --git a/gen/adsensehost4d1/Cargo.toml b/gen/adsensehost4d1/Cargo.toml index 5a951e1840..edef3dfceb 100644 --- a/gen/adsensehost4d1/Cargo.toml +++ b/gen/adsensehost4d1/Cargo.toml @@ -4,7 +4,7 @@ [package] name = "google-adsensehost4d1" -version = "0.1.12+20160223" +version = "0.1.13+20160405" authors = ["Sebastian Thiel "] description = "A complete library to interact with AdSense Host (protocol v4.1)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/adsensehost4d1" @@ -16,14 +16,14 @@ build = "src/build.rs" [dependencies] -hyper = "0.7" -mime = "0.1.0" -serde = ">= 0.7.0" -serde_json = ">= 0.7.0" -yup-oauth2 = ">= 0.5.4" +hyper = "0.8" +mime = "0.2.0" +serde = "0.6.0" +serde_json = "0.6.0" +yup-oauth2 = ">= 0.5.6" url = ">= 0.5" [build-dependencies] -syntex = { version = ">= 0.23" } -serde_codegen = { version = ">= 0.6" } +syntex = { version = "= 0.28" } +serde_codegen = { version = "= 0.6.13" } diff --git a/gen/adsensehost4d1/README.md b/gen/adsensehost4d1/README.md index d63f2110c9..77d141d163 100644 --- a/gen/adsensehost4d1/README.md +++ b/gen/adsensehost4d1/README.md @@ -5,7 +5,7 @@ DO NOT EDIT ! --> The `google-adsensehost4d1` library allows access to all features of the *Google AdSense Host* service. -This documentation was generated from *AdSense Host* crate version *0.1.12+20160223*, where *20160223* is the exact revision of the *adsensehost:v4.1* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.12*. +This documentation was generated from *AdSense Host* crate version *0.1.13+20160405*, where *20160405* is the exact revision of the *adsensehost:v4.1* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.13*. Everything else about the *AdSense Host* *v4d1* API can be found at the [official documentation site](https://developers.google.com/adsense/host/). diff --git a/gen/adsensehost4d1/src/cmn.rs b/gen/adsensehost4d1/src/cmn.rs index 87b91a8986..c69621da55 100644 --- a/gen/adsensehost4d1/src/cmn.rs +++ b/gen/adsensehost4d1/src/cmn.rs @@ -12,7 +12,7 @@ use mime::{Mime, TopLevel, SubLevel, Attr, Value}; use oauth2::{TokenType, Retry, self}; use hyper; use hyper::header::{ContentType, ContentLength, Headers, UserAgent, Authorization, Header, - HeaderFormat}; + HeaderFormat, Bearer}; use hyper::http::h1::LINE_ENDING; use hyper::method::Method; use hyper::status::StatusCode; @@ -634,7 +634,7 @@ pub struct ResumableUploadHelper<'a, A: 'a> { pub start_at: Option, pub auth: &'a mut A, pub user_agent: &'a str, - pub auth_header: Authorization, + pub auth_header: Authorization, pub url: &'a str, pub reader: &'a mut ReadSeek, pub media_type: Mime, diff --git a/gen/adsensehost4d1/src/lib.rs b/gen/adsensehost4d1/src/lib.rs index 503b439727..210d6dd6e1 100644 --- a/gen/adsensehost4d1/src/lib.rs +++ b/gen/adsensehost4d1/src/lib.rs @@ -2,7 +2,7 @@ // This file was generated automatically from 'src/mako/api/lib.rs.mako' // DO NOT EDIT ! -//! This documentation was generated from *AdSense Host* crate version *0.1.12+20160223*, where *20160223* is the exact revision of the *adsensehost:v4.1* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.12*. +//! This documentation was generated from *AdSense Host* crate version *0.1.13+20160405*, where *20160405* is the exact revision of the *adsensehost:v4.1* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.13*. //! //! Everything else about the *AdSense Host* *v4d1* API can be found at the //! [official documentation site](https://developers.google.com/adsense/host/). diff --git a/gen/adsensehost4d1/src/lib.rs.in b/gen/adsensehost4d1/src/lib.rs.in index 741e5b471e..1ea08b9cfa 100644 --- a/gen/adsensehost4d1/src/lib.rs.in +++ b/gen/adsensehost4d1/src/lib.rs.in @@ -134,7 +134,7 @@ impl<'a, C, A> AdSenseHost AdSenseHost { client: RefCell::new(client), auth: RefCell::new(authenticator), - _user_agent: "google-api-rust-client/0.1.12".to_string(), + _user_agent: "google-api-rust-client/0.1.13".to_string(), } } @@ -158,7 +158,7 @@ impl<'a, C, A> AdSenseHost } /// Set the user-agent header field to use in all requests to the server. - /// It defaults to `google-api-rust-client/0.1.12`. + /// It defaults to `google-api-rust-client/0.1.13`. /// /// Returns the previously set user-agent. pub fn user_agent(&mut self, agent_name: String) -> String { @@ -1528,7 +1528,7 @@ impl<'a, C, A> UrlchannelInsertCall<'a, C, A> where C: BorrowMut, /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, UrlChannel)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -1608,8 +1608,7 @@ impl<'a, C, A> UrlchannelInsertCall<'a, C, A> where C: BorrowMut, } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -1789,7 +1788,7 @@ impl<'a, C, A> UrlchannelDeleteCall<'a, C, A> where C: BorrowMut, /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, UrlChannel)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -1859,8 +1858,7 @@ impl<'a, C, A> UrlchannelDeleteCall<'a, C, A> where C: BorrowMut, } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Delete, &url) @@ -2040,7 +2038,7 @@ impl<'a, C, A> UrlchannelListCall<'a, C, A> where C: BorrowMut, A /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, UrlChannels)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -2115,8 +2113,7 @@ impl<'a, C, A> UrlchannelListCall<'a, C, A> where C: BorrowMut, A } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -2299,7 +2296,7 @@ impl<'a, C, A> AdclientListCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, AdClients)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -2352,8 +2349,7 @@ impl<'a, C, A> AdclientListCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -2523,7 +2519,7 @@ impl<'a, C, A> AdclientGetCall<'a, C, A> where C: BorrowMut, A: o /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, AdClient)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -2592,8 +2588,7 @@ impl<'a, C, A> AdclientGetCall<'a, C, A> where C: BorrowMut, A: o } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -2764,7 +2759,7 @@ impl<'a, C, A> AssociationsessionStartCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, AssociationSession)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -2823,8 +2818,7 @@ impl<'a, C, A> AssociationsessionStartCall<'a, C, A> where C: BorrowMut AssociationsessionVerifyCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, AssociationSession)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -3063,8 +3057,7 @@ impl<'a, C, A> AssociationsessionVerifyCall<'a, C, A> where C: BorrowMut ReportGenerateCall<'a, C, A> where C: BorrowMut, A /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Report)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -3323,8 +3316,7 @@ impl<'a, C, A> ReportGenerateCall<'a, C, A> where C: BorrowMut, A } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -3560,7 +3552,7 @@ impl<'a, C, A> AccountAdunitListCall<'a, C, A> where C: BorrowMut /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, AdUnits)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -3639,8 +3631,7 @@ impl<'a, C, A> AccountAdunitListCall<'a, C, A> where C: BorrowMut } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -3837,7 +3828,7 @@ impl<'a, C, A> AccountListCall<'a, C, A> where C: BorrowMut, A: o /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Accounts)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -3889,8 +3880,7 @@ impl<'a, C, A> AccountListCall<'a, C, A> where C: BorrowMut, A: o } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -4061,7 +4051,7 @@ impl<'a, C, A> AccountAdunitGetAdCodeCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, AdCode)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -4137,8 +4127,7 @@ impl<'a, C, A> AccountAdunitGetAdCodeCall<'a, C, A> where C: BorrowMut AccountReportGenerateCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, Report)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -4448,8 +4437,7 @@ impl<'a, C, A> AccountReportGenerateCall<'a, C, A> where C: BorrowMut AccountAdunitDeleteCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, AdUnit)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -4761,8 +4749,7 @@ impl<'a, C, A> AccountAdunitDeleteCall<'a, C, A> where C: BorrowMut AccountAdclientListCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, AdClients)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -5027,8 +5014,7 @@ impl<'a, C, A> AccountAdclientListCall<'a, C, A> where C: BorrowMut AccountAdunitPatchCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, AdUnit)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -5299,8 +5285,7 @@ impl<'a, C, A> AccountAdunitPatchCall<'a, C, A> where C: BorrowMut AccountAdclientGetCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, AdClient)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -5570,8 +5555,7 @@ impl<'a, C, A> AccountAdclientGetCall<'a, C, A> where C: BorrowMut AccountGetCall<'a, C, A> where C: BorrowMut, A: oa /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Account)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -5816,8 +5800,7 @@ impl<'a, C, A> AccountGetCall<'a, C, A> where C: BorrowMut, A: oa } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -5991,7 +5974,7 @@ impl<'a, C, A> AccountAdunitInsertCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, AdUnit)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -6072,8 +6055,7 @@ impl<'a, C, A> AccountAdunitInsertCall<'a, C, A> where C: BorrowMut AccountAdunitGetCall<'a, C, A> where C: BorrowMut, /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, AdUnit)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -6335,8 +6317,7 @@ impl<'a, C, A> AccountAdunitGetCall<'a, C, A> where C: BorrowMut, } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -6530,7 +6511,7 @@ impl<'a, C, A> AccountAdunitUpdateCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, AdUnit)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -6611,8 +6592,7 @@ impl<'a, C, A> AccountAdunitUpdateCall<'a, C, A> where C: BorrowMut CustomchannelGetCall<'a, C, A> where C: BorrowMut, /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, CustomChannel)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -6872,8 +6852,7 @@ impl<'a, C, A> CustomchannelGetCall<'a, C, A> where C: BorrowMut, } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -7050,7 +7029,7 @@ impl<'a, C, A> CustomchannelDeleteCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, CustomChannel)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -7120,8 +7099,7 @@ impl<'a, C, A> CustomchannelDeleteCall<'a, C, A> where C: BorrowMut CustomchannelUpdateCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, CustomChannel)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -7384,8 +7362,7 @@ impl<'a, C, A> CustomchannelUpdateCall<'a, C, A> where C: BorrowMut CustomchannelListCall<'a, C, A> where C: BorrowMut /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, CustomChannels)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -7643,8 +7620,7 @@ impl<'a, C, A> CustomchannelListCall<'a, C, A> where C: BorrowMut } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -7832,7 +7808,7 @@ impl<'a, C, A> CustomchannelPatchCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, CustomChannel)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -7913,8 +7889,7 @@ impl<'a, C, A> CustomchannelPatchCall<'a, C, A> where C: BorrowMut CustomchannelInsertCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, CustomChannel)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -8190,8 +8165,7 @@ impl<'a, C, A> CustomchannelInsertCall<'a, C, A> where C: BorrowMut"] description = "A complete library to interact with analytics (protocol v3)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/analytics3-cli" @@ -17,18 +17,18 @@ keywords = ["analytics", "google", "cli"] name = "analytics3" [dependencies] -hyper = "0.7" -mime = "0.1.0" -serde = ">= 0.7.0" -serde_json = ">= 0.7.0" -yup-oauth2 = ">= 0.5.4" +hyper = "0.8" +mime = "0.2.0" +serde = "0.6.0" +serde_json = "0.6.0" +yup-oauth2 = ">= 0.5.6" strsim = "0.4" yup-hyper-mock = "1.0" clap = "2.0" [build-dependencies] -syntex = { version = ">= 0.23" } -serde_codegen = { version = ">= 0.6" } +syntex = { version = "= 0.28" } +serde_codegen = { version = "= 0.6.13" } [dependencies.google-analytics3] diff --git a/gen/analytics3-cli/README.md b/gen/analytics3-cli/README.md index 3124bf662a..728780eaa2 100644 --- a/gen/analytics3-cli/README.md +++ b/gen/analytics3-cli/README.md @@ -17,14 +17,14 @@ Everything else about the *analytics* API can be found at the You can download the pre-compiled 64bit binaries for the following platforms: -* ![icon](http://megaicons.net/static/img/icons_sizes/6/140/16/ubuntu-icon.png) [ubuntu](http://dl.byronimo.de/google.rs/cli/0.3.3/ubuntu/analytics3.tar.gz) -* ![icon](http://hydra-media.cursecdn.com/wow.gamepedia.com/a/a2/Apple-icon-16x16.png?version=25ddd67ac3dd3b634478e3978b76cb74) [osx](http://dl.byronimo.de/google.rs/cli/0.3.3/osx/analytics3.tar.gz) +* ![icon](http://megaicons.net/static/img/icons_sizes/6/140/16/ubuntu-icon.png) [ubuntu](http://dl.byronimo.de/google.rs/cli/0.3.4/ubuntu/analytics3.tar.gz) +* ![icon](http://hydra-media.cursecdn.com/wow.gamepedia.com/a/a2/Apple-icon-16x16.png?version=25ddd67ac3dd3b634478e3978b76cb74) [osx](http://dl.byronimo.de/google.rs/cli/0.3.4/osx/analytics3.tar.gz) Find the source code [on github](https://github.com/Byron/google-apis-rs/tree/master/gen/analytics3-cli). # Usage -This documentation was generated from the *analytics* API at revision *20160223*. The CLI is at version *0.3.3*. +This documentation was generated from the *analytics* API at revision *20160308*. The CLI is at version *0.3.4*. ```bash analytics3 [options] diff --git a/gen/analytics3-cli/mkdocs.yml b/gen/analytics3-cli/mkdocs.yml index be1bfb13a1..c85e1c5046 100644 --- a/gen/analytics3-cli/mkdocs.yml +++ b/gen/analytics3-cli/mkdocs.yml @@ -1,4 +1,4 @@ -site_name: analytics v0.3.3+20160223 +site_name: analytics v0.3.4+20160308 site_url: http://byron.github.io/google-apis-rs/google-analytics3-cli site_description: Write integrating applications with bcore diff --git a/gen/analytics3-cli/src/cmn.rs b/gen/analytics3-cli/src/cmn.rs index 188159ee80..ae86fdef65 100644 --- a/gen/analytics3-cli/src/cmn.rs +++ b/gen/analytics3-cli/src/cmn.rs @@ -414,7 +414,7 @@ impl TokenStorage for JsonTokenStorage { Err(err) => match err.kind() { io::ErrorKind::NotFound => Ok(()), - _ => Err(json::Error::Io(err)) + _ => Err(json::Error::IoError(err)) }, Ok(_) => Ok(()), } @@ -427,7 +427,7 @@ impl TokenStorage for JsonTokenStorage { Err(serde_err) => Err(serde_err), } }, - Err(io_err) => Err(json::Error::Io(io_err)) + Err(io_err) => Err(json::Error::IoError(io_err)) } } } @@ -444,7 +444,7 @@ impl TokenStorage for JsonTokenStorage { Err(io_err) => { match io_err.kind() { io::ErrorKind::NotFound => Ok(None), - _ => Err(json::Error::Io(io_err)) + _ => Err(json::Error::IoError(io_err)) } } } @@ -683,7 +683,7 @@ pub fn application_secret_from_directory(dir: &str, = json::from_str(json_console_secret).unwrap(); match json::to_writer_pretty(&mut f, &console_secret) { Err(serde_err) => match serde_err { - json::Error::Io(err) => err, + json::Error::IoError(err) => err, _ => panic!("Unexpected serde error: {:#?}", serde_err) }, Ok(_) => continue, @@ -696,7 +696,7 @@ pub fn application_secret_from_directory(dir: &str, }, Ok(f) => { match json::de::from_reader::<_, ConsoleApplicationSecret>(f) { - Err(json::Error::Io(err)) => + Err(json::Error::IoError(err)) => return secret_io_error(err), Err(json_err) => return Err(CLIError::Configuration( diff --git a/gen/analytics3-cli/src/main.rs b/gen/analytics3-cli/src/main.rs index 5fc22d739f..1087d95256 100644 --- a/gen/analytics3-cli/src/main.rs +++ b/gen/analytics3-cli/src/main.rs @@ -3972,6 +3972,8 @@ impl<'n> Engine<'n> { "child-link.href" => Some(("childLink.href", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "child-link.type" => Some(("childLink.type", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "enhanced-e-commerce-tracking" => Some(("enhancedECommerceTracking", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "parent-link.href" => Some(("parentLink.href", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "parent-link.type" => Some(("parentLink.type", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "permissions.effective" => Some(("permissions.effective", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Vec })), "default-page" => Some(("defaultPage", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "kind" => Some(("kind", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), @@ -3980,11 +3982,10 @@ impl<'n> Engine<'n> { "created" => Some(("created", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "site-search-query-parameters" => Some(("siteSearchQueryParameters", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "website-url" => Some(("websiteUrl", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), - "parent-link.href" => Some(("parentLink.href", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), - "parent-link.type" => Some(("parentLink.type", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "starred" => Some(("starred", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), "self-link" => Some(("selfLink", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), _ => { - let suggestion = FieldCursor::did_you_mean(key, &vec!["account-id", "bot-filtering-enabled", "child-link", "created", "currency", "default-page", "e-commerce-tracking", "effective", "enhanced-e-commerce-tracking", "exclude-query-parameters", "href", "id", "internal-web-property-id", "kind", "name", "parent-link", "permissions", "self-link", "site-search-category-parameters", "site-search-query-parameters", "strip-site-search-category-parameters", "strip-site-search-query-parameters", "timezone", "type", "updated", "web-property-id", "website-url"]); + let suggestion = FieldCursor::did_you_mean(key, &vec!["account-id", "bot-filtering-enabled", "child-link", "created", "currency", "default-page", "e-commerce-tracking", "effective", "enhanced-e-commerce-tracking", "exclude-query-parameters", "href", "id", "internal-web-property-id", "kind", "name", "parent-link", "permissions", "self-link", "site-search-category-parameters", "site-search-query-parameters", "starred", "strip-site-search-category-parameters", "strip-site-search-query-parameters", "timezone", "type", "updated", "web-property-id", "website-url"]); err.issues.push(CLIError::Field(FieldError::Unknown(temp_cursor.to_string(), suggestion, value.map(|v| v.to_string())))); None } @@ -4142,6 +4143,8 @@ impl<'n> Engine<'n> { "child-link.href" => Some(("childLink.href", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "child-link.type" => Some(("childLink.type", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "enhanced-e-commerce-tracking" => Some(("enhancedECommerceTracking", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "parent-link.href" => Some(("parentLink.href", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "parent-link.type" => Some(("parentLink.type", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "permissions.effective" => Some(("permissions.effective", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Vec })), "default-page" => Some(("defaultPage", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "kind" => Some(("kind", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), @@ -4150,11 +4153,10 @@ impl<'n> Engine<'n> { "created" => Some(("created", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "site-search-query-parameters" => Some(("siteSearchQueryParameters", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "website-url" => Some(("websiteUrl", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), - "parent-link.href" => Some(("parentLink.href", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), - "parent-link.type" => Some(("parentLink.type", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "starred" => Some(("starred", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), "self-link" => Some(("selfLink", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), _ => { - let suggestion = FieldCursor::did_you_mean(key, &vec!["account-id", "bot-filtering-enabled", "child-link", "created", "currency", "default-page", "e-commerce-tracking", "effective", "enhanced-e-commerce-tracking", "exclude-query-parameters", "href", "id", "internal-web-property-id", "kind", "name", "parent-link", "permissions", "self-link", "site-search-category-parameters", "site-search-query-parameters", "strip-site-search-category-parameters", "strip-site-search-query-parameters", "timezone", "type", "updated", "web-property-id", "website-url"]); + let suggestion = FieldCursor::did_you_mean(key, &vec!["account-id", "bot-filtering-enabled", "child-link", "created", "currency", "default-page", "e-commerce-tracking", "effective", "enhanced-e-commerce-tracking", "exclude-query-parameters", "href", "id", "internal-web-property-id", "kind", "name", "parent-link", "permissions", "self-link", "site-search-category-parameters", "site-search-query-parameters", "starred", "strip-site-search-category-parameters", "strip-site-search-query-parameters", "timezone", "type", "updated", "web-property-id", "website-url"]); err.issues.push(CLIError::Field(FieldError::Unknown(temp_cursor.to_string(), suggestion, value.map(|v| v.to_string())))); None } @@ -4253,6 +4255,8 @@ impl<'n> Engine<'n> { "child-link.href" => Some(("childLink.href", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "child-link.type" => Some(("childLink.type", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "enhanced-e-commerce-tracking" => Some(("enhancedECommerceTracking", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "parent-link.href" => Some(("parentLink.href", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "parent-link.type" => Some(("parentLink.type", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "permissions.effective" => Some(("permissions.effective", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Vec })), "default-page" => Some(("defaultPage", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "kind" => Some(("kind", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), @@ -4261,11 +4265,10 @@ impl<'n> Engine<'n> { "created" => Some(("created", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "site-search-query-parameters" => Some(("siteSearchQueryParameters", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "website-url" => Some(("websiteUrl", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), - "parent-link.href" => Some(("parentLink.href", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), - "parent-link.type" => Some(("parentLink.type", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "starred" => Some(("starred", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), "self-link" => Some(("selfLink", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), _ => { - let suggestion = FieldCursor::did_you_mean(key, &vec!["account-id", "bot-filtering-enabled", "child-link", "created", "currency", "default-page", "e-commerce-tracking", "effective", "enhanced-e-commerce-tracking", "exclude-query-parameters", "href", "id", "internal-web-property-id", "kind", "name", "parent-link", "permissions", "self-link", "site-search-category-parameters", "site-search-query-parameters", "strip-site-search-category-parameters", "strip-site-search-query-parameters", "timezone", "type", "updated", "web-property-id", "website-url"]); + let suggestion = FieldCursor::did_you_mean(key, &vec!["account-id", "bot-filtering-enabled", "child-link", "created", "currency", "default-page", "e-commerce-tracking", "effective", "enhanced-e-commerce-tracking", "exclude-query-parameters", "href", "id", "internal-web-property-id", "kind", "name", "parent-link", "permissions", "self-link", "site-search-category-parameters", "site-search-query-parameters", "starred", "strip-site-search-category-parameters", "strip-site-search-query-parameters", "timezone", "type", "updated", "web-property-id", "website-url"]); err.issues.push(CLIError::Field(FieldError::Unknown(temp_cursor.to_string(), suggestion, value.map(|v| v.to_string())))); None } @@ -5414,6 +5417,7 @@ impl<'n> Engine<'n> { "child-link.href" => Some(("childLink.href", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "child-link.type" => Some(("childLink.type", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "industry-vertical" => Some(("industryVertical", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "starred" => Some(("starred", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), "parent-link.href" => Some(("parentLink.href", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "parent-link.type" => Some(("parentLink.type", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "permissions.effective" => Some(("permissions.effective", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Vec })), @@ -5421,7 +5425,7 @@ impl<'n> Engine<'n> { "self-link" => Some(("selfLink", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "account-id" => Some(("accountId", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), _ => { - let suggestion = FieldCursor::did_you_mean(key, &vec!["account-id", "child-link", "created", "default-profile-id", "effective", "href", "id", "industry-vertical", "internal-web-property-id", "kind", "level", "name", "parent-link", "permissions", "profile-count", "self-link", "type", "updated", "website-url"]); + let suggestion = FieldCursor::did_you_mean(key, &vec!["account-id", "child-link", "created", "default-profile-id", "effective", "href", "id", "industry-vertical", "internal-web-property-id", "kind", "level", "name", "parent-link", "permissions", "profile-count", "self-link", "starred", "type", "updated", "website-url"]); err.issues.push(CLIError::Field(FieldError::Unknown(temp_cursor.to_string(), suggestion, value.map(|v| v.to_string())))); None } @@ -5575,6 +5579,7 @@ impl<'n> Engine<'n> { "child-link.href" => Some(("childLink.href", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "child-link.type" => Some(("childLink.type", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "industry-vertical" => Some(("industryVertical", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "starred" => Some(("starred", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), "parent-link.href" => Some(("parentLink.href", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "parent-link.type" => Some(("parentLink.type", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "permissions.effective" => Some(("permissions.effective", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Vec })), @@ -5582,7 +5587,7 @@ impl<'n> Engine<'n> { "self-link" => Some(("selfLink", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "account-id" => Some(("accountId", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), _ => { - let suggestion = FieldCursor::did_you_mean(key, &vec!["account-id", "child-link", "created", "default-profile-id", "effective", "href", "id", "industry-vertical", "internal-web-property-id", "kind", "level", "name", "parent-link", "permissions", "profile-count", "self-link", "type", "updated", "website-url"]); + let suggestion = FieldCursor::did_you_mean(key, &vec!["account-id", "child-link", "created", "default-profile-id", "effective", "href", "id", "industry-vertical", "internal-web-property-id", "kind", "level", "name", "parent-link", "permissions", "profile-count", "self-link", "starred", "type", "updated", "website-url"]); err.issues.push(CLIError::Field(FieldError::Unknown(temp_cursor.to_string(), suggestion, value.map(|v| v.to_string())))); None } @@ -5677,6 +5682,7 @@ impl<'n> Engine<'n> { "child-link.href" => Some(("childLink.href", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "child-link.type" => Some(("childLink.type", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "industry-vertical" => Some(("industryVertical", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "starred" => Some(("starred", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), "parent-link.href" => Some(("parentLink.href", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "parent-link.type" => Some(("parentLink.type", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "permissions.effective" => Some(("permissions.effective", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Vec })), @@ -5684,7 +5690,7 @@ impl<'n> Engine<'n> { "self-link" => Some(("selfLink", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "account-id" => Some(("accountId", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), _ => { - let suggestion = FieldCursor::did_you_mean(key, &vec!["account-id", "child-link", "created", "default-profile-id", "effective", "href", "id", "industry-vertical", "internal-web-property-id", "kind", "level", "name", "parent-link", "permissions", "profile-count", "self-link", "type", "updated", "website-url"]); + let suggestion = FieldCursor::did_you_mean(key, &vec!["account-id", "child-link", "created", "default-profile-id", "effective", "href", "id", "industry-vertical", "internal-web-property-id", "kind", "level", "name", "parent-link", "permissions", "profile-count", "self-link", "starred", "type", "updated", "website-url"]); err.issues.push(CLIError::Field(FieldError::Unknown(temp_cursor.to_string(), suggestion, value.map(|v| v.to_string())))); None } @@ -6156,6 +6162,8 @@ impl<'n> Engine<'n> { "profile.child-link.href" => Some(("profile.childLink.href", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "profile.child-link.type" => Some(("profile.childLink.type", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "profile.enhanced-e-commerce-tracking" => Some(("profile.enhancedECommerceTracking", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "profile.parent-link.href" => Some(("profile.parentLink.href", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "profile.parent-link.type" => Some(("profile.parentLink.type", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "profile.permissions.effective" => Some(("profile.permissions.effective", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Vec })), "profile.default-page" => Some(("profile.defaultPage", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "profile.kind" => Some(("profile.kind", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), @@ -6164,8 +6172,7 @@ impl<'n> Engine<'n> { "profile.created" => Some(("profile.created", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "profile.site-search-query-parameters" => Some(("profile.siteSearchQueryParameters", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "profile.website-url" => Some(("profile.websiteUrl", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), - "profile.parent-link.href" => Some(("profile.parentLink.href", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), - "profile.parent-link.type" => Some(("profile.parentLink.type", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "profile.starred" => Some(("profile.starred", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), "profile.self-link" => Some(("profile.selfLink", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "account.kind" => Some(("account.kind", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "account.name" => Some(("account.name", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), @@ -6173,6 +6180,7 @@ impl<'n> Engine<'n> { "account.updated" => Some(("account.updated", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "account.child-link.href" => Some(("account.childLink.href", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "account.child-link.type" => Some(("account.childLink.type", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "account.starred" => Some(("account.starred", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), "account.id" => Some(("account.id", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "account.self-link" => Some(("account.selfLink", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "account.permissions.effective" => Some(("account.permissions.effective", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Vec })), @@ -6188,6 +6196,7 @@ impl<'n> Engine<'n> { "webproperty.child-link.href" => Some(("webproperty.childLink.href", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "webproperty.child-link.type" => Some(("webproperty.childLink.type", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "webproperty.industry-vertical" => Some(("webproperty.industryVertical", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "webproperty.starred" => Some(("webproperty.starred", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), "webproperty.parent-link.href" => Some(("webproperty.parentLink.href", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "webproperty.parent-link.type" => Some(("webproperty.parentLink.type", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "webproperty.permissions.effective" => Some(("webproperty.permissions.effective", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Vec })), @@ -6198,7 +6207,7 @@ impl<'n> Engine<'n> { "redirect-uri" => Some(("redirectUri", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "id" => Some(("id", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), _ => { - let suggestion = FieldCursor::did_you_mean(key, &vec!["account", "account-id", "bot-filtering-enabled", "child-link", "created", "currency", "default-page", "default-profile-id", "e-commerce-tracking", "effective", "enhanced-e-commerce-tracking", "exclude-query-parameters", "href", "id", "industry-vertical", "internal-web-property-id", "kind", "level", "name", "parent-link", "permissions", "profile", "profile-count", "redirect-uri", "self-link", "site-search-category-parameters", "site-search-query-parameters", "strip-site-search-category-parameters", "strip-site-search-query-parameters", "timezone", "type", "updated", "web-property-id", "webproperty", "website-url"]); + let suggestion = FieldCursor::did_you_mean(key, &vec!["account", "account-id", "bot-filtering-enabled", "child-link", "created", "currency", "default-page", "default-profile-id", "e-commerce-tracking", "effective", "enhanced-e-commerce-tracking", "exclude-query-parameters", "href", "id", "industry-vertical", "internal-web-property-id", "kind", "level", "name", "parent-link", "permissions", "profile", "profile-count", "redirect-uri", "self-link", "site-search-category-parameters", "site-search-query-parameters", "starred", "strip-site-search-category-parameters", "strip-site-search-query-parameters", "timezone", "type", "updated", "web-property-id", "webproperty", "website-url"]); err.issues.push(CLIError::Field(FieldError::Unknown(temp_cursor.to_string(), suggestion, value.map(|v| v.to_string())))); None } @@ -7774,7 +7783,7 @@ fn main() { Some(false)), ]), ("goals-patch", - Some(r##"Updates an existing view (profile). This method supports patch semantics."##), + Some(r##"Updates an existing goal. This method supports patch semantics."##), "Details at http://byron.github.io/google-apis-rs/google_analytics3_cli/management_goals-patch", vec![ (Some(r##"account-id"##), @@ -7820,7 +7829,7 @@ fn main() { Some(false)), ]), ("goals-update", - Some(r##"Updates an existing view (profile)."##), + Some(r##"Updates an existing goal."##), "Details at http://byron.github.io/google-apis-rs/google_analytics3_cli/management_goals-update", vec![ (Some(r##"account-id"##), @@ -9311,8 +9320,8 @@ fn main() { let mut app = App::new("analytics3") .author("Sebastian Thiel ") - .version("0.3.3+20160223") - .about("View and manage your Google Analytics data") + .version("0.3.4+20160308") + .about("Views and manages your Google Analytics data.") .after_help("All documentation details can be found at http://byron.github.io/google-apis-rs/google_analytics3_cli") .arg(Arg::with_name("url") .long("scope") diff --git a/gen/analytics3/Cargo.toml b/gen/analytics3/Cargo.toml index d97bb174e5..01f479bb8d 100644 --- a/gen/analytics3/Cargo.toml +++ b/gen/analytics3/Cargo.toml @@ -4,7 +4,7 @@ [package] name = "google-analytics3" -version = "0.1.12+20160223" +version = "0.1.13+20160308" authors = ["Sebastian Thiel "] description = "A complete library to interact with analytics (protocol v3)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/analytics3" @@ -16,14 +16,14 @@ build = "src/build.rs" [dependencies] -hyper = "0.7" -mime = "0.1.0" -serde = ">= 0.7.0" -serde_json = ">= 0.7.0" -yup-oauth2 = ">= 0.5.4" +hyper = "0.8" +mime = "0.2.0" +serde = "0.6.0" +serde_json = "0.6.0" +yup-oauth2 = ">= 0.5.6" url = ">= 0.5" [build-dependencies] -syntex = { version = ">= 0.23" } -serde_codegen = { version = ">= 0.6" } +syntex = { version = "= 0.28" } +serde_codegen = { version = "= 0.6.13" } diff --git a/gen/analytics3/README.md b/gen/analytics3/README.md index fb5da19e47..abc4b1c225 100644 --- a/gen/analytics3/README.md +++ b/gen/analytics3/README.md @@ -5,7 +5,7 @@ DO NOT EDIT ! --> The `google-analytics3` library allows access to all features of the *Google analytics* service. -This documentation was generated from *analytics* crate version *0.1.12+20160223*, where *20160223* is the exact revision of the *analytics:v3* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.12*. +This documentation was generated from *analytics* crate version *0.1.13+20160308*, where *20160308* is the exact revision of the *analytics:v3* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.13*. Everything else about the *analytics* *v3* API can be found at the [official documentation site](https://developers.google.com/analytics/). diff --git a/gen/analytics3/src/cmn.rs b/gen/analytics3/src/cmn.rs index 87b91a8986..c69621da55 100644 --- a/gen/analytics3/src/cmn.rs +++ b/gen/analytics3/src/cmn.rs @@ -12,7 +12,7 @@ use mime::{Mime, TopLevel, SubLevel, Attr, Value}; use oauth2::{TokenType, Retry, self}; use hyper; use hyper::header::{ContentType, ContentLength, Headers, UserAgent, Authorization, Header, - HeaderFormat}; + HeaderFormat, Bearer}; use hyper::http::h1::LINE_ENDING; use hyper::method::Method; use hyper::status::StatusCode; @@ -634,7 +634,7 @@ pub struct ResumableUploadHelper<'a, A: 'a> { pub start_at: Option, pub auth: &'a mut A, pub user_agent: &'a str, - pub auth_header: Authorization, + pub auth_header: Authorization, pub url: &'a str, pub reader: &'a mut ReadSeek, pub media_type: Mime, diff --git a/gen/analytics3/src/lib.rs b/gen/analytics3/src/lib.rs index 339db2b769..9c8ae99794 100644 --- a/gen/analytics3/src/lib.rs +++ b/gen/analytics3/src/lib.rs @@ -2,7 +2,7 @@ // This file was generated automatically from 'src/mako/api/lib.rs.mako' // DO NOT EDIT ! -//! This documentation was generated from *analytics* crate version *0.1.12+20160223*, where *20160223* is the exact revision of the *analytics:v3* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.12*. +//! This documentation was generated from *analytics* crate version *0.1.13+20160308*, where *20160308* is the exact revision of the *analytics:v3* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.13*. //! //! Everything else about the *analytics* *v3* API can be found at the //! [official documentation site](https://developers.google.com/analytics/). diff --git a/gen/analytics3/src/lib.rs.in b/gen/analytics3/src/lib.rs.in index ac63e41a16..28fb819667 100644 --- a/gen/analytics3/src/lib.rs.in +++ b/gen/analytics3/src/lib.rs.in @@ -153,7 +153,7 @@ impl<'a, C, A> Analytics Analytics { client: RefCell::new(client), auth: RefCell::new(authenticator), - _user_agent: "google-api-rust-client/0.1.12".to_string(), + _user_agent: "google-api-rust-client/0.1.13".to_string(), } } @@ -171,7 +171,7 @@ impl<'a, C, A> Analytics } /// Set the user-agent header field to use in all requests to the server. - /// It defaults to `google-api-rust-client/0.1.12`. + /// It defaults to `google-api-rust-client/0.1.13`. /// /// Returns the previously set user-agent. pub fn user_agent(&mut self, agent_name: String) -> String { @@ -611,6 +611,8 @@ pub struct Account { /// Child link for an account entry. Points to the list of web properties for this account. #[serde(rename="childLink")] pub child_link: Option, + /// Indicates whether this account is starred or not. + pub starred: Option, /// Account ID. pub id: Option, /// Link for this account. @@ -910,20 +912,22 @@ impl Part for FilterAdvancedDetails {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct WebPropertySummary { - /// Website url for this web property. - #[serde(rename="websiteUrl")] - pub website_url: Option, /// Resource type for Analytics WebPropertySummary. pub kind: Option, /// Web property name. pub name: Option, /// Level for this web property. Possible values are STANDARD or PREMIUM. pub level: Option, + /// List of profiles under this web property. + pub profiles: Option>, + /// Website url for this web property. + #[serde(rename="websiteUrl")] + pub website_url: Option, /// Internal ID for this web property. #[serde(rename="internalWebPropertyId")] pub internal_web_property_id: Option, - /// List of profiles under this web property. - pub profiles: Option>, + /// Indicates whether this web property is starred or not. + pub starred: Option, /// Web property ID of the form UA-XXXXX-YY. pub id: Option, } @@ -1418,13 +1422,15 @@ impl ResponseResult for ProfileFilterLink {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct AccountSummary { - /// Resource type for Analytics AccountSummary. - pub kind: Option, + /// Indicates whether this account is starred or not. + pub starred: Option, /// List of web properties under this account. #[serde(rename="webProperties")] pub web_properties: Option>, /// Account ID. pub id: Option, + /// Resource type for Analytics AccountSummary. + pub kind: Option, /// Account name. pub name: Option, } @@ -1463,8 +1469,9 @@ pub struct Webproperty { /// The industry vertical/category selected for this web property. #[serde(rename="industryVertical")] pub industry_vertical: Option, - /// Web property ID of the form UA-XXXXX-YY. - pub id: Option, + /// Parent link for this web property. Points to the account to which this web property belongs. + #[serde(rename="parentLink")] + pub parent_link: Option, /// Account ID to which this web property belongs. #[serde(rename="accountId")] pub account_id: Option, @@ -1476,12 +1483,13 @@ pub struct Webproperty { pub created: Option, /// Level for this web property. Possible values are STANDARD or PREMIUM. pub level: Option, + /// Web property ID of the form UA-XXXXX-YY. + pub id: Option, /// Website url for this web property. #[serde(rename="websiteUrl")] pub website_url: Option, - /// Parent link for this web property. Points to the account to which this web property belongs. - #[serde(rename="parentLink")] - pub parent_link: Option, + /// Indicates whether this web property is starred or not. + pub starred: Option, /// Permissions the user has for this web property. pub permissions: Option, /// Link for this web property. @@ -2489,13 +2497,15 @@ impl Part for McfDataRows {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ProfileSummary { - /// Resource type for Analytics ProfileSummary. - pub kind: Option, + /// Indicates whether this view (profile) is starred or not. + pub starred: Option, /// View (Profile) type. Supported types: WEB or APP. #[serde(rename="type")] pub type_: Option, /// View (profile) ID. pub id: Option, + /// Resource type for Analytics ProfileSummary. + pub kind: Option, /// View (profile) name. pub name: Option, } @@ -2677,6 +2687,8 @@ pub struct Profile { /// The query parameters that are excluded from this view (profile). #[serde(rename="excludeQueryParameters")] pub exclude_query_parameters: Option, + /// Indicates whether this view (profile) is starred or not. + pub starred: Option, /// The currency type associated with this view (profile), defaults to USD. The supported values are: /// ARS, AUD, BGN, BRL, CAD, CHF, CNY, CZK, DKK, EUR, GBP, HKD, HUF, IDR, INR, JPY, KRW, LTL, MXN, NOK, NZD, PHP, PLN, RUB, SEK, THB, TRY, TWD, USD, VND, ZAR pub currency: Option, @@ -3650,7 +3662,7 @@ impl<'a, C, A> ManagementMethods<'a, C, A> { /// Create a builder to help you perform the following task: /// - /// Updates an existing view (profile). This method supports patch semantics. + /// Updates an existing goal. This method supports patch semantics. /// /// # Arguments /// @@ -4180,7 +4192,7 @@ impl<'a, C, A> ManagementMethods<'a, C, A> { /// Create a builder to help you perform the following task: /// - /// Updates an existing view (profile). + /// Updates an existing goal. /// /// # Arguments /// @@ -5020,7 +5032,7 @@ impl<'a, C, A> ManagementWebpropertyInsertCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, Webproperty)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -5100,8 +5112,7 @@ impl<'a, C, A> ManagementWebpropertyInsertCall<'a, C, A> where C: BorrowMut ManagementProfileGetCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, Profile)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -5353,8 +5364,7 @@ impl<'a, C, A> ManagementProfileGetCall<'a, C, A> where C: BorrowMut ManagementAccountListCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, Accounts)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -5596,8 +5606,7 @@ impl<'a, C, A> ManagementAccountListCall<'a, C, A> where C: BorrowMut ManagementProfileFilterLinkPatchCall<'a, C, A> where C: BorrowMut /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, ProfileFilterLink)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -5860,8 +5869,7 @@ impl<'a, C, A> ManagementProfileFilterLinkPatchCall<'a, C, A> where C: BorrowMut } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -6072,7 +6080,7 @@ impl<'a, C, A> ManagementWebpropertyUserLinkDeleteCall<'a, C, A> where C: Borrow /// Perform the operation you have build so far. pub fn doit(mut self) -> Result { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -6142,8 +6150,7 @@ impl<'a, C, A> ManagementWebpropertyUserLinkDeleteCall<'a, C, A> where C: Borrow } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Delete, &url) @@ -6322,7 +6329,7 @@ impl<'a, C, A> ManagementProfileUserLinkDeleteCall<'a, C, A> where C: BorrowMut< /// Perform the operation you have build so far. pub fn doit(mut self) -> Result { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -6393,8 +6400,7 @@ impl<'a, C, A> ManagementProfileUserLinkDeleteCall<'a, C, A> where C: BorrowMut< } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Delete, &url) @@ -6590,7 +6596,7 @@ impl<'a, C, A> ManagementProfileUserLinkUpdateCall<'a, C, A> where C: BorrowMut< /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, EntityUserLink)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -6673,8 +6679,7 @@ impl<'a, C, A> ManagementProfileUserLinkUpdateCall<'a, C, A> where C: BorrowMut< } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -6890,7 +6895,7 @@ impl<'a, C, A> ManagementFilterInsertCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, Filter)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -6970,8 +6975,7 @@ impl<'a, C, A> ManagementFilterInsertCall<'a, C, A> where C: BorrowMut ManagementAccountUserLinkUpdateCall<'a, C, A> where C: BorrowMut< /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, EntityUserLink)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -7239,8 +7243,7 @@ impl<'a, C, A> ManagementAccountUserLinkUpdateCall<'a, C, A> where C: BorrowMut< } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -7437,7 +7440,7 @@ impl<'a, C, A> ManagementWebpropertyUpdateCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, Webproperty)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -7518,8 +7521,7 @@ impl<'a, C, A> ManagementWebpropertyUpdateCall<'a, C, A> where C: BorrowMut ManagementWebpropertyUserLinkUpdateCall<'a, C, A> where C: Borrow /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, EntityUserLink)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -7799,8 +7801,7 @@ impl<'a, C, A> ManagementWebpropertyUserLinkUpdateCall<'a, C, A> where C: Borrow } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -8008,7 +8009,7 @@ impl<'a, C, A> ManagementUnsampledReportInsertCall<'a, C, A> where C: BorrowMut< /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, UnsampledReport)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -8090,8 +8091,7 @@ impl<'a, C, A> ManagementUnsampledReportInsertCall<'a, C, A> where C: BorrowMut< } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -8292,7 +8292,7 @@ impl<'a, C, A> ManagementCustomMetricGetCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, CustomMetric)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -8363,8 +8363,7 @@ impl<'a, C, A> ManagementCustomMetricGetCall<'a, C, A> where C: BorrowMut ManagementUploadGetCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, Upload)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -8625,8 +8624,7 @@ impl<'a, C, A> ManagementUploadGetCall<'a, C, A> where C: BorrowMut ManagementWebPropertyAdWordsLinkGetCall<'a, C, A> where C: Borrow /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, EntityAdWordsLink)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -8895,8 +8893,7 @@ impl<'a, C, A> ManagementWebPropertyAdWordsLinkGetCall<'a, C, A> where C: Borrow } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -9087,7 +9084,7 @@ impl<'a, C, A> ManagementWebpropertyUserLinkListCall<'a, C, A> where C: BorrowMu /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, EntityUserLinks)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -9163,8 +9160,7 @@ impl<'a, C, A> ManagementWebpropertyUserLinkListCall<'a, C, A> where C: BorrowMu } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -9364,7 +9360,7 @@ impl<'a, C, A> ManagementProfileFilterLinkUpdateCall<'a, C, A> where C: BorrowMu /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, ProfileFilterLink)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -9447,8 +9443,7 @@ impl<'a, C, A> ManagementProfileFilterLinkUpdateCall<'a, C, A> where C: BorrowMu } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -9660,7 +9655,7 @@ impl<'a, C, A> ManagementExperimentGetCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, Experiment)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -9732,8 +9727,7 @@ impl<'a, C, A> ManagementExperimentGetCall<'a, C, A> where C: BorrowMut ManagementCustomDimensionUpdateCall<'a, C, A> where C: BorrowMut< /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, CustomDimension)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -10025,8 +10019,7 @@ impl<'a, C, A> ManagementCustomDimensionUpdateCall<'a, C, A> where C: BorrowMut< } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -10235,7 +10228,7 @@ impl<'a, C, A> ManagementUnsampledReportGetCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, UnsampledReport)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -10307,8 +10300,7 @@ impl<'a, C, A> ManagementUnsampledReportGetCall<'a, C, A> where C: BorrowMut ManagementProfileFilterLinkInsertCall<'a, C, A> where C: BorrowMu /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, ProfileFilterLink)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -10595,8 +10587,7 @@ impl<'a, C, A> ManagementProfileFilterLinkInsertCall<'a, C, A> where C: BorrowMu } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -10803,7 +10794,7 @@ impl<'a, C, A> ManagementFilterUpdateCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, Filter)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -10884,8 +10875,7 @@ impl<'a, C, A> ManagementFilterUpdateCall<'a, C, A> where C: BorrowMut ManagementProfileFilterLinkDeleteCall<'a, C, A> where C: BorrowMu /// Perform the operation you have build so far. pub fn doit(mut self) -> Result { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -11148,8 +11138,7 @@ impl<'a, C, A> ManagementProfileFilterLinkDeleteCall<'a, C, A> where C: BorrowMu } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Delete, &url) @@ -11338,7 +11327,7 @@ impl<'a, C, A> ManagementSegmentListCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, Segments)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -11391,8 +11380,7 @@ impl<'a, C, A> ManagementSegmentListCall<'a, C, A> where C: BorrowMut ManagementProfileDeleteCall<'a, C, A> where C: BorrowMut Result { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -11634,8 +11622,7 @@ impl<'a, C, A> ManagementProfileDeleteCall<'a, C, A> where C: BorrowMut ManagementProfileDeleteCall<'a, C, A> where C: BorrowMut ManagementGoalPatchCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, Goal)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -11904,8 +11891,7 @@ impl<'a, C, A> ManagementGoalPatchCall<'a, C, A> where C: BorrowMut ManagementCustomDimensionPatchCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, CustomDimension)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -12210,8 +12196,7 @@ impl<'a, C, A> ManagementCustomDimensionPatchCall<'a, C, A> where C: BorrowMut ManagementExperimentPatchCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, Experiment)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -12510,8 +12495,7 @@ impl<'a, C, A> ManagementExperimentPatchCall<'a, C, A> where C: BorrowMut ManagementExperimentListCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, Experiments)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -12803,8 +12787,7 @@ impl<'a, C, A> ManagementExperimentListCall<'a, C, A> where C: BorrowMut ManagementProfileListCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, Profiles)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -13085,8 +13068,7 @@ impl<'a, C, A> ManagementProfileListCall<'a, C, A> where C: BorrowMut ManagementGoalListCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, Goals)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -13359,8 +13341,7 @@ impl<'a, C, A> ManagementGoalListCall<'a, C, A> where C: BorrowMut ManagementGoalInsertCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, Goal)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -13651,8 +13632,7 @@ impl<'a, C, A> ManagementGoalInsertCall<'a, C, A> where C: BorrowMut ManagementCustomMetricPatchCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, CustomMetric)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -13947,8 +13927,7 @@ impl<'a, C, A> ManagementCustomMetricPatchCall<'a, C, A> where C: BorrowMut ManagementUploadUploadDataCall<'a, C, A> where C: BorrowMut(mut self, mut reader: RS, reader_mime_type: mime::Mime, protocol: &'static str) -> Result<(hyper::client::Response, Upload)> where RS: ReadSeek { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -14240,8 +14219,7 @@ impl<'a, C, A> ManagementUploadUploadDataCall<'a, C, A> where C: BorrowMut ManagementAccountUserLinkInsertCall<'a, C, A> where C: BorrowMut< /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, EntityUserLink)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -14610,8 +14588,7 @@ impl<'a, C, A> ManagementAccountUserLinkInsertCall<'a, C, A> where C: BorrowMut< } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -14798,7 +14775,7 @@ impl<'a, C, A> ManagementWebpropertyUserLinkInsertCall<'a, C, A> where C: Borrow /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, EntityUserLink)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -14879,8 +14856,7 @@ impl<'a, C, A> ManagementWebpropertyUserLinkInsertCall<'a, C, A> where C: Borrow } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -15072,7 +15048,7 @@ impl<'a, C, A> ManagementExperimentDeleteCall<'a, C, A> where C: BorrowMut Result { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -15143,8 +15119,7 @@ impl<'a, C, A> ManagementExperimentDeleteCall<'a, C, A> where C: BorrowMut ManagementUnsampledReportDeleteCall<'a, C, A> where C: BorrowMut< /// Perform the operation you have build so far. pub fn doit(mut self) -> Result { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -15404,8 +15379,7 @@ impl<'a, C, A> ManagementUnsampledReportDeleteCall<'a, C, A> where C: BorrowMut< } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Delete, &url) @@ -15600,7 +15574,7 @@ impl<'a, C, A> ManagementProfilePatchCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, Profile)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -15682,8 +15656,7 @@ impl<'a, C, A> ManagementProfilePatchCall<'a, C, A> where C: BorrowMut ManagementFilterGetCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, Filter)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -15953,8 +15926,7 @@ impl<'a, C, A> ManagementFilterGetCall<'a, C, A> where C: BorrowMut ManagementWebPropertyAdWordsLinkListCall<'a, C, A> where C: Borro /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, EntityAdWordsLinks)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -16211,8 +16183,7 @@ impl<'a, C, A> ManagementWebPropertyAdWordsLinkListCall<'a, C, A> where C: Borro } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -16405,7 +16376,7 @@ impl<'a, C, A> ManagementAccountSummaryListCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, AccountSummaries)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -16458,8 +16429,7 @@ impl<'a, C, A> ManagementAccountSummaryListCall<'a, C, A> where C: BorrowMut ManagementCustomDimensionListCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, CustomDimensions)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -16710,8 +16680,7 @@ impl<'a, C, A> ManagementCustomDimensionListCall<'a, C, A> where C: BorrowMut ManagementUploadListCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, Uploads)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -16984,8 +16953,7 @@ impl<'a, C, A> ManagementUploadListCall<'a, C, A> where C: BorrowMut ManagementProfileUserLinkListCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, EntityUserLinks)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -17268,8 +17236,7 @@ impl<'a, C, A> ManagementProfileUserLinkListCall<'a, C, A> where C: BorrowMut ManagementAccountUserLinkListCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, EntityUserLinks)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -17548,8 +17515,7 @@ impl<'a, C, A> ManagementAccountUserLinkListCall<'a, C, A> where C: BorrowMut ManagementCustomMetricUpdateCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, CustomMetric)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -17825,8 +17791,7 @@ impl<'a, C, A> ManagementCustomMetricUpdateCall<'a, C, A> where C: BorrowMut ManagementUploadDeleteUploadDataCall<'a, C, A> where C: BorrowMut /// Perform the operation you have build so far. pub fn doit(mut self) -> Result { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -18122,8 +18087,7 @@ impl<'a, C, A> ManagementUploadDeleteUploadDataCall<'a, C, A> where C: BorrowMut } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -18322,7 +18286,7 @@ impl<'a, C, A> ManagementExperimentUpdateCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, Experiment)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -18405,8 +18369,7 @@ impl<'a, C, A> ManagementExperimentUpdateCall<'a, C, A> where C: BorrowMut ManagementExperimentUpdateCall<'a, C, A> where C: BorrowMut ManagementGoalUpdateCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, Goal)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -18708,8 +18671,7 @@ impl<'a, C, A> ManagementGoalUpdateCall<'a, C, A> where C: BorrowMut ManagementCustomDataSourceListCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, CustomDataSources)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -18999,8 +18961,7 @@ impl<'a, C, A> ManagementCustomDataSourceListCall<'a, C, A> where C: BorrowMut ManagementCustomMetricListCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, CustomMetrics)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -19271,8 +19232,7 @@ impl<'a, C, A> ManagementCustomMetricListCall<'a, C, A> where C: BorrowMut ManagementUnsampledReportListCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, UnsampledReports)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -19545,8 +19505,7 @@ impl<'a, C, A> ManagementUnsampledReportListCall<'a, C, A> where C: BorrowMut ManagementWebpropertyGetCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, Webproperty)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -19817,8 +19776,7 @@ impl<'a, C, A> ManagementWebpropertyGetCall<'a, C, A> where C: BorrowMut ManagementExperimentInsertCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, Experiment)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -20085,8 +20043,7 @@ impl<'a, C, A> ManagementExperimentInsertCall<'a, C, A> where C: BorrowMut ManagementCustomDimensionGetCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, CustomDimension)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -20358,8 +20315,7 @@ impl<'a, C, A> ManagementCustomDimensionGetCall<'a, C, A> where C: BorrowMut ManagementProfileFilterLinkListCall<'a, C, A> where C: BorrowMut< /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, ProfileFilterLinks)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -20628,8 +20584,7 @@ impl<'a, C, A> ManagementProfileFilterLinkListCall<'a, C, A> where C: BorrowMut< } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -20837,7 +20792,7 @@ impl<'a, C, A> ManagementWebpropertyPatchCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, Webproperty)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -20918,8 +20873,7 @@ impl<'a, C, A> ManagementWebpropertyPatchCall<'a, C, A> where C: BorrowMut ManagementCustomDimensionInsertCall<'a, C, A> where C: BorrowMut< /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, CustomDimension)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -21197,8 +21151,7 @@ impl<'a, C, A> ManagementCustomDimensionInsertCall<'a, C, A> where C: BorrowMut< } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -21395,7 +21348,7 @@ impl<'a, C, A> ManagementCustomMetricInsertCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, CustomMetric)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -21476,8 +21429,7 @@ impl<'a, C, A> ManagementCustomMetricInsertCall<'a, C, A> where C: BorrowMut ManagementProfileUserLinkInsertCall<'a, C, A> where C: BorrowMut< /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, EntityUserLink)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -21757,8 +21709,7 @@ impl<'a, C, A> ManagementProfileUserLinkInsertCall<'a, C, A> where C: BorrowMut< } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -21961,7 +21912,7 @@ impl<'a, C, A> ManagementWebpropertyListCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, Webproperties)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -22036,8 +21987,7 @@ impl<'a, C, A> ManagementWebpropertyListCall<'a, C, A> where C: BorrowMut ManagementWebPropertyAdWordsLinkInsertCall<'a, C, A> where C: Bor /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, EntityAdWordsLink)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -22306,8 +22256,7 @@ impl<'a, C, A> ManagementWebPropertyAdWordsLinkInsertCall<'a, C, A> where C: Bor } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -22505,7 +22454,7 @@ impl<'a, C, A> ManagementWebPropertyAdWordsLinkPatchCall<'a, C, A> where C: Borr /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, EntityAdWordsLink)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -22587,8 +22536,7 @@ impl<'a, C, A> ManagementWebPropertyAdWordsLinkPatchCall<'a, C, A> where C: Borr } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -22790,7 +22738,7 @@ impl<'a, C, A> ManagementGoalGetCall<'a, C, A> where C: BorrowMut /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Goal)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -22862,8 +22810,7 @@ impl<'a, C, A> ManagementGoalGetCall<'a, C, A> where C: BorrowMut } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -23061,7 +23008,7 @@ impl<'a, C, A> ManagementWebPropertyAdWordsLinkDeleteCall<'a, C, A> where C: Bor /// Perform the operation you have build so far. pub fn doit(mut self) -> Result { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -23131,8 +23078,7 @@ impl<'a, C, A> ManagementWebPropertyAdWordsLinkDeleteCall<'a, C, A> where C: Bor } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Delete, &url) @@ -23317,7 +23263,7 @@ impl<'a, C, A> ManagementWebPropertyAdWordsLinkUpdateCall<'a, C, A> where C: Bor /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, EntityAdWordsLink)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -23399,8 +23345,7 @@ impl<'a, C, A> ManagementWebPropertyAdWordsLinkUpdateCall<'a, C, A> where C: Bor } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -23607,7 +23552,7 @@ impl<'a, C, A> ManagementFilterPatchCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, Filter)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -23688,8 +23633,7 @@ impl<'a, C, A> ManagementFilterPatchCall<'a, C, A> where C: BorrowMut ManagementFilterListCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, Filters)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -23957,8 +23901,7 @@ impl<'a, C, A> ManagementFilterListCall<'a, C, A> where C: BorrowMut ManagementFilterDeleteCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, Filter)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -24209,8 +24152,7 @@ impl<'a, C, A> ManagementFilterDeleteCall<'a, C, A> where C: BorrowMut ManagementProfileInsertCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, Profile)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -24475,8 +24417,7 @@ impl<'a, C, A> ManagementProfileInsertCall<'a, C, A> where C: BorrowMut ManagementAccountUserLinkDeleteCall<'a, C, A> where C: BorrowMut< /// Perform the operation you have build so far. pub fn doit(mut self) -> Result { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -24735,8 +24676,7 @@ impl<'a, C, A> ManagementAccountUserLinkDeleteCall<'a, C, A> where C: BorrowMut< } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Delete, &url) @@ -24911,7 +24851,7 @@ impl<'a, C, A> ManagementProfileUpdateCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, Profile)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -24993,8 +24933,7 @@ impl<'a, C, A> ManagementProfileUpdateCall<'a, C, A> where C: BorrowMut ManagementProfileFilterLinkGetCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, ProfileFilterLink)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -25268,8 +25207,7 @@ impl<'a, C, A> ManagementProfileFilterLinkGetCall<'a, C, A> where C: BorrowMut DataMcfGetCall<'a, C, A> where C: BorrowMut, A: oa /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, McfData)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -25549,8 +25487,7 @@ impl<'a, C, A> DataMcfGetCall<'a, C, A> where C: BorrowMut, A: oa } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -25809,7 +25746,7 @@ impl<'a, C, A> DataGaGetCall<'a, C, A> where C: BorrowMut, A: oau /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, GaData)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -25887,8 +25824,7 @@ impl<'a, C, A> DataGaGetCall<'a, C, A> where C: BorrowMut, A: oau } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -26156,7 +26092,7 @@ impl<'a, C, A> DataRealtimeGetCall<'a, C, A> where C: BorrowMut, /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, RealtimeData)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -26217,8 +26153,7 @@ impl<'a, C, A> DataRealtimeGetCall<'a, C, A> where C: BorrowMut, } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -26428,7 +26363,7 @@ impl<'a, C, A> ProvisioningCreateAccountTicketCall<'a, C, A> where C: BorrowMut< /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, AccountTicket)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -26486,8 +26421,7 @@ impl<'a, C, A> ProvisioningCreateAccountTicketCall<'a, C, A> where C: BorrowMut< } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -26656,7 +26590,7 @@ impl<'a, C, A> MetadataColumnListCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, Columns)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -26725,8 +26659,7 @@ impl<'a, C, A> MetadataColumnListCall<'a, C, A> where C: BorrowMut"] description = "A complete library to interact with Android Enterprise (protocol v1)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/androidenterprise1-cli" @@ -17,18 +17,18 @@ keywords = ["androidenterprise", "google", "cli"] name = "androidenterprise1" [dependencies] -hyper = "0.7" -mime = "0.1.0" -serde = ">= 0.7.0" -serde_json = ">= 0.7.0" -yup-oauth2 = ">= 0.5.4" +hyper = "0.8" +mime = "0.2.0" +serde = "0.6.0" +serde_json = "0.6.0" +yup-oauth2 = ">= 0.5.6" strsim = "0.4" yup-hyper-mock = "1.0" clap = "2.0" [build-dependencies] -syntex = { version = ">= 0.23" } -serde_codegen = { version = ">= 0.6" } +syntex = { version = "= 0.28" } +serde_codegen = { version = "= 0.6.13" } [dependencies.google-androidenterprise1] diff --git a/gen/androidenterprise1-cli/README.md b/gen/androidenterprise1-cli/README.md index 327bce810b..829c8bf077 100644 --- a/gen/androidenterprise1-cli/README.md +++ b/gen/androidenterprise1-cli/README.md @@ -17,14 +17,14 @@ Everything else about the *Android Enterprise* API can be found at the You can download the pre-compiled 64bit binaries for the following platforms: -* ![icon](http://megaicons.net/static/img/icons_sizes/6/140/16/ubuntu-icon.png) [ubuntu](http://dl.byronimo.de/google.rs/cli/0.3.3/ubuntu/androidenterprise1.tar.gz) -* ![icon](http://hydra-media.cursecdn.com/wow.gamepedia.com/a/a2/Apple-icon-16x16.png?version=25ddd67ac3dd3b634478e3978b76cb74) [osx](http://dl.byronimo.de/google.rs/cli/0.3.3/osx/androidenterprise1.tar.gz) +* ![icon](http://megaicons.net/static/img/icons_sizes/6/140/16/ubuntu-icon.png) [ubuntu](http://dl.byronimo.de/google.rs/cli/0.3.4/ubuntu/androidenterprise1.tar.gz) +* ![icon](http://hydra-media.cursecdn.com/wow.gamepedia.com/a/a2/Apple-icon-16x16.png?version=25ddd67ac3dd3b634478e3978b76cb74) [osx](http://dl.byronimo.de/google.rs/cli/0.3.4/osx/androidenterprise1.tar.gz) Find the source code [on github](https://github.com/Byron/google-apis-rs/tree/master/gen/androidenterprise1-cli). # Usage -This documentation was generated from the *Android Enterprise* API at revision *20160212*. The CLI is at version *0.3.3*. +This documentation was generated from the *Android Enterprise* API at revision *20160331*. The CLI is at version *0.3.4*. ```bash androidenterprise1 [options] diff --git a/gen/androidenterprise1-cli/mkdocs.yml b/gen/androidenterprise1-cli/mkdocs.yml index 7f82c9b190..1dc6c7be31 100644 --- a/gen/androidenterprise1-cli/mkdocs.yml +++ b/gen/androidenterprise1-cli/mkdocs.yml @@ -1,4 +1,4 @@ -site_name: Android Enterprise v0.3.3+20160212 +site_name: Android Enterprise v0.3.4+20160331 site_url: http://byron.github.io/google-apis-rs/google-androidenterprise1-cli site_description: Write integrating applications with bcore diff --git a/gen/androidenterprise1-cli/src/cmn.rs b/gen/androidenterprise1-cli/src/cmn.rs index 188159ee80..ae86fdef65 100644 --- a/gen/androidenterprise1-cli/src/cmn.rs +++ b/gen/androidenterprise1-cli/src/cmn.rs @@ -414,7 +414,7 @@ impl TokenStorage for JsonTokenStorage { Err(err) => match err.kind() { io::ErrorKind::NotFound => Ok(()), - _ => Err(json::Error::Io(err)) + _ => Err(json::Error::IoError(err)) }, Ok(_) => Ok(()), } @@ -427,7 +427,7 @@ impl TokenStorage for JsonTokenStorage { Err(serde_err) => Err(serde_err), } }, - Err(io_err) => Err(json::Error::Io(io_err)) + Err(io_err) => Err(json::Error::IoError(io_err)) } } } @@ -444,7 +444,7 @@ impl TokenStorage for JsonTokenStorage { Err(io_err) => { match io_err.kind() { io::ErrorKind::NotFound => Ok(None), - _ => Err(json::Error::Io(io_err)) + _ => Err(json::Error::IoError(io_err)) } } } @@ -683,7 +683,7 @@ pub fn application_secret_from_directory(dir: &str, = json::from_str(json_console_secret).unwrap(); match json::to_writer_pretty(&mut f, &console_secret) { Err(serde_err) => match serde_err { - json::Error::Io(err) => err, + json::Error::IoError(err) => err, _ => panic!("Unexpected serde error: {:#?}", serde_err) }, Ok(_) => continue, @@ -696,7 +696,7 @@ pub fn application_secret_from_directory(dir: &str, }, Ok(f) => { match json::de::from_reader::<_, ConsoleApplicationSecret>(f) { - Err(json::Error::Io(err)) => + Err(json::Error::IoError(err)) => return secret_io_error(err), Err(json_err) => return Err(CLIError::Configuration( diff --git a/gen/androidenterprise1-cli/src/main.rs b/gen/androidenterprise1-cli/src/main.rs index 11423f3a99..b559f6a1b6 100644 --- a/gen/androidenterprise1-cli/src/main.rs +++ b/gen/androidenterprise1-cli/src/main.rs @@ -5194,7 +5194,7 @@ fn main() { (Some(r##"entitlement-id"##), None, - Some(r##"The ID of the entitlement, e.g. "app:com.google.android.gm"."##), + Some(r##"The ID of the entitlement (a product ID), e.g. "app:com.google.android.gm"."##), Some(true), Some(false)), @@ -5222,7 +5222,7 @@ fn main() { (Some(r##"entitlement-id"##), None, - Some(r##"The ID of the entitlement, e.g. "app:com.google.android.gm"."##), + Some(r##"The ID of the entitlement (a product ID), e.g. "app:com.google.android.gm"."##), Some(true), Some(false)), @@ -5284,7 +5284,7 @@ fn main() { (Some(r##"entitlement-id"##), None, - Some(r##"The ID of the entitlement, e.g. "app:com.google.android.gm"."##), + Some(r##"The ID of the entitlement (a product ID), e.g. "app:com.google.android.gm"."##), Some(true), Some(false)), @@ -5324,7 +5324,7 @@ fn main() { (Some(r##"entitlement-id"##), None, - Some(r##"The ID of the entitlement, e.g. "app:com.google.android.gm"."##), + Some(r##"The ID of the entitlement (a product ID), e.g. "app:com.google.android.gm"."##), Some(true), Some(false)), @@ -6396,8 +6396,8 @@ fn main() { let mut app = App::new("androidenterprise1") .author("Sebastian Thiel ") - .version("0.3.3+20160212") - .about("Allows MDMs/EMMs and enterprises to manage the deployment of apps to Android for Work users.") + .version("0.3.4+20160331") + .about("Manages the deployment of apps to Android for Work users.") .after_help("All documentation details can be found at http://byron.github.io/google-apis-rs/google_androidenterprise1_cli") .arg(Arg::with_name("url") .long("scope") diff --git a/gen/androidenterprise1/Cargo.toml b/gen/androidenterprise1/Cargo.toml index 3f821c346b..13cbf4d087 100644 --- a/gen/androidenterprise1/Cargo.toml +++ b/gen/androidenterprise1/Cargo.toml @@ -4,7 +4,7 @@ [package] name = "google-androidenterprise1" -version = "0.1.12+20160212" +version = "0.1.13+20160331" authors = ["Sebastian Thiel "] description = "A complete library to interact with Android Enterprise (protocol v1)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/androidenterprise1" @@ -16,14 +16,14 @@ build = "src/build.rs" [dependencies] -hyper = "0.7" -mime = "0.1.0" -serde = ">= 0.7.0" -serde_json = ">= 0.7.0" -yup-oauth2 = ">= 0.5.4" +hyper = "0.8" +mime = "0.2.0" +serde = "0.6.0" +serde_json = "0.6.0" +yup-oauth2 = ">= 0.5.6" url = ">= 0.5" [build-dependencies] -syntex = { version = ">= 0.23" } -serde_codegen = { version = ">= 0.6" } +syntex = { version = "= 0.28" } +serde_codegen = { version = "= 0.6.13" } diff --git a/gen/androidenterprise1/README.md b/gen/androidenterprise1/README.md index ed5ff3beff..fb59e7a72f 100644 --- a/gen/androidenterprise1/README.md +++ b/gen/androidenterprise1/README.md @@ -5,7 +5,7 @@ DO NOT EDIT ! --> The `google-androidenterprise1` library allows access to all features of the *Google Android Enterprise* service. -This documentation was generated from *Android Enterprise* crate version *0.1.12+20160212*, where *20160212* is the exact revision of the *androidenterprise:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.12*. +This documentation was generated from *Android Enterprise* crate version *0.1.13+20160331*, where *20160331* is the exact revision of the *androidenterprise:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.13*. Everything else about the *Android Enterprise* *v1* API can be found at the [official documentation site](https://developers.google.com/android/work/play/emm-api). diff --git a/gen/androidenterprise1/src/cmn.rs b/gen/androidenterprise1/src/cmn.rs index 87b91a8986..c69621da55 100644 --- a/gen/androidenterprise1/src/cmn.rs +++ b/gen/androidenterprise1/src/cmn.rs @@ -12,7 +12,7 @@ use mime::{Mime, TopLevel, SubLevel, Attr, Value}; use oauth2::{TokenType, Retry, self}; use hyper; use hyper::header::{ContentType, ContentLength, Headers, UserAgent, Authorization, Header, - HeaderFormat}; + HeaderFormat, Bearer}; use hyper::http::h1::LINE_ENDING; use hyper::method::Method; use hyper::status::StatusCode; @@ -634,7 +634,7 @@ pub struct ResumableUploadHelper<'a, A: 'a> { pub start_at: Option, pub auth: &'a mut A, pub user_agent: &'a str, - pub auth_header: Authorization, + pub auth_header: Authorization, pub url: &'a str, pub reader: &'a mut ReadSeek, pub media_type: Mime, diff --git a/gen/androidenterprise1/src/lib.rs b/gen/androidenterprise1/src/lib.rs index 431cf10d7d..6fe43c4eb7 100644 --- a/gen/androidenterprise1/src/lib.rs +++ b/gen/androidenterprise1/src/lib.rs @@ -2,7 +2,7 @@ // This file was generated automatically from 'src/mako/api/lib.rs.mako' // DO NOT EDIT ! -//! This documentation was generated from *Android Enterprise* crate version *0.1.12+20160212*, where *20160212* is the exact revision of the *androidenterprise:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.12*. +//! This documentation was generated from *Android Enterprise* crate version *0.1.13+20160331*, where *20160331* is the exact revision of the *androidenterprise:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.13*. //! //! Everything else about the *Android Enterprise* *v1* API can be found at the //! [official documentation site](https://developers.google.com/android/work/play/emm-api). diff --git a/gen/androidenterprise1/src/lib.rs.in b/gen/androidenterprise1/src/lib.rs.in index 80ed414bd6..103508d0db 100644 --- a/gen/androidenterprise1/src/lib.rs.in +++ b/gen/androidenterprise1/src/lib.rs.in @@ -133,7 +133,7 @@ impl<'a, C, A> AndroidEnterprise AndroidEnterprise { client: RefCell::new(client), auth: RefCell::new(authenticator), - _user_agent: "google-api-rust-client/0.1.12".to_string(), + _user_agent: "google-api-rust-client/0.1.13".to_string(), } } @@ -178,7 +178,7 @@ impl<'a, C, A> AndroidEnterprise } /// Set the user-agent header field to use in all requests to the server. - /// It defaults to `google-api-rust-client/0.1.12`. + /// It defaults to `google-api-rust-client/0.1.13`. /// /// Returns the previously set user-agent. pub fn user_agent(&mut self, agent_name: String) -> String { @@ -400,6 +400,9 @@ impl Part for ProductPermission {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Product { + /// A link to a smaller image that can be used as an icon for the product. This image is suitable for use at up to 128px x 128px. + #[serde(rename="smallIconUrl")] + pub small_icon_url: Option, /// Identifies what kind of resource this is. Value: the fixed string "androidenterprise#product". pub kind: Option, /// How and to whom the package is made available. The value publicGoogleHosted means that the package is available through the Play Store and not restricted to a specific enterprise. The value privateGoogleHosted means that the package is a private app (restricted to an enterprise) but hosted by Google. The value privateSelfHosted means that the package is a private app (restricted to an enterprise) and is privately hosted. @@ -416,7 +419,7 @@ pub struct Product { /// Whether this product is free, free with in-app purchases, or paid. #[serde(rename="productPricing")] pub product_pricing: Option, - /// A link to an image that can be used as an icon for the product. + /// A link to an image that can be used as an icon for the product. This image is suitable for use at up to 512px x 512px. #[serde(rename="iconUrl")] pub icon_url: Option, /// The name of the author of the product (e.g. the app developer). @@ -860,7 +863,7 @@ pub struct EnterprisesListResponse { impl ResponseResult for EnterprisesListResponse {} -/// An enterprise resource represents a binding between an organisation and their EMM. +/// An enterprise resource represents a binding between an organization and their EMM. /// /// To create an enterprise, an admin of the enterprise must first go through a Play for Work sign-up flow. At the end of this the admin will be presented with a token (a short opaque alphanumeric string). They must then present this to the EMM, who then supplies it to the enroll method. Until this is done the EMM will not have any access to the enterprise. /// @@ -1100,7 +1103,7 @@ impl ResponseResult for ProductPermissions {} pub struct User { /// Identifies what kind of resource this is. Value: the fixed string "androidenterprise#user". pub kind: Option, - /// The user's primary email, e.g. "jsmith@example.com". Will always be set for Google managed users and not set for EMM managed users. + /// The user's primary email, e.g. "jsmith@example.com". #[serde(rename="primaryEmail")] pub primary_email: Option, /// The unique ID for the user. @@ -2573,7 +2576,7 @@ impl<'a, C, A> EntitlementMethods<'a, C, A> { /// * `request` - No description provided. /// * `enterpriseId` - The ID of the enterprise. /// * `userId` - The ID of the user. - /// * `entitlementId` - The ID of the entitlement, e.g. "app:com.google.android.gm". + /// * `entitlementId` - The ID of the entitlement (a product ID), e.g. "app:com.google.android.gm". pub fn update(&self, request: Entitlement, enterprise_id: &str, user_id: &str, entitlement_id: &str) -> EntitlementUpdateCall<'a, C, A> { EntitlementUpdateCall { hub: self.hub, @@ -2615,7 +2618,7 @@ impl<'a, C, A> EntitlementMethods<'a, C, A> { /// /// * `enterpriseId` - The ID of the enterprise. /// * `userId` - The ID of the user. - /// * `entitlementId` - The ID of the entitlement, e.g. "app:com.google.android.gm". + /// * `entitlementId` - The ID of the entitlement (a product ID), e.g. "app:com.google.android.gm". pub fn get(&self, enterprise_id: &str, user_id: &str, entitlement_id: &str) -> EntitlementGetCall<'a, C, A> { EntitlementGetCall { hub: self.hub, @@ -2637,7 +2640,7 @@ impl<'a, C, A> EntitlementMethods<'a, C, A> { /// * `request` - No description provided. /// * `enterpriseId` - The ID of the enterprise. /// * `userId` - The ID of the user. - /// * `entitlementId` - The ID of the entitlement, e.g. "app:com.google.android.gm". + /// * `entitlementId` - The ID of the entitlement (a product ID), e.g. "app:com.google.android.gm". pub fn patch(&self, request: Entitlement, enterprise_id: &str, user_id: &str, entitlement_id: &str) -> EntitlementPatchCall<'a, C, A> { EntitlementPatchCall { hub: self.hub, @@ -2660,7 +2663,7 @@ impl<'a, C, A> EntitlementMethods<'a, C, A> { /// /// * `enterpriseId` - The ID of the enterprise. /// * `userId` - The ID of the user. - /// * `entitlementId` - The ID of the entitlement, e.g. "app:com.google.android.gm". + /// * `entitlementId` - The ID of the entitlement (a product ID), e.g. "app:com.google.android.gm". pub fn delete(&self, enterprise_id: &str, user_id: &str, entitlement_id: &str) -> EntitlementDeleteCall<'a, C, A> { EntitlementDeleteCall { hub: self.hub, @@ -3032,7 +3035,7 @@ impl<'a, C, A> StorelayoutpageListCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, StoreLayoutPagesListResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -3101,8 +3104,7 @@ impl<'a, C, A> StorelayoutpageListCall<'a, C, A> where C: BorrowMut StorelayoutpageGetCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, StorePage)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -3339,8 +3341,7 @@ impl<'a, C, A> StorelayoutpageGetCall<'a, C, A> where C: BorrowMut StorelayoutpageInsertCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, StorePage)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -3603,8 +3604,7 @@ impl<'a, C, A> StorelayoutpageInsertCall<'a, C, A> where C: BorrowMut StorelayoutpageUpdateCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, StorePage)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -3872,8 +3872,7 @@ impl<'a, C, A> StorelayoutpageUpdateCall<'a, C, A> where C: BorrowMut StorelayoutpagePatchCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, StorePage)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -4151,8 +4150,7 @@ impl<'a, C, A> StorelayoutpagePatchCall<'a, C, A> where C: BorrowMut StorelayoutpageDeleteCall<'a, C, A> where C: BorrowMut Result { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -4411,8 +4409,7 @@ impl<'a, C, A> StorelayoutpageDeleteCall<'a, C, A> where C: BorrowMut CollectionviewerDeleteCall<'a, C, A> where C: BorrowMut Result { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -4650,8 +4647,7 @@ impl<'a, C, A> CollectionviewerDeleteCall<'a, C, A> where C: BorrowMut CollectionviewerPatchCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, User)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -4918,8 +4914,7 @@ impl<'a, C, A> CollectionviewerPatchCall<'a, C, A> where C: BorrowMut CollectionviewerGetCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, User)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -5191,8 +5186,7 @@ impl<'a, C, A> CollectionviewerGetCall<'a, C, A> where C: BorrowMut CollectionviewerListCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, CollectionViewersListResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -5449,8 +5443,7 @@ impl<'a, C, A> CollectionviewerListCall<'a, C, A> where C: BorrowMut CollectionviewerUpdateCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, User)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -5717,8 +5710,7 @@ impl<'a, C, A> CollectionviewerUpdateCall<'a, C, A> where C: BorrowMut UserRevokeTokenCall<'a, C, A> where C: BorrowMut, /// Perform the operation you have build so far. pub fn doit(mut self) -> Result { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -5987,8 +5979,7 @@ impl<'a, C, A> UserRevokeTokenCall<'a, C, A> where C: BorrowMut, } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Delete, &url) @@ -6155,7 +6146,7 @@ impl<'a, C, A> UserGetCall<'a, C, A> where C: BorrowMut, A: oauth /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, User)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -6225,8 +6216,7 @@ impl<'a, C, A> UserGetCall<'a, C, A> where C: BorrowMut, A: oauth } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -6403,7 +6393,7 @@ impl<'a, C, A> UserListCall<'a, C, A> where C: BorrowMut, A: oaut /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, UsersListResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -6473,8 +6463,7 @@ impl<'a, C, A> UserListCall<'a, C, A> where C: BorrowMut, A: oaut } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -6653,7 +6642,7 @@ impl<'a, C, A> UserGenerateTokenCall<'a, C, A> where C: BorrowMut /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, UserToken)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -6723,8 +6712,7 @@ impl<'a, C, A> UserGenerateTokenCall<'a, C, A> where C: BorrowMut } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Post, &url) @@ -6908,7 +6896,7 @@ impl<'a, C, A> UserSetAvailableProductSetCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, ProductSet)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -6989,8 +6977,7 @@ impl<'a, C, A> UserSetAvailableProductSetCall<'a, C, A> where C: BorrowMut UserGetAvailableProductSetCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, ProductSet)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -7250,8 +7237,7 @@ impl<'a, C, A> UserGetAvailableProductSetCall<'a, C, A> where C: BorrowMut InstallPatchCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Install)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -7520,8 +7506,7 @@ impl<'a, C, A> InstallPatchCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -7733,7 +7718,7 @@ impl<'a, C, A> InstallGetCall<'a, C, A> where C: BorrowMut, A: oa /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Install)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -7805,8 +7790,7 @@ impl<'a, C, A> InstallGetCall<'a, C, A> where C: BorrowMut, A: oa } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -8004,7 +7988,7 @@ impl<'a, C, A> InstallListCall<'a, C, A> where C: BorrowMut, A: o /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, InstallsListResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -8075,8 +8059,7 @@ impl<'a, C, A> InstallListCall<'a, C, A> where C: BorrowMut, A: o } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -8265,7 +8248,7 @@ impl<'a, C, A> InstallDeleteCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -8336,8 +8319,7 @@ impl<'a, C, A> InstallDeleteCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Delete, &url) @@ -8533,7 +8515,7 @@ impl<'a, C, A> InstallUpdateCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Install)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -8616,8 +8598,7 @@ impl<'a, C, A> InstallUpdateCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -8835,7 +8816,7 @@ impl<'a, C, A> DeviceSetStateCall<'a, C, A> where C: BorrowMut, A /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, DeviceState)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -8917,8 +8898,7 @@ impl<'a, C, A> DeviceSetStateCall<'a, C, A> where C: BorrowMut, A } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -9119,7 +9099,7 @@ impl<'a, C, A> DeviceGetStateCall<'a, C, A> where C: BorrowMut, A /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, DeviceState)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -9190,8 +9170,7 @@ impl<'a, C, A> DeviceGetStateCall<'a, C, A> where C: BorrowMut, A } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -9378,7 +9357,7 @@ impl<'a, C, A> DeviceListCall<'a, C, A> where C: BorrowMut, A: oa /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, DevicesListResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -9448,8 +9427,7 @@ impl<'a, C, A> DeviceListCall<'a, C, A> where C: BorrowMut, A: oa } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -9627,7 +9605,7 @@ impl<'a, C, A> DeviceGetCall<'a, C, A> where C: BorrowMut, A: oau /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Device)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -9698,8 +9676,7 @@ impl<'a, C, A> DeviceGetCall<'a, C, A> where C: BorrowMut, A: oau } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -9885,7 +9862,7 @@ impl<'a, C, A> EnterpriseUnenrollCall<'a, C, A> where C: BorrowMut Result { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -9953,8 +9930,7 @@ impl<'a, C, A> EnterpriseUnenrollCall<'a, C, A> where C: BorrowMut EnterpriseInsertCall<'a, C, A> where C: BorrowMut, /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Enterprise)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -10176,8 +10152,7 @@ impl<'a, C, A> EnterpriseInsertCall<'a, C, A> where C: BorrowMut, } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -10356,7 +10331,7 @@ impl<'a, C, A> EnterpriseSendTestPushNotificationCall<'a, C, A> where C: BorrowM /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, EnterprisesSendTestPushNotificationResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -10425,8 +10400,7 @@ impl<'a, C, A> EnterpriseSendTestPushNotificationCall<'a, C, A> where C: BorrowM } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Post, &url) @@ -10592,7 +10566,7 @@ impl<'a, C, A> EnterpriseListCall<'a, C, A> where C: BorrowMut, A /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, EnterprisesListResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -10640,8 +10614,7 @@ impl<'a, C, A> EnterpriseListCall<'a, C, A> where C: BorrowMut, A } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -10807,7 +10780,7 @@ impl<'a, C, A> EnterpriseGetCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Enterprise)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -10876,8 +10849,7 @@ impl<'a, C, A> EnterpriseGetCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -11043,7 +11015,7 @@ impl<'a, C, A> EnterpriseGetStoreLayoutCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, StoreLayout)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -11112,8 +11084,7 @@ impl<'a, C, A> EnterpriseGetStoreLayoutCall<'a, C, A> where C: BorrowMut EnterpriseSetStoreLayoutCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, StoreLayout)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -11366,8 +11337,7 @@ impl<'a, C, A> EnterpriseSetStoreLayoutCall<'a, C, A> where C: BorrowMut EnterpriseEnrollCall<'a, C, A> where C: BorrowMut, /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Enterprise)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -11612,8 +11582,7 @@ impl<'a, C, A> EnterpriseEnrollCall<'a, C, A> where C: BorrowMut, } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -11799,7 +11768,7 @@ impl<'a, C, A> EnterpriseSetAccountCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, EnterpriseAccount)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -11879,8 +11848,7 @@ impl<'a, C, A> EnterpriseSetAccountCall<'a, C, A> where C: BorrowMut EnterpriseDeleteCall<'a, C, A> where C: BorrowMut, /// Perform the operation you have build so far. pub fn doit(mut self) -> Result { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -12127,8 +12095,7 @@ impl<'a, C, A> EnterpriseDeleteCall<'a, C, A> where C: BorrowMut, } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Delete, &url) @@ -12286,7 +12253,7 @@ impl<'a, C, A> StorelayoutclusterDeleteCall<'a, C, A> where C: BorrowMut Result { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -12356,8 +12323,7 @@ impl<'a, C, A> StorelayoutclusterDeleteCall<'a, C, A> where C: BorrowMut StorelayoutclusterPatchCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, StoreCluster)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -12624,8 +12590,7 @@ impl<'a, C, A> StorelayoutclusterPatchCall<'a, C, A> where C: BorrowMut StorelayoutclusterUpdateCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, StoreCluster)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -12915,8 +12880,7 @@ impl<'a, C, A> StorelayoutclusterUpdateCall<'a, C, A> where C: BorrowMut StorelayoutclusterListCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, StoreLayoutClustersListResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -13186,8 +13150,7 @@ impl<'a, C, A> StorelayoutclusterListCall<'a, C, A> where C: BorrowMut StorelayoutclusterGetCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, StoreCluster)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -13436,8 +13399,7 @@ impl<'a, C, A> StorelayoutclusterGetCall<'a, C, A> where C: BorrowMut StorelayoutclusterInsertCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, StoreCluster)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -13712,8 +13674,7 @@ impl<'a, C, A> StorelayoutclusterInsertCall<'a, C, A> where C: BorrowMut CollectionInsertCall<'a, C, A> where C: BorrowMut, /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Collection)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -13989,8 +13950,7 @@ impl<'a, C, A> CollectionInsertCall<'a, C, A> where C: BorrowMut, } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -14177,7 +14137,7 @@ impl<'a, C, A> CollectionPatchCall<'a, C, A> where C: BorrowMut, /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Collection)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -14258,8 +14218,7 @@ impl<'a, C, A> CollectionPatchCall<'a, C, A> where C: BorrowMut, } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -14456,7 +14415,7 @@ impl<'a, C, A> CollectionUpdateCall<'a, C, A> where C: BorrowMut, /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Collection)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -14537,8 +14496,7 @@ impl<'a, C, A> CollectionUpdateCall<'a, C, A> where C: BorrowMut, } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -14727,7 +14685,7 @@ impl<'a, C, A> CollectionListCall<'a, C, A> where C: BorrowMut, A /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, CollectionsListResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -14796,8 +14754,7 @@ impl<'a, C, A> CollectionListCall<'a, C, A> where C: BorrowMut, A } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -14964,7 +14921,7 @@ impl<'a, C, A> CollectionDeleteCall<'a, C, A> where C: BorrowMut, /// Perform the operation you have build so far. pub fn doit(mut self) -> Result { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -15033,8 +14990,7 @@ impl<'a, C, A> CollectionDeleteCall<'a, C, A> where C: BorrowMut, } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Delete, &url) @@ -15201,7 +15157,7 @@ impl<'a, C, A> CollectionGetCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Collection)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -15271,8 +15227,7 @@ impl<'a, C, A> CollectionGetCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -15449,7 +15404,7 @@ impl<'a, C, A> GrouplicenseuserListCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, GroupLicenseUsersListResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -15519,8 +15474,7 @@ impl<'a, C, A> GrouplicenseuserListCall<'a, C, A> where C: BorrowMut EntitlementUpdateCall<'a, C, A> where C: BorrowMut /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Entitlement)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -15792,8 +15746,7 @@ impl<'a, C, A> EntitlementUpdateCall<'a, C, A> where C: BorrowMut } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -15882,7 +15835,7 @@ impl<'a, C, A> EntitlementUpdateCall<'a, C, A> where C: BorrowMut self._user_id = new_value.to_string(); self } - /// The ID of the entitlement, e.g. "app:com.google.android.gm". + /// The ID of the entitlement (a product ID), e.g. "app:com.google.android.gm". /// /// Sets the *entitlement id* path property to the given value. /// @@ -16000,7 +15953,7 @@ impl<'a, C, A> EntitlementListCall<'a, C, A> where C: BorrowMut, /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, EntitlementsListResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -16070,8 +16023,7 @@ impl<'a, C, A> EntitlementListCall<'a, C, A> where C: BorrowMut, } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -16249,7 +16201,7 @@ impl<'a, C, A> EntitlementGetCall<'a, C, A> where C: BorrowMut, A /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Entitlement)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -16320,8 +16272,7 @@ impl<'a, C, A> EntitlementGetCall<'a, C, A> where C: BorrowMut, A } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -16397,7 +16348,7 @@ impl<'a, C, A> EntitlementGetCall<'a, C, A> where C: BorrowMut, A self._user_id = new_value.to_string(); self } - /// The ID of the entitlement, e.g. "app:com.google.android.gm". + /// The ID of the entitlement (a product ID), e.g. "app:com.google.android.gm". /// /// Sets the *entitlement id* path property to the given value. /// @@ -16518,7 +16469,7 @@ impl<'a, C, A> EntitlementPatchCall<'a, C, A> where C: BorrowMut, /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Entitlement)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -16603,8 +16554,7 @@ impl<'a, C, A> EntitlementPatchCall<'a, C, A> where C: BorrowMut, } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -16693,7 +16643,7 @@ impl<'a, C, A> EntitlementPatchCall<'a, C, A> where C: BorrowMut, self._user_id = new_value.to_string(); self } - /// The ID of the entitlement, e.g. "app:com.google.android.gm". + /// The ID of the entitlement (a product ID), e.g. "app:com.google.android.gm". /// /// Sets the *entitlement id* path property to the given value. /// @@ -16812,7 +16762,7 @@ impl<'a, C, A> EntitlementDeleteCall<'a, C, A> where C: BorrowMut /// Perform the operation you have build so far. pub fn doit(mut self) -> Result { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -16882,8 +16832,7 @@ impl<'a, C, A> EntitlementDeleteCall<'a, C, A> where C: BorrowMut } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Delete, &url) @@ -16949,7 +16898,7 @@ impl<'a, C, A> EntitlementDeleteCall<'a, C, A> where C: BorrowMut self._user_id = new_value.to_string(); self } - /// The ID of the entitlement, e.g. "app:com.google.android.gm". + /// The ID of the entitlement (a product ID), e.g. "app:com.google.android.gm". /// /// Sets the *entitlement id* path property to the given value. /// @@ -17060,7 +17009,7 @@ impl<'a, C, A> ProductGetPermissionCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, ProductPermissions)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -17130,8 +17079,7 @@ impl<'a, C, A> ProductGetPermissionCall<'a, C, A> where C: BorrowMut ProductApproveCall<'a, C, A> where C: BorrowMut, A /// Perform the operation you have build so far. pub fn doit(mut self) -> Result { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -17395,8 +17343,7 @@ impl<'a, C, A> ProductApproveCall<'a, C, A> where C: BorrowMut, A } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -17578,7 +17525,7 @@ impl<'a, C, A> ProductGetAppRestrictionsSchemaCall<'a, C, A> where C: BorrowMut< /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, AppRestrictionsSchema)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -17651,8 +17598,7 @@ impl<'a, C, A> ProductGetAppRestrictionsSchemaCall<'a, C, A> where C: BorrowMut< } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -17838,7 +17784,7 @@ impl<'a, C, A> ProductGetCall<'a, C, A> where C: BorrowMut, A: oa /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Product)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -17911,8 +17857,7 @@ impl<'a, C, A> ProductGetCall<'a, C, A> where C: BorrowMut, A: oa } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -18105,7 +18050,7 @@ impl<'a, C, A> ProductUpdatePermissionCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, ProductPermissions)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -18186,8 +18131,7 @@ impl<'a, C, A> ProductUpdatePermissionCall<'a, C, A> where C: BorrowMut ProductGenerateApprovalUrlCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, ProductsGenerateApprovalUrlResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -18454,8 +18398,7 @@ impl<'a, C, A> ProductGenerateApprovalUrlCall<'a, C, A> where C: BorrowMut GrouplicenseGetCall<'a, C, A> where C: BorrowMut, /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, GroupLicense)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -18709,8 +18652,7 @@ impl<'a, C, A> GrouplicenseGetCall<'a, C, A> where C: BorrowMut, } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -18886,7 +18828,7 @@ impl<'a, C, A> GrouplicenseListCall<'a, C, A> where C: BorrowMut, /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, GroupLicensesListResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -18955,8 +18897,7 @@ impl<'a, C, A> GrouplicenseListCall<'a, C, A> where C: BorrowMut, } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -19124,7 +19065,7 @@ impl<'a, C, A> PermissionGetCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Permission)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -19196,8 +19137,7 @@ impl<'a, C, A> PermissionGetCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) diff --git a/gen/androidpublisher2-cli/Cargo.toml b/gen/androidpublisher2-cli/Cargo.toml index b9d90b3a29..e7f2f45c57 100644 --- a/gen/androidpublisher2-cli/Cargo.toml +++ b/gen/androidpublisher2-cli/Cargo.toml @@ -4,7 +4,7 @@ [package] name = "google-androidpublisher2-cli" -version = "0.3.3+20160221" +version = "0.3.4+20160324" authors = ["Sebastian Thiel "] description = "A complete library to interact with Android Publisher (protocol v2)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/androidpublisher2-cli" @@ -17,18 +17,18 @@ keywords = ["androidpublisher", "google", "cli"] name = "androidpublisher2" [dependencies] -hyper = "0.7" -mime = "0.1.0" -serde = ">= 0.7.0" -serde_json = ">= 0.7.0" -yup-oauth2 = ">= 0.5.4" +hyper = "0.8" +mime = "0.2.0" +serde = "0.6.0" +serde_json = "0.6.0" +yup-oauth2 = ">= 0.5.6" strsim = "0.4" yup-hyper-mock = "1.0" clap = "2.0" [build-dependencies] -syntex = { version = ">= 0.23" } -serde_codegen = { version = ">= 0.6" } +syntex = { version = "= 0.28" } +serde_codegen = { version = "= 0.6.13" } [dependencies.google-androidpublisher2] diff --git a/gen/androidpublisher2-cli/README.md b/gen/androidpublisher2-cli/README.md index dfee90f0ea..d654bc049d 100644 --- a/gen/androidpublisher2-cli/README.md +++ b/gen/androidpublisher2-cli/README.md @@ -17,14 +17,14 @@ Everything else about the *Android Publisher* API can be found at the You can download the pre-compiled 64bit binaries for the following platforms: -* ![icon](http://megaicons.net/static/img/icons_sizes/6/140/16/ubuntu-icon.png) [ubuntu](http://dl.byronimo.de/google.rs/cli/0.3.3/ubuntu/androidpublisher2.tar.gz) -* ![icon](http://hydra-media.cursecdn.com/wow.gamepedia.com/a/a2/Apple-icon-16x16.png?version=25ddd67ac3dd3b634478e3978b76cb74) [osx](http://dl.byronimo.de/google.rs/cli/0.3.3/osx/androidpublisher2.tar.gz) +* ![icon](http://megaicons.net/static/img/icons_sizes/6/140/16/ubuntu-icon.png) [ubuntu](http://dl.byronimo.de/google.rs/cli/0.3.4/ubuntu/androidpublisher2.tar.gz) +* ![icon](http://hydra-media.cursecdn.com/wow.gamepedia.com/a/a2/Apple-icon-16x16.png?version=25ddd67ac3dd3b634478e3978b76cb74) [osx](http://dl.byronimo.de/google.rs/cli/0.3.4/osx/androidpublisher2.tar.gz) Find the source code [on github](https://github.com/Byron/google-apis-rs/tree/master/gen/androidpublisher2-cli). # Usage -This documentation was generated from the *Android Publisher* API at revision *20160221*. The CLI is at version *0.3.3*. +This documentation was generated from the *Android Publisher* API at revision *20160324*. The CLI is at version *0.3.4*. ```bash androidpublisher2 [options] diff --git a/gen/androidpublisher2-cli/mkdocs.yml b/gen/androidpublisher2-cli/mkdocs.yml index 64aa113fa5..96dd5ac360 100644 --- a/gen/androidpublisher2-cli/mkdocs.yml +++ b/gen/androidpublisher2-cli/mkdocs.yml @@ -1,4 +1,4 @@ -site_name: Android Publisher v0.3.3+20160221 +site_name: Android Publisher v0.3.4+20160324 site_url: http://byron.github.io/google-apis-rs/google-androidpublisher2-cli site_description: Write integrating applications with bcore diff --git a/gen/androidpublisher2-cli/src/cmn.rs b/gen/androidpublisher2-cli/src/cmn.rs index 188159ee80..ae86fdef65 100644 --- a/gen/androidpublisher2-cli/src/cmn.rs +++ b/gen/androidpublisher2-cli/src/cmn.rs @@ -414,7 +414,7 @@ impl TokenStorage for JsonTokenStorage { Err(err) => match err.kind() { io::ErrorKind::NotFound => Ok(()), - _ => Err(json::Error::Io(err)) + _ => Err(json::Error::IoError(err)) }, Ok(_) => Ok(()), } @@ -427,7 +427,7 @@ impl TokenStorage for JsonTokenStorage { Err(serde_err) => Err(serde_err), } }, - Err(io_err) => Err(json::Error::Io(io_err)) + Err(io_err) => Err(json::Error::IoError(io_err)) } } } @@ -444,7 +444,7 @@ impl TokenStorage for JsonTokenStorage { Err(io_err) => { match io_err.kind() { io::ErrorKind::NotFound => Ok(None), - _ => Err(json::Error::Io(io_err)) + _ => Err(json::Error::IoError(io_err)) } } } @@ -683,7 +683,7 @@ pub fn application_secret_from_directory(dir: &str, = json::from_str(json_console_secret).unwrap(); match json::to_writer_pretty(&mut f, &console_secret) { Err(serde_err) => match serde_err { - json::Error::Io(err) => err, + json::Error::IoError(err) => err, _ => panic!("Unexpected serde error: {:#?}", serde_err) }, Ok(_) => continue, @@ -696,7 +696,7 @@ pub fn application_secret_from_directory(dir: &str, }, Ok(f) => { match json::de::from_reader::<_, ConsoleApplicationSecret>(f) { - Err(json::Error::Io(err)) => + Err(json::Error::IoError(err)) => return secret_io_error(err), Err(json_err) => return Err(CLIError::Configuration( diff --git a/gen/androidpublisher2-cli/src/main.rs b/gen/androidpublisher2-cli/src/main.rs index 52cbb6b3a7..465722a4d5 100644 --- a/gen/androidpublisher2-cli/src/main.rs +++ b/gen/androidpublisher2-cli/src/main.rs @@ -5466,7 +5466,7 @@ fn main() { let mut app = App::new("androidpublisher2") .author("Sebastian Thiel ") - .version("0.3.3+20160221") + .version("0.3.4+20160324") .about("Lets Android application developers access their Google Play accounts.") .after_help("All documentation details can be found at http://byron.github.io/google-apis-rs/google_androidpublisher2_cli") .arg(Arg::with_name("url") diff --git a/gen/androidpublisher2/Cargo.toml b/gen/androidpublisher2/Cargo.toml index fcb811b9d3..356c5d266e 100644 --- a/gen/androidpublisher2/Cargo.toml +++ b/gen/androidpublisher2/Cargo.toml @@ -4,7 +4,7 @@ [package] name = "google-androidpublisher2" -version = "0.1.12+20160221" +version = "0.1.13+20160324" authors = ["Sebastian Thiel "] description = "A complete library to interact with Android Publisher (protocol v2)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/androidpublisher2" @@ -16,14 +16,14 @@ build = "src/build.rs" [dependencies] -hyper = "0.7" -mime = "0.1.0" -serde = ">= 0.7.0" -serde_json = ">= 0.7.0" -yup-oauth2 = ">= 0.5.4" +hyper = "0.8" +mime = "0.2.0" +serde = "0.6.0" +serde_json = "0.6.0" +yup-oauth2 = ">= 0.5.6" url = ">= 0.5" [build-dependencies] -syntex = { version = ">= 0.23" } -serde_codegen = { version = ">= 0.6" } +syntex = { version = "= 0.28" } +serde_codegen = { version = "= 0.6.13" } diff --git a/gen/androidpublisher2/README.md b/gen/androidpublisher2/README.md index 0a490eb211..202400d0b1 100644 --- a/gen/androidpublisher2/README.md +++ b/gen/androidpublisher2/README.md @@ -5,7 +5,7 @@ DO NOT EDIT ! --> The `google-androidpublisher2` library allows access to all features of the *Google Android Publisher* service. -This documentation was generated from *Android Publisher* crate version *0.1.12+20160221*, where *20160221* is the exact revision of the *androidpublisher:v2* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.12*. +This documentation was generated from *Android Publisher* crate version *0.1.13+20160324*, where *20160324* is the exact revision of the *androidpublisher:v2* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.13*. Everything else about the *Android Publisher* *v2* API can be found at the [official documentation site](https://developers.google.com/android-publisher). diff --git a/gen/androidpublisher2/src/cmn.rs b/gen/androidpublisher2/src/cmn.rs index 87b91a8986..c69621da55 100644 --- a/gen/androidpublisher2/src/cmn.rs +++ b/gen/androidpublisher2/src/cmn.rs @@ -12,7 +12,7 @@ use mime::{Mime, TopLevel, SubLevel, Attr, Value}; use oauth2::{TokenType, Retry, self}; use hyper; use hyper::header::{ContentType, ContentLength, Headers, UserAgent, Authorization, Header, - HeaderFormat}; + HeaderFormat, Bearer}; use hyper::http::h1::LINE_ENDING; use hyper::method::Method; use hyper::status::StatusCode; @@ -634,7 +634,7 @@ pub struct ResumableUploadHelper<'a, A: 'a> { pub start_at: Option, pub auth: &'a mut A, pub user_agent: &'a str, - pub auth_header: Authorization, + pub auth_header: Authorization, pub url: &'a str, pub reader: &'a mut ReadSeek, pub media_type: Mime, diff --git a/gen/androidpublisher2/src/lib.rs b/gen/androidpublisher2/src/lib.rs index 37397975f9..20ea1469e2 100644 --- a/gen/androidpublisher2/src/lib.rs +++ b/gen/androidpublisher2/src/lib.rs @@ -2,7 +2,7 @@ // This file was generated automatically from 'src/mako/api/lib.rs.mako' // DO NOT EDIT ! -//! This documentation was generated from *Android Publisher* crate version *0.1.12+20160221*, where *20160221* is the exact revision of the *androidpublisher:v2* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.12*. +//! This documentation was generated from *Android Publisher* crate version *0.1.13+20160324*, where *20160324* is the exact revision of the *androidpublisher:v2* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.13*. //! //! Everything else about the *Android Publisher* *v2* API can be found at the //! [official documentation site](https://developers.google.com/android-publisher). diff --git a/gen/androidpublisher2/src/lib.rs.in b/gen/androidpublisher2/src/lib.rs.in index cd017d288e..222eceacaa 100644 --- a/gen/androidpublisher2/src/lib.rs.in +++ b/gen/androidpublisher2/src/lib.rs.in @@ -134,7 +134,7 @@ impl<'a, C, A> AndroidPublisher AndroidPublisher { client: RefCell::new(client), auth: RefCell::new(authenticator), - _user_agent: "google-api-rust-client/0.1.12".to_string(), + _user_agent: "google-api-rust-client/0.1.13".to_string(), } } @@ -152,7 +152,7 @@ impl<'a, C, A> AndroidPublisher } /// Set the user-agent header field to use in all requests to the server. - /// It defaults to `google-api-rust-client/0.1.12`. + /// It defaults to `google-api-rust-client/0.1.13`. /// /// Returns the previously set user-agent. pub fn user_agent(&mut self, agent_name: String) -> String { @@ -930,17 +930,39 @@ impl ResponseResult for ApksAddExternallyHostedResponse {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct SubscriptionPurchase { + /// This kind represents a subscriptionPurchase object in the androidpublisher service. + pub kind: Option, + /// ISO 3166-1 alpha-2 billing country/region code of the user at the time the subscription was granted. + #[serde(rename="countryCode")] + pub country_code: Option, + /// A developer-specified string that contains supplemental information about an order. + #[serde(rename="developerPayload")] + pub developer_payload: Option, /// Whether the subscription will automatically be renewed when it reaches its current expiry time. #[serde(rename="autoRenewing")] pub auto_renewing: Option, - /// This kind represents a subscriptionPurchase object in the androidpublisher service. - pub kind: Option, + /// The payment state of the subscription. Possible values are: + /// - Payment pending + /// - Payment received + #[serde(rename="paymentState")] + pub payment_state: Option, + /// ISO 4217 currency code for the subscription price. For example, if the price is specified in British pounds sterling, price_currency_code is "GBP". + #[serde(rename="priceCurrencyCode")] + pub price_currency_code: Option, /// Time at which the subscription will expire, in milliseconds since Epoch. #[serde(rename="expiryTimeMillis")] pub expiry_time_millis: Option, + /// The cancel reason of the subscription, if the subscription is not auto renewing. Possible values are: + /// - User cancelled the subscription + /// - Subscription was cancelled by the system, for example because of a billing problem + #[serde(rename="cancelReason")] + pub cancel_reason: Option, /// Time at which the subscription was granted, in milliseconds since Epoch. #[serde(rename="startTimeMillis")] pub start_time_millis: Option, + /// Price of the subscription, not including tax. Price is expressed in micro-units, where 1,000,000 micro-units equal one unit of the currency. For example, if the subscription price is €1.99, price_amount_micros is 1990000. + #[serde(rename="priceAmountMicros")] + pub price_amount_micros: Option, } impl ResponseResult for SubscriptionPurchase {} @@ -2477,7 +2499,7 @@ impl<'a, C, A> EntitlementListCall<'a, C, A> where C: BorrowMut, /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, EntitlementsListResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -2730,7 +2752,7 @@ impl<'a, C, A> PurchaseSubscriptionRevokeCall<'a, C, A> where C: BorrowMut Result { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -2800,8 +2822,7 @@ impl<'a, C, A> PurchaseSubscriptionRevokeCall<'a, C, A> where C: BorrowMut PurchaseProductGetCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, ProductPurchase)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -3050,8 +3071,7 @@ impl<'a, C, A> PurchaseProductGetCall<'a, C, A> where C: BorrowMut PurchaseSubscriptionGetCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, SubscriptionPurchase)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -3310,8 +3330,7 @@ impl<'a, C, A> PurchaseSubscriptionGetCall<'a, C, A> where C: BorrowMut PurchaseSubscriptionCancelCall<'a, C, A> where C: BorrowMut Result { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -3569,8 +3588,7 @@ impl<'a, C, A> PurchaseSubscriptionCancelCall<'a, C, A> where C: BorrowMut PurchaseSubscriptionRefundCall<'a, C, A> where C: BorrowMut Result { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -3818,8 +3836,7 @@ impl<'a, C, A> PurchaseSubscriptionRefundCall<'a, C, A> where C: BorrowMut PurchaseSubscriptionDeferCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, SubscriptionPurchasesDeferResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -4086,8 +4103,7 @@ impl<'a, C, A> PurchaseSubscriptionDeferCall<'a, C, A> where C: BorrowMut EditImageUploadCall<'a, C, A> where C: BorrowMut, fn doit(mut self, mut reader: RS, reader_mime_type: mime::Mime, protocol: &'static str) -> Result<(hyper::client::Response, ImagesUploadResponse)> where RS: ReadSeek { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -4374,8 +4390,7 @@ impl<'a, C, A> EditImageUploadCall<'a, C, A> where C: BorrowMut, } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { if should_ask_dlg_for_url && (upload_url = dlg.upload_url()) == () && upload_url.is_some() { should_ask_dlg_for_url = false; @@ -4676,7 +4691,7 @@ impl<'a, C, A> EditExpansionfileUpdateCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, ExpansionFile)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -4759,8 +4774,7 @@ impl<'a, C, A> EditExpansionfileUpdateCall<'a, C, A> where C: BorrowMut EditDetailGetCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, AppDetails)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -5039,8 +5053,7 @@ impl<'a, C, A> EditDetailGetCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -5217,7 +5230,7 @@ impl<'a, C, A> EditListingDeleteallCall<'a, C, A> where C: BorrowMut Result { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -5286,8 +5299,7 @@ impl<'a, C, A> EditListingDeleteallCall<'a, C, A> where C: BorrowMut EditApkAddexternallyhostedCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, ApksAddExternallyHostedResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -5542,8 +5554,7 @@ impl<'a, C, A> EditApkAddexternallyhostedCall<'a, C, A> where C: BorrowMut EditApklistingDeleteallCall<'a, C, A> where C: BorrowMut Result { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -5804,8 +5815,7 @@ impl<'a, C, A> EditApklistingDeleteallCall<'a, C, A> where C: BorrowMut EditDetailUpdateCall<'a, C, A> where C: BorrowMut, /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, AppDetails)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -6070,8 +6080,7 @@ impl<'a, C, A> EditDetailUpdateCall<'a, C, A> where C: BorrowMut, } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -6262,7 +6271,7 @@ impl<'a, C, A> EditTrackGetCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Track)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -6333,8 +6342,7 @@ impl<'a, C, A> EditTrackGetCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -6530,7 +6538,7 @@ impl<'a, C, A> EditExpansionfilePatchCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, ExpansionFile)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -6613,8 +6621,7 @@ impl<'a, C, A> EditExpansionfilePatchCall<'a, C, A> where C: BorrowMut EditImageListCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, ImagesListResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -6897,8 +6904,7 @@ impl<'a, C, A> EditImageListCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -7102,7 +7108,7 @@ impl<'a, C, A> EditTrackUpdateCall<'a, C, A> where C: BorrowMut, /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Track)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -7184,8 +7190,7 @@ impl<'a, C, A> EditTrackUpdateCall<'a, C, A> where C: BorrowMut, } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -7393,7 +7398,7 @@ impl<'a, C, A> EditListingPatchCall<'a, C, A> where C: BorrowMut, /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Listing)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -7475,8 +7480,7 @@ impl<'a, C, A> EditListingPatchCall<'a, C, A> where C: BorrowMut, } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -7676,7 +7680,7 @@ impl<'a, C, A> EditGetCall<'a, C, A> where C: BorrowMut, A: oauth /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, AppEdit)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -7746,8 +7750,7 @@ impl<'a, C, A> EditGetCall<'a, C, A> where C: BorrowMut, A: oauth } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -7927,7 +7930,7 @@ impl<'a, C, A> EditImageDeleteCall<'a, C, A> where C: BorrowMut, /// Perform the operation you have build so far. pub fn doit(mut self) -> Result { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -7999,8 +8002,7 @@ impl<'a, C, A> EditImageDeleteCall<'a, C, A> where C: BorrowMut, } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Delete, &url) @@ -8196,7 +8198,7 @@ impl<'a, C, A> EditApkUploadCall<'a, C, A> where C: BorrowMut, A: fn doit(mut self, mut reader: RS, reader_mime_type: mime::Mime, protocol: &'static str) -> Result<(hyper::client::Response, Apk)> where RS: ReadSeek { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -8277,8 +8279,7 @@ impl<'a, C, A> EditApkUploadCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { if should_ask_dlg_for_url && (upload_url = dlg.upload_url()) == () && upload_url.is_some() { should_ask_dlg_for_url = false; @@ -8560,7 +8561,7 @@ impl<'a, C, A> EditApklistingUpdateCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, ApkListing)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -8643,8 +8644,7 @@ impl<'a, C, A> EditApklistingUpdateCall<'a, C, A> where C: BorrowMut EditApkListCall<'a, C, A> where C: BorrowMut, A: o /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, ApksListResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -8922,8 +8922,7 @@ impl<'a, C, A> EditApkListCall<'a, C, A> where C: BorrowMut, A: o } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -9109,7 +9108,7 @@ impl<'a, C, A> EditApklistingPatchCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, ApkListing)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -9192,8 +9191,7 @@ impl<'a, C, A> EditApklistingPatchCall<'a, C, A> where C: BorrowMut EditListingGetCall<'a, C, A> where C: BorrowMut, A /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Listing)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -9475,8 +9473,7 @@ impl<'a, C, A> EditListingGetCall<'a, C, A> where C: BorrowMut, A } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -9665,7 +9662,7 @@ impl<'a, C, A> EditApklistingDeleteCall<'a, C, A> where C: BorrowMut Result { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -9736,8 +9733,7 @@ impl<'a, C, A> EditApklistingDeleteCall<'a, C, A> where C: BorrowMut EditTesterGetCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Testers)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -9994,8 +9990,7 @@ impl<'a, C, A> EditTesterGetCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -10181,7 +10176,7 @@ impl<'a, C, A> EditDeleteCall<'a, C, A> where C: BorrowMut, A: oa /// Perform the operation you have build so far. pub fn doit(mut self) -> Result { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -10250,8 +10245,7 @@ impl<'a, C, A> EditDeleteCall<'a, C, A> where C: BorrowMut, A: oa } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Delete, &url) @@ -10422,7 +10416,7 @@ impl<'a, C, A> EditExpansionfileUploadCall<'a, C, A> where C: BorrowMut(mut self, mut reader: RS, reader_mime_type: mime::Mime, protocol: &'static str) -> Result<(hyper::client::Response, ExpansionFilesUploadResponse)> where RS: ReadSeek { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -10505,8 +10499,7 @@ impl<'a, C, A> EditExpansionfileUploadCall<'a, C, A> where C: BorrowMut EditInsertCall<'a, C, A> where C: BorrowMut, A: oa /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, AppEdit)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -10884,8 +10877,7 @@ impl<'a, C, A> EditInsertCall<'a, C, A> where C: BorrowMut, A: oa } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -11065,7 +11057,7 @@ impl<'a, C, A> EditListingListCall<'a, C, A> where C: BorrowMut, /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, ListingsListResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -11135,8 +11127,7 @@ impl<'a, C, A> EditListingListCall<'a, C, A> where C: BorrowMut, } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -11319,7 +11310,7 @@ impl<'a, C, A> EditTesterPatchCall<'a, C, A> where C: BorrowMut, /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Testers)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -11401,8 +11392,7 @@ impl<'a, C, A> EditTesterPatchCall<'a, C, A> where C: BorrowMut, } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -11601,7 +11591,7 @@ impl<'a, C, A> EditCommitCall<'a, C, A> where C: BorrowMut, A: oa /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, AppEdit)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -11671,8 +11661,7 @@ impl<'a, C, A> EditCommitCall<'a, C, A> where C: BorrowMut, A: oa } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Post, &url) @@ -11849,7 +11838,7 @@ impl<'a, C, A> EditTrackListCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, TracksListResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -11919,8 +11908,7 @@ impl<'a, C, A> EditTrackListCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -12097,7 +12085,7 @@ impl<'a, C, A> EditValidateCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, AppEdit)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -12167,8 +12155,7 @@ impl<'a, C, A> EditValidateCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Post, &url) @@ -12353,7 +12340,7 @@ impl<'a, C, A> EditListingUpdateCall<'a, C, A> where C: BorrowMut /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Listing)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -12435,8 +12422,7 @@ impl<'a, C, A> EditListingUpdateCall<'a, C, A> where C: BorrowMut } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -12638,7 +12624,7 @@ impl<'a, C, A> EditExpansionfileGetCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, ExpansionFile)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -12710,8 +12696,7 @@ impl<'a, C, A> EditExpansionfileGetCall<'a, C, A> where C: BorrowMut EditImageDeleteallCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, ImagesDeleteAllResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -12981,8 +12966,7 @@ impl<'a, C, A> EditImageDeleteallCall<'a, C, A> where C: BorrowMut EditDetailPatchCall<'a, C, A> where C: BorrowMut, /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, AppDetails)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -13266,8 +13250,7 @@ impl<'a, C, A> EditDetailPatchCall<'a, C, A> where C: BorrowMut, } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -13465,7 +13448,7 @@ impl<'a, C, A> EditTrackPatchCall<'a, C, A> where C: BorrowMut, A /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Track)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -13547,8 +13530,7 @@ impl<'a, C, A> EditTrackPatchCall<'a, C, A> where C: BorrowMut, A } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -13749,7 +13731,7 @@ impl<'a, C, A> EditListingDeleteCall<'a, C, A> where C: BorrowMut /// Perform the operation you have build so far. pub fn doit(mut self) -> Result { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -13819,8 +13801,7 @@ impl<'a, C, A> EditListingDeleteCall<'a, C, A> where C: BorrowMut } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Delete, &url) @@ -13999,7 +13980,7 @@ impl<'a, C, A> EditApklistingGetCall<'a, C, A> where C: BorrowMut /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, ApkListing)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -14071,8 +14052,7 @@ impl<'a, C, A> EditApklistingGetCall<'a, C, A> where C: BorrowMut } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -14275,7 +14255,7 @@ impl<'a, C, A> EditTesterUpdateCall<'a, C, A> where C: BorrowMut, /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Testers)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -14357,8 +14337,7 @@ impl<'a, C, A> EditTesterUpdateCall<'a, C, A> where C: BorrowMut, } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -14558,7 +14537,7 @@ impl<'a, C, A> EditApklistingListCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, ApkListingsListResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -14629,8 +14608,7 @@ impl<'a, C, A> EditApklistingListCall<'a, C, A> where C: BorrowMut InappproductBatchCall<'a, C, A> where C: BorrowMut /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, InappproductsBatchResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -14878,8 +14856,7 @@ impl<'a, C, A> InappproductBatchCall<'a, C, A> where C: BorrowMut } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -15054,7 +15031,7 @@ impl<'a, C, A> InappproductListCall<'a, C, A> where C: BorrowMut, /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, InappproductsListResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -15132,8 +15109,7 @@ impl<'a, C, A> InappproductListCall<'a, C, A> where C: BorrowMut, } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -15326,7 +15302,7 @@ impl<'a, C, A> InappproductInsertCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, InAppProduct)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -15409,8 +15385,7 @@ impl<'a, C, A> InappproductInsertCall<'a, C, A> where C: BorrowMut InappproductDeleteCall<'a, C, A> where C: BorrowMut Result { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -15666,8 +15641,7 @@ impl<'a, C, A> InappproductDeleteCall<'a, C, A> where C: BorrowMut InappproductGetCall<'a, C, A> where C: BorrowMut, /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, InAppProduct)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -15904,8 +15878,7 @@ impl<'a, C, A> InappproductGetCall<'a, C, A> where C: BorrowMut, } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -16090,7 +16063,7 @@ impl<'a, C, A> InappproductUpdateCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, InAppProduct)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -16174,8 +16147,7 @@ impl<'a, C, A> InappproductUpdateCall<'a, C, A> where C: BorrowMut InappproductPatchCall<'a, C, A> where C: BorrowMut /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, InAppProduct)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -16465,8 +16437,7 @@ impl<'a, C, A> InappproductPatchCall<'a, C, A> where C: BorrowMut } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); diff --git a/gen/appengine1_beta4-cli/Cargo.toml b/gen/appengine1_beta4-cli/Cargo.toml index 9ba9eed5b4..048aa6d3b5 100644 --- a/gen/appengine1_beta4-cli/Cargo.toml +++ b/gen/appengine1_beta4-cli/Cargo.toml @@ -4,7 +4,7 @@ [package] name = "google-appengine1_beta4-cli" -version = "0.3.3+20160223" +version = "0.3.4+20160314" authors = ["Sebastian Thiel "] description = "A complete library to interact with appengine (protocol v1beta4)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/appengine1_beta4-cli" @@ -17,18 +17,18 @@ keywords = ["appengine", "google", "cli"] name = "appengine1-beta4" [dependencies] -hyper = "0.7" -mime = "0.1.0" -serde = ">= 0.7.0" -serde_json = ">= 0.7.0" -yup-oauth2 = ">= 0.5.4" +hyper = "0.8" +mime = "0.2.0" +serde = "0.6.0" +serde_json = "0.6.0" +yup-oauth2 = ">= 0.5.6" strsim = "0.4" yup-hyper-mock = "1.0" clap = "2.0" [build-dependencies] -syntex = { version = ">= 0.23" } -serde_codegen = { version = ">= 0.6" } +syntex = { version = "= 0.28" } +serde_codegen = { version = "= 0.6.13" } [dependencies.google-appengine1_beta4] diff --git a/gen/appengine1_beta4-cli/README.md b/gen/appengine1_beta4-cli/README.md index 3613e0cb73..5195ed78c2 100644 --- a/gen/appengine1_beta4-cli/README.md +++ b/gen/appengine1_beta4-cli/README.md @@ -17,14 +17,14 @@ Everything else about the *appengine* API can be found at the You can download the pre-compiled 64bit binaries for the following platforms: -* ![icon](http://megaicons.net/static/img/icons_sizes/6/140/16/ubuntu-icon.png) [ubuntu](http://dl.byronimo.de/google.rs/cli/0.3.3/ubuntu/appengine1-beta4.tar.gz) -* ![icon](http://hydra-media.cursecdn.com/wow.gamepedia.com/a/a2/Apple-icon-16x16.png?version=25ddd67ac3dd3b634478e3978b76cb74) [osx](http://dl.byronimo.de/google.rs/cli/0.3.3/osx/appengine1-beta4.tar.gz) +* ![icon](http://megaicons.net/static/img/icons_sizes/6/140/16/ubuntu-icon.png) [ubuntu](http://dl.byronimo.de/google.rs/cli/0.3.4/ubuntu/appengine1-beta4.tar.gz) +* ![icon](http://hydra-media.cursecdn.com/wow.gamepedia.com/a/a2/Apple-icon-16x16.png?version=25ddd67ac3dd3b634478e3978b76cb74) [osx](http://dl.byronimo.de/google.rs/cli/0.3.4/osx/appengine1-beta4.tar.gz) Find the source code [on github](https://github.com/Byron/google-apis-rs/tree/master/gen/appengine1_beta4-cli). # Usage -This documentation was generated from the *appengine* API at revision *20160223*. The CLI is at version *0.3.3*. +This documentation was generated from the *appengine* API at revision *20160314*. The CLI is at version *0.3.4*. ```bash appengine1-beta4 [options] diff --git a/gen/appengine1_beta4-cli/mkdocs.yml b/gen/appengine1_beta4-cli/mkdocs.yml index 04e3e281b1..00af87afab 100644 --- a/gen/appengine1_beta4-cli/mkdocs.yml +++ b/gen/appengine1_beta4-cli/mkdocs.yml @@ -1,4 +1,4 @@ -site_name: appengine v0.3.3+20160223 +site_name: appengine v0.3.4+20160314 site_url: http://byron.github.io/google-apis-rs/google-appengine1_beta4-cli site_description: Write integrating applications with bcore diff --git a/gen/appengine1_beta4-cli/src/cmn.rs b/gen/appengine1_beta4-cli/src/cmn.rs index 188159ee80..ae86fdef65 100644 --- a/gen/appengine1_beta4-cli/src/cmn.rs +++ b/gen/appengine1_beta4-cli/src/cmn.rs @@ -414,7 +414,7 @@ impl TokenStorage for JsonTokenStorage { Err(err) => match err.kind() { io::ErrorKind::NotFound => Ok(()), - _ => Err(json::Error::Io(err)) + _ => Err(json::Error::IoError(err)) }, Ok(_) => Ok(()), } @@ -427,7 +427,7 @@ impl TokenStorage for JsonTokenStorage { Err(serde_err) => Err(serde_err), } }, - Err(io_err) => Err(json::Error::Io(io_err)) + Err(io_err) => Err(json::Error::IoError(io_err)) } } } @@ -444,7 +444,7 @@ impl TokenStorage for JsonTokenStorage { Err(io_err) => { match io_err.kind() { io::ErrorKind::NotFound => Ok(None), - _ => Err(json::Error::Io(io_err)) + _ => Err(json::Error::IoError(io_err)) } } } @@ -683,7 +683,7 @@ pub fn application_secret_from_directory(dir: &str, = json::from_str(json_console_secret).unwrap(); match json::to_writer_pretty(&mut f, &console_secret) { Err(serde_err) => match serde_err { - json::Error::Io(err) => err, + json::Error::IoError(err) => err, _ => panic!("Unexpected serde error: {:#?}", serde_err) }, Ok(_) => continue, @@ -696,7 +696,7 @@ pub fn application_secret_from_directory(dir: &str, }, Ok(f) => { match json::de::from_reader::<_, ConsoleApplicationSecret>(f) { - Err(json::Error::Io(err)) => + Err(json::Error::IoError(err)) => return secret_io_error(err), Err(json_err) => return Err(CLIError::Configuration( diff --git a/gen/appengine1_beta4-cli/src/main.rs b/gen/appengine1_beta4-cli/src/main.rs index 7809e3dc0d..f776b1366c 100644 --- a/gen/appengine1_beta4-cli/src/main.rs +++ b/gen/appengine1_beta4-cli/src/main.rs @@ -1425,8 +1425,8 @@ fn main() { let mut app = App::new("appengine1-beta4") .author("Sebastian Thiel ") - .version("0.3.3+20160223") - .about("The Google App Engine Admin API enables developers to provision and manage their App Engine applications.") + .version("0.3.4+20160314") + .about("Provisions and manages App Engine applications.") .after_help("All documentation details can be found at http://byron.github.io/google-apis-rs/google_appengine1_beta4_cli") .arg(Arg::with_name("url") .long("scope") diff --git a/gen/appengine1_beta4/Cargo.toml b/gen/appengine1_beta4/Cargo.toml index 888c62160e..1b5145839e 100644 --- a/gen/appengine1_beta4/Cargo.toml +++ b/gen/appengine1_beta4/Cargo.toml @@ -4,7 +4,7 @@ [package] name = "google-appengine1_beta4" -version = "0.1.12+20160223" +version = "0.1.13+20160314" authors = ["Sebastian Thiel "] description = "A complete library to interact with appengine (protocol v1beta4)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/appengine1_beta4" @@ -16,14 +16,14 @@ build = "src/build.rs" [dependencies] -hyper = "0.7" -mime = "0.1.0" -serde = ">= 0.7.0" -serde_json = ">= 0.7.0" -yup-oauth2 = ">= 0.5.4" +hyper = "0.8" +mime = "0.2.0" +serde = "0.6.0" +serde_json = "0.6.0" +yup-oauth2 = ">= 0.5.6" url = ">= 0.5" [build-dependencies] -syntex = { version = ">= 0.23" } -serde_codegen = { version = ">= 0.6" } +syntex = { version = "= 0.28" } +serde_codegen = { version = "= 0.6.13" } diff --git a/gen/appengine1_beta4/README.md b/gen/appengine1_beta4/README.md index 32b771c110..b5a20791c7 100644 --- a/gen/appengine1_beta4/README.md +++ b/gen/appengine1_beta4/README.md @@ -5,7 +5,7 @@ DO NOT EDIT ! --> The `google-appengine1_beta4` library allows access to all features of the *Google appengine* service. -This documentation was generated from *appengine* crate version *0.1.12+20160223*, where *20160223* is the exact revision of the *appengine:v1beta4* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.12*. +This documentation was generated from *appengine* crate version *0.1.13+20160314*, where *20160314* is the exact revision of the *appengine:v1beta4* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.13*. Everything else about the *appengine* *v1_beta4* API can be found at the [official documentation site](https://cloud.google.com/appengine/docs/admin-api/). diff --git a/gen/appengine1_beta4/src/cmn.rs b/gen/appengine1_beta4/src/cmn.rs index 87b91a8986..c69621da55 100644 --- a/gen/appengine1_beta4/src/cmn.rs +++ b/gen/appengine1_beta4/src/cmn.rs @@ -12,7 +12,7 @@ use mime::{Mime, TopLevel, SubLevel, Attr, Value}; use oauth2::{TokenType, Retry, self}; use hyper; use hyper::header::{ContentType, ContentLength, Headers, UserAgent, Authorization, Header, - HeaderFormat}; + HeaderFormat, Bearer}; use hyper::http::h1::LINE_ENDING; use hyper::method::Method; use hyper::status::StatusCode; @@ -634,7 +634,7 @@ pub struct ResumableUploadHelper<'a, A: 'a> { pub start_at: Option, pub auth: &'a mut A, pub user_agent: &'a str, - pub auth_header: Authorization, + pub auth_header: Authorization, pub url: &'a str, pub reader: &'a mut ReadSeek, pub media_type: Mime, diff --git a/gen/appengine1_beta4/src/lib.rs b/gen/appengine1_beta4/src/lib.rs index 8ac185e6d6..42851fcf69 100644 --- a/gen/appengine1_beta4/src/lib.rs +++ b/gen/appengine1_beta4/src/lib.rs @@ -2,7 +2,7 @@ // This file was generated automatically from 'src/mako/api/lib.rs.mako' // DO NOT EDIT ! -//! This documentation was generated from *appengine* crate version *0.1.12+20160223*, where *20160223* is the exact revision of the *appengine:v1beta4* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.12*. +//! This documentation was generated from *appengine* crate version *0.1.13+20160314*, where *20160314* is the exact revision of the *appengine:v1beta4* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.13*. //! //! Everything else about the *appengine* *v1_beta4* API can be found at the //! [official documentation site](https://cloud.google.com/appengine/docs/admin-api/). diff --git a/gen/appengine1_beta4/src/lib.rs.in b/gen/appengine1_beta4/src/lib.rs.in index 971f6b2981..097d138cbe 100644 --- a/gen/appengine1_beta4/src/lib.rs.in +++ b/gen/appengine1_beta4/src/lib.rs.in @@ -135,7 +135,7 @@ impl<'a, C, A> Appengine Appengine { client: RefCell::new(client), auth: RefCell::new(authenticator), - _user_agent: "google-api-rust-client/0.1.12".to_string(), + _user_agent: "google-api-rust-client/0.1.13".to_string(), } } @@ -144,7 +144,7 @@ impl<'a, C, A> Appengine } /// Set the user-agent header field to use in all requests to the server. - /// It defaults to `google-api-rust-client/0.1.12`. + /// It defaults to `google-api-rust-client/0.1.13`. /// /// Returns the previously set user-agent. pub fn user_agent(&mut self, agent_name: String) -> String { @@ -199,13 +199,13 @@ pub struct Application { /// A Google Cloud Storage bucket which can be used by the application to store content. @OutputOnly #[serde(rename="defaultBucket")] pub default_bucket: Option, - /// HTTP path dispatch rules for requests to the app that do not explicitly target a module or version. The rules are order-dependent. + /// HTTP path dispatch rules for requests to the app that do not explicitly target a module or version. The rules are order-dependent. @OutputOnly #[serde(rename="dispatchRules")] pub dispatch_rules: Option>, - /// Determines the cookie expiration policy for the application. + /// Determines the cookie expiration policy for the application. @OutputOnly #[serde(rename="defaultCookieExpiration")] pub default_cookie_expiration: Option, - /// The location from which the application will be run. Choices are "us-central" for United States and "europe-west" for European Union. Application instances will run out of data centers in the chosen location and all of the application's End User Content will be stored at rest in the chosen location. The default is "us-central". + /// The location from which the application will be run. Application instances will run out of data centers in the chosen location and all of the application's End User Content will be stored at rest. The default is "us-central". Choices are: "us-central" - Central US "europe-west" - Western Europe "us-east1" - Eastern US pub location: Option, /// If set, only users from the specified Google Apps authentication domain may access the application. If not set, any Google Account may access the application. #[serde(rename="authDomain")] @@ -913,7 +913,7 @@ pub struct Operation { pub done: Option, /// The normal response of the operation in case of success. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. pub response: Option>, - /// The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping above, the `name` should have the format of `operations/some/unique/name`. + /// The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should have the format of `operations/some/unique/name`. pub name: Option, /// The error result of the operation in case of failure. pub error: Option, @@ -1281,7 +1281,7 @@ impl<'a, C, A> AppModulePatchCall<'a, C, A> where C: BorrowMut, A /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Operation)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -1368,8 +1368,7 @@ impl<'a, C, A> AppModulePatchCall<'a, C, A> where C: BorrowMut, A } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -1582,7 +1581,7 @@ impl<'a, C, A> AppModuleListCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, ListModulesResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -1657,8 +1656,7 @@ impl<'a, C, A> AppModuleListCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -1845,7 +1843,7 @@ impl<'a, C, A> AppModuleGetCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Module)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -1915,8 +1913,7 @@ impl<'a, C, A> AppModuleGetCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -2100,7 +2097,7 @@ impl<'a, C, A> AppGetCall<'a, C, A> where C: BorrowMut, A: oauth2 /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Application)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -2172,8 +2169,7 @@ impl<'a, C, A> AppGetCall<'a, C, A> where C: BorrowMut, A: oauth2 } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -2353,7 +2349,7 @@ impl<'a, C, A> AppModuleDeleteCall<'a, C, A> where C: BorrowMut, /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Operation)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -2423,8 +2419,7 @@ impl<'a, C, A> AppModuleDeleteCall<'a, C, A> where C: BorrowMut, } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Delete, &url) @@ -2607,7 +2602,7 @@ impl<'a, C, A> AppOperationGetCall<'a, C, A> where C: BorrowMut, /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Operation)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -2677,8 +2672,7 @@ impl<'a, C, A> AppOperationGetCall<'a, C, A> where C: BorrowMut, } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -2871,7 +2865,7 @@ impl<'a, C, A> AppModuleVersionPatchCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, Operation)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -2956,8 +2950,7 @@ impl<'a, C, A> AppModuleVersionPatchCall<'a, C, A> where C: BorrowMut AppOperationListCall<'a, C, A> where C: BorrowMut, /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, ListOperationsResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -3253,8 +3246,7 @@ impl<'a, C, A> AppOperationListCall<'a, C, A> where C: BorrowMut, } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -3449,7 +3441,7 @@ impl<'a, C, A> AppModuleVersionDeleteCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, Operation)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -3520,8 +3512,7 @@ impl<'a, C, A> AppModuleVersionDeleteCall<'a, C, A> where C: BorrowMut AppModuleVersionCreateCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, Operation)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -3802,8 +3793,7 @@ impl<'a, C, A> AppModuleVersionCreateCall<'a, C, A> where C: BorrowMut AppModuleVersionGetCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, Version)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -4076,8 +4066,7 @@ impl<'a, C, A> AppModuleVersionGetCall<'a, C, A> where C: BorrowMut AppModuleVersionListCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, ListVersionsResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -4362,8 +4351,7 @@ impl<'a, C, A> AppModuleVersionListCall<'a, C, A> where C: BorrowMut"] description = "A complete library to interact with appengine (protocol v1beta5)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/appengine1_beta5-cli" @@ -17,18 +17,18 @@ keywords = ["appengine", "google", "cli"] name = "appengine1-beta5" [dependencies] -hyper = "0.7" -mime = "0.1.0" -serde = ">= 0.7.0" -serde_json = ">= 0.7.0" -yup-oauth2 = ">= 0.5.4" +hyper = "0.8" +mime = "0.2.0" +serde = "0.6.0" +serde_json = "0.6.0" +yup-oauth2 = ">= 0.5.6" strsim = "0.4" yup-hyper-mock = "1.0" clap = "2.0" [build-dependencies] -syntex = { version = ">= 0.23" } -serde_codegen = { version = ">= 0.6" } +syntex = { version = "= 0.28" } +serde_codegen = { version = "= 0.6.13" } [dependencies.google-appengine1_beta5] diff --git a/gen/appengine1_beta5-cli/README.md b/gen/appengine1_beta5-cli/README.md index 07a3bbe369..05d85db197 100644 --- a/gen/appengine1_beta5-cli/README.md +++ b/gen/appengine1_beta5-cli/README.md @@ -17,14 +17,14 @@ Everything else about the *appengine* API can be found at the You can download the pre-compiled 64bit binaries for the following platforms: -* ![icon](http://megaicons.net/static/img/icons_sizes/6/140/16/ubuntu-icon.png) [ubuntu](http://dl.byronimo.de/google.rs/cli/0.3.3/ubuntu/appengine1-beta5.tar.gz) -* ![icon](http://hydra-media.cursecdn.com/wow.gamepedia.com/a/a2/Apple-icon-16x16.png?version=25ddd67ac3dd3b634478e3978b76cb74) [osx](http://dl.byronimo.de/google.rs/cli/0.3.3/osx/appengine1-beta5.tar.gz) +* ![icon](http://megaicons.net/static/img/icons_sizes/6/140/16/ubuntu-icon.png) [ubuntu](http://dl.byronimo.de/google.rs/cli/0.3.4/ubuntu/appengine1-beta5.tar.gz) +* ![icon](http://hydra-media.cursecdn.com/wow.gamepedia.com/a/a2/Apple-icon-16x16.png?version=25ddd67ac3dd3b634478e3978b76cb74) [osx](http://dl.byronimo.de/google.rs/cli/0.3.4/osx/appengine1-beta5.tar.gz) Find the source code [on github](https://github.com/Byron/google-apis-rs/tree/master/gen/appengine1_beta5-cli). # Usage -This documentation was generated from the *appengine* API at revision *20160223*. The CLI is at version *0.3.3*. +This documentation was generated from the *appengine* API at revision *20160314*. The CLI is at version *0.3.4*. ```bash appengine1-beta5 [options] diff --git a/gen/appengine1_beta5-cli/mkdocs.yml b/gen/appengine1_beta5-cli/mkdocs.yml index 0b1e16193d..1a76b810a3 100644 --- a/gen/appengine1_beta5-cli/mkdocs.yml +++ b/gen/appengine1_beta5-cli/mkdocs.yml @@ -1,4 +1,4 @@ -site_name: appengine v0.3.3+20160223 +site_name: appengine v0.3.4+20160314 site_url: http://byron.github.io/google-apis-rs/google-appengine1_beta5-cli site_description: Write integrating applications with bcore diff --git a/gen/appengine1_beta5-cli/src/cmn.rs b/gen/appengine1_beta5-cli/src/cmn.rs index 188159ee80..ae86fdef65 100644 --- a/gen/appengine1_beta5-cli/src/cmn.rs +++ b/gen/appengine1_beta5-cli/src/cmn.rs @@ -414,7 +414,7 @@ impl TokenStorage for JsonTokenStorage { Err(err) => match err.kind() { io::ErrorKind::NotFound => Ok(()), - _ => Err(json::Error::Io(err)) + _ => Err(json::Error::IoError(err)) }, Ok(_) => Ok(()), } @@ -427,7 +427,7 @@ impl TokenStorage for JsonTokenStorage { Err(serde_err) => Err(serde_err), } }, - Err(io_err) => Err(json::Error::Io(io_err)) + Err(io_err) => Err(json::Error::IoError(io_err)) } } } @@ -444,7 +444,7 @@ impl TokenStorage for JsonTokenStorage { Err(io_err) => { match io_err.kind() { io::ErrorKind::NotFound => Ok(None), - _ => Err(json::Error::Io(io_err)) + _ => Err(json::Error::IoError(io_err)) } } } @@ -683,7 +683,7 @@ pub fn application_secret_from_directory(dir: &str, = json::from_str(json_console_secret).unwrap(); match json::to_writer_pretty(&mut f, &console_secret) { Err(serde_err) => match serde_err { - json::Error::Io(err) => err, + json::Error::IoError(err) => err, _ => panic!("Unexpected serde error: {:#?}", serde_err) }, Ok(_) => continue, @@ -696,7 +696,7 @@ pub fn application_secret_from_directory(dir: &str, }, Ok(f) => { match json::de::from_reader::<_, ConsoleApplicationSecret>(f) { - Err(json::Error::Io(err)) => + Err(json::Error::IoError(err)) => return secret_io_error(err), Err(json_err) => return Err(CLIError::Configuration( diff --git a/gen/appengine1_beta5-cli/src/main.rs b/gen/appengine1_beta5-cli/src/main.rs index 17ef0bb7f4..928b32bda7 100644 --- a/gen/appengine1_beta5-cli/src/main.rs +++ b/gen/appengine1_beta5-cli/src/main.rs @@ -1427,8 +1427,8 @@ fn main() { let mut app = App::new("appengine1-beta5") .author("Sebastian Thiel ") - .version("0.3.3+20160223") - .about("The Google App Engine Admin API enables developers to provision and manage their App Engine applications.") + .version("0.3.4+20160314") + .about("Provisions and manages App Engine applications.") .after_help("All documentation details can be found at http://byron.github.io/google-apis-rs/google_appengine1_beta5_cli") .arg(Arg::with_name("url") .long("scope") diff --git a/gen/appengine1_beta5/Cargo.toml b/gen/appengine1_beta5/Cargo.toml index 60b2272598..6dc7066263 100644 --- a/gen/appengine1_beta5/Cargo.toml +++ b/gen/appengine1_beta5/Cargo.toml @@ -4,7 +4,7 @@ [package] name = "google-appengine1_beta5" -version = "0.1.12+20160223" +version = "0.1.13+20160314" authors = ["Sebastian Thiel "] description = "A complete library to interact with appengine (protocol v1beta5)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/appengine1_beta5" @@ -16,14 +16,14 @@ build = "src/build.rs" [dependencies] -hyper = "0.7" -mime = "0.1.0" -serde = ">= 0.7.0" -serde_json = ">= 0.7.0" -yup-oauth2 = ">= 0.5.4" +hyper = "0.8" +mime = "0.2.0" +serde = "0.6.0" +serde_json = "0.6.0" +yup-oauth2 = ">= 0.5.6" url = ">= 0.5" [build-dependencies] -syntex = { version = ">= 0.23" } -serde_codegen = { version = ">= 0.6" } +syntex = { version = "= 0.28" } +serde_codegen = { version = "= 0.6.13" } diff --git a/gen/appengine1_beta5/README.md b/gen/appengine1_beta5/README.md index 00a786397c..c0140c90fd 100644 --- a/gen/appengine1_beta5/README.md +++ b/gen/appengine1_beta5/README.md @@ -5,7 +5,7 @@ DO NOT EDIT ! --> The `google-appengine1_beta5` library allows access to all features of the *Google appengine* service. -This documentation was generated from *appengine* crate version *0.1.12+20160223*, where *20160223* is the exact revision of the *appengine:v1beta5* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.12*. +This documentation was generated from *appengine* crate version *0.1.13+20160314*, where *20160314* is the exact revision of the *appengine:v1beta5* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.13*. Everything else about the *appengine* *v1_beta5* API can be found at the [official documentation site](https://cloud.google.com/appengine/docs/admin-api/). @@ -47,11 +47,12 @@ let r = hub.resource().activity(...).doit() Or specifically ... ```ignore -let r = hub.apps().services_versions_delete(...).doit() -let r = hub.apps().operations_get(...).doit() -let r = hub.apps().services_delete(...).doit() let r = hub.apps().services_versions_create(...).doit() +let r = hub.apps().services_versions_patch(...).doit() +let r = hub.apps().operations_get(...).doit() +let r = hub.apps().services_versions_delete(...).doit() let r = hub.apps().services_patch(...).doit() +let r = hub.apps().services_delete(...).doit() ``` The `resource()` and `activity(...)` calls create [builders][builder-pattern]. The second one dealing with `Activities` @@ -76,7 +77,7 @@ google-appengine1_beta5 = "*" extern crate hyper; extern crate yup_oauth2 as oauth2; extern crate google_appengine1_beta5 as appengine1_beta5; -use appengine1_beta5::Service; +use appengine1_beta5::Version; use appengine1_beta5::{Result, Error}; use std::default::Default; use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; @@ -97,13 +98,12 @@ let mut hub = Appengine::new(hyper::Client::new(), auth); // As the method needs a request, you would usually fill it with the desired information // into the respective structure. Some of the parts shown here might not be applicable ! // Values shown here are possibly random and not representative ! -let mut req = Service::default(); +let mut req = Version::default(); // You can configure optional parameters by calling the respective setters at will, and // execute the final call using `doit()`. // Values shown here are possibly random and not representative ! -let result = hub.apps().services_patch(req, "appsId", "servicesId") - .migrate_traffic(false) +let result = hub.apps().services_versions_patch(req, "appsId", "servicesId", "versionsId") .mask("sed") .doit(); diff --git a/gen/appengine1_beta5/src/cmn.rs b/gen/appengine1_beta5/src/cmn.rs index 87b91a8986..c69621da55 100644 --- a/gen/appengine1_beta5/src/cmn.rs +++ b/gen/appengine1_beta5/src/cmn.rs @@ -12,7 +12,7 @@ use mime::{Mime, TopLevel, SubLevel, Attr, Value}; use oauth2::{TokenType, Retry, self}; use hyper; use hyper::header::{ContentType, ContentLength, Headers, UserAgent, Authorization, Header, - HeaderFormat}; + HeaderFormat, Bearer}; use hyper::http::h1::LINE_ENDING; use hyper::method::Method; use hyper::status::StatusCode; @@ -634,7 +634,7 @@ pub struct ResumableUploadHelper<'a, A: 'a> { pub start_at: Option, pub auth: &'a mut A, pub user_agent: &'a str, - pub auth_header: Authorization, + pub auth_header: Authorization, pub url: &'a str, pub reader: &'a mut ReadSeek, pub media_type: Mime, diff --git a/gen/appengine1_beta5/src/lib.rs b/gen/appengine1_beta5/src/lib.rs index eb395db2cd..e8d5c7e342 100644 --- a/gen/appengine1_beta5/src/lib.rs +++ b/gen/appengine1_beta5/src/lib.rs @@ -2,7 +2,7 @@ // This file was generated automatically from 'src/mako/api/lib.rs.mako' // DO NOT EDIT ! -//! This documentation was generated from *appengine* crate version *0.1.12+20160223*, where *20160223* is the exact revision of the *appengine:v1beta5* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.12*. +//! This documentation was generated from *appengine* crate version *0.1.13+20160314*, where *20160314* is the exact revision of the *appengine:v1beta5* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.13*. //! //! Everything else about the *appengine* *v1_beta5* API can be found at the //! [official documentation site](https://cloud.google.com/appengine/docs/admin-api/). @@ -47,11 +47,12 @@ //! Or specifically ... //! //! ```ignore -//! let r = hub.apps().services_versions_delete(...).doit() -//! let r = hub.apps().operations_get(...).doit() -//! let r = hub.apps().services_delete(...).doit() //! let r = hub.apps().services_versions_create(...).doit() +//! let r = hub.apps().services_versions_patch(...).doit() +//! let r = hub.apps().operations_get(...).doit() +//! let r = hub.apps().services_versions_delete(...).doit() //! let r = hub.apps().services_patch(...).doit() +//! let r = hub.apps().services_delete(...).doit() //! ``` //! //! The `resource()` and `activity(...)` calls create [builders][builder-pattern]. The second one dealing with `Activities` @@ -76,7 +77,7 @@ //! extern crate hyper; //! extern crate yup_oauth2 as oauth2; //! extern crate google_appengine1_beta5 as appengine1_beta5; -//! use appengine1_beta5::Service; +//! use appengine1_beta5::Version; //! use appengine1_beta5::{Result, Error}; //! # #[test] fn egal() { //! use std::default::Default; @@ -98,13 +99,12 @@ //! // As the method needs a request, you would usually fill it with the desired information //! // into the respective structure. Some of the parts shown here might not be applicable ! //! // Values shown here are possibly random and not representative ! -//! let mut req = Service::default(); +//! let mut req = Version::default(); //! //! // You can configure optional parameters by calling the respective setters at will, and //! // execute the final call using `doit()`. //! // Values shown here are possibly random and not representative ! -//! let result = hub.apps().services_patch(req, "appsId", "servicesId") -//! .migrate_traffic(false) +//! let result = hub.apps().services_versions_patch(req, "appsId", "servicesId", "versionsId") //! .mask("sea") //! .doit(); //! diff --git a/gen/appengine1_beta5/src/lib.rs.in b/gen/appengine1_beta5/src/lib.rs.in index 210a1cf7dc..f650ff55af 100644 --- a/gen/appengine1_beta5/src/lib.rs.in +++ b/gen/appengine1_beta5/src/lib.rs.in @@ -70,7 +70,7 @@ impl Default for Scope { /// extern crate hyper; /// extern crate yup_oauth2 as oauth2; /// extern crate google_appengine1_beta5 as appengine1_beta5; -/// use appengine1_beta5::Service; +/// use appengine1_beta5::Version; /// use appengine1_beta5::{Result, Error}; /// # #[test] fn egal() { /// use std::default::Default; @@ -92,13 +92,12 @@ impl Default for Scope { /// // As the method needs a request, you would usually fill it with the desired information /// // into the respective structure. Some of the parts shown here might not be applicable ! /// // Values shown here are possibly random and not representative ! -/// let mut req = Service::default(); +/// let mut req = Version::default(); /// /// // You can configure optional parameters by calling the respective setters at will, and /// // execute the final call using `doit()`. /// // Values shown here are possibly random and not representative ! -/// let result = hub.apps().services_patch(req, "appsId", "servicesId") -/// .migrate_traffic(false) +/// let result = hub.apps().services_versions_patch(req, "appsId", "servicesId", "versionsId") /// .mask("accusam") /// .doit(); /// @@ -135,7 +134,7 @@ impl<'a, C, A> Appengine Appengine { client: RefCell::new(client), auth: RefCell::new(authenticator), - _user_agent: "google-api-rust-client/0.1.12".to_string(), + _user_agent: "google-api-rust-client/0.1.13".to_string(), } } @@ -144,7 +143,7 @@ impl<'a, C, A> Appengine } /// Set the user-agent header field to use in all requests to the server. - /// It defaults to `google-api-rust-client/0.1.12`. + /// It defaults to `google-api-rust-client/0.1.13`. /// /// Returns the previously set user-agent. pub fn user_agent(&mut self, agent_name: String) -> String { @@ -223,13 +222,13 @@ pub struct Application { /// A Google Cloud Storage bucket which can be used by the application to store content. @OutputOnly #[serde(rename="defaultBucket")] pub default_bucket: Option, - /// HTTP path dispatch rules for requests to the app that do not explicitly target a service or version. The rules are order-dependent. + /// HTTP path dispatch rules for requests to the app that do not explicitly target a service or version. The rules are order-dependent. @OutputOnly #[serde(rename="dispatchRules")] pub dispatch_rules: Option>, - /// Determines the cookie expiration policy for the application. + /// Determines the cookie expiration policy for the application. @OutputOnly #[serde(rename="defaultCookieExpiration")] pub default_cookie_expiration: Option, - /// The location from which the application will be run. Choices are "us" for United States and "eu" for European Union. Application instances will run out of data centers in the chosen location and all of the application's End User Content will be stored at rest in the chosen location. The default is "us". + /// The location from which the application will be run. Application instances will run out of data centers in the chosen location and all of the application's End User Content will be stored at rest. The default is "us-central". Choices are: "us-central" - Central US "europe-west" - Western Europe "us-east1" - Eastern US pub location: Option, /// If set, only users from the specified Google Apps authentication domain may access the application. If not set, any Google Account may access the application. #[serde(rename="authDomain")] @@ -250,7 +249,7 @@ impl ResponseResult for Application {} /// /// * [services versions create apps](struct.AppServiceVersionCreateCall.html) (request) /// * [services versions get apps](struct.AppServiceVersionGetCall.html) (response) -/// * [services versions patch apps](struct.AppServiceVersionPatchCall.html) (request|response) +/// * [services versions patch apps](struct.AppServiceVersionPatchCall.html) (request) /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Version { @@ -871,11 +870,12 @@ impl Part for TrafficSplit {} /// This type is used in activities, which are methods you may call on this type or where this type is involved in. /// The list links the activity name, along with information about where it is used (one of *request* and *response*). /// -/// * [services versions delete apps](struct.AppServiceVersionDeleteCall.html) (response) -/// * [operations get apps](struct.AppOperationGetCall.html) (response) -/// * [services delete apps](struct.AppServiceDeleteCall.html) (response) /// * [services versions create apps](struct.AppServiceVersionCreateCall.html) (response) +/// * [services versions patch apps](struct.AppServiceVersionPatchCall.html) (response) +/// * [operations get apps](struct.AppOperationGetCall.html) (response) +/// * [services versions delete apps](struct.AppServiceVersionDeleteCall.html) (response) /// * [services patch apps](struct.AppServicePatchCall.html) (response) +/// * [services delete apps](struct.AppServiceDeleteCall.html) (response) /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Operation { @@ -885,7 +885,7 @@ pub struct Operation { pub done: Option, /// The normal response of the operation in case of success. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. pub response: Option>, - /// The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping above, the `name` should have the format of `operations/some/unique/name`. + /// The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should have the format of `operations/some/unique/name`. pub name: Option, /// The error result of the operation in case of failure. pub error: Option, @@ -1245,7 +1245,7 @@ impl<'a, C, A> AppServiceListCall<'a, C, A> where C: BorrowMut, A /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, ListServicesResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -1320,8 +1320,7 @@ impl<'a, C, A> AppServiceListCall<'a, C, A> where C: BorrowMut, A } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -1515,7 +1514,7 @@ impl<'a, C, A> AppServiceVersionCreateCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, Operation)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -1596,8 +1595,7 @@ impl<'a, C, A> AppServiceVersionCreateCall<'a, C, A> where C: BorrowMut AppServiceGetCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Service)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -1863,8 +1861,7 @@ impl<'a, C, A> AppServiceGetCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -2055,9 +2052,9 @@ impl<'a, C, A> AppServiceVersionPatchCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, Version)> { + pub fn doit(mut self) -> Result<(hyper::client::Response, Operation)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -2142,8 +2139,7 @@ impl<'a, C, A> AppServiceVersionPatchCall<'a, C, A> where C: BorrowMut AppServiceVersionListCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, ListVersionsResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -2441,8 +2437,7 @@ impl<'a, C, A> AppServiceVersionListCall<'a, C, A> where C: BorrowMut AppOperationGetCall<'a, C, A> where C: BorrowMut, /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Operation)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -2716,8 +2711,7 @@ impl<'a, C, A> AppOperationGetCall<'a, C, A> where C: BorrowMut, } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -2905,7 +2899,7 @@ impl<'a, C, A> AppOperationListCall<'a, C, A> where C: BorrowMut, /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, ListOperationsResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -2983,8 +2977,7 @@ impl<'a, C, A> AppOperationListCall<'a, C, A> where C: BorrowMut, } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -3179,7 +3172,7 @@ impl<'a, C, A> AppServiceVersionDeleteCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, Operation)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -3250,8 +3243,7 @@ impl<'a, C, A> AppServiceVersionDeleteCall<'a, C, A> where C: BorrowMut AppServicePatchCall<'a, C, A> where C: BorrowMut, /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Operation)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -3542,8 +3534,7 @@ impl<'a, C, A> AppServicePatchCall<'a, C, A> where C: BorrowMut, } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -3754,7 +3745,7 @@ impl<'a, C, A> AppGetCall<'a, C, A> where C: BorrowMut, A: oauth2 /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Application)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -3826,8 +3817,7 @@ impl<'a, C, A> AppGetCall<'a, C, A> where C: BorrowMut, A: oauth2 } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -4007,7 +3997,7 @@ impl<'a, C, A> AppServiceDeleteCall<'a, C, A> where C: BorrowMut, /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Operation)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -4077,8 +4067,7 @@ impl<'a, C, A> AppServiceDeleteCall<'a, C, A> where C: BorrowMut, } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Delete, &url) @@ -4264,7 +4253,7 @@ impl<'a, C, A> AppServiceVersionGetCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, Version)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -4338,8 +4327,7 @@ impl<'a, C, A> AppServiceVersionGetCall<'a, C, A> where C: BorrowMut"] description = "A complete library to interact with appsactivity (protocol v1)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/appsactivity1-cli" @@ -17,18 +17,18 @@ keywords = ["appsactivity", "google", "cli"] name = "appsactivity1" [dependencies] -hyper = "0.7" -mime = "0.1.0" -serde = ">= 0.7.0" -serde_json = ">= 0.7.0" -yup-oauth2 = ">= 0.5.4" +hyper = "0.8" +mime = "0.2.0" +serde = "0.6.0" +serde_json = "0.6.0" +yup-oauth2 = ">= 0.5.6" strsim = "0.4" yup-hyper-mock = "1.0" clap = "2.0" [build-dependencies] -syntex = { version = ">= 0.23" } -serde_codegen = { version = ">= 0.6" } +syntex = { version = "= 0.28" } +serde_codegen = { version = "= 0.6.13" } [dependencies.google-appsactivity1] diff --git a/gen/appsactivity1-cli/README.md b/gen/appsactivity1-cli/README.md index 527c2bfcb1..e2f76ad96f 100644 --- a/gen/appsactivity1-cli/README.md +++ b/gen/appsactivity1-cli/README.md @@ -17,14 +17,14 @@ Everything else about the *appsactivity* API can be found at the You can download the pre-compiled 64bit binaries for the following platforms: -* ![icon](http://megaicons.net/static/img/icons_sizes/6/140/16/ubuntu-icon.png) [ubuntu](http://dl.byronimo.de/google.rs/cli/0.3.3/ubuntu/appsactivity1.tar.gz) -* ![icon](http://hydra-media.cursecdn.com/wow.gamepedia.com/a/a2/Apple-icon-16x16.png?version=25ddd67ac3dd3b634478e3978b76cb74) [osx](http://dl.byronimo.de/google.rs/cli/0.3.3/osx/appsactivity1.tar.gz) +* ![icon](http://megaicons.net/static/img/icons_sizes/6/140/16/ubuntu-icon.png) [ubuntu](http://dl.byronimo.de/google.rs/cli/0.3.4/ubuntu/appsactivity1.tar.gz) +* ![icon](http://hydra-media.cursecdn.com/wow.gamepedia.com/a/a2/Apple-icon-16x16.png?version=25ddd67ac3dd3b634478e3978b76cb74) [osx](http://dl.byronimo.de/google.rs/cli/0.3.4/osx/appsactivity1.tar.gz) Find the source code [on github](https://github.com/Byron/google-apis-rs/tree/master/gen/appsactivity1-cli). # Usage -This documentation was generated from the *appsactivity* API at revision *20150723*. The CLI is at version *0.3.3*. +This documentation was generated from the *appsactivity* API at revision *20160129*. The CLI is at version *0.3.4*. ```bash appsactivity1 [options] diff --git a/gen/appsactivity1-cli/mkdocs.yml b/gen/appsactivity1-cli/mkdocs.yml index ceedf73dff..dda60bea9e 100644 --- a/gen/appsactivity1-cli/mkdocs.yml +++ b/gen/appsactivity1-cli/mkdocs.yml @@ -1,4 +1,4 @@ -site_name: appsactivity v0.3.3+20150723 +site_name: appsactivity v0.3.4+20160129 site_url: http://byron.github.io/google-apis-rs/google-appsactivity1-cli site_description: Write integrating applications with bcore diff --git a/gen/appsactivity1-cli/src/cmn.rs b/gen/appsactivity1-cli/src/cmn.rs index 188159ee80..ae86fdef65 100644 --- a/gen/appsactivity1-cli/src/cmn.rs +++ b/gen/appsactivity1-cli/src/cmn.rs @@ -414,7 +414,7 @@ impl TokenStorage for JsonTokenStorage { Err(err) => match err.kind() { io::ErrorKind::NotFound => Ok(()), - _ => Err(json::Error::Io(err)) + _ => Err(json::Error::IoError(err)) }, Ok(_) => Ok(()), } @@ -427,7 +427,7 @@ impl TokenStorage for JsonTokenStorage { Err(serde_err) => Err(serde_err), } }, - Err(io_err) => Err(json::Error::Io(io_err)) + Err(io_err) => Err(json::Error::IoError(io_err)) } } } @@ -444,7 +444,7 @@ impl TokenStorage for JsonTokenStorage { Err(io_err) => { match io_err.kind() { io::ErrorKind::NotFound => Ok(None), - _ => Err(json::Error::Io(io_err)) + _ => Err(json::Error::IoError(io_err)) } } } @@ -683,7 +683,7 @@ pub fn application_secret_from_directory(dir: &str, = json::from_str(json_console_secret).unwrap(); match json::to_writer_pretty(&mut f, &console_secret) { Err(serde_err) => match serde_err { - json::Error::Io(err) => err, + json::Error::IoError(err) => err, _ => panic!("Unexpected serde error: {:#?}", serde_err) }, Ok(_) => continue, @@ -696,7 +696,7 @@ pub fn application_secret_from_directory(dir: &str, }, Ok(f) => { match json::de::from_reader::<_, ConsoleApplicationSecret>(f) { - Err(json::Error::Io(err)) => + Err(json::Error::IoError(err)) => return secret_io_error(err), Err(json_err) => return Err(CLIError::Configuration( diff --git a/gen/appsactivity1-cli/src/main.rs b/gen/appsactivity1-cli/src/main.rs index 04ac515e79..e7b3ae61c6 100644 --- a/gen/appsactivity1-cli/src/main.rs +++ b/gen/appsactivity1-cli/src/main.rs @@ -240,7 +240,7 @@ fn main() { let mut app = App::new("appsactivity1") .author("Sebastian Thiel ") - .version("0.3.3+20150723") + .version("0.3.4+20160129") .about("Provides a historical view of activity.") .after_help("All documentation details can be found at http://byron.github.io/google-apis-rs/google_appsactivity1_cli") .arg(Arg::with_name("url") diff --git a/gen/appsactivity1/Cargo.toml b/gen/appsactivity1/Cargo.toml index 7927e065a5..845af53aaf 100644 --- a/gen/appsactivity1/Cargo.toml +++ b/gen/appsactivity1/Cargo.toml @@ -4,7 +4,7 @@ [package] name = "google-appsactivity1" -version = "0.1.12+20150723" +version = "0.1.13+20160129" authors = ["Sebastian Thiel "] description = "A complete library to interact with appsactivity (protocol v1)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/appsactivity1" @@ -16,14 +16,14 @@ build = "src/build.rs" [dependencies] -hyper = "0.7" -mime = "0.1.0" -serde = ">= 0.7.0" -serde_json = ">= 0.7.0" -yup-oauth2 = ">= 0.5.4" +hyper = "0.8" +mime = "0.2.0" +serde = "0.6.0" +serde_json = "0.6.0" +yup-oauth2 = ">= 0.5.6" url = ">= 0.5" [build-dependencies] -syntex = { version = ">= 0.23" } -serde_codegen = { version = ">= 0.6" } +syntex = { version = "= 0.28" } +serde_codegen = { version = "= 0.6.13" } diff --git a/gen/appsactivity1/README.md b/gen/appsactivity1/README.md index 18dfe1a6d2..344b5cbcba 100644 --- a/gen/appsactivity1/README.md +++ b/gen/appsactivity1/README.md @@ -5,7 +5,7 @@ DO NOT EDIT ! --> The `google-appsactivity1` library allows access to all features of the *Google appsactivity* service. -This documentation was generated from *appsactivity* crate version *0.1.12+20150723*, where *20150723* is the exact revision of the *appsactivity:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.12*. +This documentation was generated from *appsactivity* crate version *0.1.13+20160129*, where *20160129* is the exact revision of the *appsactivity:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.13*. Everything else about the *appsactivity* *v1* API can be found at the [official documentation site](https://developers.google.com/google-apps/activity/). diff --git a/gen/appsactivity1/src/cmn.rs b/gen/appsactivity1/src/cmn.rs index 87b91a8986..c69621da55 100644 --- a/gen/appsactivity1/src/cmn.rs +++ b/gen/appsactivity1/src/cmn.rs @@ -12,7 +12,7 @@ use mime::{Mime, TopLevel, SubLevel, Attr, Value}; use oauth2::{TokenType, Retry, self}; use hyper; use hyper::header::{ContentType, ContentLength, Headers, UserAgent, Authorization, Header, - HeaderFormat}; + HeaderFormat, Bearer}; use hyper::http::h1::LINE_ENDING; use hyper::method::Method; use hyper::status::StatusCode; @@ -634,7 +634,7 @@ pub struct ResumableUploadHelper<'a, A: 'a> { pub start_at: Option, pub auth: &'a mut A, pub user_agent: &'a str, - pub auth_header: Authorization, + pub auth_header: Authorization, pub url: &'a str, pub reader: &'a mut ReadSeek, pub media_type: Mime, diff --git a/gen/appsactivity1/src/lib.rs b/gen/appsactivity1/src/lib.rs index 7a860ba713..90fe3a063c 100644 --- a/gen/appsactivity1/src/lib.rs +++ b/gen/appsactivity1/src/lib.rs @@ -2,7 +2,7 @@ // This file was generated automatically from 'src/mako/api/lib.rs.mako' // DO NOT EDIT ! -//! This documentation was generated from *appsactivity* crate version *0.1.12+20150723*, where *20150723* is the exact revision of the *appsactivity:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.12*. +//! This documentation was generated from *appsactivity* crate version *0.1.13+20160129*, where *20160129* is the exact revision of the *appsactivity:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.13*. //! //! Everything else about the *appsactivity* *v1* API can be found at the //! [official documentation site](https://developers.google.com/google-apps/activity/). diff --git a/gen/appsactivity1/src/lib.rs.in b/gen/appsactivity1/src/lib.rs.in index 5a745a536f..cfdeffb099 100644 --- a/gen/appsactivity1/src/lib.rs.in +++ b/gen/appsactivity1/src/lib.rs.in @@ -150,7 +150,7 @@ impl<'a, C, A> Appsactivity Appsactivity { client: RefCell::new(client), auth: RefCell::new(authenticator), - _user_agent: "google-api-rust-client/0.1.12".to_string(), + _user_agent: "google-api-rust-client/0.1.13".to_string(), } } @@ -159,7 +159,7 @@ impl<'a, C, A> Appsactivity } /// Set the user-agent header field to use in all requests to the server. - /// It defaults to `google-api-rust-client/0.1.12`. + /// It defaults to `google-api-rust-client/0.1.13`. /// /// Returns the previously set user-agent. pub fn user_agent(&mut self, agent_name: String) -> String { @@ -328,8 +328,14 @@ impl ResponseResult for ListActivitiesResponse {} pub struct User { /// The profile photo of the user. Not present if the user has no profile photo. pub photo: Option, + /// The permission ID associated with this user. Equivalent to the Drive API's permission ID for this user, returned as part of the Drive Permissions resource. + #[serde(rename="permissionId")] + pub permission_id: Option, /// The displayable name of the user. pub name: Option, + /// A boolean which indicates whether the specified User was deleted. If true, name, photo and permission_id will be omitted. + #[serde(rename="isDeleted")] + pub is_deleted: Option, } impl Part for User {} @@ -519,7 +525,7 @@ impl<'a, C, A> ActivityListCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, ListActivitiesResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -587,8 +593,7 @@ impl<'a, C, A> ActivityListCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) diff --git a/gen/appstate1-cli/Cargo.toml b/gen/appstate1-cli/Cargo.toml index 5b38e3a623..0f6b7744a4 100644 --- a/gen/appstate1-cli/Cargo.toml +++ b/gen/appstate1-cli/Cargo.toml @@ -4,7 +4,7 @@ [package] name = "google-appstate1-cli" -version = "0.3.3+20160224" +version = "0.3.4+20160331" authors = ["Sebastian Thiel "] description = "A complete library to interact with App State (protocol v1)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/appstate1-cli" @@ -17,18 +17,18 @@ keywords = ["appstate", "google", "cli"] name = "appstate1" [dependencies] -hyper = "0.7" -mime = "0.1.0" -serde = ">= 0.7.0" -serde_json = ">= 0.7.0" -yup-oauth2 = ">= 0.5.4" +hyper = "0.8" +mime = "0.2.0" +serde = "0.6.0" +serde_json = "0.6.0" +yup-oauth2 = ">= 0.5.6" strsim = "0.4" yup-hyper-mock = "1.0" clap = "2.0" [build-dependencies] -syntex = { version = ">= 0.23" } -serde_codegen = { version = ">= 0.6" } +syntex = { version = "= 0.28" } +serde_codegen = { version = "= 0.6.13" } [dependencies.google-appstate1] diff --git a/gen/appstate1-cli/README.md b/gen/appstate1-cli/README.md index 8b6d70800e..03ac753754 100644 --- a/gen/appstate1-cli/README.md +++ b/gen/appstate1-cli/README.md @@ -17,14 +17,14 @@ Everything else about the *App State* API can be found at the You can download the pre-compiled 64bit binaries for the following platforms: -* ![icon](http://megaicons.net/static/img/icons_sizes/6/140/16/ubuntu-icon.png) [ubuntu](http://dl.byronimo.de/google.rs/cli/0.3.3/ubuntu/appstate1.tar.gz) -* ![icon](http://hydra-media.cursecdn.com/wow.gamepedia.com/a/a2/Apple-icon-16x16.png?version=25ddd67ac3dd3b634478e3978b76cb74) [osx](http://dl.byronimo.de/google.rs/cli/0.3.3/osx/appstate1.tar.gz) +* ![icon](http://megaicons.net/static/img/icons_sizes/6/140/16/ubuntu-icon.png) [ubuntu](http://dl.byronimo.de/google.rs/cli/0.3.4/ubuntu/appstate1.tar.gz) +* ![icon](http://hydra-media.cursecdn.com/wow.gamepedia.com/a/a2/Apple-icon-16x16.png?version=25ddd67ac3dd3b634478e3978b76cb74) [osx](http://dl.byronimo.de/google.rs/cli/0.3.4/osx/appstate1.tar.gz) Find the source code [on github](https://github.com/Byron/google-apis-rs/tree/master/gen/appstate1-cli). # Usage -This documentation was generated from the *App State* API at revision *20160224*. The CLI is at version *0.3.3*. +This documentation was generated from the *App State* API at revision *20160331*. The CLI is at version *0.3.4*. ```bash appstate1 [options] diff --git a/gen/appstate1-cli/mkdocs.yml b/gen/appstate1-cli/mkdocs.yml index 9d7cc9e5ab..629624ad6e 100644 --- a/gen/appstate1-cli/mkdocs.yml +++ b/gen/appstate1-cli/mkdocs.yml @@ -1,4 +1,4 @@ -site_name: App State v0.3.3+20160224 +site_name: App State v0.3.4+20160331 site_url: http://byron.github.io/google-apis-rs/google-appstate1-cli site_description: Write integrating applications with bcore diff --git a/gen/appstate1-cli/src/cmn.rs b/gen/appstate1-cli/src/cmn.rs index 188159ee80..ae86fdef65 100644 --- a/gen/appstate1-cli/src/cmn.rs +++ b/gen/appstate1-cli/src/cmn.rs @@ -414,7 +414,7 @@ impl TokenStorage for JsonTokenStorage { Err(err) => match err.kind() { io::ErrorKind::NotFound => Ok(()), - _ => Err(json::Error::Io(err)) + _ => Err(json::Error::IoError(err)) }, Ok(_) => Ok(()), } @@ -427,7 +427,7 @@ impl TokenStorage for JsonTokenStorage { Err(serde_err) => Err(serde_err), } }, - Err(io_err) => Err(json::Error::Io(io_err)) + Err(io_err) => Err(json::Error::IoError(io_err)) } } } @@ -444,7 +444,7 @@ impl TokenStorage for JsonTokenStorage { Err(io_err) => { match io_err.kind() { io::ErrorKind::NotFound => Ok(None), - _ => Err(json::Error::Io(io_err)) + _ => Err(json::Error::IoError(io_err)) } } } @@ -683,7 +683,7 @@ pub fn application_secret_from_directory(dir: &str, = json::from_str(json_console_secret).unwrap(); match json::to_writer_pretty(&mut f, &console_secret) { Err(serde_err) => match serde_err { - json::Error::Io(err) => err, + json::Error::IoError(err) => err, _ => panic!("Unexpected serde error: {:#?}", serde_err) }, Ok(_) => continue, @@ -696,7 +696,7 @@ pub fn application_secret_from_directory(dir: &str, }, Ok(f) => { match json::de::from_reader::<_, ConsoleApplicationSecret>(f) { - Err(json::Error::Io(err)) => + Err(json::Error::IoError(err)) => return secret_io_error(err), Err(json_err) => return Err(CLIError::Configuration( diff --git a/gen/appstate1-cli/src/main.rs b/gen/appstate1-cli/src/main.rs index ddb84d7954..17b4352355 100644 --- a/gen/appstate1-cli/src/main.rs +++ b/gen/appstate1-cli/src/main.rs @@ -568,7 +568,7 @@ fn main() { let mut app = App::new("appstate1") .author("Sebastian Thiel ") - .version("0.3.3+20160224") + .version("0.3.4+20160331") .about("The Google App State API.") .after_help("All documentation details can be found at http://byron.github.io/google-apis-rs/google_appstate1_cli") .arg(Arg::with_name("url") diff --git a/gen/appstate1/Cargo.toml b/gen/appstate1/Cargo.toml index 1118b38a13..1129844e11 100644 --- a/gen/appstate1/Cargo.toml +++ b/gen/appstate1/Cargo.toml @@ -4,7 +4,7 @@ [package] name = "google-appstate1" -version = "0.1.12+20160224" +version = "0.1.13+20160331" authors = ["Sebastian Thiel "] description = "A complete library to interact with App State (protocol v1)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/appstate1" @@ -16,14 +16,14 @@ build = "src/build.rs" [dependencies] -hyper = "0.7" -mime = "0.1.0" -serde = ">= 0.7.0" -serde_json = ">= 0.7.0" -yup-oauth2 = ">= 0.5.4" +hyper = "0.8" +mime = "0.2.0" +serde = "0.6.0" +serde_json = "0.6.0" +yup-oauth2 = ">= 0.5.6" url = ">= 0.5" [build-dependencies] -syntex = { version = ">= 0.23" } -serde_codegen = { version = ">= 0.6" } +syntex = { version = "= 0.28" } +serde_codegen = { version = "= 0.6.13" } diff --git a/gen/appstate1/README.md b/gen/appstate1/README.md index ad70fd1969..b12a62a7b1 100644 --- a/gen/appstate1/README.md +++ b/gen/appstate1/README.md @@ -5,7 +5,7 @@ DO NOT EDIT ! --> The `google-appstate1` library allows access to all features of the *Google App State* service. -This documentation was generated from *App State* crate version *0.1.12+20160224*, where *20160224* is the exact revision of the *appstate:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.12*. +This documentation was generated from *App State* crate version *0.1.13+20160331*, where *20160331* is the exact revision of the *appstate:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.13*. Everything else about the *App State* *v1* API can be found at the [official documentation site](https://developers.google.com/games/services/web/api/states). diff --git a/gen/appstate1/src/cmn.rs b/gen/appstate1/src/cmn.rs index 87b91a8986..c69621da55 100644 --- a/gen/appstate1/src/cmn.rs +++ b/gen/appstate1/src/cmn.rs @@ -12,7 +12,7 @@ use mime::{Mime, TopLevel, SubLevel, Attr, Value}; use oauth2::{TokenType, Retry, self}; use hyper; use hyper::header::{ContentType, ContentLength, Headers, UserAgent, Authorization, Header, - HeaderFormat}; + HeaderFormat, Bearer}; use hyper::http::h1::LINE_ENDING; use hyper::method::Method; use hyper::status::StatusCode; @@ -634,7 +634,7 @@ pub struct ResumableUploadHelper<'a, A: 'a> { pub start_at: Option, pub auth: &'a mut A, pub user_agent: &'a str, - pub auth_header: Authorization, + pub auth_header: Authorization, pub url: &'a str, pub reader: &'a mut ReadSeek, pub media_type: Mime, diff --git a/gen/appstate1/src/lib.rs b/gen/appstate1/src/lib.rs index c6d107ea4b..40645b8472 100644 --- a/gen/appstate1/src/lib.rs +++ b/gen/appstate1/src/lib.rs @@ -2,7 +2,7 @@ // This file was generated automatically from 'src/mako/api/lib.rs.mako' // DO NOT EDIT ! -//! This documentation was generated from *App State* crate version *0.1.12+20160224*, where *20160224* is the exact revision of the *appstate:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.12*. +//! This documentation was generated from *App State* crate version *0.1.13+20160331*, where *20160331* is the exact revision of the *appstate:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.13*. //! //! Everything else about the *App State* *v1* API can be found at the //! [official documentation site](https://developers.google.com/games/services/web/api/states). diff --git a/gen/appstate1/src/lib.rs.in b/gen/appstate1/src/lib.rs.in index 26c58b1aa1..2522dbce60 100644 --- a/gen/appstate1/src/lib.rs.in +++ b/gen/appstate1/src/lib.rs.in @@ -134,7 +134,7 @@ impl<'a, C, A> AppState AppState { client: RefCell::new(client), auth: RefCell::new(authenticator), - _user_agent: "google-api-rust-client/0.1.12".to_string(), + _user_agent: "google-api-rust-client/0.1.13".to_string(), } } @@ -143,7 +143,7 @@ impl<'a, C, A> AppState } /// Set the user-agent header field to use in all requests to the server. - /// It defaults to `google-api-rust-client/0.1.12`. + /// It defaults to `google-api-rust-client/0.1.13`. /// /// Returns the previously set user-agent. pub fn user_agent(&mut self, agent_name: String) -> String { @@ -436,7 +436,7 @@ impl<'a, C, A> StateDeleteCall<'a, C, A> where C: BorrowMut, A: o /// Perform the operation you have build so far. pub fn doit(mut self) -> Result { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -504,8 +504,7 @@ impl<'a, C, A> StateDeleteCall<'a, C, A> where C: BorrowMut, A: o } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Delete, &url) @@ -661,7 +660,7 @@ impl<'a, C, A> StateGetCall<'a, C, A> where C: BorrowMut, A: oaut /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, GetResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -730,8 +729,7 @@ impl<'a, C, A> StateGetCall<'a, C, A> where C: BorrowMut, A: oaut } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -899,7 +897,7 @@ impl<'a, C, A> StateClearCall<'a, C, A> where C: BorrowMut, A: oa /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, WriteResult)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -971,8 +969,7 @@ impl<'a, C, A> StateClearCall<'a, C, A> where C: BorrowMut, A: oa } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Post, &url) @@ -1146,7 +1143,7 @@ impl<'a, C, A> StateListCall<'a, C, A> where C: BorrowMut, A: oau /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, ListResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -1196,8 +1193,7 @@ impl<'a, C, A> StateListCall<'a, C, A> where C: BorrowMut, A: oau } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -1369,7 +1365,7 @@ impl<'a, C, A> StateUpdateCall<'a, C, A> where C: BorrowMut, A: o /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, WriteResult)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -1452,8 +1448,7 @@ impl<'a, C, A> StateUpdateCall<'a, C, A> where C: BorrowMut, A: o } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); diff --git a/gen/autoscaler1_beta2-cli/Cargo.toml b/gen/autoscaler1_beta2-cli/Cargo.toml index 2ca65b13c7..5ae4bf5140 100644 --- a/gen/autoscaler1_beta2-cli/Cargo.toml +++ b/gen/autoscaler1_beta2-cli/Cargo.toml @@ -4,7 +4,7 @@ [package] name = "google-autoscaler1_beta2-cli" -version = "0.3.3+20150629" +version = "0.3.4+20150629" authors = ["Sebastian Thiel "] description = "A complete library to interact with autoscaler (protocol v1beta2)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/autoscaler1_beta2-cli" @@ -17,18 +17,18 @@ keywords = ["autoscaler", "google", "cli"] name = "autoscaler1-beta2" [dependencies] -hyper = "0.7" -mime = "0.1.0" -serde = ">= 0.7.0" -serde_json = ">= 0.7.0" -yup-oauth2 = ">= 0.5.4" +hyper = "0.8" +mime = "0.2.0" +serde = "0.6.0" +serde_json = "0.6.0" +yup-oauth2 = ">= 0.5.6" strsim = "0.4" yup-hyper-mock = "1.0" clap = "2.0" [build-dependencies] -syntex = { version = ">= 0.23" } -serde_codegen = { version = ">= 0.6" } +syntex = { version = "= 0.28" } +serde_codegen = { version = "= 0.6.13" } [dependencies.google-autoscaler1_beta2] diff --git a/gen/autoscaler1_beta2-cli/README.md b/gen/autoscaler1_beta2-cli/README.md index 548c59cef9..2a1a24575b 100644 --- a/gen/autoscaler1_beta2-cli/README.md +++ b/gen/autoscaler1_beta2-cli/README.md @@ -17,14 +17,14 @@ Everything else about the *autoscaler* API can be found at the You can download the pre-compiled 64bit binaries for the following platforms: -* ![icon](http://megaicons.net/static/img/icons_sizes/6/140/16/ubuntu-icon.png) [ubuntu](http://dl.byronimo.de/google.rs/cli/0.3.3/ubuntu/autoscaler1-beta2.tar.gz) -* ![icon](http://hydra-media.cursecdn.com/wow.gamepedia.com/a/a2/Apple-icon-16x16.png?version=25ddd67ac3dd3b634478e3978b76cb74) [osx](http://dl.byronimo.de/google.rs/cli/0.3.3/osx/autoscaler1-beta2.tar.gz) +* ![icon](http://megaicons.net/static/img/icons_sizes/6/140/16/ubuntu-icon.png) [ubuntu](http://dl.byronimo.de/google.rs/cli/0.3.4/ubuntu/autoscaler1-beta2.tar.gz) +* ![icon](http://hydra-media.cursecdn.com/wow.gamepedia.com/a/a2/Apple-icon-16x16.png?version=25ddd67ac3dd3b634478e3978b76cb74) [osx](http://dl.byronimo.de/google.rs/cli/0.3.4/osx/autoscaler1-beta2.tar.gz) Find the source code [on github](https://github.com/Byron/google-apis-rs/tree/master/gen/autoscaler1_beta2-cli). # Usage -This documentation was generated from the *autoscaler* API at revision *20150629*. The CLI is at version *0.3.3*. +This documentation was generated from the *autoscaler* API at revision *20150629*. The CLI is at version *0.3.4*. ```bash autoscaler1-beta2 [options] diff --git a/gen/autoscaler1_beta2-cli/mkdocs.yml b/gen/autoscaler1_beta2-cli/mkdocs.yml index c3ddb9e841..64212ed90d 100644 --- a/gen/autoscaler1_beta2-cli/mkdocs.yml +++ b/gen/autoscaler1_beta2-cli/mkdocs.yml @@ -1,4 +1,4 @@ -site_name: autoscaler v0.3.3+20150629 +site_name: autoscaler v0.3.4+20150629 site_url: http://byron.github.io/google-apis-rs/google-autoscaler1_beta2-cli site_description: Write integrating applications with bcore diff --git a/gen/autoscaler1_beta2-cli/src/cmn.rs b/gen/autoscaler1_beta2-cli/src/cmn.rs index 188159ee80..ae86fdef65 100644 --- a/gen/autoscaler1_beta2-cli/src/cmn.rs +++ b/gen/autoscaler1_beta2-cli/src/cmn.rs @@ -414,7 +414,7 @@ impl TokenStorage for JsonTokenStorage { Err(err) => match err.kind() { io::ErrorKind::NotFound => Ok(()), - _ => Err(json::Error::Io(err)) + _ => Err(json::Error::IoError(err)) }, Ok(_) => Ok(()), } @@ -427,7 +427,7 @@ impl TokenStorage for JsonTokenStorage { Err(serde_err) => Err(serde_err), } }, - Err(io_err) => Err(json::Error::Io(io_err)) + Err(io_err) => Err(json::Error::IoError(io_err)) } } } @@ -444,7 +444,7 @@ impl TokenStorage for JsonTokenStorage { Err(io_err) => { match io_err.kind() { io::ErrorKind::NotFound => Ok(None), - _ => Err(json::Error::Io(io_err)) + _ => Err(json::Error::IoError(io_err)) } } } @@ -683,7 +683,7 @@ pub fn application_secret_from_directory(dir: &str, = json::from_str(json_console_secret).unwrap(); match json::to_writer_pretty(&mut f, &console_secret) { Err(serde_err) => match serde_err { - json::Error::Io(err) => err, + json::Error::IoError(err) => err, _ => panic!("Unexpected serde error: {:#?}", serde_err) }, Ok(_) => continue, @@ -696,7 +696,7 @@ pub fn application_secret_from_directory(dir: &str, }, Ok(f) => { match json::de::from_reader::<_, ConsoleApplicationSecret>(f) { - Err(json::Error::Io(err)) => + Err(json::Error::IoError(err)) => return secret_io_error(err), Err(json_err) => return Err(CLIError::Configuration( diff --git a/gen/autoscaler1_beta2-cli/src/main.rs b/gen/autoscaler1_beta2-cli/src/main.rs index 9ba4514d9e..53c3200426 100644 --- a/gen/autoscaler1_beta2-cli/src/main.rs +++ b/gen/autoscaler1_beta2-cli/src/main.rs @@ -1195,7 +1195,7 @@ fn main() { let mut app = App::new("autoscaler1-beta2") .author("Sebastian Thiel ") - .version("0.3.3+20150629") + .version("0.3.4+20150629") .about("The Google Compute Engine Autoscaler API provides autoscaling for groups of Cloud VMs.") .after_help("All documentation details can be found at http://byron.github.io/google-apis-rs/google_autoscaler1_beta2_cli") .arg(Arg::with_name("url") diff --git a/gen/autoscaler1_beta2/Cargo.toml b/gen/autoscaler1_beta2/Cargo.toml index adb0501d48..86b455abff 100644 --- a/gen/autoscaler1_beta2/Cargo.toml +++ b/gen/autoscaler1_beta2/Cargo.toml @@ -4,7 +4,7 @@ [package] name = "google-autoscaler1_beta2" -version = "0.1.12+20150629" +version = "0.1.13+20150629" authors = ["Sebastian Thiel "] description = "A complete library to interact with autoscaler (protocol v1beta2)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/autoscaler1_beta2" @@ -16,14 +16,14 @@ build = "src/build.rs" [dependencies] -hyper = "0.7" -mime = "0.1.0" -serde = ">= 0.7.0" -serde_json = ">= 0.7.0" -yup-oauth2 = ">= 0.5.4" +hyper = "0.8" +mime = "0.2.0" +serde = "0.6.0" +serde_json = "0.6.0" +yup-oauth2 = ">= 0.5.6" url = ">= 0.5" [build-dependencies] -syntex = { version = ">= 0.23" } -serde_codegen = { version = ">= 0.6" } +syntex = { version = "= 0.28" } +serde_codegen = { version = "= 0.6.13" } diff --git a/gen/autoscaler1_beta2/README.md b/gen/autoscaler1_beta2/README.md index 4d2aec0234..545b4dd937 100644 --- a/gen/autoscaler1_beta2/README.md +++ b/gen/autoscaler1_beta2/README.md @@ -5,7 +5,7 @@ DO NOT EDIT ! --> The `google-autoscaler1_beta2` library allows access to all features of the *Google autoscaler* service. -This documentation was generated from *autoscaler* crate version *0.1.12+20150629*, where *20150629* is the exact revision of the *autoscaler:v1beta2* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.12*. +This documentation was generated from *autoscaler* crate version *0.1.13+20150629*, where *20150629* is the exact revision of the *autoscaler:v1beta2* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.13*. Everything else about the *autoscaler* *v1_beta2* API can be found at the [official documentation site](http://developers.google.com/compute/docs/autoscaler). diff --git a/gen/autoscaler1_beta2/src/cmn.rs b/gen/autoscaler1_beta2/src/cmn.rs index 87b91a8986..c69621da55 100644 --- a/gen/autoscaler1_beta2/src/cmn.rs +++ b/gen/autoscaler1_beta2/src/cmn.rs @@ -12,7 +12,7 @@ use mime::{Mime, TopLevel, SubLevel, Attr, Value}; use oauth2::{TokenType, Retry, self}; use hyper; use hyper::header::{ContentType, ContentLength, Headers, UserAgent, Authorization, Header, - HeaderFormat}; + HeaderFormat, Bearer}; use hyper::http::h1::LINE_ENDING; use hyper::method::Method; use hyper::status::StatusCode; @@ -634,7 +634,7 @@ pub struct ResumableUploadHelper<'a, A: 'a> { pub start_at: Option, pub auth: &'a mut A, pub user_agent: &'a str, - pub auth_header: Authorization, + pub auth_header: Authorization, pub url: &'a str, pub reader: &'a mut ReadSeek, pub media_type: Mime, diff --git a/gen/autoscaler1_beta2/src/lib.rs b/gen/autoscaler1_beta2/src/lib.rs index 115e6ecf63..fbb4bd67f4 100644 --- a/gen/autoscaler1_beta2/src/lib.rs +++ b/gen/autoscaler1_beta2/src/lib.rs @@ -2,7 +2,7 @@ // This file was generated automatically from 'src/mako/api/lib.rs.mako' // DO NOT EDIT ! -//! This documentation was generated from *autoscaler* crate version *0.1.12+20150629*, where *20150629* is the exact revision of the *autoscaler:v1beta2* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.12*. +//! This documentation was generated from *autoscaler* crate version *0.1.13+20150629*, where *20150629* is the exact revision of the *autoscaler:v1beta2* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.13*. //! //! Everything else about the *autoscaler* *v1_beta2* API can be found at the //! [official documentation site](http://developers.google.com/compute/docs/autoscaler). diff --git a/gen/autoscaler1_beta2/src/lib.rs.in b/gen/autoscaler1_beta2/src/lib.rs.in index 961c8433d7..edf2c4d457 100644 --- a/gen/autoscaler1_beta2/src/lib.rs.in +++ b/gen/autoscaler1_beta2/src/lib.rs.in @@ -134,7 +134,7 @@ impl<'a, C, A> AutoscalerHub AutoscalerHub { client: RefCell::new(client), auth: RefCell::new(authenticator), - _user_agent: "google-api-rust-client/0.1.12".to_string(), + _user_agent: "google-api-rust-client/0.1.13".to_string(), } } @@ -149,7 +149,7 @@ impl<'a, C, A> AutoscalerHub } /// Set the user-agent header field to use in all requests to the server. - /// It defaults to `google-api-rust-client/0.1.12`. + /// It defaults to `google-api-rust-client/0.1.13`. /// /// Returns the previously set user-agent. pub fn user_agent(&mut self, agent_name: String) -> String { @@ -987,7 +987,7 @@ impl<'a, C, A> ZoneListCall<'a, C, A> where C: BorrowMut, A: oaut /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, ZoneList)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -1065,8 +1065,7 @@ impl<'a, C, A> ZoneListCall<'a, C, A> where C: BorrowMut, A: oaut } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -1256,7 +1255,7 @@ impl<'a, C, A> ZoneOperationListCall<'a, C, A> where C: BorrowMut /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, OperationList)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -1335,8 +1334,7 @@ impl<'a, C, A> ZoneOperationListCall<'a, C, A> where C: BorrowMut } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -1530,7 +1528,7 @@ impl<'a, C, A> ZoneOperationDeleteCall<'a, C, A> where C: BorrowMut Result { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -1600,8 +1598,7 @@ impl<'a, C, A> ZoneOperationDeleteCall<'a, C, A> where C: BorrowMut ZoneOperationGetCall<'a, C, A> where C: BorrowMut, /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Operation)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -1847,8 +1844,7 @@ impl<'a, C, A> ZoneOperationGetCall<'a, C, A> where C: BorrowMut, } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -2038,7 +2034,7 @@ impl<'a, C, A> AutoscalerListCall<'a, C, A> where C: BorrowMut, A /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, AutoscalerListResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -2117,8 +2113,7 @@ impl<'a, C, A> AutoscalerListCall<'a, C, A> where C: BorrowMut, A } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -2321,7 +2316,7 @@ impl<'a, C, A> AutoscalerUpdateCall<'a, C, A> where C: BorrowMut, /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Operation)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -2403,8 +2398,7 @@ impl<'a, C, A> AutoscalerUpdateCall<'a, C, A> where C: BorrowMut, } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -2612,7 +2606,7 @@ impl<'a, C, A> AutoscalerPatchCall<'a, C, A> where C: BorrowMut, /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Operation)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -2694,8 +2688,7 @@ impl<'a, C, A> AutoscalerPatchCall<'a, C, A> where C: BorrowMut, } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -2896,7 +2889,7 @@ impl<'a, C, A> AutoscalerDeleteCall<'a, C, A> where C: BorrowMut, /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Operation)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -2967,8 +2960,7 @@ impl<'a, C, A> AutoscalerDeleteCall<'a, C, A> where C: BorrowMut, } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Delete, &url) @@ -3162,7 +3154,7 @@ impl<'a, C, A> AutoscalerInsertCall<'a, C, A> where C: BorrowMut, /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Operation)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -3243,8 +3235,7 @@ impl<'a, C, A> AutoscalerInsertCall<'a, C, A> where C: BorrowMut, } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -3435,7 +3426,7 @@ impl<'a, C, A> AutoscalerGetCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Autoscaler)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -3506,8 +3497,7 @@ impl<'a, C, A> AutoscalerGetCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) diff --git a/gen/bigquery2-cli/Cargo.toml b/gen/bigquery2-cli/Cargo.toml index 1609ba2a00..6d624c6fcf 100644 --- a/gen/bigquery2-cli/Cargo.toml +++ b/gen/bigquery2-cli/Cargo.toml @@ -4,7 +4,7 @@ [package] name = "google-bigquery2-cli" -version = "0.3.3+20160222" +version = "0.3.4+20160408" authors = ["Sebastian Thiel "] description = "A complete library to interact with bigquery (protocol v2)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/bigquery2-cli" @@ -17,18 +17,18 @@ keywords = ["bigquery", "google", "cli"] name = "bigquery2" [dependencies] -hyper = "0.7" -mime = "0.1.0" -serde = ">= 0.7.0" -serde_json = ">= 0.7.0" -yup-oauth2 = ">= 0.5.4" +hyper = "0.8" +mime = "0.2.0" +serde = "0.6.0" +serde_json = "0.6.0" +yup-oauth2 = ">= 0.5.6" strsim = "0.4" yup-hyper-mock = "1.0" clap = "2.0" [build-dependencies] -syntex = { version = ">= 0.23" } -serde_codegen = { version = ">= 0.6" } +syntex = { version = "= 0.28" } +serde_codegen = { version = "= 0.6.13" } [dependencies.google-bigquery2] diff --git a/gen/bigquery2-cli/README.md b/gen/bigquery2-cli/README.md index d4c9d2a8ee..7f84a220e8 100644 --- a/gen/bigquery2-cli/README.md +++ b/gen/bigquery2-cli/README.md @@ -17,14 +17,14 @@ Everything else about the *bigquery* API can be found at the You can download the pre-compiled 64bit binaries for the following platforms: -* ![icon](http://megaicons.net/static/img/icons_sizes/6/140/16/ubuntu-icon.png) [ubuntu](http://dl.byronimo.de/google.rs/cli/0.3.3/ubuntu/bigquery2.tar.gz) -* ![icon](http://hydra-media.cursecdn.com/wow.gamepedia.com/a/a2/Apple-icon-16x16.png?version=25ddd67ac3dd3b634478e3978b76cb74) [osx](http://dl.byronimo.de/google.rs/cli/0.3.3/osx/bigquery2.tar.gz) +* ![icon](http://megaicons.net/static/img/icons_sizes/6/140/16/ubuntu-icon.png) [ubuntu](http://dl.byronimo.de/google.rs/cli/0.3.4/ubuntu/bigquery2.tar.gz) +* ![icon](http://hydra-media.cursecdn.com/wow.gamepedia.com/a/a2/Apple-icon-16x16.png?version=25ddd67ac3dd3b634478e3978b76cb74) [osx](http://dl.byronimo.de/google.rs/cli/0.3.4/osx/bigquery2.tar.gz) Find the source code [on github](https://github.com/Byron/google-apis-rs/tree/master/gen/bigquery2-cli). # Usage -This documentation was generated from the *bigquery* API at revision *20160222*. The CLI is at version *0.3.3*. +This documentation was generated from the *bigquery* API at revision *20160408*. The CLI is at version *0.3.4*. ```bash bigquery2 [options] diff --git a/gen/bigquery2-cli/mkdocs.yml b/gen/bigquery2-cli/mkdocs.yml index a76346c58a..0b3b48b5c2 100644 --- a/gen/bigquery2-cli/mkdocs.yml +++ b/gen/bigquery2-cli/mkdocs.yml @@ -1,4 +1,4 @@ -site_name: bigquery v0.3.3+20160222 +site_name: bigquery v0.3.4+20160408 site_url: http://byron.github.io/google-apis-rs/google-bigquery2-cli site_description: Write integrating applications with bcore diff --git a/gen/bigquery2-cli/src/cmn.rs b/gen/bigquery2-cli/src/cmn.rs index 188159ee80..ae86fdef65 100644 --- a/gen/bigquery2-cli/src/cmn.rs +++ b/gen/bigquery2-cli/src/cmn.rs @@ -414,7 +414,7 @@ impl TokenStorage for JsonTokenStorage { Err(err) => match err.kind() { io::ErrorKind::NotFound => Ok(()), - _ => Err(json::Error::Io(err)) + _ => Err(json::Error::IoError(err)) }, Ok(_) => Ok(()), } @@ -427,7 +427,7 @@ impl TokenStorage for JsonTokenStorage { Err(serde_err) => Err(serde_err), } }, - Err(io_err) => Err(json::Error::Io(io_err)) + Err(io_err) => Err(json::Error::IoError(io_err)) } } } @@ -444,7 +444,7 @@ impl TokenStorage for JsonTokenStorage { Err(io_err) => { match io_err.kind() { io::ErrorKind::NotFound => Ok(None), - _ => Err(json::Error::Io(io_err)) + _ => Err(json::Error::IoError(io_err)) } } } @@ -683,7 +683,7 @@ pub fn application_secret_from_directory(dir: &str, = json::from_str(json_console_secret).unwrap(); match json::to_writer_pretty(&mut f, &console_secret) { Err(serde_err) => match serde_err { - json::Error::Io(err) => err, + json::Error::IoError(err) => err, _ => panic!("Unexpected serde error: {:#?}", serde_err) }, Ok(_) => continue, @@ -696,7 +696,7 @@ pub fn application_secret_from_directory(dir: &str, }, Ok(f) => { match json::de::from_reader::<_, ConsoleApplicationSecret>(f) { - Err(json::Error::Io(err)) => + Err(json::Error::IoError(err)) => return secret_io_error(err), Err(json_err) => return Err(CLIError::Configuration( diff --git a/gen/bigquery2-cli/src/main.rs b/gen/bigquery2-cli/src/main.rs index 0a2cd1428a..429229f560 100644 --- a/gen/bigquery2-cli/src/main.rs +++ b/gen/bigquery2-cli/src/main.rs @@ -1342,6 +1342,7 @@ impl<'n> Engine<'n> { "external-data-configuration.max-bad-records" => Some(("externalDataConfiguration.maxBadRecords", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), "external-data-configuration.ignore-unknown-values" => Some(("externalDataConfiguration.ignoreUnknownValues", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), "external-data-configuration.source-uris" => Some(("externalDataConfiguration.sourceUris", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Vec })), + "external-data-configuration.bigtable-options.ignore-unspecified-column-families" => Some(("externalDataConfiguration.bigtableOptions.ignoreUnspecifiedColumnFamilies", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), "external-data-configuration.source-format" => Some(("externalDataConfiguration.sourceFormat", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "location" => Some(("location", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "friendly-name" => Some(("friendlyName", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), @@ -1351,7 +1352,7 @@ impl<'n> Engine<'n> { "self-link" => Some(("selfLink", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "view.query" => Some(("view.query", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), _ => { - let suggestion = FieldCursor::did_you_mean(key, &vec!["allow-jagged-rows", "allow-quoted-newlines", "autodetect", "compression", "creation-time", "csv-options", "dataset-id", "description", "encoding", "estimated-bytes", "estimated-rows", "etag", "expiration-time", "external-data-configuration", "field-delimiter", "friendly-name", "id", "ignore-unknown-values", "kind", "last-modified-time", "location", "max-bad-records", "num-bytes", "num-rows", "oldest-entry-time", "project-id", "query", "quote", "self-link", "skip-leading-rows", "source-format", "source-uris", "streaming-buffer", "table-id", "table-reference", "type", "view"]); + let suggestion = FieldCursor::did_you_mean(key, &vec!["allow-jagged-rows", "allow-quoted-newlines", "autodetect", "bigtable-options", "compression", "creation-time", "csv-options", "dataset-id", "description", "encoding", "estimated-bytes", "estimated-rows", "etag", "expiration-time", "external-data-configuration", "field-delimiter", "friendly-name", "id", "ignore-unknown-values", "ignore-unspecified-column-families", "kind", "last-modified-time", "location", "max-bad-records", "num-bytes", "num-rows", "oldest-entry-time", "project-id", "query", "quote", "self-link", "skip-leading-rows", "source-format", "source-uris", "streaming-buffer", "table-id", "table-reference", "type", "view"]); err.issues.push(CLIError::Field(FieldError::Unknown(temp_cursor.to_string(), suggestion, value.map(|v| v.to_string())))); None } @@ -1517,6 +1518,7 @@ impl<'n> Engine<'n> { "external-data-configuration.max-bad-records" => Some(("externalDataConfiguration.maxBadRecords", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), "external-data-configuration.ignore-unknown-values" => Some(("externalDataConfiguration.ignoreUnknownValues", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), "external-data-configuration.source-uris" => Some(("externalDataConfiguration.sourceUris", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Vec })), + "external-data-configuration.bigtable-options.ignore-unspecified-column-families" => Some(("externalDataConfiguration.bigtableOptions.ignoreUnspecifiedColumnFamilies", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), "external-data-configuration.source-format" => Some(("externalDataConfiguration.sourceFormat", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "location" => Some(("location", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "friendly-name" => Some(("friendlyName", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), @@ -1526,7 +1528,7 @@ impl<'n> Engine<'n> { "self-link" => Some(("selfLink", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "view.query" => Some(("view.query", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), _ => { - let suggestion = FieldCursor::did_you_mean(key, &vec!["allow-jagged-rows", "allow-quoted-newlines", "autodetect", "compression", "creation-time", "csv-options", "dataset-id", "description", "encoding", "estimated-bytes", "estimated-rows", "etag", "expiration-time", "external-data-configuration", "field-delimiter", "friendly-name", "id", "ignore-unknown-values", "kind", "last-modified-time", "location", "max-bad-records", "num-bytes", "num-rows", "oldest-entry-time", "project-id", "query", "quote", "self-link", "skip-leading-rows", "source-format", "source-uris", "streaming-buffer", "table-id", "table-reference", "type", "view"]); + let suggestion = FieldCursor::did_you_mean(key, &vec!["allow-jagged-rows", "allow-quoted-newlines", "autodetect", "bigtable-options", "compression", "creation-time", "csv-options", "dataset-id", "description", "encoding", "estimated-bytes", "estimated-rows", "etag", "expiration-time", "external-data-configuration", "field-delimiter", "friendly-name", "id", "ignore-unknown-values", "ignore-unspecified-column-families", "kind", "last-modified-time", "location", "max-bad-records", "num-bytes", "num-rows", "oldest-entry-time", "project-id", "query", "quote", "self-link", "skip-leading-rows", "source-format", "source-uris", "streaming-buffer", "table-id", "table-reference", "type", "view"]); err.issues.push(CLIError::Field(FieldError::Unknown(temp_cursor.to_string(), suggestion, value.map(|v| v.to_string())))); None } @@ -1633,6 +1635,7 @@ impl<'n> Engine<'n> { "external-data-configuration.max-bad-records" => Some(("externalDataConfiguration.maxBadRecords", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), "external-data-configuration.ignore-unknown-values" => Some(("externalDataConfiguration.ignoreUnknownValues", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), "external-data-configuration.source-uris" => Some(("externalDataConfiguration.sourceUris", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Vec })), + "external-data-configuration.bigtable-options.ignore-unspecified-column-families" => Some(("externalDataConfiguration.bigtableOptions.ignoreUnspecifiedColumnFamilies", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), "external-data-configuration.source-format" => Some(("externalDataConfiguration.sourceFormat", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "location" => Some(("location", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "friendly-name" => Some(("friendlyName", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), @@ -1642,7 +1645,7 @@ impl<'n> Engine<'n> { "self-link" => Some(("selfLink", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "view.query" => Some(("view.query", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), _ => { - let suggestion = FieldCursor::did_you_mean(key, &vec!["allow-jagged-rows", "allow-quoted-newlines", "autodetect", "compression", "creation-time", "csv-options", "dataset-id", "description", "encoding", "estimated-bytes", "estimated-rows", "etag", "expiration-time", "external-data-configuration", "field-delimiter", "friendly-name", "id", "ignore-unknown-values", "kind", "last-modified-time", "location", "max-bad-records", "num-bytes", "num-rows", "oldest-entry-time", "project-id", "query", "quote", "self-link", "skip-leading-rows", "source-format", "source-uris", "streaming-buffer", "table-id", "table-reference", "type", "view"]); + let suggestion = FieldCursor::did_you_mean(key, &vec!["allow-jagged-rows", "allow-quoted-newlines", "autodetect", "bigtable-options", "compression", "creation-time", "csv-options", "dataset-id", "description", "encoding", "estimated-bytes", "estimated-rows", "etag", "expiration-time", "external-data-configuration", "field-delimiter", "friendly-name", "id", "ignore-unknown-values", "ignore-unspecified-column-families", "kind", "last-modified-time", "location", "max-bad-records", "num-bytes", "num-rows", "oldest-entry-time", "project-id", "query", "quote", "self-link", "skip-leading-rows", "source-format", "source-uris", "streaming-buffer", "table-id", "table-reference", "type", "view"]); err.issues.push(CLIError::Field(FieldError::Unknown(temp_cursor.to_string(), suggestion, value.map(|v| v.to_string())))); None } @@ -2542,7 +2545,7 @@ fn main() { let mut app = App::new("bigquery2") .author("Sebastian Thiel ") - .version("0.3.3+20160222") + .version("0.3.4+20160408") .about("A data platform for customers to create, manage, share and query data.") .after_help("All documentation details can be found at http://byron.github.io/google-apis-rs/google_bigquery2_cli") .arg(Arg::with_name("url") diff --git a/gen/bigquery2/Cargo.toml b/gen/bigquery2/Cargo.toml index b03f703111..3f2851dbcc 100644 --- a/gen/bigquery2/Cargo.toml +++ b/gen/bigquery2/Cargo.toml @@ -4,7 +4,7 @@ [package] name = "google-bigquery2" -version = "0.1.12+20160222" +version = "0.1.13+20160408" authors = ["Sebastian Thiel "] description = "A complete library to interact with bigquery (protocol v2)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/bigquery2" @@ -16,14 +16,14 @@ build = "src/build.rs" [dependencies] -hyper = "0.7" -mime = "0.1.0" -serde = ">= 0.7.0" -serde_json = ">= 0.7.0" -yup-oauth2 = ">= 0.5.4" +hyper = "0.8" +mime = "0.2.0" +serde = "0.6.0" +serde_json = "0.6.0" +yup-oauth2 = ">= 0.5.6" url = ">= 0.5" [build-dependencies] -syntex = { version = ">= 0.23" } -serde_codegen = { version = ">= 0.6" } +syntex = { version = "= 0.28" } +serde_codegen = { version = "= 0.6.13" } diff --git a/gen/bigquery2/README.md b/gen/bigquery2/README.md index ee531ee66a..dce0d2efa8 100644 --- a/gen/bigquery2/README.md +++ b/gen/bigquery2/README.md @@ -5,7 +5,7 @@ DO NOT EDIT ! --> The `google-bigquery2` library allows access to all features of the *Google bigquery* service. -This documentation was generated from *bigquery* crate version *0.1.12+20160222*, where *20160222* is the exact revision of the *bigquery:v2* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.12*. +This documentation was generated from *bigquery* crate version *0.1.13+20160408*, where *20160408* is the exact revision of the *bigquery:v2* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.13*. Everything else about the *bigquery* *v2* API can be found at the [official documentation site](https://cloud.google.com/bigquery/). diff --git a/gen/bigquery2/src/cmn.rs b/gen/bigquery2/src/cmn.rs index 87b91a8986..c69621da55 100644 --- a/gen/bigquery2/src/cmn.rs +++ b/gen/bigquery2/src/cmn.rs @@ -12,7 +12,7 @@ use mime::{Mime, TopLevel, SubLevel, Attr, Value}; use oauth2::{TokenType, Retry, self}; use hyper; use hyper::header::{ContentType, ContentLength, Headers, UserAgent, Authorization, Header, - HeaderFormat}; + HeaderFormat, Bearer}; use hyper::http::h1::LINE_ENDING; use hyper::method::Method; use hyper::status::StatusCode; @@ -634,7 +634,7 @@ pub struct ResumableUploadHelper<'a, A: 'a> { pub start_at: Option, pub auth: &'a mut A, pub user_agent: &'a str, - pub auth_header: Authorization, + pub auth_header: Authorization, pub url: &'a str, pub reader: &'a mut ReadSeek, pub media_type: Mime, diff --git a/gen/bigquery2/src/lib.rs b/gen/bigquery2/src/lib.rs index 2b812b6887..721c624ecb 100644 --- a/gen/bigquery2/src/lib.rs +++ b/gen/bigquery2/src/lib.rs @@ -2,7 +2,7 @@ // This file was generated automatically from 'src/mako/api/lib.rs.mako' // DO NOT EDIT ! -//! This documentation was generated from *bigquery* crate version *0.1.12+20160222*, where *20160222* is the exact revision of the *bigquery:v2* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.12*. +//! This documentation was generated from *bigquery* crate version *0.1.13+20160408*, where *20160408* is the exact revision of the *bigquery:v2* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.13*. //! //! Everything else about the *bigquery* *v2* API can be found at the //! [official documentation site](https://cloud.google.com/bigquery/). diff --git a/gen/bigquery2/src/lib.rs.in b/gen/bigquery2/src/lib.rs.in index 5d5974d43b..6672fbb8ba 100644 --- a/gen/bigquery2/src/lib.rs.in +++ b/gen/bigquery2/src/lib.rs.in @@ -157,7 +157,7 @@ impl<'a, C, A> Bigquery Bigquery { client: RefCell::new(client), auth: RefCell::new(authenticator), - _user_agent: "google-api-rust-client/0.1.12".to_string(), + _user_agent: "google-api-rust-client/0.1.13".to_string(), } } @@ -178,7 +178,7 @@ impl<'a, C, A> Bigquery } /// Set the user-agent header field to use in all requests to the server. - /// It defaults to `google-api-rust-client/0.1.12`. + /// It defaults to `google-api-rust-client/0.1.13`. /// /// Returns the previously set user-agent. pub fn user_agent(&mut self, agent_name: String) -> String { @@ -364,7 +364,7 @@ pub struct TableFieldSchema { pub fields: Option>, /// [Optional] The field description. The maximum length is 16K characters. pub description: Option, - /// [Required] The field data type. Possible values include STRING, INTEGER, FLOAT, BOOLEAN, TIMESTAMP or RECORD (where RECORD indicates that the field contains a nested schema). + /// [Required] The field data type. Possible values include STRING, BYTES, INTEGER, FLOAT, BOOLEAN, TIMESTAMP or RECORD (where RECORD indicates that the field contains a nested schema). #[serde(rename="type")] pub type_: Option, /// [Optional] The field mode. Possible values include NULLABLE, REQUIRED and REPEATED. The default value is NULLABLE. @@ -378,55 +378,71 @@ impl Part for TableFieldSchema {} /// There is no detailed description. /// -/// # Activities -/// -/// This type is used in activities, which are methods you may call on this type or where this type is involved in. -/// The list links the activity name, along with information about where it is used (one of *request* and *response*). -/// -/// * [get datasets](struct.DatasetGetCall.html) (response) -/// * [list datasets](struct.DatasetListCall.html) (none) -/// * [patch datasets](struct.DatasetPatchCall.html) (request|response) -/// * [update datasets](struct.DatasetUpdateCall.html) (request|response) -/// * [delete datasets](struct.DatasetDeleteCall.html) (none) -/// * [insert datasets](struct.DatasetInsertCall.html) (request|response) +/// This type is not used in any activity, and only used as *part* of another schema. /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] -pub struct Dataset { - /// [Output-only] The resource type. - pub kind: Option, - /// [Optional] A user-friendly description of the dataset. - pub description: Option, - /// [Required] A reference that identifies the dataset. - #[serde(rename="datasetReference")] - pub dataset_reference: Option, - /// [Output-only] The time when this dataset was created, in milliseconds since the epoch. - #[serde(rename="creationTime")] - pub creation_time: Option, - /// [Optional] An array of objects that define dataset access for one or more entities. You can set this property when inserting or updating a dataset in order to control who is allowed to access the data. If unspecified at dataset creation time, BigQuery adds default dataset access for the following entities: access.specialGroup: projectReaders; access.role: READER; access.specialGroup: projectWriters; access.role: WRITER; access.specialGroup: projectOwners; access.role: OWNER; access.userByEmail: [dataset creator email]; access.role: OWNER; - pub access: Option>, - /// [Experimental] The default lifetime of all tables in the dataset, in milliseconds. The minimum value is 3600000 milliseconds (one hour). Once this property is set, all newly-created tables in the dataset will have an expirationTime property set to the creation time plus the value in this property, and changing the value will only affect new tables, not existing ones. When the expirationTime for a given table is reached, that table will be deleted automatically. If a table's expirationTime is modified or removed before the table expires, or if you provide an explicit expirationTime when creating a table, that value takes precedence over the default expiration time indicated by this property. - #[serde(rename="defaultTableExpirationMs")] - pub default_table_expiration_ms: Option, - /// [Output-only] A hash of the resource. - pub etag: Option, - /// [Experimental] The geographic location where the dataset should reside. Possible values include EU and US. The default value is US. - pub location: Option, - /// [Optional] A descriptive name for the dataset. - #[serde(rename="friendlyName")] - pub friendly_name: Option, - /// [Output-only] The date when this dataset or any of its tables was last modified, in milliseconds since the epoch. - #[serde(rename="lastModifiedTime")] - pub last_modified_time: Option, - /// [Output-only] The fully-qualified unique name of the dataset in the format projectId:datasetId. The dataset name without the project name is given in the datasetId field. When creating a new dataset, leave this field blank, and instead specify the datasetId field. - pub id: Option, - /// [Output-only] A URL that can be used to access the resource again. You can use this URL in Get or Update requests to the resource. - #[serde(rename="selfLink")] - pub self_link: Option, +pub struct BigtableColumnFamily { + /// [Optional] The encoding of the values when the type is not STRING. Acceptable encoding values are: TEXT - indicates values are alphanumeric text strings. BINARY - indicates values are encoded using HBase Bytes.toBytes family of functions. This can be overridden for a specific column by listing that column in 'columns' and specifying an encoding for it. + pub encoding: Option, + /// [Optional] The type to convert the value in cells of this column family. The values are expected to be encoded using HBase Bytes.toBytes function when using the BINARY encoding value. Following BigQuery types are allowed (case-sensitive) - BYTES STRING INTEGER FLOAT BOOLEAN Defaut type is BYTES. This can be overridden for a specific column by listing that column in 'columns' and specifying a type for it. + #[serde(rename="type")] + pub type_: Option, + /// [Optional] If this is set only the latest version of value are exposed for all columns in this column family. This can be overridden for a specific column by listing that column in 'columns' and specifying a different setting for that column. + #[serde(rename="onlyReadLatest")] + pub only_read_latest: Option, + /// [Optional] Lists of columns that should be exposed as individual fields as opposed to a list of (column name, value) pairs. All columns whose qualifier matches a qualifier in this list can be accessed as .. Other columns can be accessed as a list through .Column field. + pub columns: Option>, + /// Identifier of the column family. + #[serde(rename="familyId")] + pub family_id: Option, } -impl RequestValue for Dataset {} -impl Resource for Dataset {} -impl ResponseResult for Dataset {} +impl Part for BigtableColumnFamily {} + + +/// There is no detailed description. +/// +/// This type is not used in any activity, and only used as *part* of another schema. +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct BigtableOptions { + /// [Optional] If field is true, then the column families that are not specified in columnFamilies list are not exposed in the table schema. Otherwise, they are read with BYTES type values. The default value is false. + #[serde(rename="ignoreUnspecifiedColumnFamilies")] + pub ignore_unspecified_column_families: Option, + /// [Optional] List of column families to expose in the table schema along with their types. This list restricts the column families that can be referenced in queries and specifies their value types. You can use this list to do type conversions - see the 'type' field for more details. If you leave this list empty, all column families are present in the table schema and their values are read as BYTES. During a query only the column families referenced in that query are read from Bigtable. + #[serde(rename="columnFamilies")] + pub column_families: Option>, +} + +impl Part for BigtableOptions {} + + +/// There is no detailed description. +/// +/// This type is not used in any activity, and only used as *part* of another schema. +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct BigtableColumn { + /// [Required] Qualifier of the column. Columns in the parent column family that has this exact qualifier are exposed as . field. If the qualifier is valid UTF-8 string, it can be specified in the qualifier_string field. Otherwise, a base-64 encoded value must be set to qualifier_encoded. The column field name is the same as the column qualifier. However, if the qualifier is not a valid BigQuery field identifier i.e. does not match [a-zA-Z][a-zA-Z0-9_]*, a valid identifier must be provided as field_name. + #[serde(rename="qualifierEncoded")] + pub qualifier_encoded: Option, + /// [Optional] If the qualifier is not a valid BigQuery field identifier i.e. does not match [a-zA-Z][a-zA-Z0-9_]*, a valid identifier must be provided as the column field name and is used as field name in queries. + #[serde(rename="fieldName")] + pub field_name: Option, + /// [Optional] If this is set, only the latest version of value in this column are exposed. 'onlyReadLatest' can also be set at the column family level. However, the setting at this level takes precedence if 'onlyReadLatest' is set at both levels. + #[serde(rename="onlyReadLatest")] + pub only_read_latest: Option, + /// [Optional] The encoding of the values when the type is not STRING. Acceptable encoding values are: TEXT - indicates values are alphanumeric text strings. BINARY - indicates values are encoded using HBase Bytes.toBytes family of functions. 'encoding' can also be set at the column family level. However, the setting at this level takes precedence if 'encoding' is set at both levels. + pub encoding: Option, + /// no description provided + #[serde(rename="qualifierString")] + pub qualifier_string: Option, + /// [Optional] The type to convert the value in cells of this column. The values are expected to be encoded using HBase Bytes.toBytes function when using the BINARY encoding value. Following BigQuery types are allowed (case-sensitive) - BYTES STRING INTEGER FLOAT BOOLEAN Defaut type is BYTES. 'type' can also be set at the column family level. However, the setting at this level takes precedence if 'type' is set at both levels. + #[serde(rename="type")] + pub type_: Option, +} + +impl Part for BigtableColumn {} /// An array of errors for rows that were not inserted. @@ -564,21 +580,17 @@ pub struct Streamingbuffer { impl Part for Streamingbuffer {} -/// There is no detailed description. +/// [Required] A partition configuration. Only one type of partition should be configured. /// /// This type is not used in any activity, and only used as *part* of another schema. /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] -pub struct UserDefinedFunctionResource { - /// [Pick one] A code resource to load from a Google Cloud Storage URI (gs://bucket/path). - #[serde(rename="resourceUri")] - pub resource_uri: Option, - /// [Pick one] An inline resource that contains code for a user-defined function (UDF). Providing a inline code resource is equivalent to providing a URI for a file containing the same code. - #[serde(rename="inlineCode")] - pub inline_code: Option, +pub struct TablePartitionConfiguration { + /// [Pick one] Configures an interval partition. + pub interval: Option, } -impl Part for UserDefinedFunctionResource {} +impl Part for TablePartitionConfiguration {} /// Tables in the requested dataset. @@ -779,7 +791,7 @@ pub struct JobConfigurationLoad { /// [Optional] The separator for fields in a CSV file. The separator can be any ISO-8859-1 single-byte character. To use a character in the range 128-255, you must encode the character as UTF8. BigQuery converts the string to ISO-8859-1 encoding, and then uses the first byte of the encoded string to split the data in its raw, binary state. BigQuery also supports the escape sequence "\t" to specify a tab separator. The default value is a comma (','). #[serde(rename="fieldDelimiter")] pub field_delimiter: Option, - /// [Optional] The format of the data files. For CSV files, specify "CSV". For datastore backups, specify "DATASTORE_BACKUP". For newline-delimited JSON, specify "NEWLINE_DELIMITED_JSON". The default value is CSV. + /// [Optional] The format of the data files. For CSV files, specify "CSV". For datastore backups, specify "DATASTORE_BACKUP". For newline-delimited JSON, specify "NEWLINE_DELIMITED_JSON". For Avro, specify "AVRO". The default value is CSV. #[serde(rename="sourceFormat")] pub source_format: Option, /// [Optional] The maximum number of bad records that BigQuery can ignore when running the job. If the number of bad records exceeds this value, an invalid error is returned in the job result. The default value is 0, which requires that all records are valid. @@ -866,6 +878,23 @@ pub struct JobConfigurationExtract { impl Part for JobConfigurationExtract {} +/// There is no detailed description. +/// +/// This type is not used in any activity, and only used as *part* of another schema. +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct UserDefinedFunctionResource { + /// [Pick one] A code resource to load from a Google Cloud Storage URI (gs://bucket/path). + #[serde(rename="resourceUri")] + pub resource_uri: Option, + /// [Pick one] An inline resource that contains code for a user-defined function (UDF). Providing a inline code resource is equivalent to providing a URI for a file containing the same code. + #[serde(rename="inlineCode")] + pub inline_code: Option, +} + +impl Part for UserDefinedFunctionResource {} + + /// There is no detailed description. /// /// # Activities @@ -910,6 +939,26 @@ pub struct GetQueryResultsResponse { impl ResponseResult for GetQueryResultsResponse {} +/// There is no detailed description. +/// +/// This type is not used in any activity, and only used as *part* of another schema. +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct TableReference { + /// [Required] The ID of the project containing this table. + #[serde(rename="projectId")] + pub project_id: Option, + /// [Required] The ID of the table. The ID must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_). The maximum length is 1,024 characters. + #[serde(rename="tableId")] + pub table_id: Option, + /// [Required] The ID of the dataset containing this table. + #[serde(rename="datasetId")] + pub dataset_id: Option, +} + +impl Part for TableReference {} + + /// There is no detailed description. /// /// This type is not used in any activity, and only used as *part* of another schema. @@ -943,26 +992,29 @@ impl Part for CsvOptions {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ExternalDataConfiguration { - /// [Optional] The compression type of the data source. Possible values include GZIP and NONE. The default value is NONE. This setting is ignored for Google Cloud Datastore backups and Avro. + /// [Optional] The compression type of the data source. Possible values include GZIP and NONE. The default value is NONE. This setting is ignored for Google Cloud Bigtable, Google Cloud Datastore backups and Avro formats. pub compression: Option, /// Additional properties to set if sourceFormat is set to CSV. #[serde(rename="csvOptions")] pub csv_options: Option, /// [Experimental] Try to detect schema and format options automatically. Any option specified explicitly will be honored. pub autodetect: Option, - /// [Optional] The maximum number of bad records that BigQuery can ignore when reading data. If the number of bad records exceeds this value, an invalid error is returned in the job result. The default value is 0, which requires that all records are valid. This setting is ignored for Google Cloud Datastore backups and Avro. + /// [Optional] The maximum number of bad records that BigQuery can ignore when reading data. If the number of bad records exceeds this value, an invalid error is returned in the job result. The default value is 0, which requires that all records are valid. This setting is ignored for Google Cloud Bigtable, Google Cloud Datastore backups and Avro formats. #[serde(rename="maxBadRecords")] pub max_bad_records: Option, - /// [Optional] Indicates if BigQuery should allow extra values that are not represented in the table schema. If true, the extra values are ignored. If false, records with extra columns are treated as bad records, and if there are too many bad records, an invalid error is returned in the job result. The default value is false. The sourceFormat property determines what BigQuery treats as an extra value: CSV: Trailing columns JSON: Named values that don't match any column names Google Cloud Datastore backups: This setting is ignored. Avro: This setting is ignored. + /// [Optional] Indicates if BigQuery should allow extra values that are not represented in the table schema. If true, the extra values are ignored. If false, records with extra columns are treated as bad records, and if there are too many bad records, an invalid error is returned in the job result. The default value is false. The sourceFormat property determines what BigQuery treats as an extra value: CSV: Trailing columns JSON: Named values that don't match any column names Google Cloud Bigtable: This setting is ignored. Google Cloud Datastore backups: This setting is ignored. Avro: This setting is ignored. #[serde(rename="ignoreUnknownValues")] pub ignore_unknown_values: Option, - /// [Required] The fully-qualified URIs that point to your data in Google Cloud Storage. Each URI can contain one '*' wildcard character and it must come after the 'bucket' name. Size limits related to load jobs apply to external data sources, plus an additional limit of 10 GB maximum size across all URIs. For Google Cloud Datastore backups, exactly one URI can be specified, and it must end with '.backup_info'. Also, the '*' wildcard character is not allowed. + /// [Required] The fully-qualified URIs that point to your data in Google Cloud. For Google Cloud Storage URIs: Each URI can contain one '*' wildcard character and it must come after the 'bucket' name. Size limits related to load jobs apply to external data sources, plus an additional limit of 10 GB maximum size across all URIs. For Google Cloud Bigtable URIs: Exactly one URI can be specified and it has be a fully specified and valid HTTPS URL for a Google Cloud Bigtable table. For Google Cloud Datastore backups, exactly one URI can be specified, and it must end with '.backup_info'. Also, the '*' wildcard character is not allowed. #[serde(rename="sourceUris")] pub source_uris: Option>, - /// [Required] The data format. For CSV files, specify "CSV". For newline-delimited JSON, specify "NEWLINE_DELIMITED_JSON". For Google Cloud Datastore backups, specify "DATASTORE_BACKUP". For Avro files, specify "AVRO". + /// [Optional] Additional options if sourceFormat is set to BIGTABLE. + #[serde(rename="bigtableOptions")] + pub bigtable_options: Option, + /// [Required] The data format. For CSV files, specify "CSV". For newline-delimited JSON, specify "NEWLINE_DELIMITED_JSON". For Avro files, specify "AVRO". For Google Cloud Datastore backups, specify "DATASTORE_BACKUP". [Experimental] For Google Cloud Bigtable, specify "BIGTABLE". Please note that reading from Google Cloud Bigtable is experimental and has to be enabled for your project. Please contact Google Cloud Support to enable this for your project. #[serde(rename="sourceFormat")] pub source_format: Option, - /// [Optional] The schema for the data. Schema is required for CSV and JSON formats. Schema is disallowed for Google Cloud Datastore backups and Avro. + /// [Optional] The schema for the data. Schema is required for CSV and JSON formats. Schema is disallowed for Google Cloud Bigtable, Cloud Datastore backups, and Avro formats. pub schema: Option, } @@ -1332,19 +1384,69 @@ impl ResponseResult for JobCancelResponse {} /// This type is not used in any activity, and only used as *part* of another schema. /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] -pub struct TableReference { - /// [Required] The ID of the project containing this table. - #[serde(rename="projectId")] - pub project_id: Option, - /// [Required] The ID of the table. The ID must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_). The maximum length is 1,024 characters. - #[serde(rename="tableId")] - pub table_id: Option, - /// [Required] The ID of the dataset containing this table. - #[serde(rename="datasetId")] - pub dataset_id: Option, +pub struct IntervalPartitionConfiguration { + /// no description provided + #[serde(rename="type")] + pub type_: Option, + /// no description provided + #[serde(rename="expirationMs")] + pub expiration_ms: Option, } -impl Part for TableReference {} +impl Part for IntervalPartitionConfiguration {} + + +/// There is no detailed description. +/// +/// # Activities +/// +/// This type is used in activities, which are methods you may call on this type or where this type is involved in. +/// The list links the activity name, along with information about where it is used (one of *request* and *response*). +/// +/// * [get datasets](struct.DatasetGetCall.html) (response) +/// * [list datasets](struct.DatasetListCall.html) (none) +/// * [patch datasets](struct.DatasetPatchCall.html) (request|response) +/// * [update datasets](struct.DatasetUpdateCall.html) (request|response) +/// * [delete datasets](struct.DatasetDeleteCall.html) (none) +/// * [insert datasets](struct.DatasetInsertCall.html) (request|response) +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct Dataset { + /// [Output-only] The resource type. + pub kind: Option, + /// [Optional] A user-friendly description of the dataset. + pub description: Option, + /// [Required] A reference that identifies the dataset. + #[serde(rename="datasetReference")] + pub dataset_reference: Option, + /// [Output-only] The time when this dataset was created, in milliseconds since the epoch. + #[serde(rename="creationTime")] + pub creation_time: Option, + /// [Optional] An array of objects that define dataset access for one or more entities. You can set this property when inserting or updating a dataset in order to control who is allowed to access the data. If unspecified at dataset creation time, BigQuery adds default dataset access for the following entities: access.specialGroup: projectReaders; access.role: READER; access.specialGroup: projectWriters; access.role: WRITER; access.specialGroup: projectOwners; access.role: OWNER; access.userByEmail: [dataset creator email]; access.role: OWNER; + pub access: Option>, + /// [Optional] The default lifetime of all tables in the dataset, in milliseconds. The minimum value is 3600000 milliseconds (one hour). Once this property is set, all newly-created tables in the dataset will have an expirationTime property set to the creation time plus the value in this property, and changing the value will only affect new tables, not existing ones. When the expirationTime for a given table is reached, that table will be deleted automatically. If a table's expirationTime is modified or removed before the table expires, or if you provide an explicit expirationTime when creating a table, that value takes precedence over the default expiration time indicated by this property. + #[serde(rename="defaultTableExpirationMs")] + pub default_table_expiration_ms: Option, + /// [Output-only] A hash of the resource. + pub etag: Option, + /// [Experimental] The geographic location where the dataset should reside. Possible values include EU and US. The default value is US. + pub location: Option, + /// [Optional] A descriptive name for the dataset. + #[serde(rename="friendlyName")] + pub friendly_name: Option, + /// [Output-only] The date when this dataset or any of its tables was last modified, in milliseconds since the epoch. + #[serde(rename="lastModifiedTime")] + pub last_modified_time: Option, + /// [Output-only] The fully-qualified unique name of the dataset in the format projectId:datasetId. The dataset name without the project name is given in the datasetId field. When creating a new dataset, leave this field blank, and instead specify the datasetId field. + pub id: Option, + /// [Output-only] A URL that can be used to access the resource again. You can use this URL in Get or Update requests to the resource. + #[serde(rename="selfLink")] + pub self_link: Option, +} + +impl RequestValue for Dataset {} +impl Resource for Dataset {} +impl ResponseResult for Dataset {} /// There is no detailed description. @@ -1371,6 +1473,9 @@ pub struct Table { /// [Output-only] The size of this table in bytes, excluding any data in the streaming buffer. #[serde(rename="numBytes")] pub num_bytes: Option, + /// [Experimental] List of partition configurations for this table. Currently only one configuration can be specified and it can only be an interval partition with type daily. + #[serde(rename="partitionConfigurations")] + pub partition_configurations: Option>, /// [Output-only] The time when this table was last modified, in milliseconds since the epoch. #[serde(rename="lastModifiedTime")] pub last_modified_time: Option, @@ -2211,7 +2316,7 @@ impl<'a, C, A> TableUpdateCall<'a, C, A> where C: BorrowMut, A: o /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Table)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -2293,8 +2398,7 @@ impl<'a, C, A> TableUpdateCall<'a, C, A> where C: BorrowMut, A: o } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -2501,7 +2605,7 @@ impl<'a, C, A> TableInsertCall<'a, C, A> where C: BorrowMut, A: o /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Table)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -2582,8 +2686,7 @@ impl<'a, C, A> TableInsertCall<'a, C, A> where C: BorrowMut, A: o } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -2777,7 +2880,7 @@ impl<'a, C, A> TableListCall<'a, C, A> where C: BorrowMut, A: oau /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, TableList)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -2853,8 +2956,7 @@ impl<'a, C, A> TableListCall<'a, C, A> where C: BorrowMut, A: oau } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -3046,7 +3148,7 @@ impl<'a, C, A> TableDeleteCall<'a, C, A> where C: BorrowMut, A: o /// Perform the operation you have build so far. pub fn doit(mut self) -> Result { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -3116,8 +3218,7 @@ impl<'a, C, A> TableDeleteCall<'a, C, A> where C: BorrowMut, A: o } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Delete, &url) @@ -3295,7 +3396,7 @@ impl<'a, C, A> TableGetCall<'a, C, A> where C: BorrowMut, A: oaut /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Table)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -3366,8 +3467,7 @@ impl<'a, C, A> TableGetCall<'a, C, A> where C: BorrowMut, A: oaut } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -3562,7 +3662,7 @@ impl<'a, C, A> TablePatchCall<'a, C, A> where C: BorrowMut, A: oa /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Table)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -3644,8 +3744,7 @@ impl<'a, C, A> TablePatchCall<'a, C, A> where C: BorrowMut, A: oa } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -3852,7 +3951,7 @@ impl<'a, C, A> DatasetPatchCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Dataset)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -3933,8 +4032,7 @@ impl<'a, C, A> DatasetPatchCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -4124,7 +4222,7 @@ impl<'a, C, A> DatasetGetCall<'a, C, A> where C: BorrowMut, A: oa /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Dataset)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -4194,8 +4292,7 @@ impl<'a, C, A> DatasetGetCall<'a, C, A> where C: BorrowMut, A: oa } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -4377,7 +4474,7 @@ impl<'a, C, A> DatasetListCall<'a, C, A> where C: BorrowMut, A: o /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, DatasetList)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -4455,8 +4552,7 @@ impl<'a, C, A> DatasetListCall<'a, C, A> where C: BorrowMut, A: o } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -4651,7 +4747,7 @@ impl<'a, C, A> DatasetUpdateCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Dataset)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -4732,8 +4828,7 @@ impl<'a, C, A> DatasetUpdateCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -4925,7 +5020,7 @@ impl<'a, C, A> DatasetDeleteCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -4997,8 +5092,7 @@ impl<'a, C, A> DatasetDeleteCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Delete, &url) @@ -5178,7 +5272,7 @@ impl<'a, C, A> DatasetInsertCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Dataset)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -5258,8 +5352,7 @@ impl<'a, C, A> DatasetInsertCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -5439,7 +5532,7 @@ impl<'a, C, A> JobCancelCall<'a, C, A> where C: BorrowMut, A: oau /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, JobCancelResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -5509,8 +5602,7 @@ impl<'a, C, A> JobCancelCall<'a, C, A> where C: BorrowMut, A: oau } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Post, &url) @@ -5693,7 +5785,7 @@ impl<'a, C, A> JobQueryCall<'a, C, A> where C: BorrowMut, A: oaut /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, QueryResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -5773,8 +5865,7 @@ impl<'a, C, A> JobQueryCall<'a, C, A> where C: BorrowMut, A: oaut } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -5962,7 +6053,7 @@ impl<'a, C, A> JobGetQueryResultCall<'a, C, A> where C: BorrowMut /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, GetQueryResultsResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -6044,8 +6135,7 @@ impl<'a, C, A> JobGetQueryResultCall<'a, C, A> where C: BorrowMut } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -6259,7 +6349,7 @@ impl<'a, C, A> JobListCall<'a, C, A> where C: BorrowMut, A: oauth /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, JobList)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -6345,8 +6435,7 @@ impl<'a, C, A> JobListCall<'a, C, A> where C: BorrowMut, A: oauth } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -6549,7 +6638,7 @@ impl<'a, C, A> JobGetCall<'a, C, A> where C: BorrowMut, A: oauth2 /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Job)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -6619,8 +6708,7 @@ impl<'a, C, A> JobGetCall<'a, C, A> where C: BorrowMut, A: oauth2 } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -6805,7 +6893,7 @@ impl<'a, C, A> JobInsertCall<'a, C, A> where C: BorrowMut, A: oau fn doit(mut self, mut reader: RS, reader_mime_type: mime::Mime, protocol: &'static str) -> Result<(hyper::client::Response, Job)> where RS: ReadSeek { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -6896,8 +6984,7 @@ impl<'a, C, A> JobInsertCall<'a, C, A> where C: BorrowMut, A: oau } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { if should_ask_dlg_for_url && (upload_url = dlg.upload_url()) == () && upload_url.is_some() { @@ -7182,7 +7269,7 @@ impl<'a, C, A> TabledataInsertAllCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, TableDataInsertAllResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -7264,8 +7351,7 @@ impl<'a, C, A> TabledataInsertAllCall<'a, C, A> where C: BorrowMut TabledataListCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, TableDataList)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -7552,8 +7638,7 @@ impl<'a, C, A> TabledataListCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -7763,7 +7848,7 @@ impl<'a, C, A> ProjectListCall<'a, C, A> where C: BorrowMut, A: o /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, ProjectList)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -7816,8 +7901,7 @@ impl<'a, C, A> ProjectListCall<'a, C, A> where C: BorrowMut, A: o } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) diff --git a/gen/blogger3-cli/Cargo.toml b/gen/blogger3-cli/Cargo.toml index 2d039a345e..d2bebb3e7c 100644 --- a/gen/blogger3-cli/Cargo.toml +++ b/gen/blogger3-cli/Cargo.toml @@ -4,7 +4,7 @@ [package] name = "google-blogger3-cli" -version = "0.3.3+20150422" +version = "0.3.4+20150422" authors = ["Sebastian Thiel "] description = "A complete library to interact with blogger (protocol v3)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/blogger3-cli" @@ -17,18 +17,18 @@ keywords = ["blogger", "google", "cli"] name = "blogger3" [dependencies] -hyper = "0.7" -mime = "0.1.0" -serde = ">= 0.7.0" -serde_json = ">= 0.7.0" -yup-oauth2 = ">= 0.5.4" +hyper = "0.8" +mime = "0.2.0" +serde = "0.6.0" +serde_json = "0.6.0" +yup-oauth2 = ">= 0.5.6" strsim = "0.4" yup-hyper-mock = "1.0" clap = "2.0" [build-dependencies] -syntex = { version = ">= 0.23" } -serde_codegen = { version = ">= 0.6" } +syntex = { version = "= 0.28" } +serde_codegen = { version = "= 0.6.13" } [dependencies.google-blogger3] diff --git a/gen/blogger3-cli/README.md b/gen/blogger3-cli/README.md index 30d4c7af68..a5250cb03c 100644 --- a/gen/blogger3-cli/README.md +++ b/gen/blogger3-cli/README.md @@ -17,14 +17,14 @@ Everything else about the *blogger* API can be found at the You can download the pre-compiled 64bit binaries for the following platforms: -* ![icon](http://megaicons.net/static/img/icons_sizes/6/140/16/ubuntu-icon.png) [ubuntu](http://dl.byronimo.de/google.rs/cli/0.3.3/ubuntu/blogger3.tar.gz) -* ![icon](http://hydra-media.cursecdn.com/wow.gamepedia.com/a/a2/Apple-icon-16x16.png?version=25ddd67ac3dd3b634478e3978b76cb74) [osx](http://dl.byronimo.de/google.rs/cli/0.3.3/osx/blogger3.tar.gz) +* ![icon](http://megaicons.net/static/img/icons_sizes/6/140/16/ubuntu-icon.png) [ubuntu](http://dl.byronimo.de/google.rs/cli/0.3.4/ubuntu/blogger3.tar.gz) +* ![icon](http://hydra-media.cursecdn.com/wow.gamepedia.com/a/a2/Apple-icon-16x16.png?version=25ddd67ac3dd3b634478e3978b76cb74) [osx](http://dl.byronimo.de/google.rs/cli/0.3.4/osx/blogger3.tar.gz) Find the source code [on github](https://github.com/Byron/google-apis-rs/tree/master/gen/blogger3-cli). # Usage -This documentation was generated from the *blogger* API at revision *20150422*. The CLI is at version *0.3.3*. +This documentation was generated from the *blogger* API at revision *20150422*. The CLI is at version *0.3.4*. ```bash blogger3 [options] diff --git a/gen/blogger3-cli/mkdocs.yml b/gen/blogger3-cli/mkdocs.yml index 10acb57639..d9a06d95eb 100644 --- a/gen/blogger3-cli/mkdocs.yml +++ b/gen/blogger3-cli/mkdocs.yml @@ -1,4 +1,4 @@ -site_name: blogger v0.3.3+20150422 +site_name: blogger v0.3.4+20150422 site_url: http://byron.github.io/google-apis-rs/google-blogger3-cli site_description: Write integrating applications with bcore diff --git a/gen/blogger3-cli/src/cmn.rs b/gen/blogger3-cli/src/cmn.rs index 188159ee80..ae86fdef65 100644 --- a/gen/blogger3-cli/src/cmn.rs +++ b/gen/blogger3-cli/src/cmn.rs @@ -414,7 +414,7 @@ impl TokenStorage for JsonTokenStorage { Err(err) => match err.kind() { io::ErrorKind::NotFound => Ok(()), - _ => Err(json::Error::Io(err)) + _ => Err(json::Error::IoError(err)) }, Ok(_) => Ok(()), } @@ -427,7 +427,7 @@ impl TokenStorage for JsonTokenStorage { Err(serde_err) => Err(serde_err), } }, - Err(io_err) => Err(json::Error::Io(io_err)) + Err(io_err) => Err(json::Error::IoError(io_err)) } } } @@ -444,7 +444,7 @@ impl TokenStorage for JsonTokenStorage { Err(io_err) => { match io_err.kind() { io::ErrorKind::NotFound => Ok(None), - _ => Err(json::Error::Io(io_err)) + _ => Err(json::Error::IoError(io_err)) } } } @@ -683,7 +683,7 @@ pub fn application_secret_from_directory(dir: &str, = json::from_str(json_console_secret).unwrap(); match json::to_writer_pretty(&mut f, &console_secret) { Err(serde_err) => match serde_err { - json::Error::Io(err) => err, + json::Error::IoError(err) => err, _ => panic!("Unexpected serde error: {:#?}", serde_err) }, Ok(_) => continue, @@ -696,7 +696,7 @@ pub fn application_secret_from_directory(dir: &str, }, Ok(f) => { match json::de::from_reader::<_, ConsoleApplicationSecret>(f) { - Err(json::Error::Io(err)) => + Err(json::Error::IoError(err)) => return secret_io_error(err), Err(json_err) => return Err(CLIError::Configuration( diff --git a/gen/blogger3-cli/src/main.rs b/gen/blogger3-cli/src/main.rs index 0eb7fd7c89..a1569802bb 100644 --- a/gen/blogger3-cli/src/main.rs +++ b/gen/blogger3-cli/src/main.rs @@ -3496,7 +3496,7 @@ fn main() { let mut app = App::new("blogger3") .author("Sebastian Thiel ") - .version("0.3.3+20150422") + .version("0.3.4+20150422") .about("API for access to the data within Blogger.") .after_help("All documentation details can be found at http://byron.github.io/google-apis-rs/google_blogger3_cli") .arg(Arg::with_name("url") diff --git a/gen/blogger3/Cargo.toml b/gen/blogger3/Cargo.toml index 111a66f063..88268a298c 100644 --- a/gen/blogger3/Cargo.toml +++ b/gen/blogger3/Cargo.toml @@ -4,7 +4,7 @@ [package] name = "google-blogger3" -version = "0.1.12+20150422" +version = "0.1.13+20150422" authors = ["Sebastian Thiel "] description = "A complete library to interact with blogger (protocol v3)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/blogger3" @@ -16,14 +16,14 @@ build = "src/build.rs" [dependencies] -hyper = "0.7" -mime = "0.1.0" -serde = ">= 0.7.0" -serde_json = ">= 0.7.0" -yup-oauth2 = ">= 0.5.4" +hyper = "0.8" +mime = "0.2.0" +serde = "0.6.0" +serde_json = "0.6.0" +yup-oauth2 = ">= 0.5.6" url = ">= 0.5" [build-dependencies] -syntex = { version = ">= 0.23" } -serde_codegen = { version = ">= 0.6" } +syntex = { version = "= 0.28" } +serde_codegen = { version = "= 0.6.13" } diff --git a/gen/blogger3/README.md b/gen/blogger3/README.md index c220c29c9f..ca89a68654 100644 --- a/gen/blogger3/README.md +++ b/gen/blogger3/README.md @@ -5,7 +5,7 @@ DO NOT EDIT ! --> The `google-blogger3` library allows access to all features of the *Google blogger* service. -This documentation was generated from *blogger* crate version *0.1.12+20150422*, where *20150422* is the exact revision of the *blogger:v3* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.12*. +This documentation was generated from *blogger* crate version *0.1.13+20150422*, where *20150422* is the exact revision of the *blogger:v3* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.13*. Everything else about the *blogger* *v3* API can be found at the [official documentation site](https://developers.google.com/blogger/docs/3.0/getting_started). diff --git a/gen/blogger3/src/cmn.rs b/gen/blogger3/src/cmn.rs index 87b91a8986..c69621da55 100644 --- a/gen/blogger3/src/cmn.rs +++ b/gen/blogger3/src/cmn.rs @@ -12,7 +12,7 @@ use mime::{Mime, TopLevel, SubLevel, Attr, Value}; use oauth2::{TokenType, Retry, self}; use hyper; use hyper::header::{ContentType, ContentLength, Headers, UserAgent, Authorization, Header, - HeaderFormat}; + HeaderFormat, Bearer}; use hyper::http::h1::LINE_ENDING; use hyper::method::Method; use hyper::status::StatusCode; @@ -634,7 +634,7 @@ pub struct ResumableUploadHelper<'a, A: 'a> { pub start_at: Option, pub auth: &'a mut A, pub user_agent: &'a str, - pub auth_header: Authorization, + pub auth_header: Authorization, pub url: &'a str, pub reader: &'a mut ReadSeek, pub media_type: Mime, diff --git a/gen/blogger3/src/lib.rs b/gen/blogger3/src/lib.rs index 52625266a2..8bbe121d42 100644 --- a/gen/blogger3/src/lib.rs +++ b/gen/blogger3/src/lib.rs @@ -2,7 +2,7 @@ // This file was generated automatically from 'src/mako/api/lib.rs.mako' // DO NOT EDIT ! -//! This documentation was generated from *blogger* crate version *0.1.12+20150422*, where *20150422* is the exact revision of the *blogger:v3* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.12*. +//! This documentation was generated from *blogger* crate version *0.1.13+20150422*, where *20150422* is the exact revision of the *blogger:v3* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.13*. //! //! Everything else about the *blogger* *v3* API can be found at the //! [official documentation site](https://developers.google.com/blogger/docs/3.0/getting_started). diff --git a/gen/blogger3/src/lib.rs.in b/gen/blogger3/src/lib.rs.in index 7401880ced..bc3e5d67ba 100644 --- a/gen/blogger3/src/lib.rs.in +++ b/gen/blogger3/src/lib.rs.in @@ -141,7 +141,7 @@ impl<'a, C, A> Blogger Blogger { client: RefCell::new(client), auth: RefCell::new(authenticator), - _user_agent: "google-api-rust-client/0.1.12".to_string(), + _user_agent: "google-api-rust-client/0.1.13".to_string(), } } @@ -171,7 +171,7 @@ impl<'a, C, A> Blogger } /// Set the user-agent header field to use in all requests to the server. - /// It defaults to `google-api-rust-client/0.1.12`. + /// It defaults to `google-api-rust-client/0.1.13`. /// /// Returns the previously set user-agent. pub fn user_agent(&mut self, agent_name: String) -> String { @@ -2114,7 +2114,7 @@ impl<'a, C, A> PageViewGetCall<'a, C, A> where C: BorrowMut, A: o /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Pageviews)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -2188,8 +2188,7 @@ impl<'a, C, A> PageViewGetCall<'a, C, A> where C: BorrowMut, A: o } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -2362,7 +2361,7 @@ impl<'a, C, A> UserGetCall<'a, C, A> where C: BorrowMut, A: oauth /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, User)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -2431,8 +2430,7 @@ impl<'a, C, A> UserGetCall<'a, C, A> where C: BorrowMut, A: oauth } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -2606,7 +2604,7 @@ impl<'a, C, A> BlogListByUserCall<'a, C, A> where C: BorrowMut, A /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, BlogList)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -2691,8 +2689,7 @@ impl<'a, C, A> BlogListByUserCall<'a, C, A> where C: BorrowMut, A } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -2892,7 +2889,7 @@ impl<'a, C, A> BlogGetCall<'a, C, A> where C: BorrowMut, A: oauth /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Blog)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -2967,8 +2964,7 @@ impl<'a, C, A> BlogGetCall<'a, C, A> where C: BorrowMut, A: oauth } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -3150,7 +3146,7 @@ impl<'a, C, A> BlogGetByUrlCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Blog)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -3201,8 +3197,7 @@ impl<'a, C, A> BlogGetByUrlCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -3393,7 +3388,7 @@ impl<'a, C, A> PostUpdateCall<'a, C, A> where C: BorrowMut, A: oa /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Post)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -3489,8 +3484,7 @@ impl<'a, C, A> PostUpdateCall<'a, C, A> where C: BorrowMut, A: oa } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -3719,7 +3713,7 @@ impl<'a, C, A> PostGetByPathCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Post)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -3795,8 +3789,7 @@ impl<'a, C, A> PostGetByPathCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -3995,7 +3988,7 @@ impl<'a, C, A> PostGetCall<'a, C, A> where C: BorrowMut, A: oauth /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Post)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -4077,8 +4070,7 @@ impl<'a, C, A> PostGetCall<'a, C, A> where C: BorrowMut, A: oauth } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -4295,7 +4287,7 @@ impl<'a, C, A> PostInsertCall<'a, C, A> where C: BorrowMut, A: oa /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Post)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -4384,8 +4376,7 @@ impl<'a, C, A> PostInsertCall<'a, C, A> where C: BorrowMut, A: oa } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -4588,7 +4579,7 @@ impl<'a, C, A> PostPublishCall<'a, C, A> where C: BorrowMut, A: o /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Post)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -4661,8 +4652,7 @@ impl<'a, C, A> PostPublishCall<'a, C, A> where C: BorrowMut, A: o } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Post, &url) @@ -4846,7 +4836,7 @@ impl<'a, C, A> PostDeleteCall<'a, C, A> where C: BorrowMut, A: oa /// Perform the operation you have build so far. pub fn doit(mut self) -> Result { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -4915,8 +4905,7 @@ impl<'a, C, A> PostDeleteCall<'a, C, A> where C: BorrowMut, A: oa } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Delete, &url) @@ -5083,7 +5072,7 @@ impl<'a, C, A> PostRevertCall<'a, C, A> where C: BorrowMut, A: oa /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Post)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -5153,8 +5142,7 @@ impl<'a, C, A> PostRevertCall<'a, C, A> where C: BorrowMut, A: oa } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Post, &url) @@ -5335,7 +5323,7 @@ impl<'a, C, A> PostSearchCall<'a, C, A> where C: BorrowMut, A: oa /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, PostList)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -5411,8 +5399,7 @@ impl<'a, C, A> PostSearchCall<'a, C, A> where C: BorrowMut, A: oa } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -5620,7 +5607,7 @@ impl<'a, C, A> PostPatchCall<'a, C, A> where C: BorrowMut, A: oau /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Post)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -5716,8 +5703,7 @@ impl<'a, C, A> PostPatchCall<'a, C, A> where C: BorrowMut, A: oau } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -5961,7 +5947,7 @@ impl<'a, C, A> PostListCall<'a, C, A> where C: BorrowMut, A: oaut /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, PostList)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -6062,8 +6048,7 @@ impl<'a, C, A> PostListCall<'a, C, A> where C: BorrowMut, A: oaut } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -6304,7 +6289,7 @@ impl<'a, C, A> CommentGetCall<'a, C, A> where C: BorrowMut, A: oa /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Comment)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -6378,8 +6363,7 @@ impl<'a, C, A> CommentGetCall<'a, C, A> where C: BorrowMut, A: oa } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -6574,7 +6558,7 @@ impl<'a, C, A> CommentRemoveContentCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, Comment)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -6645,8 +6629,7 @@ impl<'a, C, A> CommentRemoveContentCall<'a, C, A> where C: BorrowMut CommentListByBlogCall<'a, C, A> where C: BorrowMut /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, CommentList)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -6933,8 +6916,7 @@ impl<'a, C, A> CommentListByBlogCall<'a, C, A> where C: BorrowMut } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -7144,7 +7126,7 @@ impl<'a, C, A> CommentMarkAsSpamCall<'a, C, A> where C: BorrowMut /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Comment)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -7215,8 +7197,7 @@ impl<'a, C, A> CommentMarkAsSpamCall<'a, C, A> where C: BorrowMut } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Post, &url) @@ -7417,7 +7398,7 @@ impl<'a, C, A> CommentListCall<'a, C, A> where C: BorrowMut, A: o /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, CommentList)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -7510,8 +7491,7 @@ impl<'a, C, A> CommentListCall<'a, C, A> where C: BorrowMut, A: o } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -7738,7 +7718,7 @@ impl<'a, C, A> CommentApproveCall<'a, C, A> where C: BorrowMut, A /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Comment)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -7809,8 +7789,7 @@ impl<'a, C, A> CommentApproveCall<'a, C, A> where C: BorrowMut, A } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Post, &url) @@ -7998,7 +7977,7 @@ impl<'a, C, A> CommentDeleteCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -8068,8 +8047,7 @@ impl<'a, C, A> CommentDeleteCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Delete, &url) @@ -8249,7 +8227,7 @@ impl<'a, C, A> PostUserInfoGetCall<'a, C, A> where C: BorrowMut, /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, PostUserInfo)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -8323,8 +8301,7 @@ impl<'a, C, A> PostUserInfoGetCall<'a, C, A> where C: BorrowMut, } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -8536,7 +8513,7 @@ impl<'a, C, A> PostUserInfoListCall<'a, C, A> where C: BorrowMut, /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, PostUserInfosList)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -8635,8 +8612,7 @@ impl<'a, C, A> PostUserInfoListCall<'a, C, A> where C: BorrowMut, } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -8878,7 +8854,7 @@ impl<'a, C, A> BlogUserInfoGetCall<'a, C, A> where C: BorrowMut, /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, BlogUserInfo)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -8951,8 +8927,7 @@ impl<'a, C, A> BlogUserInfoGetCall<'a, C, A> where C: BorrowMut, } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -9138,7 +9113,7 @@ impl<'a, C, A> PageGetCall<'a, C, A> where C: BorrowMut, A: oauth /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Page)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -9211,8 +9186,7 @@ impl<'a, C, A> PageGetCall<'a, C, A> where C: BorrowMut, A: oauth } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -9404,7 +9378,7 @@ impl<'a, C, A> PageListCall<'a, C, A> where C: BorrowMut, A: oaut /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, PageList)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -9490,8 +9464,7 @@ impl<'a, C, A> PageListCall<'a, C, A> where C: BorrowMut, A: oaut } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -9693,7 +9666,7 @@ impl<'a, C, A> PageRevertCall<'a, C, A> where C: BorrowMut, A: oa /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Page)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -9763,8 +9736,7 @@ impl<'a, C, A> PageRevertCall<'a, C, A> where C: BorrowMut, A: oa } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Post, &url) @@ -9949,7 +9921,7 @@ impl<'a, C, A> PageInsertCall<'a, C, A> where C: BorrowMut, A: oa /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Page)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -10032,8 +10004,7 @@ impl<'a, C, A> PageInsertCall<'a, C, A> where C: BorrowMut, A: oa } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -10231,7 +10202,7 @@ impl<'a, C, A> PagePatchCall<'a, C, A> where C: BorrowMut, A: oau /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Page)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -10318,8 +10289,7 @@ impl<'a, C, A> PagePatchCall<'a, C, A> where C: BorrowMut, A: oau } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -10523,7 +10493,7 @@ impl<'a, C, A> PagePublishCall<'a, C, A> where C: BorrowMut, A: o /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Page)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -10593,8 +10563,7 @@ impl<'a, C, A> PagePublishCall<'a, C, A> where C: BorrowMut, A: o } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Post, &url) @@ -10782,7 +10751,7 @@ impl<'a, C, A> PageUpdateCall<'a, C, A> where C: BorrowMut, A: oa /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Page)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -10869,8 +10838,7 @@ impl<'a, C, A> PageUpdateCall<'a, C, A> where C: BorrowMut, A: oa } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -11074,7 +11042,7 @@ impl<'a, C, A> PageDeleteCall<'a, C, A> where C: BorrowMut, A: oa /// Perform the operation you have build so far. pub fn doit(mut self) -> Result { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -11143,8 +11111,7 @@ impl<'a, C, A> PageDeleteCall<'a, C, A> where C: BorrowMut, A: oa } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Delete, &url) diff --git a/gen/books1-cli/Cargo.toml b/gen/books1-cli/Cargo.toml index 7a8fa73022..d56b5644d1 100644 --- a/gen/books1-cli/Cargo.toml +++ b/gen/books1-cli/Cargo.toml @@ -4,7 +4,7 @@ [package] name = "google-books1-cli" -version = "0.3.3+20160113" +version = "0.3.4+20160226" authors = ["Sebastian Thiel "] description = "A complete library to interact with books (protocol v1)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/books1-cli" @@ -17,18 +17,18 @@ keywords = ["books", "google", "cli"] name = "books1" [dependencies] -hyper = "0.7" -mime = "0.1.0" -serde = ">= 0.7.0" -serde_json = ">= 0.7.0" -yup-oauth2 = ">= 0.5.4" +hyper = "0.8" +mime = "0.2.0" +serde = "0.6.0" +serde_json = "0.6.0" +yup-oauth2 = ">= 0.5.6" strsim = "0.4" yup-hyper-mock = "1.0" clap = "2.0" [build-dependencies] -syntex = { version = ">= 0.23" } -serde_codegen = { version = ">= 0.6" } +syntex = { version = "= 0.28" } +serde_codegen = { version = "= 0.6.13" } [dependencies.google-books1] diff --git a/gen/books1-cli/README.md b/gen/books1-cli/README.md index e91adaaf89..2930544b48 100644 --- a/gen/books1-cli/README.md +++ b/gen/books1-cli/README.md @@ -17,14 +17,14 @@ Everything else about the *books* API can be found at the You can download the pre-compiled 64bit binaries for the following platforms: -* ![icon](http://megaicons.net/static/img/icons_sizes/6/140/16/ubuntu-icon.png) [ubuntu](http://dl.byronimo.de/google.rs/cli/0.3.3/ubuntu/books1.tar.gz) -* ![icon](http://hydra-media.cursecdn.com/wow.gamepedia.com/a/a2/Apple-icon-16x16.png?version=25ddd67ac3dd3b634478e3978b76cb74) [osx](http://dl.byronimo.de/google.rs/cli/0.3.3/osx/books1.tar.gz) +* ![icon](http://megaicons.net/static/img/icons_sizes/6/140/16/ubuntu-icon.png) [ubuntu](http://dl.byronimo.de/google.rs/cli/0.3.4/ubuntu/books1.tar.gz) +* ![icon](http://hydra-media.cursecdn.com/wow.gamepedia.com/a/a2/Apple-icon-16x16.png?version=25ddd67ac3dd3b634478e3978b76cb74) [osx](http://dl.byronimo.de/google.rs/cli/0.3.4/osx/books1.tar.gz) Find the source code [on github](https://github.com/Byron/google-apis-rs/tree/master/gen/books1-cli). # Usage -This documentation was generated from the *books* API at revision *20160113*. The CLI is at version *0.3.3*. +This documentation was generated from the *books* API at revision *20160226*. The CLI is at version *0.3.4*. ```bash books1 [options] diff --git a/gen/books1-cli/mkdocs.yml b/gen/books1-cli/mkdocs.yml index 6d90821c96..f0f4ac05f4 100644 --- a/gen/books1-cli/mkdocs.yml +++ b/gen/books1-cli/mkdocs.yml @@ -1,4 +1,4 @@ -site_name: books v0.3.3+20160113 +site_name: books v0.3.4+20160226 site_url: http://byron.github.io/google-apis-rs/google-books1-cli site_description: Write integrating applications with bcore diff --git a/gen/books1-cli/src/cmn.rs b/gen/books1-cli/src/cmn.rs index 188159ee80..ae86fdef65 100644 --- a/gen/books1-cli/src/cmn.rs +++ b/gen/books1-cli/src/cmn.rs @@ -414,7 +414,7 @@ impl TokenStorage for JsonTokenStorage { Err(err) => match err.kind() { io::ErrorKind::NotFound => Ok(()), - _ => Err(json::Error::Io(err)) + _ => Err(json::Error::IoError(err)) }, Ok(_) => Ok(()), } @@ -427,7 +427,7 @@ impl TokenStorage for JsonTokenStorage { Err(serde_err) => Err(serde_err), } }, - Err(io_err) => Err(json::Error::Io(io_err)) + Err(io_err) => Err(json::Error::IoError(io_err)) } } } @@ -444,7 +444,7 @@ impl TokenStorage for JsonTokenStorage { Err(io_err) => { match io_err.kind() { io::ErrorKind::NotFound => Ok(None), - _ => Err(json::Error::Io(io_err)) + _ => Err(json::Error::IoError(io_err)) } } } @@ -683,7 +683,7 @@ pub fn application_secret_from_directory(dir: &str, = json::from_str(json_console_secret).unwrap(); match json::to_writer_pretty(&mut f, &console_secret) { Err(serde_err) => match serde_err { - json::Error::Io(err) => err, + json::Error::IoError(err) => err, _ => panic!("Unexpected serde error: {:#?}", serde_err) }, Ok(_) => continue, @@ -696,7 +696,7 @@ pub fn application_secret_from_directory(dir: &str, }, Ok(f) => { match json::de::from_reader::<_, ConsoleApplicationSecret>(f) { - Err(json::Error::Io(err)) => + Err(json::Error::IoError(err)) => return secret_io_error(err), Err(json_err) => return Err(CLIError::Configuration( diff --git a/gen/books1-cli/src/main.rs b/gen/books1-cli/src/main.rs index a14ec8db7f..54eef0fb0f 100644 --- a/gen/books1-cli/src/main.rs +++ b/gen/books1-cli/src/main.rs @@ -2999,6 +2999,9 @@ impl<'n> Engine<'n> { "locale" => { call = call.locale(value.unwrap_or("")); }, + "country" => { + call = call.country(value.unwrap_or("")); + }, "acquire-method" => { call = call.add_acquire_method(value.unwrap_or("")); }, @@ -3015,7 +3018,7 @@ impl<'n> Engine<'n> { err.issues.push(CLIError::UnknownParameter(key.to_string(), {let mut v = Vec::new(); v.extend(self.gp.iter().map(|v|*v)); - v.extend(["locale", "acquire-method", "max-results", "source", "start-index", "processing-state"].iter().map(|v|*v)); + v.extend(["locale", "country", "acquire-method", "max-results", "source", "start-index", "processing-state"].iter().map(|v|*v)); v } )); } } @@ -4694,7 +4697,7 @@ fn main() { let mut app = App::new("books1") .author("Sebastian Thiel ") - .version("0.3.3+20160113") + .version("0.3.4+20160226") .about("Lets you search for books and manage your Google Books library.") .after_help("All documentation details can be found at http://byron.github.io/google-apis-rs/google_books1_cli") .arg(Arg::with_name("url") diff --git a/gen/books1/Cargo.toml b/gen/books1/Cargo.toml index 18cb8f2d8a..f768018fcc 100644 --- a/gen/books1/Cargo.toml +++ b/gen/books1/Cargo.toml @@ -4,7 +4,7 @@ [package] name = "google-books1" -version = "0.1.12+20160113" +version = "0.1.13+20160226" authors = ["Sebastian Thiel "] description = "A complete library to interact with books (protocol v1)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/books1" @@ -16,14 +16,14 @@ build = "src/build.rs" [dependencies] -hyper = "0.7" -mime = "0.1.0" -serde = ">= 0.7.0" -serde_json = ">= 0.7.0" -yup-oauth2 = ">= 0.5.4" +hyper = "0.8" +mime = "0.2.0" +serde = "0.6.0" +serde_json = "0.6.0" +yup-oauth2 = ">= 0.5.6" url = ">= 0.5" [build-dependencies] -syntex = { version = ">= 0.23" } -serde_codegen = { version = ">= 0.6" } +syntex = { version = "= 0.28" } +serde_codegen = { version = "= 0.6.13" } diff --git a/gen/books1/README.md b/gen/books1/README.md index 4906718d9e..6a9b932322 100644 --- a/gen/books1/README.md +++ b/gen/books1/README.md @@ -5,7 +5,7 @@ DO NOT EDIT ! --> The `google-books1` library allows access to all features of the *Google books* service. -This documentation was generated from *books* crate version *0.1.12+20160113*, where *20160113* is the exact revision of the *books:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.12*. +This documentation was generated from *books* crate version *0.1.13+20160226*, where *20160226* is the exact revision of the *books:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.13*. Everything else about the *books* *v1* API can be found at the [official documentation site](https://developers.google.com/books/docs/v1/getting_started). diff --git a/gen/books1/src/cmn.rs b/gen/books1/src/cmn.rs index 87b91a8986..c69621da55 100644 --- a/gen/books1/src/cmn.rs +++ b/gen/books1/src/cmn.rs @@ -12,7 +12,7 @@ use mime::{Mime, TopLevel, SubLevel, Attr, Value}; use oauth2::{TokenType, Retry, self}; use hyper; use hyper::header::{ContentType, ContentLength, Headers, UserAgent, Authorization, Header, - HeaderFormat}; + HeaderFormat, Bearer}; use hyper::http::h1::LINE_ENDING; use hyper::method::Method; use hyper::status::StatusCode; @@ -634,7 +634,7 @@ pub struct ResumableUploadHelper<'a, A: 'a> { pub start_at: Option, pub auth: &'a mut A, pub user_agent: &'a str, - pub auth_header: Authorization, + pub auth_header: Authorization, pub url: &'a str, pub reader: &'a mut ReadSeek, pub media_type: Mime, diff --git a/gen/books1/src/lib.rs b/gen/books1/src/lib.rs index cd337c403b..a284809259 100644 --- a/gen/books1/src/lib.rs +++ b/gen/books1/src/lib.rs @@ -2,7 +2,7 @@ // This file was generated automatically from 'src/mako/api/lib.rs.mako' // DO NOT EDIT ! -//! This documentation was generated from *books* crate version *0.1.12+20160113*, where *20160113* is the exact revision of the *books:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.12*. +//! This documentation was generated from *books* crate version *0.1.13+20160226*, where *20160226* is the exact revision of the *books:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.13*. //! //! Everything else about the *books* *v1* API can be found at the //! [official documentation site](https://developers.google.com/books/docs/v1/getting_started). @@ -123,18 +123,18 @@ //! // execute the final call using `doit()`. //! // Values shown here are possibly random and not representative ! //! let result = hub.volumes().list("q") -//! .start_index(15) -//! .source("diam") -//! .show_preorders(true) -//! .projection("sed") -//! .print_type("diam") -//! .partner("magna") -//! .order_by("dolor") -//! .max_results(96) -//! .library_restrict("dolor") -//! .lang_restrict("vero") -//! .filter("nonumy") -//! .download("takimata") +//! .start_index(22) +//! .source("nonumy") +//! .show_preorders(false) +//! .projection("diam") +//! .print_type("magna") +//! .partner("dolor") +//! .order_by("Lorem") +//! .max_results(52) +//! .library_restrict("vero") +//! .lang_restrict("nonumy") +//! .filter("takimata") +//! .download("dolores") //! .doit(); //! //! match result { diff --git a/gen/books1/src/lib.rs.in b/gen/books1/src/lib.rs.in index 32fadcbe30..4fa19864ed 100644 --- a/gen/books1/src/lib.rs.in +++ b/gen/books1/src/lib.rs.in @@ -139,7 +139,7 @@ impl<'a, C, A> Books Books { client: RefCell::new(client), auth: RefCell::new(authenticator), - _user_agent: "google-api-rust-client/0.1.12".to_string(), + _user_agent: "google-api-rust-client/0.1.13".to_string(), } } @@ -181,7 +181,7 @@ impl<'a, C, A> Books } /// Set the user-agent header field to use in all requests to the server. - /// It defaults to `google-api-rust-client/0.1.12`. + /// It defaults to `google-api-rust-client/0.1.13`. /// /// Returns the previously set user-agent. pub fn user_agent(&mut self, agent_name: String) -> String { @@ -504,6 +504,8 @@ pub struct Notification { #[serde(rename="iconUrl")] pub icon_url: Option, /// no description provided + pub reason: Option, + /// no description provided #[serde(rename="targetUrl")] pub target_url: Option, /// no description provided @@ -2433,6 +2435,7 @@ impl<'a, C, A> VolumeMethods<'a, C, A> { _processing_state: Default::default(), _max_results: Default::default(), _locale: Default::default(), + _country: Default::default(), _acquire_method: Default::default(), _delegate: Default::default(), _scopes: Default::default(), @@ -3671,7 +3674,7 @@ impl<'a, C, A> LayerAnnotationDataGetCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, Annotationdata)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -3761,8 +3764,7 @@ impl<'a, C, A> LayerAnnotationDataGetCall<'a, C, A> where C: BorrowMut LayerVolumeAnnotationGetCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, Volumeannotation)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -4083,8 +4085,7 @@ impl<'a, C, A> LayerVolumeAnnotationGetCall<'a, C, A> where C: BorrowMut LayerListCall<'a, C, A> where C: BorrowMut, A: oau /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Layersummaries)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -4373,8 +4374,7 @@ impl<'a, C, A> LayerListCall<'a, C, A> where C: BorrowMut, A: oau } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -4573,7 +4573,7 @@ impl<'a, C, A> LayerGetCall<'a, C, A> where C: BorrowMut, A: oaut /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Layersummary)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -4649,8 +4649,7 @@ impl<'a, C, A> LayerGetCall<'a, C, A> where C: BorrowMut, A: oaut } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -4866,7 +4865,7 @@ impl<'a, C, A> LayerVolumeAnnotationListCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, Volumeannotations)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -4973,8 +4972,7 @@ impl<'a, C, A> LayerVolumeAnnotationListCall<'a, C, A> where C: BorrowMut LayerAnnotationDataListCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, Annotationsdata)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -5369,8 +5367,7 @@ impl<'a, C, A> LayerAnnotationDataListCall<'a, C, A> where C: BorrowMut VolumeRecommendedRateCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, BooksVolumesRecommendedRateResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -5687,8 +5684,7 @@ impl<'a, C, A> VolumeRecommendedRateCall<'a, C, A> where C: BorrowMut VolumeGetCall<'a, C, A> where C: BorrowMut, A: oau /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Volume)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -5977,8 +5973,7 @@ impl<'a, C, A> VolumeGetCall<'a, C, A> where C: BorrowMut, A: oau } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -6169,7 +6164,8 @@ impl<'a, C, A> VolumeGetCall<'a, C, A> where C: BorrowMut, A: oau /// .add_processing_state("sanctus") /// .max_results(43) /// .locale("At") -/// .add_acquire_method("labore") +/// .country("labore") +/// .add_acquire_method("invidunt") /// .doit(); /// # } /// ``` @@ -6182,6 +6178,7 @@ pub struct VolumeMybookListCall<'a, C, A> _processing_state: Vec, _max_results: Option, _locale: Option, + _country: Option, _acquire_method: Vec, _delegate: Option<&'a mut Delegate>, _additional_params: HashMap, @@ -6196,7 +6193,7 @@ impl<'a, C, A> VolumeMybookListCall<'a, C, A> where C: BorrowMut, /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Volumes)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -6204,7 +6201,7 @@ impl<'a, C, A> VolumeMybookListCall<'a, C, A> where C: BorrowMut, }; dlg.begin(MethodInfo { id: "books.volumes.mybooks.list", http_method: hyper::method::Method::Get }); - let mut params: Vec<(&str, String)> = Vec::with_capacity((8 + self._additional_params.len())); + let mut params: Vec<(&str, String)> = Vec::with_capacity((9 + self._additional_params.len())); if let Some(value) = self._start_index { params.push(("startIndex", value.to_string())); } @@ -6222,12 +6219,15 @@ impl<'a, C, A> VolumeMybookListCall<'a, C, A> where C: BorrowMut, if let Some(value) = self._locale { params.push(("locale", value.to_string())); } + if let Some(value) = self._country { + params.push(("country", value.to_string())); + } if self._acquire_method.len() > 0 { for f in self._acquire_method.iter() { params.push(("acquireMethod", f.to_string())); } } - for &field in ["alt", "startIndex", "source", "processingState", "maxResults", "locale", "acquireMethod"].iter() { + for &field in ["alt", "startIndex", "source", "processingState", "maxResults", "locale", "country", "acquireMethod"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); return Err(Error::FieldClash(field)); @@ -6265,8 +6265,7 @@ impl<'a, C, A> VolumeMybookListCall<'a, C, A> where C: BorrowMut, } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -6358,6 +6357,13 @@ impl<'a, C, A> VolumeMybookListCall<'a, C, A> where C: BorrowMut, self._locale = Some(new_value.to_string()); self } + /// ISO-3166-1 code to override the IP-based location. + /// + /// Sets the *country* query property to the given value. + pub fn country(mut self, new_value: &str) -> VolumeMybookListCall<'a, C, A> { + self._country = Some(new_value.to_string()); + self + } /// How the book was aquired /// /// Append the given value to the *acquire method* query property. @@ -6445,18 +6451,18 @@ impl<'a, C, A> VolumeMybookListCall<'a, C, A> where C: BorrowMut, /// // execute the final call using `doit()`. /// // Values shown here are possibly random and not representative ! /// let result = hub.volumes().list("q") -/// .start_index(35) -/// .source("sadipscing") -/// .show_preorders(false) -/// .projection("dolore") -/// .print_type("nonumy") -/// .partner("sed") -/// .order_by("aliquyam") -/// .max_results(48) -/// .library_restrict("eirmod") -/// .lang_restrict("consetetur") -/// .filter("labore") -/// .download("sed") +/// .start_index(6) +/// .source("rebum.") +/// .show_preorders(true) +/// .projection("nonumy") +/// .print_type("sed") +/// .partner("aliquyam") +/// .order_by("sit") +/// .max_results(61) +/// .library_restrict("consetetur") +/// .lang_restrict("labore") +/// .filter("sed") +/// .download("ea") /// .doit(); /// # } /// ``` @@ -6490,7 +6496,7 @@ impl<'a, C, A> VolumeListCall<'a, C, A> where C: BorrowMut, A: oa /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Volumes)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -6574,8 +6580,7 @@ impl<'a, C, A> VolumeListCall<'a, C, A> where C: BorrowMut, A: oa } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -6804,12 +6809,12 @@ impl<'a, C, A> VolumeListCall<'a, C, A> where C: BorrowMut, A: oa /// // execute the final call using `doit()`. /// // Values shown here are possibly random and not representative ! /// let result = hub.volumes().useruploaded_list() -/// .add_volume_id("ea") -/// .start_index(39) -/// .source("aliquyam") -/// .add_processing_state("eos") -/// .max_results(63) -/// .locale("sea") +/// .add_volume_id("gubergren") +/// .start_index(19) +/// .source("eos") +/// .add_processing_state("tempor") +/// .max_results(42) +/// .locale("labore") /// .doit(); /// # } /// ``` @@ -6836,7 +6841,7 @@ impl<'a, C, A> VolumeUseruploadedListCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, Volumes)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -6905,8 +6910,7 @@ impl<'a, C, A> VolumeUseruploadedListCall<'a, C, A> where C: BorrowMut VolumeUseruploadedListCall<'a, C, A> where C: BorrowMut VolumeAssociatedListCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, Volumes)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -7195,8 +7199,7 @@ impl<'a, C, A> VolumeAssociatedListCall<'a, C, A> where C: BorrowMut VolumeAssociatedListCall<'a, C, A> where C: BorrowMut VolumeRecommendedListCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, Volumes)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -7451,8 +7454,7 @@ impl<'a, C, A> VolumeRecommendedListCall<'a, C, A> where C: BorrowMut DictionaryListOfflineMetadataCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, Metadata)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -7677,8 +7679,7 @@ impl<'a, C, A> DictionaryListOfflineMetadataCall<'a, C, A> where C: BorrowMut SeryGetCall<'a, C, A> where C: BorrowMut, A: oauth /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Series)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -7896,8 +7897,7 @@ impl<'a, C, A> SeryGetCall<'a, C, A> where C: BorrowMut, A: oauth } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -8043,8 +8043,8 @@ impl<'a, C, A> SeryGetCall<'a, C, A> where C: BorrowMut, A: oauth /// // execute the final call using `doit()`. /// // Values shown here are possibly random and not representative ! /// let result = hub.series().membership_get("series_id") -/// .page_token("clita") -/// .page_size(22) +/// .page_token("diam") +/// .page_size(30) /// .doit(); /// # } /// ``` @@ -8068,7 +8068,7 @@ impl<'a, C, A> SeryMembershipGetCall<'a, C, A> where C: BorrowMut /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Seriesmembership)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -8122,8 +8122,7 @@ impl<'a, C, A> SeryMembershipGetCall<'a, C, A> where C: BorrowMut } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -8282,10 +8281,10 @@ impl<'a, C, A> SeryMembershipGetCall<'a, C, A> where C: BorrowMut /// // execute the final call using `doit()`. /// // Values shown here are possibly random and not representative ! /// let result = hub.bookshelves().volumes_list("userId", "shelf") -/// .start_index(38) -/// .source("invidunt") -/// .show_preorders(false) -/// .max_results(82) +/// .start_index(64) +/// .source("ut") +/// .show_preorders(true) +/// .max_results(77) /// .doit(); /// # } /// ``` @@ -8312,7 +8311,7 @@ impl<'a, C, A> BookshelveVolumeListCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, Volumes)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -8394,8 +8393,7 @@ impl<'a, C, A> BookshelveVolumeListCall<'a, C, A> where C: BorrowMut BookshelveVolumeListCall<'a, C, A> where C: BorrowMut BookshelveListCall<'a, C, A> where C: BorrowMut, A /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Bookshelves)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -8673,8 +8671,7 @@ impl<'a, C, A> BookshelveListCall<'a, C, A> where C: BorrowMut, A } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -8826,7 +8823,7 @@ impl<'a, C, A> BookshelveListCall<'a, C, A> where C: BorrowMut, A /// // execute the final call using `doit()`. /// // Values shown here are possibly random and not representative ! /// let result = hub.bookshelves().get("userId", "shelf") -/// .source("aliquyam") +/// .source("ea") /// .doit(); /// # } /// ``` @@ -8850,7 +8847,7 @@ impl<'a, C, A> BookshelveGetCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Bookshelf)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -8923,8 +8920,7 @@ impl<'a, C, A> BookshelveGetCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -9087,13 +9083,13 @@ impl<'a, C, A> BookshelveGetCall<'a, C, A> where C: BorrowMut, A: /// // Values shown here are possibly random and not representative ! /// let result = hub.promooffer().accept() /// .volume_id("ea") -/// .serial("ea") -/// .product("et") -/// .offer_id("dolor") -/// .model("diam") -/// .manufacturer("kasd") -/// .device("invidunt") -/// .android_id("rebum.") +/// .serial("et") +/// .product("dolor") +/// .offer_id("diam") +/// .model("kasd") +/// .manufacturer("invidunt") +/// .device("rebum.") +/// .android_id("Lorem") /// .doit(); /// # } /// ``` @@ -9122,7 +9118,7 @@ impl<'a, C, A> PromoofferAcceptCall<'a, C, A> where C: BorrowMut, /// Perform the operation you have build so far. pub fn doit(mut self) -> Result { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -9192,8 +9188,7 @@ impl<'a, C, A> PromoofferAcceptCall<'a, C, A> where C: BorrowMut, } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Post, &url) @@ -9373,13 +9368,13 @@ impl<'a, C, A> PromoofferAcceptCall<'a, C, A> where C: BorrowMut, /// // execute the final call using `doit()`. /// // Values shown here are possibly random and not representative ! /// let result = hub.promooffer().dismiss() -/// .serial("Lorem") -/// .product("clita") -/// .offer_id("invidunt") -/// .model("eirmod") -/// .manufacturer("At") -/// .device("consetetur") -/// .android_id("et") +/// .serial("clita") +/// .product("invidunt") +/// .offer_id("eirmod") +/// .model("At") +/// .manufacturer("consetetur") +/// .device("et") +/// .android_id("sed") /// .doit(); /// # } /// ``` @@ -9407,7 +9402,7 @@ impl<'a, C, A> PromoofferDismisCall<'a, C, A> where C: BorrowMut, /// Perform the operation you have build so far. pub fn doit(mut self) -> Result { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -9474,8 +9469,7 @@ impl<'a, C, A> PromoofferDismisCall<'a, C, A> where C: BorrowMut, } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Post, &url) @@ -9649,12 +9643,12 @@ impl<'a, C, A> PromoofferDismisCall<'a, C, A> where C: BorrowMut, /// // execute the final call using `doit()`. /// // Values shown here are possibly random and not representative ! /// let result = hub.promooffer().get() -/// .serial("sed") -/// .product("sit") -/// .model("takimata") -/// .manufacturer("elitr") -/// .device("nonumy") -/// .android_id("rebum.") +/// .serial("sit") +/// .product("takimata") +/// .model("elitr") +/// .manufacturer("nonumy") +/// .device("rebum.") +/// .android_id("Lorem") /// .doit(); /// # } /// ``` @@ -9681,7 +9675,7 @@ impl<'a, C, A> PromoofferGetCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Offers)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -9746,8 +9740,7 @@ impl<'a, C, A> PromoofferGetCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -9925,8 +9918,8 @@ impl<'a, C, A> PromoofferGetCall<'a, C, A> where C: BorrowMut, A: /// // Values shown here are possibly random and not representative ! /// let result = hub.personalizedstream().get() /// .source("Lorem") -/// .max_allowed_maturity_rating("Lorem") -/// .locale("diam") +/// .max_allowed_maturity_rating("diam") +/// .locale("ut") /// .doit(); /// # } /// ``` @@ -9950,7 +9943,7 @@ impl<'a, C, A> PersonalizedstreamGetCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, Discoveryclusters)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -10006,8 +9999,7 @@ impl<'a, C, A> PersonalizedstreamGetCall<'a, C, A> where C: BorrowMut OnboardingListCategoryCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, Category)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -10235,8 +10227,7 @@ impl<'a, C, A> OnboardingListCategoryCall<'a, C, A> where C: BorrowMut OnboardingListCategoryCall<'a, C, A> where C: BorrowMut OnboardingListCategoryVolumeCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, Volume2)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -10472,8 +10463,7 @@ impl<'a, C, A> OnboardingListCategoryVolumeCall<'a, C, A> where C: BorrowMut OnboardingListCategoryVolumeCall<'a, C, A> where C: BorrowMut MyconfigRequestAccesCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, RequestAccess)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -10729,8 +10719,7 @@ impl<'a, C, A> MyconfigRequestAccesCall<'a, C, A> where C: BorrowMut MyconfigRequestAccesCall<'a, C, A> where C: BorrowMut MyconfigReleaseDownloadAccesCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, DownloadAccesses)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -11004,8 +10993,7 @@ impl<'a, C, A> MyconfigReleaseDownloadAccesCall<'a, C, A> where C: BorrowMut MyconfigReleaseDownloadAccesCall<'a, C, A> where C: BorrowMut MyconfigSyncVolumeLicenseCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, Volumes)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -11277,8 +11265,7 @@ impl<'a, C, A> MyconfigSyncVolumeLicenseCall<'a, C, A> where C: BorrowMut MyconfigGetUserSettingCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, Usersettings)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -11547,8 +11534,7 @@ impl<'a, C, A> MyconfigGetUserSettingCall<'a, C, A> where C: BorrowMut MyconfigUpdateUserSettingCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, Usersettings)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -11768,8 +11754,7 @@ impl<'a, C, A> MyconfigUpdateUserSettingCall<'a, C, A> where C: BorrowMut MyconfigUpdateUserSettingCall<'a, C, A> where C: BorrowMut MylibraryBookshelveClearVolumeCall<'a, C, A> where C: BorrowMut Result { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -12011,8 +11996,7 @@ impl<'a, C, A> MylibraryBookshelveClearVolumeCall<'a, C, A> where C: BorrowMut MylibraryBookshelveClearVolumeCall<'a, C, A> where C: BorrowMut MylibraryBookshelveMoveVolumeCall<'a, C, A> where C: BorrowMut Result { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -12252,8 +12236,7 @@ impl<'a, C, A> MylibraryBookshelveMoveVolumeCall<'a, C, A> where C: BorrowMut MylibraryBookshelveMoveVolumeCall<'a, C, A> where C: BorrowMut MylibraryBookshelveVolumeListCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, Volumes)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -12540,8 +12523,7 @@ impl<'a, C, A> MylibraryBookshelveVolumeListCall<'a, C, A> where C: BorrowMut MylibraryAnnotationSummaryCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, AnnotationsSummary)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -12810,8 +12792,7 @@ impl<'a, C, A> MylibraryAnnotationSummaryCall<'a, C, A> where C: BorrowMut MylibraryAnnotationSummaryCall<'a, C, A> where C: BorrowMut MylibraryAnnotationDeleteCall<'a, C, A> where C: BorrowMut Result { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -13061,8 +13042,7 @@ impl<'a, C, A> MylibraryAnnotationDeleteCall<'a, C, A> where C: BorrowMut MylibraryAnnotationDeleteCall<'a, C, A> where C: BorrowMut MylibraryBookshelveAddVolumeCall<'a, C, A> where C: BorrowMut Result { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -13305,8 +13285,7 @@ impl<'a, C, A> MylibraryBookshelveAddVolumeCall<'a, C, A> where C: BorrowMut MylibraryBookshelveAddVolumeCall<'a, C, A> where C: BorrowMut MylibraryAnnotationInsertCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, Annotation)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -13565,8 +13544,7 @@ impl<'a, C, A> MylibraryAnnotationInsertCall<'a, C, A> where C: BorrowMut MylibraryAnnotationInsertCall<'a, C, A> where C: BorrowMut MylibraryBookshelveRemoveVolumeCall<'a, C, A> where C: BorrowMut< /// Perform the operation you have build so far. pub fn doit(mut self) -> Result { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -13836,8 +13814,7 @@ impl<'a, C, A> MylibraryBookshelveRemoveVolumeCall<'a, C, A> where C: BorrowMut< } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Post, &url) @@ -13996,16 +13973,16 @@ impl<'a, C, A> MylibraryBookshelveRemoveVolumeCall<'a, C, A> where C: BorrowMut< /// // execute the final call using `doit()`. /// // Values shown here are possibly random and not representative ! /// let result = hub.mylibrary().annotations_list() -/// .volume_id("dolore") -/// .updated_min("Lorem") +/// .volume_id("Lorem") +/// .updated_min("consetetur") /// .updated_max("consetetur") -/// .source("consetetur") -/// .show_deleted(false) -/// .page_token("labore") -/// .max_results(40) -/// .add_layer_ids("et") -/// .layer_id("sadipscing") -/// .content_version("accusam") +/// .source("eirmod") +/// .show_deleted(true) +/// .page_token("gubergren") +/// .max_results(28) +/// .add_layer_ids("sadipscing") +/// .layer_id("accusam") +/// .content_version("magna") /// .doit(); /// # } /// ``` @@ -14036,7 +14013,7 @@ impl<'a, C, A> MylibraryAnnotationListCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, Annotations)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -14115,8 +14092,7 @@ impl<'a, C, A> MylibraryAnnotationListCall<'a, C, A> where C: BorrowMut MylibraryAnnotationListCall<'a, C, A> where C: BorrowMut MylibraryAnnotationUpdateCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, Annotation)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -14435,8 +14411,7 @@ impl<'a, C, A> MylibraryAnnotationUpdateCall<'a, C, A> where C: BorrowMut MylibraryAnnotationUpdateCall<'a, C, A> where C: BorrowMut MylibraryReadingpositionSetPositionCall<'a, C, A> where C: Borrow /// Perform the operation you have build so far. pub fn doit(mut self) -> Result { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -14714,8 +14689,7 @@ impl<'a, C, A> MylibraryReadingpositionSetPositionCall<'a, C, A> where C: Borrow } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Post, &url) @@ -14898,7 +14872,7 @@ impl<'a, C, A> MylibraryReadingpositionSetPositionCall<'a, C, A> where C: Borrow /// // execute the final call using `doit()`. /// // Values shown here are possibly random and not representative ! /// let result = hub.mylibrary().bookshelves_get("shelf") -/// .source("consetetur") +/// .source("eos") /// .doit(); /// # } /// ``` @@ -14921,7 +14895,7 @@ impl<'a, C, A> MylibraryBookshelveGetCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, Bookshelf)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -14993,8 +14967,7 @@ impl<'a, C, A> MylibraryBookshelveGetCall<'a, C, A> where C: BorrowMut MylibraryBookshelveGetCall<'a, C, A> where C: BorrowMut MylibraryBookshelveListCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, Bookshelves)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -15218,8 +15191,7 @@ impl<'a, C, A> MylibraryBookshelveListCall<'a, C, A> where C: BorrowMut MylibraryBookshelveListCall<'a, C, A> where C: BorrowMut MylibraryReadingpositionGetCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, ReadingPosition)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -15461,8 +15433,7 @@ impl<'a, C, A> MylibraryReadingpositionGetCall<'a, C, A> where C: BorrowMut MylibraryReadingpositionGetCall<'a, C, A> where C: BorrowMut NotificationGetCall<'a, C, A> where C: BorrowMut, /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Notification)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -15700,8 +15671,7 @@ impl<'a, C, A> NotificationGetCall<'a, C, A> where C: BorrowMut, } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -15860,10 +15830,10 @@ impl<'a, C, A> NotificationGetCall<'a, C, A> where C: BorrowMut, /// // execute the final call using `doit()`. /// // Values shown here are possibly random and not representative ! /// let result = hub.cloudloading().add_book() -/// .upload_client_token("magna") -/// .name("elitr") -/// .mime_type("magna") -/// .drive_document_id("ipsum") +/// .upload_client_token("elitr") +/// .name("magna") +/// .mime_type("ipsum") +/// .drive_document_id("invidunt") /// .doit(); /// # } /// ``` @@ -15888,7 +15858,7 @@ impl<'a, C, A> CloudloadingAddBookCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, BooksCloudloadingResource)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -15947,8 +15917,7 @@ impl<'a, C, A> CloudloadingAddBookCall<'a, C, A> where C: BorrowMut CloudloadingUpdateBookCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, BooksCloudloadingResource)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -16195,8 +16164,7 @@ impl<'a, C, A> CloudloadingUpdateBookCall<'a, C, A> where C: BorrowMut CloudloadingDeleteBookCall<'a, C, A> where C: BorrowMut Result { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -16412,8 +16380,7 @@ impl<'a, C, A> CloudloadingDeleteBookCall<'a, C, A> where C: BorrowMut"] description = "A complete library to interact with calendar (protocol v3)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/calendar3-cli" @@ -17,18 +17,18 @@ keywords = ["calendar", "google", "cli"] name = "calendar3" [dependencies] -hyper = "0.7" -mime = "0.1.0" -serde = ">= 0.7.0" -serde_json = ">= 0.7.0" -yup-oauth2 = ">= 0.5.4" +hyper = "0.8" +mime = "0.2.0" +serde = "0.6.0" +serde_json = "0.6.0" +yup-oauth2 = ">= 0.5.6" strsim = "0.4" yup-hyper-mock = "1.0" clap = "2.0" [build-dependencies] -syntex = { version = ">= 0.23" } -serde_codegen = { version = ">= 0.6" } +syntex = { version = "= 0.28" } +serde_codegen = { version = "= 0.6.13" } [dependencies.google-calendar3] diff --git a/gen/calendar3-cli/README.md b/gen/calendar3-cli/README.md index 5811b9746c..c5e549424f 100644 --- a/gen/calendar3-cli/README.md +++ b/gen/calendar3-cli/README.md @@ -17,14 +17,14 @@ Everything else about the *calendar* API can be found at the You can download the pre-compiled 64bit binaries for the following platforms: -* ![icon](http://megaicons.net/static/img/icons_sizes/6/140/16/ubuntu-icon.png) [ubuntu](http://dl.byronimo.de/google.rs/cli/0.3.3/ubuntu/calendar3.tar.gz) -* ![icon](http://hydra-media.cursecdn.com/wow.gamepedia.com/a/a2/Apple-icon-16x16.png?version=25ddd67ac3dd3b634478e3978b76cb74) [osx](http://dl.byronimo.de/google.rs/cli/0.3.3/osx/calendar3.tar.gz) +* ![icon](http://megaicons.net/static/img/icons_sizes/6/140/16/ubuntu-icon.png) [ubuntu](http://dl.byronimo.de/google.rs/cli/0.3.4/ubuntu/calendar3.tar.gz) +* ![icon](http://hydra-media.cursecdn.com/wow.gamepedia.com/a/a2/Apple-icon-16x16.png?version=25ddd67ac3dd3b634478e3978b76cb74) [osx](http://dl.byronimo.de/google.rs/cli/0.3.4/osx/calendar3.tar.gz) Find the source code [on github](https://github.com/Byron/google-apis-rs/tree/master/gen/calendar3-cli). # Usage -This documentation was generated from the *calendar* API at revision *20160221*. The CLI is at version *0.3.3*. +This documentation was generated from the *calendar* API at revision *20160405*. The CLI is at version *0.3.4*. ```bash calendar3 [options] diff --git a/gen/calendar3-cli/mkdocs.yml b/gen/calendar3-cli/mkdocs.yml index 114833f024..c8a672fa1e 100644 --- a/gen/calendar3-cli/mkdocs.yml +++ b/gen/calendar3-cli/mkdocs.yml @@ -1,4 +1,4 @@ -site_name: calendar v0.3.3+20160221 +site_name: calendar v0.3.4+20160405 site_url: http://byron.github.io/google-apis-rs/google-calendar3-cli site_description: Write integrating applications with bcore diff --git a/gen/calendar3-cli/src/cmn.rs b/gen/calendar3-cli/src/cmn.rs index 188159ee80..ae86fdef65 100644 --- a/gen/calendar3-cli/src/cmn.rs +++ b/gen/calendar3-cli/src/cmn.rs @@ -414,7 +414,7 @@ impl TokenStorage for JsonTokenStorage { Err(err) => match err.kind() { io::ErrorKind::NotFound => Ok(()), - _ => Err(json::Error::Io(err)) + _ => Err(json::Error::IoError(err)) }, Ok(_) => Ok(()), } @@ -427,7 +427,7 @@ impl TokenStorage for JsonTokenStorage { Err(serde_err) => Err(serde_err), } }, - Err(io_err) => Err(json::Error::Io(io_err)) + Err(io_err) => Err(json::Error::IoError(io_err)) } } } @@ -444,7 +444,7 @@ impl TokenStorage for JsonTokenStorage { Err(io_err) => { match io_err.kind() { io::ErrorKind::NotFound => Ok(None), - _ => Err(json::Error::Io(io_err)) + _ => Err(json::Error::IoError(io_err)) } } } @@ -683,7 +683,7 @@ pub fn application_secret_from_directory(dir: &str, = json::from_str(json_console_secret).unwrap(); match json::to_writer_pretty(&mut f, &console_secret) { Err(serde_err) => match serde_err { - json::Error::Io(err) => err, + json::Error::IoError(err) => err, _ => panic!("Unexpected serde error: {:#?}", serde_err) }, Ok(_) => continue, @@ -696,7 +696,7 @@ pub fn application_secret_from_directory(dir: &str, }, Ok(f) => { match json::de::from_reader::<_, ConsoleApplicationSecret>(f) { - Err(json::Error::Io(err)) => + Err(json::Error::IoError(err)) => return secret_io_error(err), Err(json_err) => return Err(CLIError::Configuration( diff --git a/gen/calendar3-cli/src/main.rs b/gen/calendar3-cli/src/main.rs index 671348acb1..fa0192058e 100644 --- a/gen/calendar3-cli/src/main.rs +++ b/gen/calendar3-cli/src/main.rs @@ -4385,8 +4385,8 @@ fn main() { let mut app = App::new("calendar3") .author("Sebastian Thiel ") - .version("0.3.3+20160221") - .about("Lets you manipulate events and other calendar data.") + .version("0.3.4+20160405") + .about("Manipulates events and other calendar data.") .after_help("All documentation details can be found at http://byron.github.io/google-apis-rs/google_calendar3_cli") .arg(Arg::with_name("url") .long("scope") diff --git a/gen/calendar3/Cargo.toml b/gen/calendar3/Cargo.toml index f1a9e2aefb..87df473724 100644 --- a/gen/calendar3/Cargo.toml +++ b/gen/calendar3/Cargo.toml @@ -4,7 +4,7 @@ [package] name = "google-calendar3" -version = "0.1.12+20160221" +version = "0.1.13+20160405" authors = ["Sebastian Thiel "] description = "A complete library to interact with calendar (protocol v3)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/calendar3" @@ -16,14 +16,14 @@ build = "src/build.rs" [dependencies] -hyper = "0.7" -mime = "0.1.0" -serde = ">= 0.7.0" -serde_json = ">= 0.7.0" -yup-oauth2 = ">= 0.5.4" +hyper = "0.8" +mime = "0.2.0" +serde = "0.6.0" +serde_json = "0.6.0" +yup-oauth2 = ">= 0.5.6" url = ">= 0.5" [build-dependencies] -syntex = { version = ">= 0.23" } -serde_codegen = { version = ">= 0.6" } +syntex = { version = "= 0.28" } +serde_codegen = { version = "= 0.6.13" } diff --git a/gen/calendar3/README.md b/gen/calendar3/README.md index fb6cb0894b..493fb20317 100644 --- a/gen/calendar3/README.md +++ b/gen/calendar3/README.md @@ -5,7 +5,7 @@ DO NOT EDIT ! --> The `google-calendar3` library allows access to all features of the *Google calendar* service. -This documentation was generated from *calendar* crate version *0.1.12+20160221*, where *20160221* is the exact revision of the *calendar:v3* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.12*. +This documentation was generated from *calendar* crate version *0.1.13+20160405*, where *20160405* is the exact revision of the *calendar:v3* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.13*. Everything else about the *calendar* *v3* API can be found at the [official documentation site](https://developers.google.com/google-apps/calendar/firstapp). diff --git a/gen/calendar3/src/cmn.rs b/gen/calendar3/src/cmn.rs index 87b91a8986..c69621da55 100644 --- a/gen/calendar3/src/cmn.rs +++ b/gen/calendar3/src/cmn.rs @@ -12,7 +12,7 @@ use mime::{Mime, TopLevel, SubLevel, Attr, Value}; use oauth2::{TokenType, Retry, self}; use hyper; use hyper::header::{ContentType, ContentLength, Headers, UserAgent, Authorization, Header, - HeaderFormat}; + HeaderFormat, Bearer}; use hyper::http::h1::LINE_ENDING; use hyper::method::Method; use hyper::status::StatusCode; @@ -634,7 +634,7 @@ pub struct ResumableUploadHelper<'a, A: 'a> { pub start_at: Option, pub auth: &'a mut A, pub user_agent: &'a str, - pub auth_header: Authorization, + pub auth_header: Authorization, pub url: &'a str, pub reader: &'a mut ReadSeek, pub media_type: Mime, diff --git a/gen/calendar3/src/lib.rs b/gen/calendar3/src/lib.rs index 828ebb0597..95922830a9 100644 --- a/gen/calendar3/src/lib.rs +++ b/gen/calendar3/src/lib.rs @@ -2,7 +2,7 @@ // This file was generated automatically from 'src/mako/api/lib.rs.mako' // DO NOT EDIT ! -//! This documentation was generated from *calendar* crate version *0.1.12+20160221*, where *20160221* is the exact revision of the *calendar:v3* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.12*. +//! This documentation was generated from *calendar* crate version *0.1.13+20160405*, where *20160405* is the exact revision of the *calendar:v3* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.13*. //! //! Everything else about the *calendar* *v3* API can be found at the //! [official documentation site](https://developers.google.com/google-apps/calendar/firstapp). diff --git a/gen/calendar3/src/lib.rs.in b/gen/calendar3/src/lib.rs.in index 04b9d99ee3..5a9aa40f73 100644 --- a/gen/calendar3/src/lib.rs.in +++ b/gen/calendar3/src/lib.rs.in @@ -154,7 +154,7 @@ impl<'a, C, A> CalendarHub CalendarHub { client: RefCell::new(client), auth: RefCell::new(authenticator), - _user_agent: "google-api-rust-client/0.1.12".to_string(), + _user_agent: "google-api-rust-client/0.1.13".to_string(), } } @@ -184,7 +184,7 @@ impl<'a, C, A> CalendarHub } /// Set the user-agent header field to use in all requests to the server. - /// It defaults to `google-api-rust-client/0.1.12`. + /// It defaults to `google-api-rust-client/0.1.13`. /// /// Returns the previously set user-agent. pub fn user_agent(&mut self, agent_name: String) -> String { @@ -2287,7 +2287,7 @@ impl<'a, C, A> FreebusyQueryCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, FreeBusyResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -2345,8 +2345,7 @@ impl<'a, C, A> FreebusyQueryCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -2520,7 +2519,7 @@ impl<'a, C, A> SettingListCall<'a, C, A> where C: BorrowMut, A: o /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Settings)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -2576,8 +2575,7 @@ impl<'a, C, A> SettingListCall<'a, C, A> where C: BorrowMut, A: o } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -2769,7 +2767,7 @@ impl<'a, C, A> SettingWatchCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Channel)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -2836,8 +2834,7 @@ impl<'a, C, A> SettingWatchCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -3030,7 +3027,7 @@ impl<'a, C, A> SettingGetCall<'a, C, A> where C: BorrowMut, A: oa /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Setting)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -3099,8 +3096,7 @@ impl<'a, C, A> SettingGetCall<'a, C, A> where C: BorrowMut, A: oa } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -3275,7 +3271,7 @@ impl<'a, C, A> CalendarListUpdateCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, CalendarListEntry)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -3358,8 +3354,7 @@ impl<'a, C, A> CalendarListUpdateCall<'a, C, A> where C: BorrowMut CalendarListDeleteCall<'a, C, A> where C: BorrowMut Result { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -3613,8 +3608,7 @@ impl<'a, C, A> CalendarListDeleteCall<'a, C, A> where C: BorrowMut CalendarListGetCall<'a, C, A> where C: BorrowMut, /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, CalendarListEntry)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -3839,8 +3833,7 @@ impl<'a, C, A> CalendarListGetCall<'a, C, A> where C: BorrowMut, } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -4017,7 +4010,7 @@ impl<'a, C, A> CalendarListListCall<'a, C, A> where C: BorrowMut, /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, CalendarList)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -4082,8 +4075,7 @@ impl<'a, C, A> CalendarListListCall<'a, C, A> where C: BorrowMut, } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -4293,7 +4285,7 @@ impl<'a, C, A> CalendarListInsertCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, CalendarListEntry)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -4354,8 +4346,7 @@ impl<'a, C, A> CalendarListInsertCall<'a, C, A> where C: BorrowMut CalendarListPatchCall<'a, C, A> where C: BorrowMut /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, CalendarListEntry)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -4623,8 +4614,7 @@ impl<'a, C, A> CalendarListPatchCall<'a, C, A> where C: BorrowMut } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -4828,7 +4818,7 @@ impl<'a, C, A> CalendarListWatchCall<'a, C, A> where C: BorrowMut /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Channel)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -4904,8 +4894,7 @@ impl<'a, C, A> CalendarListWatchCall<'a, C, A> where C: BorrowMut } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -5127,7 +5116,7 @@ impl<'a, C, A> CalendarPatchCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Calendar)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -5207,8 +5196,7 @@ impl<'a, C, A> CalendarPatchCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -5387,7 +5375,7 @@ impl<'a, C, A> CalendarDeleteCall<'a, C, A> where C: BorrowMut, A /// Perform the operation you have build so far. pub fn doit(mut self) -> Result { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -5455,8 +5443,7 @@ impl<'a, C, A> CalendarDeleteCall<'a, C, A> where C: BorrowMut, A } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Delete, &url) @@ -5612,7 +5599,7 @@ impl<'a, C, A> CalendarGetCall<'a, C, A> where C: BorrowMut, A: o /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Calendar)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -5681,8 +5668,7 @@ impl<'a, C, A> CalendarGetCall<'a, C, A> where C: BorrowMut, A: o } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -5848,7 +5834,7 @@ impl<'a, C, A> CalendarClearCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -5916,8 +5902,7 @@ impl<'a, C, A> CalendarClearCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Post, &url) @@ -6079,7 +6064,7 @@ impl<'a, C, A> CalendarInsertCall<'a, C, A> where C: BorrowMut, A /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Calendar)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -6137,8 +6122,7 @@ impl<'a, C, A> CalendarInsertCall<'a, C, A> where C: BorrowMut, A } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -6314,7 +6298,7 @@ impl<'a, C, A> CalendarUpdateCall<'a, C, A> where C: BorrowMut, A /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Calendar)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -6394,8 +6378,7 @@ impl<'a, C, A> CalendarUpdateCall<'a, C, A> where C: BorrowMut, A } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -6589,7 +6572,7 @@ impl<'a, C, A> AclWatchCall<'a, C, A> where C: BorrowMut, A: oaut /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Channel)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -6681,8 +6664,7 @@ impl<'a, C, A> AclWatchCall<'a, C, A> where C: BorrowMut, A: oaut } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -6899,7 +6881,7 @@ impl<'a, C, A> AclInsertCall<'a, C, A> where C: BorrowMut, A: oau /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, AclRule)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -6979,8 +6961,7 @@ impl<'a, C, A> AclInsertCall<'a, C, A> where C: BorrowMut, A: oau } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -7167,7 +7148,7 @@ impl<'a, C, A> AclUpdateCall<'a, C, A> where C: BorrowMut, A: oau /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, AclRule)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -7248,8 +7229,7 @@ impl<'a, C, A> AclUpdateCall<'a, C, A> where C: BorrowMut, A: oau } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -7446,7 +7426,7 @@ impl<'a, C, A> AclPatchCall<'a, C, A> where C: BorrowMut, A: oaut /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, AclRule)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -7527,8 +7507,7 @@ impl<'a, C, A> AclPatchCall<'a, C, A> where C: BorrowMut, A: oaut } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -7725,7 +7704,7 @@ impl<'a, C, A> AclListCall<'a, C, A> where C: BorrowMut, A: oauth /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Acl)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -7806,8 +7785,7 @@ impl<'a, C, A> AclListCall<'a, C, A> where C: BorrowMut, A: oauth } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -8005,7 +7983,7 @@ impl<'a, C, A> AclDeleteCall<'a, C, A> where C: BorrowMut, A: oau /// Perform the operation you have build so far. pub fn doit(mut self) -> Result { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -8074,8 +8052,7 @@ impl<'a, C, A> AclDeleteCall<'a, C, A> where C: BorrowMut, A: oau } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Delete, &url) @@ -8242,7 +8219,7 @@ impl<'a, C, A> AclGetCall<'a, C, A> where C: BorrowMut, A: oauth2 /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, AclRule)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -8312,8 +8289,7 @@ impl<'a, C, A> AclGetCall<'a, C, A> where C: BorrowMut, A: oauth2 } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -8495,7 +8471,7 @@ impl<'a, C, A> ChannelStopCall<'a, C, A> where C: BorrowMut, A: o /// Perform the operation you have build so far. pub fn doit(mut self) -> Result { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -8552,8 +8528,7 @@ impl<'a, C, A> ChannelStopCall<'a, C, A> where C: BorrowMut, A: o } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -8711,7 +8686,7 @@ impl<'a, C, A> ColorGetCall<'a, C, A> where C: BorrowMut, A: oaut /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Colors)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -8758,8 +8733,7 @@ impl<'a, C, A> ColorGetCall<'a, C, A> where C: BorrowMut, A: oaut } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -8918,7 +8892,7 @@ impl<'a, C, A> EventDeleteCall<'a, C, A> where C: BorrowMut, A: o /// Perform the operation you have build so far. pub fn doit(mut self) -> Result { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -8990,8 +8964,7 @@ impl<'a, C, A> EventDeleteCall<'a, C, A> where C: BorrowMut, A: o } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Delete, &url) @@ -9177,7 +9150,7 @@ impl<'a, C, A> EventInsertCall<'a, C, A> where C: BorrowMut, A: o /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Event)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -9266,8 +9239,7 @@ impl<'a, C, A> EventInsertCall<'a, C, A> where C: BorrowMut, A: o } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -9476,7 +9448,7 @@ impl<'a, C, A> EventImportCall<'a, C, A> where C: BorrowMut, A: o /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Event)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -9559,8 +9531,7 @@ impl<'a, C, A> EventImportCall<'a, C, A> where C: BorrowMut, A: o } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -9765,7 +9736,7 @@ impl<'a, C, A> EventInstanceCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Events)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -9862,8 +9833,7 @@ impl<'a, C, A> EventInstanceCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -10109,7 +10079,7 @@ impl<'a, C, A> EventGetCall<'a, C, A> where C: BorrowMut, A: oaut /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Event)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -10188,8 +10158,7 @@ impl<'a, C, A> EventGetCall<'a, C, A> where C: BorrowMut, A: oaut } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -10420,7 +10389,7 @@ impl<'a, C, A> EventListCall<'a, C, A> where C: BorrowMut, A: oau /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Events)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -10544,8 +10513,7 @@ impl<'a, C, A> EventListCall<'a, C, A> where C: BorrowMut, A: oau } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -10861,7 +10829,7 @@ impl<'a, C, A> EventPatchCall<'a, C, A> where C: BorrowMut, A: oa /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Event)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -10954,8 +10922,7 @@ impl<'a, C, A> EventPatchCall<'a, C, A> where C: BorrowMut, A: oa } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -11176,7 +11143,7 @@ impl<'a, C, A> EventMoveCall<'a, C, A> where C: BorrowMut, A: oau /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Event)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -11250,8 +11217,7 @@ impl<'a, C, A> EventMoveCall<'a, C, A> where C: BorrowMut, A: oau } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Post, &url) @@ -11460,7 +11426,7 @@ impl<'a, C, A> EventUpdateCall<'a, C, A> where C: BorrowMut, A: o /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Event)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -11553,8 +11519,7 @@ impl<'a, C, A> EventUpdateCall<'a, C, A> where C: BorrowMut, A: o } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -11812,7 +11777,7 @@ impl<'a, C, A> EventWatchCall<'a, C, A> where C: BorrowMut, A: oa /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Channel)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -11947,8 +11912,7 @@ impl<'a, C, A> EventWatchCall<'a, C, A> where C: BorrowMut, A: oa } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -12264,7 +12228,7 @@ impl<'a, C, A> EventQuickAddCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Event)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -12337,8 +12301,7 @@ impl<'a, C, A> EventQuickAddCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Post, &url) diff --git a/gen/civicinfo2-cli/Cargo.toml b/gen/civicinfo2-cli/Cargo.toml index de97f25e8f..0a8085398a 100644 --- a/gen/civicinfo2-cli/Cargo.toml +++ b/gen/civicinfo2-cli/Cargo.toml @@ -4,7 +4,7 @@ [package] name = "google-civicinfo2-cli" -version = "0.3.3+20150820" +version = "0.3.4+20150820" authors = ["Sebastian Thiel "] description = "A complete library to interact with Civic Info (protocol v2)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/civicinfo2-cli" @@ -17,18 +17,18 @@ keywords = ["civicinfo", "google", "cli"] name = "civicinfo2" [dependencies] -hyper = "0.7" -mime = "0.1.0" -serde = ">= 0.7.0" -serde_json = ">= 0.7.0" -yup-oauth2 = ">= 0.5.4" +hyper = "0.8" +mime = "0.2.0" +serde = "0.6.0" +serde_json = "0.6.0" +yup-oauth2 = ">= 0.5.6" strsim = "0.4" yup-hyper-mock = "1.0" clap = "2.0" [build-dependencies] -syntex = { version = ">= 0.23" } -serde_codegen = { version = ">= 0.6" } +syntex = { version = "= 0.28" } +serde_codegen = { version = "= 0.6.13" } [dependencies.google-civicinfo2] diff --git a/gen/civicinfo2-cli/README.md b/gen/civicinfo2-cli/README.md index 2cb93de2f1..1ff33251b1 100644 --- a/gen/civicinfo2-cli/README.md +++ b/gen/civicinfo2-cli/README.md @@ -17,14 +17,14 @@ Everything else about the *Civic Info* API can be found at the You can download the pre-compiled 64bit binaries for the following platforms: -* ![icon](http://megaicons.net/static/img/icons_sizes/6/140/16/ubuntu-icon.png) [ubuntu](http://dl.byronimo.de/google.rs/cli/0.3.3/ubuntu/civicinfo2.tar.gz) -* ![icon](http://hydra-media.cursecdn.com/wow.gamepedia.com/a/a2/Apple-icon-16x16.png?version=25ddd67ac3dd3b634478e3978b76cb74) [osx](http://dl.byronimo.de/google.rs/cli/0.3.3/osx/civicinfo2.tar.gz) +* ![icon](http://megaicons.net/static/img/icons_sizes/6/140/16/ubuntu-icon.png) [ubuntu](http://dl.byronimo.de/google.rs/cli/0.3.4/ubuntu/civicinfo2.tar.gz) +* ![icon](http://hydra-media.cursecdn.com/wow.gamepedia.com/a/a2/Apple-icon-16x16.png?version=25ddd67ac3dd3b634478e3978b76cb74) [osx](http://dl.byronimo.de/google.rs/cli/0.3.4/osx/civicinfo2.tar.gz) Find the source code [on github](https://github.com/Byron/google-apis-rs/tree/master/gen/civicinfo2-cli). # Usage -This documentation was generated from the *Civic Info* API at revision *20150820*. The CLI is at version *0.3.3*. +This documentation was generated from the *Civic Info* API at revision *20150820*. The CLI is at version *0.3.4*. ```bash civicinfo2 [options] diff --git a/gen/civicinfo2-cli/mkdocs.yml b/gen/civicinfo2-cli/mkdocs.yml index d50cb2f205..eebe74dc47 100644 --- a/gen/civicinfo2-cli/mkdocs.yml +++ b/gen/civicinfo2-cli/mkdocs.yml @@ -1,4 +1,4 @@ -site_name: Civic Info v0.3.3+20150820 +site_name: Civic Info v0.3.4+20150820 site_url: http://byron.github.io/google-apis-rs/google-civicinfo2-cli site_description: Write integrating applications with bcore diff --git a/gen/civicinfo2-cli/src/cmn.rs b/gen/civicinfo2-cli/src/cmn.rs index 188159ee80..ae86fdef65 100644 --- a/gen/civicinfo2-cli/src/cmn.rs +++ b/gen/civicinfo2-cli/src/cmn.rs @@ -414,7 +414,7 @@ impl TokenStorage for JsonTokenStorage { Err(err) => match err.kind() { io::ErrorKind::NotFound => Ok(()), - _ => Err(json::Error::Io(err)) + _ => Err(json::Error::IoError(err)) }, Ok(_) => Ok(()), } @@ -427,7 +427,7 @@ impl TokenStorage for JsonTokenStorage { Err(serde_err) => Err(serde_err), } }, - Err(io_err) => Err(json::Error::Io(io_err)) + Err(io_err) => Err(json::Error::IoError(io_err)) } } } @@ -444,7 +444,7 @@ impl TokenStorage for JsonTokenStorage { Err(io_err) => { match io_err.kind() { io::ErrorKind::NotFound => Ok(None), - _ => Err(json::Error::Io(io_err)) + _ => Err(json::Error::IoError(io_err)) } } } @@ -683,7 +683,7 @@ pub fn application_secret_from_directory(dir: &str, = json::from_str(json_console_secret).unwrap(); match json::to_writer_pretty(&mut f, &console_secret) { Err(serde_err) => match serde_err { - json::Error::Io(err) => err, + json::Error::IoError(err) => err, _ => panic!("Unexpected serde error: {:#?}", serde_err) }, Ok(_) => continue, @@ -696,7 +696,7 @@ pub fn application_secret_from_directory(dir: &str, }, Ok(f) => { match json::de::from_reader::<_, ConsoleApplicationSecret>(f) { - Err(json::Error::Io(err)) => + Err(json::Error::IoError(err)) => return secret_io_error(err), Err(json_err) => return Err(CLIError::Configuration( diff --git a/gen/civicinfo2-cli/src/main.rs b/gen/civicinfo2-cli/src/main.rs index b14faa69f3..f8c91fc22c 100644 --- a/gen/civicinfo2-cli/src/main.rs +++ b/gen/civicinfo2-cli/src/main.rs @@ -555,7 +555,7 @@ fn main() { let mut app = App::new("civicinfo2") .author("Sebastian Thiel ") - .version("0.3.3+20150820") + .version("0.3.4+20150820") .about("An API for accessing civic information.") .after_help("All documentation details can be found at http://byron.github.io/google-apis-rs/google_civicinfo2_cli") .arg(Arg::with_name("folder") diff --git a/gen/civicinfo2/Cargo.toml b/gen/civicinfo2/Cargo.toml index 4177566f0b..0d3baf765f 100644 --- a/gen/civicinfo2/Cargo.toml +++ b/gen/civicinfo2/Cargo.toml @@ -4,7 +4,7 @@ [package] name = "google-civicinfo2" -version = "0.1.12+20150820" +version = "0.1.13+20150820" authors = ["Sebastian Thiel "] description = "A complete library to interact with Civic Info (protocol v2)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/civicinfo2" @@ -16,14 +16,14 @@ build = "src/build.rs" [dependencies] -hyper = "0.7" -mime = "0.1.0" -serde = ">= 0.7.0" -serde_json = ">= 0.7.0" -yup-oauth2 = ">= 0.5.4" +hyper = "0.8" +mime = "0.2.0" +serde = "0.6.0" +serde_json = "0.6.0" +yup-oauth2 = ">= 0.5.6" url = ">= 0.5" [build-dependencies] -syntex = { version = ">= 0.23" } -serde_codegen = { version = ">= 0.6" } +syntex = { version = "= 0.28" } +serde_codegen = { version = "= 0.6.13" } diff --git a/gen/civicinfo2/README.md b/gen/civicinfo2/README.md index a464947c05..2a7fd1e597 100644 --- a/gen/civicinfo2/README.md +++ b/gen/civicinfo2/README.md @@ -5,7 +5,7 @@ DO NOT EDIT ! --> The `google-civicinfo2` library allows access to all features of the *Google Civic Info* service. -This documentation was generated from *Civic Info* crate version *0.1.12+20150820*, where *20150820* is the exact revision of the *civicinfo:v2* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.12*. +This documentation was generated from *Civic Info* crate version *0.1.13+20150820*, where *20150820* is the exact revision of the *civicinfo:v2* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.13*. Everything else about the *Civic Info* *v2* API can be found at the [official documentation site](https://developers.google.com/civic-information). diff --git a/gen/civicinfo2/src/cmn.rs b/gen/civicinfo2/src/cmn.rs index 87b91a8986..c69621da55 100644 --- a/gen/civicinfo2/src/cmn.rs +++ b/gen/civicinfo2/src/cmn.rs @@ -12,7 +12,7 @@ use mime::{Mime, TopLevel, SubLevel, Attr, Value}; use oauth2::{TokenType, Retry, self}; use hyper; use hyper::header::{ContentType, ContentLength, Headers, UserAgent, Authorization, Header, - HeaderFormat}; + HeaderFormat, Bearer}; use hyper::http::h1::LINE_ENDING; use hyper::method::Method; use hyper::status::StatusCode; @@ -634,7 +634,7 @@ pub struct ResumableUploadHelper<'a, A: 'a> { pub start_at: Option, pub auth: &'a mut A, pub user_agent: &'a str, - pub auth_header: Authorization, + pub auth_header: Authorization, pub url: &'a str, pub reader: &'a mut ReadSeek, pub media_type: Mime, diff --git a/gen/civicinfo2/src/lib.rs b/gen/civicinfo2/src/lib.rs index 774c062c7d..4022d93a1d 100644 --- a/gen/civicinfo2/src/lib.rs +++ b/gen/civicinfo2/src/lib.rs @@ -2,7 +2,7 @@ // This file was generated automatically from 'src/mako/api/lib.rs.mako' // DO NOT EDIT ! -//! This documentation was generated from *Civic Info* crate version *0.1.12+20150820*, where *20150820* is the exact revision of the *civicinfo:v2* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.12*. +//! This documentation was generated from *Civic Info* crate version *0.1.13+20150820*, where *20150820* is the exact revision of the *civicinfo:v2* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.13*. //! //! Everything else about the *Civic Info* *v2* API can be found at the //! [official documentation site](https://developers.google.com/civic-information). diff --git a/gen/civicinfo2/src/lib.rs.in b/gen/civicinfo2/src/lib.rs.in index d06052b8f2..db2763fb1e 100644 --- a/gen/civicinfo2/src/lib.rs.in +++ b/gen/civicinfo2/src/lib.rs.in @@ -107,7 +107,7 @@ impl<'a, C, A> CivicInfo CivicInfo { client: RefCell::new(client), auth: RefCell::new(authenticator), - _user_agent: "google-api-rust-client/0.1.12".to_string(), + _user_agent: "google-api-rust-client/0.1.13".to_string(), } } @@ -122,7 +122,7 @@ impl<'a, C, A> CivicInfo } /// Set the user-agent header field to use in all requests to the server. - /// It defaults to `google-api-rust-client/0.1.12`. + /// It defaults to `google-api-rust-client/0.1.13`. /// /// Returns the previously set user-agent. pub fn user_agent(&mut self, agent_name: String) -> String { @@ -954,7 +954,7 @@ impl<'a, C, A> DivisionSearchCall<'a, C, A> where C: BorrowMut, A /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, DivisionSearchResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -1144,7 +1144,7 @@ impl<'a, C, A> ElectionElectionQueryCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, ElectionsQueryResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -1329,7 +1329,7 @@ impl<'a, C, A> ElectionVoterInfoQueryCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, VoterInfoResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -1548,7 +1548,7 @@ impl<'a, C, A> RepresentativeRepresentativeInfoByAddresCall<'a, C, A> where C: B /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, RepresentativeInfoResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -1781,7 +1781,7 @@ impl<'a, C, A> RepresentativeRepresentativeInfoByDivisionCall<'a, C, A> where C: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, RepresentativeInfoData)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, diff --git a/gen/classroom1-cli/Cargo.toml b/gen/classroom1-cli/Cargo.toml index a8f7d08c0f..bca9b33d5a 100644 --- a/gen/classroom1-cli/Cargo.toml +++ b/gen/classroom1-cli/Cargo.toml @@ -4,7 +4,7 @@ [package] name = "google-classroom1-cli" -version = "0.3.3+20151013" +version = "0.3.4+20151013" authors = ["Sebastian Thiel "] description = "A complete library to interact with classroom (protocol v1)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/classroom1-cli" @@ -17,18 +17,18 @@ keywords = ["classroom", "google", "cli"] name = "classroom1" [dependencies] -hyper = "0.7" -mime = "0.1.0" -serde = ">= 0.7.0" -serde_json = ">= 0.7.0" -yup-oauth2 = ">= 0.5.4" +hyper = "0.8" +mime = "0.2.0" +serde = "0.6.0" +serde_json = "0.6.0" +yup-oauth2 = ">= 0.5.6" strsim = "0.4" yup-hyper-mock = "1.0" clap = "2.0" [build-dependencies] -syntex = { version = ">= 0.23" } -serde_codegen = { version = ">= 0.6" } +syntex = { version = "= 0.28" } +serde_codegen = { version = "= 0.6.13" } [dependencies.google-classroom1] diff --git a/gen/classroom1-cli/README.md b/gen/classroom1-cli/README.md index e94b88507d..2ed54da265 100644 --- a/gen/classroom1-cli/README.md +++ b/gen/classroom1-cli/README.md @@ -17,14 +17,14 @@ Everything else about the *classroom* API can be found at the You can download the pre-compiled 64bit binaries for the following platforms: -* ![icon](http://megaicons.net/static/img/icons_sizes/6/140/16/ubuntu-icon.png) [ubuntu](http://dl.byronimo.de/google.rs/cli/0.3.3/ubuntu/classroom1.tar.gz) -* ![icon](http://hydra-media.cursecdn.com/wow.gamepedia.com/a/a2/Apple-icon-16x16.png?version=25ddd67ac3dd3b634478e3978b76cb74) [osx](http://dl.byronimo.de/google.rs/cli/0.3.3/osx/classroom1.tar.gz) +* ![icon](http://megaicons.net/static/img/icons_sizes/6/140/16/ubuntu-icon.png) [ubuntu](http://dl.byronimo.de/google.rs/cli/0.3.4/ubuntu/classroom1.tar.gz) +* ![icon](http://hydra-media.cursecdn.com/wow.gamepedia.com/a/a2/Apple-icon-16x16.png?version=25ddd67ac3dd3b634478e3978b76cb74) [osx](http://dl.byronimo.de/google.rs/cli/0.3.4/osx/classroom1.tar.gz) Find the source code [on github](https://github.com/Byron/google-apis-rs/tree/master/gen/classroom1-cli). # Usage -This documentation was generated from the *classroom* API at revision *20151013*. The CLI is at version *0.3.3*. +This documentation was generated from the *classroom* API at revision *20151013*. The CLI is at version *0.3.4*. ```bash classroom1 [options] diff --git a/gen/classroom1-cli/mkdocs.yml b/gen/classroom1-cli/mkdocs.yml index bf534273ec..b0d5041d1b 100644 --- a/gen/classroom1-cli/mkdocs.yml +++ b/gen/classroom1-cli/mkdocs.yml @@ -1,4 +1,4 @@ -site_name: classroom v0.3.3+20151013 +site_name: classroom v0.3.4+20151013 site_url: http://byron.github.io/google-apis-rs/google-classroom1-cli site_description: Write integrating applications with bcore diff --git a/gen/classroom1-cli/src/cmn.rs b/gen/classroom1-cli/src/cmn.rs index 188159ee80..ae86fdef65 100644 --- a/gen/classroom1-cli/src/cmn.rs +++ b/gen/classroom1-cli/src/cmn.rs @@ -414,7 +414,7 @@ impl TokenStorage for JsonTokenStorage { Err(err) => match err.kind() { io::ErrorKind::NotFound => Ok(()), - _ => Err(json::Error::Io(err)) + _ => Err(json::Error::IoError(err)) }, Ok(_) => Ok(()), } @@ -427,7 +427,7 @@ impl TokenStorage for JsonTokenStorage { Err(serde_err) => Err(serde_err), } }, - Err(io_err) => Err(json::Error::Io(io_err)) + Err(io_err) => Err(json::Error::IoError(io_err)) } } } @@ -444,7 +444,7 @@ impl TokenStorage for JsonTokenStorage { Err(io_err) => { match io_err.kind() { io::ErrorKind::NotFound => Ok(None), - _ => Err(json::Error::Io(io_err)) + _ => Err(json::Error::IoError(io_err)) } } } @@ -683,7 +683,7 @@ pub fn application_secret_from_directory(dir: &str, = json::from_str(json_console_secret).unwrap(); match json::to_writer_pretty(&mut f, &console_secret) { Err(serde_err) => match serde_err { - json::Error::Io(err) => err, + json::Error::IoError(err) => err, _ => panic!("Unexpected serde error: {:#?}", serde_err) }, Ok(_) => continue, @@ -696,7 +696,7 @@ pub fn application_secret_from_directory(dir: &str, }, Ok(f) => { match json::de::from_reader::<_, ConsoleApplicationSecret>(f) { - Err(json::Error::Io(err)) => + Err(json::Error::IoError(err)) => return secret_io_error(err), Err(json_err) => return Err(CLIError::Configuration( diff --git a/gen/classroom1-cli/src/main.rs b/gen/classroom1-cli/src/main.rs index 939c9a4fb0..6942c15b3f 100644 --- a/gen/classroom1-cli/src/main.rs +++ b/gen/classroom1-cli/src/main.rs @@ -2328,7 +2328,7 @@ fn main() { let mut app = App::new("classroom1") .author("Sebastian Thiel ") - .version("0.3.3+20151013") + .version("0.3.4+20151013") .about("Google Classroom API") .after_help("All documentation details can be found at http://byron.github.io/google-apis-rs/google_classroom1_cli") .arg(Arg::with_name("url") diff --git a/gen/classroom1/Cargo.toml b/gen/classroom1/Cargo.toml index d64622c23c..70bfd5d99f 100644 --- a/gen/classroom1/Cargo.toml +++ b/gen/classroom1/Cargo.toml @@ -4,7 +4,7 @@ [package] name = "google-classroom1" -version = "0.1.12+20151013" +version = "0.1.13+20151013" authors = ["Sebastian Thiel "] description = "A complete library to interact with classroom (protocol v1)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/classroom1" @@ -16,14 +16,14 @@ build = "src/build.rs" [dependencies] -hyper = "0.7" -mime = "0.1.0" -serde = ">= 0.7.0" -serde_json = ">= 0.7.0" -yup-oauth2 = ">= 0.5.4" +hyper = "0.8" +mime = "0.2.0" +serde = "0.6.0" +serde_json = "0.6.0" +yup-oauth2 = ">= 0.5.6" url = ">= 0.5" [build-dependencies] -syntex = { version = ">= 0.23" } -serde_codegen = { version = ">= 0.6" } +syntex = { version = "= 0.28" } +serde_codegen = { version = "= 0.6.13" } diff --git a/gen/classroom1/README.md b/gen/classroom1/README.md index 39f78e21b5..6203a721f7 100644 --- a/gen/classroom1/README.md +++ b/gen/classroom1/README.md @@ -5,7 +5,7 @@ DO NOT EDIT ! --> The `google-classroom1` library allows access to all features of the *Google classroom* service. -This documentation was generated from *classroom* crate version *0.1.12+20151013*, where *20151013* is the exact revision of the *classroom:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.12*. +This documentation was generated from *classroom* crate version *0.1.13+20151013*, where *20151013* is the exact revision of the *classroom:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.13*. Everything else about the *classroom* *v1* API can be found at the [official documentation site](https://developers.google.com/classroom/). diff --git a/gen/classroom1/src/cmn.rs b/gen/classroom1/src/cmn.rs index 87b91a8986..c69621da55 100644 --- a/gen/classroom1/src/cmn.rs +++ b/gen/classroom1/src/cmn.rs @@ -12,7 +12,7 @@ use mime::{Mime, TopLevel, SubLevel, Attr, Value}; use oauth2::{TokenType, Retry, self}; use hyper; use hyper::header::{ContentType, ContentLength, Headers, UserAgent, Authorization, Header, - HeaderFormat}; + HeaderFormat, Bearer}; use hyper::http::h1::LINE_ENDING; use hyper::method::Method; use hyper::status::StatusCode; @@ -634,7 +634,7 @@ pub struct ResumableUploadHelper<'a, A: 'a> { pub start_at: Option, pub auth: &'a mut A, pub user_agent: &'a str, - pub auth_header: Authorization, + pub auth_header: Authorization, pub url: &'a str, pub reader: &'a mut ReadSeek, pub media_type: Mime, diff --git a/gen/classroom1/src/lib.rs b/gen/classroom1/src/lib.rs index 144fc1373b..c202507ef4 100644 --- a/gen/classroom1/src/lib.rs +++ b/gen/classroom1/src/lib.rs @@ -2,7 +2,7 @@ // This file was generated automatically from 'src/mako/api/lib.rs.mako' // DO NOT EDIT ! -//! This documentation was generated from *classroom* crate version *0.1.12+20151013*, where *20151013* is the exact revision of the *classroom:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.12*. +//! This documentation was generated from *classroom* crate version *0.1.13+20151013*, where *20151013* is the exact revision of the *classroom:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.13*. //! //! Everything else about the *classroom* *v1* API can be found at the //! [official documentation site](https://developers.google.com/classroom/). diff --git a/gen/classroom1/src/lib.rs.in b/gen/classroom1/src/lib.rs.in index 44fe6766c7..aa7fc69092 100644 --- a/gen/classroom1/src/lib.rs.in +++ b/gen/classroom1/src/lib.rs.in @@ -151,7 +151,7 @@ impl<'a, C, A> Classroom Classroom { client: RefCell::new(client), auth: RefCell::new(authenticator), - _user_agent: "google-api-rust-client/0.1.12".to_string(), + _user_agent: "google-api-rust-client/0.1.13".to_string(), } } @@ -166,7 +166,7 @@ impl<'a, C, A> Classroom } /// Set the user-agent header field to use in all requests to the server. - /// It defaults to `google-api-rust-client/0.1.12`. + /// It defaults to `google-api-rust-client/0.1.13`. /// /// Returns the previously set user-agent. pub fn user_agent(&mut self, agent_name: String) -> String { @@ -1138,7 +1138,7 @@ impl<'a, C, A> CourseTeacherListCall<'a, C, A> where C: BorrowMut /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, ListTeachersResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -1213,8 +1213,7 @@ impl<'a, C, A> CourseTeacherListCall<'a, C, A> where C: BorrowMut } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -1400,7 +1399,7 @@ impl<'a, C, A> CourseGetCall<'a, C, A> where C: BorrowMut, A: oau /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Course)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -1469,8 +1468,7 @@ impl<'a, C, A> CourseGetCall<'a, C, A> where C: BorrowMut, A: oau } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -1643,7 +1641,7 @@ impl<'a, C, A> CourseStudentDeleteCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, Empty)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -1713,8 +1711,7 @@ impl<'a, C, A> CourseStudentDeleteCall<'a, C, A> where C: BorrowMut CourseTeacherGetCall<'a, C, A> where C: BorrowMut, /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Teacher)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -1967,8 +1964,7 @@ impl<'a, C, A> CourseTeacherGetCall<'a, C, A> where C: BorrowMut, } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -2154,7 +2150,7 @@ impl<'a, C, A> CourseAliaseListCall<'a, C, A> where C: BorrowMut, /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, ListCourseAliasesResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -2229,8 +2225,7 @@ impl<'a, C, A> CourseAliaseListCall<'a, C, A> where C: BorrowMut, } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -2423,7 +2418,7 @@ impl<'a, C, A> CourseUpdateCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Course)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -2503,8 +2498,7 @@ impl<'a, C, A> CourseUpdateCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -2696,7 +2690,7 @@ impl<'a, C, A> CourseAliaseCreateCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, CourseAlias)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -2776,8 +2770,7 @@ impl<'a, C, A> CourseAliaseCreateCall<'a, C, A> where C: BorrowMut CourseListCall<'a, C, A> where C: BorrowMut, A: oa /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, ListCoursesResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -3028,8 +3021,7 @@ impl<'a, C, A> CourseListCall<'a, C, A> where C: BorrowMut, A: oa } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -3228,7 +3220,7 @@ impl<'a, C, A> CourseStudentCreateCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, Student)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -3311,8 +3303,7 @@ impl<'a, C, A> CourseStudentCreateCall<'a, C, A> where C: BorrowMut CourseAliaseDeleteCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, Empty)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -3575,8 +3566,7 @@ impl<'a, C, A> CourseAliaseDeleteCall<'a, C, A> where C: BorrowMut CourseCreateCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Course)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -3822,8 +3812,7 @@ impl<'a, C, A> CourseCreateCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -4002,7 +3991,7 @@ impl<'a, C, A> CourseStudentListCall<'a, C, A> where C: BorrowMut /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, ListStudentsResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -4077,8 +4066,7 @@ impl<'a, C, A> CourseStudentListCall<'a, C, A> where C: BorrowMut } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -4264,7 +4252,7 @@ impl<'a, C, A> CourseDeleteCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Empty)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -4333,8 +4321,7 @@ impl<'a, C, A> CourseDeleteCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Delete, &url) @@ -4515,7 +4502,7 @@ impl<'a, C, A> CoursePatchCall<'a, C, A> where C: BorrowMut, A: o /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Course)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -4598,8 +4585,7 @@ impl<'a, C, A> CoursePatchCall<'a, C, A> where C: BorrowMut, A: o } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -4792,7 +4778,7 @@ impl<'a, C, A> CourseStudentGetCall<'a, C, A> where C: BorrowMut, /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Student)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -4862,8 +4848,7 @@ impl<'a, C, A> CourseStudentGetCall<'a, C, A> where C: BorrowMut, } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -5046,7 +5031,7 @@ impl<'a, C, A> CourseTeacherDeleteCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, Empty)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -5116,8 +5101,7 @@ impl<'a, C, A> CourseTeacherDeleteCall<'a, C, A> where C: BorrowMut CourseTeacherCreateCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, Teacher)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -5386,8 +5370,7 @@ impl<'a, C, A> CourseTeacherCreateCall<'a, C, A> where C: BorrowMut UserProfileGetCall<'a, C, A> where C: BorrowMut, A /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, UserProfile)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -5641,8 +5624,7 @@ impl<'a, C, A> UserProfileGetCall<'a, C, A> where C: BorrowMut, A } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -5814,7 +5796,7 @@ impl<'a, C, A> InvitationDeleteCall<'a, C, A> where C: BorrowMut, /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Empty)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -5883,8 +5865,7 @@ impl<'a, C, A> InvitationDeleteCall<'a, C, A> where C: BorrowMut, } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Delete, &url) @@ -6062,7 +6043,7 @@ impl<'a, C, A> InvitationCreateCall<'a, C, A> where C: BorrowMut, /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Invitation)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -6120,8 +6101,7 @@ impl<'a, C, A> InvitationCreateCall<'a, C, A> where C: BorrowMut, } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -6303,7 +6283,7 @@ impl<'a, C, A> InvitationListCall<'a, C, A> where C: BorrowMut, A /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, ListInvitationsResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -6362,8 +6342,7 @@ impl<'a, C, A> InvitationListCall<'a, C, A> where C: BorrowMut, A } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -6553,7 +6532,7 @@ impl<'a, C, A> InvitationGetCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Invitation)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -6622,8 +6601,7 @@ impl<'a, C, A> InvitationGetCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -6795,7 +6773,7 @@ impl<'a, C, A> InvitationAcceptCall<'a, C, A> where C: BorrowMut, /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Empty)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -6864,8 +6842,7 @@ impl<'a, C, A> InvitationAcceptCall<'a, C, A> where C: BorrowMut, } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Post, &url) diff --git a/gen/cloudbilling1-cli/Cargo.toml b/gen/cloudbilling1-cli/Cargo.toml index 5ad664f8c7..70041b3498 100644 --- a/gen/cloudbilling1-cli/Cargo.toml +++ b/gen/cloudbilling1-cli/Cargo.toml @@ -4,7 +4,7 @@ [package] name = "google-cloudbilling1-cli" -version = "0.3.3+20151222" +version = "0.3.4+20151222" authors = ["Sebastian Thiel "] description = "A complete library to interact with cloudbilling (protocol v1)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/cloudbilling1-cli" @@ -17,18 +17,18 @@ keywords = ["cloudbilling", "google", "cli"] name = "cloudbilling1" [dependencies] -hyper = "0.7" -mime = "0.1.0" -serde = ">= 0.7.0" -serde_json = ">= 0.7.0" -yup-oauth2 = ">= 0.5.4" +hyper = "0.8" +mime = "0.2.0" +serde = "0.6.0" +serde_json = "0.6.0" +yup-oauth2 = ">= 0.5.6" strsim = "0.4" yup-hyper-mock = "1.0" clap = "2.0" [build-dependencies] -syntex = { version = ">= 0.23" } -serde_codegen = { version = ">= 0.6" } +syntex = { version = "= 0.28" } +serde_codegen = { version = "= 0.6.13" } [dependencies.google-cloudbilling1] diff --git a/gen/cloudbilling1-cli/README.md b/gen/cloudbilling1-cli/README.md index 1cde08b13f..3e4501eecd 100644 --- a/gen/cloudbilling1-cli/README.md +++ b/gen/cloudbilling1-cli/README.md @@ -17,14 +17,14 @@ Everything else about the *cloudbilling* API can be found at the You can download the pre-compiled 64bit binaries for the following platforms: -* ![icon](http://megaicons.net/static/img/icons_sizes/6/140/16/ubuntu-icon.png) [ubuntu](http://dl.byronimo.de/google.rs/cli/0.3.3/ubuntu/cloudbilling1.tar.gz) -* ![icon](http://hydra-media.cursecdn.com/wow.gamepedia.com/a/a2/Apple-icon-16x16.png?version=25ddd67ac3dd3b634478e3978b76cb74) [osx](http://dl.byronimo.de/google.rs/cli/0.3.3/osx/cloudbilling1.tar.gz) +* ![icon](http://megaicons.net/static/img/icons_sizes/6/140/16/ubuntu-icon.png) [ubuntu](http://dl.byronimo.de/google.rs/cli/0.3.4/ubuntu/cloudbilling1.tar.gz) +* ![icon](http://hydra-media.cursecdn.com/wow.gamepedia.com/a/a2/Apple-icon-16x16.png?version=25ddd67ac3dd3b634478e3978b76cb74) [osx](http://dl.byronimo.de/google.rs/cli/0.3.4/osx/cloudbilling1.tar.gz) Find the source code [on github](https://github.com/Byron/google-apis-rs/tree/master/gen/cloudbilling1-cli). # Usage -This documentation was generated from the *cloudbilling* API at revision *20151222*. The CLI is at version *0.3.3*. +This documentation was generated from the *cloudbilling* API at revision *20151222*. The CLI is at version *0.3.4*. ```bash cloudbilling1 [options] diff --git a/gen/cloudbilling1-cli/mkdocs.yml b/gen/cloudbilling1-cli/mkdocs.yml index c6bd4438e1..727250b989 100644 --- a/gen/cloudbilling1-cli/mkdocs.yml +++ b/gen/cloudbilling1-cli/mkdocs.yml @@ -1,4 +1,4 @@ -site_name: cloudbilling v0.3.3+20151222 +site_name: cloudbilling v0.3.4+20151222 site_url: http://byron.github.io/google-apis-rs/google-cloudbilling1-cli site_description: Write integrating applications with bcore diff --git a/gen/cloudbilling1-cli/src/cmn.rs b/gen/cloudbilling1-cli/src/cmn.rs index 188159ee80..ae86fdef65 100644 --- a/gen/cloudbilling1-cli/src/cmn.rs +++ b/gen/cloudbilling1-cli/src/cmn.rs @@ -414,7 +414,7 @@ impl TokenStorage for JsonTokenStorage { Err(err) => match err.kind() { io::ErrorKind::NotFound => Ok(()), - _ => Err(json::Error::Io(err)) + _ => Err(json::Error::IoError(err)) }, Ok(_) => Ok(()), } @@ -427,7 +427,7 @@ impl TokenStorage for JsonTokenStorage { Err(serde_err) => Err(serde_err), } }, - Err(io_err) => Err(json::Error::Io(io_err)) + Err(io_err) => Err(json::Error::IoError(io_err)) } } } @@ -444,7 +444,7 @@ impl TokenStorage for JsonTokenStorage { Err(io_err) => { match io_err.kind() { io::ErrorKind::NotFound => Ok(None), - _ => Err(json::Error::Io(io_err)) + _ => Err(json::Error::IoError(io_err)) } } } @@ -683,7 +683,7 @@ pub fn application_secret_from_directory(dir: &str, = json::from_str(json_console_secret).unwrap(); match json::to_writer_pretty(&mut f, &console_secret) { Err(serde_err) => match serde_err { - json::Error::Io(err) => err, + json::Error::IoError(err) => err, _ => panic!("Unexpected serde error: {:#?}", serde_err) }, Ok(_) => continue, @@ -696,7 +696,7 @@ pub fn application_secret_from_directory(dir: &str, }, Ok(f) => { match json::de::from_reader::<_, ConsoleApplicationSecret>(f) { - Err(json::Error::Io(err)) => + Err(json::Error::IoError(err)) => return secret_io_error(err), Err(json_err) => return Err(CLIError::Configuration( diff --git a/gen/cloudbilling1-cli/src/main.rs b/gen/cloudbilling1-cli/src/main.rs index 871c9029ed..e7f9bce7e7 100644 --- a/gen/cloudbilling1-cli/src/main.rs +++ b/gen/cloudbilling1-cli/src/main.rs @@ -597,7 +597,7 @@ fn main() { let mut app = App::new("cloudbilling1") .author("Sebastian Thiel ") - .version("0.3.3+20151222") + .version("0.3.4+20151222") .about("Retrieves Google Developers Console billing accounts and associates them with projects.") .after_help("All documentation details can be found at http://byron.github.io/google-apis-rs/google_cloudbilling1_cli") .arg(Arg::with_name("url") diff --git a/gen/cloudbilling1/Cargo.toml b/gen/cloudbilling1/Cargo.toml index 85c85d0f0a..dfa546f561 100644 --- a/gen/cloudbilling1/Cargo.toml +++ b/gen/cloudbilling1/Cargo.toml @@ -4,7 +4,7 @@ [package] name = "google-cloudbilling1" -version = "0.1.12+20151222" +version = "0.1.13+20151222" authors = ["Sebastian Thiel "] description = "A complete library to interact with cloudbilling (protocol v1)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/cloudbilling1" @@ -16,14 +16,14 @@ build = "src/build.rs" [dependencies] -hyper = "0.7" -mime = "0.1.0" -serde = ">= 0.7.0" -serde_json = ">= 0.7.0" -yup-oauth2 = ">= 0.5.4" +hyper = "0.8" +mime = "0.2.0" +serde = "0.6.0" +serde_json = "0.6.0" +yup-oauth2 = ">= 0.5.6" url = ">= 0.5" [build-dependencies] -syntex = { version = ">= 0.23" } -serde_codegen = { version = ">= 0.6" } +syntex = { version = "= 0.28" } +serde_codegen = { version = "= 0.6.13" } diff --git a/gen/cloudbilling1/README.md b/gen/cloudbilling1/README.md index 72f58fd9ec..db17ba31d8 100644 --- a/gen/cloudbilling1/README.md +++ b/gen/cloudbilling1/README.md @@ -5,7 +5,7 @@ DO NOT EDIT ! --> The `google-cloudbilling1` library allows access to all features of the *Google cloudbilling* service. -This documentation was generated from *cloudbilling* crate version *0.1.12+20151222*, where *20151222* is the exact revision of the *cloudbilling:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.12*. +This documentation was generated from *cloudbilling* crate version *0.1.13+20151222*, where *20151222* is the exact revision of the *cloudbilling:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.13*. Everything else about the *cloudbilling* *v1* API can be found at the [official documentation site](https://cloud.google.com/billing/). diff --git a/gen/cloudbilling1/src/cmn.rs b/gen/cloudbilling1/src/cmn.rs index 87b91a8986..c69621da55 100644 --- a/gen/cloudbilling1/src/cmn.rs +++ b/gen/cloudbilling1/src/cmn.rs @@ -12,7 +12,7 @@ use mime::{Mime, TopLevel, SubLevel, Attr, Value}; use oauth2::{TokenType, Retry, self}; use hyper; use hyper::header::{ContentType, ContentLength, Headers, UserAgent, Authorization, Header, - HeaderFormat}; + HeaderFormat, Bearer}; use hyper::http::h1::LINE_ENDING; use hyper::method::Method; use hyper::status::StatusCode; @@ -634,7 +634,7 @@ pub struct ResumableUploadHelper<'a, A: 'a> { pub start_at: Option, pub auth: &'a mut A, pub user_agent: &'a str, - pub auth_header: Authorization, + pub auth_header: Authorization, pub url: &'a str, pub reader: &'a mut ReadSeek, pub media_type: Mime, diff --git a/gen/cloudbilling1/src/lib.rs b/gen/cloudbilling1/src/lib.rs index 1d39ad135c..70828f5b2d 100644 --- a/gen/cloudbilling1/src/lib.rs +++ b/gen/cloudbilling1/src/lib.rs @@ -2,7 +2,7 @@ // This file was generated automatically from 'src/mako/api/lib.rs.mako' // DO NOT EDIT ! -//! This documentation was generated from *cloudbilling* crate version *0.1.12+20151222*, where *20151222* is the exact revision of the *cloudbilling:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.12*. +//! This documentation was generated from *cloudbilling* crate version *0.1.13+20151222*, where *20151222* is the exact revision of the *cloudbilling:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.13*. //! //! Everything else about the *cloudbilling* *v1* API can be found at the //! [official documentation site](https://cloud.google.com/billing/). diff --git a/gen/cloudbilling1/src/lib.rs.in b/gen/cloudbilling1/src/lib.rs.in index 5c29ea2346..927e6fa138 100644 --- a/gen/cloudbilling1/src/lib.rs.in +++ b/gen/cloudbilling1/src/lib.rs.in @@ -129,7 +129,7 @@ impl<'a, C, A> Cloudbilling Cloudbilling { client: RefCell::new(client), auth: RefCell::new(authenticator), - _user_agent: "google-api-rust-client/0.1.12".to_string(), + _user_agent: "google-api-rust-client/0.1.13".to_string(), } } @@ -141,7 +141,7 @@ impl<'a, C, A> Cloudbilling } /// Set the user-agent header field to use in all requests to the server. - /// It defaults to `google-api-rust-client/0.1.12`. + /// It defaults to `google-api-rust-client/0.1.13`. /// /// Returns the previously set user-agent. pub fn user_agent(&mut self, agent_name: String) -> String { @@ -482,7 +482,7 @@ impl<'a, C, A> BillingAccountGetCall<'a, C, A> where C: BorrowMut pub fn doit(mut self) -> Result<(hyper::client::Response, BillingAccount)> { use url::percent_encoding::{percent_encode, FORM_URLENCODED_ENCODE_SET}; use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -554,8 +554,7 @@ impl<'a, C, A> BillingAccountGetCall<'a, C, A> where C: BorrowMut } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -730,7 +729,7 @@ impl<'a, C, A> BillingAccountListCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, ListBillingAccountsResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -783,8 +782,7 @@ impl<'a, C, A> BillingAccountListCall<'a, C, A> where C: BorrowMut BillingAccountProjectListCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, ListProjectBillingInfoResponse)> { use url::percent_encoding::{percent_encode, FORM_URLENCODED_ENCODE_SET}; use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -1043,8 +1041,7 @@ impl<'a, C, A> BillingAccountProjectListCall<'a, C, A> where C: BorrowMut ProjectGetBillingInfoCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, ProjectBillingInfo)> { use url::percent_encoding::{percent_encode, FORM_URLENCODED_ENCODE_SET}; use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -1303,8 +1300,7 @@ impl<'a, C, A> ProjectGetBillingInfoCall<'a, C, A> where C: BorrowMut ProjectUpdateBillingInfoCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, ProjectBillingInfo)> { use url::percent_encoding::{percent_encode, FORM_URLENCODED_ENCODE_SET}; use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -1567,8 +1563,7 @@ impl<'a, C, A> ProjectUpdateBillingInfoCall<'a, C, A> where C: BorrowMut"] description = "A complete library to interact with clouddebugger (protocol v2)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/clouddebugger2-cli" @@ -17,18 +17,18 @@ keywords = ["clouddebugger", "google", "cli"] name = "clouddebugger2" [dependencies] -hyper = "0.7" -mime = "0.1.0" -serde = ">= 0.7.0" -serde_json = ">= 0.7.0" -yup-oauth2 = ">= 0.5.4" +hyper = "0.8" +mime = "0.2.0" +serde = "0.6.0" +serde_json = "0.6.0" +yup-oauth2 = ">= 0.5.6" strsim = "0.4" yup-hyper-mock = "1.0" clap = "2.0" [build-dependencies] -syntex = { version = ">= 0.23" } -serde_codegen = { version = ">= 0.6" } +syntex = { version = "= 0.28" } +serde_codegen = { version = "= 0.6.13" } [dependencies.google-clouddebugger2] diff --git a/gen/clouddebugger2-cli/README.md b/gen/clouddebugger2-cli/README.md index 670505fab1..647d74cd4d 100644 --- a/gen/clouddebugger2-cli/README.md +++ b/gen/clouddebugger2-cli/README.md @@ -17,14 +17,14 @@ Everything else about the *clouddebugger* API can be found at the You can download the pre-compiled 64bit binaries for the following platforms: -* ![icon](http://megaicons.net/static/img/icons_sizes/6/140/16/ubuntu-icon.png) [ubuntu](http://dl.byronimo.de/google.rs/cli/0.3.3/ubuntu/clouddebugger2.tar.gz) -* ![icon](http://hydra-media.cursecdn.com/wow.gamepedia.com/a/a2/Apple-icon-16x16.png?version=25ddd67ac3dd3b634478e3978b76cb74) [osx](http://dl.byronimo.de/google.rs/cli/0.3.3/osx/clouddebugger2.tar.gz) +* ![icon](http://megaicons.net/static/img/icons_sizes/6/140/16/ubuntu-icon.png) [ubuntu](http://dl.byronimo.de/google.rs/cli/0.3.4/ubuntu/clouddebugger2.tar.gz) +* ![icon](http://hydra-media.cursecdn.com/wow.gamepedia.com/a/a2/Apple-icon-16x16.png?version=25ddd67ac3dd3b634478e3978b76cb74) [osx](http://dl.byronimo.de/google.rs/cli/0.3.4/osx/clouddebugger2.tar.gz) Find the source code [on github](https://github.com/Byron/google-apis-rs/tree/master/gen/clouddebugger2-cli). # Usage -This documentation was generated from the *clouddebugger* API at revision *20151123*. The CLI is at version *0.3.3*. +This documentation was generated from the *clouddebugger* API at revision *20160309*. The CLI is at version *0.3.4*. ```bash clouddebugger2 [options] diff --git a/gen/clouddebugger2-cli/mkdocs.yml b/gen/clouddebugger2-cli/mkdocs.yml index 97d53a1404..52d94b247b 100644 --- a/gen/clouddebugger2-cli/mkdocs.yml +++ b/gen/clouddebugger2-cli/mkdocs.yml @@ -1,4 +1,4 @@ -site_name: clouddebugger v0.3.3+20151123 +site_name: clouddebugger v0.3.4+20160309 site_url: http://byron.github.io/google-apis-rs/google-clouddebugger2-cli site_description: Write integrating applications with bcore diff --git a/gen/clouddebugger2-cli/src/cmn.rs b/gen/clouddebugger2-cli/src/cmn.rs index 188159ee80..ae86fdef65 100644 --- a/gen/clouddebugger2-cli/src/cmn.rs +++ b/gen/clouddebugger2-cli/src/cmn.rs @@ -414,7 +414,7 @@ impl TokenStorage for JsonTokenStorage { Err(err) => match err.kind() { io::ErrorKind::NotFound => Ok(()), - _ => Err(json::Error::Io(err)) + _ => Err(json::Error::IoError(err)) }, Ok(_) => Ok(()), } @@ -427,7 +427,7 @@ impl TokenStorage for JsonTokenStorage { Err(serde_err) => Err(serde_err), } }, - Err(io_err) => Err(json::Error::Io(io_err)) + Err(io_err) => Err(json::Error::IoError(io_err)) } } } @@ -444,7 +444,7 @@ impl TokenStorage for JsonTokenStorage { Err(io_err) => { match io_err.kind() { io::ErrorKind::NotFound => Ok(None), - _ => Err(json::Error::Io(io_err)) + _ => Err(json::Error::IoError(io_err)) } } } @@ -683,7 +683,7 @@ pub fn application_secret_from_directory(dir: &str, = json::from_str(json_console_secret).unwrap(); match json::to_writer_pretty(&mut f, &console_secret) { Err(serde_err) => match serde_err { - json::Error::Io(err) => err, + json::Error::IoError(err) => err, _ => panic!("Unexpected serde error: {:#?}", serde_err) }, Ok(_) => continue, @@ -696,7 +696,7 @@ pub fn application_secret_from_directory(dir: &str, }, Ok(f) => { match json::de::from_reader::<_, ConsoleApplicationSecret>(f) { - Err(json::Error::Io(err)) => + Err(json::Error::IoError(err)) => return secret_io_error(err), Err(json_err) => return Err(CLIError::Configuration( diff --git a/gen/clouddebugger2-cli/src/main.rs b/gen/clouddebugger2-cli/src/main.rs index 75d07b1a1e..26cc3a1103 100644 --- a/gen/clouddebugger2-cli/src/main.rs +++ b/gen/clouddebugger2-cli/src/main.rs @@ -132,19 +132,20 @@ impl<'n> Engine<'n> { "breakpoint.status.description.parameters" => Some(("breakpoint.status.description.parameters", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Vec })), "breakpoint.status.description.format" => Some(("breakpoint.status.description.format", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "breakpoint.user-email" => Some(("breakpoint.userEmail", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), - "breakpoint.log-level" => Some(("breakpoint.logLevel", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "breakpoint.log-message-format" => Some(("breakpoint.logMessageFormat", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "breakpoint.log-level" => Some(("breakpoint.logLevel", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "breakpoint.labels" => Some(("breakpoint.labels", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Map })), + "breakpoint.final-time" => Some(("breakpoint.finalTime", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "breakpoint.create-time" => Some(("breakpoint.createTime", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "breakpoint.location.path" => Some(("breakpoint.location.path", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "breakpoint.location.line" => Some(("breakpoint.location.line", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), - "breakpoint.final-time" => Some(("breakpoint.finalTime", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "breakpoint.action" => Some(("breakpoint.action", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "breakpoint.expressions" => Some(("breakpoint.expressions", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Vec })), "breakpoint.is-final-state" => Some(("breakpoint.isFinalState", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), "breakpoint.id" => Some(("breakpoint.id", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "breakpoint.condition" => Some(("breakpoint.condition", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), _ => { - let suggestion = FieldCursor::did_you_mean(key, &vec!["action", "breakpoint", "condition", "create-time", "description", "expressions", "final-time", "format", "id", "is-error", "is-final-state", "line", "location", "log-level", "log-message-format", "parameters", "path", "refers-to", "status", "user-email"]); + let suggestion = FieldCursor::did_you_mean(key, &vec!["action", "breakpoint", "condition", "create-time", "description", "expressions", "final-time", "format", "id", "is-error", "is-final-state", "labels", "line", "location", "log-level", "log-message-format", "parameters", "path", "refers-to", "status", "user-email"]); err.issues.push(CLIError::Field(FieldError::Unknown(temp_cursor.to_string(), suggestion, value.map(|v| v.to_string())))); None } @@ -306,6 +307,9 @@ impl<'n> Engine<'n> { for parg in opt.values_of("v").map(|i|i.collect()).unwrap_or(Vec::new()).iter() { let (key, value) = parse_kv_arg(&*parg, err, false); match key { + "client-version" => { + call = call.client_version(value.unwrap_or("")); + }, _ => { let mut found = false; for param in &self.gp { @@ -319,6 +323,7 @@ impl<'n> Engine<'n> { err.issues.push(CLIError::UnknownParameter(key.to_string(), {let mut v = Vec::new(); v.extend(self.gp.iter().map(|v|*v)); + v.extend(["client-version"].iter().map(|v|*v)); v } )); } } @@ -358,6 +363,9 @@ impl<'n> Engine<'n> { for parg in opt.values_of("v").map(|i|i.collect()).unwrap_or(Vec::new()).iter() { let (key, value) = parse_kv_arg(&*parg, err, false); match key { + "client-version" => { + call = call.client_version(value.unwrap_or("")); + }, _ => { let mut found = false; for param in &self.gp { @@ -371,6 +379,7 @@ impl<'n> Engine<'n> { err.issues.push(CLIError::UnknownParameter(key.to_string(), {let mut v = Vec::new(); v.extend(self.gp.iter().map(|v|*v)); + v.extend(["client-version"].iter().map(|v|*v)); v } )); } } @@ -422,6 +431,9 @@ impl<'n> Engine<'n> { "include-all-users" => { call = call.include_all_users(arg_from_str(value.unwrap_or("false"), err, "include-all-users", "boolean")); }, + "client-version" => { + call = call.client_version(value.unwrap_or("")); + }, "action-value" => { call = call.action_value(value.unwrap_or("")); }, @@ -438,7 +450,7 @@ impl<'n> Engine<'n> { err.issues.push(CLIError::UnknownParameter(key.to_string(), {let mut v = Vec::new(); v.extend(self.gp.iter().map(|v|*v)); - v.extend(["strip-results", "include-inactive", "action-value", "wait-token", "include-all-users"].iter().map(|v|*v)); + v.extend(["strip-results", "include-all-users", "client-version", "include-inactive", "wait-token", "action-value"].iter().map(|v|*v)); v } )); } } @@ -500,19 +512,20 @@ impl<'n> Engine<'n> { "status.description.parameters" => Some(("status.description.parameters", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Vec })), "status.description.format" => Some(("status.description.format", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "user-email" => Some(("userEmail", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), - "log-level" => Some(("logLevel", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "log-message-format" => Some(("logMessageFormat", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "log-level" => Some(("logLevel", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "labels" => Some(("labels", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Map })), + "final-time" => Some(("finalTime", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "create-time" => Some(("createTime", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "location.path" => Some(("location.path", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "location.line" => Some(("location.line", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), - "final-time" => Some(("finalTime", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "action" => Some(("action", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "expressions" => Some(("expressions", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Vec })), "is-final-state" => Some(("isFinalState", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), "id" => Some(("id", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "condition" => Some(("condition", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), _ => { - let suggestion = FieldCursor::did_you_mean(key, &vec!["action", "condition", "create-time", "description", "expressions", "final-time", "format", "id", "is-error", "is-final-state", "line", "location", "log-level", "log-message-format", "parameters", "path", "refers-to", "status", "user-email"]); + let suggestion = FieldCursor::did_you_mean(key, &vec!["action", "condition", "create-time", "description", "expressions", "final-time", "format", "id", "is-error", "is-final-state", "labels", "line", "location", "log-level", "log-message-format", "parameters", "path", "refers-to", "status", "user-email"]); err.issues.push(CLIError::Field(FieldError::Unknown(temp_cursor.to_string(), suggestion, value.map(|v| v.to_string())))); None } @@ -526,6 +539,9 @@ impl<'n> Engine<'n> { for parg in opt.values_of("v").map(|i|i.collect()).unwrap_or(Vec::new()).iter() { let (key, value) = parse_kv_arg(&*parg, err, false); match key { + "client-version" => { + call = call.client_version(value.unwrap_or("")); + }, _ => { let mut found = false; for param in &self.gp { @@ -539,6 +555,7 @@ impl<'n> Engine<'n> { err.issues.push(CLIError::UnknownParameter(key.to_string(), {let mut v = Vec::new(); v.extend(self.gp.iter().map(|v|*v)); + v.extend(["client-version"].iter().map(|v|*v)); v } )); } } @@ -584,6 +601,9 @@ impl<'n> Engine<'n> { "include-inactive" => { call = call.include_inactive(arg_from_str(value.unwrap_or("false"), err, "include-inactive", "boolean")); }, + "client-version" => { + call = call.client_version(value.unwrap_or("")); + }, _ => { let mut found = false; for param in &self.gp { @@ -597,7 +617,7 @@ impl<'n> Engine<'n> { err.issues.push(CLIError::UnknownParameter(key.to_string(), {let mut v = Vec::new(); v.extend(self.gp.iter().map(|v|*v)); - v.extend(["project", "include-inactive"].iter().map(|v|*v)); + v.extend(["project", "include-inactive", "client-version"].iter().map(|v|*v)); v } )); } } @@ -972,8 +992,8 @@ fn main() { let mut app = App::new("clouddebugger2") .author("Sebastian Thiel ") - .version("0.3.3+20151123") - .about("Lets you examine the stack and variables of your running application without stopping or slowing it down.") + .version("0.3.4+20160309") + .about("Examines the call stack and variables of a running application without stopping or slowing it down.") .after_help("All documentation details can be found at http://byron.github.io/google-apis-rs/google_clouddebugger2_cli") .arg(Arg::with_name("url") .long("scope") diff --git a/gen/clouddebugger2/Cargo.toml b/gen/clouddebugger2/Cargo.toml index 2119d82c7e..05c6a241f0 100644 --- a/gen/clouddebugger2/Cargo.toml +++ b/gen/clouddebugger2/Cargo.toml @@ -4,7 +4,7 @@ [package] name = "google-clouddebugger2" -version = "0.1.12+20151123" +version = "0.1.13+20160309" authors = ["Sebastian Thiel "] description = "A complete library to interact with clouddebugger (protocol v2)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/clouddebugger2" @@ -16,14 +16,14 @@ build = "src/build.rs" [dependencies] -hyper = "0.7" -mime = "0.1.0" -serde = ">= 0.7.0" -serde_json = ">= 0.7.0" -yup-oauth2 = ">= 0.5.4" +hyper = "0.8" +mime = "0.2.0" +serde = "0.6.0" +serde_json = "0.6.0" +yup-oauth2 = ">= 0.5.6" url = ">= 0.5" [build-dependencies] -syntex = { version = ">= 0.23" } -serde_codegen = { version = ">= 0.6" } +syntex = { version = "= 0.28" } +serde_codegen = { version = "= 0.6.13" } diff --git a/gen/clouddebugger2/README.md b/gen/clouddebugger2/README.md index c7574cb32e..d1db7045a0 100644 --- a/gen/clouddebugger2/README.md +++ b/gen/clouddebugger2/README.md @@ -5,7 +5,7 @@ DO NOT EDIT ! --> The `google-clouddebugger2` library allows access to all features of the *Google clouddebugger* service. -This documentation was generated from *clouddebugger* crate version *0.1.12+20151123*, where *20151123* is the exact revision of the *clouddebugger:v2* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.12*. +This documentation was generated from *clouddebugger* crate version *0.1.13+20160309*, where *20160309* is the exact revision of the *clouddebugger:v2* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.13*. Everything else about the *clouddebugger* *v2* API can be found at the [official documentation site](https://cloud.google.com/tools/cloud-debugger). @@ -101,6 +101,7 @@ let mut req = Breakpoint::default(); // execute the final call using `doit()`. // Values shown here are possibly random and not representative ! let result = hub.debugger().debuggees_breakpoints_set(req, "debuggeeId") + .client_version("sit") .doit(); match result { diff --git a/gen/clouddebugger2/src/cmn.rs b/gen/clouddebugger2/src/cmn.rs index 87b91a8986..c69621da55 100644 --- a/gen/clouddebugger2/src/cmn.rs +++ b/gen/clouddebugger2/src/cmn.rs @@ -12,7 +12,7 @@ use mime::{Mime, TopLevel, SubLevel, Attr, Value}; use oauth2::{TokenType, Retry, self}; use hyper; use hyper::header::{ContentType, ContentLength, Headers, UserAgent, Authorization, Header, - HeaderFormat}; + HeaderFormat, Bearer}; use hyper::http::h1::LINE_ENDING; use hyper::method::Method; use hyper::status::StatusCode; @@ -634,7 +634,7 @@ pub struct ResumableUploadHelper<'a, A: 'a> { pub start_at: Option, pub auth: &'a mut A, pub user_agent: &'a str, - pub auth_header: Authorization, + pub auth_header: Authorization, pub url: &'a str, pub reader: &'a mut ReadSeek, pub media_type: Mime, diff --git a/gen/clouddebugger2/src/lib.rs b/gen/clouddebugger2/src/lib.rs index fbe16781be..5205dd1a49 100644 --- a/gen/clouddebugger2/src/lib.rs +++ b/gen/clouddebugger2/src/lib.rs @@ -2,7 +2,7 @@ // This file was generated automatically from 'src/mako/api/lib.rs.mako' // DO NOT EDIT ! -//! This documentation was generated from *clouddebugger* crate version *0.1.12+20151123*, where *20151123* is the exact revision of the *clouddebugger:v2* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.12*. +//! This documentation was generated from *clouddebugger* crate version *0.1.13+20160309*, where *20160309* is the exact revision of the *clouddebugger:v2* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.13*. //! //! Everything else about the *clouddebugger* *v2* API can be found at the //! [official documentation site](https://cloud.google.com/tools/cloud-debugger). @@ -102,6 +102,7 @@ //! // execute the final call using `doit()`. //! // Values shown here are possibly random and not representative ! //! let result = hub.debugger().debuggees_breakpoints_set(req, "debuggeeId") +//! .client_version("et") //! .doit(); //! //! match result { diff --git a/gen/clouddebugger2/src/lib.rs.in b/gen/clouddebugger2/src/lib.rs.in index 6c0522ded3..9635c4fde2 100644 --- a/gen/clouddebugger2/src/lib.rs.in +++ b/gen/clouddebugger2/src/lib.rs.in @@ -106,6 +106,7 @@ impl Default for Scope { /// // execute the final call using `doit()`. /// // Values shown here are possibly random and not representative ! /// let result = hub.debugger().debuggees_breakpoints_set(req, "debuggeeId") +/// .client_version("sed") /// .doit(); /// /// match result { @@ -141,7 +142,7 @@ impl<'a, C, A> Clouddebugger Clouddebugger { client: RefCell::new(client), auth: RefCell::new(authenticator), - _user_agent: "google-api-rust-client/0.1.12".to_string(), + _user_agent: "google-api-rust-client/0.1.13".to_string(), } } @@ -153,7 +154,7 @@ impl<'a, C, A> Clouddebugger } /// Set the user-agent header field to use in all requests to the server. - /// It defaults to `google-api-rust-client/0.1.12`. + /// It defaults to `google-api-rust-client/0.1.13`. /// /// Returns the previously set user-agent. pub fn user_agent(&mut self, agent_name: String) -> String { @@ -596,7 +597,7 @@ impl Part for CloudWorkspaceId {} pub struct Breakpoint { /// Breakpoint status. The status includes an error flag and a human readable message. This field is usually unset. The message can be either informational or an error message. Regardless, clients should always display the text message back to the user. Error status indicates complete failure of the breakpoint. Example (non-final state): `Still loading symbols...` Examples (final state): * `Invalid line number` referring to location * `Field f not found in class C` referring to condition pub status: Option, - /// The `variable_table` exists to aid with computation, memory and network traffic optimization. It enables storing a variable once and reference it from multiple variables, including variables stored in the `variable_table` itself. For example, the same `this` object, which may appear at many levels of the stack, can have all of its data stored once in this table. The stack frame variables then would hold only a reference to it. The variable `var_table_index` field is an index into this repeated field. The stored objects are nameless and get their name from the referencing variable. The effective variable is a merge of the referencing veariable and the referenced variable. + /// The `variable_table` exists to aid with computation, memory and network traffic optimization. It enables storing a variable once and reference it from multiple variables, including variables stored in the `variable_table` itself. For example, the same `this` object, which may appear at many levels of the stack, can have all of its data stored once in this table. The stack frame variables then would hold only a reference to it. The variable `var_table_index` field is an index into this repeated field. The stored objects are nameless and get their name from the referencing variable. The effective variable is a merge of the referencing variable and the referenced variable. #[serde(rename="variableTable")] pub variable_table: Option>, /// E-mail address of the user that created this breakpoint @@ -605,34 +606,36 @@ pub struct Breakpoint { /// Indicates the severity of the log. Only relevant when action is `LOG`. #[serde(rename="logLevel")] pub log_level: Option, - /// Breakpoint identifier, unique in the scope of the debuggee. - pub id: Option, - /// Only relevant when action is `LOG`. Defines the message to log when the breakpoint hits. The message may include parameter placeholders `$0`, `$1`, etc. These placeholders are replaced with the evaluated value of the appropriate expression. Expressions not referenced in `log_message_format` are not logged. Example: `Message received, id = $0, count = $1` with `expressions` = `[ message.id, message.count ]`. - #[serde(rename="logMessageFormat")] - pub log_message_format: Option, - /// The stack at breakpoint time. - #[serde(rename="stackFrames")] - pub stack_frames: Option>, - /// Breakpoint source location. - pub location: Option, + /// A set of custom breakpoint properties, populated by the agent, to be displayed to the user. + pub labels: Option>, /// Time this breakpoint was finalized as seen by the server in seconds resolution. #[serde(rename="finalTime")] pub final_time: Option, - /// Action that the agent should perform when the code at the breakpoint location is hit. - pub action: Option, + /// The stack at breakpoint time. + #[serde(rename="stackFrames")] + pub stack_frames: Option>, /// List of read-only expressions to evaluate at the breakpoint location. The expressions are composed using expressions in the programming language at the source location. If the breakpoint action is `LOG`, the evaluated expressions are included in log statements. pub expressions: Option>, - /// When true, indicates that this is a final result and the breakpoint state will not change from here on. - #[serde(rename="isFinalState")] - pub is_final_state: Option, /// Values of evaluated expressions at breakpoint time. The evaluated expressions appear in exactly the same order they are listed in the `expressions` field. The `name` field holds the original expression text, the `value` or `members` field holds the result of the evaluated expression. If the expression cannot be evaluated, the `status` inside the `Variable` will indicate an error and contain the error text. #[serde(rename="evaluatedExpressions")] pub evaluated_expressions: Option>, + /// Breakpoint identifier, unique in the scope of the debuggee. + pub id: Option, + /// Condition that triggers the breakpoint. The condition is a compound boolean expression composed using expressions in a programming language at the source location. + pub condition: Option, + /// Only relevant when action is `LOG`. Defines the message to log when the breakpoint hits. The message may include parameter placeholders `$0`, `$1`, etc. These placeholders are replaced with the evaluated value of the appropriate expression. Expressions not referenced in `log_message_format` are not logged. Example: `Message received, id = $0, count = $1` with `expressions` = `[ message.id, message.count ]`. + #[serde(rename="logMessageFormat")] + pub log_message_format: Option, /// Time this breakpoint was created by the server in seconds resolution. #[serde(rename="createTime")] pub create_time: Option, - /// Condition that triggers the breakpoint. The condition is a compound boolean expression composed using expressions in a programming language at the source location. - pub condition: Option, + /// Breakpoint source location. + pub location: Option, + /// Action that the agent should perform when the code at the breakpoint location is hit. + pub action: Option, + /// When true, indicates that this is a final result and the breakpoint state will not change from here on. + #[serde(rename="isFinalState")] + pub is_final_state: Option, } impl RequestValue for Breakpoint {} @@ -873,6 +876,7 @@ impl<'a, C, A> DebuggerMethods<'a, C, A> { hub: self.hub, _debuggee_id: debuggee_id.to_string(), _breakpoint_id: breakpoint_id.to_string(), + _client_version: Default::default(), _delegate: Default::default(), _scopes: Default::default(), _additional_params: Default::default(), @@ -892,6 +896,7 @@ impl<'a, C, A> DebuggerMethods<'a, C, A> { hub: self.hub, _debuggee_id: debuggee_id.to_string(), _breakpoint_id: breakpoint_id.to_string(), + _client_version: Default::default(), _delegate: Default::default(), _scopes: Default::default(), _additional_params: Default::default(), @@ -906,6 +911,7 @@ impl<'a, C, A> DebuggerMethods<'a, C, A> { hub: self.hub, _project: Default::default(), _include_inactive: Default::default(), + _client_version: Default::default(), _delegate: Default::default(), _scopes: Default::default(), _additional_params: Default::default(), @@ -925,6 +931,7 @@ impl<'a, C, A> DebuggerMethods<'a, C, A> { hub: self.hub, _request: request, _debuggee_id: debuggee_id.to_string(), + _client_version: Default::default(), _delegate: Default::default(), _scopes: Default::default(), _additional_params: Default::default(), @@ -946,6 +953,7 @@ impl<'a, C, A> DebuggerMethods<'a, C, A> { _strip_results: Default::default(), _include_inactive: Default::default(), _include_all_users: Default::default(), + _client_version: Default::default(), _action_value: Default::default(), _delegate: Default::default(), _scopes: Default::default(), @@ -1018,7 +1026,7 @@ impl<'a, C, A> ControllerDebuggeeBreakpointUpdateCall<'a, C, A> where C: BorrowM /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, UpdateActiveBreakpointResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -1099,8 +1107,7 @@ impl<'a, C, A> ControllerDebuggeeBreakpointUpdateCall<'a, C, A> where C: BorrowM } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -1301,7 +1308,7 @@ impl<'a, C, A> ControllerDebuggeeRegisterCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, RegisterDebuggeeResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -1359,8 +1366,7 @@ impl<'a, C, A> ControllerDebuggeeRegisterCall<'a, C, A> where C: BorrowMut ControllerDebuggeeRegisterCall<'a, C, A> where C: BorrowMut ControllerDebuggeeBreakpointListCall<'a, C, A> where C: BorrowMut /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, ListActiveBreakpointsResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -1614,8 +1620,7 @@ impl<'a, C, A> ControllerDebuggeeBreakpointListCall<'a, C, A> where C: BorrowMut } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -1780,6 +1785,7 @@ impl<'a, C, A> ControllerDebuggeeBreakpointListCall<'a, C, A> where C: BorrowMut /// // execute the final call using `doit()`. /// // Values shown here are possibly random and not representative ! /// let result = hub.debugger().debuggees_breakpoints_get("debuggeeId", "breakpointId") +/// .client_version("erat") /// .doit(); /// # } /// ``` @@ -1789,6 +1795,7 @@ pub struct DebuggerDebuggeeBreakpointGetCall<'a, C, A> hub: &'a Clouddebugger, _debuggee_id: String, _breakpoint_id: String, + _client_version: Option, _delegate: Option<&'a mut Delegate>, _additional_params: HashMap, _scopes: BTreeMap @@ -1802,7 +1809,7 @@ impl<'a, C, A> DebuggerDebuggeeBreakpointGetCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, GetBreakpointResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -1810,10 +1817,13 @@ impl<'a, C, A> DebuggerDebuggeeBreakpointGetCall<'a, C, A> where C: BorrowMut = Vec::with_capacity((4 + self._additional_params.len())); + let mut params: Vec<(&str, String)> = Vec::with_capacity((5 + self._additional_params.len())); params.push(("debuggeeId", self._debuggee_id.to_string())); params.push(("breakpointId", self._breakpoint_id.to_string())); - for &field in ["alt", "debuggeeId", "breakpointId"].iter() { + if let Some(value) = self._client_version { + params.push(("clientVersion", value.to_string())); + } + for &field in ["alt", "debuggeeId", "breakpointId", "clientVersion"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); return Err(Error::FieldClash(field)); @@ -1872,8 +1882,7 @@ impl<'a, C, A> DebuggerDebuggeeBreakpointGetCall<'a, C, A> where C: BorrowMut DebuggerDebuggeeBreakpointGetCall<'a, C, A> where C: BorrowMut DebuggerDebuggeeBreakpointGetCall<'a, C, A> { + self._client_version = Some(new_value.to_string()); + self + } /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// @@ -2034,6 +2050,7 @@ impl<'a, C, A> DebuggerDebuggeeBreakpointGetCall<'a, C, A> where C: BorrowMut hub: &'a Clouddebugger, _debuggee_id: String, _breakpoint_id: String, + _client_version: Option, _delegate: Option<&'a mut Delegate>, _additional_params: HashMap, _scopes: BTreeMap @@ -2056,7 +2074,7 @@ impl<'a, C, A> DebuggerDebuggeeBreakpointDeleteCall<'a, C, A> where C: BorrowMut /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Empty)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -2064,10 +2082,13 @@ impl<'a, C, A> DebuggerDebuggeeBreakpointDeleteCall<'a, C, A> where C: BorrowMut }; dlg.begin(MethodInfo { id: "clouddebugger.debugger.debuggees.breakpoints.delete", http_method: hyper::method::Method::Delete }); - let mut params: Vec<(&str, String)> = Vec::with_capacity((4 + self._additional_params.len())); + let mut params: Vec<(&str, String)> = Vec::with_capacity((5 + self._additional_params.len())); params.push(("debuggeeId", self._debuggee_id.to_string())); params.push(("breakpointId", self._breakpoint_id.to_string())); - for &field in ["alt", "debuggeeId", "breakpointId"].iter() { + if let Some(value) = self._client_version { + params.push(("clientVersion", value.to_string())); + } + for &field in ["alt", "debuggeeId", "breakpointId", "clientVersion"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); return Err(Error::FieldClash(field)); @@ -2126,8 +2147,7 @@ impl<'a, C, A> DebuggerDebuggeeBreakpointDeleteCall<'a, C, A> where C: BorrowMut } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Delete, &url) @@ -2203,6 +2223,13 @@ impl<'a, C, A> DebuggerDebuggeeBreakpointDeleteCall<'a, C, A> where C: BorrowMut self._breakpoint_id = new_value.to_string(); self } + /// The client version making the call. Following: `domain/type/version` (e.g., `google.com/intellij/v1`). + /// + /// Sets the *client version* query property to the given value. + pub fn client_version(mut self, new_value: &str) -> DebuggerDebuggeeBreakpointDeleteCall<'a, C, A> { + self._client_version = Some(new_value.to_string()); + self + } /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// @@ -2288,8 +2315,9 @@ impl<'a, C, A> DebuggerDebuggeeBreakpointDeleteCall<'a, C, A> where C: BorrowMut /// // execute the final call using `doit()`. /// // Values shown here are possibly random and not representative ! /// let result = hub.debugger().debuggees_list() -/// .project("erat") -/// .include_inactive(true) +/// .project("dolores") +/// .include_inactive(false) +/// .client_version("sadipscing") /// .doit(); /// # } /// ``` @@ -2299,6 +2327,7 @@ pub struct DebuggerDebuggeeListCall<'a, C, A> hub: &'a Clouddebugger, _project: Option, _include_inactive: Option, + _client_version: Option, _delegate: Option<&'a mut Delegate>, _additional_params: HashMap, _scopes: BTreeMap @@ -2312,7 +2341,7 @@ impl<'a, C, A> DebuggerDebuggeeListCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, ListDebuggeesResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -2320,14 +2349,17 @@ impl<'a, C, A> DebuggerDebuggeeListCall<'a, C, A> where C: BorrowMut = Vec::with_capacity((4 + self._additional_params.len())); + let mut params: Vec<(&str, String)> = Vec::with_capacity((5 + self._additional_params.len())); if let Some(value) = self._project { params.push(("project", value.to_string())); } if let Some(value) = self._include_inactive { params.push(("includeInactive", value.to_string())); } - for &field in ["alt", "project", "includeInactive"].iter() { + if let Some(value) = self._client_version { + params.push(("clientVersion", value.to_string())); + } + for &field in ["alt", "project", "includeInactive", "clientVersion"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); return Err(Error::FieldClash(field)); @@ -2365,8 +2397,7 @@ impl<'a, C, A> DebuggerDebuggeeListCall<'a, C, A> where C: BorrowMut DebuggerDebuggeeListCall<'a, C, A> where C: BorrowMut DebuggerDebuggeeListCall<'a, C, A> { + self._client_version = Some(new_value.to_string()); + self + } /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// @@ -2527,6 +2565,7 @@ impl<'a, C, A> DebuggerDebuggeeListCall<'a, C, A> where C: BorrowMut hub: &'a Clouddebugger, _request: Breakpoint, _debuggee_id: String, + _client_version: Option, _delegate: Option<&'a mut Delegate>, _additional_params: HashMap, _scopes: BTreeMap @@ -2549,7 +2589,7 @@ impl<'a, C, A> DebuggerDebuggeeBreakpointSetCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, SetBreakpointResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -2557,9 +2597,12 @@ impl<'a, C, A> DebuggerDebuggeeBreakpointSetCall<'a, C, A> where C: BorrowMut = Vec::with_capacity((4 + self._additional_params.len())); + let mut params: Vec<(&str, String)> = Vec::with_capacity((5 + self._additional_params.len())); params.push(("debuggeeId", self._debuggee_id.to_string())); - for &field in ["alt", "debuggeeId"].iter() { + if let Some(value) = self._client_version { + params.push(("clientVersion", value.to_string())); + } + for &field in ["alt", "debuggeeId", "clientVersion"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); return Err(Error::FieldClash(field)); @@ -2629,8 +2672,7 @@ impl<'a, C, A> DebuggerDebuggeeBreakpointSetCall<'a, C, A> where C: BorrowMut DebuggerDebuggeeBreakpointSetCall<'a, C, A> where C: BorrowMut DebuggerDebuggeeBreakpointSetCall<'a, C, A> { + self._client_version = Some(new_value.to_string()); + self + } /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// @@ -2794,11 +2843,12 @@ impl<'a, C, A> DebuggerDebuggeeBreakpointSetCall<'a, C, A> where C: BorrowMut _strip_results: Option, _include_inactive: Option, _include_all_users: Option, + _client_version: Option, _action_value: Option, _delegate: Option<&'a mut Delegate>, _additional_params: HashMap, @@ -2825,7 +2876,7 @@ impl<'a, C, A> DebuggerDebuggeeBreakpointListCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, ListBreakpointsResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -2833,7 +2884,7 @@ impl<'a, C, A> DebuggerDebuggeeBreakpointListCall<'a, C, A> where C: BorrowMut = Vec::with_capacity((8 + self._additional_params.len())); + let mut params: Vec<(&str, String)> = Vec::with_capacity((9 + self._additional_params.len())); params.push(("debuggeeId", self._debuggee_id.to_string())); if let Some(value) = self._wait_token { params.push(("waitToken", value.to_string())); @@ -2847,10 +2898,13 @@ impl<'a, C, A> DebuggerDebuggeeBreakpointListCall<'a, C, A> where C: BorrowMut DebuggerDebuggeeBreakpointListCall<'a, C, A> where C: BorrowMut DebuggerDebuggeeBreakpointListCall<'a, C, A> where C: BorrowMut DebuggerDebuggeeBreakpointListCall<'a, C, A> { + self._client_version = Some(new_value.to_string()); + self + } /// Only breakpoints with the specified action will pass the filter. /// /// Sets the *action.value* query property to the given value. diff --git a/gen/cloudlatencytest2-cli/Cargo.toml b/gen/cloudlatencytest2-cli/Cargo.toml index 4413978c47..001f20e8e4 100644 --- a/gen/cloudlatencytest2-cli/Cargo.toml +++ b/gen/cloudlatencytest2-cli/Cargo.toml @@ -4,7 +4,7 @@ [package] name = "google-cloudlatencytest2-cli" -version = "0.3.3+20150508" +version = "0.3.4+20160309" authors = ["Sebastian Thiel "] description = "A complete library to interact with cloudlatencytest (protocol v2)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/cloudlatencytest2-cli" @@ -16,18 +16,18 @@ keywords = ["cloudlatencytest", "google", "cli"] name = "cloudlatencytest2" [dependencies] -hyper = "0.7" -mime = "0.1.0" -serde = ">= 0.7.0" -serde_json = ">= 0.7.0" -yup-oauth2 = ">= 0.5.4" +hyper = "0.8" +mime = "0.2.0" +serde = "0.6.0" +serde_json = "0.6.0" +yup-oauth2 = ">= 0.5.6" strsim = "0.4" yup-hyper-mock = "1.0" clap = "2.0" [build-dependencies] -syntex = { version = ">= 0.23" } -serde_codegen = { version = ">= 0.6" } +syntex = { version = "= 0.28" } +serde_codegen = { version = "= 0.6.13" } [dependencies.google-cloudlatencytest2] diff --git a/gen/cloudlatencytest2-cli/README.md b/gen/cloudlatencytest2-cli/README.md index 0a30a1e2de..fb7e361069 100644 --- a/gen/cloudlatencytest2-cli/README.md +++ b/gen/cloudlatencytest2-cli/README.md @@ -14,14 +14,14 @@ If data-structures are requested, these will be returned as pretty-printed JSON, You can download the pre-compiled 64bit binaries for the following platforms: -* ![icon](http://megaicons.net/static/img/icons_sizes/6/140/16/ubuntu-icon.png) [ubuntu](http://dl.byronimo.de/google.rs/cli/0.3.3/ubuntu/cloudlatencytest2.tar.gz) -* ![icon](http://hydra-media.cursecdn.com/wow.gamepedia.com/a/a2/Apple-icon-16x16.png?version=25ddd67ac3dd3b634478e3978b76cb74) [osx](http://dl.byronimo.de/google.rs/cli/0.3.3/osx/cloudlatencytest2.tar.gz) +* ![icon](http://megaicons.net/static/img/icons_sizes/6/140/16/ubuntu-icon.png) [ubuntu](http://dl.byronimo.de/google.rs/cli/0.3.4/ubuntu/cloudlatencytest2.tar.gz) +* ![icon](http://hydra-media.cursecdn.com/wow.gamepedia.com/a/a2/Apple-icon-16x16.png?version=25ddd67ac3dd3b634478e3978b76cb74) [osx](http://dl.byronimo.de/google.rs/cli/0.3.4/osx/cloudlatencytest2.tar.gz) Find the source code [on github](https://github.com/Byron/google-apis-rs/tree/master/gen/cloudlatencytest2-cli). # Usage -This documentation was generated from the *cloudlatencytest* API at revision *20150508*. The CLI is at version *0.3.3*. +This documentation was generated from the *cloudlatencytest* API at revision *20160309*. The CLI is at version *0.3.4*. ```bash cloudlatencytest2 [options] diff --git a/gen/cloudlatencytest2-cli/mkdocs.yml b/gen/cloudlatencytest2-cli/mkdocs.yml index b55cead5e5..cdd4e7935a 100644 --- a/gen/cloudlatencytest2-cli/mkdocs.yml +++ b/gen/cloudlatencytest2-cli/mkdocs.yml @@ -1,4 +1,4 @@ -site_name: cloudlatencytest v0.3.3+20150508 +site_name: cloudlatencytest v0.3.4+20160309 site_url: http://byron.github.io/google-apis-rs/google-cloudlatencytest2-cli site_description: Write integrating applications with bcore diff --git a/gen/cloudlatencytest2-cli/src/cmn.rs b/gen/cloudlatencytest2-cli/src/cmn.rs index 188159ee80..ae86fdef65 100644 --- a/gen/cloudlatencytest2-cli/src/cmn.rs +++ b/gen/cloudlatencytest2-cli/src/cmn.rs @@ -414,7 +414,7 @@ impl TokenStorage for JsonTokenStorage { Err(err) => match err.kind() { io::ErrorKind::NotFound => Ok(()), - _ => Err(json::Error::Io(err)) + _ => Err(json::Error::IoError(err)) }, Ok(_) => Ok(()), } @@ -427,7 +427,7 @@ impl TokenStorage for JsonTokenStorage { Err(serde_err) => Err(serde_err), } }, - Err(io_err) => Err(json::Error::Io(io_err)) + Err(io_err) => Err(json::Error::IoError(io_err)) } } } @@ -444,7 +444,7 @@ impl TokenStorage for JsonTokenStorage { Err(io_err) => { match io_err.kind() { io::ErrorKind::NotFound => Ok(None), - _ => Err(json::Error::Io(io_err)) + _ => Err(json::Error::IoError(io_err)) } } } @@ -683,7 +683,7 @@ pub fn application_secret_from_directory(dir: &str, = json::from_str(json_console_secret).unwrap(); match json::to_writer_pretty(&mut f, &console_secret) { Err(serde_err) => match serde_err { - json::Error::Io(err) => err, + json::Error::IoError(err) => err, _ => panic!("Unexpected serde error: {:#?}", serde_err) }, Ok(_) => continue, @@ -696,7 +696,7 @@ pub fn application_secret_from_directory(dir: &str, }, Ok(f) => { match json::de::from_reader::<_, ConsoleApplicationSecret>(f) { - Err(json::Error::Io(err)) => + Err(json::Error::IoError(err)) => return secret_io_error(err), Err(json_err) => return Err(CLIError::Configuration( diff --git a/gen/cloudlatencytest2-cli/src/main.rs b/gen/cloudlatencytest2-cli/src/main.rs index 2e401b695c..828eb3293c 100644 --- a/gen/cloudlatencytest2-cli/src/main.rs +++ b/gen/cloudlatencytest2-cli/src/main.rs @@ -366,8 +366,8 @@ fn main() { let mut app = App::new("cloudlatencytest2") .author("Sebastian Thiel ") - .version("0.3.3+20150508") - .about("A Test API to report latency data.") + .version("0.3.4+20160309") + .about("Reports latency data.") .after_help("All documentation details can be found at http://byron.github.io/google-apis-rs/google_cloudlatencytest2_cli") .arg(Arg::with_name("url") .long("scope") diff --git a/gen/cloudlatencytest2/Cargo.toml b/gen/cloudlatencytest2/Cargo.toml index 31713b9bb5..48915f8b20 100644 --- a/gen/cloudlatencytest2/Cargo.toml +++ b/gen/cloudlatencytest2/Cargo.toml @@ -4,7 +4,7 @@ [package] name = "google-cloudlatencytest2" -version = "0.1.12+20150508" +version = "0.1.13+20160309" authors = ["Sebastian Thiel "] description = "A complete library to interact with cloudlatencytest (protocol v2)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/cloudlatencytest2" @@ -15,14 +15,14 @@ build = "src/build.rs" [dependencies] -hyper = "0.7" -mime = "0.1.0" -serde = ">= 0.7.0" -serde_json = ">= 0.7.0" -yup-oauth2 = ">= 0.5.4" +hyper = "0.8" +mime = "0.2.0" +serde = "0.6.0" +serde_json = "0.6.0" +yup-oauth2 = ">= 0.5.6" url = ">= 0.5" [build-dependencies] -syntex = { version = ">= 0.23" } -serde_codegen = { version = ">= 0.6" } +syntex = { version = "= 0.28" } +serde_codegen = { version = "= 0.6.13" } diff --git a/gen/cloudlatencytest2/README.md b/gen/cloudlatencytest2/README.md index 6a37859c47..dcfd820c0e 100644 --- a/gen/cloudlatencytest2/README.md +++ b/gen/cloudlatencytest2/README.md @@ -5,7 +5,7 @@ DO NOT EDIT ! --> The `google-cloudlatencytest2` library allows access to all features of the *Google cloudlatencytest* service. -This documentation was generated from *cloudlatencytest* crate version *0.1.12+20150508*, where *20150508* is the exact revision of the *cloudlatencytest:v2* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.12*. +This documentation was generated from *cloudlatencytest* crate version *0.1.13+20160309*, where *20160309* is the exact revision of the *cloudlatencytest:v2* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.13*. # Features Handle the following *Resources* with ease from the central [hub](http://byron.github.io/google-apis-rs/google_cloudlatencytest2/struct.Cloudlatencytest.html) ... diff --git a/gen/cloudlatencytest2/src/cmn.rs b/gen/cloudlatencytest2/src/cmn.rs index 87b91a8986..c69621da55 100644 --- a/gen/cloudlatencytest2/src/cmn.rs +++ b/gen/cloudlatencytest2/src/cmn.rs @@ -12,7 +12,7 @@ use mime::{Mime, TopLevel, SubLevel, Attr, Value}; use oauth2::{TokenType, Retry, self}; use hyper; use hyper::header::{ContentType, ContentLength, Headers, UserAgent, Authorization, Header, - HeaderFormat}; + HeaderFormat, Bearer}; use hyper::http::h1::LINE_ENDING; use hyper::method::Method; use hyper::status::StatusCode; @@ -634,7 +634,7 @@ pub struct ResumableUploadHelper<'a, A: 'a> { pub start_at: Option, pub auth: &'a mut A, pub user_agent: &'a str, - pub auth_header: Authorization, + pub auth_header: Authorization, pub url: &'a str, pub reader: &'a mut ReadSeek, pub media_type: Mime, diff --git a/gen/cloudlatencytest2/src/lib.rs b/gen/cloudlatencytest2/src/lib.rs index f8ef26ff95..d38aa0541b 100644 --- a/gen/cloudlatencytest2/src/lib.rs +++ b/gen/cloudlatencytest2/src/lib.rs @@ -2,7 +2,7 @@ // This file was generated automatically from 'src/mako/api/lib.rs.mako' // DO NOT EDIT ! -//! This documentation was generated from *cloudlatencytest* crate version *0.1.12+20150508*, where *20150508* is the exact revision of the *cloudlatencytest:v2* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.12*. +//! This documentation was generated from *cloudlatencytest* crate version *0.1.13+20160309*, where *20160309* is the exact revision of the *cloudlatencytest:v2* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.13*. //! The original source code is [on github](https://github.com/Byron/google-apis-rs/tree/master/gen/cloudlatencytest2). //! # Features //! diff --git a/gen/cloudlatencytest2/src/lib.rs.in b/gen/cloudlatencytest2/src/lib.rs.in index 47d834b8cc..6a7a492049 100644 --- a/gen/cloudlatencytest2/src/lib.rs.in +++ b/gen/cloudlatencytest2/src/lib.rs.in @@ -133,7 +133,7 @@ impl<'a, C, A> Cloudlatencytest Cloudlatencytest { client: RefCell::new(client), auth: RefCell::new(authenticator), - _user_agent: "google-api-rust-client/0.1.12".to_string(), + _user_agent: "google-api-rust-client/0.1.13".to_string(), } } @@ -142,7 +142,7 @@ impl<'a, C, A> Cloudlatencytest } /// Set the user-agent header field to use in all requests to the server. - /// It defaults to `google-api-rust-client/0.1.12`. + /// It defaults to `google-api-rust-client/0.1.13`. /// /// Returns the previously set user-agent. pub fn user_agent(&mut self, agent_name: String) -> String { @@ -424,7 +424,7 @@ impl<'a, C, A> StatscollectionUpdateaggregatedstatCall<'a, C, A> where C: Borrow /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, AggregatedStatsReply)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -482,8 +482,7 @@ impl<'a, C, A> StatscollectionUpdateaggregatedstatCall<'a, C, A> where C: Borrow } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -658,7 +657,7 @@ impl<'a, C, A> StatscollectionUpdatestatCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, StatsReply)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -716,8 +715,7 @@ impl<'a, C, A> StatscollectionUpdatestatCall<'a, C, A> where C: BorrowMut"] description = "A complete library to interact with Cloud Monitoring (protocol v2beta2)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/cloudmonitoring2_beta2-cli" @@ -17,18 +17,18 @@ keywords = ["cloudmonitoring", "google", "cli"] name = "cloudmonitoring2-beta2" [dependencies] -hyper = "0.7" -mime = "0.1.0" -serde = ">= 0.7.0" -serde_json = ">= 0.7.0" -yup-oauth2 = ">= 0.5.4" +hyper = "0.8" +mime = "0.2.0" +serde = "0.6.0" +serde_json = "0.6.0" +yup-oauth2 = ">= 0.5.6" strsim = "0.4" yup-hyper-mock = "1.0" clap = "2.0" [build-dependencies] -syntex = { version = ">= 0.23" } -serde_codegen = { version = ">= 0.6" } +syntex = { version = "= 0.28" } +serde_codegen = { version = "= 0.6.13" } [dependencies.google-cloudmonitoring2_beta2] diff --git a/gen/cloudmonitoring2_beta2-cli/README.md b/gen/cloudmonitoring2_beta2-cli/README.md index b89f4c238f..db36ba3513 100644 --- a/gen/cloudmonitoring2_beta2-cli/README.md +++ b/gen/cloudmonitoring2_beta2-cli/README.md @@ -17,14 +17,14 @@ Everything else about the *Cloud Monitoring* API can be found at the You can download the pre-compiled 64bit binaries for the following platforms: -* ![icon](http://megaicons.net/static/img/icons_sizes/6/140/16/ubuntu-icon.png) [ubuntu](http://dl.byronimo.de/google.rs/cli/0.3.3/ubuntu/cloudmonitoring2-beta2.tar.gz) -* ![icon](http://hydra-media.cursecdn.com/wow.gamepedia.com/a/a2/Apple-icon-16x16.png?version=25ddd67ac3dd3b634478e3978b76cb74) [osx](http://dl.byronimo.de/google.rs/cli/0.3.3/osx/cloudmonitoring2-beta2.tar.gz) +* ![icon](http://megaicons.net/static/img/icons_sizes/6/140/16/ubuntu-icon.png) [ubuntu](http://dl.byronimo.de/google.rs/cli/0.3.4/ubuntu/cloudmonitoring2-beta2.tar.gz) +* ![icon](http://hydra-media.cursecdn.com/wow.gamepedia.com/a/a2/Apple-icon-16x16.png?version=25ddd67ac3dd3b634478e3978b76cb74) [osx](http://dl.byronimo.de/google.rs/cli/0.3.4/osx/cloudmonitoring2-beta2.tar.gz) Find the source code [on github](https://github.com/Byron/google-apis-rs/tree/master/gen/cloudmonitoring2_beta2-cli). # Usage -This documentation was generated from the *Cloud Monitoring* API at revision *20160221*. The CLI is at version *0.3.3*. +This documentation was generated from the *Cloud Monitoring* API at revision *20160403*. The CLI is at version *0.3.4*. ```bash cloudmonitoring2-beta2 [options] diff --git a/gen/cloudmonitoring2_beta2-cli/mkdocs.yml b/gen/cloudmonitoring2_beta2-cli/mkdocs.yml index 4d8798b48f..440139d46b 100644 --- a/gen/cloudmonitoring2_beta2-cli/mkdocs.yml +++ b/gen/cloudmonitoring2_beta2-cli/mkdocs.yml @@ -1,4 +1,4 @@ -site_name: Cloud Monitoring v0.3.3+20160221 +site_name: Cloud Monitoring v0.3.4+20160403 site_url: http://byron.github.io/google-apis-rs/google-cloudmonitoring2_beta2-cli site_description: Write integrating applications with bcore diff --git a/gen/cloudmonitoring2_beta2-cli/src/cmn.rs b/gen/cloudmonitoring2_beta2-cli/src/cmn.rs index 188159ee80..ae86fdef65 100644 --- a/gen/cloudmonitoring2_beta2-cli/src/cmn.rs +++ b/gen/cloudmonitoring2_beta2-cli/src/cmn.rs @@ -414,7 +414,7 @@ impl TokenStorage for JsonTokenStorage { Err(err) => match err.kind() { io::ErrorKind::NotFound => Ok(()), - _ => Err(json::Error::Io(err)) + _ => Err(json::Error::IoError(err)) }, Ok(_) => Ok(()), } @@ -427,7 +427,7 @@ impl TokenStorage for JsonTokenStorage { Err(serde_err) => Err(serde_err), } }, - Err(io_err) => Err(json::Error::Io(io_err)) + Err(io_err) => Err(json::Error::IoError(io_err)) } } } @@ -444,7 +444,7 @@ impl TokenStorage for JsonTokenStorage { Err(io_err) => { match io_err.kind() { io::ErrorKind::NotFound => Ok(None), - _ => Err(json::Error::Io(io_err)) + _ => Err(json::Error::IoError(io_err)) } } } @@ -683,7 +683,7 @@ pub fn application_secret_from_directory(dir: &str, = json::from_str(json_console_secret).unwrap(); match json::to_writer_pretty(&mut f, &console_secret) { Err(serde_err) => match serde_err { - json::Error::Io(err) => err, + json::Error::IoError(err) => err, _ => panic!("Unexpected serde error: {:#?}", serde_err) }, Ok(_) => continue, @@ -696,7 +696,7 @@ pub fn application_secret_from_directory(dir: &str, }, Ok(f) => { match json::de::from_reader::<_, ConsoleApplicationSecret>(f) { - Err(json::Error::Io(err)) => + Err(json::Error::IoError(err)) => return secret_io_error(err), Err(json_err) => return Err(CLIError::Configuration( diff --git a/gen/cloudmonitoring2_beta2-cli/src/main.rs b/gen/cloudmonitoring2_beta2-cli/src/main.rs index 4fec5bb10b..ecf211ae05 100644 --- a/gen/cloudmonitoring2_beta2-cli/src/main.rs +++ b/gen/cloudmonitoring2_beta2-cli/src/main.rs @@ -914,8 +914,8 @@ fn main() { let mut app = App::new("cloudmonitoring2-beta2") .author("Sebastian Thiel ") - .version("0.3.3+20160221") - .about("API for accessing Google Cloud and API monitoring data.") + .version("0.3.4+20160403") + .about("Accesses Google Cloud Monitoring data.") .after_help("All documentation details can be found at http://byron.github.io/google-apis-rs/google_cloudmonitoring2_beta2_cli") .arg(Arg::with_name("url") .long("scope") diff --git a/gen/cloudmonitoring2_beta2/Cargo.toml b/gen/cloudmonitoring2_beta2/Cargo.toml index e713352246..fdb0d7a980 100644 --- a/gen/cloudmonitoring2_beta2/Cargo.toml +++ b/gen/cloudmonitoring2_beta2/Cargo.toml @@ -4,7 +4,7 @@ [package] name = "google-cloudmonitoring2_beta2" -version = "0.1.12+20160221" +version = "0.1.13+20160403" authors = ["Sebastian Thiel "] description = "A complete library to interact with Cloud Monitoring (protocol v2beta2)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/cloudmonitoring2_beta2" @@ -16,14 +16,14 @@ build = "src/build.rs" [dependencies] -hyper = "0.7" -mime = "0.1.0" -serde = ">= 0.7.0" -serde_json = ">= 0.7.0" -yup-oauth2 = ">= 0.5.4" +hyper = "0.8" +mime = "0.2.0" +serde = "0.6.0" +serde_json = "0.6.0" +yup-oauth2 = ">= 0.5.6" url = ">= 0.5" [build-dependencies] -syntex = { version = ">= 0.23" } -serde_codegen = { version = ">= 0.6" } +syntex = { version = "= 0.28" } +serde_codegen = { version = "= 0.6.13" } diff --git a/gen/cloudmonitoring2_beta2/README.md b/gen/cloudmonitoring2_beta2/README.md index 870d37ff71..ce24bb6371 100644 --- a/gen/cloudmonitoring2_beta2/README.md +++ b/gen/cloudmonitoring2_beta2/README.md @@ -5,7 +5,7 @@ DO NOT EDIT ! --> The `google-cloudmonitoring2_beta2` library allows access to all features of the *Google Cloud Monitoring* service. -This documentation was generated from *Cloud Monitoring* crate version *0.1.12+20160221*, where *20160221* is the exact revision of the *cloudmonitoring:v2beta2* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.12*. +This documentation was generated from *Cloud Monitoring* crate version *0.1.13+20160403*, where *20160403* is the exact revision of the *cloudmonitoring:v2beta2* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.13*. Everything else about the *Cloud Monitoring* *v2_beta2* API can be found at the [official documentation site](https://cloud.google.com/monitoring/v2beta2/). diff --git a/gen/cloudmonitoring2_beta2/src/cmn.rs b/gen/cloudmonitoring2_beta2/src/cmn.rs index 87b91a8986..c69621da55 100644 --- a/gen/cloudmonitoring2_beta2/src/cmn.rs +++ b/gen/cloudmonitoring2_beta2/src/cmn.rs @@ -12,7 +12,7 @@ use mime::{Mime, TopLevel, SubLevel, Attr, Value}; use oauth2::{TokenType, Retry, self}; use hyper; use hyper::header::{ContentType, ContentLength, Headers, UserAgent, Authorization, Header, - HeaderFormat}; + HeaderFormat, Bearer}; use hyper::http::h1::LINE_ENDING; use hyper::method::Method; use hyper::status::StatusCode; @@ -634,7 +634,7 @@ pub struct ResumableUploadHelper<'a, A: 'a> { pub start_at: Option, pub auth: &'a mut A, pub user_agent: &'a str, - pub auth_header: Authorization, + pub auth_header: Authorization, pub url: &'a str, pub reader: &'a mut ReadSeek, pub media_type: Mime, diff --git a/gen/cloudmonitoring2_beta2/src/lib.rs b/gen/cloudmonitoring2_beta2/src/lib.rs index b3b368375a..f23ab78620 100644 --- a/gen/cloudmonitoring2_beta2/src/lib.rs +++ b/gen/cloudmonitoring2_beta2/src/lib.rs @@ -2,7 +2,7 @@ // This file was generated automatically from 'src/mako/api/lib.rs.mako' // DO NOT EDIT ! -//! This documentation was generated from *Cloud Monitoring* crate version *0.1.12+20160221*, where *20160221* is the exact revision of the *cloudmonitoring:v2beta2* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.12*. +//! This documentation was generated from *Cloud Monitoring* crate version *0.1.13+20160403*, where *20160403* is the exact revision of the *cloudmonitoring:v2beta2* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.13*. //! //! Everything else about the *Cloud Monitoring* *v2_beta2* API can be found at the //! [official documentation site](https://cloud.google.com/monitoring/v2beta2/). diff --git a/gen/cloudmonitoring2_beta2/src/lib.rs.in b/gen/cloudmonitoring2_beta2/src/lib.rs.in index 4a25a15c1a..63303a57b4 100644 --- a/gen/cloudmonitoring2_beta2/src/lib.rs.in +++ b/gen/cloudmonitoring2_beta2/src/lib.rs.in @@ -140,7 +140,7 @@ impl<'a, C, A> CloudMonitoring CloudMonitoring { client: RefCell::new(client), auth: RefCell::new(authenticator), - _user_agent: "google-api-rust-client/0.1.12".to_string(), + _user_agent: "google-api-rust-client/0.1.13".to_string(), } } @@ -155,7 +155,7 @@ impl<'a, C, A> CloudMonitoring } /// Set the user-agent header field to use in all requests to the server. - /// It defaults to `google-api-rust-client/0.1.12`. + /// It defaults to `google-api-rust-client/0.1.13`. /// /// Returns the previously set user-agent. pub fn user_agent(&mut self, agent_name: String) -> String { @@ -918,7 +918,7 @@ impl<'a, C, A> TimeseriesDescriptorListCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, ListTimeseriesDescriptorsResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -1023,8 +1023,7 @@ impl<'a, C, A> TimeseriesDescriptorListCall<'a, C, A> where C: BorrowMut TimeseryWriteCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, WriteTimeseriesResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -1376,8 +1375,7 @@ impl<'a, C, A> TimeseryWriteCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -1579,7 +1577,7 @@ impl<'a, C, A> TimeseryListCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, ListTimeseriesResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -1684,8 +1682,7 @@ impl<'a, C, A> TimeseryListCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -1963,7 +1960,7 @@ impl<'a, C, A> MetricDescriptorListCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, ListMetricDescriptorsResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -2052,8 +2049,7 @@ impl<'a, C, A> MetricDescriptorListCall<'a, C, A> where C: BorrowMut MetricDescriptorDeleteCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, DeleteMetricDescriptorResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -2324,8 +2320,7 @@ impl<'a, C, A> MetricDescriptorDeleteCall<'a, C, A> where C: BorrowMut MetricDescriptorCreateCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, MetricDescriptor)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -2588,8 +2583,7 @@ impl<'a, C, A> MetricDescriptorCreateCall<'a, C, A> where C: BorrowMut"] -description = "A complete library to interact with cloudresourcemanager (protocol v1)" +description = "A complete library to interact with Cloud Resource Manager (protocol v1)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/cloudresourcemanager1-cli" homepage = "https://cloud.google.com/resource-manager" documentation = "http://byron.github.io/google-apis-rs/google_cloudresourcemanager1_cli" @@ -17,18 +17,18 @@ keywords = ["cloudresourcemanager", "google", "cli"] name = "cloudresourcemanager1" [dependencies] -hyper = "0.7" -mime = "0.1.0" -serde = ">= 0.7.0" -serde_json = ">= 0.7.0" -yup-oauth2 = ">= 0.5.4" +hyper = "0.8" +mime = "0.2.0" +serde = "0.6.0" +serde_json = "0.6.0" +yup-oauth2 = ">= 0.5.6" strsim = "0.4" yup-hyper-mock = "1.0" clap = "2.0" [build-dependencies] -syntex = { version = ">= 0.23" } -serde_codegen = { version = ">= 0.6" } +syntex = { version = "= 0.28" } +serde_codegen = { version = "= 0.6.13" } [dependencies.google-cloudresourcemanager1] diff --git a/gen/cloudresourcemanager1-cli/README.md b/gen/cloudresourcemanager1-cli/README.md index 3ff23a9297..58a095c75c 100644 --- a/gen/cloudresourcemanager1-cli/README.md +++ b/gen/cloudresourcemanager1-cli/README.md @@ -3,28 +3,28 @@ DO NOT EDIT ! This file was generated automatically from 'src/mako/cli/README.md.mako' DO NOT EDIT ! --> -The `cloudresourcemanager1` command-line interface *(CLI)* allows to use most features of the *Google cloudresourcemanager* service from the comfort of your terminal. +The `cloudresourcemanager1` command-line interface *(CLI)* allows to use most features of the *Google Cloud Resource Manager* service from the comfort of your terminal. By default all output is printed to standard out, but flags can be set to direct it into a file independent of your shell's capabilities. Errors will be printed to standard error, and cause the program's exit code to be non-zero. If data-structures are requested, these will be returned as pretty-printed JSON, to be useful as input to other tools. -Everything else about the *cloudresourcemanager* API can be found at the +Everything else about the *Cloud Resource Manager* API can be found at the [official documentation site](https://cloud.google.com/resource-manager). # Downloads You can download the pre-compiled 64bit binaries for the following platforms: -* ![icon](http://megaicons.net/static/img/icons_sizes/6/140/16/ubuntu-icon.png) [ubuntu](http://dl.byronimo.de/google.rs/cli/0.3.3/ubuntu/cloudresourcemanager1.tar.gz) -* ![icon](http://hydra-media.cursecdn.com/wow.gamepedia.com/a/a2/Apple-icon-16x16.png?version=25ddd67ac3dd3b634478e3978b76cb74) [osx](http://dl.byronimo.de/google.rs/cli/0.3.3/osx/cloudresourcemanager1.tar.gz) +* ![icon](http://megaicons.net/static/img/icons_sizes/6/140/16/ubuntu-icon.png) [ubuntu](http://dl.byronimo.de/google.rs/cli/0.3.4/ubuntu/cloudresourcemanager1.tar.gz) +* ![icon](http://hydra-media.cursecdn.com/wow.gamepedia.com/a/a2/Apple-icon-16x16.png?version=25ddd67ac3dd3b634478e3978b76cb74) [osx](http://dl.byronimo.de/google.rs/cli/0.3.4/osx/cloudresourcemanager1.tar.gz) Find the source code [on github](https://github.com/Byron/google-apis-rs/tree/master/gen/cloudresourcemanager1-cli). # Usage -This documentation was generated from the *cloudresourcemanager* API at revision *20160225*. The CLI is at version *0.3.3*. +This documentation was generated from the *Cloud Resource Manager* API at revision *20160316*. The CLI is at version *0.3.4*. ```bash cloudresourcemanager1 [options] diff --git a/gen/cloudresourcemanager1-cli/mkdocs.yml b/gen/cloudresourcemanager1-cli/mkdocs.yml index 8b46e9ed71..68c6ca7674 100644 --- a/gen/cloudresourcemanager1-cli/mkdocs.yml +++ b/gen/cloudresourcemanager1-cli/mkdocs.yml @@ -1,4 +1,4 @@ -site_name: cloudresourcemanager v0.3.3+20160225 +site_name: Cloud Resource Manager v0.3.4+20160316 site_url: http://byron.github.io/google-apis-rs/google-cloudresourcemanager1-cli site_description: Write integrating applications with bcore diff --git a/gen/cloudresourcemanager1-cli/src/cmn.rs b/gen/cloudresourcemanager1-cli/src/cmn.rs index 188159ee80..ae86fdef65 100644 --- a/gen/cloudresourcemanager1-cli/src/cmn.rs +++ b/gen/cloudresourcemanager1-cli/src/cmn.rs @@ -414,7 +414,7 @@ impl TokenStorage for JsonTokenStorage { Err(err) => match err.kind() { io::ErrorKind::NotFound => Ok(()), - _ => Err(json::Error::Io(err)) + _ => Err(json::Error::IoError(err)) }, Ok(_) => Ok(()), } @@ -427,7 +427,7 @@ impl TokenStorage for JsonTokenStorage { Err(serde_err) => Err(serde_err), } }, - Err(io_err) => Err(json::Error::Io(io_err)) + Err(io_err) => Err(json::Error::IoError(io_err)) } } } @@ -444,7 +444,7 @@ impl TokenStorage for JsonTokenStorage { Err(io_err) => { match io_err.kind() { io::ErrorKind::NotFound => Ok(None), - _ => Err(json::Error::Io(io_err)) + _ => Err(json::Error::IoError(io_err)) } } } @@ -683,7 +683,7 @@ pub fn application_secret_from_directory(dir: &str, = json::from_str(json_console_secret).unwrap(); match json::to_writer_pretty(&mut f, &console_secret) { Err(serde_err) => match serde_err { - json::Error::Io(err) => err, + json::Error::IoError(err) => err, _ => panic!("Unexpected serde error: {:#?}", serde_err) }, Ok(_) => continue, @@ -696,7 +696,7 @@ pub fn application_secret_from_directory(dir: &str, }, Ok(f) => { match json::de::from_reader::<_, ConsoleApplicationSecret>(f) { - Err(json::Error::Io(err)) => + Err(json::Error::IoError(err)) => return secret_io_error(err), Err(json_err) => return Err(CLIError::Configuration( diff --git a/gen/cloudresourcemanager1-cli/src/main.rs b/gen/cloudresourcemanager1-cli/src/main.rs index 81e440cd50..a8935f728a 100644 --- a/gen/cloudresourcemanager1-cli/src/main.rs +++ b/gen/cloudresourcemanager1-cli/src/main.rs @@ -38,7 +38,7 @@ enum DoitError { struct Engine<'n> { opt: ArgMatches<'n>, - hub: api::Cloudresourcemanager>, + hub: api::CloudResourceManager>, gp: Vec<&'static str>, gpm: Vec<(&'static str, &'static str)>, } @@ -733,7 +733,7 @@ impl<'n> Engine<'n> { }; let engine = Engine { opt: opt, - hub: api::Cloudresourcemanager::new(client, auth), + hub: api::CloudResourceManager::new(client, auth), gp: vec!["$-xgafv", "access-token", "alt", "bearer-token", "callback", "fields", "key", "oauth-token", "pp", "pretty-print", "quota-user", "upload-type", "upload-protocol"], gpm: vec![ ("$-xgafv", "$.xgafv"), @@ -972,7 +972,7 @@ fn main() { let mut app = App::new("cloudresourcemanager1") .author("Sebastian Thiel ") - .version("0.3.3+20160225") + .version("0.3.4+20160316") .about("The Google Cloud Resource Manager API provides methods for creating, reading, and updating project metadata.") .after_help("All documentation details can be found at http://byron.github.io/google-apis-rs/google_cloudresourcemanager1_cli") .arg(Arg::with_name("url") diff --git a/gen/cloudresourcemanager1/Cargo.toml b/gen/cloudresourcemanager1/Cargo.toml index 7626b6ab1c..26d7611fe1 100644 --- a/gen/cloudresourcemanager1/Cargo.toml +++ b/gen/cloudresourcemanager1/Cargo.toml @@ -4,9 +4,9 @@ [package] name = "google-cloudresourcemanager1" -version = "0.1.12+20160225" +version = "0.1.13+20160316" authors = ["Sebastian Thiel "] -description = "A complete library to interact with cloudresourcemanager (protocol v1)" +description = "A complete library to interact with Cloud Resource Manager (protocol v1)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/cloudresourcemanager1" homepage = "https://cloud.google.com/resource-manager" documentation = "http://byron.github.io/google-apis-rs/google_cloudresourcemanager1" @@ -16,14 +16,14 @@ build = "src/build.rs" [dependencies] -hyper = "0.7" -mime = "0.1.0" -serde = ">= 0.7.0" -serde_json = ">= 0.7.0" -yup-oauth2 = ">= 0.5.4" +hyper = "0.8" +mime = "0.2.0" +serde = "0.6.0" +serde_json = "0.6.0" +yup-oauth2 = ">= 0.5.6" url = ">= 0.5" [build-dependencies] -syntex = { version = ">= 0.23" } -serde_codegen = { version = ">= 0.6" } +syntex = { version = "= 0.28" } +serde_codegen = { version = "= 0.6.13" } diff --git a/gen/cloudresourcemanager1/README.md b/gen/cloudresourcemanager1/README.md index f36365379a..be1ed54c02 100644 --- a/gen/cloudresourcemanager1/README.md +++ b/gen/cloudresourcemanager1/README.md @@ -3,15 +3,15 @@ DO NOT EDIT ! This file was generated automatically from 'src/mako/api/README.md.mako' DO NOT EDIT ! --> -The `google-cloudresourcemanager1` library allows access to all features of the *Google cloudresourcemanager* service. +The `google-cloudresourcemanager1` library allows access to all features of the *Google Cloud Resource Manager* service. -This documentation was generated from *cloudresourcemanager* crate version *0.1.12+20160225*, where *20160225* is the exact revision of the *cloudresourcemanager:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.12*. +This documentation was generated from *Cloud Resource Manager* crate version *0.1.13+20160316*, where *20160316* is the exact revision of the *cloudresourcemanager:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.13*. -Everything else about the *cloudresourcemanager* *v1* API can be found at the +Everything else about the *Cloud Resource Manager* *v1* API can be found at the [official documentation site](https://cloud.google.com/resource-manager). # Features -Handle the following *Resources* with ease from the central [hub](http://byron.github.io/google-apis-rs/google_cloudresourcemanager1/struct.Cloudresourcemanager.html) ... +Handle the following *Resources* with ease from the central [hub](http://byron.github.io/google-apis-rs/google_cloudresourcemanager1/struct.CloudResourceManager.html) ... * [projects](http://byron.github.io/google-apis-rs/google_cloudresourcemanager1/struct.Project.html) * [*delete*](http://byron.github.io/google-apis-rs/google_cloudresourcemanager1/struct.ProjectDeleteCall.html), [*get*](http://byron.github.io/google-apis-rs/google_cloudresourcemanager1/struct.ProjectGetCall.html), [*get iam policy*](http://byron.github.io/google-apis-rs/google_cloudresourcemanager1/struct.ProjectGetIamPolicyCall.html), [*list*](http://byron.github.io/google-apis-rs/google_cloudresourcemanager1/struct.ProjectListCall.html), [*set iam policy*](http://byron.github.io/google-apis-rs/google_cloudresourcemanager1/struct.ProjectSetIamPolicyCall.html), [*test iam permissions*](http://byron.github.io/google-apis-rs/google_cloudresourcemanager1/struct.ProjectTestIamPermissionCall.html), [*undelete*](http://byron.github.io/google-apis-rs/google_cloudresourcemanager1/struct.ProjectUndeleteCall.html) and [*update*](http://byron.github.io/google-apis-rs/google_cloudresourcemanager1/struct.ProjectUpdateCall.html) @@ -23,7 +23,7 @@ Handle the following *Resources* with ease from the central [hub](http://byron.g The API is structured into the following primary items: -* **[Hub](http://byron.github.io/google-apis-rs/google_cloudresourcemanager1/struct.Cloudresourcemanager.html)** +* **[Hub](http://byron.github.io/google-apis-rs/google_cloudresourcemanager1/struct.CloudResourceManager.html)** * a central object to maintain state and allow accessing all *Activities* * creates [*Method Builders*](http://byron.github.io/google-apis-rs/google_cloudresourcemanager1/trait.MethodsBuilder.html) which in turn allow access to individual [*Call Builders*](http://byron.github.io/google-apis-rs/google_cloudresourcemanager1/trait.CallBuilder.html) @@ -82,7 +82,7 @@ extern crate google_cloudresourcemanager1 as cloudresourcemanager1; use cloudresourcemanager1::{Result, Error}; use std::default::Default; use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; -use cloudresourcemanager1::Cloudresourcemanager; +use cloudresourcemanager1::CloudResourceManager; // Get an ApplicationSecret instance by some means. It contains the `client_id` and // `client_secret`, among other things. @@ -95,7 +95,7 @@ let secret: ApplicationSecret = Default::default(); let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, hyper::Client::new(), ::default(), None); -let mut hub = Cloudresourcemanager::new(hyper::Client::new(), auth); +let mut hub = CloudResourceManager::new(hyper::Client::new(), auth); // You can configure optional parameters by calling the respective setters at will, and // execute the final call using `doit()`. // Values shown here are possibly random and not representative ! diff --git a/gen/cloudresourcemanager1/src/cmn.rs b/gen/cloudresourcemanager1/src/cmn.rs index 87b91a8986..c69621da55 100644 --- a/gen/cloudresourcemanager1/src/cmn.rs +++ b/gen/cloudresourcemanager1/src/cmn.rs @@ -12,7 +12,7 @@ use mime::{Mime, TopLevel, SubLevel, Attr, Value}; use oauth2::{TokenType, Retry, self}; use hyper; use hyper::header::{ContentType, ContentLength, Headers, UserAgent, Authorization, Header, - HeaderFormat}; + HeaderFormat, Bearer}; use hyper::http::h1::LINE_ENDING; use hyper::method::Method; use hyper::status::StatusCode; @@ -634,7 +634,7 @@ pub struct ResumableUploadHelper<'a, A: 'a> { pub start_at: Option, pub auth: &'a mut A, pub user_agent: &'a str, - pub auth_header: Authorization, + pub auth_header: Authorization, pub url: &'a str, pub reader: &'a mut ReadSeek, pub media_type: Mime, diff --git a/gen/cloudresourcemanager1/src/lib.rs b/gen/cloudresourcemanager1/src/lib.rs index 2e562da91d..232870ea65 100644 --- a/gen/cloudresourcemanager1/src/lib.rs +++ b/gen/cloudresourcemanager1/src/lib.rs @@ -2,14 +2,14 @@ // This file was generated automatically from 'src/mako/api/lib.rs.mako' // DO NOT EDIT ! -//! This documentation was generated from *cloudresourcemanager* crate version *0.1.12+20160225*, where *20160225* is the exact revision of the *cloudresourcemanager:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.12*. +//! This documentation was generated from *Cloud Resource Manager* crate version *0.1.13+20160316*, where *20160316* is the exact revision of the *cloudresourcemanager:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.13*. //! -//! Everything else about the *cloudresourcemanager* *v1* API can be found at the +//! Everything else about the *Cloud Resource Manager* *v1* API can be found at the //! [official documentation site](https://cloud.google.com/resource-manager). //! The original source code is [on github](https://github.com/Byron/google-apis-rs/tree/master/gen/cloudresourcemanager1). //! # Features //! -//! Handle the following *Resources* with ease from the central [hub](struct.Cloudresourcemanager.html) ... +//! Handle the following *Resources* with ease from the central [hub](struct.CloudResourceManager.html) ... //! //! * [projects](struct.Project.html) //! * [*delete*](struct.ProjectDeleteCall.html), [*get*](struct.ProjectGetCall.html), [*get iam policy*](struct.ProjectGetIamPolicyCall.html), [*list*](struct.ProjectListCall.html), [*set iam policy*](struct.ProjectSetIamPolicyCall.html), [*test iam permissions*](struct.ProjectTestIamPermissionCall.html), [*undelete*](struct.ProjectUndeleteCall.html) and [*update*](struct.ProjectUpdateCall.html) @@ -23,7 +23,7 @@ //! //! The API is structured into the following primary items: //! -//! * **[Hub](struct.Cloudresourcemanager.html)** +//! * **[Hub](struct.CloudResourceManager.html)** //! * a central object to maintain state and allow accessing all *Activities* //! * creates [*Method Builders*](trait.MethodsBuilder.html) which in turn //! allow access to individual [*Call Builders*](trait.CallBuilder.html) @@ -83,7 +83,7 @@ //! # #[test] fn egal() { //! use std::default::Default; //! use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; -//! use cloudresourcemanager1::Cloudresourcemanager; +//! use cloudresourcemanager1::CloudResourceManager; //! //! // Get an ApplicationSecret instance by some means. It contains the `client_id` and //! // `client_secret`, among other things. @@ -96,7 +96,7 @@ //! let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, //! hyper::Client::new(), //! ::default(), None); -//! let mut hub = Cloudresourcemanager::new(hyper::Client::new(), auth); +//! let mut hub = CloudResourceManager::new(hyper::Client::new(), auth); //! // You can configure optional parameters by calling the respective setters at will, and //! // execute the final call using `doit()`. //! // Values shown here are possibly random and not representative ! diff --git a/gen/cloudresourcemanager1/src/lib.rs.in b/gen/cloudresourcemanager1/src/lib.rs.in index 26355919c7..18e3e10e76 100644 --- a/gen/cloudresourcemanager1/src/lib.rs.in +++ b/gen/cloudresourcemanager1/src/lib.rs.in @@ -64,7 +64,7 @@ impl Default for Scope { // HUB ### // ###### -/// Central instance to access all Cloudresourcemanager related resource activities +/// Central instance to access all CloudResourceManager related resource activities /// /// # Examples /// @@ -78,7 +78,7 @@ impl Default for Scope { /// # #[test] fn egal() { /// use std::default::Default; /// use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; -/// use cloudresourcemanager1::Cloudresourcemanager; +/// use cloudresourcemanager1::CloudResourceManager; /// /// // Get an ApplicationSecret instance by some means. It contains the `client_id` and /// // `client_secret`, among other things. @@ -91,7 +91,7 @@ impl Default for Scope { /// let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, /// hyper::Client::new(), /// ::default(), None); -/// let mut hub = Cloudresourcemanager::new(hyper::Client::new(), auth); +/// let mut hub = CloudResourceManager::new(hyper::Client::new(), auth); /// // You can configure optional parameters by calling the respective setters at will, and /// // execute the final call using `doit()`. /// // Values shown here are possibly random and not representative ! @@ -119,22 +119,22 @@ impl Default for Scope { /// } /// # } /// ``` -pub struct Cloudresourcemanager { +pub struct CloudResourceManager { client: RefCell, auth: RefCell, _user_agent: String, } -impl<'a, C, A> Hub for Cloudresourcemanager {} +impl<'a, C, A> Hub for CloudResourceManager {} -impl<'a, C, A> Cloudresourcemanager +impl<'a, C, A> CloudResourceManager where C: BorrowMut, A: oauth2::GetToken { - pub fn new(client: C, authenticator: A) -> Cloudresourcemanager { - Cloudresourcemanager { + pub fn new(client: C, authenticator: A) -> CloudResourceManager { + CloudResourceManager { client: RefCell::new(client), auth: RefCell::new(authenticator), - _user_agent: "google-api-rust-client/0.1.12".to_string(), + _user_agent: "google-api-rust-client/0.1.13".to_string(), } } @@ -143,7 +143,7 @@ impl<'a, C, A> Cloudresourcemanager } /// Set the user-agent header field to use in all requests to the server. - /// It defaults to `google-api-rust-client/0.1.12`. + /// It defaults to `google-api-rust-client/0.1.13`. /// /// Returns the previously set user-agent. pub fn user_agent(&mut self, agent_name: String) -> String { @@ -381,7 +381,7 @@ impl ResponseResult for Empty {} // ################# /// A builder providing access to all methods supported on *project* resources. -/// It is not used directly, but through the `Cloudresourcemanager` hub. +/// It is not used directly, but through the `CloudResourceManager` hub. /// /// # Example /// @@ -395,13 +395,13 @@ impl ResponseResult for Empty {} /// # #[test] fn egal() { /// use std::default::Default; /// use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; -/// use cloudresourcemanager1::Cloudresourcemanager; +/// use cloudresourcemanager1::CloudResourceManager; /// /// let secret: ApplicationSecret = Default::default(); /// let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, /// hyper::Client::new(), /// ::default(), None); -/// let mut hub = Cloudresourcemanager::new(hyper::Client::new(), auth); +/// let mut hub = CloudResourceManager::new(hyper::Client::new(), auth); /// // Usually you wouldn't bind this to a variable, but keep calling *CallBuilders* /// // like `delete(...)`, `get(...)`, `get_iam_policy(...)`, `list(...)`, `set_iam_policy(...)`, `test_iam_permissions(...)`, `undelete(...)` and `update(...)` /// // to build up your call. @@ -411,7 +411,7 @@ impl ResponseResult for Empty {} pub struct ProjectMethods<'a, C, A> where C: 'a, A: 'a { - hub: &'a Cloudresourcemanager, + hub: &'a CloudResourceManager, } impl<'a, C, A> MethodsBuilder for ProjectMethods<'a, C, A> {} @@ -587,13 +587,13 @@ impl<'a, C, A> ProjectMethods<'a, C, A> { /// # #[test] fn egal() { /// # use std::default::Default; /// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; -/// # use cloudresourcemanager1::Cloudresourcemanager; +/// # use cloudresourcemanager1::CloudResourceManager; /// /// # let secret: ApplicationSecret = Default::default(); /// # let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, /// # hyper::Client::new(), /// # ::default(), None); -/// # let mut hub = Cloudresourcemanager::new(hyper::Client::new(), auth); +/// # let mut hub = CloudResourceManager::new(hyper::Client::new(), auth); /// // You can configure optional parameters by calling the respective setters at will, and /// // execute the final call using `doit()`. /// // Values shown here are possibly random and not representative ! @@ -604,7 +604,7 @@ impl<'a, C, A> ProjectMethods<'a, C, A> { pub struct ProjectGetCall<'a, C, A> where C: 'a, A: 'a { - hub: &'a Cloudresourcemanager, + hub: &'a CloudResourceManager, _project_id: String, _delegate: Option<&'a mut Delegate>, _additional_params: HashMap, @@ -619,7 +619,7 @@ impl<'a, C, A> ProjectGetCall<'a, C, A> where C: BorrowMut, A: oa /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Project)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -688,8 +688,7 @@ impl<'a, C, A> ProjectGetCall<'a, C, A> where C: BorrowMut, A: oa } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -830,13 +829,13 @@ impl<'a, C, A> ProjectGetCall<'a, C, A> where C: BorrowMut, A: oa /// # #[test] fn egal() { /// # use std::default::Default; /// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; -/// # use cloudresourcemanager1::Cloudresourcemanager; +/// # use cloudresourcemanager1::CloudResourceManager; /// /// # let secret: ApplicationSecret = Default::default(); /// # let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, /// # hyper::Client::new(), /// # ::default(), None); -/// # let mut hub = Cloudresourcemanager::new(hyper::Client::new(), auth); +/// # let mut hub = CloudResourceManager::new(hyper::Client::new(), auth); /// // As the method needs a request, you would usually fill it with the desired information /// // into the respective structure. Some of the parts shown here might not be applicable ! /// // Values shown here are possibly random and not representative ! @@ -852,7 +851,7 @@ impl<'a, C, A> ProjectGetCall<'a, C, A> where C: BorrowMut, A: oa pub struct ProjectUndeleteCall<'a, C, A> where C: 'a, A: 'a { - hub: &'a Cloudresourcemanager, + hub: &'a CloudResourceManager, _request: UndeleteProjectRequest, _project_id: String, _delegate: Option<&'a mut Delegate>, @@ -868,7 +867,7 @@ impl<'a, C, A> ProjectUndeleteCall<'a, C, A> where C: BorrowMut, /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Empty)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -948,8 +947,7 @@ impl<'a, C, A> ProjectUndeleteCall<'a, C, A> where C: BorrowMut, } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -1103,13 +1101,13 @@ impl<'a, C, A> ProjectUndeleteCall<'a, C, A> where C: BorrowMut, /// # #[test] fn egal() { /// # use std::default::Default; /// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; -/// # use cloudresourcemanager1::Cloudresourcemanager; +/// # use cloudresourcemanager1::CloudResourceManager; /// /// # let secret: ApplicationSecret = Default::default(); /// # let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, /// # hyper::Client::new(), /// # ::default(), None); -/// # let mut hub = Cloudresourcemanager::new(hyper::Client::new(), auth); +/// # let mut hub = CloudResourceManager::new(hyper::Client::new(), auth); /// // As the method needs a request, you would usually fill it with the desired information /// // into the respective structure. Some of the parts shown here might not be applicable ! /// // Values shown here are possibly random and not representative ! @@ -1125,7 +1123,7 @@ impl<'a, C, A> ProjectUndeleteCall<'a, C, A> where C: BorrowMut, pub struct ProjectSetIamPolicyCall<'a, C, A> where C: 'a, A: 'a { - hub: &'a Cloudresourcemanager, + hub: &'a CloudResourceManager, _request: SetIamPolicyRequest, _resource: String, _delegate: Option<&'a mut Delegate>, @@ -1141,7 +1139,7 @@ impl<'a, C, A> ProjectSetIamPolicyCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, Policy)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -1221,8 +1219,7 @@ impl<'a, C, A> ProjectSetIamPolicyCall<'a, C, A> where C: BorrowMut ProjectSetIamPolicyCall<'a, C, A> where C: BorrowMut::default(), None); -/// # let mut hub = Cloudresourcemanager::new(hyper::Client::new(), auth); +/// # let mut hub = CloudResourceManager::new(hyper::Client::new(), auth); /// // As the method needs a request, you would usually fill it with the desired information /// // into the respective structure. Some of the parts shown here might not be applicable ! /// // Values shown here are possibly random and not representative ! @@ -1398,7 +1395,7 @@ impl<'a, C, A> ProjectSetIamPolicyCall<'a, C, A> where C: BorrowMut where C: 'a, A: 'a { - hub: &'a Cloudresourcemanager, + hub: &'a CloudResourceManager, _request: TestIamPermissionsRequest, _resource: String, _delegate: Option<&'a mut Delegate>, @@ -1414,7 +1411,7 @@ impl<'a, C, A> ProjectTestIamPermissionCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, TestIamPermissionsResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -1494,8 +1491,7 @@ impl<'a, C, A> ProjectTestIamPermissionCall<'a, C, A> where C: BorrowMut ProjectTestIamPermissionCall<'a, C, A> where C: BorrowMut::default(), None); -/// # let mut hub = Cloudresourcemanager::new(hyper::Client::new(), auth); +/// # let mut hub = CloudResourceManager::new(hyper::Client::new(), auth); /// // As the method needs a request, you would usually fill it with the desired information /// // into the respective structure. Some of the parts shown here might not be applicable ! /// // Values shown here are possibly random and not representative ! @@ -1671,7 +1667,7 @@ impl<'a, C, A> ProjectTestIamPermissionCall<'a, C, A> where C: BorrowMut where C: 'a, A: 'a { - hub: &'a Cloudresourcemanager, + hub: &'a CloudResourceManager, _request: Project, _project_id: String, _delegate: Option<&'a mut Delegate>, @@ -1687,7 +1683,7 @@ impl<'a, C, A> ProjectUpdateCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Project)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -1767,8 +1763,7 @@ impl<'a, C, A> ProjectUpdateCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -1922,13 +1917,13 @@ impl<'a, C, A> ProjectUpdateCall<'a, C, A> where C: BorrowMut, A: /// # #[test] fn egal() { /// # use std::default::Default; /// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; -/// # use cloudresourcemanager1::Cloudresourcemanager; +/// # use cloudresourcemanager1::CloudResourceManager; /// /// # let secret: ApplicationSecret = Default::default(); /// # let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, /// # hyper::Client::new(), /// # ::default(), None); -/// # let mut hub = Cloudresourcemanager::new(hyper::Client::new(), auth); +/// # let mut hub = CloudResourceManager::new(hyper::Client::new(), auth); /// // As the method needs a request, you would usually fill it with the desired information /// // into the respective structure. Some of the parts shown here might not be applicable ! /// // Values shown here are possibly random and not representative ! @@ -1944,7 +1939,7 @@ impl<'a, C, A> ProjectUpdateCall<'a, C, A> where C: BorrowMut, A: pub struct ProjectGetIamPolicyCall<'a, C, A> where C: 'a, A: 'a { - hub: &'a Cloudresourcemanager, + hub: &'a CloudResourceManager, _request: GetIamPolicyRequest, _resource: String, _delegate: Option<&'a mut Delegate>, @@ -1960,7 +1955,7 @@ impl<'a, C, A> ProjectGetIamPolicyCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, Policy)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -2040,8 +2035,7 @@ impl<'a, C, A> ProjectGetIamPolicyCall<'a, C, A> where C: BorrowMut ProjectGetIamPolicyCall<'a, C, A> where C: BorrowMut::default(), None); -/// # let mut hub = Cloudresourcemanager::new(hyper::Client::new(), auth); +/// # let mut hub = CloudResourceManager::new(hyper::Client::new(), auth); /// // You can configure optional parameters by calling the respective setters at will, and /// // execute the final call using `doit()`. /// // Values shown here are possibly random and not representative ! @@ -2211,7 +2205,7 @@ impl<'a, C, A> ProjectGetIamPolicyCall<'a, C, A> where C: BorrowMut where C: 'a, A: 'a { - hub: &'a Cloudresourcemanager, + hub: &'a CloudResourceManager, _project_id: String, _delegate: Option<&'a mut Delegate>, _additional_params: HashMap, @@ -2226,7 +2220,7 @@ impl<'a, C, A> ProjectDeleteCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Empty)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -2295,8 +2289,7 @@ impl<'a, C, A> ProjectDeleteCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Delete, &url) @@ -2436,13 +2429,13 @@ impl<'a, C, A> ProjectDeleteCall<'a, C, A> where C: BorrowMut, A: /// # #[test] fn egal() { /// # use std::default::Default; /// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; -/// # use cloudresourcemanager1::Cloudresourcemanager; +/// # use cloudresourcemanager1::CloudResourceManager; /// /// # let secret: ApplicationSecret = Default::default(); /// # let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, /// # hyper::Client::new(), /// # ::default(), None); -/// # let mut hub = Cloudresourcemanager::new(hyper::Client::new(), auth); +/// # let mut hub = CloudResourceManager::new(hyper::Client::new(), auth); /// // You can configure optional parameters by calling the respective setters at will, and /// // execute the final call using `doit()`. /// // Values shown here are possibly random and not representative ! @@ -2456,7 +2449,7 @@ impl<'a, C, A> ProjectDeleteCall<'a, C, A> where C: BorrowMut, A: pub struct ProjectListCall<'a, C, A> where C: 'a, A: 'a { - hub: &'a Cloudresourcemanager, + hub: &'a CloudResourceManager, _page_token: Option, _page_size: Option, _filter: Option, @@ -2473,7 +2466,7 @@ impl<'a, C, A> ProjectListCall<'a, C, A> where C: BorrowMut, A: o /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, ListProjectsResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -2529,8 +2522,7 @@ impl<'a, C, A> ProjectListCall<'a, C, A> where C: BorrowMut, A: o } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) diff --git a/gen/cloudresourcemanager1_beta1-cli/Cargo.toml b/gen/cloudresourcemanager1_beta1-cli/Cargo.toml index 0174b7c2ea..2e94ad7af1 100644 --- a/gen/cloudresourcemanager1_beta1-cli/Cargo.toml +++ b/gen/cloudresourcemanager1_beta1-cli/Cargo.toml @@ -4,9 +4,9 @@ [package] name = "google-cloudresourcemanager1_beta1-cli" -version = "0.3.3+20160225" +version = "0.3.4+20160316" authors = ["Sebastian Thiel "] -description = "A complete library to interact with cloudresourcemanager (protocol v1beta1)" +description = "A complete library to interact with Cloud Resource Manager (protocol v1beta1)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/cloudresourcemanager1_beta1-cli" homepage = "https://cloud.google.com/resource-manager" documentation = "http://byron.github.io/google-apis-rs/google_cloudresourcemanager1_beta1_cli" @@ -17,18 +17,18 @@ keywords = ["cloudresourcemanager", "google", "cli"] name = "cloudresourcemanager1-beta1" [dependencies] -hyper = "0.7" -mime = "0.1.0" -serde = ">= 0.7.0" -serde_json = ">= 0.7.0" -yup-oauth2 = ">= 0.5.4" +hyper = "0.8" +mime = "0.2.0" +serde = "0.6.0" +serde_json = "0.6.0" +yup-oauth2 = ">= 0.5.6" strsim = "0.4" yup-hyper-mock = "1.0" clap = "2.0" [build-dependencies] -syntex = { version = ">= 0.23" } -serde_codegen = { version = ">= 0.6" } +syntex = { version = "= 0.28" } +serde_codegen = { version = "= 0.6.13" } [dependencies.google-cloudresourcemanager1_beta1] diff --git a/gen/cloudresourcemanager1_beta1-cli/README.md b/gen/cloudresourcemanager1_beta1-cli/README.md index 0255053fcb..f0f087653e 100644 --- a/gen/cloudresourcemanager1_beta1-cli/README.md +++ b/gen/cloudresourcemanager1_beta1-cli/README.md @@ -3,28 +3,28 @@ DO NOT EDIT ! This file was generated automatically from 'src/mako/cli/README.md.mako' DO NOT EDIT ! --> -The `cloudresourcemanager1-beta1` command-line interface *(CLI)* allows to use most features of the *Google cloudresourcemanager* service from the comfort of your terminal. +The `cloudresourcemanager1-beta1` command-line interface *(CLI)* allows to use most features of the *Google Cloud Resource Manager* service from the comfort of your terminal. By default all output is printed to standard out, but flags can be set to direct it into a file independent of your shell's capabilities. Errors will be printed to standard error, and cause the program's exit code to be non-zero. If data-structures are requested, these will be returned as pretty-printed JSON, to be useful as input to other tools. -Everything else about the *cloudresourcemanager* API can be found at the +Everything else about the *Cloud Resource Manager* API can be found at the [official documentation site](https://cloud.google.com/resource-manager). # Downloads You can download the pre-compiled 64bit binaries for the following platforms: -* ![icon](http://megaicons.net/static/img/icons_sizes/6/140/16/ubuntu-icon.png) [ubuntu](http://dl.byronimo.de/google.rs/cli/0.3.3/ubuntu/cloudresourcemanager1-beta1.tar.gz) -* ![icon](http://hydra-media.cursecdn.com/wow.gamepedia.com/a/a2/Apple-icon-16x16.png?version=25ddd67ac3dd3b634478e3978b76cb74) [osx](http://dl.byronimo.de/google.rs/cli/0.3.3/osx/cloudresourcemanager1-beta1.tar.gz) +* ![icon](http://megaicons.net/static/img/icons_sizes/6/140/16/ubuntu-icon.png) [ubuntu](http://dl.byronimo.de/google.rs/cli/0.3.4/ubuntu/cloudresourcemanager1-beta1.tar.gz) +* ![icon](http://hydra-media.cursecdn.com/wow.gamepedia.com/a/a2/Apple-icon-16x16.png?version=25ddd67ac3dd3b634478e3978b76cb74) [osx](http://dl.byronimo.de/google.rs/cli/0.3.4/osx/cloudresourcemanager1-beta1.tar.gz) Find the source code [on github](https://github.com/Byron/google-apis-rs/tree/master/gen/cloudresourcemanager1_beta1-cli). # Usage -This documentation was generated from the *cloudresourcemanager* API at revision *20160225*. The CLI is at version *0.3.3*. +This documentation was generated from the *Cloud Resource Manager* API at revision *20160316*. The CLI is at version *0.3.4*. ```bash cloudresourcemanager1-beta1 [options] diff --git a/gen/cloudresourcemanager1_beta1-cli/mkdocs.yml b/gen/cloudresourcemanager1_beta1-cli/mkdocs.yml index 7845bc9bb8..354d48a95c 100644 --- a/gen/cloudresourcemanager1_beta1-cli/mkdocs.yml +++ b/gen/cloudresourcemanager1_beta1-cli/mkdocs.yml @@ -1,4 +1,4 @@ -site_name: cloudresourcemanager v0.3.3+20160225 +site_name: Cloud Resource Manager v0.3.4+20160316 site_url: http://byron.github.io/google-apis-rs/google-cloudresourcemanager1_beta1-cli site_description: Write integrating applications with bcore diff --git a/gen/cloudresourcemanager1_beta1-cli/src/cmn.rs b/gen/cloudresourcemanager1_beta1-cli/src/cmn.rs index 188159ee80..ae86fdef65 100644 --- a/gen/cloudresourcemanager1_beta1-cli/src/cmn.rs +++ b/gen/cloudresourcemanager1_beta1-cli/src/cmn.rs @@ -414,7 +414,7 @@ impl TokenStorage for JsonTokenStorage { Err(err) => match err.kind() { io::ErrorKind::NotFound => Ok(()), - _ => Err(json::Error::Io(err)) + _ => Err(json::Error::IoError(err)) }, Ok(_) => Ok(()), } @@ -427,7 +427,7 @@ impl TokenStorage for JsonTokenStorage { Err(serde_err) => Err(serde_err), } }, - Err(io_err) => Err(json::Error::Io(io_err)) + Err(io_err) => Err(json::Error::IoError(io_err)) } } } @@ -444,7 +444,7 @@ impl TokenStorage for JsonTokenStorage { Err(io_err) => { match io_err.kind() { io::ErrorKind::NotFound => Ok(None), - _ => Err(json::Error::Io(io_err)) + _ => Err(json::Error::IoError(io_err)) } } } @@ -683,7 +683,7 @@ pub fn application_secret_from_directory(dir: &str, = json::from_str(json_console_secret).unwrap(); match json::to_writer_pretty(&mut f, &console_secret) { Err(serde_err) => match serde_err { - json::Error::Io(err) => err, + json::Error::IoError(err) => err, _ => panic!("Unexpected serde error: {:#?}", serde_err) }, Ok(_) => continue, @@ -696,7 +696,7 @@ pub fn application_secret_from_directory(dir: &str, }, Ok(f) => { match json::de::from_reader::<_, ConsoleApplicationSecret>(f) { - Err(json::Error::Io(err)) => + Err(json::Error::IoError(err)) => return secret_io_error(err), Err(json_err) => return Err(CLIError::Configuration( diff --git a/gen/cloudresourcemanager1_beta1-cli/src/main.rs b/gen/cloudresourcemanager1_beta1-cli/src/main.rs index da3d0d1b9d..9feed86863 100644 --- a/gen/cloudresourcemanager1_beta1-cli/src/main.rs +++ b/gen/cloudresourcemanager1_beta1-cli/src/main.rs @@ -38,7 +38,7 @@ enum DoitError { struct Engine<'n> { opt: ArgMatches<'n>, - hub: api::Cloudresourcemanager>, + hub: api::CloudResourceManager>, gp: Vec<&'static str>, gpm: Vec<(&'static str, &'static str)>, } @@ -1311,7 +1311,7 @@ impl<'n> Engine<'n> { }; let engine = Engine { opt: opt, - hub: api::Cloudresourcemanager::new(client, auth), + hub: api::CloudResourceManager::new(client, auth), gp: vec!["$-xgafv", "access-token", "alt", "bearer-token", "callback", "fields", "key", "oauth-token", "pp", "pretty-print", "quota-user", "upload-type", "upload-protocol"], gpm: vec![ ("$-xgafv", "$.xgafv"), @@ -1725,7 +1725,7 @@ fn main() { let mut app = App::new("cloudresourcemanager1-beta1") .author("Sebastian Thiel ") - .version("0.3.3+20160225") + .version("0.3.4+20160316") .about("The Google Cloud Resource Manager API provides methods for creating, reading, and updating project metadata.") .after_help("All documentation details can be found at http://byron.github.io/google-apis-rs/google_cloudresourcemanager1_beta1_cli") .arg(Arg::with_name("url") diff --git a/gen/cloudresourcemanager1_beta1/Cargo.toml b/gen/cloudresourcemanager1_beta1/Cargo.toml index a235b69ac8..8197ffe188 100644 --- a/gen/cloudresourcemanager1_beta1/Cargo.toml +++ b/gen/cloudresourcemanager1_beta1/Cargo.toml @@ -4,9 +4,9 @@ [package] name = "google-cloudresourcemanager1_beta1" -version = "0.1.12+20160225" +version = "0.1.13+20160316" authors = ["Sebastian Thiel "] -description = "A complete library to interact with cloudresourcemanager (protocol v1beta1)" +description = "A complete library to interact with Cloud Resource Manager (protocol v1beta1)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/cloudresourcemanager1_beta1" homepage = "https://cloud.google.com/resource-manager" documentation = "http://byron.github.io/google-apis-rs/google_cloudresourcemanager1_beta1" @@ -16,14 +16,14 @@ build = "src/build.rs" [dependencies] -hyper = "0.7" -mime = "0.1.0" -serde = ">= 0.7.0" -serde_json = ">= 0.7.0" -yup-oauth2 = ">= 0.5.4" +hyper = "0.8" +mime = "0.2.0" +serde = "0.6.0" +serde_json = "0.6.0" +yup-oauth2 = ">= 0.5.6" url = ">= 0.5" [build-dependencies] -syntex = { version = ">= 0.23" } -serde_codegen = { version = ">= 0.6" } +syntex = { version = "= 0.28" } +serde_codegen = { version = "= 0.6.13" } diff --git a/gen/cloudresourcemanager1_beta1/README.md b/gen/cloudresourcemanager1_beta1/README.md index 7dfbb358d2..25547d040a 100644 --- a/gen/cloudresourcemanager1_beta1/README.md +++ b/gen/cloudresourcemanager1_beta1/README.md @@ -3,15 +3,15 @@ DO NOT EDIT ! This file was generated automatically from 'src/mako/api/README.md.mako' DO NOT EDIT ! --> -The `google-cloudresourcemanager1_beta1` library allows access to all features of the *Google cloudresourcemanager* service. +The `google-cloudresourcemanager1_beta1` library allows access to all features of the *Google Cloud Resource Manager* service. -This documentation was generated from *cloudresourcemanager* crate version *0.1.12+20160225*, where *20160225* is the exact revision of the *cloudresourcemanager:v1beta1* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.12*. +This documentation was generated from *Cloud Resource Manager* crate version *0.1.13+20160316*, where *20160316* is the exact revision of the *cloudresourcemanager:v1beta1* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.13*. -Everything else about the *cloudresourcemanager* *v1_beta1* API can be found at the +Everything else about the *Cloud Resource Manager* *v1_beta1* API can be found at the [official documentation site](https://cloud.google.com/resource-manager). # Features -Handle the following *Resources* with ease from the central [hub](http://byron.github.io/google-apis-rs/google_cloudresourcemanager1_beta1/struct.Cloudresourcemanager.html) ... +Handle the following *Resources* with ease from the central [hub](http://byron.github.io/google-apis-rs/google_cloudresourcemanager1_beta1/struct.CloudResourceManager.html) ... * [organizations](http://byron.github.io/google-apis-rs/google_cloudresourcemanager1_beta1/struct.Organization.html) * [*get*](http://byron.github.io/google-apis-rs/google_cloudresourcemanager1_beta1/struct.OrganizationGetCall.html), [*get iam policy*](http://byron.github.io/google-apis-rs/google_cloudresourcemanager1_beta1/struct.OrganizationGetIamPolicyCall.html), [*list*](http://byron.github.io/google-apis-rs/google_cloudresourcemanager1_beta1/struct.OrganizationListCall.html), [*set iam policy*](http://byron.github.io/google-apis-rs/google_cloudresourcemanager1_beta1/struct.OrganizationSetIamPolicyCall.html), [*test iam permissions*](http://byron.github.io/google-apis-rs/google_cloudresourcemanager1_beta1/struct.OrganizationTestIamPermissionCall.html) and [*update*](http://byron.github.io/google-apis-rs/google_cloudresourcemanager1_beta1/struct.OrganizationUpdateCall.html) @@ -25,7 +25,7 @@ Handle the following *Resources* with ease from the central [hub](http://byron.g The API is structured into the following primary items: -* **[Hub](http://byron.github.io/google-apis-rs/google_cloudresourcemanager1_beta1/struct.Cloudresourcemanager.html)** +* **[Hub](http://byron.github.io/google-apis-rs/google_cloudresourcemanager1_beta1/struct.CloudResourceManager.html)** * a central object to maintain state and allow accessing all *Activities* * creates [*Method Builders*](http://byron.github.io/google-apis-rs/google_cloudresourcemanager1_beta1/trait.MethodsBuilder.html) which in turn allow access to individual [*Call Builders*](http://byron.github.io/google-apis-rs/google_cloudresourcemanager1_beta1/trait.CallBuilder.html) @@ -85,7 +85,7 @@ extern crate google_cloudresourcemanager1_beta1 as cloudresourcemanager1_beta1; use cloudresourcemanager1_beta1::{Result, Error}; use std::default::Default; use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; -use cloudresourcemanager1_beta1::Cloudresourcemanager; +use cloudresourcemanager1_beta1::CloudResourceManager; // Get an ApplicationSecret instance by some means. It contains the `client_id` and // `client_secret`, among other things. @@ -98,7 +98,7 @@ let secret: ApplicationSecret = Default::default(); let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, hyper::Client::new(), ::default(), None); -let mut hub = Cloudresourcemanager::new(hyper::Client::new(), auth); +let mut hub = CloudResourceManager::new(hyper::Client::new(), auth); // You can configure optional parameters by calling the respective setters at will, and // execute the final call using `doit()`. // Values shown here are possibly random and not representative ! diff --git a/gen/cloudresourcemanager1_beta1/src/cmn.rs b/gen/cloudresourcemanager1_beta1/src/cmn.rs index 87b91a8986..c69621da55 100644 --- a/gen/cloudresourcemanager1_beta1/src/cmn.rs +++ b/gen/cloudresourcemanager1_beta1/src/cmn.rs @@ -12,7 +12,7 @@ use mime::{Mime, TopLevel, SubLevel, Attr, Value}; use oauth2::{TokenType, Retry, self}; use hyper; use hyper::header::{ContentType, ContentLength, Headers, UserAgent, Authorization, Header, - HeaderFormat}; + HeaderFormat, Bearer}; use hyper::http::h1::LINE_ENDING; use hyper::method::Method; use hyper::status::StatusCode; @@ -634,7 +634,7 @@ pub struct ResumableUploadHelper<'a, A: 'a> { pub start_at: Option, pub auth: &'a mut A, pub user_agent: &'a str, - pub auth_header: Authorization, + pub auth_header: Authorization, pub url: &'a str, pub reader: &'a mut ReadSeek, pub media_type: Mime, diff --git a/gen/cloudresourcemanager1_beta1/src/lib.rs b/gen/cloudresourcemanager1_beta1/src/lib.rs index 41645e43a0..f44a1573aa 100644 --- a/gen/cloudresourcemanager1_beta1/src/lib.rs +++ b/gen/cloudresourcemanager1_beta1/src/lib.rs @@ -2,14 +2,14 @@ // This file was generated automatically from 'src/mako/api/lib.rs.mako' // DO NOT EDIT ! -//! This documentation was generated from *cloudresourcemanager* crate version *0.1.12+20160225*, where *20160225* is the exact revision of the *cloudresourcemanager:v1beta1* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.12*. +//! This documentation was generated from *Cloud Resource Manager* crate version *0.1.13+20160316*, where *20160316* is the exact revision of the *cloudresourcemanager:v1beta1* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.13*. //! -//! Everything else about the *cloudresourcemanager* *v1_beta1* API can be found at the +//! Everything else about the *Cloud Resource Manager* *v1_beta1* API can be found at the //! [official documentation site](https://cloud.google.com/resource-manager). //! The original source code is [on github](https://github.com/Byron/google-apis-rs/tree/master/gen/cloudresourcemanager1_beta1). //! # Features //! -//! Handle the following *Resources* with ease from the central [hub](struct.Cloudresourcemanager.html) ... +//! Handle the following *Resources* with ease from the central [hub](struct.CloudResourceManager.html) ... //! //! * [organizations](struct.Organization.html) //! * [*get*](struct.OrganizationGetCall.html), [*get iam policy*](struct.OrganizationGetIamPolicyCall.html), [*list*](struct.OrganizationListCall.html), [*set iam policy*](struct.OrganizationSetIamPolicyCall.html), [*test iam permissions*](struct.OrganizationTestIamPermissionCall.html) and [*update*](struct.OrganizationUpdateCall.html) @@ -25,7 +25,7 @@ //! //! The API is structured into the following primary items: //! -//! * **[Hub](struct.Cloudresourcemanager.html)** +//! * **[Hub](struct.CloudResourceManager.html)** //! * a central object to maintain state and allow accessing all *Activities* //! * creates [*Method Builders*](trait.MethodsBuilder.html) which in turn //! allow access to individual [*Call Builders*](trait.CallBuilder.html) @@ -86,7 +86,7 @@ //! # #[test] fn egal() { //! use std::default::Default; //! use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; -//! use cloudresourcemanager1_beta1::Cloudresourcemanager; +//! use cloudresourcemanager1_beta1::CloudResourceManager; //! //! // Get an ApplicationSecret instance by some means. It contains the `client_id` and //! // `client_secret`, among other things. @@ -99,7 +99,7 @@ //! let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, //! hyper::Client::new(), //! ::default(), None); -//! let mut hub = Cloudresourcemanager::new(hyper::Client::new(), auth); +//! let mut hub = CloudResourceManager::new(hyper::Client::new(), auth); //! // You can configure optional parameters by calling the respective setters at will, and //! // execute the final call using `doit()`. //! // Values shown here are possibly random and not representative ! diff --git a/gen/cloudresourcemanager1_beta1/src/lib.rs.in b/gen/cloudresourcemanager1_beta1/src/lib.rs.in index f732a01687..7a03b17651 100644 --- a/gen/cloudresourcemanager1_beta1/src/lib.rs.in +++ b/gen/cloudresourcemanager1_beta1/src/lib.rs.in @@ -64,7 +64,7 @@ impl Default for Scope { // HUB ### // ###### -/// Central instance to access all Cloudresourcemanager related resource activities +/// Central instance to access all CloudResourceManager related resource activities /// /// # Examples /// @@ -78,7 +78,7 @@ impl Default for Scope { /// # #[test] fn egal() { /// use std::default::Default; /// use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; -/// use cloudresourcemanager1_beta1::Cloudresourcemanager; +/// use cloudresourcemanager1_beta1::CloudResourceManager; /// /// // Get an ApplicationSecret instance by some means. It contains the `client_id` and /// // `client_secret`, among other things. @@ -91,7 +91,7 @@ impl Default for Scope { /// let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, /// hyper::Client::new(), /// ::default(), None); -/// let mut hub = Cloudresourcemanager::new(hyper::Client::new(), auth); +/// let mut hub = CloudResourceManager::new(hyper::Client::new(), auth); /// // You can configure optional parameters by calling the respective setters at will, and /// // execute the final call using `doit()`. /// // Values shown here are possibly random and not representative ! @@ -119,22 +119,22 @@ impl Default for Scope { /// } /// # } /// ``` -pub struct Cloudresourcemanager { +pub struct CloudResourceManager { client: RefCell, auth: RefCell, _user_agent: String, } -impl<'a, C, A> Hub for Cloudresourcemanager {} +impl<'a, C, A> Hub for CloudResourceManager {} -impl<'a, C, A> Cloudresourcemanager +impl<'a, C, A> CloudResourceManager where C: BorrowMut, A: oauth2::GetToken { - pub fn new(client: C, authenticator: A) -> Cloudresourcemanager { - Cloudresourcemanager { + pub fn new(client: C, authenticator: A) -> CloudResourceManager { + CloudResourceManager { client: RefCell::new(client), auth: RefCell::new(authenticator), - _user_agent: "google-api-rust-client/0.1.12".to_string(), + _user_agent: "google-api-rust-client/0.1.13".to_string(), } } @@ -146,7 +146,7 @@ impl<'a, C, A> Cloudresourcemanager } /// Set the user-agent header field to use in all requests to the server. - /// It defaults to `google-api-rust-client/0.1.12`. + /// It defaults to `google-api-rust-client/0.1.13`. /// /// Returns the previously set user-agent. pub fn user_agent(&mut self, agent_name: String) -> String { @@ -460,7 +460,7 @@ impl Part for OrganizationOwner {} // ################# /// A builder providing access to all methods supported on *organization* resources. -/// It is not used directly, but through the `Cloudresourcemanager` hub. +/// It is not used directly, but through the `CloudResourceManager` hub. /// /// # Example /// @@ -474,13 +474,13 @@ impl Part for OrganizationOwner {} /// # #[test] fn egal() { /// use std::default::Default; /// use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; -/// use cloudresourcemanager1_beta1::Cloudresourcemanager; +/// use cloudresourcemanager1_beta1::CloudResourceManager; /// /// let secret: ApplicationSecret = Default::default(); /// let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, /// hyper::Client::new(), /// ::default(), None); -/// let mut hub = Cloudresourcemanager::new(hyper::Client::new(), auth); +/// let mut hub = CloudResourceManager::new(hyper::Client::new(), auth); /// // Usually you wouldn't bind this to a variable, but keep calling *CallBuilders* /// // like `get(...)`, `get_iam_policy(...)`, `list(...)`, `set_iam_policy(...)`, `test_iam_permissions(...)` and `update(...)` /// // to build up your call. @@ -490,7 +490,7 @@ impl Part for OrganizationOwner {} pub struct OrganizationMethods<'a, C, A> where C: 'a, A: 'a { - hub: &'a Cloudresourcemanager, + hub: &'a CloudResourceManager, } impl<'a, C, A> MethodsBuilder for OrganizationMethods<'a, C, A> {} @@ -609,7 +609,7 @@ impl<'a, C, A> OrganizationMethods<'a, C, A> { /// A builder providing access to all methods supported on *project* resources. -/// It is not used directly, but through the `Cloudresourcemanager` hub. +/// It is not used directly, but through the `CloudResourceManager` hub. /// /// # Example /// @@ -623,13 +623,13 @@ impl<'a, C, A> OrganizationMethods<'a, C, A> { /// # #[test] fn egal() { /// use std::default::Default; /// use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; -/// use cloudresourcemanager1_beta1::Cloudresourcemanager; +/// use cloudresourcemanager1_beta1::CloudResourceManager; /// /// let secret: ApplicationSecret = Default::default(); /// let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, /// hyper::Client::new(), /// ::default(), None); -/// let mut hub = Cloudresourcemanager::new(hyper::Client::new(), auth); +/// let mut hub = CloudResourceManager::new(hyper::Client::new(), auth); /// // Usually you wouldn't bind this to a variable, but keep calling *CallBuilders* /// // like `create(...)`, `delete(...)`, `get(...)`, `get_iam_policy(...)`, `list(...)`, `set_iam_policy(...)`, `test_iam_permissions(...)`, `undelete(...)` and `update(...)` /// // to build up your call. @@ -639,7 +639,7 @@ impl<'a, C, A> OrganizationMethods<'a, C, A> { pub struct ProjectMethods<'a, C, A> where C: 'a, A: 'a { - hub: &'a Cloudresourcemanager, + hub: &'a CloudResourceManager, } impl<'a, C, A> MethodsBuilder for ProjectMethods<'a, C, A> {} @@ -833,13 +833,13 @@ impl<'a, C, A> ProjectMethods<'a, C, A> { /// # #[test] fn egal() { /// # use std::default::Default; /// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; -/// # use cloudresourcemanager1_beta1::Cloudresourcemanager; +/// # use cloudresourcemanager1_beta1::CloudResourceManager; /// /// # let secret: ApplicationSecret = Default::default(); /// # let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, /// # hyper::Client::new(), /// # ::default(), None); -/// # let mut hub = Cloudresourcemanager::new(hyper::Client::new(), auth); +/// # let mut hub = CloudResourceManager::new(hyper::Client::new(), auth); /// // As the method needs a request, you would usually fill it with the desired information /// // into the respective structure. Some of the parts shown here might not be applicable ! /// // Values shown here are possibly random and not representative ! @@ -855,7 +855,7 @@ impl<'a, C, A> ProjectMethods<'a, C, A> { pub struct OrganizationSetIamPolicyCall<'a, C, A> where C: 'a, A: 'a { - hub: &'a Cloudresourcemanager, + hub: &'a CloudResourceManager, _request: SetIamPolicyRequest, _resource: String, _delegate: Option<&'a mut Delegate>, @@ -871,7 +871,7 @@ impl<'a, C, A> OrganizationSetIamPolicyCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, Policy)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -951,8 +951,7 @@ impl<'a, C, A> OrganizationSetIamPolicyCall<'a, C, A> where C: BorrowMut OrganizationSetIamPolicyCall<'a, C, A> where C: BorrowMut::default(), None); -/// # let mut hub = Cloudresourcemanager::new(hyper::Client::new(), auth); +/// # let mut hub = CloudResourceManager::new(hyper::Client::new(), auth); /// // As the method needs a request, you would usually fill it with the desired information /// // into the respective structure. Some of the parts shown here might not be applicable ! /// // Values shown here are possibly random and not representative ! @@ -1128,7 +1127,7 @@ impl<'a, C, A> OrganizationSetIamPolicyCall<'a, C, A> where C: BorrowMut where C: 'a, A: 'a { - hub: &'a Cloudresourcemanager, + hub: &'a CloudResourceManager, _request: GetIamPolicyRequest, _resource: String, _delegate: Option<&'a mut Delegate>, @@ -1144,7 +1143,7 @@ impl<'a, C, A> OrganizationGetIamPolicyCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, Policy)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -1224,8 +1223,7 @@ impl<'a, C, A> OrganizationGetIamPolicyCall<'a, C, A> where C: BorrowMut OrganizationGetIamPolicyCall<'a, C, A> where C: BorrowMut::default(), None); -/// # let mut hub = Cloudresourcemanager::new(hyper::Client::new(), auth); +/// # let mut hub = CloudResourceManager::new(hyper::Client::new(), auth); /// // As the method needs a request, you would usually fill it with the desired information /// // into the respective structure. Some of the parts shown here might not be applicable ! /// // Values shown here are possibly random and not representative ! @@ -1401,7 +1399,7 @@ impl<'a, C, A> OrganizationGetIamPolicyCall<'a, C, A> where C: BorrowMut where C: 'a, A: 'a { - hub: &'a Cloudresourcemanager, + hub: &'a CloudResourceManager, _request: TestIamPermissionsRequest, _resource: String, _delegate: Option<&'a mut Delegate>, @@ -1417,7 +1415,7 @@ impl<'a, C, A> OrganizationTestIamPermissionCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, TestIamPermissionsResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -1497,8 +1495,7 @@ impl<'a, C, A> OrganizationTestIamPermissionCall<'a, C, A> where C: BorrowMut OrganizationTestIamPermissionCall<'a, C, A> where C: BorrowMut::default(), None); -/// # let mut hub = Cloudresourcemanager::new(hyper::Client::new(), auth); +/// # let mut hub = CloudResourceManager::new(hyper::Client::new(), auth); /// // You can configure optional parameters by calling the respective setters at will, and /// // execute the final call using `doit()`. /// // Values shown here are possibly random and not representative ! @@ -1668,7 +1665,7 @@ impl<'a, C, A> OrganizationTestIamPermissionCall<'a, C, A> where C: BorrowMut where C: 'a, A: 'a { - hub: &'a Cloudresourcemanager, + hub: &'a CloudResourceManager, _organization_id: String, _delegate: Option<&'a mut Delegate>, _additional_params: HashMap, @@ -1683,7 +1680,7 @@ impl<'a, C, A> OrganizationGetCall<'a, C, A> where C: BorrowMut, /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Organization)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -1752,8 +1749,7 @@ impl<'a, C, A> OrganizationGetCall<'a, C, A> where C: BorrowMut, } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -1894,13 +1890,13 @@ impl<'a, C, A> OrganizationGetCall<'a, C, A> where C: BorrowMut, /// # #[test] fn egal() { /// # use std::default::Default; /// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; -/// # use cloudresourcemanager1_beta1::Cloudresourcemanager; +/// # use cloudresourcemanager1_beta1::CloudResourceManager; /// /// # let secret: ApplicationSecret = Default::default(); /// # let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, /// # hyper::Client::new(), /// # ::default(), None); -/// # let mut hub = Cloudresourcemanager::new(hyper::Client::new(), auth); +/// # let mut hub = CloudResourceManager::new(hyper::Client::new(), auth); /// // As the method needs a request, you would usually fill it with the desired information /// // into the respective structure. Some of the parts shown here might not be applicable ! /// // Values shown here are possibly random and not representative ! @@ -1916,7 +1912,7 @@ impl<'a, C, A> OrganizationGetCall<'a, C, A> where C: BorrowMut, pub struct OrganizationUpdateCall<'a, C, A> where C: 'a, A: 'a { - hub: &'a Cloudresourcemanager, + hub: &'a CloudResourceManager, _request: Organization, _organization_id: String, _delegate: Option<&'a mut Delegate>, @@ -1932,7 +1928,7 @@ impl<'a, C, A> OrganizationUpdateCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, Organization)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -2012,8 +2008,7 @@ impl<'a, C, A> OrganizationUpdateCall<'a, C, A> where C: BorrowMut OrganizationUpdateCall<'a, C, A> where C: BorrowMut::default(), None); -/// # let mut hub = Cloudresourcemanager::new(hyper::Client::new(), auth); +/// # let mut hub = CloudResourceManager::new(hyper::Client::new(), auth); /// // You can configure optional parameters by calling the respective setters at will, and /// // execute the final call using `doit()`. /// // Values shown here are possibly random and not representative ! @@ -2186,7 +2181,7 @@ impl<'a, C, A> OrganizationUpdateCall<'a, C, A> where C: BorrowMut where C: 'a, A: 'a { - hub: &'a Cloudresourcemanager, + hub: &'a CloudResourceManager, _page_token: Option, _page_size: Option, _filter: Option, @@ -2203,7 +2198,7 @@ impl<'a, C, A> OrganizationListCall<'a, C, A> where C: BorrowMut, /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, ListOrganizationsResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -2259,8 +2254,7 @@ impl<'a, C, A> OrganizationListCall<'a, C, A> where C: BorrowMut, } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -2412,13 +2406,13 @@ impl<'a, C, A> OrganizationListCall<'a, C, A> where C: BorrowMut, /// # #[test] fn egal() { /// # use std::default::Default; /// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; -/// # use cloudresourcemanager1_beta1::Cloudresourcemanager; +/// # use cloudresourcemanager1_beta1::CloudResourceManager; /// /// # let secret: ApplicationSecret = Default::default(); /// # let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, /// # hyper::Client::new(), /// # ::default(), None); -/// # let mut hub = Cloudresourcemanager::new(hyper::Client::new(), auth); +/// # let mut hub = CloudResourceManager::new(hyper::Client::new(), auth); /// // As the method needs a request, you would usually fill it with the desired information /// // into the respective structure. Some of the parts shown here might not be applicable ! /// // Values shown here are possibly random and not representative ! @@ -2434,7 +2428,7 @@ impl<'a, C, A> OrganizationListCall<'a, C, A> where C: BorrowMut, pub struct ProjectTestIamPermissionCall<'a, C, A> where C: 'a, A: 'a { - hub: &'a Cloudresourcemanager, + hub: &'a CloudResourceManager, _request: TestIamPermissionsRequest, _resource: String, _delegate: Option<&'a mut Delegate>, @@ -2450,7 +2444,7 @@ impl<'a, C, A> ProjectTestIamPermissionCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, TestIamPermissionsResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -2530,8 +2524,7 @@ impl<'a, C, A> ProjectTestIamPermissionCall<'a, C, A> where C: BorrowMut ProjectTestIamPermissionCall<'a, C, A> where C: BorrowMut::default(), None); -/// # let mut hub = Cloudresourcemanager::new(hyper::Client::new(), auth); +/// # let mut hub = CloudResourceManager::new(hyper::Client::new(), auth); /// // As the method needs a request, you would usually fill it with the desired information /// // into the respective structure. Some of the parts shown here might not be applicable ! /// // Values shown here are possibly random and not representative ! @@ -2707,7 +2700,7 @@ impl<'a, C, A> ProjectTestIamPermissionCall<'a, C, A> where C: BorrowMut where C: 'a, A: 'a { - hub: &'a Cloudresourcemanager, + hub: &'a CloudResourceManager, _request: UndeleteProjectRequest, _project_id: String, _delegate: Option<&'a mut Delegate>, @@ -2723,7 +2716,7 @@ impl<'a, C, A> ProjectUndeleteCall<'a, C, A> where C: BorrowMut, /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Empty)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -2803,8 +2796,7 @@ impl<'a, C, A> ProjectUndeleteCall<'a, C, A> where C: BorrowMut, } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -2958,13 +2950,13 @@ impl<'a, C, A> ProjectUndeleteCall<'a, C, A> where C: BorrowMut, /// # #[test] fn egal() { /// # use std::default::Default; /// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; -/// # use cloudresourcemanager1_beta1::Cloudresourcemanager; +/// # use cloudresourcemanager1_beta1::CloudResourceManager; /// /// # let secret: ApplicationSecret = Default::default(); /// # let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, /// # hyper::Client::new(), /// # ::default(), None); -/// # let mut hub = Cloudresourcemanager::new(hyper::Client::new(), auth); +/// # let mut hub = CloudResourceManager::new(hyper::Client::new(), auth); /// // As the method needs a request, you would usually fill it with the desired information /// // into the respective structure. Some of the parts shown here might not be applicable ! /// // Values shown here are possibly random and not representative ! @@ -2980,7 +2972,7 @@ impl<'a, C, A> ProjectUndeleteCall<'a, C, A> where C: BorrowMut, pub struct ProjectCreateCall<'a, C, A> where C: 'a, A: 'a { - hub: &'a Cloudresourcemanager, + hub: &'a CloudResourceManager, _request: Project, _delegate: Option<&'a mut Delegate>, _additional_params: HashMap, @@ -2995,7 +2987,7 @@ impl<'a, C, A> ProjectCreateCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Project)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -3053,8 +3045,7 @@ impl<'a, C, A> ProjectCreateCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -3198,13 +3189,13 @@ impl<'a, C, A> ProjectCreateCall<'a, C, A> where C: BorrowMut, A: /// # #[test] fn egal() { /// # use std::default::Default; /// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; -/// # use cloudresourcemanager1_beta1::Cloudresourcemanager; +/// # use cloudresourcemanager1_beta1::CloudResourceManager; /// /// # let secret: ApplicationSecret = Default::default(); /// # let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, /// # hyper::Client::new(), /// # ::default(), None); -/// # let mut hub = Cloudresourcemanager::new(hyper::Client::new(), auth); +/// # let mut hub = CloudResourceManager::new(hyper::Client::new(), auth); /// // As the method needs a request, you would usually fill it with the desired information /// // into the respective structure. Some of the parts shown here might not be applicable ! /// // Values shown here are possibly random and not representative ! @@ -3220,7 +3211,7 @@ impl<'a, C, A> ProjectCreateCall<'a, C, A> where C: BorrowMut, A: pub struct ProjectSetIamPolicyCall<'a, C, A> where C: 'a, A: 'a { - hub: &'a Cloudresourcemanager, + hub: &'a CloudResourceManager, _request: SetIamPolicyRequest, _resource: String, _delegate: Option<&'a mut Delegate>, @@ -3236,7 +3227,7 @@ impl<'a, C, A> ProjectSetIamPolicyCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, Policy)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -3316,8 +3307,7 @@ impl<'a, C, A> ProjectSetIamPolicyCall<'a, C, A> where C: BorrowMut ProjectSetIamPolicyCall<'a, C, A> where C: BorrowMut::default(), None); -/// # let mut hub = Cloudresourcemanager::new(hyper::Client::new(), auth); +/// # let mut hub = CloudResourceManager::new(hyper::Client::new(), auth); /// // You can configure optional parameters by calling the respective setters at will, and /// // execute the final call using `doit()`. /// // Values shown here are possibly random and not representative ! @@ -3487,7 +3477,7 @@ impl<'a, C, A> ProjectSetIamPolicyCall<'a, C, A> where C: BorrowMut where C: 'a, A: 'a { - hub: &'a Cloudresourcemanager, + hub: &'a CloudResourceManager, _project_id: String, _delegate: Option<&'a mut Delegate>, _additional_params: HashMap, @@ -3502,7 +3492,7 @@ impl<'a, C, A> ProjectGetCall<'a, C, A> where C: BorrowMut, A: oa /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Project)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -3571,8 +3561,7 @@ impl<'a, C, A> ProjectGetCall<'a, C, A> where C: BorrowMut, A: oa } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -3713,13 +3702,13 @@ impl<'a, C, A> ProjectGetCall<'a, C, A> where C: BorrowMut, A: oa /// # #[test] fn egal() { /// # use std::default::Default; /// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; -/// # use cloudresourcemanager1_beta1::Cloudresourcemanager; +/// # use cloudresourcemanager1_beta1::CloudResourceManager; /// /// # let secret: ApplicationSecret = Default::default(); /// # let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, /// # hyper::Client::new(), /// # ::default(), None); -/// # let mut hub = Cloudresourcemanager::new(hyper::Client::new(), auth); +/// # let mut hub = CloudResourceManager::new(hyper::Client::new(), auth); /// // As the method needs a request, you would usually fill it with the desired information /// // into the respective structure. Some of the parts shown here might not be applicable ! /// // Values shown here are possibly random and not representative ! @@ -3735,7 +3724,7 @@ impl<'a, C, A> ProjectGetCall<'a, C, A> where C: BorrowMut, A: oa pub struct ProjectUpdateCall<'a, C, A> where C: 'a, A: 'a { - hub: &'a Cloudresourcemanager, + hub: &'a CloudResourceManager, _request: Project, _project_id: String, _delegate: Option<&'a mut Delegate>, @@ -3751,7 +3740,7 @@ impl<'a, C, A> ProjectUpdateCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Project)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -3831,8 +3820,7 @@ impl<'a, C, A> ProjectUpdateCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -3986,13 +3974,13 @@ impl<'a, C, A> ProjectUpdateCall<'a, C, A> where C: BorrowMut, A: /// # #[test] fn egal() { /// # use std::default::Default; /// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; -/// # use cloudresourcemanager1_beta1::Cloudresourcemanager; +/// # use cloudresourcemanager1_beta1::CloudResourceManager; /// /// # let secret: ApplicationSecret = Default::default(); /// # let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, /// # hyper::Client::new(), /// # ::default(), None); -/// # let mut hub = Cloudresourcemanager::new(hyper::Client::new(), auth); +/// # let mut hub = CloudResourceManager::new(hyper::Client::new(), auth); /// // As the method needs a request, you would usually fill it with the desired information /// // into the respective structure. Some of the parts shown here might not be applicable ! /// // Values shown here are possibly random and not representative ! @@ -4008,7 +3996,7 @@ impl<'a, C, A> ProjectUpdateCall<'a, C, A> where C: BorrowMut, A: pub struct ProjectGetIamPolicyCall<'a, C, A> where C: 'a, A: 'a { - hub: &'a Cloudresourcemanager, + hub: &'a CloudResourceManager, _request: GetIamPolicyRequest, _resource: String, _delegate: Option<&'a mut Delegate>, @@ -4024,7 +4012,7 @@ impl<'a, C, A> ProjectGetIamPolicyCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, Policy)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -4104,8 +4092,7 @@ impl<'a, C, A> ProjectGetIamPolicyCall<'a, C, A> where C: BorrowMut ProjectGetIamPolicyCall<'a, C, A> where C: BorrowMut::default(), None); -/// # let mut hub = Cloudresourcemanager::new(hyper::Client::new(), auth); +/// # let mut hub = CloudResourceManager::new(hyper::Client::new(), auth); /// // You can configure optional parameters by calling the respective setters at will, and /// // execute the final call using `doit()`. /// // Values shown here are possibly random and not representative ! @@ -4275,7 +4262,7 @@ impl<'a, C, A> ProjectGetIamPolicyCall<'a, C, A> where C: BorrowMut where C: 'a, A: 'a { - hub: &'a Cloudresourcemanager, + hub: &'a CloudResourceManager, _project_id: String, _delegate: Option<&'a mut Delegate>, _additional_params: HashMap, @@ -4290,7 +4277,7 @@ impl<'a, C, A> ProjectDeleteCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Empty)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -4359,8 +4346,7 @@ impl<'a, C, A> ProjectDeleteCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Delete, &url) @@ -4500,13 +4486,13 @@ impl<'a, C, A> ProjectDeleteCall<'a, C, A> where C: BorrowMut, A: /// # #[test] fn egal() { /// # use std::default::Default; /// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; -/// # use cloudresourcemanager1_beta1::Cloudresourcemanager; +/// # use cloudresourcemanager1_beta1::CloudResourceManager; /// /// # let secret: ApplicationSecret = Default::default(); /// # let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, /// # hyper::Client::new(), /// # ::default(), None); -/// # let mut hub = Cloudresourcemanager::new(hyper::Client::new(), auth); +/// # let mut hub = CloudResourceManager::new(hyper::Client::new(), auth); /// // You can configure optional parameters by calling the respective setters at will, and /// // execute the final call using `doit()`. /// // Values shown here are possibly random and not representative ! @@ -4520,7 +4506,7 @@ impl<'a, C, A> ProjectDeleteCall<'a, C, A> where C: BorrowMut, A: pub struct ProjectListCall<'a, C, A> where C: 'a, A: 'a { - hub: &'a Cloudresourcemanager, + hub: &'a CloudResourceManager, _page_token: Option, _page_size: Option, _filter: Option, @@ -4537,7 +4523,7 @@ impl<'a, C, A> ProjectListCall<'a, C, A> where C: BorrowMut, A: o /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, ListProjectsResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -4593,8 +4579,7 @@ impl<'a, C, A> ProjectListCall<'a, C, A> where C: BorrowMut, A: o } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) diff --git a/gen/cloudtrace1-cli/Cargo.toml b/gen/cloudtrace1-cli/Cargo.toml index 3e741ad4ba..2af75fa42c 100644 --- a/gen/cloudtrace1-cli/Cargo.toml +++ b/gen/cloudtrace1-cli/Cargo.toml @@ -4,7 +4,7 @@ [package] name = "google-cloudtrace1-cli" -version = "0.3.3+20151207" +version = "0.3.4+20151207" authors = ["Sebastian Thiel "] description = "A complete library to interact with cloudtrace (protocol v1)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/cloudtrace1-cli" @@ -17,18 +17,18 @@ keywords = ["cloudtrace", "google", "cli"] name = "cloudtrace1" [dependencies] -hyper = "0.7" -mime = "0.1.0" -serde = ">= 0.7.0" -serde_json = ">= 0.7.0" -yup-oauth2 = ">= 0.5.4" +hyper = "0.8" +mime = "0.2.0" +serde = "0.6.0" +serde_json = "0.6.0" +yup-oauth2 = ">= 0.5.6" strsim = "0.4" yup-hyper-mock = "1.0" clap = "2.0" [build-dependencies] -syntex = { version = ">= 0.23" } -serde_codegen = { version = ">= 0.6" } +syntex = { version = "= 0.28" } +serde_codegen = { version = "= 0.6.13" } [dependencies.google-cloudtrace1] diff --git a/gen/cloudtrace1-cli/README.md b/gen/cloudtrace1-cli/README.md index 41909a91ac..8c34afff3a 100644 --- a/gen/cloudtrace1-cli/README.md +++ b/gen/cloudtrace1-cli/README.md @@ -17,14 +17,14 @@ Everything else about the *cloudtrace* API can be found at the You can download the pre-compiled 64bit binaries for the following platforms: -* ![icon](http://megaicons.net/static/img/icons_sizes/6/140/16/ubuntu-icon.png) [ubuntu](http://dl.byronimo.de/google.rs/cli/0.3.3/ubuntu/cloudtrace1.tar.gz) -* ![icon](http://hydra-media.cursecdn.com/wow.gamepedia.com/a/a2/Apple-icon-16x16.png?version=25ddd67ac3dd3b634478e3978b76cb74) [osx](http://dl.byronimo.de/google.rs/cli/0.3.3/osx/cloudtrace1.tar.gz) +* ![icon](http://megaicons.net/static/img/icons_sizes/6/140/16/ubuntu-icon.png) [ubuntu](http://dl.byronimo.de/google.rs/cli/0.3.4/ubuntu/cloudtrace1.tar.gz) +* ![icon](http://hydra-media.cursecdn.com/wow.gamepedia.com/a/a2/Apple-icon-16x16.png?version=25ddd67ac3dd3b634478e3978b76cb74) [osx](http://dl.byronimo.de/google.rs/cli/0.3.4/osx/cloudtrace1.tar.gz) Find the source code [on github](https://github.com/Byron/google-apis-rs/tree/master/gen/cloudtrace1-cli). # Usage -This documentation was generated from the *cloudtrace* API at revision *20151207*. The CLI is at version *0.3.3*. +This documentation was generated from the *cloudtrace* API at revision *20151207*. The CLI is at version *0.3.4*. ```bash cloudtrace1 [options] diff --git a/gen/cloudtrace1-cli/mkdocs.yml b/gen/cloudtrace1-cli/mkdocs.yml index 1c46848344..b118917255 100644 --- a/gen/cloudtrace1-cli/mkdocs.yml +++ b/gen/cloudtrace1-cli/mkdocs.yml @@ -1,4 +1,4 @@ -site_name: cloudtrace v0.3.3+20151207 +site_name: cloudtrace v0.3.4+20151207 site_url: http://byron.github.io/google-apis-rs/google-cloudtrace1-cli site_description: Write integrating applications with bcore diff --git a/gen/cloudtrace1-cli/src/cmn.rs b/gen/cloudtrace1-cli/src/cmn.rs index 188159ee80..ae86fdef65 100644 --- a/gen/cloudtrace1-cli/src/cmn.rs +++ b/gen/cloudtrace1-cli/src/cmn.rs @@ -414,7 +414,7 @@ impl TokenStorage for JsonTokenStorage { Err(err) => match err.kind() { io::ErrorKind::NotFound => Ok(()), - _ => Err(json::Error::Io(err)) + _ => Err(json::Error::IoError(err)) }, Ok(_) => Ok(()), } @@ -427,7 +427,7 @@ impl TokenStorage for JsonTokenStorage { Err(serde_err) => Err(serde_err), } }, - Err(io_err) => Err(json::Error::Io(io_err)) + Err(io_err) => Err(json::Error::IoError(io_err)) } } } @@ -444,7 +444,7 @@ impl TokenStorage for JsonTokenStorage { Err(io_err) => { match io_err.kind() { io::ErrorKind::NotFound => Ok(None), - _ => Err(json::Error::Io(io_err)) + _ => Err(json::Error::IoError(io_err)) } } } @@ -683,7 +683,7 @@ pub fn application_secret_from_directory(dir: &str, = json::from_str(json_console_secret).unwrap(); match json::to_writer_pretty(&mut f, &console_secret) { Err(serde_err) => match serde_err { - json::Error::Io(err) => err, + json::Error::IoError(err) => err, _ => panic!("Unexpected serde error: {:#?}", serde_err) }, Ok(_) => continue, @@ -696,7 +696,7 @@ pub fn application_secret_from_directory(dir: &str, }, Ok(f) => { match json::de::from_reader::<_, ConsoleApplicationSecret>(f) { - Err(json::Error::Io(err)) => + Err(json::Error::IoError(err)) => return secret_io_error(err), Err(json_err) => return Err(CLIError::Configuration( diff --git a/gen/cloudtrace1-cli/src/main.rs b/gen/cloudtrace1-cli/src/main.rs index ca4e163a2b..ba5eb3c2df 100644 --- a/gen/cloudtrace1-cli/src/main.rs +++ b/gen/cloudtrace1-cli/src/main.rs @@ -448,7 +448,7 @@ fn main() { let mut app = App::new("cloudtrace1") .author("Sebastian Thiel ") - .version("0.3.3+20151207") + .version("0.3.4+20151207") .about("The Cloud Trace API allows you to send traces to and retrieve traces from Google Cloud Trace.") .after_help("All documentation details can be found at http://byron.github.io/google-apis-rs/google_cloudtrace1_cli") .arg(Arg::with_name("url") diff --git a/gen/cloudtrace1/Cargo.toml b/gen/cloudtrace1/Cargo.toml index 6b9e8d4720..eaa3b98b1f 100644 --- a/gen/cloudtrace1/Cargo.toml +++ b/gen/cloudtrace1/Cargo.toml @@ -4,7 +4,7 @@ [package] name = "google-cloudtrace1" -version = "0.1.12+20151207" +version = "0.1.13+20151207" authors = ["Sebastian Thiel "] description = "A complete library to interact with cloudtrace (protocol v1)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/cloudtrace1" @@ -16,14 +16,14 @@ build = "src/build.rs" [dependencies] -hyper = "0.7" -mime = "0.1.0" -serde = ">= 0.7.0" -serde_json = ">= 0.7.0" -yup-oauth2 = ">= 0.5.4" +hyper = "0.8" +mime = "0.2.0" +serde = "0.6.0" +serde_json = "0.6.0" +yup-oauth2 = ">= 0.5.6" url = ">= 0.5" [build-dependencies] -syntex = { version = ">= 0.23" } -serde_codegen = { version = ">= 0.6" } +syntex = { version = "= 0.28" } +serde_codegen = { version = "= 0.6.13" } diff --git a/gen/cloudtrace1/README.md b/gen/cloudtrace1/README.md index 5852b9c987..45a0c5760a 100644 --- a/gen/cloudtrace1/README.md +++ b/gen/cloudtrace1/README.md @@ -5,7 +5,7 @@ DO NOT EDIT ! --> The `google-cloudtrace1` library allows access to all features of the *Google cloudtrace* service. -This documentation was generated from *cloudtrace* crate version *0.1.12+20151207*, where *20151207* is the exact revision of the *cloudtrace:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.12*. +This documentation was generated from *cloudtrace* crate version *0.1.13+20151207*, where *20151207* is the exact revision of the *cloudtrace:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.13*. Everything else about the *cloudtrace* *v1* API can be found at the [official documentation site](https://cloud.google.com/tools/cloud-trace). diff --git a/gen/cloudtrace1/src/cmn.rs b/gen/cloudtrace1/src/cmn.rs index 87b91a8986..c69621da55 100644 --- a/gen/cloudtrace1/src/cmn.rs +++ b/gen/cloudtrace1/src/cmn.rs @@ -12,7 +12,7 @@ use mime::{Mime, TopLevel, SubLevel, Attr, Value}; use oauth2::{TokenType, Retry, self}; use hyper; use hyper::header::{ContentType, ContentLength, Headers, UserAgent, Authorization, Header, - HeaderFormat}; + HeaderFormat, Bearer}; use hyper::http::h1::LINE_ENDING; use hyper::method::Method; use hyper::status::StatusCode; @@ -634,7 +634,7 @@ pub struct ResumableUploadHelper<'a, A: 'a> { pub start_at: Option, pub auth: &'a mut A, pub user_agent: &'a str, - pub auth_header: Authorization, + pub auth_header: Authorization, pub url: &'a str, pub reader: &'a mut ReadSeek, pub media_type: Mime, diff --git a/gen/cloudtrace1/src/lib.rs b/gen/cloudtrace1/src/lib.rs index 7e0fe407f7..ffaea39e2a 100644 --- a/gen/cloudtrace1/src/lib.rs +++ b/gen/cloudtrace1/src/lib.rs @@ -2,7 +2,7 @@ // This file was generated automatically from 'src/mako/api/lib.rs.mako' // DO NOT EDIT ! -//! This documentation was generated from *cloudtrace* crate version *0.1.12+20151207*, where *20151207* is the exact revision of the *cloudtrace:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.12*. +//! This documentation was generated from *cloudtrace* crate version *0.1.13+20151207*, where *20151207* is the exact revision of the *cloudtrace:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.13*. //! //! Everything else about the *cloudtrace* *v1* API can be found at the //! [official documentation site](https://cloud.google.com/tools/cloud-trace). diff --git a/gen/cloudtrace1/src/lib.rs.in b/gen/cloudtrace1/src/lib.rs.in index 82a4c331e2..ec4aa443d2 100644 --- a/gen/cloudtrace1/src/lib.rs.in +++ b/gen/cloudtrace1/src/lib.rs.in @@ -127,7 +127,7 @@ impl<'a, C, A> Cloudtrace Cloudtrace { client: RefCell::new(client), auth: RefCell::new(authenticator), - _user_agent: "google-api-rust-client/0.1.12".to_string(), + _user_agent: "google-api-rust-client/0.1.13".to_string(), } } @@ -136,7 +136,7 @@ impl<'a, C, A> Cloudtrace } /// Set the user-agent header field to use in all requests to the server. - /// It defaults to `google-api-rust-client/0.1.12`. + /// It defaults to `google-api-rust-client/0.1.13`. /// /// Returns the previously set user-agent. pub fn user_agent(&mut self, agent_name: String) -> String { @@ -420,7 +420,7 @@ impl<'a, C, A> ProjectTraceGetCall<'a, C, A> where C: BorrowMut, /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Trace)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -490,8 +490,7 @@ impl<'a, C, A> ProjectTraceGetCall<'a, C, A> where C: BorrowMut, } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -680,7 +679,7 @@ impl<'a, C, A> ProjectPatchTraceCall<'a, C, A> where C: BorrowMut /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Empty)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -760,8 +759,7 @@ impl<'a, C, A> ProjectPatchTraceCall<'a, C, A> where C: BorrowMut } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -960,7 +958,7 @@ impl<'a, C, A> ProjectTraceListCall<'a, C, A> where C: BorrowMut, /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, ListTracesResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -1050,8 +1048,7 @@ impl<'a, C, A> ProjectTraceListCall<'a, C, A> where C: BorrowMut, } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) diff --git a/gen/clouduseraccountsvm_beta-cli/Cargo.toml b/gen/clouduseraccountsvm_beta-cli/Cargo.toml index 5a4e41ebb0..171a6e3f8f 100644 --- a/gen/clouduseraccountsvm_beta-cli/Cargo.toml +++ b/gen/clouduseraccountsvm_beta-cli/Cargo.toml @@ -4,7 +4,7 @@ [package] name = "google-clouduseraccountsvm_beta-cli" -version = "0.3.3+20150924" +version = "0.3.4+20160316" authors = ["Sebastian Thiel "] description = "A complete library to interact with Cloud User Accounts (protocol vm_beta)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/clouduseraccountsvm_beta-cli" @@ -17,18 +17,18 @@ keywords = ["clouduseraccounts", "google", "cli"] name = "clouduseraccountsvm-beta" [dependencies] -hyper = "0.7" -mime = "0.1.0" -serde = ">= 0.7.0" -serde_json = ">= 0.7.0" -yup-oauth2 = ">= 0.5.4" +hyper = "0.8" +mime = "0.2.0" +serde = "0.6.0" +serde_json = "0.6.0" +yup-oauth2 = ">= 0.5.6" strsim = "0.4" yup-hyper-mock = "1.0" clap = "2.0" [build-dependencies] -syntex = { version = ">= 0.23" } -serde_codegen = { version = ">= 0.6" } +syntex = { version = "= 0.28" } +serde_codegen = { version = "= 0.6.13" } [dependencies.google-clouduseraccountsvm_beta] diff --git a/gen/clouduseraccountsvm_beta-cli/README.md b/gen/clouduseraccountsvm_beta-cli/README.md index 3c4fa0138f..a280cd351d 100644 --- a/gen/clouduseraccountsvm_beta-cli/README.md +++ b/gen/clouduseraccountsvm_beta-cli/README.md @@ -17,14 +17,14 @@ Everything else about the *Cloud User Accounts* API can be found at the You can download the pre-compiled 64bit binaries for the following platforms: -* ![icon](http://megaicons.net/static/img/icons_sizes/6/140/16/ubuntu-icon.png) [ubuntu](http://dl.byronimo.de/google.rs/cli/0.3.3/ubuntu/clouduseraccountsvm-beta.tar.gz) -* ![icon](http://hydra-media.cursecdn.com/wow.gamepedia.com/a/a2/Apple-icon-16x16.png?version=25ddd67ac3dd3b634478e3978b76cb74) [osx](http://dl.byronimo.de/google.rs/cli/0.3.3/osx/clouduseraccountsvm-beta.tar.gz) +* ![icon](http://megaicons.net/static/img/icons_sizes/6/140/16/ubuntu-icon.png) [ubuntu](http://dl.byronimo.de/google.rs/cli/0.3.4/ubuntu/clouduseraccountsvm-beta.tar.gz) +* ![icon](http://hydra-media.cursecdn.com/wow.gamepedia.com/a/a2/Apple-icon-16x16.png?version=25ddd67ac3dd3b634478e3978b76cb74) [osx](http://dl.byronimo.de/google.rs/cli/0.3.4/osx/clouduseraccountsvm-beta.tar.gz) Find the source code [on github](https://github.com/Byron/google-apis-rs/tree/master/gen/clouduseraccountsvm_beta-cli). # Usage -This documentation was generated from the *Cloud User Accounts* API at revision *20150924*. The CLI is at version *0.3.3*. +This documentation was generated from the *Cloud User Accounts* API at revision *20160316*. The CLI is at version *0.3.4*. ```bash clouduseraccountsvm-beta [options] diff --git a/gen/clouduseraccountsvm_beta-cli/mkdocs.yml b/gen/clouduseraccountsvm_beta-cli/mkdocs.yml index b235de043e..920e805f55 100644 --- a/gen/clouduseraccountsvm_beta-cli/mkdocs.yml +++ b/gen/clouduseraccountsvm_beta-cli/mkdocs.yml @@ -1,4 +1,4 @@ -site_name: Cloud User Accounts v0.3.3+20150924 +site_name: Cloud User Accounts v0.3.4+20160316 site_url: http://byron.github.io/google-apis-rs/google-clouduseraccountsvm_beta-cli site_description: Write integrating applications with bcore diff --git a/gen/clouduseraccountsvm_beta-cli/src/cmn.rs b/gen/clouduseraccountsvm_beta-cli/src/cmn.rs index 188159ee80..ae86fdef65 100644 --- a/gen/clouduseraccountsvm_beta-cli/src/cmn.rs +++ b/gen/clouduseraccountsvm_beta-cli/src/cmn.rs @@ -414,7 +414,7 @@ impl TokenStorage for JsonTokenStorage { Err(err) => match err.kind() { io::ErrorKind::NotFound => Ok(()), - _ => Err(json::Error::Io(err)) + _ => Err(json::Error::IoError(err)) }, Ok(_) => Ok(()), } @@ -427,7 +427,7 @@ impl TokenStorage for JsonTokenStorage { Err(serde_err) => Err(serde_err), } }, - Err(io_err) => Err(json::Error::Io(io_err)) + Err(io_err) => Err(json::Error::IoError(io_err)) } } } @@ -444,7 +444,7 @@ impl TokenStorage for JsonTokenStorage { Err(io_err) => { match io_err.kind() { io::ErrorKind::NotFound => Ok(None), - _ => Err(json::Error::Io(io_err)) + _ => Err(json::Error::IoError(io_err)) } } } @@ -683,7 +683,7 @@ pub fn application_secret_from_directory(dir: &str, = json::from_str(json_console_secret).unwrap(); match json::to_writer_pretty(&mut f, &console_secret) { Err(serde_err) => match serde_err { - json::Error::Io(err) => err, + json::Error::IoError(err) => err, _ => panic!("Unexpected serde error: {:#?}", serde_err) }, Ok(_) => continue, @@ -696,7 +696,7 @@ pub fn application_secret_from_directory(dir: &str, }, Ok(f) => { match json::de::from_reader::<_, ConsoleApplicationSecret>(f) { - Err(json::Error::Io(err)) => + Err(json::Error::IoError(err)) => return secret_io_error(err), Err(json_err) => return Err(CLIError::Configuration( diff --git a/gen/clouduseraccountsvm_beta-cli/src/main.rs b/gen/clouduseraccountsvm_beta-cli/src/main.rs index 4b05c3b784..e38277ceda 100644 --- a/gen/clouduseraccountsvm_beta-cli/src/main.rs +++ b/gen/clouduseraccountsvm_beta-cli/src/main.rs @@ -1839,8 +1839,8 @@ fn main() { let mut app = App::new("clouduseraccountsvm-beta") .author("Sebastian Thiel ") - .version("0.3.3+20150924") - .about("API for the Google Cloud User Accounts service.") + .version("0.3.4+20160316") + .about("Creates and manages users and groups for accessing Google Compute Engine virtual machines.") .after_help("All documentation details can be found at http://byron.github.io/google-apis-rs/google_clouduseraccountsvm_beta_cli") .arg(Arg::with_name("url") .long("scope") diff --git a/gen/clouduseraccountsvm_beta/Cargo.toml b/gen/clouduseraccountsvm_beta/Cargo.toml index deb9b16136..38c80a9e70 100644 --- a/gen/clouduseraccountsvm_beta/Cargo.toml +++ b/gen/clouduseraccountsvm_beta/Cargo.toml @@ -4,7 +4,7 @@ [package] name = "google-clouduseraccountsvm_beta" -version = "0.1.12+20150924" +version = "0.1.13+20160316" authors = ["Sebastian Thiel "] description = "A complete library to interact with Cloud User Accounts (protocol vm_beta)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/clouduseraccountsvm_beta" @@ -16,14 +16,14 @@ build = "src/build.rs" [dependencies] -hyper = "0.7" -mime = "0.1.0" -serde = ">= 0.7.0" -serde_json = ">= 0.7.0" -yup-oauth2 = ">= 0.5.4" +hyper = "0.8" +mime = "0.2.0" +serde = "0.6.0" +serde_json = "0.6.0" +yup-oauth2 = ">= 0.5.6" url = ">= 0.5" [build-dependencies] -syntex = { version = ">= 0.23" } -serde_codegen = { version = ">= 0.6" } +syntex = { version = "= 0.28" } +serde_codegen = { version = "= 0.6.13" } diff --git a/gen/clouduseraccountsvm_beta/README.md b/gen/clouduseraccountsvm_beta/README.md index 66948c1c3b..f3ad5b4d35 100644 --- a/gen/clouduseraccountsvm_beta/README.md +++ b/gen/clouduseraccountsvm_beta/README.md @@ -5,7 +5,7 @@ DO NOT EDIT ! --> The `google-clouduseraccountsvm_beta` library allows access to all features of the *Google Cloud User Accounts* service. -This documentation was generated from *Cloud User Accounts* crate version *0.1.12+20150924*, where *20150924* is the exact revision of the *clouduseraccounts:vm_beta* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.12*. +This documentation was generated from *Cloud User Accounts* crate version *0.1.13+20160316*, where *20160316* is the exact revision of the *clouduseraccounts:vm_beta* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.13*. Everything else about the *Cloud User Accounts* *vm_beta* API can be found at the [official documentation site](https://cloud.google.com/compute/docs/access/user-accounts/api/latest/). diff --git a/gen/clouduseraccountsvm_beta/src/cmn.rs b/gen/clouduseraccountsvm_beta/src/cmn.rs index 87b91a8986..c69621da55 100644 --- a/gen/clouduseraccountsvm_beta/src/cmn.rs +++ b/gen/clouduseraccountsvm_beta/src/cmn.rs @@ -12,7 +12,7 @@ use mime::{Mime, TopLevel, SubLevel, Attr, Value}; use oauth2::{TokenType, Retry, self}; use hyper; use hyper::header::{ContentType, ContentLength, Headers, UserAgent, Authorization, Header, - HeaderFormat}; + HeaderFormat, Bearer}; use hyper::http::h1::LINE_ENDING; use hyper::method::Method; use hyper::status::StatusCode; @@ -634,7 +634,7 @@ pub struct ResumableUploadHelper<'a, A: 'a> { pub start_at: Option, pub auth: &'a mut A, pub user_agent: &'a str, - pub auth_header: Authorization, + pub auth_header: Authorization, pub url: &'a str, pub reader: &'a mut ReadSeek, pub media_type: Mime, diff --git a/gen/clouduseraccountsvm_beta/src/lib.rs b/gen/clouduseraccountsvm_beta/src/lib.rs index 443162713b..41352b4e6f 100644 --- a/gen/clouduseraccountsvm_beta/src/lib.rs +++ b/gen/clouduseraccountsvm_beta/src/lib.rs @@ -2,7 +2,7 @@ // This file was generated automatically from 'src/mako/api/lib.rs.mako' // DO NOT EDIT ! -//! This documentation was generated from *Cloud User Accounts* crate version *0.1.12+20150924*, where *20150924* is the exact revision of the *clouduseraccounts:vm_beta* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.12*. +//! This documentation was generated from *Cloud User Accounts* crate version *0.1.13+20160316*, where *20160316* is the exact revision of the *clouduseraccounts:vm_beta* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.13*. //! //! Everything else about the *Cloud User Accounts* *vm_beta* API can be found at the //! [official documentation site](https://cloud.google.com/compute/docs/access/user-accounts/api/latest/). diff --git a/gen/clouduseraccountsvm_beta/src/lib.rs.in b/gen/clouduseraccountsvm_beta/src/lib.rs.in index 34728fe30b..3479619318 100644 --- a/gen/clouduseraccountsvm_beta/src/lib.rs.in +++ b/gen/clouduseraccountsvm_beta/src/lib.rs.in @@ -145,7 +145,7 @@ impl<'a, C, A> CloudUserAccounts CloudUserAccounts { client: RefCell::new(client), auth: RefCell::new(authenticator), - _user_agent: "google-api-rust-client/0.1.12".to_string(), + _user_agent: "google-api-rust-client/0.1.13".to_string(), } } @@ -163,7 +163,7 @@ impl<'a, C, A> CloudUserAccounts } /// Set the user-agent header field to use in all requests to the server. - /// It defaults to `google-api-rust-client/0.1.12`. + /// It defaults to `google-api-rust-client/0.1.13`. /// /// Returns the previously set user-agent. pub fn user_agent(&mut self, agent_name: String) -> String { @@ -241,13 +241,14 @@ pub struct GroupsAddMemberRequest { impl RequestValue for GroupsAddMemberRequest {} -/// [Output Only] Metadata for this warning in key: value format. +/// [Output Only] Metadata about this warning in key: value format. For example: +/// "data": [ { "key": "scope", "value": "zones/us-east1-d" } /// /// This type is not used in any activity, and only used as *part* of another schema. /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct OperationWarningsData { - /// [Output Only] A key for the warning data. + /// [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding). pub key: Option, /// [Output Only] A warning data value corresponding to the key. pub value: Option, @@ -306,11 +307,12 @@ impl Part for LinuxUserView {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct OperationWarnings { - /// [Output Only] Optional human-readable details for this warning. + /// [Output Only] A human-readable description of the warning code. pub message: Option, - /// [Output Only] The warning type identifier for this warning. + /// [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response. pub code: Option, - /// [Output Only] Metadata for this warning in key: value format. + /// [Output Only] Metadata about this warning in key: value format. For example: + /// "data": [ { "key": "scope", "value": "zones/us-east1-d" } pub data: Option>, } @@ -329,14 +331,14 @@ impl Part for OperationWarnings {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct OperationList { - /// [Output Only] A token used to continue a truncate. + /// [Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. #[serde(rename="nextPageToken")] pub next_page_token: Option, - /// [Output Only] The Operation resources. + /// [Output Only] A list of Operation resources. pub items: Option>, /// [Output Only] Type of resource. Always compute#operations for Operations resource. pub kind: Option, - /// [Output Only] Unique identifier for the resource; defined by the server. + /// [Output Only] The unique identifier for the resource. This identifier is defined by the server. pub id: Option, /// [Output Only] Server-defined URL for this resource. #[serde(rename="selfLink")] @@ -370,7 +372,7 @@ pub struct OperationErrorErrors { pub message: Option, /// [Output Only] The error type identifier for this error. pub code: Option, - /// [Output Only] Indicates the field in the request which caused the error. This property is optional. + /// [Output Only] Indicates the field in the request that caused the error. This property is optional. pub location: Option, } @@ -605,62 +607,64 @@ impl Part for AuthorizedKeysView {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Operation { - /// [Output Only] Status of the operation. Can be one of the following: PENDING, RUNNING, or DONE. + /// [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE. pub status: Option, - /// [Output Only] The time that this operation was requested. This is in RFC3339 text format. - #[serde(rename="insertTime")] - pub insert_time: Option, + /// [Output Only] A textual description of the operation, which is set when the operation is created. + pub description: Option, /// [Output Only] If warning messages are generated during processing of the operation, this field will be populated. pub warnings: Option>, /// [Output Only] If errors are generated during processing of the operation, this field will be populated. pub error: Option, - /// [Output Only] Unique target ID which identifies a particular incarnation of the target. + /// [Output Only] The unique target ID, which identifies a specific incarnation of the target resource. #[serde(rename="targetId")] pub target_id: Option, - /// [Output Only] URL of the resource the operation is mutating. - #[serde(rename="targetLink")] - pub target_link: Option, - /// [Output Only] The time that this operation was started by the server. This is in RFC3339 text format. + /// [Output Only] User who requested the operation, for example: user@example.com. + pub user: Option, + /// [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format. #[serde(rename="startTime")] pub start_time: Option, - /// [Output Only] An optional identifier specified by the client when the mutation was initiated. Must be unique for all Operation resources in the project. + /// [Output Only] Reserved for future use. #[serde(rename="clientOperationId")] pub client_operation_id: Option, /// [Output Only] Creation timestamp in RFC3339 text format. #[serde(rename="creationTimestamp")] pub creation_timestamp: Option, - /// [Output Only] Unique identifier for the resource; defined by the server. + /// [Output Only] The unique identifier for the resource. This identifier is defined by the server. pub id: Option, /// [Output Only] Type of the resource. Always compute#operation for Operation resources. pub kind: Option, /// [Output Only] Name of the resource. pub name: Option, - /// [Output Only] URL of the zone where the operation resides. + /// [Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations. pub zone: Option, - /// [Output Only] URL of the region where the operation resides. Only applicable for regional resources. + /// [Output Only] The URL of the region where the operation resides. Only available when performing regional operations. pub region: Option, + /// [Output Only] The type of operation, such as insert, update, or delete, and so on. + #[serde(rename="operationType")] + pub operation_type: Option, /// [Output Only] Server-defined URL for the resource. #[serde(rename="selfLink")] pub self_link: Option, - /// [Output Only] Type of the operation, such as insert, compute.instanceGroups.update, or compute.instanceGroups.delete. - #[serde(rename="operationType")] - pub operation_type: Option, + /// [Output Only] The time that this operation was requested. This value is in RFC3339 text format. + #[serde(rename="insertTime")] + pub insert_time: Option, /// [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND. #[serde(rename="httpErrorMessage")] pub http_error_message: Option, - /// [Output Only] An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess at when the operation will be complete. This number should monotonically increase as the operation progresses. + /// [Output Only] An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess when the operation will be complete. This number should monotonically increase as the operation progresses. pub progress: Option, - /// [Output Only] The time that this operation was completed. This is in RFC3339 text format. + /// [Output Only] The time that this operation was completed. This value is in RFC3339 text format. #[serde(rename="endTime")] pub end_time: Option, - /// [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as 404. + /// [Output Only] If the operation fails, this field contains the HTTP error status code that was returned. For example, a 404 means the resource was not found. #[serde(rename="httpErrorStatusCode")] pub http_error_status_code: Option, /// [Output Only] An optional textual description of the current status of the operation. #[serde(rename="statusMessage")] pub status_message: Option, - /// [Output Only] User who requested the operation, for example: user@example.com. - pub user: Option, + /// [Output Only] The URL of the resource that the operation modifies. + #[serde(rename="targetLink")] + pub target_link: Option, } impl ResponseResult for Operation {} @@ -1238,7 +1242,7 @@ impl<'a, C, A> GlobalAccountsOperationDeleteCall<'a, C, A> where C: BorrowMut Result { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -1307,8 +1311,7 @@ impl<'a, C, A> GlobalAccountsOperationDeleteCall<'a, C, A> where C: BorrowMut GlobalAccountsOperationListCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, OperationList)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -1563,8 +1566,7 @@ impl<'a, C, A> GlobalAccountsOperationListCall<'a, C, A> where C: BorrowMut GlobalAccountsOperationListCall<'a, C, A> where C: BorrowMut GlobalAccountsOperationListCall<'a, C, A> { @@ -1648,18 +1650,22 @@ impl<'a, C, A> GlobalAccountsOperationListCall<'a, C, A> where C: BorrowMut GlobalAccountsOperationListCall<'a, C, A> { self._max_results = Some(new_value); self } - /// Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: FIELD_NAME COMPARISON_STRING LITERAL_STRING. + /// Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string. /// - /// The FIELD_NAME is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The COMPARISON_STRING must be either eq (equals) or ne (not equals). The LITERAL_STRING is the string value to filter to. The literal value must be valid for the type of field (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field. + /// The field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field. /// - /// For example, filter=name ne example-instance. + /// For example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance. + /// + /// Compute Engine Beta API Only: If you use filtering in the Beta API, you can also filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. In particular, use filtering on nested fields to take advantage of instance labels to organize and filter results based on label values. + /// + /// The Beta API also supports filtering on multiple expressions by providing each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters. /// /// Sets the *filter* query property to the given value. pub fn filter(mut self, new_value: &str) -> GlobalAccountsOperationListCall<'a, C, A> { @@ -1767,7 +1773,7 @@ impl<'a, C, A> GlobalAccountsOperationGetCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, Operation)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -1837,8 +1843,7 @@ impl<'a, C, A> GlobalAccountsOperationGetCall<'a, C, A> where C: BorrowMut UserAddPublicKeyCall<'a, C, A> where C: BorrowMut, /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Operation)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -2103,8 +2108,7 @@ impl<'a, C, A> UserAddPublicKeyCall<'a, C, A> where C: BorrowMut, } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -2301,7 +2305,7 @@ impl<'a, C, A> UserListCall<'a, C, A> where C: BorrowMut, A: oaut /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, UserList)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -2382,8 +2386,7 @@ impl<'a, C, A> UserListCall<'a, C, A> where C: BorrowMut, A: oaut } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -2449,7 +2452,7 @@ impl<'a, C, A> UserListCall<'a, C, A> where C: BorrowMut, A: oaut self._project = new_value.to_string(); self } - /// Specifies a page token to use. Use this parameter if you want to list the next page of results. Set pageToken to the nextPageToken returned by a previous list request. + /// Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results. /// /// Sets the *page token* query property to the given value. pub fn page_token(mut self, new_value: &str) -> UserListCall<'a, C, A> { @@ -2467,18 +2470,22 @@ impl<'a, C, A> UserListCall<'a, C, A> where C: BorrowMut, A: oaut self._order_by = Some(new_value.to_string()); self } - /// Maximum count of results to be returned. + /// The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. /// /// Sets the *max results* query property to the given value. pub fn max_results(mut self, new_value: u32) -> UserListCall<'a, C, A> { self._max_results = Some(new_value); self } - /// Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: FIELD_NAME COMPARISON_STRING LITERAL_STRING. + /// Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string. /// - /// The FIELD_NAME is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The COMPARISON_STRING must be either eq (equals) or ne (not equals). The LITERAL_STRING is the string value to filter to. The literal value must be valid for the type of field (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field. + /// The field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field. /// - /// For example, filter=name ne example-instance. + /// For example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance. + /// + /// Compute Engine Beta API Only: If you use filtering in the Beta API, you can also filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. In particular, use filtering on nested fields to take advantage of instance labels to organize and filter results based on label values. + /// + /// The Beta API also supports filtering on multiple expressions by providing each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters. /// /// Sets the *filter* query property to the given value. pub fn filter(mut self, new_value: &str) -> UserListCall<'a, C, A> { @@ -2592,7 +2599,7 @@ impl<'a, C, A> UserInsertCall<'a, C, A> where C: BorrowMut, A: oa /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Operation)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -2672,8 +2679,7 @@ impl<'a, C, A> UserInsertCall<'a, C, A> where C: BorrowMut, A: oa } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -2853,7 +2859,7 @@ impl<'a, C, A> UserGetCall<'a, C, A> where C: BorrowMut, A: oauth /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, User)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -2923,8 +2929,7 @@ impl<'a, C, A> UserGetCall<'a, C, A> where C: BorrowMut, A: oauth } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -3102,7 +3107,7 @@ impl<'a, C, A> UserRemovePublicKeyCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, Operation)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -3173,8 +3178,7 @@ impl<'a, C, A> UserRemovePublicKeyCall<'a, C, A> where C: BorrowMut UserDeleteCall<'a, C, A> where C: BorrowMut, A: oa /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Operation)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -3431,8 +3435,7 @@ impl<'a, C, A> UserDeleteCall<'a, C, A> where C: BorrowMut, A: oa } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Delete, &url) @@ -3609,7 +3612,7 @@ impl<'a, C, A> GroupDeleteCall<'a, C, A> where C: BorrowMut, A: o /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Operation)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -3679,8 +3682,7 @@ impl<'a, C, A> GroupDeleteCall<'a, C, A> where C: BorrowMut, A: o } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Delete, &url) @@ -3857,7 +3859,7 @@ impl<'a, C, A> GroupGetCall<'a, C, A> where C: BorrowMut, A: oaut /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Group)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -3927,8 +3929,7 @@ impl<'a, C, A> GroupGetCall<'a, C, A> where C: BorrowMut, A: oaut } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -4112,7 +4113,7 @@ impl<'a, C, A> GroupAddMemberCall<'a, C, A> where C: BorrowMut, A /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Operation)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -4193,8 +4194,7 @@ impl<'a, C, A> GroupAddMemberCall<'a, C, A> where C: BorrowMut, A } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -4390,7 +4390,7 @@ impl<'a, C, A> GroupInsertCall<'a, C, A> where C: BorrowMut, A: o /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Operation)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -4470,8 +4470,7 @@ impl<'a, C, A> GroupInsertCall<'a, C, A> where C: BorrowMut, A: o } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -4658,7 +4657,7 @@ impl<'a, C, A> GroupListCall<'a, C, A> where C: BorrowMut, A: oau /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, GroupList)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -4739,8 +4738,7 @@ impl<'a, C, A> GroupListCall<'a, C, A> where C: BorrowMut, A: oau } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -4806,7 +4804,7 @@ impl<'a, C, A> GroupListCall<'a, C, A> where C: BorrowMut, A: oau self._project = new_value.to_string(); self } - /// Specifies a page token to use. Use this parameter if you want to list the next page of results. Set pageToken to the nextPageToken returned by a previous list request. + /// Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results. /// /// Sets the *page token* query property to the given value. pub fn page_token(mut self, new_value: &str) -> GroupListCall<'a, C, A> { @@ -4824,18 +4822,22 @@ impl<'a, C, A> GroupListCall<'a, C, A> where C: BorrowMut, A: oau self._order_by = Some(new_value.to_string()); self } - /// Maximum count of results to be returned. + /// The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. /// /// Sets the *max results* query property to the given value. pub fn max_results(mut self, new_value: u32) -> GroupListCall<'a, C, A> { self._max_results = Some(new_value); self } - /// Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: FIELD_NAME COMPARISON_STRING LITERAL_STRING. + /// Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string. /// - /// The FIELD_NAME is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The COMPARISON_STRING must be either eq (equals) or ne (not equals). The LITERAL_STRING is the string value to filter to. The literal value must be valid for the type of field (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field. + /// The field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field. /// - /// For example, filter=name ne example-instance. + /// For example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance. + /// + /// Compute Engine Beta API Only: If you use filtering in the Beta API, you can also filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. In particular, use filtering on nested fields to take advantage of instance labels to organize and filter results based on label values. + /// + /// The Beta API also supports filtering on multiple expressions by providing each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters. /// /// Sets the *filter* query property to the given value. pub fn filter(mut self, new_value: &str) -> GroupListCall<'a, C, A> { @@ -4950,7 +4952,7 @@ impl<'a, C, A> GroupRemoveMemberCall<'a, C, A> where C: BorrowMut /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Operation)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -5031,8 +5033,7 @@ impl<'a, C, A> GroupRemoveMemberCall<'a, C, A> where C: BorrowMut } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -5231,7 +5232,7 @@ impl<'a, C, A> LinuxGetLinuxAccountViewCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, LinuxGetLinuxAccountViewsResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -5314,8 +5315,7 @@ impl<'a, C, A> LinuxGetLinuxAccountViewCall<'a, C, A> where C: BorrowMut LinuxGetLinuxAccountViewCall<'a, C, A> where C: BorrowMut LinuxGetLinuxAccountViewCall<'a, C, A> { @@ -5419,18 +5419,22 @@ impl<'a, C, A> LinuxGetLinuxAccountViewCall<'a, C, A> where C: BorrowMut LinuxGetLinuxAccountViewCall<'a, C, A> { self._max_results = Some(new_value); self } - /// Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: FIELD_NAME COMPARISON_STRING LITERAL_STRING. + /// Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string. /// - /// The FIELD_NAME is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The COMPARISON_STRING must be either eq (equals) or ne (not equals). The LITERAL_STRING is the string value to filter to. The literal value must be valid for the type of field (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field. + /// The field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field. /// - /// For example, filter=name ne example-instance. + /// For example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance. + /// + /// Compute Engine Beta API Only: If you use filtering in the Beta API, you can also filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. In particular, use filtering on nested fields to take advantage of instance labels to organize and filter results based on label values. + /// + /// The Beta API also supports filtering on multiple expressions by providing each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters. /// /// Sets the *filter* query property to the given value. pub fn filter(mut self, new_value: &str) -> LinuxGetLinuxAccountViewCall<'a, C, A> { @@ -5542,7 +5546,7 @@ impl<'a, C, A> LinuxGetAuthorizedKeysViewCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, LinuxGetAuthorizedKeysViewResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -5617,8 +5621,7 @@ impl<'a, C, A> LinuxGetAuthorizedKeysViewCall<'a, C, A> where C: BorrowMut"] description = "A complete library to interact with compute (protocol v1)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/compute1-cli" @@ -17,18 +17,18 @@ keywords = ["compute", "google", "cli"] name = "compute1" [dependencies] -hyper = "0.7" -mime = "0.1.0" -serde = ">= 0.7.0" -serde_json = ">= 0.7.0" -yup-oauth2 = ">= 0.5.4" +hyper = "0.8" +mime = "0.2.0" +serde = "0.6.0" +serde_json = "0.6.0" +yup-oauth2 = ">= 0.5.6" strsim = "0.4" yup-hyper-mock = "1.0" clap = "2.0" [build-dependencies] -syntex = { version = ">= 0.23" } -serde_codegen = { version = ">= 0.6" } +syntex = { version = "= 0.28" } +serde_codegen = { version = "= 0.6.13" } [dependencies.google-compute1] diff --git a/gen/compute1-cli/README.md b/gen/compute1-cli/README.md index e45beebb9b..516a40e270 100644 --- a/gen/compute1-cli/README.md +++ b/gen/compute1-cli/README.md @@ -17,14 +17,14 @@ Everything else about the *compute* API can be found at the You can download the pre-compiled 64bit binaries for the following platforms: -* ![icon](http://megaicons.net/static/img/icons_sizes/6/140/16/ubuntu-icon.png) [ubuntu](http://dl.byronimo.de/google.rs/cli/0.3.3/ubuntu/compute1.tar.gz) -* ![icon](http://hydra-media.cursecdn.com/wow.gamepedia.com/a/a2/Apple-icon-16x16.png?version=25ddd67ac3dd3b634478e3978b76cb74) [osx](http://dl.byronimo.de/google.rs/cli/0.3.3/osx/compute1.tar.gz) +* ![icon](http://megaicons.net/static/img/icons_sizes/6/140/16/ubuntu-icon.png) [ubuntu](http://dl.byronimo.de/google.rs/cli/0.3.4/ubuntu/compute1.tar.gz) +* ![icon](http://hydra-media.cursecdn.com/wow.gamepedia.com/a/a2/Apple-icon-16x16.png?version=25ddd67ac3dd3b634478e3978b76cb74) [osx](http://dl.byronimo.de/google.rs/cli/0.3.4/osx/compute1.tar.gz) Find the source code [on github](https://github.com/Byron/google-apis-rs/tree/master/gen/compute1-cli). # Usage -This documentation was generated from the *compute* API at revision *20160224*. The CLI is at version *0.3.3*. +This documentation was generated from the *compute* API at revision *20160328*. The CLI is at version *0.3.4*. ```bash compute1 [options] @@ -61,6 +61,7 @@ compute1 [options] get [-p ]... [-o ] insert (-r )... [-p ]... [-o ] list [-p ]... [-o ] + resize (-r )... [-p ]... [-o ] firewalls delete [-p ]... [-o ] get [-p ]... [-o ] diff --git a/gen/compute1-cli/mkdocs.yml b/gen/compute1-cli/mkdocs.yml index bcf8718172..b974383528 100644 --- a/gen/compute1-cli/mkdocs.yml +++ b/gen/compute1-cli/mkdocs.yml @@ -1,4 +1,4 @@ -site_name: compute v0.3.3+20160224 +site_name: compute v0.3.4+20160328 site_url: http://byron.github.io/google-apis-rs/google-compute1-cli site_description: Write integrating applications with bcore @@ -37,6 +37,7 @@ pages: - ['disks_get.md', 'Disks', 'Get'] - ['disks_insert.md', 'Disks', 'Insert'] - ['disks_list.md', 'Disks', 'List'] +- ['disks_resize.md', 'Disks', 'Resize'] - ['firewalls_delete.md', 'Firewalls', 'Delete'] - ['firewalls_get.md', 'Firewalls', 'Get'] - ['firewalls_insert.md', 'Firewalls', 'Insert'] diff --git a/gen/compute1-cli/src/cmn.rs b/gen/compute1-cli/src/cmn.rs index 188159ee80..ae86fdef65 100644 --- a/gen/compute1-cli/src/cmn.rs +++ b/gen/compute1-cli/src/cmn.rs @@ -414,7 +414,7 @@ impl TokenStorage for JsonTokenStorage { Err(err) => match err.kind() { io::ErrorKind::NotFound => Ok(()), - _ => Err(json::Error::Io(err)) + _ => Err(json::Error::IoError(err)) }, Ok(_) => Ok(()), } @@ -427,7 +427,7 @@ impl TokenStorage for JsonTokenStorage { Err(serde_err) => Err(serde_err), } }, - Err(io_err) => Err(json::Error::Io(io_err)) + Err(io_err) => Err(json::Error::IoError(io_err)) } } } @@ -444,7 +444,7 @@ impl TokenStorage for JsonTokenStorage { Err(io_err) => { match io_err.kind() { io::ErrorKind::NotFound => Ok(None), - _ => Err(json::Error::Io(io_err)) + _ => Err(json::Error::IoError(io_err)) } } } @@ -683,7 +683,7 @@ pub fn application_secret_from_directory(dir: &str, = json::from_str(json_console_secret).unwrap(); match json::to_writer_pretty(&mut f, &console_secret) { Err(serde_err) => match serde_err { - json::Error::Io(err) => err, + json::Error::IoError(err) => err, _ => panic!("Unexpected serde error: {:#?}", serde_err) }, Ok(_) => continue, @@ -696,7 +696,7 @@ pub fn application_secret_from_directory(dir: &str, }, Ok(f) => { match json::de::from_reader::<_, ConsoleApplicationSecret>(f) { - Err(json::Error::Io(err)) => + Err(json::Error::IoError(err)) => return secret_io_error(err), Err(json_err) => return Err(CLIError::Configuration( diff --git a/gen/compute1-cli/src/main.rs b/gen/compute1-cli/src/main.rs index f0e8adaadf..cb56db0b9a 100644 --- a/gen/compute1-cli/src/main.rs +++ b/gen/compute1-cli/src/main.rs @@ -1106,6 +1106,7 @@ impl<'n> Engine<'n> { "protocol" => Some(("protocol", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "description" => Some(("description", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "timeout-sec" => Some(("timeoutSec", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), + "region" => Some(("region", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "port" => Some(("port", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), "fingerprint" => Some(("fingerprint", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "port-name" => Some(("portName", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), @@ -1115,7 +1116,7 @@ impl<'n> Engine<'n> { "self-link" => Some(("selfLink", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "name" => Some(("name", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), _ => { - let suggestion = FieldCursor::did_you_mean(key, &vec!["creation-timestamp", "description", "fingerprint", "health-checks", "id", "kind", "name", "port", "port-name", "protocol", "self-link", "timeout-sec"]); + let suggestion = FieldCursor::did_you_mean(key, &vec!["creation-timestamp", "description", "fingerprint", "health-checks", "id", "kind", "name", "port", "port-name", "protocol", "region", "self-link", "timeout-sec"]); err.issues.push(CLIError::Field(FieldError::Unknown(temp_cursor.to_string(), suggestion, value.map(|v| v.to_string())))); None } @@ -1264,6 +1265,7 @@ impl<'n> Engine<'n> { "protocol" => Some(("protocol", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "description" => Some(("description", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "timeout-sec" => Some(("timeoutSec", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), + "region" => Some(("region", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "port" => Some(("port", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), "fingerprint" => Some(("fingerprint", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "port-name" => Some(("portName", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), @@ -1273,7 +1275,7 @@ impl<'n> Engine<'n> { "self-link" => Some(("selfLink", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "name" => Some(("name", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), _ => { - let suggestion = FieldCursor::did_you_mean(key, &vec!["creation-timestamp", "description", "fingerprint", "health-checks", "id", "kind", "name", "port", "port-name", "protocol", "self-link", "timeout-sec"]); + let suggestion = FieldCursor::did_you_mean(key, &vec!["creation-timestamp", "description", "fingerprint", "health-checks", "id", "kind", "name", "port", "port-name", "protocol", "region", "self-link", "timeout-sec"]); err.issues.push(CLIError::Field(FieldError::Unknown(temp_cursor.to_string(), suggestion, value.map(|v| v.to_string())))); None } @@ -1360,6 +1362,7 @@ impl<'n> Engine<'n> { "protocol" => Some(("protocol", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "description" => Some(("description", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "timeout-sec" => Some(("timeoutSec", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), + "region" => Some(("region", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "port" => Some(("port", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), "fingerprint" => Some(("fingerprint", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "port-name" => Some(("portName", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), @@ -1369,7 +1372,7 @@ impl<'n> Engine<'n> { "self-link" => Some(("selfLink", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "name" => Some(("name", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), _ => { - let suggestion = FieldCursor::did_you_mean(key, &vec!["creation-timestamp", "description", "fingerprint", "health-checks", "id", "kind", "name", "port", "port-name", "protocol", "self-link", "timeout-sec"]); + let suggestion = FieldCursor::did_you_mean(key, &vec!["creation-timestamp", "description", "fingerprint", "health-checks", "id", "kind", "name", "port", "port-name", "protocol", "region", "self-link", "timeout-sec"]); err.issues.push(CLIError::Field(FieldError::Unknown(temp_cursor.to_string(), suggestion, value.map(|v| v.to_string())))); None } @@ -2037,6 +2040,91 @@ impl<'n> Engine<'n> { } } + fn _disks_resize(&self, opt: &ArgMatches<'n>, dry_run: bool, err: &mut InvalidOptionsError) + -> Result<(), DoitError> { + + let mut field_cursor = FieldCursor::default(); + let mut object = json::value::Value::Object(Default::default()); + + for kvarg in opt.values_of("kv").map(|i|i.collect()).unwrap_or(Vec::new()).iter() { + let last_errc = err.issues.len(); + let (key, value) = parse_kv_arg(&*kvarg, err, false); + let mut temp_cursor = field_cursor.clone(); + if let Err(field_err) = temp_cursor.set(&*key) { + err.issues.push(field_err); + } + if value.is_none() { + field_cursor = temp_cursor.clone(); + if err.issues.len() > last_errc { + err.issues.remove(last_errc); + } + continue; + } + + let type_info: Option<(&'static str, JsonTypeInfo)> = + match &temp_cursor.to_string()[..] { + "size-gb" => Some(("sizeGb", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + _ => { + let suggestion = FieldCursor::did_you_mean(key, &vec!["size-gb"]); + err.issues.push(CLIError::Field(FieldError::Unknown(temp_cursor.to_string(), suggestion, value.map(|v| v.to_string())))); + None + } + }; + if let Some((field_cursor_str, type_info)) = type_info { + FieldCursor::from(field_cursor_str).set_json_value(&mut object, value.unwrap(), type_info, err, &temp_cursor); + } + } + let mut request: api::DisksResizeRequest = json::value::from_value(object).unwrap(); + let mut call = self.hub.disks().resize(request, opt.value_of("project").unwrap_or(""), opt.value_of("zone").unwrap_or(""), opt.value_of("disk").unwrap_or("")); + for parg in opt.values_of("v").map(|i|i.collect()).unwrap_or(Vec::new()).iter() { + let (key, value) = parse_kv_arg(&*parg, err, false); + match key { + _ => { + let mut found = false; + for param in &self.gp { + if key == *param { + found = true; + call = call.param(self.gpm.iter().find(|t| t.0 == key).unwrap_or(&("", key)).1, value.unwrap_or("unset")); + break; + } + } + if !found { + err.issues.push(CLIError::UnknownParameter(key.to_string(), + {let mut v = Vec::new(); + v.extend(self.gp.iter().map(|v|*v)); + v } )); + } + } + } + } + let protocol = CallType::Standard; + if dry_run { + Ok(()) + } else { + assert!(err.issues.len() == 0); + for scope in self.opt.values_of("url").map(|i|i.collect()).unwrap_or(Vec::new()).iter() { + call = call.add_scope(scope); + } + let mut ostream = match writer_from_opts(opt.value_of("out")) { + Ok(mut f) => f, + Err(io_err) => return Err(DoitError::IoError(opt.value_of("out").unwrap_or("-").to_string(), io_err)), + }; + match match protocol { + CallType::Standard => call.doit(), + _ => unreachable!() + } { + Err(api_err) => Err(DoitError::ApiError(api_err)), + Ok((mut response, output_schema)) => { + let mut value = json::value::to_value(&output_schema); + remove_json_null_values(&mut value); + json::to_writer_pretty(&mut ostream, &value).unwrap(); + ostream.flush().unwrap(); + Ok(()) + } + } + } + } + fn _firewalls_delete(&self, opt: &ArgMatches<'n>, dry_run: bool, err: &mut InvalidOptionsError) -> Result<(), DoitError> { let mut call = self.hub.firewalls().delete(opt.value_of("project").unwrap_or(""), opt.value_of("firewall").unwrap_or("")); @@ -13694,6 +13782,9 @@ impl<'n> Engine<'n> { ("list", Some(opt)) => { call_result = self._disks_list(opt, dry_run, &mut err); }, + ("resize", Some(opt)) => { + call_result = self._disks_resize(opt, dry_run, &mut err); + }, _ => { err.issues.push(CLIError::MissingMethodError("disks".to_string())); writeln!(io::stderr(), "{}\n", opt.usage()).ok(); @@ -15216,7 +15307,7 @@ fn main() { ]), ]), - ("disks", "methods: 'aggregated-list', 'create-snapshot', 'delete', 'get', 'insert' and 'list'", vec![ + ("disks", "methods: 'aggregated-list', 'create-snapshot', 'delete', 'get', 'insert', 'list' and 'resize'", vec![ ("aggregated-list", Some(r##"Retrieves an aggregated list of persistent disks."##), "Details at http://byron.github.io/google-apis-rs/google_compute1_cli/disks_aggregated-list", @@ -15348,7 +15439,7 @@ fn main() { Some(false)), ]), ("insert", - Some(r##"Creates a persistent disk in the specified project using the data in the request. You can create a disk with a sourceImage, a sourceSnapshot, or create an empty 200 GB data disk by omitting all properties. You can also create a disk that is larger than the default size by specifying the sizeGb property."##), + Some(r##"Creates a persistent disk in the specified project using the data in the request. You can create a disk with a sourceImage, a sourceSnapshot, or create an empty 500 GB data disk by omitting all properties. You can also create a disk that is larger than the default size by specifying the sizeGb property."##), "Details at http://byron.github.io/google-apis-rs/google_compute1_cli/disks_insert", vec![ (Some(r##"project"##), @@ -15403,6 +15494,46 @@ fn main() { Some(false), Some(true)), + (Some(r##"out"##), + Some(r##"o"##), + Some(r##"Specify the file into which to write the program's output"##), + Some(false), + Some(false)), + ]), + ("resize", + Some(r##"Resizes the specified persistent disk."##), + "Details at http://byron.github.io/google-apis-rs/google_compute1_cli/disks_resize", + vec![ + (Some(r##"project"##), + None, + Some(r##"Project ID for this request."##), + Some(true), + Some(false)), + + (Some(r##"zone"##), + None, + Some(r##"The name of the zone for this request."##), + Some(true), + Some(false)), + + (Some(r##"disk"##), + None, + Some(r##"The name of the persistent disk."##), + Some(true), + Some(false)), + + (Some(r##"kv"##), + Some(r##"r"##), + Some(r##"Set various fields of the request structure, matching the key=value form"##), + Some(true), + Some(true)), + + (Some(r##"v"##), + Some(r##"p"##), + Some(r##"Set various optional parameters, matching the key=value form"##), + Some(false), + Some(true)), + (Some(r##"out"##), Some(r##"o"##), Some(r##"Specify the file into which to write the program's output"##), @@ -20662,7 +20793,7 @@ fn main() { let mut app = App::new("compute1") .author("Sebastian Thiel ") - .version("0.3.3+20160224") + .version("0.3.4+20160328") .about("API for the Google Compute Engine service.") .after_help("All documentation details can be found at http://byron.github.io/google-apis-rs/google_compute1_cli") .arg(Arg::with_name("url") diff --git a/gen/compute1/Cargo.toml b/gen/compute1/Cargo.toml index 1ab127aaa9..dc81facf1e 100644 --- a/gen/compute1/Cargo.toml +++ b/gen/compute1/Cargo.toml @@ -4,7 +4,7 @@ [package] name = "google-compute1" -version = "0.1.12+20160224" +version = "0.1.13+20160328" authors = ["Sebastian Thiel "] description = "A complete library to interact with compute (protocol v1)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/compute1" @@ -16,14 +16,14 @@ build = "src/build.rs" [dependencies] -hyper = "0.7" -mime = "0.1.0" -serde = ">= 0.7.0" -serde_json = ">= 0.7.0" -yup-oauth2 = ">= 0.5.4" +hyper = "0.8" +mime = "0.2.0" +serde = "0.6.0" +serde_json = "0.6.0" +yup-oauth2 = ">= 0.5.6" url = ">= 0.5" [build-dependencies] -syntex = { version = ">= 0.23" } -serde_codegen = { version = ">= 0.6" } +syntex = { version = "= 0.28" } +serde_codegen = { version = "= 0.6.13" } diff --git a/gen/compute1/README.md b/gen/compute1/README.md index efab10afcb..6a0b9e32b7 100644 --- a/gen/compute1/README.md +++ b/gen/compute1/README.md @@ -5,7 +5,7 @@ DO NOT EDIT ! --> The `google-compute1` library allows access to all features of the *Google compute* service. -This documentation was generated from *compute* crate version *0.1.12+20160224*, where *20160224* is the exact revision of the *compute:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.12*. +This documentation was generated from *compute* crate version *0.1.13+20160328*, where *20160328* is the exact revision of the *compute:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.13*. Everything else about the *compute* *v1* API can be found at the [official documentation site](https://developers.google.com/compute/docs/reference/latest/). @@ -22,7 +22,7 @@ Handle the following *Resources* with ease from the central [hub](http://byron.g * [disk types](http://byron.github.io/google-apis-rs/google_compute1/struct.DiskType.html) * [*aggregated list*](http://byron.github.io/google-apis-rs/google_compute1/struct.DiskTypeAggregatedListCall.html), [*get*](http://byron.github.io/google-apis-rs/google_compute1/struct.DiskTypeGetCall.html) and [*list*](http://byron.github.io/google-apis-rs/google_compute1/struct.DiskTypeListCall.html) * [disks](http://byron.github.io/google-apis-rs/google_compute1/struct.Disk.html) - * [*aggregated list*](http://byron.github.io/google-apis-rs/google_compute1/struct.DiskAggregatedListCall.html), [*create snapshot*](http://byron.github.io/google-apis-rs/google_compute1/struct.DiskCreateSnapshotCall.html), [*delete*](http://byron.github.io/google-apis-rs/google_compute1/struct.DiskDeleteCall.html), [*get*](http://byron.github.io/google-apis-rs/google_compute1/struct.DiskGetCall.html), [*insert*](http://byron.github.io/google-apis-rs/google_compute1/struct.DiskInsertCall.html) and [*list*](http://byron.github.io/google-apis-rs/google_compute1/struct.DiskListCall.html) + * [*aggregated list*](http://byron.github.io/google-apis-rs/google_compute1/struct.DiskAggregatedListCall.html), [*create snapshot*](http://byron.github.io/google-apis-rs/google_compute1/struct.DiskCreateSnapshotCall.html), [*delete*](http://byron.github.io/google-apis-rs/google_compute1/struct.DiskDeleteCall.html), [*get*](http://byron.github.io/google-apis-rs/google_compute1/struct.DiskGetCall.html), [*insert*](http://byron.github.io/google-apis-rs/google_compute1/struct.DiskInsertCall.html), [*list*](http://byron.github.io/google-apis-rs/google_compute1/struct.DiskListCall.html) and [*resize*](http://byron.github.io/google-apis-rs/google_compute1/struct.DiskResizeCall.html) * [firewalls](http://byron.github.io/google-apis-rs/google_compute1/struct.Firewall.html) * [*delete*](http://byron.github.io/google-apis-rs/google_compute1/struct.FirewallDeleteCall.html), [*get*](http://byron.github.io/google-apis-rs/google_compute1/struct.FirewallGetCall.html), [*insert*](http://byron.github.io/google-apis-rs/google_compute1/struct.FirewallInsertCall.html), [*list*](http://byron.github.io/google-apis-rs/google_compute1/struct.FirewallListCall.html), [*patch*](http://byron.github.io/google-apis-rs/google_compute1/struct.FirewallPatchCall.html) and [*update*](http://byron.github.io/google-apis-rs/google_compute1/struct.FirewallUpdateCall.html) * [forwarding rules](http://byron.github.io/google-apis-rs/google_compute1/struct.ForwardingRule.html) @@ -142,6 +142,7 @@ let r = hub.instance_groups().insert(...).doit() let r = hub.instances().set_tags(...).doit() let r = hub.instance_group_managers().delete_instances(...).doit() let r = hub.instance_group_managers().set_instance_template(...).doit() +let r = hub.disks().resize(...).doit() let r = hub.target_pools().insert(...).doit() let r = hub.instances().set_disk_auto_delete(...).doit() let r = hub.instance_group_managers().set_target_pools(...).doit() diff --git a/gen/compute1/src/cmn.rs b/gen/compute1/src/cmn.rs index 87b91a8986..c69621da55 100644 --- a/gen/compute1/src/cmn.rs +++ b/gen/compute1/src/cmn.rs @@ -12,7 +12,7 @@ use mime::{Mime, TopLevel, SubLevel, Attr, Value}; use oauth2::{TokenType, Retry, self}; use hyper; use hyper::header::{ContentType, ContentLength, Headers, UserAgent, Authorization, Header, - HeaderFormat}; + HeaderFormat, Bearer}; use hyper::http::h1::LINE_ENDING; use hyper::method::Method; use hyper::status::StatusCode; @@ -634,7 +634,7 @@ pub struct ResumableUploadHelper<'a, A: 'a> { pub start_at: Option, pub auth: &'a mut A, pub user_agent: &'a str, - pub auth_header: Authorization, + pub auth_header: Authorization, pub url: &'a str, pub reader: &'a mut ReadSeek, pub media_type: Mime, diff --git a/gen/compute1/src/lib.rs b/gen/compute1/src/lib.rs index e88821e35a..425306a543 100644 --- a/gen/compute1/src/lib.rs +++ b/gen/compute1/src/lib.rs @@ -2,7 +2,7 @@ // This file was generated automatically from 'src/mako/api/lib.rs.mako' // DO NOT EDIT ! -//! This documentation was generated from *compute* crate version *0.1.12+20160224*, where *20160224* is the exact revision of the *compute:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.12*. +//! This documentation was generated from *compute* crate version *0.1.13+20160328*, where *20160328* is the exact revision of the *compute:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.13*. //! //! Everything else about the *compute* *v1* API can be found at the //! [official documentation site](https://developers.google.com/compute/docs/reference/latest/). @@ -20,7 +20,7 @@ //! * [disk types](struct.DiskType.html) //! * [*aggregated list*](struct.DiskTypeAggregatedListCall.html), [*get*](struct.DiskTypeGetCall.html) and [*list*](struct.DiskTypeListCall.html) //! * [disks](struct.Disk.html) -//! * [*aggregated list*](struct.DiskAggregatedListCall.html), [*create snapshot*](struct.DiskCreateSnapshotCall.html), [*delete*](struct.DiskDeleteCall.html), [*get*](struct.DiskGetCall.html), [*insert*](struct.DiskInsertCall.html) and [*list*](struct.DiskListCall.html) +//! * [*aggregated list*](struct.DiskAggregatedListCall.html), [*create snapshot*](struct.DiskCreateSnapshotCall.html), [*delete*](struct.DiskDeleteCall.html), [*get*](struct.DiskGetCall.html), [*insert*](struct.DiskInsertCall.html), [*list*](struct.DiskListCall.html) and [*resize*](struct.DiskResizeCall.html) //! * [firewalls](struct.Firewall.html) //! * [*delete*](struct.FirewallDeleteCall.html), [*get*](struct.FirewallGetCall.html), [*insert*](struct.FirewallInsertCall.html), [*list*](struct.FirewallListCall.html), [*patch*](struct.FirewallPatchCall.html) and [*update*](struct.FirewallUpdateCall.html) //! * [forwarding rules](struct.ForwardingRule.html) @@ -142,6 +142,7 @@ //! let r = hub.instances().set_tags(...).doit() //! let r = hub.instance_group_managers().delete_instances(...).doit() //! let r = hub.instance_group_managers().set_instance_template(...).doit() +//! let r = hub.disks().resize(...).doit() //! let r = hub.target_pools().insert(...).doit() //! let r = hub.instances().set_disk_auto_delete(...).doit() //! let r = hub.instance_group_managers().set_target_pools(...).doit() @@ -267,7 +268,7 @@ //! // You can configure optional parameters by calling the respective setters at will, and //! // execute the final call using `doit()`. //! // Values shown here are possibly random and not representative ! -//! let result = hub.instances().set_disk_auto_delete("project", "zone", "instance", true, "deviceName") +//! let result = hub.instances().set_disk_auto_delete("project", "zone", "instance", false, "deviceName") //! .doit(); //! //! match result { diff --git a/gen/compute1/src/lib.rs.in b/gen/compute1/src/lib.rs.in index 24b5f8b42c..c008514e89 100644 --- a/gen/compute1/src/lib.rs.in +++ b/gen/compute1/src/lib.rs.in @@ -147,7 +147,7 @@ impl<'a, C, A> Compute Compute { client: RefCell::new(client), auth: RefCell::new(authenticator), - _user_agent: "google-api-rust-client/0.1.12".to_string(), + _user_agent: "google-api-rust-client/0.1.13".to_string(), } } @@ -261,7 +261,7 @@ impl<'a, C, A> Compute } /// Set the user-agent header field to use in all requests to the server. - /// It defaults to `google-api-rust-client/0.1.12`. + /// It defaults to `google-api-rust-client/0.1.13`. /// /// Returns the previously set user-agent. pub fn user_agent(&mut self, agent_name: String) -> String { @@ -291,6 +291,25 @@ pub struct VpnTunnelsScopedList { impl Part for VpnTunnelsScopedList {} +/// There is no detailed description. +/// +/// # Activities +/// +/// This type is used in activities, which are methods you may call on this type or where this type is involved in. +/// The list links the activity name, along with information about where it is used (one of *request* and *response*). +/// +/// * [resize disks](struct.DiskResizeCall.html) (request) +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct DisksResizeRequest { + /// The new size of the persistent disk, which is specified in GB. + #[serde(rename="sizeGb")] + pub size_gb: Option, +} + +impl RequestValue for DisksResizeRequest {} + + /// [Output Only] Metadata about this warning in key: value format. For example: /// "data": [ { "key": "scope", "value": "zones/us-east1-d" } /// @@ -1395,6 +1414,7 @@ impl ResponseResult for RouteList {} /// /// * [insert disks](struct.DiskInsertCall.html) (request) /// * [delete disks](struct.DiskDeleteCall.html) (none) +/// * [resize disks](struct.DiskResizeCall.html) (none) /// * [get disks](struct.DiskGetCall.html) (response) /// * [create snapshot disks](struct.DiskCreateSnapshotCall.html) (none) /// * [aggregated list disks](struct.DiskAggregatedListCall.html) (none) @@ -1420,25 +1440,23 @@ pub struct Disk { pub source_image_id: Option, /// [Output Only] Any applicable publicly visible licenses. pub licenses: Option>, - /// The source image used to create this disk. If the source image is deleted from the system, this field will not be set, even if an image with the same name has been re-created. + /// The source image used to create this disk. If the source image is deleted, this field will not be set. /// - /// When creating a disk, you can provide a private (custom) image using the following input, and Compute Engine will use the corresponding image from your project. For example: + /// To create a disk with one of the public operating system images, specify the image by its family name. For example, specify family/debian-8 to use the latest Debian 8 image: + /// + /// projects/debian-cloud/global/images/family/debian-8 + /// + /// Alternatively, use a specific version of a public operating system image: + /// + /// projects/debian-cloud/global/images/debian-8-jessie-vYYYYMMDD + /// + /// To create a disk with a private image that you created, specify the image name in the following format: /// /// global/images/my-private-image /// - /// Or you can provide an image from a publicly-available project. For example, to use a Debian image from the debian-cloud project, make sure to include the project in the URL: + /// You can also specify a private image by its image family, which returns the latest version of the image in that family. Replace the image name with family/family-name: /// - /// projects/debian-cloud/global/images/debian-7-wheezy-vYYYYMMDD - /// - /// where vYYYYMMDD is the image version. The fully-qualified URL will also work in both cases. - /// - /// You can also specify the latest image for a private image family by replacing the image name suffix with family/family-name. For example: - /// - /// global/images/family/my-private-family - /// - /// Or you can specify an image family from a publicly-available project. For example, to use the latest Debian 7 from the debian-cloud project, make sure to include the project in the URL: - /// - /// projects/debian-cloud/global/images/family/debian-7 + /// global/images/family/my-private-family #[serde(rename="sourceImage")] pub source_image: Option, /// [Output Only] The unique ID of the snapshot used to create this disk. This value identifies the exact snapshot that was used to create this persistent disk. For example, if you created the persistent disk from a snapshot that was later deleted and recreated under the same name, the source snapshot ID would identify the exact version of the snapshot that was used. @@ -1538,61 +1556,19 @@ impl RequestValue for TargetHttpsProxy {} impl ResponseResult for TargetHttpsProxy {} -/// There is no detailed description. +/// The named port. For example: . /// -/// # Activities -/// -/// This type is used in activities, which are methods you may call on this type or where this type is involved in. -/// The list links the activity name, along with information about where it is used (one of *request* and *response*). -/// -/// * [list instances instance groups](struct.InstanceGroupListInstanceCall.html) (none) -/// * [insert instance groups](struct.InstanceGroupInsertCall.html) (request) -/// * [delete instance groups](struct.InstanceGroupDeleteCall.html) (none) -/// * [get instance groups](struct.InstanceGroupGetCall.html) (response) -/// * [add instances instance groups](struct.InstanceGroupAddInstanceCall.html) (none) -/// * [set named ports instance groups](struct.InstanceGroupSetNamedPortCall.html) (none) -/// * [list instance groups](struct.InstanceGroupListCall.html) (none) -/// * [aggregated list instance groups](struct.InstanceGroupAggregatedListCall.html) (none) -/// * [remove instances instance groups](struct.InstanceGroupRemoveInstanceCall.html) (none) +/// This type is not used in any activity, and only used as *part* of another schema. /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] -pub struct InstanceGroup { - /// [Output Only] The resource type, which is always compute#instanceGroup for instance groups. - pub kind: Option, - /// The URL of the network to which all instances in the instance group belong. - pub network: Option, - /// [Output Only] The URL of the zone where the instance group is located. - pub zone: Option, - /// An optional description of this resource. Provide this property when you create the resource. - pub description: Option, - /// The name of the instance group. The name must be 1-63 characters long, and comply with RFC1035. +pub struct NamedPort { + /// The name for this named port. The name must be 1-63 characters long, and comply with RFC1035. pub name: Option, - /// [Output Only] The fingerprint of the named ports. The system uses this fingerprint to detect conflicts when multiple users change the named ports concurrently. - pub fingerprint: Option, - /// The URL of the subnetwork to which all instances in the instance group belong. - pub subnetwork: Option, - /// Assigns a name to a port number. For example: {name: "http", port: 80} - /// - /// This allows the system to reference ports by the assigned name instead of a port number. Named ports can also contain multiple ports. For example: [{name: "http", port: 80},{name: "http", port: 8080}] - /// - /// Named ports apply to all instances in this instance group. - #[serde(rename="namedPorts")] - pub named_ports: Option>, - /// [Output Only] The creation timestamp for this instance group in RFC3339 text format. - #[serde(rename="creationTimestamp")] - pub creation_timestamp: Option, - /// [Output Only] A unique identifier for this resource type. The server generates this identifier. - pub id: Option, - /// [Output Only] The URL for this instance group. The server generates this URL. - #[serde(rename="selfLink")] - pub self_link: Option, - /// [Output Only] The total number of instances in the instance group. - pub size: Option, + /// The port number, which can be a value between 1 and 65535. + pub port: Option, } -impl RequestValue for InstanceGroup {} -impl Resource for InstanceGroup {} -impl ResponseResult for InstanceGroup {} +impl Part for NamedPort {} /// Represents a Network resource. Read Networks and Firewalls for more information. @@ -1661,9 +1637,6 @@ pub struct Zone { pub kind: Option, /// [Output Only] Textual description of the resource. pub description: Option, - /// [Output Only] Any scheduled maintenance windows for this zone. When the zone is in a maintenance window, all resources which reside in the zone will be unavailable. For more information, see Maintenance Windows - #[serde(rename="maintenanceWindows")] - pub maintenance_windows: Option>, /// [Output Only] The deprecation status associated with this zone. pub deprecated: Option, /// [Output Only] Full URL reference to the region which hosts the zone. @@ -2113,28 +2086,6 @@ pub struct InstanceGroupManagerAggregatedList { impl ResponseResult for InstanceGroupManagerAggregatedList {} -/// [Output Only] Any scheduled maintenance windows for this zone. When the zone is in a maintenance window, all resources which reside in the zone will be unavailable. For more information, see Maintenance Windows -/// -/// This type is not used in any activity, and only used as *part* of another schema. -/// -#[derive(Default, Clone, Debug, Serialize, Deserialize)] -pub struct ZoneMaintenanceWindows { - /// [Output Only] Ending time of the maintenance window, in RFC3339 format. - #[serde(rename="endTime")] - pub end_time: Option, - /// [Output Only] Textual description of the maintenance window. - pub description: Option, - /// [Output Only] Starting time of the maintenance window, in RFC3339 format. - #[serde(rename="beginTime")] - pub begin_time: Option, - /// [Output Only] Name of the maintenance window. - pub name: Option, -} - -impl NestedType for ZoneMaintenanceWindows {} -impl Part for ZoneMaintenanceWindows {} - - /// Contains a list of instances. /// /// # Activities @@ -2747,6 +2698,7 @@ impl ResponseResult for Subnetwork {} /// * [set tags instances](struct.InstanceSetTagCall.html) (response) /// * [delete instances instance group managers](struct.InstanceGroupManagerDeleteInstanceCall.html) (response) /// * [set instance template instance group managers](struct.InstanceGroupManagerSetInstanceTemplateCall.html) (response) +/// * [resize disks](struct.DiskResizeCall.html) (response) /// * [insert target pools](struct.TargetPoolInsertCall.html) (response) /// * [set disk auto delete instances](struct.InstanceSetDiskAutoDeleteCall.html) (response) /// * [set target pools instance group managers](struct.InstanceGroupManagerSetTargetPoolCall.html) (response) @@ -2854,7 +2806,7 @@ pub struct Operation { pub creation_timestamp: Option, /// [Output Only] The unique identifier for the resource. This identifier is defined by the server. pub id: Option, - /// [Output Only] Type of the resource. Always compute#operation for operation resources. + /// [Output Only] Type of the resource. Always compute#operation for Operation resources. pub kind: Option, /// [Output Only] Name of the resource. pub name: Option, @@ -3888,6 +3840,8 @@ pub struct BackendService { /// How many seconds to wait for the backend before considering it a failed request. Default is 30 seconds. #[serde(rename="timeoutSec")] pub timeout_sec: Option, + /// [Output Only] URL of the region where the regional backend service resides. This field is not applicable to global backend services. + pub region: Option, /// [Output Only] The unique identifier for the resource. This identifier is defined by the server. pub id: Option, /// The list of backends that serve this BackendService. @@ -4160,19 +4114,61 @@ pub struct OperationList { impl ResponseResult for OperationList {} -/// The named port. For example: . +/// There is no detailed description. /// -/// This type is not used in any activity, and only used as *part* of another schema. +/// # Activities +/// +/// This type is used in activities, which are methods you may call on this type or where this type is involved in. +/// The list links the activity name, along with information about where it is used (one of *request* and *response*). +/// +/// * [list instances instance groups](struct.InstanceGroupListInstanceCall.html) (none) +/// * [insert instance groups](struct.InstanceGroupInsertCall.html) (request) +/// * [delete instance groups](struct.InstanceGroupDeleteCall.html) (none) +/// * [get instance groups](struct.InstanceGroupGetCall.html) (response) +/// * [add instances instance groups](struct.InstanceGroupAddInstanceCall.html) (none) +/// * [set named ports instance groups](struct.InstanceGroupSetNamedPortCall.html) (none) +/// * [list instance groups](struct.InstanceGroupListCall.html) (none) +/// * [aggregated list instance groups](struct.InstanceGroupAggregatedListCall.html) (none) +/// * [remove instances instance groups](struct.InstanceGroupRemoveInstanceCall.html) (none) /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] -pub struct NamedPort { - /// The name for this named port. The name must be 1-63 characters long, and comply with RFC1035. +pub struct InstanceGroup { + /// [Output Only] The resource type, which is always compute#instanceGroup for instance groups. + pub kind: Option, + /// The URL of the network to which all instances in the instance group belong. + pub network: Option, + /// [Output Only] The URL of the zone where the instance group is located. + pub zone: Option, + /// An optional description of this resource. Provide this property when you create the resource. + pub description: Option, + /// The name of the instance group. The name must be 1-63 characters long, and comply with RFC1035. pub name: Option, - /// The port number, which can be a value between 1 and 65535. - pub port: Option, + /// [Output Only] The fingerprint of the named ports. The system uses this fingerprint to detect conflicts when multiple users change the named ports concurrently. + pub fingerprint: Option, + /// The URL of the subnetwork to which all instances in the instance group belong. + pub subnetwork: Option, + /// Assigns a name to a port number. For example: {name: "http", port: 80} + /// + /// This allows the system to reference ports by the assigned name instead of a port number. Named ports can also contain multiple ports. For example: [{name: "http", port: 80},{name: "http", port: 8080}] + /// + /// Named ports apply to all instances in this instance group. + #[serde(rename="namedPorts")] + pub named_ports: Option>, + /// [Output Only] The creation timestamp for this instance group in RFC3339 text format. + #[serde(rename="creationTimestamp")] + pub creation_timestamp: Option, + /// [Output Only] A unique identifier for this resource type. The server generates this identifier. + pub id: Option, + /// [Output Only] The URL for this instance group. The server generates this URL. + #[serde(rename="selfLink")] + pub self_link: Option, + /// [Output Only] The total number of instances in the instance group. + pub size: Option, } -impl Part for NamedPort {} +impl RequestValue for InstanceGroup {} +impl Resource for InstanceGroup {} +impl ResponseResult for InstanceGroup {} /// A TargetInstance resource. This resource defines an endpoint instance that terminates traffic of certain protocols. @@ -4808,15 +4804,17 @@ pub struct AttachedDiskInitializeParams { /// Specifies the disk name. If not specified, the default is to use the name of the instance. #[serde(rename="diskName")] pub disk_name: Option, - /// A source image used to create the disk. You can provide a private (custom) image, and Compute Engine will use the corresponding image from your project. For example: + /// The source image used to create this disk. + /// + /// To create a disk with a private image, specify the image name in the following format: /// /// global/images/my-private-image /// - /// Or you can provide an image from a publicly-available project. For example, to use a Debian image from the debian-cloud project, make sure to include the project in the URL: + /// To create a disk with a public image, specify the image name and the project that owns the image. For example, you can use a Debian image from the debian-cloud project: /// - /// projects/debian-cloud/global/images/debian-7-wheezy-vYYYYMMDD + /// projects/debian-cloud/global/images/debian-8-jessie-vYYYYMMDD /// - /// where vYYYYMMDD is the image version. The fully-qualified URL will also work in both cases. + /// The vYYYYMMDD value is the image version. The fully-qualified URL also works in both examples. #[serde(rename="sourceImage")] pub source_image: Option, /// Specifies the disk type to use to create the instance. If not specified, the default is pd-standard, specified using the full URL. For example: @@ -5656,7 +5654,7 @@ impl Part for InstanceGroupManagersScopedList {} /// ::default(), None); /// let mut hub = Compute::new(hyper::Client::new(), auth); /// // Usually you wouldn't bind this to a variable, but keep calling *CallBuilders* -/// // like `aggregated_list(...)`, `create_snapshot(...)`, `delete(...)`, `get(...)`, `insert(...)` and `list(...)` +/// // like `aggregated_list(...)`, `create_snapshot(...)`, `delete(...)`, `get(...)`, `insert(...)`, `list(...)` and `resize(...)` /// // to build up your call. /// let rb = hub.disks(); /// # } @@ -5733,6 +5731,29 @@ impl<'a, C, A> DiskMethods<'a, C, A> { } } + /// Create a builder to help you perform the following task: + /// + /// Resizes the specified persistent disk. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `project` - Project ID for this request. + /// * `zone` - The name of the zone for this request. + /// * `disk` - The name of the persistent disk. + pub fn resize(&self, request: DisksResizeRequest, project: &str, zone: &str, disk: &str) -> DiskResizeCall<'a, C, A> { + DiskResizeCall { + hub: self.hub, + _request: request, + _project: project.to_string(), + _zone: zone.to_string(), + _disk: disk.to_string(), + _delegate: Default::default(), + _scopes: Default::default(), + _additional_params: Default::default(), + } + } + /// Create a builder to help you perform the following task: /// /// Retrieves a list of persistent disks contained within the specified zone. @@ -5757,7 +5778,7 @@ impl<'a, C, A> DiskMethods<'a, C, A> { /// Create a builder to help you perform the following task: /// - /// Creates a persistent disk in the specified project using the data in the request. You can create a disk with a sourceImage, a sourceSnapshot, or create an empty 200 GB data disk by omitting all properties. You can also create a disk that is larger than the default size by specifying the sizeGb property. + /// Creates a persistent disk in the specified project using the data in the request. You can create a disk with a sourceImage, a sourceSnapshot, or create an empty 500 GB data disk by omitting all properties. You can also create a disk that is larger than the default size by specifying the sizeGb property. /// /// # Arguments /// @@ -11229,7 +11250,7 @@ impl<'a, C, A> DiskDeleteCall<'a, C, A> where C: BorrowMut, A: oa /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Operation)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -11300,8 +11321,7 @@ impl<'a, C, A> DiskDeleteCall<'a, C, A> where C: BorrowMut, A: oa } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Delete, &url) @@ -11493,7 +11513,7 @@ impl<'a, C, A> DiskAggregatedListCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, DiskAggregatedList)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -11571,8 +11591,7 @@ impl<'a, C, A> DiskAggregatedListCall<'a, C, A> where C: BorrowMut DiskGetCall<'a, C, A> where C: BorrowMut, A: oauth /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Disk)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -11840,8 +11859,7 @@ impl<'a, C, A> DiskGetCall<'a, C, A> where C: BorrowMut, A: oauth } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -11979,6 +11997,296 @@ impl<'a, C, A> DiskGetCall<'a, C, A> where C: BorrowMut, A: oauth } +/// Resizes the specified persistent disk. +/// +/// A builder for the *resize* method supported by a *disk* resource. +/// It is not used directly, but through a `DiskMethods` instance. +/// +/// # Example +/// +/// Instantiate a resource method builder +/// +/// ```test_harness,no_run +/// # extern crate hyper; +/// # extern crate yup_oauth2 as oauth2; +/// # extern crate google_compute1 as compute1; +/// use compute1::DisksResizeRequest; +/// # #[test] fn egal() { +/// # use std::default::Default; +/// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; +/// # use compute1::Compute; +/// +/// # let secret: ApplicationSecret = Default::default(); +/// # let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, +/// # hyper::Client::new(), +/// # ::default(), None); +/// # let mut hub = Compute::new(hyper::Client::new(), auth); +/// // As the method needs a request, you would usually fill it with the desired information +/// // into the respective structure. Some of the parts shown here might not be applicable ! +/// // Values shown here are possibly random and not representative ! +/// let mut req = DisksResizeRequest::default(); +/// +/// // You can configure optional parameters by calling the respective setters at will, and +/// // execute the final call using `doit()`. +/// // Values shown here are possibly random and not representative ! +/// let result = hub.disks().resize(req, "project", "zone", "disk") +/// .doit(); +/// # } +/// ``` +pub struct DiskResizeCall<'a, C, A> + where C: 'a, A: 'a { + + hub: &'a Compute, + _request: DisksResizeRequest, + _project: String, + _zone: String, + _disk: String, + _delegate: Option<&'a mut Delegate>, + _additional_params: HashMap, + _scopes: BTreeMap +} + +impl<'a, C, A> CallBuilder for DiskResizeCall<'a, C, A> {} + +impl<'a, C, A> DiskResizeCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { + + + /// Perform the operation you have build so far. + pub fn doit(mut self) -> Result<(hyper::client::Response, Operation)> { + use std::io::{Read, Seek}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; + let mut dd = DefaultDelegate; + let mut dlg: &mut Delegate = match self._delegate { + Some(d) => d, + None => &mut dd + }; + dlg.begin(MethodInfo { id: "compute.disks.resize", + http_method: hyper::method::Method::Post }); + let mut params: Vec<(&str, String)> = Vec::with_capacity((6 + self._additional_params.len())); + params.push(("project", self._project.to_string())); + params.push(("zone", self._zone.to_string())); + params.push(("disk", self._disk.to_string())); + for &field in ["alt", "project", "zone", "disk"].iter() { + if self._additional_params.contains_key(field) { + dlg.finished(false); + return Err(Error::FieldClash(field)); + } + } + for (name, value) in self._additional_params.iter() { + params.push((&name, value.clone())); + } + + params.push(("alt", "json".to_string())); + + let mut url = "https://www.googleapis.com/compute/v1/projects/{project}/zones/{zone}/disks/{disk}/resize".to_string(); + if self._scopes.len() == 0 { + self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); + } + + for &(find_this, param_name) in [("{project}", "project"), ("{zone}", "zone"), ("{disk}", "disk")].iter() { + let mut replace_with: Option<&str> = None; + for &(name, ref value) in params.iter() { + if name == param_name { + replace_with = Some(value); + break; + } + } + url = url.replace(find_this, replace_with.expect("to find substitution value in params")); + } + { + let mut indices_for_removal: Vec = Vec::with_capacity(3); + for param_name in ["disk", "zone", "project"].iter() { + if let Some(index) = params.iter().position(|t| &t.0 == param_name) { + indices_for_removal.push(index); + } + } + for &index in indices_for_removal.iter() { + params.remove(index); + } + } + + if params.len() > 0 { + url.push('?'); + url.push_str(&url::form_urlencoded::serialize(params)); + } + + let mut json_mime_type = mime::Mime(mime::TopLevel::Application, mime::SubLevel::Json, Default::default()); + let mut request_value_reader = + { + let mut value = json::value::to_value(&self._request); + remove_json_null_values(&mut value); + let mut dst = io::Cursor::new(Vec::with_capacity(128)); + json::to_writer(&mut dst, &value).unwrap(); + dst + }; + let request_size = request_value_reader.seek(io::SeekFrom::End(0)).unwrap(); + request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); + + + loop { + let token = match self.hub.auth.borrow_mut().token(self._scopes.keys()) { + Ok(token) => token, + Err(err) => { + match dlg.token(&*err) { + Some(token) => token, + None => { + dlg.finished(false); + return Err(Error::MissingToken(err)) + } + } + } + }; + let auth_header = Authorization(Bearer { token: token.access_token }); + request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); + let mut req_result = { + let mut client = &mut *self.hub.client.borrow_mut(); + let mut req = client.borrow_mut().request(hyper::method::Method::Post, &url) + .header(UserAgent(self.hub._user_agent.clone())) + .header(auth_header.clone()) + .header(ContentType(json_mime_type.clone())) + .header(ContentLength(request_size as u64)) + .body(&mut request_value_reader); + + dlg.pre_request(); + req.send() + }; + + match req_result { + Err(err) => { + if let oauth2::Retry::After(d) = dlg.http_error(&err) { + sleep(d); + continue; + } + dlg.finished(false); + return Err(Error::HttpError(err)) + } + Ok(mut res) => { + if !res.status.is_success() { + let mut json_err = String::new(); + res.read_to_string(&mut json_err).unwrap(); + if let oauth2::Retry::After(d) = dlg.http_failure(&res, + json::from_str(&json_err).ok(), + json::from_str(&json_err).ok()) { + sleep(d); + continue; + } + dlg.finished(false); + return match json::from_str::(&json_err){ + Err(_) => Err(Error::Failure(res)), + Ok(serr) => Err(Error::BadRequest(serr)) + } + } + let result_value = { + let mut json_response = String::new(); + res.read_to_string(&mut json_response).unwrap(); + match json::from_str(&json_response) { + Ok(decoded) => (res, decoded), + Err(err) => { + dlg.response_json_decode_error(&json_response, &err); + return Err(Error::JsonDecodeError(json_response, err)); + } + } + }; + + dlg.finished(true); + return Ok(result_value) + } + } + } + } + + + /// + /// Sets the *request* property to the given value. + /// + /// Even though the property as already been set when instantiating this call, + /// we provide this method for API completeness. + pub fn request(mut self, new_value: DisksResizeRequest) -> DiskResizeCall<'a, C, A> { + self._request = new_value; + self + } + /// Project ID for this request. + /// + /// Sets the *project* path property to the given value. + /// + /// Even though the property as already been set when instantiating this call, + /// we provide this method for API completeness. + pub fn project(mut self, new_value: &str) -> DiskResizeCall<'a, C, A> { + self._project = new_value.to_string(); + self + } + /// The name of the zone for this request. + /// + /// Sets the *zone* path property to the given value. + /// + /// Even though the property as already been set when instantiating this call, + /// we provide this method for API completeness. + pub fn zone(mut self, new_value: &str) -> DiskResizeCall<'a, C, A> { + self._zone = new_value.to_string(); + self + } + /// The name of the persistent disk. + /// + /// Sets the *disk* path property to the given value. + /// + /// Even though the property as already been set when instantiating this call, + /// we provide this method for API completeness. + pub fn disk(mut self, new_value: &str) -> DiskResizeCall<'a, C, A> { + self._disk = new_value.to_string(); + self + } + /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong + /// while executing the actual API request. + /// + /// It should be used to handle progress information, and to implement a certain level of resilience. + /// + /// Sets the *delegate* property to the given value. + pub fn delegate(mut self, new_value: &'a mut Delegate) -> DiskResizeCall<'a, C, A> { + self._delegate = Some(new_value); + self + } + + /// Set any additional parameter of the query string used in the request. + /// It should be used to set parameters which are not yet available through their own + /// setters. + /// + /// Please note that this method must not be used to set any of the known paramters + /// which have their own setter method. If done anyway, the request will fail. + /// + /// # Additional Parameters + /// + /// * *quotaUser* (query-string) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. Overrides userIp if both are provided. + /// * *oauth_token* (query-string) - OAuth 2.0 token for the current user. + /// * *key* (query-string) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. + /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. + /// * *userIp* (query-string) - IP address of the site where the request originates. Use this if you want to enforce per-user limits. + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *alt* (query-string) - Data format for the response. + pub fn param(mut self, name: T, value: T) -> DiskResizeCall<'a, C, A> + where T: AsRef { + self._additional_params.insert(name.as_ref().to_string(), value.as_ref().to_string()); + self + } + + /// Identifies the authorization scope for the method you are building. + /// + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::CloudPlatform`. + /// + /// The `scope` will be added to a set of scopes. This is important as one can maintain access + /// tokens for more than one scope. + /// + /// Usually there is more than one suitable scope to authorize an operation, some of which may + /// encompass more rights than others. For example, for listing resources, a *read-only* scope will be + /// sufficient, a read-write scope will do as well. + pub fn add_scope(mut self, scope: T) -> DiskResizeCall<'a, C, A> + where T: AsRef { + self._scopes.insert(scope.as_ref().to_string(), ()); + self + } +} + + /// Retrieves a list of persistent disks contained within the specified zone. /// /// A builder for the *list* method supported by a *disk* resource. @@ -12006,9 +12314,9 @@ impl<'a, C, A> DiskGetCall<'a, C, A> where C: BorrowMut, A: oauth /// // execute the final call using `doit()`. /// // Values shown here are possibly random and not representative ! /// let result = hub.disks().list("project", "zone") -/// .page_token("justo") -/// .max_results(67) -/// .filter("et") +/// .page_token("diam") +/// .max_results(46) +/// .filter("Lorem") /// .doit(); /// # } /// ``` @@ -12034,7 +12342,7 @@ impl<'a, C, A> DiskListCall<'a, C, A> where C: BorrowMut, A: oaut /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, DiskList)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -12113,8 +12421,7 @@ impl<'a, C, A> DiskListCall<'a, C, A> where C: BorrowMut, A: oaut } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -12271,7 +12578,7 @@ impl<'a, C, A> DiskListCall<'a, C, A> where C: BorrowMut, A: oaut } -/// Creates a persistent disk in the specified project using the data in the request. You can create a disk with a sourceImage, a sourceSnapshot, or create an empty 200 GB data disk by omitting all properties. You can also create a disk that is larger than the default size by specifying the sizeGb property. +/// Creates a persistent disk in the specified project using the data in the request. You can create a disk with a sourceImage, a sourceSnapshot, or create an empty 500 GB data disk by omitting all properties. You can also create a disk that is larger than the default size by specifying the sizeGb property. /// /// A builder for the *insert* method supported by a *disk* resource. /// It is not used directly, but through a `DiskMethods` instance. @@ -12304,7 +12611,7 @@ impl<'a, C, A> DiskListCall<'a, C, A> where C: BorrowMut, A: oaut /// // execute the final call using `doit()`. /// // Values shown here are possibly random and not representative ! /// let result = hub.disks().insert(req, "project", "zone") -/// .source_image("Lorem") +/// .source_image("aliquyam") /// .doit(); /// # } /// ``` @@ -12329,7 +12636,7 @@ impl<'a, C, A> DiskInsertCall<'a, C, A> where C: BorrowMut, A: oa /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Operation)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -12413,8 +12720,7 @@ impl<'a, C, A> DiskInsertCall<'a, C, A> where C: BorrowMut, A: oa } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -12619,7 +12925,7 @@ impl<'a, C, A> DiskCreateSnapshotCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, Operation)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -12701,8 +13007,7 @@ impl<'a, C, A> DiskCreateSnapshotCall<'a, C, A> where C: BorrowMut DiskCreateSnapshotCall<'a, C, A> where C: BorrowMut AddresseListCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, AddressList)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -12987,8 +13292,7 @@ impl<'a, C, A> AddresseListCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -13172,9 +13476,9 @@ impl<'a, C, A> AddresseListCall<'a, C, A> where C: BorrowMut, A: /// // execute the final call using `doit()`. /// // Values shown here are possibly random and not representative ! /// let result = hub.addresses().aggregated_list("project") -/// .page_token("eirmod") -/// .max_results(58) -/// .filter("amet") +/// .page_token("no") +/// .max_results(65) +/// .filter("eirmod") /// .doit(); /// # } /// ``` @@ -13199,7 +13503,7 @@ impl<'a, C, A> AddresseAggregatedListCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, AddressAggregatedList)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -13277,8 +13581,7 @@ impl<'a, C, A> AddresseAggregatedListCall<'a, C, A> where C: BorrowMut AddresseGetCall<'a, C, A> where C: BorrowMut, A: o /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Address)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -13546,8 +13849,7 @@ impl<'a, C, A> AddresseGetCall<'a, C, A> where C: BorrowMut, A: o } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -13741,7 +14043,7 @@ impl<'a, C, A> AddresseInsertCall<'a, C, A> where C: BorrowMut, A /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Operation)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -13822,8 +14124,7 @@ impl<'a, C, A> AddresseInsertCall<'a, C, A> where C: BorrowMut, A } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -14014,7 +14315,7 @@ impl<'a, C, A> AddresseDeleteCall<'a, C, A> where C: BorrowMut, A /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Operation)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -14085,8 +14386,7 @@ impl<'a, C, A> AddresseDeleteCall<'a, C, A> where C: BorrowMut, A } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Delete, &url) @@ -14279,7 +14579,7 @@ impl<'a, C, A> UrlMapInsertCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Operation)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -14359,8 +14659,7 @@ impl<'a, C, A> UrlMapInsertCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -14540,7 +14839,7 @@ impl<'a, C, A> UrlMapGetCall<'a, C, A> where C: BorrowMut, A: oau /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, UrlMap)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -14610,8 +14909,7 @@ impl<'a, C, A> UrlMapGetCall<'a, C, A> where C: BorrowMut, A: oau } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -14795,7 +15093,7 @@ impl<'a, C, A> UrlMapValidateCall<'a, C, A> where C: BorrowMut, A /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, UrlMapsValidateResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -14876,8 +15174,7 @@ impl<'a, C, A> UrlMapValidateCall<'a, C, A> where C: BorrowMut, A } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -15045,9 +15342,9 @@ impl<'a, C, A> UrlMapValidateCall<'a, C, A> where C: BorrowMut, A /// // execute the final call using `doit()`. /// // Values shown here are possibly random and not representative ! /// let result = hub.url_maps().list("project") -/// .page_token("et") -/// .max_results(55) -/// .filter("et") +/// .page_token("consetetur") +/// .max_results(65) +/// .filter("ea") /// .doit(); /// # } /// ``` @@ -15072,7 +15369,7 @@ impl<'a, C, A> UrlMapListCall<'a, C, A> where C: BorrowMut, A: oa /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, UrlMapList)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -15150,8 +15447,7 @@ impl<'a, C, A> UrlMapListCall<'a, C, A> where C: BorrowMut, A: oa } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -15354,7 +15650,7 @@ impl<'a, C, A> UrlMapPatchCall<'a, C, A> where C: BorrowMut, A: o /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Operation)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -15435,8 +15731,7 @@ impl<'a, C, A> UrlMapPatchCall<'a, C, A> where C: BorrowMut, A: o } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -15633,7 +15928,7 @@ impl<'a, C, A> UrlMapUpdateCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Operation)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -15714,8 +16009,7 @@ impl<'a, C, A> UrlMapUpdateCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -15905,7 +16199,7 @@ impl<'a, C, A> UrlMapDeleteCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Operation)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -15975,8 +16269,7 @@ impl<'a, C, A> UrlMapDeleteCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Delete, &url) @@ -16159,7 +16452,7 @@ impl<'a, C, A> GlobalAddresseInsertCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, Operation)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -16239,8 +16532,7 @@ impl<'a, C, A> GlobalAddresseInsertCall<'a, C, A> where C: BorrowMut GlobalAddresseInsertCall<'a, C, A> where C: BorrowMut GlobalAddresseListCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, AddressList)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -16503,8 +16795,7 @@ impl<'a, C, A> GlobalAddresseListCall<'a, C, A> where C: BorrowMut GlobalAddresseGetCall<'a, C, A> where C: BorrowMut /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Address)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -16770,8 +17061,7 @@ impl<'a, C, A> GlobalAddresseGetCall<'a, C, A> where C: BorrowMut } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -16948,7 +17238,7 @@ impl<'a, C, A> GlobalAddresseDeleteCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, Operation)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -17018,8 +17308,7 @@ impl<'a, C, A> GlobalAddresseDeleteCall<'a, C, A> where C: BorrowMut SnapshotGetCall<'a, C, A> where C: BorrowMut, A: o /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Snapshot)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -17266,8 +17555,7 @@ impl<'a, C, A> SnapshotGetCall<'a, C, A> where C: BorrowMut, A: o } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -17422,9 +17710,9 @@ impl<'a, C, A> SnapshotGetCall<'a, C, A> where C: BorrowMut, A: o /// // execute the final call using `doit()`. /// // Values shown here are possibly random and not representative ! /// let result = hub.snapshots().list("project") -/// .page_token("consetetur") -/// .max_results(57) -/// .filter("vero") +/// .page_token("sadipscing") +/// .max_results(13) +/// .filter("consetetur") /// .doit(); /// # } /// ``` @@ -17449,7 +17737,7 @@ impl<'a, C, A> SnapshotListCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, SnapshotList)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -17527,8 +17815,7 @@ impl<'a, C, A> SnapshotListCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -17726,7 +18013,7 @@ impl<'a, C, A> SnapshotDeleteCall<'a, C, A> where C: BorrowMut, A /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Operation)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -17796,8 +18083,7 @@ impl<'a, C, A> SnapshotDeleteCall<'a, C, A> where C: BorrowMut, A } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Delete, &url) @@ -17975,7 +18261,7 @@ impl<'a, C, A> DiskTypeGetCall<'a, C, A> where C: BorrowMut, A: o /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, DiskType)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -18046,8 +18332,7 @@ impl<'a, C, A> DiskTypeGetCall<'a, C, A> where C: BorrowMut, A: o } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -18212,9 +18497,9 @@ impl<'a, C, A> DiskTypeGetCall<'a, C, A> where C: BorrowMut, A: o /// // execute the final call using `doit()`. /// // Values shown here are possibly random and not representative ! /// let result = hub.disk_types().aggregated_list("project") -/// .page_token("Lorem") -/// .max_results(84) -/// .filter("clita") +/// .page_token("consetetur") +/// .max_results(43) +/// .filter("nonumy") /// .doit(); /// # } /// ``` @@ -18239,7 +18524,7 @@ impl<'a, C, A> DiskTypeAggregatedListCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, DiskTypeAggregatedList)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -18317,8 +18602,7 @@ impl<'a, C, A> DiskTypeAggregatedListCall<'a, C, A> where C: BorrowMut DiskTypeAggregatedListCall<'a, C, A> where C: BorrowMut DiskTypeListCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, DiskTypeList)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -18599,8 +18883,7 @@ impl<'a, C, A> DiskTypeListCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -18806,7 +19089,7 @@ impl<'a, C, A> ZoneGetCall<'a, C, A> where C: BorrowMut, A: oauth /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Zone)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -18876,8 +19159,7 @@ impl<'a, C, A> ZoneGetCall<'a, C, A> where C: BorrowMut, A: oauth } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -19032,9 +19314,9 @@ impl<'a, C, A> ZoneGetCall<'a, C, A> where C: BorrowMut, A: oauth /// // execute the final call using `doit()`. /// // Values shown here are possibly random and not representative ! /// let result = hub.zones().list("project") -/// .page_token("invidunt") -/// .max_results(35) -/// .filter("sadipscing") +/// .page_token("rebum.") +/// .max_results(68) +/// .filter("nonumy") /// .doit(); /// # } /// ``` @@ -19059,7 +19341,7 @@ impl<'a, C, A> ZoneListCall<'a, C, A> where C: BorrowMut, A: oaut /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, ZoneList)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -19137,8 +19419,7 @@ impl<'a, C, A> ZoneListCall<'a, C, A> where C: BorrowMut, A: oaut } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -19342,7 +19623,7 @@ impl<'a, C, A> InstanceSetMachineTypeCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, Operation)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -19424,8 +19705,7 @@ impl<'a, C, A> InstanceSetMachineTypeCall<'a, C, A> where C: BorrowMut InstanceSetSchedulingCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, Operation)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -19715,8 +19995,7 @@ impl<'a, C, A> InstanceSetSchedulingCall<'a, C, A> where C: BorrowMut InstanceDeleteCall<'a, C, A> where C: BorrowMut, A /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Operation)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -19988,8 +20267,7 @@ impl<'a, C, A> InstanceDeleteCall<'a, C, A> where C: BorrowMut, A } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Delete, &url) @@ -20154,7 +20432,7 @@ impl<'a, C, A> InstanceDeleteCall<'a, C, A> where C: BorrowMut, A /// // execute the final call using `doit()`. /// // Values shown here are possibly random and not representative ! /// let result = hub.instances().get_serial_port_output("project", "zone", "instance") -/// .port(-82) +/// .port(-59) /// .doit(); /// # } /// ``` @@ -20179,7 +20457,7 @@ impl<'a, C, A> InstanceGetSerialPortOutputCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, SerialPortOutput)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -20253,8 +20531,7 @@ impl<'a, C, A> InstanceGetSerialPortOutputCall<'a, C, A> where C: BorrowMut InstanceSetDiskAutoDeleteCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, Operation)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -20524,8 +20801,7 @@ impl<'a, C, A> InstanceSetDiskAutoDeleteCall<'a, C, A> where C: BorrowMut InstanceSetTagCall<'a, C, A> where C: BorrowMut, A /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Operation)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -20822,8 +21098,7 @@ impl<'a, C, A> InstanceSetTagCall<'a, C, A> where C: BorrowMut, A } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -21032,7 +21307,7 @@ impl<'a, C, A> InstanceAddAccessConfigCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, Operation)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -21115,8 +21390,7 @@ impl<'a, C, A> InstanceAddAccessConfigCall<'a, C, A> where C: BorrowMut InstanceSetMetadataCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, Operation)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -21416,8 +21690,7 @@ impl<'a, C, A> InstanceSetMetadataCall<'a, C, A> where C: BorrowMut InstanceStartCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Operation)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -21689,8 +21962,7 @@ impl<'a, C, A> InstanceStartCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Post, &url) @@ -21878,7 +22150,7 @@ impl<'a, C, A> InstanceGetCall<'a, C, A> where C: BorrowMut, A: o /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Instance)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -21949,8 +22221,7 @@ impl<'a, C, A> InstanceGetCall<'a, C, A> where C: BorrowMut, A: o } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -22138,7 +22409,7 @@ impl<'a, C, A> InstanceStopCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Operation)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -22209,8 +22480,7 @@ impl<'a, C, A> InstanceStopCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Post, &url) @@ -22399,7 +22669,7 @@ impl<'a, C, A> InstanceDetachDiskCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, Operation)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -22471,8 +22741,7 @@ impl<'a, C, A> InstanceDetachDiskCall<'a, C, A> where C: BorrowMut InstanceAttachDiskCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, Operation)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -22759,8 +23028,7 @@ impl<'a, C, A> InstanceAttachDiskCall<'a, C, A> where C: BorrowMut InstanceDeleteAccessConfigCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, Operation)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -23036,8 +23304,7 @@ impl<'a, C, A> InstanceDeleteAccessConfigCall<'a, C, A> where C: BorrowMut InstanceInsertCall<'a, C, A> where C: BorrowMut, A /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Operation)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -23332,8 +23599,7 @@ impl<'a, C, A> InstanceInsertCall<'a, C, A> where C: BorrowMut, A } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -23501,9 +23767,9 @@ impl<'a, C, A> InstanceInsertCall<'a, C, A> where C: BorrowMut, A /// // execute the final call using `doit()`. /// // Values shown here are possibly random and not representative ! /// let result = hub.instances().list("project", "zone") -/// .page_token("consetetur") -/// .max_results(79) -/// .filter("sed") +/// .page_token("sit") +/// .max_results(93) +/// .filter("elitr") /// .doit(); /// # } /// ``` @@ -23529,7 +23795,7 @@ impl<'a, C, A> InstanceListCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, InstanceList)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -23608,8 +23874,7 @@ impl<'a, C, A> InstanceListCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -23816,7 +24081,7 @@ impl<'a, C, A> InstanceResetCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Operation)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -23887,8 +24152,7 @@ impl<'a, C, A> InstanceResetCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Post, &url) @@ -24053,9 +24317,9 @@ impl<'a, C, A> InstanceResetCall<'a, C, A> where C: BorrowMut, A: /// // execute the final call using `doit()`. /// // Values shown here are possibly random and not representative ! /// let result = hub.instances().aggregated_list("project") -/// .page_token("rebum.") -/// .max_results(95) -/// .filter("Lorem") +/// .page_token("diam") +/// .max_results(65) +/// .filter("ut") /// .doit(); /// # } /// ``` @@ -24080,7 +24344,7 @@ impl<'a, C, A> InstanceAggregatedListCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, InstanceAggregatedList)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -24158,8 +24422,7 @@ impl<'a, C, A> InstanceAggregatedListCall<'a, C, A> where C: BorrowMut BackendServiceGetHealthCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, BackendServiceGroupHealth)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -24443,8 +24706,7 @@ impl<'a, C, A> BackendServiceGetHealthCall<'a, C, A> where C: BorrowMut BackendServiceDeleteCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, Operation)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -24703,8 +24965,7 @@ impl<'a, C, A> BackendServiceDeleteCall<'a, C, A> where C: BorrowMut BackendServiceGetCall<'a, C, A> where C: BorrowMut /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, BackendService)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -24951,8 +25212,7 @@ impl<'a, C, A> BackendServiceGetCall<'a, C, A> where C: BorrowMut } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -25136,7 +25396,7 @@ impl<'a, C, A> BackendServiceUpdateCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, Operation)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -25217,8 +25477,7 @@ impl<'a, C, A> BackendServiceUpdateCall<'a, C, A> where C: BorrowMut BackendServiceUpdateCall<'a, C, A> where C: BorrowMut BackendServiceListCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, BackendServiceList)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -25491,8 +25750,7 @@ impl<'a, C, A> BackendServiceListCall<'a, C, A> where C: BorrowMut BackendServicePatchCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, Operation)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -25776,8 +26034,7 @@ impl<'a, C, A> BackendServicePatchCall<'a, C, A> where C: BorrowMut BackendServiceInsertCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, Operation)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -26053,8 +26310,7 @@ impl<'a, C, A> BackendServiceInsertCall<'a, C, A> where C: BorrowMut BackendServiceInsertCall<'a, C, A> where C: BorrowMut ImageListCall<'a, C, A> where C: BorrowMut, A: oau /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, ImageList)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -26319,8 +26575,7 @@ impl<'a, C, A> ImageListCall<'a, C, A> where C: BorrowMut, A: oau } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -26525,7 +26780,7 @@ impl<'a, C, A> ImageDeprecateCall<'a, C, A> where C: BorrowMut, A /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Operation)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -26606,8 +26861,7 @@ impl<'a, C, A> ImageDeprecateCall<'a, C, A> where C: BorrowMut, A } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -26803,7 +27057,7 @@ impl<'a, C, A> ImageInsertCall<'a, C, A> where C: BorrowMut, A: o /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Operation)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -26883,8 +27137,7 @@ impl<'a, C, A> ImageInsertCall<'a, C, A> where C: BorrowMut, A: o } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -27064,7 +27317,7 @@ impl<'a, C, A> ImageGetCall<'a, C, A> where C: BorrowMut, A: oaut /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Image)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -27134,8 +27387,7 @@ impl<'a, C, A> ImageGetCall<'a, C, A> where C: BorrowMut, A: oaut } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -27312,7 +27564,7 @@ impl<'a, C, A> ImageDeleteCall<'a, C, A> where C: BorrowMut, A: o /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Operation)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -27382,8 +27634,7 @@ impl<'a, C, A> ImageDeleteCall<'a, C, A> where C: BorrowMut, A: o } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Delete, &url) @@ -27560,7 +27811,7 @@ impl<'a, C, A> LicenseGetCall<'a, C, A> where C: BorrowMut, A: oa /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, License)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -27630,8 +27881,7 @@ impl<'a, C, A> LicenseGetCall<'a, C, A> where C: BorrowMut, A: oa } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -27808,7 +28058,7 @@ impl<'a, C, A> TargetHttpsProxyDeleteCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, Operation)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -27878,8 +28128,7 @@ impl<'a, C, A> TargetHttpsProxyDeleteCall<'a, C, A> where C: BorrowMut TargetHttpsProxyGetCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, TargetHttpsProxy)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -28126,8 +28375,7 @@ impl<'a, C, A> TargetHttpsProxyGetCall<'a, C, A> where C: BorrowMut TargetHttpsProxySetUrlMapCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, Operation)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -28392,8 +28640,7 @@ impl<'a, C, A> TargetHttpsProxySetUrlMapCall<'a, C, A> where C: BorrowMut TargetHttpsProxyInsertCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, Operation)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -28669,8 +28916,7 @@ impl<'a, C, A> TargetHttpsProxyInsertCall<'a, C, A> where C: BorrowMut TargetHttpsProxySetSslCertificateCall<'a, C, A> where C: BorrowMu /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Operation)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -28938,8 +29184,7 @@ impl<'a, C, A> TargetHttpsProxySetSslCertificateCall<'a, C, A> where C: BorrowMu } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -29107,9 +29352,9 @@ impl<'a, C, A> TargetHttpsProxySetSslCertificateCall<'a, C, A> where C: BorrowMu /// // execute the final call using `doit()`. /// // Values shown here are possibly random and not representative ! /// let result = hub.target_https_proxies().list("project") -/// .page_token("At") -/// .max_results(92) -/// .filter("consetetur") +/// .page_token("diam") +/// .max_results(79) +/// .filter("dolores") /// .doit(); /// # } /// ``` @@ -29134,7 +29379,7 @@ impl<'a, C, A> TargetHttpsProxyListCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, TargetHttpsProxyList)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -29212,8 +29457,7 @@ impl<'a, C, A> TargetHttpsProxyListCall<'a, C, A> where C: BorrowMut NetworkInsertCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Operation)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -29495,8 +29739,7 @@ impl<'a, C, A> NetworkInsertCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -29654,9 +29897,9 @@ impl<'a, C, A> NetworkInsertCall<'a, C, A> where C: BorrowMut, A: /// // execute the final call using `doit()`. /// // Values shown here are possibly random and not representative ! /// let result = hub.networks().list("project") -/// .page_token("dolores") -/// .max_results(55) -/// .filter("dolor") +/// .page_token("aliquyam") +/// .max_results(7) +/// .filter("ea") /// .doit(); /// # } /// ``` @@ -29681,7 +29924,7 @@ impl<'a, C, A> NetworkListCall<'a, C, A> where C: BorrowMut, A: o /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, NetworkList)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -29759,8 +30002,7 @@ impl<'a, C, A> NetworkListCall<'a, C, A> where C: BorrowMut, A: o } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -29956,7 +30198,7 @@ impl<'a, C, A> NetworkDeleteCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Operation)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -30026,8 +30268,7 @@ impl<'a, C, A> NetworkDeleteCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Delete, &url) @@ -30204,7 +30445,7 @@ impl<'a, C, A> NetworkGetCall<'a, C, A> where C: BorrowMut, A: oa /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Network)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -30274,8 +30515,7 @@ impl<'a, C, A> NetworkGetCall<'a, C, A> where C: BorrowMut, A: oa } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -30430,9 +30670,9 @@ impl<'a, C, A> NetworkGetCall<'a, C, A> where C: BorrowMut, A: oa /// // execute the final call using `doit()`. /// // Values shown here are possibly random and not representative ! /// let result = hub.global_operations().list("project") -/// .page_token("sed") -/// .max_results(2) -/// .filter("sanctus") +/// .page_token("dolore") +/// .max_results(96) +/// .filter("consetetur") /// .doit(); /// # } /// ``` @@ -30457,7 +30697,7 @@ impl<'a, C, A> GlobalOperationListCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, OperationList)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -30535,8 +30775,7 @@ impl<'a, C, A> GlobalOperationListCall<'a, C, A> where C: BorrowMut GlobalOperationListCall<'a, C, A> where C: BorrowMut GlobalOperationAggregatedListCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, OperationAggregatedList)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -30815,8 +31054,7 @@ impl<'a, C, A> GlobalOperationAggregatedListCall<'a, C, A> where C: BorrowMut GlobalOperationGetCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, Operation)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -31082,8 +31320,7 @@ impl<'a, C, A> GlobalOperationGetCall<'a, C, A> where C: BorrowMut GlobalOperationDeleteCall<'a, C, A> where C: BorrowMut Result { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -31329,8 +31566,7 @@ impl<'a, C, A> GlobalOperationDeleteCall<'a, C, A> where C: BorrowMut AutoscalerDeleteCall<'a, C, A> where C: BorrowMut, /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Operation)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -31569,8 +31805,7 @@ impl<'a, C, A> AutoscalerDeleteCall<'a, C, A> where C: BorrowMut, } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Delete, &url) @@ -31758,7 +31993,7 @@ impl<'a, C, A> AutoscalerGetCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Autoscaler)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -31829,8 +32064,7 @@ impl<'a, C, A> AutoscalerGetCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -31995,9 +32229,9 @@ impl<'a, C, A> AutoscalerGetCall<'a, C, A> where C: BorrowMut, A: /// // execute the final call using `doit()`. /// // Values shown here are possibly random and not representative ! /// let result = hub.autoscalers().list("project", "zone") -/// .page_token("dolores") -/// .max_results(76) -/// .filter("consetetur") +/// .page_token("vero") +/// .max_results(5) +/// .filter("eos") /// .doit(); /// # } /// ``` @@ -32023,7 +32257,7 @@ impl<'a, C, A> AutoscalerListCall<'a, C, A> where C: BorrowMut, A /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, AutoscalerList)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -32102,8 +32336,7 @@ impl<'a, C, A> AutoscalerListCall<'a, C, A> where C: BorrowMut, A } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -32317,7 +32550,7 @@ impl<'a, C, A> AutoscalerPatchCall<'a, C, A> where C: BorrowMut, /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Operation)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -32399,8 +32632,7 @@ impl<'a, C, A> AutoscalerPatchCall<'a, C, A> where C: BorrowMut, } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -32607,7 +32839,7 @@ impl<'a, C, A> AutoscalerInsertCall<'a, C, A> where C: BorrowMut, /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Operation)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -32688,8 +32920,7 @@ impl<'a, C, A> AutoscalerInsertCall<'a, C, A> where C: BorrowMut, } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -32857,9 +33088,9 @@ impl<'a, C, A> AutoscalerInsertCall<'a, C, A> where C: BorrowMut, /// // execute the final call using `doit()`. /// // Values shown here are possibly random and not representative ! /// let result = hub.autoscalers().aggregated_list("project") -/// .page_token("dolore") -/// .max_results(50) -/// .filter("dolore") +/// .page_token("magna") +/// .max_results(7) +/// .filter("magna") /// .doit(); /// # } /// ``` @@ -32884,7 +33115,7 @@ impl<'a, C, A> AutoscalerAggregatedListCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, AutoscalerAggregatedList)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -32962,8 +33193,7 @@ impl<'a, C, A> AutoscalerAggregatedListCall<'a, C, A> where C: BorrowMut AutoscalerAggregatedListCall<'a, C, A> where C: BorrowMut AutoscalerUpdateCall<'a, C, A> where C: BorrowMut, /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Operation)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -33252,8 +33482,7 @@ impl<'a, C, A> AutoscalerUpdateCall<'a, C, A> where C: BorrowMut, } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -33428,9 +33657,9 @@ impl<'a, C, A> AutoscalerUpdateCall<'a, C, A> where C: BorrowMut, /// // execute the final call using `doit()`. /// // Values shown here are possibly random and not representative ! /// let result = hub.subnetworks().aggregated_list("project") -/// .page_token("invidunt") -/// .max_results(79) -/// .filter("labore") +/// .page_token("diam") +/// .max_results(60) +/// .filter("sed") /// .doit(); /// # } /// ``` @@ -33455,7 +33684,7 @@ impl<'a, C, A> SubnetworkAggregatedListCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, SubnetworkAggregatedList)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -33533,8 +33762,7 @@ impl<'a, C, A> SubnetworkAggregatedListCall<'a, C, A> where C: BorrowMut SubnetworkInsertCall<'a, C, A> where C: BorrowMut, /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Operation)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -33818,8 +34046,7 @@ impl<'a, C, A> SubnetworkInsertCall<'a, C, A> where C: BorrowMut, } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -34010,7 +34237,7 @@ impl<'a, C, A> SubnetworkDeleteCall<'a, C, A> where C: BorrowMut, /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Operation)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -34081,8 +34308,7 @@ impl<'a, C, A> SubnetworkDeleteCall<'a, C, A> where C: BorrowMut, } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Delete, &url) @@ -34247,9 +34473,9 @@ impl<'a, C, A> SubnetworkDeleteCall<'a, C, A> where C: BorrowMut, /// // execute the final call using `doit()`. /// // Values shown here are possibly random and not representative ! /// let result = hub.subnetworks().list("project", "region") -/// .page_token("dolor") -/// .max_results(76) -/// .filter("nonumy") +/// .page_token("takimata") +/// .max_results(32) +/// .filter("consetetur") /// .doit(); /// # } /// ``` @@ -34275,7 +34501,7 @@ impl<'a, C, A> SubnetworkListCall<'a, C, A> where C: BorrowMut, A /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, SubnetworkList)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -34354,8 +34580,7 @@ impl<'a, C, A> SubnetworkListCall<'a, C, A> where C: BorrowMut, A } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -34562,7 +34787,7 @@ impl<'a, C, A> SubnetworkGetCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Subnetwork)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -34633,8 +34858,7 @@ impl<'a, C, A> SubnetworkGetCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -34822,7 +35046,7 @@ impl<'a, C, A> InstanceGroupDeleteCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, Operation)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -34893,8 +35117,7 @@ impl<'a, C, A> InstanceGroupDeleteCall<'a, C, A> where C: BorrowMut InstanceGroupDeleteCall<'a, C, A> where C: BorrowMut InstanceGroupListInstanceCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, InstanceGroupsListInstances)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -35186,8 +35409,7 @@ impl<'a, C, A> InstanceGroupListInstanceCall<'a, C, A> where C: BorrowMut InstanceGroupInsertCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, Operation)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -35504,8 +35726,7 @@ impl<'a, C, A> InstanceGroupInsertCall<'a, C, A> where C: BorrowMut InstanceGroupGetCall<'a, C, A> where C: BorrowMut, /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, InstanceGroup)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -35767,8 +35988,7 @@ impl<'a, C, A> InstanceGroupGetCall<'a, C, A> where C: BorrowMut, } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -35963,7 +36183,7 @@ impl<'a, C, A> InstanceGroupRemoveInstanceCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, Operation)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -36045,8 +36265,7 @@ impl<'a, C, A> InstanceGroupRemoveInstanceCall<'a, C, A> where C: BorrowMut InstanceGroupAddInstanceCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, Operation)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -36336,8 +36555,7 @@ impl<'a, C, A> InstanceGroupAddInstanceCall<'a, C, A> where C: BorrowMut InstanceGroupSetNamedPortCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, Operation)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -36627,8 +36845,7 @@ impl<'a, C, A> InstanceGroupSetNamedPortCall<'a, C, A> where C: BorrowMut InstanceGroupSetNamedPortCall<'a, C, A> where C: BorrowMut InstanceGroupAggregatedListCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, InstanceGroupAggregatedList)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -36911,8 +37128,7 @@ impl<'a, C, A> InstanceGroupAggregatedListCall<'a, C, A> where C: BorrowMut InstanceGroupAggregatedListCall<'a, C, A> where C: BorrowMut InstanceGroupListCall<'a, C, A> where C: BorrowMut /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, InstanceGroupList)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -37193,8 +37409,7 @@ impl<'a, C, A> InstanceGroupListCall<'a, C, A> where C: BorrowMut } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -37378,9 +37593,9 @@ impl<'a, C, A> InstanceGroupListCall<'a, C, A> where C: BorrowMut /// // execute the final call using `doit()`. /// // Values shown here are possibly random and not representative ! /// let result = hub.regions().list("project") -/// .page_token("diam") -/// .max_results(62) -/// .filter("et") +/// .page_token("erat") +/// .max_results(83) +/// .filter("kasd") /// .doit(); /// # } /// ``` @@ -37405,7 +37620,7 @@ impl<'a, C, A> RegionListCall<'a, C, A> where C: BorrowMut, A: oa /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, RegionList)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -37483,8 +37698,7 @@ impl<'a, C, A> RegionListCall<'a, C, A> where C: BorrowMut, A: oa } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -37680,7 +37894,7 @@ impl<'a, C, A> RegionGetCall<'a, C, A> where C: BorrowMut, A: oau /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Region)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -37750,8 +37964,7 @@ impl<'a, C, A> RegionGetCall<'a, C, A> where C: BorrowMut, A: oau } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -37935,7 +38148,7 @@ impl<'a, C, A> ForwardingRuleInsertCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, Operation)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -38016,8 +38229,7 @@ impl<'a, C, A> ForwardingRuleInsertCall<'a, C, A> where C: BorrowMut ForwardingRuleSetTargetCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, Operation)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -38297,8 +38509,7 @@ impl<'a, C, A> ForwardingRuleSetTargetCall<'a, C, A> where C: BorrowMut ForwardingRuleSetTargetCall<'a, C, A> where C: BorrowMut ForwardingRuleListCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, ForwardingRuleList)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -38583,8 +38794,7 @@ impl<'a, C, A> ForwardingRuleListCall<'a, C, A> where C: BorrowMut ForwardingRuleListCall<'a, C, A> where C: BorrowMut ForwardingRuleAggregatedListCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, ForwardingRuleAggregatedList)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -38873,8 +39083,7 @@ impl<'a, C, A> ForwardingRuleAggregatedListCall<'a, C, A> where C: BorrowMut ForwardingRuleGetCall<'a, C, A> where C: BorrowMut /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, ForwardingRule)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -39142,8 +39351,7 @@ impl<'a, C, A> ForwardingRuleGetCall<'a, C, A> where C: BorrowMut } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -39331,7 +39539,7 @@ impl<'a, C, A> ForwardingRuleDeleteCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, Operation)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -39402,8 +39610,7 @@ impl<'a, C, A> ForwardingRuleDeleteCall<'a, C, A> where C: BorrowMut TargetPoolAddHealthCheckCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, Operation)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -39680,8 +39887,7 @@ impl<'a, C, A> TargetPoolAddHealthCheckCall<'a, C, A> where C: BorrowMut TargetPoolInsertCall<'a, C, A> where C: BorrowMut, /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Operation)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -39969,8 +40175,7 @@ impl<'a, C, A> TargetPoolInsertCall<'a, C, A> where C: BorrowMut, } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -40168,7 +40373,7 @@ impl<'a, C, A> TargetPoolRemoveHealthCheckCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, Operation)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -40250,8 +40455,7 @@ impl<'a, C, A> TargetPoolRemoveHealthCheckCall<'a, C, A> where C: BorrowMut TargetPoolGetHealthCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, TargetPoolInstanceHealth)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -40541,8 +40745,7 @@ impl<'a, C, A> TargetPoolGetHealthCall<'a, C, A> where C: BorrowMut TargetPoolGetHealthCall<'a, C, A> where C: BorrowMut TargetPoolSetBackupCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, Operation)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -40837,8 +41040,7 @@ impl<'a, C, A> TargetPoolSetBackupCall<'a, C, A> where C: BorrowMut TargetPoolSetBackupCall<'a, C, A> where C: BorrowMut TargetPoolAggregatedListCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, TargetPoolAggregatedList)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -41128,8 +41330,7 @@ impl<'a, C, A> TargetPoolAggregatedListCall<'a, C, A> where C: BorrowMut TargetPoolGetCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, TargetPool)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -41397,8 +41598,7 @@ impl<'a, C, A> TargetPoolGetCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -41593,7 +41793,7 @@ impl<'a, C, A> TargetPoolAddInstanceCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, Operation)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -41675,8 +41875,7 @@ impl<'a, C, A> TargetPoolAddInstanceCall<'a, C, A> where C: BorrowMut TargetPoolRemoveInstanceCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, Operation)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -41966,8 +42165,7 @@ impl<'a, C, A> TargetPoolRemoveInstanceCall<'a, C, A> where C: BorrowMut TargetPoolDeleteCall<'a, C, A> where C: BorrowMut, /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Operation)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -42239,8 +42437,7 @@ impl<'a, C, A> TargetPoolDeleteCall<'a, C, A> where C: BorrowMut, } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Delete, &url) @@ -42405,9 +42602,9 @@ impl<'a, C, A> TargetPoolDeleteCall<'a, C, A> where C: BorrowMut, /// // execute the final call using `doit()`. /// // Values shown here are possibly random and not representative ! /// let result = hub.target_pools().list("project", "region") -/// .page_token("sanctus") -/// .max_results(43) -/// .filter("kasd") +/// .page_token("ut") +/// .max_results(57) +/// .filter("et") /// .doit(); /// # } /// ``` @@ -42433,7 +42630,7 @@ impl<'a, C, A> TargetPoolListCall<'a, C, A> where C: BorrowMut, A /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, TargetPoolList)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -42512,8 +42709,7 @@ impl<'a, C, A> TargetPoolListCall<'a, C, A> where C: BorrowMut, A } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -42697,9 +42893,9 @@ impl<'a, C, A> TargetPoolListCall<'a, C, A> where C: BorrowMut, A /// // execute the final call using `doit()`. /// // Values shown here are possibly random and not representative ! /// let result = hub.target_instances().list("project", "zone") -/// .page_token("et") -/// .max_results(37) -/// .filter("ipsum") +/// .page_token("dolor") +/// .max_results(7) +/// .filter("magna") /// .doit(); /// # } /// ``` @@ -42725,7 +42921,7 @@ impl<'a, C, A> TargetInstanceListCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, TargetInstanceList)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -42804,8 +43000,7 @@ impl<'a, C, A> TargetInstanceListCall<'a, C, A> where C: BorrowMut TargetInstanceInsertCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, Operation)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -43099,8 +43294,7 @@ impl<'a, C, A> TargetInstanceInsertCall<'a, C, A> where C: BorrowMut TargetInstanceInsertCall<'a, C, A> where C: BorrowMut TargetInstanceAggregatedListCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, TargetInstanceAggregatedList)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -43373,8 +43567,7 @@ impl<'a, C, A> TargetInstanceAggregatedListCall<'a, C, A> where C: BorrowMut TargetInstanceDeleteCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, Operation)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -43642,8 +43835,7 @@ impl<'a, C, A> TargetInstanceDeleteCall<'a, C, A> where C: BorrowMut TargetInstanceGetCall<'a, C, A> where C: BorrowMut /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, TargetInstance)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -43902,8 +44094,7 @@ impl<'a, C, A> TargetInstanceGetCall<'a, C, A> where C: BorrowMut } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -44090,7 +44281,7 @@ impl<'a, C, A> GlobalForwardingRuleDeleteCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, Operation)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -44160,8 +44351,7 @@ impl<'a, C, A> GlobalForwardingRuleDeleteCall<'a, C, A> where C: BorrowMut GlobalForwardingRuleSetTargetCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, Operation)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -44426,8 +44616,7 @@ impl<'a, C, A> GlobalForwardingRuleSetTargetCall<'a, C, A> where C: BorrowMut GlobalForwardingRuleInsertCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, Operation)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -44703,8 +44892,7 @@ impl<'a, C, A> GlobalForwardingRuleInsertCall<'a, C, A> where C: BorrowMut GlobalForwardingRuleInsertCall<'a, C, A> where C: BorrowMut GlobalForwardingRuleListCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, ForwardingRuleList)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -44967,8 +45155,7 @@ impl<'a, C, A> GlobalForwardingRuleListCall<'a, C, A> where C: BorrowMut GlobalForwardingRuleGetCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, ForwardingRule)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -45234,8 +45421,7 @@ impl<'a, C, A> GlobalForwardingRuleGetCall<'a, C, A> where C: BorrowMut HttpsHealthCheckDeleteCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, Operation)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -45482,8 +45668,7 @@ impl<'a, C, A> HttpsHealthCheckDeleteCall<'a, C, A> where C: BorrowMut HttpsHealthCheckDeleteCall<'a, C, A> where C: BorrowMut HttpsHealthCheckListCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, HttpsHealthCheckList)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -45743,8 +45928,7 @@ impl<'a, C, A> HttpsHealthCheckListCall<'a, C, A> where C: BorrowMut HttpsHealthCheckInsertCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, Operation)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -46026,8 +46210,7 @@ impl<'a, C, A> HttpsHealthCheckInsertCall<'a, C, A> where C: BorrowMut HttpsHealthCheckGetCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, HttpsHealthCheck)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -46277,8 +46460,7 @@ impl<'a, C, A> HttpsHealthCheckGetCall<'a, C, A> where C: BorrowMut HttpsHealthCheckUpdateCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, Operation)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -46543,8 +46725,7 @@ impl<'a, C, A> HttpsHealthCheckUpdateCall<'a, C, A> where C: BorrowMut HttpsHealthCheckPatchCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, Operation)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -46822,8 +47003,7 @@ impl<'a, C, A> HttpsHealthCheckPatchCall<'a, C, A> where C: BorrowMut HttpsHealthCheckPatchCall<'a, C, A> where C: BorrowMut MachineTypeAggregatedListCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, MachineTypeAggregatedList)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -47096,8 +47276,7 @@ impl<'a, C, A> MachineTypeAggregatedListCall<'a, C, A> where C: BorrowMut MachineTypeGetCall<'a, C, A> where C: BorrowMut, A /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, MachineType)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -47365,8 +47544,7 @@ impl<'a, C, A> MachineTypeGetCall<'a, C, A> where C: BorrowMut, A } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -47531,9 +47709,9 @@ impl<'a, C, A> MachineTypeGetCall<'a, C, A> where C: BorrowMut, A /// // execute the final call using `doit()`. /// // Values shown here are possibly random and not representative ! /// let result = hub.machine_types().list("project", "zone") -/// .page_token("est") -/// .max_results(5) -/// .filter("tempor") +/// .page_token("amet") +/// .max_results(96) +/// .filter("eirmod") /// .doit(); /// # } /// ``` @@ -47559,7 +47737,7 @@ impl<'a, C, A> MachineTypeListCall<'a, C, A> where C: BorrowMut, /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, MachineTypeList)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -47638,8 +47816,7 @@ impl<'a, C, A> MachineTypeListCall<'a, C, A> where C: BorrowMut, } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -47823,9 +48000,9 @@ impl<'a, C, A> MachineTypeListCall<'a, C, A> where C: BorrowMut, /// // execute the final call using `doit()`. /// // Values shown here are possibly random and not representative ! /// let result = hub.target_vpn_gateways().aggregated_list("project") -/// .page_token("Lorem") -/// .max_results(62) -/// .filter("elitr") +/// .page_token("clita") +/// .max_results(78) +/// .filter("eirmod") /// .doit(); /// # } /// ``` @@ -47850,7 +48027,7 @@ impl<'a, C, A> TargetVpnGatewayAggregatedListCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, TargetVpnGatewayAggregatedList)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -47928,8 +48105,7 @@ impl<'a, C, A> TargetVpnGatewayAggregatedListCall<'a, C, A> where C: BorrowMut TargetVpnGatewayGetCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, TargetVpnGateway)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -48197,8 +48373,7 @@ impl<'a, C, A> TargetVpnGatewayGetCall<'a, C, A> where C: BorrowMut TargetVpnGatewayGetCall<'a, C, A> where C: BorrowMut TargetVpnGatewayListCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, TargetVpnGatewayList)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -48470,8 +48645,7 @@ impl<'a, C, A> TargetVpnGatewayListCall<'a, C, A> where C: BorrowMut TargetVpnGatewayInsertCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, Operation)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -48765,8 +48939,7 @@ impl<'a, C, A> TargetVpnGatewayInsertCall<'a, C, A> where C: BorrowMut TargetVpnGatewayDeleteCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, Operation)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -49028,8 +49201,7 @@ impl<'a, C, A> TargetVpnGatewayDeleteCall<'a, C, A> where C: BorrowMut TargetVpnGatewayDeleteCall<'a, C, A> where C: BorrowMut InstanceGroupManagerResizeCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, Operation)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -49290,8 +49462,7 @@ impl<'a, C, A> InstanceGroupManagerResizeCall<'a, C, A> where C: BorrowMut InstanceGroupManagerResizeCall<'a, C, A> where C: BorrowMut InstanceGroupManagerListCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, InstanceGroupManagerList)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -49573,8 +49744,7 @@ impl<'a, C, A> InstanceGroupManagerListCall<'a, C, A> where C: BorrowMut InstanceGroupManagerListManagedInstanceCall<'a, C, A> where C: Bo /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, InstanceGroupManagersListManagedInstancesResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -49852,8 +50022,7 @@ impl<'a, C, A> InstanceGroupManagerListManagedInstanceCall<'a, C, A> where C: Bo } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Post, &url) @@ -50047,7 +50216,7 @@ impl<'a, C, A> InstanceGroupManagerInsertCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, Operation)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -50128,8 +50297,7 @@ impl<'a, C, A> InstanceGroupManagerInsertCall<'a, C, A> where C: BorrowMut InstanceGroupManagerInsertCall<'a, C, A> where C: BorrowMut InstanceGroupManagerAggregatedListCall<'a, C, A> where C: BorrowM /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, InstanceGroupManagerAggregatedList)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -50402,8 +50570,7 @@ impl<'a, C, A> InstanceGroupManagerAggregatedListCall<'a, C, A> where C: BorrowM } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -50607,7 +50774,7 @@ impl<'a, C, A> InstanceGroupManagerDeleteInstanceCall<'a, C, A> where C: BorrowM /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Operation)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -50689,8 +50856,7 @@ impl<'a, C, A> InstanceGroupManagerDeleteInstanceCall<'a, C, A> where C: BorrowM } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -50898,7 +51064,7 @@ impl<'a, C, A> InstanceGroupManagerSetInstanceTemplateCall<'a, C, A> where C: Bo /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Operation)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -50980,8 +51146,7 @@ impl<'a, C, A> InstanceGroupManagerSetInstanceTemplateCall<'a, C, A> where C: Bo } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -51189,7 +51354,7 @@ impl<'a, C, A> InstanceGroupManagerSetTargetPoolCall<'a, C, A> where C: BorrowMu /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Operation)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -51271,8 +51436,7 @@ impl<'a, C, A> InstanceGroupManagerSetTargetPoolCall<'a, C, A> where C: BorrowMu } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -51473,7 +51637,7 @@ impl<'a, C, A> InstanceGroupManagerDeleteCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, Operation)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -51544,8 +51708,7 @@ impl<'a, C, A> InstanceGroupManagerDeleteCall<'a, C, A> where C: BorrowMut InstanceGroupManagerGetCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, InstanceGroupManager)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -51804,8 +51967,7 @@ impl<'a, C, A> InstanceGroupManagerGetCall<'a, C, A> where C: BorrowMut InstanceGroupManagerAbandonInstanceCall<'a, C, A> where C: Borrow /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Operation)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -52082,8 +52244,7 @@ impl<'a, C, A> InstanceGroupManagerAbandonInstanceCall<'a, C, A> where C: Borrow } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -52291,7 +52452,7 @@ impl<'a, C, A> InstanceGroupManagerRecreateInstanceCall<'a, C, A> where C: Borro /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Operation)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -52373,8 +52534,7 @@ impl<'a, C, A> InstanceGroupManagerRecreateInstanceCall<'a, C, A> where C: Borro } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -52580,7 +52740,7 @@ impl<'a, C, A> ProjectMoveDiskCall<'a, C, A> where C: BorrowMut, /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Operation)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -52660,8 +52820,7 @@ impl<'a, C, A> ProjectMoveDiskCall<'a, C, A> where C: BorrowMut, } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -52847,7 +53006,7 @@ impl<'a, C, A> ProjectSetCommonInstanceMetadataCall<'a, C, A> where C: BorrowMut /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Operation)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -52927,8 +53086,7 @@ impl<'a, C, A> ProjectSetCommonInstanceMetadataCall<'a, C, A> where C: BorrowMut } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -53107,7 +53265,7 @@ impl<'a, C, A> ProjectGetCall<'a, C, A> where C: BorrowMut, A: oa /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Project)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -53176,8 +53334,7 @@ impl<'a, C, A> ProjectGetCall<'a, C, A> where C: BorrowMut, A: oa } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -53350,7 +53507,7 @@ impl<'a, C, A> ProjectMoveInstanceCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, Operation)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -53430,8 +53587,7 @@ impl<'a, C, A> ProjectMoveInstanceCall<'a, C, A> where C: BorrowMut ProjectSetUsageExportBucketCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, Operation)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -53697,8 +53853,7 @@ impl<'a, C, A> ProjectSetUsageExportBucketCall<'a, C, A> where C: BorrowMut HttpHealthCheckGetCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, HttpHealthCheck)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -53948,8 +54103,7 @@ impl<'a, C, A> HttpHealthCheckGetCall<'a, C, A> where C: BorrowMut HttpHealthCheckPatchCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, Operation)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -54214,8 +54368,7 @@ impl<'a, C, A> HttpHealthCheckPatchCall<'a, C, A> where C: BorrowMut HttpHealthCheckPatchCall<'a, C, A> where C: BorrowMut HttpHealthCheckListCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, HttpHealthCheckList)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -54488,8 +54641,7 @@ impl<'a, C, A> HttpHealthCheckListCall<'a, C, A> where C: BorrowMut HttpHealthCheckDeleteCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, Operation)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -54755,8 +54907,7 @@ impl<'a, C, A> HttpHealthCheckDeleteCall<'a, C, A> where C: BorrowMut HttpHealthCheckInsertCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, Operation)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -55019,8 +55170,7 @@ impl<'a, C, A> HttpHealthCheckInsertCall<'a, C, A> where C: BorrowMut HttpHealthCheckUpdateCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, Operation)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -55288,8 +55438,7 @@ impl<'a, C, A> HttpHealthCheckUpdateCall<'a, C, A> where C: BorrowMut InstanceTemplateDeleteCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, Operation)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -55549,8 +55698,7 @@ impl<'a, C, A> InstanceTemplateDeleteCall<'a, C, A> where C: BorrowMut InstanceTemplateGetCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, InstanceTemplate)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -55797,8 +55945,7 @@ impl<'a, C, A> InstanceTemplateGetCall<'a, C, A> where C: BorrowMut InstanceTemplateGetCall<'a, C, A> where C: BorrowMut InstanceTemplateListCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, InstanceTemplateList)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -56058,8 +56205,7 @@ impl<'a, C, A> InstanceTemplateListCall<'a, C, A> where C: BorrowMut InstanceTemplateInsertCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, Operation)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -56341,8 +56487,7 @@ impl<'a, C, A> InstanceTemplateInsertCall<'a, C, A> where C: BorrowMut TargetHttpProxyDeleteCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, Operation)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -56592,8 +56737,7 @@ impl<'a, C, A> TargetHttpProxyDeleteCall<'a, C, A> where C: BorrowMut TargetHttpProxyDeleteCall<'a, C, A> where C: BorrowMut TargetHttpProxyListCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, TargetHttpProxyList)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -56853,8 +56997,7 @@ impl<'a, C, A> TargetHttpProxyListCall<'a, C, A> where C: BorrowMut TargetHttpProxySetUrlMapCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, Operation)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -57138,8 +57281,7 @@ impl<'a, C, A> TargetHttpProxySetUrlMapCall<'a, C, A> where C: BorrowMut TargetHttpProxyGetCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, TargetHttpProxy)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -57399,8 +57541,7 @@ impl<'a, C, A> TargetHttpProxyGetCall<'a, C, A> where C: BorrowMut TargetHttpProxyInsertCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, Operation)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -57663,8 +57804,7 @@ impl<'a, C, A> TargetHttpProxyInsertCall<'a, C, A> where C: BorrowMut SslCertificateDeleteCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, Operation)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -57914,8 +58054,7 @@ impl<'a, C, A> SslCertificateDeleteCall<'a, C, A> where C: BorrowMut SslCertificateDeleteCall<'a, C, A> where C: BorrowMut SslCertificateListCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, SslCertificateList)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -58175,8 +58314,7 @@ impl<'a, C, A> SslCertificateListCall<'a, C, A> where C: BorrowMut SslCertificateInsertCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, Operation)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -58458,8 +58596,7 @@ impl<'a, C, A> SslCertificateInsertCall<'a, C, A> where C: BorrowMut SslCertificateGetCall<'a, C, A> where C: BorrowMut /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, SslCertificate)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -58709,8 +58846,7 @@ impl<'a, C, A> SslCertificateGetCall<'a, C, A> where C: BorrowMut } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -58888,7 +59024,7 @@ impl<'a, C, A> ZoneOperationDeleteCall<'a, C, A> where C: BorrowMut Result { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -58958,8 +59094,7 @@ impl<'a, C, A> ZoneOperationDeleteCall<'a, C, A> where C: BorrowMut ZoneOperationDeleteCall<'a, C, A> where C: BorrowMut ZoneOperationListCall<'a, C, A> where C: BorrowMut /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, OperationList)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -59221,8 +59356,7 @@ impl<'a, C, A> ZoneOperationListCall<'a, C, A> where C: BorrowMut } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -59429,7 +59563,7 @@ impl<'a, C, A> ZoneOperationGetCall<'a, C, A> where C: BorrowMut, /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Operation)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -59500,8 +59634,7 @@ impl<'a, C, A> ZoneOperationGetCall<'a, C, A> where C: BorrowMut, } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -59688,7 +59821,7 @@ impl<'a, C, A> RouteGetCall<'a, C, A> where C: BorrowMut, A: oaut /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Route)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -59758,8 +59891,7 @@ impl<'a, C, A> RouteGetCall<'a, C, A> where C: BorrowMut, A: oaut } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -59942,7 +60074,7 @@ impl<'a, C, A> RouteInsertCall<'a, C, A> where C: BorrowMut, A: o /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Operation)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -60022,8 +60154,7 @@ impl<'a, C, A> RouteInsertCall<'a, C, A> where C: BorrowMut, A: o } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -60181,9 +60312,9 @@ impl<'a, C, A> RouteInsertCall<'a, C, A> where C: BorrowMut, A: o /// // execute the final call using `doit()`. /// // Values shown here are possibly random and not representative ! /// let result = hub.routes().list("project") -/// .page_token("sit") -/// .max_results(25) -/// .filter("nonumy") +/// .page_token("accusam") +/// .max_results(95) +/// .filter("sit") /// .doit(); /// # } /// ``` @@ -60208,7 +60339,7 @@ impl<'a, C, A> RouteListCall<'a, C, A> where C: BorrowMut, A: oau /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, RouteList)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -60286,8 +60417,7 @@ impl<'a, C, A> RouteListCall<'a, C, A> where C: BorrowMut, A: oau } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -60483,7 +60613,7 @@ impl<'a, C, A> RouteDeleteCall<'a, C, A> where C: BorrowMut, A: o /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Operation)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -60553,8 +60683,7 @@ impl<'a, C, A> RouteDeleteCall<'a, C, A> where C: BorrowMut, A: o } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Delete, &url) @@ -60738,7 +60867,7 @@ impl<'a, C, A> FirewallPatchCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Operation)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -60819,8 +60948,7 @@ impl<'a, C, A> FirewallPatchCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -61010,7 +61138,7 @@ impl<'a, C, A> FirewallGetCall<'a, C, A> where C: BorrowMut, A: o /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Firewall)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -61080,8 +61208,7 @@ impl<'a, C, A> FirewallGetCall<'a, C, A> where C: BorrowMut, A: o } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -61265,7 +61392,7 @@ impl<'a, C, A> FirewallUpdateCall<'a, C, A> where C: BorrowMut, A /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Operation)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -61346,8 +61473,7 @@ impl<'a, C, A> FirewallUpdateCall<'a, C, A> where C: BorrowMut, A } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -61543,7 +61669,7 @@ impl<'a, C, A> FirewallInsertCall<'a, C, A> where C: BorrowMut, A /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Operation)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -61623,8 +61749,7 @@ impl<'a, C, A> FirewallInsertCall<'a, C, A> where C: BorrowMut, A } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -61782,9 +61907,9 @@ impl<'a, C, A> FirewallInsertCall<'a, C, A> where C: BorrowMut, A /// // execute the final call using `doit()`. /// // Values shown here are possibly random and not representative ! /// let result = hub.firewalls().list("project") -/// .page_token("kasd") -/// .max_results(9) -/// .filter("ut") +/// .page_token("diam") +/// .max_results(27) +/// .filter("elitr") /// .doit(); /// # } /// ``` @@ -61809,7 +61934,7 @@ impl<'a, C, A> FirewallListCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, FirewallList)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -61887,8 +62012,7 @@ impl<'a, C, A> FirewallListCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -62084,7 +62208,7 @@ impl<'a, C, A> FirewallDeleteCall<'a, C, A> where C: BorrowMut, A /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Operation)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -62154,8 +62278,7 @@ impl<'a, C, A> FirewallDeleteCall<'a, C, A> where C: BorrowMut, A } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Delete, &url) @@ -62339,7 +62462,7 @@ impl<'a, C, A> VpnTunnelInsertCall<'a, C, A> where C: BorrowMut, /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Operation)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -62420,8 +62543,7 @@ impl<'a, C, A> VpnTunnelInsertCall<'a, C, A> where C: BorrowMut, } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -62612,7 +62734,7 @@ impl<'a, C, A> VpnTunnelDeleteCall<'a, C, A> where C: BorrowMut, /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Operation)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -62683,8 +62805,7 @@ impl<'a, C, A> VpnTunnelDeleteCall<'a, C, A> where C: BorrowMut, } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Delete, &url) @@ -62872,7 +62993,7 @@ impl<'a, C, A> VpnTunnelGetCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, VpnTunnel)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -62943,8 +63064,7 @@ impl<'a, C, A> VpnTunnelGetCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -63110,8 +63230,8 @@ impl<'a, C, A> VpnTunnelGetCall<'a, C, A> where C: BorrowMut, A: /// // Values shown here are possibly random and not representative ! /// let result = hub.vpn_tunnels().list("project", "region") /// .page_token("clita") -/// .max_results(26) -/// .filter("sea") +/// .max_results(62) +/// .filter("Stet") /// .doit(); /// # } /// ``` @@ -63137,7 +63257,7 @@ impl<'a, C, A> VpnTunnelListCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, VpnTunnelList)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -63216,8 +63336,7 @@ impl<'a, C, A> VpnTunnelListCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -63401,9 +63520,9 @@ impl<'a, C, A> VpnTunnelListCall<'a, C, A> where C: BorrowMut, A: /// // execute the final call using `doit()`. /// // Values shown here are possibly random and not representative ! /// let result = hub.vpn_tunnels().aggregated_list("project") -/// .page_token("tempor") -/// .max_results(87) -/// .filter("dolor") +/// .page_token("Stet") +/// .max_results(18) +/// .filter("Lorem") /// .doit(); /// # } /// ``` @@ -63428,7 +63547,7 @@ impl<'a, C, A> VpnTunnelAggregatedListCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, VpnTunnelAggregatedList)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -63506,8 +63625,7 @@ impl<'a, C, A> VpnTunnelAggregatedListCall<'a, C, A> where C: BorrowMut VpnTunnelAggregatedListCall<'a, C, A> where C: BorrowMut RegionOperationListCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, OperationList)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -63788,8 +63906,7 @@ impl<'a, C, A> RegionOperationListCall<'a, C, A> where C: BorrowMut RegionOperationDeleteCall<'a, C, A> where C: BorrowMut Result { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -64066,8 +64183,7 @@ impl<'a, C, A> RegionOperationDeleteCall<'a, C, A> where C: BorrowMut RegionOperationGetCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, Operation)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -64316,8 +64432,7 @@ impl<'a, C, A> RegionOperationGetCall<'a, C, A> where C: BorrowMut"] +description = "A complete library to interact with consumersurveys (protocol v2)" +repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/consumersurveys2-cli" +documentation = "http://byron.github.io/google-apis-rs/google_consumersurveys2_cli" +license = "MIT" +keywords = ["consumersurveys", "google", "cli"] + +[[bin]] +name = "consumersurveys2" + +[dependencies] +hyper = "0.8" +mime = "0.2.0" +serde = "0.6.0" +serde_json = "0.6.0" +yup-oauth2 = ">= 0.5.6" +strsim = "0.4" +yup-hyper-mock = "1.0" +clap = "2.0" + +[build-dependencies] +syntex = { version = "= 0.28" } +serde_codegen = { version = "= 0.6.13" } + + +[dependencies.google-consumersurveys2] +path = "../consumersurveys2" diff --git a/gen/consumersurveys2-cli/LICENSE.md b/gen/consumersurveys2-cli/LICENSE.md new file mode 100644 index 0000000000..ff523b4547 --- /dev/null +++ b/gen/consumersurveys2-cli/LICENSE.md @@ -0,0 +1,30 @@ + +The MIT License (MIT) +===================== + +Copyright © `2015-2016` `Sebastian Thiel` + +Permission is hereby granted, free of charge, to any person +obtaining a copy of this software and associated documentation +files (the “Software”), to deal in the Software without +restriction, including without limitation the rights to use, +copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following +conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. diff --git a/gen/consumersurveys2-cli/README.md b/gen/consumersurveys2-cli/README.md new file mode 100644 index 0000000000..feb67aa7ee --- /dev/null +++ b/gen/consumersurveys2-cli/README.md @@ -0,0 +1,117 @@ + +The `consumersurveys2` command-line interface *(CLI)* allows to use most features of the *Google consumersurveys* service from the comfort of your terminal. + +By default all output is printed to standard out, but flags can be set to direct it into a file independent of your shell's +capabilities. Errors will be printed to standard error, and cause the program's exit code to be non-zero. + +If data-structures are requested, these will be returned as pretty-printed JSON, to be useful as input to other tools. + +# Downloads + +You can download the pre-compiled 64bit binaries for the following platforms: + +* ![icon](http://megaicons.net/static/img/icons_sizes/6/140/16/ubuntu-icon.png) [ubuntu](http://dl.byronimo.de/google.rs/cli/0.3.4/ubuntu/consumersurveys2.tar.gz) +* ![icon](http://hydra-media.cursecdn.com/wow.gamepedia.com/a/a2/Apple-icon-16x16.png?version=25ddd67ac3dd3b634478e3978b76cb74) [osx](http://dl.byronimo.de/google.rs/cli/0.3.4/osx/consumersurveys2.tar.gz) + +Find the source code [on github](https://github.com/Byron/google-apis-rs/tree/master/gen/consumersurveys2-cli). + +# Usage + +This documentation was generated from the *consumersurveys* API at revision *20160405*. The CLI is at version *0.3.4*. + +```bash +consumersurveys2 [options] + results + get (-r )... [-p ]... [-o ] + surveys + get [-p ]... [-o ] + insert (-r )... [-p ]... [-o ] + list [-p ]... [-o ] + start [-p ]... [-o ] + stop [-p ]... [-o ] + update (-r )... [-p ]... [-o ] + consumersurveys2 --help + +Configuration: + [--scope ]... + Specify the authentication a method should be executed in. Each scope + requires the user to grant this application permission to use it. + If unset, it defaults to the shortest scope url for a particular method. + --config-dir + A directory into which we will store our persistent data. Defaults to + a user-writable directory that we will create during the first invocation. + [default: ~/.google-service-cli] + --debug + Output all server communication to standard error. `tx` and `rx` are placed + into the same stream. + --debug-auth + Output all communication related to authentication to standard error. `tx` + and `rx` are placed into the same stream. + +``` + +# Configuration + +The program will store all persistent data in the `~/.google-service-cli` directory in *JSON* files prefixed with `consumersurveys2-`. You can change the directory used to store configuration with the `--config-dir` flag on a per-invocation basis. + +More information about the various kinds of persistent data are given in the following paragraphs. + +# Authentication + +Most APIs require a user to authenticate any request. If this is the case, the [scope][scopes] determines the +set of permissions granted. The granularity of these is usually no more than *read-only* or *full-access*. + +If not set, the system will automatically select the smallest feasible scope, e.g. when invoking a +method that is read-only, it will ask only for a read-only scope. +You may use the `--scope` flag to specify a scope directly. +All applicable scopes are documented in the respective method's CLI documentation. + +The first time a scope is used, the user is asked for permission. Follow the instructions given +by the CLI to grant permissions, or to decline. + +If a scope was authenticated by the user, the respective information will be stored as *JSON* in the configuration +directory, e.g. `~/.google-service-cli/consumersurveys2-token-.json`. No manual management of these tokens +is necessary. + +To revoke granted authentication, please refer to the [official documentation][revoke-access]. + +# Application Secrets + +In order to allow any application to use Google services, it will need to be registered using the +[Google Developer Console][google-dev-console]. APIs the application may use are then enabled for it +one by one. Most APIs can be used for free and have a daily quota. + +To allow more comfortable usage of the CLI without forcing anyone to register an own application, the CLI +comes with a default application secret that is configured accordingly. This also means that heavy usage +all around the world may deplete the daily quota. + +You can workaround this limitation by putting your own secrets file at this location: +`~/.google-service-cli/consumersurveys2-secret.json`, assuming that the required *consumersurveys* API +was enabled for it. Such a secret file can be downloaded in the *Google Developer Console* at +*APIs & auth -> Credentials -> Download JSON* and used as is. + +Learn more about how to setup Google projects and enable APIs using the [official documentation][google-project-new]. + + +# Debugging + +Even though the CLI does its best to provide usable error messages, sometimes it might be desirable to know +what exactly led to a particular issue. This is done by allowing all client-server communication to be +output to standard error *as-is*. + +The `--debug` flag will print all client-server communication to standard error, whereas the `--debug-auth` flag +will cause all communication related to authentication to standard error. +If the `--debug` flag is set, error-results will be debug-printed, possibly yielding more information about the +issue at hand. + +You may consider redirecting standard error into a file for ease of use, e.g. `consumersurveys2 --debug [options] 2>debug.txt`. + + +[scopes]: https://developers.google.com/+/api/oauth#scopes +[revoke-access]: http://webapps.stackexchange.com/a/30849 +[google-dev-console]: https://console.developers.google.com/ +[google-project-new]: https://developers.google.com/console/help/new/ \ No newline at end of file diff --git a/gen/consumersurveys2-cli/mkdocs.yml b/gen/consumersurveys2-cli/mkdocs.yml new file mode 100644 index 0000000000..fc2d749b4e --- /dev/null +++ b/gen/consumersurveys2-cli/mkdocs.yml @@ -0,0 +1,23 @@ +site_name: consumersurveys v0.3.4+20160405 +site_url: http://byron.github.io/google-apis-rs/google-consumersurveys2-cli +site_description: Write integrating applications with bcore + +repo_url: https://github.com/Byron/google-apis-rs/tree/master/gen/consumersurveys2-cli + +docs_dir: docs +site_dir: build_html + +pages: +- ['index.md', 'Home'] +- ['results_get.md', 'Results', 'Get'] +- ['surveys_get.md', 'Surveys', 'Get'] +- ['surveys_insert.md', 'Surveys', 'Insert'] +- ['surveys_list.md', 'Surveys', 'List'] +- ['surveys_start.md', 'Surveys', 'Start'] +- ['surveys_stop.md', 'Surveys', 'Stop'] +- ['surveys_update.md', 'Surveys', 'Update'] + +theme: readthedocs + +copyright: Copyright © 2015-2016, `Sebastian Thiel` + diff --git a/gen/consumersurveys2-cli/src/cmn.rs b/gen/consumersurveys2-cli/src/cmn.rs new file mode 100644 index 0000000000..ae86fdef65 --- /dev/null +++ b/gen/consumersurveys2-cli/src/cmn.rs @@ -0,0 +1,721 @@ +// COPY OF 'src/rust/cli/cmn.rs' +// DO NOT EDIT +use oauth2::{ApplicationSecret, ConsoleApplicationSecret, TokenStorage, Token}; +use serde_json as json; +use serde_json::value::Value; +use mime::Mime; +use clap::{App, SubCommand}; +use strsim; + +use std::fs; +use std::env; +use std::io; +use std::fmt; +use std::path::{Path, PathBuf}; +use std::str::FromStr; +use std::string::ToString; +use std::io::{Write, Read, stdout}; + +use std::default::Default; + +const FIELD_SEP: char = '.'; + + +pub enum ComplexType { + Pod, + Vec, + Map, +} + + // Null, + // Bool(bool), + // I64(i64), + // U64(u64), + // F64(f64), + // String(String), + +pub enum JsonType { + Boolean, + Int, + Uint, + Float, + String, +} + +pub struct JsonTypeInfo { + pub jtype: JsonType, + pub ctype: ComplexType, +} + +// Based on @erickt user comment. Thanks for the idea ! +// Remove all keys whose values are null from given value (changed in place) +pub fn remove_json_null_values(value: &mut Value) { + match *value { + Value::Object(ref mut map) => { + let mut for_removal = Vec::new(); + + for (key, mut value) in map.iter_mut() { + if value.is_null() { + for_removal.push(key.clone()); + } else { + remove_json_null_values(&mut value); + } + } + + for key in &for_removal { + map.remove(key); + } + } + _ => {} + } +} + +fn did_you_mean<'a>(v: &str, possible_values: &[&'a str]) -> Option<&'a str> { + + let mut candidate: Option<(f64, &str)> = None; + for pv in possible_values { + let confidence = strsim::jaro_winkler(v, pv); + if confidence > 0.8 && (candidate.is_none() || (candidate.as_ref().unwrap().0 < confidence)) { + candidate = Some((confidence, pv)); + } + } + match candidate { + None => None, + Some((_, candidate)) => Some(candidate), + } +} + +pub enum CallType { + Upload(UploadProtocol), + Standard, +} + +arg_enum!{ + pub enum UploadProtocol { + Simple, + Resumable + } +} + +impl AsRef for UploadProtocol { + fn as_ref(&self) -> &str { + match *self { + UploadProtocol::Simple => "simple", + UploadProtocol::Resumable => "resumable" + } + } +} + +impl AsRef for CallType { + fn as_ref(&self) -> &str { + match *self { + CallType::Upload(ref proto) => proto.as_ref(), + CallType::Standard => "standard-request" + } + } +} + +#[derive(Clone, Default)] +pub struct FieldCursor(Vec); + +impl ToString for FieldCursor { + fn to_string(&self) -> String { + self.0.join(".") + } +} + +impl From<&'static str> for FieldCursor { + fn from(value: &'static str) -> FieldCursor { + let mut res = FieldCursor::default(); + res.set(value).unwrap(); + res + } +} + +impl FieldCursor { + pub fn set(&mut self, value: &str) -> Result<(), CLIError> { + if value.len() == 0 { + return Err(CLIError::Field(FieldError::Empty)) + } + + let mut first_is_field_sep = false; + let mut char_count: usize = 0; + let mut last_c = FIELD_SEP; + let mut num_conscutive_field_seps = 0; + + let mut field = String::new(); + let mut fields = self.0.clone(); + + let push_field = |fs: &mut Vec, f: &mut String| { + if f.len() > 0 { + fs.push(f.clone()); + f.truncate(0); + } + }; + + for (cid, c) in value.chars().enumerate() { + char_count += 1; + + if c == FIELD_SEP { + if cid == 0 { + first_is_field_sep = true; + } + num_conscutive_field_seps += 1; + if cid > 0 && last_c == FIELD_SEP { + if fields.pop().is_none() { + return Err(CLIError::Field(FieldError::PopOnEmpty(value.to_string()))) + } + } else { + push_field(&mut fields, &mut field); + } + } else { + num_conscutive_field_seps = 0; + if cid == 1 { + if first_is_field_sep { + fields.truncate(0); + } + } + field.push(c); + } + + last_c = c; + } + + push_field(&mut fields, &mut field); + + if char_count == 1 && first_is_field_sep { + fields.truncate(0); + } + if char_count > 1 && num_conscutive_field_seps == 1 { + return Err(CLIError::Field(FieldError::TrailingFieldSep(value.to_string()))) + } + + self.0 = fields; + Ok(()) + } + + pub fn did_you_mean(value: &str, possible_values: &[&str]) -> Option { + if value.len() == 0 { + return None + } + + let mut last_c = FIELD_SEP; + + let mut field = String::new(); + let mut output = String::new(); + + let push_field = |fs: &mut String, f: &mut String| { + if f.len() > 0 { + fs.push_str( + match did_you_mean(&f, possible_values) { + Some(candidate) => candidate, + None => &f, + }); + f.truncate(0); + } + }; + + for (cid, c) in value.chars().enumerate() { + if c == FIELD_SEP { + if last_c != FIELD_SEP { + push_field(&mut output, &mut field); + } + output.push(c); + } else { + field.push(c); + } + + last_c = c; + } + + push_field(&mut output, &mut field); + + if &output == value { + None + } else { + Some(output) + } + } + + pub fn set_json_value(&self, mut object: &mut Value, + value: &str, type_info: JsonTypeInfo, + err: &mut InvalidOptionsError, + orig_cursor: &FieldCursor) { + assert!(self.0.len() > 0); + + for field in &self.0[..self.0.len()-1] { + let tmp = object; + object = + match *tmp { + Value::Object(ref mut mapping) => { + mapping.entry(field.to_owned()).or_insert( + Value::Object(Default::default()) + ) + }, + _ => panic!("We don't expect non-object Values here ...") + }; + } + + match *object { + Value::Object(ref mut mapping) => { + let field = &self.0[self.0.len()-1]; + let to_jval = + |value: &str, jtype: JsonType, err: &mut InvalidOptionsError| + -> Value { + match jtype { + JsonType::Boolean => + Value::Bool(arg_from_str(value, err, &field, "boolean")), + JsonType::Int => + Value::I64(arg_from_str(value, err, &field, "int")), + JsonType::Uint => + Value::U64(arg_from_str(value, err, &field, "uint")), + JsonType::Float => + Value::F64(arg_from_str(value, err, &field, "float")), + JsonType::String => + Value::String(value.to_owned()), + } + }; + + match type_info.ctype { + ComplexType::Pod => { + if mapping.insert(field.to_owned(), to_jval(value, type_info.jtype, err)).is_some() { + err.issues.push(CLIError::Field(FieldError::Duplicate(orig_cursor.to_string()))); + } + }, + ComplexType::Vec => { + match *mapping.entry(field.to_owned()) + .or_insert(Value::Array(Default::default())) { + Value::Array(ref mut values) => values.push(to_jval(value, type_info.jtype, err)), + _ => unreachable!() + } + }, + ComplexType::Map => { + let (key, value) = parse_kv_arg(value, err, true); + let jval = to_jval(value.unwrap_or(""), type_info.jtype, err); + + match *mapping.entry(field.to_owned()) + .or_insert(Value::Object(Default::default())) { + Value::Object(ref mut value_map) => { + if value_map.insert(key.to_owned(), jval).is_some() { + err.issues.push(CLIError::Field(FieldError::Duplicate(orig_cursor.to_string()))); + } + } + _ => unreachable!() + } + } + } + }, + _ => unreachable!() + } + } + + pub fn num_fields(&self) -> usize { + self.0.len() + } +} + +pub fn parse_kv_arg<'a>(kv: &'a str, err: &mut InvalidOptionsError, for_hashmap: bool) + -> (&'a str, Option<&'a str>) { + let mut add_err = || err.issues.push(CLIError::InvalidKeyValueSyntax(kv.to_string(),for_hashmap)); + match kv.find('=') { + None => { + add_err(); + return (kv, None) + }, + Some(pos) => { + let key = &kv[..pos]; + if kv.len() <= pos + 1 { + add_err(); + return (key, Some("")) + } + (key, Some(&kv[pos+1..])) + } + } +} + +pub fn calltype_from_str(name: &str, valid_protocols: Vec, err: &mut InvalidOptionsError) -> CallType { + CallType::Upload( + match UploadProtocol::from_str(name) { + Ok(up) => up, + Err(msg) => { + err.issues.push(CLIError::InvalidUploadProtocol(name.to_string(), valid_protocols)); + UploadProtocol::Simple + } + }) +} + +pub fn input_file_from_opts(file_path: &str, err: &mut InvalidOptionsError) -> Option { + match fs::File::open(file_path) { + Ok(f) => Some(f), + Err(io_err) => { + err.issues.push(CLIError::Input(InputError::IOError((file_path.to_string(), io_err)))); + None + } + } +} + +pub fn input_mime_from_opts(mime: &str, err: &mut InvalidOptionsError) -> Option { + match mime.parse() { + Ok(m) => Some(m), + Err(_) => { + err.issues.push(CLIError::Input(InputError::Mime(mime.to_string()))); + None + } + } +} + +pub fn writer_from_opts(arg: Option<&str>) -> Result, io::Error> { + let f = arg.unwrap_or("-"); + match f { + "-" => Ok(Box::new(stdout())), + _ => match fs::OpenOptions::new().create(true).write(true).open(f) { + Ok(f) => Ok(Box::new(f)), + Err(io_err) => Err(io_err), + } + } +} + + +pub fn arg_from_str<'a, T>(arg: &str, err: &mut InvalidOptionsError, + arg_name: &'a str, + arg_type: &'a str) -> T + where T: FromStr + Default, + ::Err: fmt::Display { + match FromStr::from_str(arg) { + Err(perr) => { + err.issues.push( + CLIError::ParseError(arg_name.to_owned(), arg_type.to_owned(), arg.to_string(), format!("{}", perr)) + ); + Default::default() + }, + Ok(v) => v, + } +} + +pub struct JsonTokenStorage { + pub program_name: &'static str, + pub db_dir: String, +} + +impl JsonTokenStorage { + fn path(&self, scope_hash: u64) -> PathBuf { + Path::new(&self.db_dir).join(&format!("{}-token-{}.json", self.program_name, scope_hash)) + } +} + +impl TokenStorage for JsonTokenStorage { + type Error = json::Error; + + // NOTE: logging might be interesting, currently we swallow all errors + fn set(&mut self, scope_hash: u64, _: &Vec<&str>, token: Option) -> Result<(), json::Error> { + match token { + None => { + match fs::remove_file(self.path(scope_hash)) { + Err(err) => + match err.kind() { + io::ErrorKind::NotFound => Ok(()), + _ => Err(json::Error::IoError(err)) + }, + Ok(_) => Ok(()), + } + } + Some(token) => { + match fs::OpenOptions::new().create(true).write(true).open(&self.path(scope_hash)) { + Ok(mut f) => { + match json::to_writer_pretty(&mut f, &token) { + Ok(_) => Ok(()), + Err(serde_err) => Err(serde_err), + } + }, + Err(io_err) => Err(json::Error::IoError(io_err)) + } + } + } + } + + fn get(&self, scope_hash: u64, _: &Vec<&str>) -> Result, json::Error> { + match fs::File::open(&self.path(scope_hash)) { + Ok(f) => { + match json::de::from_reader(f) { + Ok(token) => Ok(Some(token)), + Err(err) => Err(err), + } + }, + Err(io_err) => { + match io_err.kind() { + io::ErrorKind::NotFound => Ok(None), + _ => Err(json::Error::IoError(io_err)) + } + } + } + } +} + + +#[derive(Debug)] +pub enum ApplicationSecretError { + DecoderError((String, json::Error)), + FormatError(String), +} + +impl fmt::Display for ApplicationSecretError { + fn fmt(&self, f: &mut fmt::Formatter) -> Result<(), fmt::Error> { + match *self { + ApplicationSecretError::DecoderError((ref path, ref err)) + => writeln!(f, "Could not decode file at '{}' with error: {}.", + path, err), + ApplicationSecretError::FormatError(ref path) + => writeln!(f, "'installed' field is unset in secret file at '{}'.", + path), + } + } +} + +#[derive(Debug)] +pub enum ConfigurationError { + DirectoryCreationFailed((String, io::Error)), + DirectoryUnset, + HomeExpansionFailed(String), + Secret(ApplicationSecretError), + IOError((String, io::Error)), +} + +impl fmt::Display for ConfigurationError { + fn fmt(&self, f: &mut fmt::Formatter) -> Result<(), fmt::Error> { + match *self { + ConfigurationError::DirectoryCreationFailed((ref dir, ref err)) + => writeln!(f, "Directory '{}' could not be created with error: {}.", dir, err), + ConfigurationError::DirectoryUnset + => writeln!(f, "--config-dir was unset or empty."), + ConfigurationError::HomeExpansionFailed(ref dir) + => writeln!(f, "Couldn't find HOME directory of current user, failed to expand '{}'.", dir), + ConfigurationError::Secret(ref err) + => writeln!(f, "Secret -> {}", err), + ConfigurationError::IOError((ref path, ref err)) + => writeln!(f, "IO operation failed on path '{}' with error: {}.", path, err), + } + } +} + +#[derive(Debug)] +pub enum InputError { + IOError((String, io::Error)), + Mime(String), +} + +impl fmt::Display for InputError { + fn fmt(&self, f: &mut fmt::Formatter) -> Result<(), fmt::Error> { + match *self { + InputError::IOError((ref file_path, ref io_err)) + => writeln!(f, "Failed to open '{}' for reading with error: {}.", file_path, io_err), + InputError::Mime(ref mime) + => writeln!(f, "'{}' is not a known mime-type.", mime), + } + } +} + +#[derive(Debug)] +pub enum FieldError { + PopOnEmpty(String), + TrailingFieldSep(String), + Unknown(String, Option, Option), + Duplicate(String), + Empty, +} + + +impl fmt::Display for FieldError { + fn fmt(&self, f: &mut fmt::Formatter) -> Result<(), fmt::Error> { + match *self { + FieldError::PopOnEmpty(ref field) + => writeln!(f, "'{}': Cannot move up on empty field cursor.", field), + FieldError::TrailingFieldSep(ref field) + => writeln!(f, "'{}': Single field separator may not be last character.", field), + FieldError::Unknown(ref field, ref suggestion, ref value) => { + let suffix = + match *suggestion { + Some(ref s) => { + let kv = + match *value { + Some(ref v) => format!("{}={}", s, v), + None => s.clone(), + }; + format!(" Did you mean '{}' ?", kv) + }, + None => String::new(), + }; + writeln!(f, "Field '{}' does not exist.{}", field, suffix) + }, + FieldError::Duplicate(ref cursor) + => writeln!(f, "Value at '{}' was already set", cursor), + FieldError::Empty + => writeln!(f, "Field names must not be empty."), + } + } +} + + +#[derive(Debug)] +pub enum CLIError { + Configuration(ConfigurationError), + ParseError(String, String, String, String), + UnknownParameter(String, Vec<&'static str>), + InvalidUploadProtocol(String, Vec), + InvalidKeyValueSyntax(String, bool), + Input(InputError), + Field(FieldError), + MissingCommandError, + MissingMethodError(String), +} + +impl fmt::Display for CLIError { + fn fmt(&self, f: &mut fmt::Formatter) -> Result<(), fmt::Error> { + match *self { + CLIError::Configuration(ref err) => write!(f, "Configuration -> {}", err), + CLIError::Input(ref err) => write!(f, "Input -> {}", err), + CLIError::Field(ref err) => write!(f, "Field -> {}", err), + CLIError::InvalidUploadProtocol(ref proto_name, ref valid_names) + => writeln!(f, "'{}' is not a valid upload protocol. Choose from one of {}.", proto_name, valid_names.join(", ")), + CLIError::ParseError(ref arg_name, ref type_name, ref value, ref err_desc) + => writeln!(f, "Failed to parse argument '{}' with value '{}' as {} with error: {}.", + arg_name, value, type_name, err_desc), + CLIError::UnknownParameter(ref param_name, ref possible_values) => { + let suffix = + match did_you_mean(param_name, &possible_values) { + Some(v) => format!(" Did you mean '{}' ?", v), + None => String::new(), + }; + write!(f, "Parameter '{}' is unknown.{}\n", param_name, suffix) + }, + CLIError::InvalidKeyValueSyntax(ref kv, is_hashmap) => { + let hashmap_info = if is_hashmap { "hashmap " } else { "" }; + writeln!(f, "'{}' does not match {}pattern =.", kv, hashmap_info) + }, + CLIError::MissingCommandError => writeln!(f, "Please specify the main sub-command."), + CLIError::MissingMethodError(ref cmd) => writeln!(f, "Please specify the method to call on the '{}' command.", cmd), + } + } +} + +#[derive(Debug)] +pub struct InvalidOptionsError { + pub issues: Vec, + pub exit_code: i32, +} + +impl fmt::Display for InvalidOptionsError { + fn fmt(&self, f: &mut fmt::Formatter) -> Result<(), fmt::Error> { + for issue in &self.issues { + try!(issue.fmt(f)); + } + Ok(()) + } +} + +impl InvalidOptionsError { + pub fn single(err: CLIError, exit_code: i32) -> InvalidOptionsError { + InvalidOptionsError { + issues: vec![err], + exit_code: exit_code, + } + } + + pub fn new() -> InvalidOptionsError { + InvalidOptionsError { + issues: Vec::new(), + exit_code: 1, + } + } +} + +pub fn assure_config_dir_exists(dir: &str) -> Result { + let trdir = dir.trim(); + if trdir.len() == 0 { + return Err(CLIError::Configuration(ConfigurationError::DirectoryUnset)) + } + + let expanded_config_dir = + if trdir.as_bytes()[0] == b'~' { + match env::var("HOME").ok().or(env::var("UserProfile").ok()) { + None => return Err(CLIError::Configuration(ConfigurationError::HomeExpansionFailed(trdir.to_string()))), + Some(mut user) => { + user.push_str(&trdir[1..]); + user + } + } + } else { + trdir.to_string() + }; + + if let Err(err) = fs::create_dir(&expanded_config_dir) { + if err.kind() != io::ErrorKind::AlreadyExists { + return Err(CLIError::Configuration( + ConfigurationError::DirectoryCreationFailed((expanded_config_dir, err)))) + } + } + + Ok(expanded_config_dir) +} + +pub fn application_secret_from_directory(dir: &str, + secret_basename: &str, + json_console_secret: &str) + -> Result { + let secret_path = Path::new(dir).join(secret_basename); + let secret_str = || secret_path.as_path().to_str().unwrap().to_string(); + let secret_io_error = |io_err: io::Error| { + Err(CLIError::Configuration(ConfigurationError::IOError( + (secret_str(), io_err) + ))) + }; + + for _ in 0..2 { + match fs::File::open(&secret_path) { + Err(mut err) => { + if err.kind() == io::ErrorKind::NotFound { + // Write our built-in one - user may adjust the written file at will + + err = match fs::OpenOptions::new().create(true).write(true).open(&secret_path) { + Err(cfe) => cfe, + Ok(mut f) => { + // Assure we convert 'ugly' json string into pretty one + let console_secret: ConsoleApplicationSecret + = json::from_str(json_console_secret).unwrap(); + match json::to_writer_pretty(&mut f, &console_secret) { + Err(serde_err) => match serde_err { + json::Error::IoError(err) => err, + _ => panic!("Unexpected serde error: {:#?}", serde_err) + }, + Ok(_) => continue, + } + } + }; + // fall through to IO error handling + } + return secret_io_error(err) + }, + Ok(f) => { + match json::de::from_reader::<_, ConsoleApplicationSecret>(f) { + Err(json::Error::IoError(err)) => + return secret_io_error(err), + Err(json_err) => + return Err(CLIError::Configuration( + ConfigurationError::Secret( + ApplicationSecretError::DecoderError( + (secret_str(), json_err) + )))), + Ok(console_secret) => + match console_secret.installed { + Some(secret) => return Ok(secret), + None => return Err( + CLIError::Configuration( + ConfigurationError::Secret( + ApplicationSecretError::FormatError(secret_str()) + ))) + }, + } + } + } + } + unreachable!(); +} diff --git a/gen/consumersurveys2-cli/src/main.rs b/gen/consumersurveys2-cli/src/main.rs new file mode 100644 index 0000000000..d353e25f51 --- /dev/null +++ b/gen/consumersurveys2-cli/src/main.rs @@ -0,0 +1,945 @@ +// DO NOT EDIT ! +// This file was generated automatically from 'src/mako/cli/main.rs.mako' +// DO NOT EDIT ! +#![allow(unused_variables, unused_imports, dead_code, unused_mut)] + +#[macro_use] +extern crate clap; +extern crate yup_oauth2 as oauth2; +extern crate yup_hyper_mock as mock; +extern crate serde; +extern crate serde_json; +extern crate hyper; +extern crate mime; +extern crate strsim; +extern crate google_consumersurveys2 as api; + +use std::env; +use std::io::{self, Write}; +use clap::{App, SubCommand, Arg}; + +mod cmn; + +use cmn::{InvalidOptionsError, CLIError, JsonTokenStorage, arg_from_str, writer_from_opts, parse_kv_arg, + input_file_from_opts, input_mime_from_opts, FieldCursor, FieldError, CallType, UploadProtocol, + calltype_from_str, remove_json_null_values, ComplexType, JsonType, JsonTypeInfo}; + +use std::default::Default; +use std::str::FromStr; + +use oauth2::{Authenticator, DefaultAuthenticatorDelegate}; +use serde_json as json; +use clap::ArgMatches; + +enum DoitError { + IoError(String, io::Error), + ApiError(api::Error), +} + +struct Engine<'n> { + opt: ArgMatches<'n>, + hub: api::Consumersurveys>, + gp: Vec<&'static str>, + gpm: Vec<(&'static str, &'static str)>, +} + + +impl<'n> Engine<'n> { + fn _results_get(&self, opt: &ArgMatches<'n>, dry_run: bool, err: &mut InvalidOptionsError) + -> Result<(), DoitError> { + + let mut field_cursor = FieldCursor::default(); + let mut object = json::value::Value::Object(Default::default()); + + for kvarg in opt.values_of("kv").map(|i|i.collect()).unwrap_or(Vec::new()).iter() { + let last_errc = err.issues.len(); + let (key, value) = parse_kv_arg(&*kvarg, err, false); + let mut temp_cursor = field_cursor.clone(); + if let Err(field_err) = temp_cursor.set(&*key) { + err.issues.push(field_err); + } + if value.is_none() { + field_cursor = temp_cursor.clone(); + if err.issues.len() > last_errc { + err.issues.remove(last_errc); + } + continue; + } + + let type_info: Option<(&'static str, JsonTypeInfo)> = + match &temp_cursor.to_string()[..] { + "result-mask.projection" => Some(("resultMask.projection", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + _ => { + let suggestion = FieldCursor::did_you_mean(key, &vec!["projection", "result-mask"]); + err.issues.push(CLIError::Field(FieldError::Unknown(temp_cursor.to_string(), suggestion, value.map(|v| v.to_string())))); + None + } + }; + if let Some((field_cursor_str, type_info)) = type_info { + FieldCursor::from(field_cursor_str).set_json_value(&mut object, value.unwrap(), type_info, err, &temp_cursor); + } + } + let mut request: api::ResultsGetRequest = json::value::from_value(object).unwrap(); + let mut download_mode = false; + let mut call = self.hub.results().get(request, opt.value_of("survey-url-id").unwrap_or("")); + for parg in opt.values_of("v").map(|i|i.collect()).unwrap_or(Vec::new()).iter() { + let (key, value) = parse_kv_arg(&*parg, err, false); + match key { + _ => { + let mut found = false; + for param in &self.gp { + if key == *param { + if key == "alt" && value.unwrap_or("unset") == "media" { + download_mode = true; + } + found = true; + call = call.param(self.gpm.iter().find(|t| t.0 == key).unwrap_or(&("", key)).1, value.unwrap_or("unset")); + break; + } + } + if !found { + err.issues.push(CLIError::UnknownParameter(key.to_string(), + {let mut v = Vec::new(); + v.extend(self.gp.iter().map(|v|*v)); + v } )); + } + } + } + } + let protocol = CallType::Standard; + if dry_run { + Ok(()) + } else { + assert!(err.issues.len() == 0); + for scope in self.opt.values_of("url").map(|i|i.collect()).unwrap_or(Vec::new()).iter() { + call = call.add_scope(scope); + } + let mut ostream = match writer_from_opts(opt.value_of("out")) { + Ok(mut f) => f, + Err(io_err) => return Err(DoitError::IoError(opt.value_of("out").unwrap_or("-").to_string(), io_err)), + }; + match match protocol { + CallType::Standard => call.doit(), + _ => unreachable!() + } { + Err(api_err) => Err(DoitError::ApiError(api_err)), + Ok((mut response, output_schema)) => { + if !download_mode { + let mut value = json::value::to_value(&output_schema); + remove_json_null_values(&mut value); + json::to_writer_pretty(&mut ostream, &value).unwrap(); + ostream.flush().unwrap(); + } else { + io::copy(&mut response, &mut ostream).unwrap(); + ostream.flush().unwrap(); + } + Ok(()) + } + } + } + } + + fn _surveys_get(&self, opt: &ArgMatches<'n>, dry_run: bool, err: &mut InvalidOptionsError) + -> Result<(), DoitError> { + let mut call = self.hub.surveys().get(opt.value_of("survey-url-id").unwrap_or("")); + for parg in opt.values_of("v").map(|i|i.collect()).unwrap_or(Vec::new()).iter() { + let (key, value) = parse_kv_arg(&*parg, err, false); + match key { + _ => { + let mut found = false; + for param in &self.gp { + if key == *param { + found = true; + call = call.param(self.gpm.iter().find(|t| t.0 == key).unwrap_or(&("", key)).1, value.unwrap_or("unset")); + break; + } + } + if !found { + err.issues.push(CLIError::UnknownParameter(key.to_string(), + {let mut v = Vec::new(); + v.extend(self.gp.iter().map(|v|*v)); + v } )); + } + } + } + } + let protocol = CallType::Standard; + if dry_run { + Ok(()) + } else { + assert!(err.issues.len() == 0); + for scope in self.opt.values_of("url").map(|i|i.collect()).unwrap_or(Vec::new()).iter() { + call = call.add_scope(scope); + } + let mut ostream = match writer_from_opts(opt.value_of("out")) { + Ok(mut f) => f, + Err(io_err) => return Err(DoitError::IoError(opt.value_of("out").unwrap_or("-").to_string(), io_err)), + }; + match match protocol { + CallType::Standard => call.doit(), + _ => unreachable!() + } { + Err(api_err) => Err(DoitError::ApiError(api_err)), + Ok((mut response, output_schema)) => { + let mut value = json::value::to_value(&output_schema); + remove_json_null_values(&mut value); + json::to_writer_pretty(&mut ostream, &value).unwrap(); + ostream.flush().unwrap(); + Ok(()) + } + } + } + } + + fn _surveys_insert(&self, opt: &ArgMatches<'n>, dry_run: bool, err: &mut InvalidOptionsError) + -> Result<(), DoitError> { + + let mut field_cursor = FieldCursor::default(); + let mut object = json::value::Value::Object(Default::default()); + + for kvarg in opt.values_of("kv").map(|i|i.collect()).unwrap_or(Vec::new()).iter() { + let last_errc = err.issues.len(); + let (key, value) = parse_kv_arg(&*kvarg, err, false); + let mut temp_cursor = field_cursor.clone(); + if let Err(field_err) = temp_cursor.set(&*key) { + err.issues.push(field_err); + } + if value.is_none() { + field_cursor = temp_cursor.clone(); + if err.issues.len() > last_errc { + err.issues.remove(last_errc); + } + continue; + } + + let type_info: Option<(&'static str, JsonTypeInfo)> = + match &temp_cursor.to_string()[..] { + "owners" => Some(("owners", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Vec })), + "description" => Some(("description", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "title" => Some(("title", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "customer-data" => Some(("customerData", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "state" => Some(("state", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "audience.country-subdivision" => Some(("audience.countrySubdivision", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "audience.country" => Some(("audience.country", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "audience.ages" => Some(("audience.ages", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Vec })), + "audience.population-source" => Some(("audience.populationSource", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "audience.languages" => Some(("audience.languages", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Vec })), + "audience.gender" => Some(("audience.gender", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "cost.nanos" => Some(("cost.nanos", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "cost.currency-code" => Some(("cost.currencyCode", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "survey-url-id" => Some(("surveyUrlId", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "wanted-response-count" => Some(("wantedResponseCount", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), + _ => { + let suggestion = FieldCursor::did_you_mean(key, &vec!["ages", "audience", "cost", "country", "country-subdivision", "currency-code", "customer-data", "description", "gender", "languages", "nanos", "owners", "population-source", "state", "survey-url-id", "title", "wanted-response-count"]); + err.issues.push(CLIError::Field(FieldError::Unknown(temp_cursor.to_string(), suggestion, value.map(|v| v.to_string())))); + None + } + }; + if let Some((field_cursor_str, type_info)) = type_info { + FieldCursor::from(field_cursor_str).set_json_value(&mut object, value.unwrap(), type_info, err, &temp_cursor); + } + } + let mut request: api::Survey = json::value::from_value(object).unwrap(); + let mut call = self.hub.surveys().insert(request); + for parg in opt.values_of("v").map(|i|i.collect()).unwrap_or(Vec::new()).iter() { + let (key, value) = parse_kv_arg(&*parg, err, false); + match key { + _ => { + let mut found = false; + for param in &self.gp { + if key == *param { + found = true; + call = call.param(self.gpm.iter().find(|t| t.0 == key).unwrap_or(&("", key)).1, value.unwrap_or("unset")); + break; + } + } + if !found { + err.issues.push(CLIError::UnknownParameter(key.to_string(), + {let mut v = Vec::new(); + v.extend(self.gp.iter().map(|v|*v)); + v } )); + } + } + } + } + let protocol = CallType::Standard; + if dry_run { + Ok(()) + } else { + assert!(err.issues.len() == 0); + for scope in self.opt.values_of("url").map(|i|i.collect()).unwrap_or(Vec::new()).iter() { + call = call.add_scope(scope); + } + let mut ostream = match writer_from_opts(opt.value_of("out")) { + Ok(mut f) => f, + Err(io_err) => return Err(DoitError::IoError(opt.value_of("out").unwrap_or("-").to_string(), io_err)), + }; + match match protocol { + CallType::Standard => call.doit(), + _ => unreachable!() + } { + Err(api_err) => Err(DoitError::ApiError(api_err)), + Ok((mut response, output_schema)) => { + let mut value = json::value::to_value(&output_schema); + remove_json_null_values(&mut value); + json::to_writer_pretty(&mut ostream, &value).unwrap(); + ostream.flush().unwrap(); + Ok(()) + } + } + } + } + + fn _surveys_list(&self, opt: &ArgMatches<'n>, dry_run: bool, err: &mut InvalidOptionsError) + -> Result<(), DoitError> { + let mut call = self.hub.surveys().list(); + for parg in opt.values_of("v").map(|i|i.collect()).unwrap_or(Vec::new()).iter() { + let (key, value) = parse_kv_arg(&*parg, err, false); + match key { + "token" => { + call = call.token(value.unwrap_or("")); + }, + "start-index" => { + call = call.start_index(arg_from_str(value.unwrap_or("-0"), err, "start-index", "integer")); + }, + "max-results" => { + call = call.max_results(arg_from_str(value.unwrap_or("-0"), err, "max-results", "integer")); + }, + _ => { + let mut found = false; + for param in &self.gp { + if key == *param { + found = true; + call = call.param(self.gpm.iter().find(|t| t.0 == key).unwrap_or(&("", key)).1, value.unwrap_or("unset")); + break; + } + } + if !found { + err.issues.push(CLIError::UnknownParameter(key.to_string(), + {let mut v = Vec::new(); + v.extend(self.gp.iter().map(|v|*v)); + v.extend(["token", "start-index", "max-results"].iter().map(|v|*v)); + v } )); + } + } + } + } + let protocol = CallType::Standard; + if dry_run { + Ok(()) + } else { + assert!(err.issues.len() == 0); + for scope in self.opt.values_of("url").map(|i|i.collect()).unwrap_or(Vec::new()).iter() { + call = call.add_scope(scope); + } + let mut ostream = match writer_from_opts(opt.value_of("out")) { + Ok(mut f) => f, + Err(io_err) => return Err(DoitError::IoError(opt.value_of("out").unwrap_or("-").to_string(), io_err)), + }; + match match protocol { + CallType::Standard => call.doit(), + _ => unreachable!() + } { + Err(api_err) => Err(DoitError::ApiError(api_err)), + Ok((mut response, output_schema)) => { + let mut value = json::value::to_value(&output_schema); + remove_json_null_values(&mut value); + json::to_writer_pretty(&mut ostream, &value).unwrap(); + ostream.flush().unwrap(); + Ok(()) + } + } + } + } + + fn _surveys_start(&self, opt: &ArgMatches<'n>, dry_run: bool, err: &mut InvalidOptionsError) + -> Result<(), DoitError> { + let mut call = self.hub.surveys().start(opt.value_of("resource-id").unwrap_or("")); + for parg in opt.values_of("v").map(|i|i.collect()).unwrap_or(Vec::new()).iter() { + let (key, value) = parse_kv_arg(&*parg, err, false); + match key { + _ => { + let mut found = false; + for param in &self.gp { + if key == *param { + found = true; + call = call.param(self.gpm.iter().find(|t| t.0 == key).unwrap_or(&("", key)).1, value.unwrap_or("unset")); + break; + } + } + if !found { + err.issues.push(CLIError::UnknownParameter(key.to_string(), + {let mut v = Vec::new(); + v.extend(self.gp.iter().map(|v|*v)); + v } )); + } + } + } + } + let protocol = CallType::Standard; + if dry_run { + Ok(()) + } else { + assert!(err.issues.len() == 0); + for scope in self.opt.values_of("url").map(|i|i.collect()).unwrap_or(Vec::new()).iter() { + call = call.add_scope(scope); + } + let mut ostream = match writer_from_opts(opt.value_of("out")) { + Ok(mut f) => f, + Err(io_err) => return Err(DoitError::IoError(opt.value_of("out").unwrap_or("-").to_string(), io_err)), + }; + match match protocol { + CallType::Standard => call.doit(), + _ => unreachable!() + } { + Err(api_err) => Err(DoitError::ApiError(api_err)), + Ok((mut response, output_schema)) => { + let mut value = json::value::to_value(&output_schema); + remove_json_null_values(&mut value); + json::to_writer_pretty(&mut ostream, &value).unwrap(); + ostream.flush().unwrap(); + Ok(()) + } + } + } + } + + fn _surveys_stop(&self, opt: &ArgMatches<'n>, dry_run: bool, err: &mut InvalidOptionsError) + -> Result<(), DoitError> { + let mut call = self.hub.surveys().stop(opt.value_of("resource-id").unwrap_or("")); + for parg in opt.values_of("v").map(|i|i.collect()).unwrap_or(Vec::new()).iter() { + let (key, value) = parse_kv_arg(&*parg, err, false); + match key { + _ => { + let mut found = false; + for param in &self.gp { + if key == *param { + found = true; + call = call.param(self.gpm.iter().find(|t| t.0 == key).unwrap_or(&("", key)).1, value.unwrap_or("unset")); + break; + } + } + if !found { + err.issues.push(CLIError::UnknownParameter(key.to_string(), + {let mut v = Vec::new(); + v.extend(self.gp.iter().map(|v|*v)); + v } )); + } + } + } + } + let protocol = CallType::Standard; + if dry_run { + Ok(()) + } else { + assert!(err.issues.len() == 0); + for scope in self.opt.values_of("url").map(|i|i.collect()).unwrap_or(Vec::new()).iter() { + call = call.add_scope(scope); + } + let mut ostream = match writer_from_opts(opt.value_of("out")) { + Ok(mut f) => f, + Err(io_err) => return Err(DoitError::IoError(opt.value_of("out").unwrap_or("-").to_string(), io_err)), + }; + match match protocol { + CallType::Standard => call.doit(), + _ => unreachable!() + } { + Err(api_err) => Err(DoitError::ApiError(api_err)), + Ok((mut response, output_schema)) => { + let mut value = json::value::to_value(&output_schema); + remove_json_null_values(&mut value); + json::to_writer_pretty(&mut ostream, &value).unwrap(); + ostream.flush().unwrap(); + Ok(()) + } + } + } + } + + fn _surveys_update(&self, opt: &ArgMatches<'n>, dry_run: bool, err: &mut InvalidOptionsError) + -> Result<(), DoitError> { + + let mut field_cursor = FieldCursor::default(); + let mut object = json::value::Value::Object(Default::default()); + + for kvarg in opt.values_of("kv").map(|i|i.collect()).unwrap_or(Vec::new()).iter() { + let last_errc = err.issues.len(); + let (key, value) = parse_kv_arg(&*kvarg, err, false); + let mut temp_cursor = field_cursor.clone(); + if let Err(field_err) = temp_cursor.set(&*key) { + err.issues.push(field_err); + } + if value.is_none() { + field_cursor = temp_cursor.clone(); + if err.issues.len() > last_errc { + err.issues.remove(last_errc); + } + continue; + } + + let type_info: Option<(&'static str, JsonTypeInfo)> = + match &temp_cursor.to_string()[..] { + "owners" => Some(("owners", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Vec })), + "description" => Some(("description", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "title" => Some(("title", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "customer-data" => Some(("customerData", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "state" => Some(("state", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "audience.country-subdivision" => Some(("audience.countrySubdivision", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "audience.country" => Some(("audience.country", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "audience.ages" => Some(("audience.ages", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Vec })), + "audience.population-source" => Some(("audience.populationSource", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "audience.languages" => Some(("audience.languages", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Vec })), + "audience.gender" => Some(("audience.gender", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "cost.nanos" => Some(("cost.nanos", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "cost.currency-code" => Some(("cost.currencyCode", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "survey-url-id" => Some(("surveyUrlId", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "wanted-response-count" => Some(("wantedResponseCount", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), + _ => { + let suggestion = FieldCursor::did_you_mean(key, &vec!["ages", "audience", "cost", "country", "country-subdivision", "currency-code", "customer-data", "description", "gender", "languages", "nanos", "owners", "population-source", "state", "survey-url-id", "title", "wanted-response-count"]); + err.issues.push(CLIError::Field(FieldError::Unknown(temp_cursor.to_string(), suggestion, value.map(|v| v.to_string())))); + None + } + }; + if let Some((field_cursor_str, type_info)) = type_info { + FieldCursor::from(field_cursor_str).set_json_value(&mut object, value.unwrap(), type_info, err, &temp_cursor); + } + } + let mut request: api::Survey = json::value::from_value(object).unwrap(); + let mut call = self.hub.surveys().update(request, opt.value_of("survey-url-id").unwrap_or("")); + for parg in opt.values_of("v").map(|i|i.collect()).unwrap_or(Vec::new()).iter() { + let (key, value) = parse_kv_arg(&*parg, err, false); + match key { + _ => { + let mut found = false; + for param in &self.gp { + if key == *param { + found = true; + call = call.param(self.gpm.iter().find(|t| t.0 == key).unwrap_or(&("", key)).1, value.unwrap_or("unset")); + break; + } + } + if !found { + err.issues.push(CLIError::UnknownParameter(key.to_string(), + {let mut v = Vec::new(); + v.extend(self.gp.iter().map(|v|*v)); + v } )); + } + } + } + } + let protocol = CallType::Standard; + if dry_run { + Ok(()) + } else { + assert!(err.issues.len() == 0); + for scope in self.opt.values_of("url").map(|i|i.collect()).unwrap_or(Vec::new()).iter() { + call = call.add_scope(scope); + } + let mut ostream = match writer_from_opts(opt.value_of("out")) { + Ok(mut f) => f, + Err(io_err) => return Err(DoitError::IoError(opt.value_of("out").unwrap_or("-").to_string(), io_err)), + }; + match match protocol { + CallType::Standard => call.doit(), + _ => unreachable!() + } { + Err(api_err) => Err(DoitError::ApiError(api_err)), + Ok((mut response, output_schema)) => { + let mut value = json::value::to_value(&output_schema); + remove_json_null_values(&mut value); + json::to_writer_pretty(&mut ostream, &value).unwrap(); + ostream.flush().unwrap(); + Ok(()) + } + } + } + } + + fn _doit(&self, dry_run: bool) -> Result, Option> { + let mut err = InvalidOptionsError::new(); + let mut call_result: Result<(), DoitError> = Ok(()); + let mut err_opt: Option = None; + match self.opt.subcommand() { + ("results", Some(opt)) => { + match opt.subcommand() { + ("get", Some(opt)) => { + call_result = self._results_get(opt, dry_run, &mut err); + }, + _ => { + err.issues.push(CLIError::MissingMethodError("results".to_string())); + writeln!(io::stderr(), "{}\n", opt.usage()).ok(); + } + } + }, + ("surveys", Some(opt)) => { + match opt.subcommand() { + ("get", Some(opt)) => { + call_result = self._surveys_get(opt, dry_run, &mut err); + }, + ("insert", Some(opt)) => { + call_result = self._surveys_insert(opt, dry_run, &mut err); + }, + ("list", Some(opt)) => { + call_result = self._surveys_list(opt, dry_run, &mut err); + }, + ("start", Some(opt)) => { + call_result = self._surveys_start(opt, dry_run, &mut err); + }, + ("stop", Some(opt)) => { + call_result = self._surveys_stop(opt, dry_run, &mut err); + }, + ("update", Some(opt)) => { + call_result = self._surveys_update(opt, dry_run, &mut err); + }, + _ => { + err.issues.push(CLIError::MissingMethodError("surveys".to_string())); + writeln!(io::stderr(), "{}\n", opt.usage()).ok(); + } + } + }, + _ => { + err.issues.push(CLIError::MissingCommandError); + writeln!(io::stderr(), "{}\n", self.opt.usage()).ok(); + } + } + + if dry_run { + if err.issues.len() > 0 { + err_opt = Some(err); + } + Err(err_opt) + } else { + Ok(call_result) + } + } + + // Please note that this call will fail if any part of the opt can't be handled + fn new(opt: ArgMatches<'n>) -> Result, InvalidOptionsError> { + let (config_dir, secret) = { + let config_dir = match cmn::assure_config_dir_exists(opt.value_of("folder").unwrap_or("~/.google-service-cli")) { + Err(e) => return Err(InvalidOptionsError::single(e, 3)), + Ok(p) => p, + }; + + match cmn::application_secret_from_directory(&config_dir, "consumersurveys2-secret.json", + "{\"installed\":{\"auth_uri\":\"https://accounts.google.com/o/oauth2/auth\",\"client_secret\":\"hCsslbCUyfehWMmbkG8vTYxG\",\"token_uri\":\"https://accounts.google.com/o/oauth2/token\",\"client_email\":\"\",\"redirect_uris\":[\"urn:ietf:wg:oauth:2.0:oob\",\"oob\"],\"client_x509_cert_url\":\"\",\"client_id\":\"620010449518-9ngf7o4dhs0dka470npqvor6dc5lqb9b.apps.googleusercontent.com\",\"auth_provider_x509_cert_url\":\"https://www.googleapis.com/oauth2/v1/certs\"}}") { + Ok(secret) => (config_dir, secret), + Err(e) => return Err(InvalidOptionsError::single(e, 4)) + } + }; + + let auth = Authenticator::new( &secret, DefaultAuthenticatorDelegate, + if opt.is_present("debug-auth") { + hyper::Client::with_connector(mock::TeeConnector { + connector: hyper::net::HttpsConnector::::default() + }) + } else { + hyper::Client::new() + }, + JsonTokenStorage { + program_name: "consumersurveys2", + db_dir: config_dir.clone(), + }, None); + + let client = + if opt.is_present("debug") { + hyper::Client::with_connector(mock::TeeConnector { + connector: hyper::net::HttpsConnector::::default() + }) + } else { + hyper::Client::new() + }; + let engine = Engine { + opt: opt, + hub: api::Consumersurveys::new(client, auth), + gp: vec!["alt", "fields", "key", "oauth-token", "pretty-print", "quota-user", "user-ip"], + gpm: vec![ + ("oauth-token", "oauth_token"), + ("pretty-print", "prettyPrint"), + ("quota-user", "quotaUser"), + ("user-ip", "userIp"), + ] + }; + + match engine._doit(true) { + Err(Some(err)) => Err(err), + Err(None) => Ok(engine), + Ok(_) => unreachable!(), + } + } + + fn doit(&self) -> Result<(), DoitError> { + match self._doit(false) { + Ok(res) => res, + Err(_) => unreachable!(), + } + } +} + +fn main() { + let mut exit_status = 0i32; + let arg_data = [ + ("results", "methods: 'get'", vec![ + ("get", + Some(r##"Retrieves any survey results that have been produced so far. Results are formatted as an Excel file."##), + "Details at http://byron.github.io/google-apis-rs/google_consumersurveys2_cli/results_get", + vec![ + (Some(r##"survey-url-id"##), + None, + Some(r##"External URL ID for the survey."##), + Some(true), + Some(false)), + + (Some(r##"kv"##), + Some(r##"r"##), + Some(r##"Set various fields of the request structure, matching the key=value form"##), + Some(true), + Some(true)), + + (Some(r##"v"##), + Some(r##"p"##), + Some(r##"Set various optional parameters, matching the key=value form"##), + Some(false), + Some(true)), + + (Some(r##"out"##), + Some(r##"o"##), + Some(r##"Specify the file into which to write the program's output"##), + Some(false), + Some(false)), + ]), + ]), + + ("surveys", "methods: 'get', 'insert', 'list', 'start', 'stop' and 'update'", vec![ + ("get", + Some(r##"Retrieves information about the specified survey."##), + "Details at http://byron.github.io/google-apis-rs/google_consumersurveys2_cli/surveys_get", + vec![ + (Some(r##"survey-url-id"##), + None, + Some(r##"External URL ID for the survey."##), + Some(true), + Some(false)), + + (Some(r##"v"##), + Some(r##"p"##), + Some(r##"Set various optional parameters, matching the key=value form"##), + Some(false), + Some(true)), + + (Some(r##"out"##), + Some(r##"o"##), + Some(r##"Specify the file into which to write the program's output"##), + Some(false), + Some(false)), + ]), + ("insert", + Some(r##"Creates a survey."##), + "Details at http://byron.github.io/google-apis-rs/google_consumersurveys2_cli/surveys_insert", + vec![ + (Some(r##"kv"##), + Some(r##"r"##), + Some(r##"Set various fields of the request structure, matching the key=value form"##), + Some(true), + Some(true)), + + (Some(r##"v"##), + Some(r##"p"##), + Some(r##"Set various optional parameters, matching the key=value form"##), + Some(false), + Some(true)), + + (Some(r##"out"##), + Some(r##"o"##), + Some(r##"Specify the file into which to write the program's output"##), + Some(false), + Some(false)), + ]), + ("list", + Some(r##"Lists the surveys owned by the authenticated user."##), + "Details at http://byron.github.io/google-apis-rs/google_consumersurveys2_cli/surveys_list", + vec![ + (Some(r##"v"##), + Some(r##"p"##), + Some(r##"Set various optional parameters, matching the key=value form"##), + Some(false), + Some(true)), + + (Some(r##"out"##), + Some(r##"o"##), + Some(r##"Specify the file into which to write the program's output"##), + Some(false), + Some(false)), + ]), + ("start", + Some(r##"Begins running a survey."##), + "Details at http://byron.github.io/google-apis-rs/google_consumersurveys2_cli/surveys_start", + vec![ + (Some(r##"resource-id"##), + None, + None, + Some(true), + Some(false)), + + (Some(r##"v"##), + Some(r##"p"##), + Some(r##"Set various optional parameters, matching the key=value form"##), + Some(false), + Some(true)), + + (Some(r##"out"##), + Some(r##"o"##), + Some(r##"Specify the file into which to write the program's output"##), + Some(false), + Some(false)), + ]), + ("stop", + Some(r##"Stops a running survey."##), + "Details at http://byron.github.io/google-apis-rs/google_consumersurveys2_cli/surveys_stop", + vec![ + (Some(r##"resource-id"##), + None, + None, + Some(true), + Some(false)), + + (Some(r##"v"##), + Some(r##"p"##), + Some(r##"Set various optional parameters, matching the key=value form"##), + Some(false), + Some(true)), + + (Some(r##"out"##), + Some(r##"o"##), + Some(r##"Specify the file into which to write the program's output"##), + Some(false), + Some(false)), + ]), + ("update", + Some(r##"Updates a survey. Currently the only property that can be updated is the owners property."##), + "Details at http://byron.github.io/google-apis-rs/google_consumersurveys2_cli/surveys_update", + vec![ + (Some(r##"survey-url-id"##), + None, + Some(r##"External URL ID for the survey."##), + Some(true), + Some(false)), + + (Some(r##"kv"##), + Some(r##"r"##), + Some(r##"Set various fields of the request structure, matching the key=value form"##), + Some(true), + Some(true)), + + (Some(r##"v"##), + Some(r##"p"##), + Some(r##"Set various optional parameters, matching the key=value form"##), + Some(false), + Some(true)), + + (Some(r##"out"##), + Some(r##"o"##), + Some(r##"Specify the file into which to write the program's output"##), + Some(false), + Some(false)), + ]), + ]), + + ]; + + let mut app = App::new("consumersurveys2") + .author("Sebastian Thiel ") + .version("0.3.4+20160405") + .about("API for Google Consumer Surveys.") + .after_help("All documentation details can be found at http://byron.github.io/google-apis-rs/google_consumersurveys2_cli") + .arg(Arg::with_name("url") + .long("scope") + .help("Specify the authentication a method should be executed in. Each scope requires the user to grant this application permission to use it.If unset, it defaults to the shortest scope url for a particular method.") + .multiple(true) + .takes_value(true)) + .arg(Arg::with_name("folder") + .long("config-dir") + .help("A directory into which we will store our persistent data. Defaults to a user-writable directory that we will create during the first invocation.[default: ~/.google-service-cli") + .multiple(false) + .takes_value(true)) + .arg(Arg::with_name("debug") + .long("debug") + .help("Output all server communication to standard error. `tx` and `rx` are placed into the same stream.") + .multiple(false) + .takes_value(false)) + .arg(Arg::with_name("debug-auth") + .long("debug-auth") + .help("Output all communication related to authentication to standard error. `tx` and `rx` are placed into the same stream.") + .multiple(false) + .takes_value(false)); + + for &(main_command_name, about, ref subcommands) in arg_data.iter() { + let mut mcmd = SubCommand::with_name(main_command_name).about(about); + + for &(sub_command_name, ref desc, url_info, ref args) in subcommands { + let mut scmd = SubCommand::with_name(sub_command_name); + if let &Some(desc) = desc { + scmd = scmd.about(desc); + } + scmd = scmd.after_help(url_info); + + for &(ref arg_name, ref flag, ref desc, ref required, ref multi) in args { + let arg_name_str = + match (arg_name, flag) { + (&Some(an), _ ) => an, + (_ , &Some(f)) => f, + _ => unreachable!(), + }; + let mut arg = Arg::with_name(arg_name_str) + .empty_values(false); + if let &Some(short_flag) = flag { + arg = arg.short(short_flag); + } + if let &Some(desc) = desc { + arg = arg.help(desc); + } + if arg_name.is_some() && flag.is_some() { + arg = arg.takes_value(true); + } + if let &Some(required) = required { + arg = arg.required(required); + } + if let &Some(multi) = multi { + arg = arg.multiple(multi); + } + scmd = scmd.arg(arg); + } + mcmd = mcmd.subcommand(scmd); + } + app = app.subcommand(mcmd); + } + + let matches = app.get_matches(); + + let debug = matches.is_present("debug"); + match Engine::new(matches) { + Err(err) => { + exit_status = err.exit_code; + writeln!(io::stderr(), "{}", err).ok(); + }, + Ok(engine) => { + if let Err(doit_err) = engine.doit() { + exit_status = 1; + match doit_err { + DoitError::IoError(path, err) => { + writeln!(io::stderr(), "Failed to open output file '{}': {}", path, err).ok(); + }, + DoitError::ApiError(err) => { + if debug { + writeln!(io::stderr(), "{:#?}", err).ok(); + } else { + writeln!(io::stderr(), "{}", err).ok(); + } + } + } + } + } + } + + std::process::exit(exit_status); +} \ No newline at end of file diff --git a/gen/consumersurveys2/Cargo.toml b/gen/consumersurveys2/Cargo.toml new file mode 100644 index 0000000000..ec5fcecf25 --- /dev/null +++ b/gen/consumersurveys2/Cargo.toml @@ -0,0 +1,28 @@ +# DO NOT EDIT ! +# This file was generated automatically from 'src/mako/Cargo.toml.mako' +# DO NOT EDIT ! +[package] + +name = "google-consumersurveys2" +version = "0.1.13+20160405" +authors = ["Sebastian Thiel "] +description = "A complete library to interact with consumersurveys (protocol v2)" +repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/consumersurveys2" +documentation = "http://byron.github.io/google-apis-rs/google_consumersurveys2" +license = "MIT" +keywords = ["consumersurveys", "google", "protocol", "web", "api"] +build = "src/build.rs" + + +[dependencies] +hyper = "0.8" +mime = "0.2.0" +serde = "0.6.0" +serde_json = "0.6.0" +yup-oauth2 = ">= 0.5.6" +url = ">= 0.5" + +[build-dependencies] +syntex = { version = "= 0.28" } +serde_codegen = { version = "= 0.6.13" } + diff --git a/gen/consumersurveys2/LICENSE.md b/gen/consumersurveys2/LICENSE.md new file mode 100644 index 0000000000..ff523b4547 --- /dev/null +++ b/gen/consumersurveys2/LICENSE.md @@ -0,0 +1,30 @@ + +The MIT License (MIT) +===================== + +Copyright © `2015-2016` `Sebastian Thiel` + +Permission is hereby granted, free of charge, to any person +obtaining a copy of this software and associated documentation +files (the “Software”), to deal in the Software without +restriction, including without limitation the rights to use, +copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following +conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. diff --git a/gen/consumersurveys2/README.md b/gen/consumersurveys2/README.md new file mode 100644 index 0000000000..87de50fa05 --- /dev/null +++ b/gen/consumersurveys2/README.md @@ -0,0 +1,184 @@ + +The `google-consumersurveys2` library allows access to all features of the *Google consumersurveys* service. + +This documentation was generated from *consumersurveys* crate version *0.1.13+20160405*, where *20160405* is the exact revision of the *consumersurveys:v2* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.13*. +# Features + +Handle the following *Resources* with ease from the central [hub](http://byron.github.io/google-apis-rs/google_consumersurveys2/struct.Consumersurveys.html) ... + +* results + * [*get*](http://byron.github.io/google-apis-rs/google_consumersurveys2/struct.ResultGetCall.html) +* [surveys](http://byron.github.io/google-apis-rs/google_consumersurveys2/struct.Survey.html) + * [*get*](http://byron.github.io/google-apis-rs/google_consumersurveys2/struct.SurveyGetCall.html), [*insert*](http://byron.github.io/google-apis-rs/google_consumersurveys2/struct.SurveyInsertCall.html), [*list*](http://byron.github.io/google-apis-rs/google_consumersurveys2/struct.SurveyListCall.html), [*start*](http://byron.github.io/google-apis-rs/google_consumersurveys2/struct.SurveyStartCall.html), [*stop*](http://byron.github.io/google-apis-rs/google_consumersurveys2/struct.SurveyStopCall.html) and [*update*](http://byron.github.io/google-apis-rs/google_consumersurveys2/struct.SurveyUpdateCall.html) + + +Download supported by ... + +* [*get results*](http://byron.github.io/google-apis-rs/google_consumersurveys2/struct.ResultGetCall.html) + + + +# Structure of this Library + +The API is structured into the following primary items: + +* **[Hub](http://byron.github.io/google-apis-rs/google_consumersurveys2/struct.Consumersurveys.html)** + * a central object to maintain state and allow accessing all *Activities* + * creates [*Method Builders*](http://byron.github.io/google-apis-rs/google_consumersurveys2/trait.MethodsBuilder.html) which in turn + allow access to individual [*Call Builders*](http://byron.github.io/google-apis-rs/google_consumersurveys2/trait.CallBuilder.html) +* **[Resources](http://byron.github.io/google-apis-rs/google_consumersurveys2/trait.Resource.html)** + * primary types that you can apply *Activities* to + * a collection of properties and *Parts* + * **[Parts](http://byron.github.io/google-apis-rs/google_consumersurveys2/trait.Part.html)** + * a collection of properties + * never directly used in *Activities* +* **[Activities](http://byron.github.io/google-apis-rs/google_consumersurveys2/trait.CallBuilder.html)** + * operations to apply to *Resources* + +All *structures* are marked with applicable traits to further categorize them and ease browsing. + +Generally speaking, you can invoke *Activities* like this: + +```Rust,ignore +let r = hub.resource().activity(...).doit() +``` + +Or specifically ... + +```ignore +let r = hub.surveys().insert(...).doit() +let r = hub.surveys().list(...).doit() +let r = hub.surveys().update(...).doit() +let r = hub.surveys().get(...).doit() +let r = hub.surveys().stop(...).doit() +let r = hub.surveys().start(...).doit() +``` + +The `resource()` and `activity(...)` calls create [builders][builder-pattern]. The second one dealing with `Activities` +supports various methods to configure the impending operation (not shown here). It is made such that all required arguments have to be +specified right away (i.e. `(...)`), whereas all optional ones can be [build up][builder-pattern] as desired. +The `doit()` method performs the actual communication with the server and returns the respective result. + +# Usage + +## Setting up your Project + +To use this library, you would put the following lines into your `Cargo.toml` file: + +```toml +[dependencies] +google-consumersurveys2 = "*" +``` + +## A complete example + +```Rust +extern crate hyper; +extern crate yup_oauth2 as oauth2; +extern crate google_consumersurveys2 as consumersurveys2; +use consumersurveys2::{Result, Error}; +use std::default::Default; +use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; +use consumersurveys2::Consumersurveys; + +// Get an ApplicationSecret instance by some means. It contains the `client_id` and +// `client_secret`, among other things. +let secret: ApplicationSecret = Default::default(); +// Instantiate the authenticator. It will choose a suitable authentication flow for you, +// unless you replace `None` with the desired Flow. +// Provide your own `AuthenticatorDelegate` to adjust the way it operates and get feedback about +// what's going on. You probably want to bring in your own `TokenStorage` to persist tokens and +// retrieve them from storage. +let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, + hyper::Client::new(), + ::default(), None); +let mut hub = Consumersurveys::new(hyper::Client::new(), auth); +// You can configure optional parameters by calling the respective setters at will, and +// execute the final call using `doit()`. +// Values shown here are possibly random and not representative ! +let result = hub.surveys().list() + .token("eirmod") + .start_index(53) + .max_results(36) + .doit(); + +match result { + Err(e) => match e { + // The Error enum provides details about what exactly happened. + // You can also just use its `Debug`, `Display` or `Error` traits + Error::HttpError(_) + |Error::MissingAPIKey + |Error::MissingToken(_) + |Error::Cancelled + |Error::UploadSizeLimitExceeded(_, _) + |Error::Failure(_) + |Error::BadRequest(_) + |Error::FieldClash(_) + |Error::JsonDecodeError(_, _) => println!("{}", e), + }, + Ok(res) => println!("Success: {:?}", res), +} + +``` +## Handling Errors + +All errors produced by the system are provided either as [Result](http://byron.github.io/google-apis-rs/google_consumersurveys2/enum.Result.html) enumeration as return value of +the doit() methods, or handed as possibly intermediate results to either the +[Hub Delegate](http://byron.github.io/google-apis-rs/google_consumersurveys2/trait.Delegate.html), or the [Authenticator Delegate](http://byron.github.io/google-apis-rs/google_consumersurveys2/../yup-oauth2/trait.AuthenticatorDelegate.html). + +When delegates handle errors or intermediate values, they may have a chance to instruct the system to retry. This +makes the system potentially resilient to all kinds of errors. + +## Uploads and Downloads +If a method supports downloads, the response body, which is part of the [Result](http://byron.github.io/google-apis-rs/google_consumersurveys2/enum.Result.html), should be +read by you to obtain the media. +If such a method also supports a [Response Result](http://byron.github.io/google-apis-rs/google_consumersurveys2/trait.ResponseResult.html), it will return that by default. +You can see it as meta-data for the actual media. To trigger a media download, you will have to set up the builder by making +this call: `.param("alt", "media")`. + +Methods supporting uploads can do so using up to 2 different protocols: +*simple* and *resumable*. The distinctiveness of each is represented by customized +`doit(...)` methods, which are then named `upload(...)` and `upload_resumable(...)` respectively. + +## Customization and Callbacks + +You may alter the way an `doit()` method is called by providing a [delegate](http://byron.github.io/google-apis-rs/google_consumersurveys2/trait.Delegate.html) to the +[Method Builder](http://byron.github.io/google-apis-rs/google_consumersurveys2/trait.CallBuilder.html) before making the final `doit()` call. +Respective methods will be called to provide progress information, as well as determine whether the system should +retry on failure. + +The [delegate trait](http://byron.github.io/google-apis-rs/google_consumersurveys2/trait.Delegate.html) is default-implemented, allowing you to customize it with minimal effort. + +## Optional Parts in Server-Requests + +All structures provided by this library are made to be [enocodable](http://byron.github.io/google-apis-rs/google_consumersurveys2/trait.RequestValue.html) and +[decodable](http://byron.github.io/google-apis-rs/google_consumersurveys2/trait.ResponseResult.html) via *json*. Optionals are used to indicate that partial requests are responses +are valid. +Most optionals are are considered [Parts](http://byron.github.io/google-apis-rs/google_consumersurveys2/trait.Part.html) which are identifiable by name, which will be sent to +the server to indicate either the set parts of the request or the desired parts in the response. + +## Builder Arguments + +Using [method builders](http://byron.github.io/google-apis-rs/google_consumersurveys2/trait.CallBuilder.html), you are able to prepare an action call by repeatedly calling it's methods. +These will always take a single argument, for which the following statements are true. + +* [PODs][wiki-pod] are handed by copy +* strings are passed as `&str` +* [request values](http://byron.github.io/google-apis-rs/google_consumersurveys2/trait.RequestValue.html) are moved + +Arguments will always be copied or cloned into the builder, to make them independent of their original life times. + +[wiki-pod]: http://en.wikipedia.org/wiki/Plain_old_data_structure +[builder-pattern]: http://en.wikipedia.org/wiki/Builder_pattern +[google-go-api]: https://github.com/google/google-api-go-client + +# License +The **consumersurveys2** library was generated by Sebastian Thiel, and is placed +under the *MIT* license. +You can read the full text at the repository's [license file][repo-license]. + +[repo-license]: https://github.com/Byron/google-apis-rs/LICENSE.md diff --git a/gen/consumersurveys2/src/build.rs b/gen/consumersurveys2/src/build.rs new file mode 100644 index 0000000000..0d1cf974ca --- /dev/null +++ b/gen/consumersurveys2/src/build.rs @@ -0,0 +1,16 @@ +extern crate syntex; +extern crate serde_codegen; + +use std::env; +use std::path::Path; + +pub fn main() { + let out_dir = env::var_os("OUT_DIR").unwrap(); + + let src = Path::new("src/lib.rs.in"); + let dst = Path::new(&out_dir).join("lib.rs"); + + let mut registry = syntex::Registry::new(); + serde_codegen::register(&mut registry); + registry.expand("google-consumersurveys2", &src, &dst).unwrap(); +} diff --git a/gen/consumersurveys2/src/cmn.rs b/gen/consumersurveys2/src/cmn.rs new file mode 100644 index 0000000000..c69621da55 --- /dev/null +++ b/gen/consumersurveys2/src/cmn.rs @@ -0,0 +1,771 @@ +// COPY OF 'src/rust/api/cmn.rs' +// DO NOT EDIT +use std::io::{self, Read, Seek, Cursor, Write, SeekFrom}; +use std; +use std::fmt::{self, Display}; +use std::str::FromStr; +use std::error; +use std::thread::sleep; +use std::time::Duration; + +use mime::{Mime, TopLevel, SubLevel, Attr, Value}; +use oauth2::{TokenType, Retry, self}; +use hyper; +use hyper::header::{ContentType, ContentLength, Headers, UserAgent, Authorization, Header, + HeaderFormat, Bearer}; +use hyper::http::h1::LINE_ENDING; +use hyper::method::Method; +use hyper::status::StatusCode; + +use serde_json as json; + +/// Identifies the Hub. There is only one per library, this trait is supposed +/// to make intended use more explicit. +/// The hub allows to access all resource methods more easily. +pub trait Hub {} + +/// Identifies types for building methods of a particular resource type +pub trait MethodsBuilder {} + +/// Identifies types which represent builders for a particular resource method +pub trait CallBuilder {} + +/// Identifies types which can be inserted and deleted. +/// Types with this trait are most commonly used by clients of this API. +pub trait Resource {} + +/// Identifies types which are used in API responses. +pub trait ResponseResult {} + +/// Identifies types which are used in API requests. +pub trait RequestValue {} + +/// Identifies types which are not actually used by the API +/// This might be a bug within the google API schema. +pub trait UnusedType {} + +/// Identifies types which are only used as part of other types, which +/// usually are carrying the `Resource` trait. +pub trait Part {} + +/// Identifies types which are only used by other types internally. +/// They have no special meaning, this trait just marks them for completeness. +pub trait NestedType {} + +/// A utility to specify reader types which provide seeking capabilities too +pub trait ReadSeek: Seek + Read {} +impl ReadSeek for T {} + +/// A trait for all types that can convert themselves into a *parts* string +pub trait ToParts { + fn to_parts(&self) -> String; +} + +/// A utility type which can decode a server response that indicates error +#[derive(Deserialize)] +pub struct JsonServerError { + pub error: String, + pub error_description: Option +} + +/// A utility to represent detailed errors we might see in case there are BadRequests. +/// The latter happen if the sent parameters or request structures are unsound +#[derive(Deserialize, Serialize, Debug)] +pub struct ErrorResponse { + error: ServerError, +} + +#[derive(Deserialize, Serialize, Debug)] +pub struct ServerError { + errors: Vec, + code: u16, + message: String, +} + +#[derive(Deserialize, Serialize, Debug)] +pub struct ServerMessage { + domain: String, + reason: String, + message: String, + #[serde(rename="locationType")] + location_type: Option, + location: Option +} + +#[derive(Copy, Clone)] +pub struct DummyNetworkStream; + +impl Read for DummyNetworkStream { + fn read(&mut self, _: &mut [u8]) -> io::Result { + Ok(0) + } +} + +impl Write for DummyNetworkStream { + fn write(&mut self, _: &[u8]) -> io::Result { + Ok(0) + } + + fn flush(&mut self) -> io::Result<()> { + Ok(()) + } +} + +impl hyper::net::NetworkStream for DummyNetworkStream { + fn peer_addr(&mut self) -> io::Result { + Ok("127.0.0.1:1337".parse().unwrap()) + } + + fn set_read_timeout(&self, _dur: Option) -> io::Result<()> { + Ok(()) + } + + fn set_write_timeout(&self, _dur: Option) -> io::Result<()> { + Ok(()) + } +} + + +/// A trait specifying functionality to help controlling any request performed by the API. +/// The trait has a conservative default implementation. +/// +/// It contains methods to deal with all common issues, as well with the ones related to +/// uploading media +pub trait Delegate { + + /// Called at the beginning of any API request. The delegate should store the method + /// information if he is interesting in knowing more context when further calls to it + /// are made. + /// The matching `finished()` call will always be made, no matter whether or not the API + /// request was successful. That way, the delegate may easily maintain a clean state + /// between various API calls. + fn begin(&mut self, MethodInfo) {} + + /// Called whenever there is an [HttpError](http://hyperium.github.io/hyper/hyper/error/enum.HttpError.html), usually if there are network problems. + /// + /// If you choose to retry after a duration, the duration should be chosen using the + /// [exponential backoff algorithm](http://en.wikipedia.org/wiki/Exponential_backoff). + /// + /// Return retry information. + fn http_error(&mut self, &hyper::Error) -> Retry { + Retry::Abort + } + + /// Called whenever there is the need for your applications API key after + /// the official authenticator implementation didn't provide one, for some reason. + /// If this method returns None as well, the underlying operation will fail + fn api_key(&mut self) -> Option { + None + } + + /// Called whenever the Authenticator didn't yield a token. The delegate + /// may attempt to provide one, or just take it as a general information about the + /// impending failure. + /// The given Error provides information about why the token couldn't be acquired in the + /// first place + fn token(&mut self, err: &error::Error) -> Option { + let _ = err; + None + } + + /// Called during resumable uploads to provide a URL for the impending upload. + /// It was saved after a previous call to `store_upload_url(...)`, and if not None, + /// will be used instead of asking the server for a new upload URL. + /// This is useful in case a previous resumable upload was aborted/canceled, but should now + /// be resumed. + /// The returned URL will be used exactly once - if it fails again and the delegate allows + /// to retry, we will ask the server for a new upload URL. + fn upload_url(&mut self) -> Option { + None + } + + /// Called after we have retrieved a new upload URL for a resumable upload to store it + /// in case we fail or cancel. That way, we can attempt to resume the upload later, + /// see `upload_url()`. + /// It will also be called with None after a successful upload, which allows the delegate + /// to forget the URL. That way, we will not attempt to resume an upload that has already + /// finished. + fn store_upload_url(&mut self, url: Option<&str>) { + let _ = url; + } + + /// Called whenever a server response could not be decoded from json. + /// It's for informational purposes only, the caller will return with an error + /// accordingly. + /// + /// # Arguments + /// + /// * `json_encoded_value` - The json-encoded value which failed to decode. + /// * `json_decode_error` - The decoder error + fn response_json_decode_error(&mut self, json_encoded_value: &str, json_decode_error: &json::Error) { + let _ = json_encoded_value; + let _ = json_decode_error; + } + + /// Called whenever the http request returns with a non-success status code. + /// This can involve authentication issues, or anything else that very much + /// depends on the used API method. + /// The delegate should check the status, header and decoded json error to decide + /// whether to retry or not. In the latter case, the underlying call will fail. + /// + /// If you choose to retry after a duration, the duration should be chosen using the + /// [exponential backoff algorithm](http://en.wikipedia.org/wiki/Exponential_backoff). + fn http_failure(&mut self, _: &hyper::client::Response, Option, _: Option) -> Retry { + Retry::Abort + } + + /// Called prior to sending the main request of the given method. It can be used to time + /// the call or to print progress information. + /// It's also useful as you can be sure that a request will definitely be made. + fn pre_request(&mut self) { } + + /// Return the size of each chunk of a resumable upload. + /// Must be a power of two, with 1<<18 being the smallest allowed chunk size. + /// Will be called once before starting any resumable upload. + fn chunk_size(&mut self) -> u64 { + 1 << 23 + } + + /// Called before the given chunk is uploaded to the server. + /// If true is returned, the upload will be interrupted. + /// However, it may be resumable if you stored the upload URL in a previous call + /// to `store_upload_url()` + fn cancel_chunk_upload(&mut self, chunk: &ContentRange) -> bool { + let _ = chunk; + false + } + + /// Called before the API request method returns, in every case. It can be used to clean up + /// internal state between calls to the API. + /// This call always has a matching call to `begin(...)`. + /// + /// # Arguments + /// + /// * `is_success` - a true value indicates the operation was successful. If false, you should + /// discard all values stored during `store_upload_url`. + fn finished(&mut self, is_success: bool) { + let _ = is_success; + } +} + +/// A delegate with a conservative default implementation, which is used if no other delegate is +/// set. +#[derive(Default)] +pub struct DefaultDelegate; + +impl Delegate for DefaultDelegate {} + + +#[derive(Debug)] +pub enum Error { + /// The http connection failed + HttpError(hyper::Error), + + /// An attempt was made to upload a resource with size stored in field `.0` + /// even though the maximum upload size is what is stored in field `.1`. + UploadSizeLimitExceeded(u64, u64), + + /// Represents information about a request that was not understood by the server. + /// Details are included. + BadRequest(ErrorResponse), + + /// We needed an API key for authentication, but didn't obtain one. + /// Neither through the authenticator, nor through the Delegate. + MissingAPIKey, + + /// We required a Token, but didn't get one from the Authenticator + MissingToken(Box), + + /// The delgate instructed to cancel the operation + Cancelled, + + /// An additional, free form field clashed with one of the built-in optional ones + FieldClash(&'static str), + + /// Shows that we failed to decode the server response. + /// This can happen if the protocol changes in conjunction with strict json decoding. + JsonDecodeError(String, json::Error), + + /// Indicates an HTTP repsonse with a non-success status code + Failure(hyper::client::Response), +} + + +impl Display for Error { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + match *self { + Error::HttpError(ref err) => err.fmt(f), + Error::UploadSizeLimitExceeded(ref resource_size, ref max_size) => + writeln!(f, "The media size {} exceeds the maximum allowed upload size of {}" + , resource_size, max_size), + Error::MissingAPIKey => { + (writeln!(f, "The application's API key was not found in the configuration")).ok(); + writeln!(f, "It is used as there are no Scopes defined for this method.") + }, + Error::BadRequest(ref err) => { + try!(writeln!(f, "Bad Requst ({}): {}", err.error.code, err.error.message)); + for err in err.error.errors.iter() { + try!(writeln!(f, " {}: {}, {}{}", + err.domain, + err.message, + err.reason, + match &err.location { + &Some(ref loc) => format!("@{}", loc), + &None => String::new(), + })); + } + Ok(()) + }, + Error::MissingToken(ref err) => + writeln!(f, "Token retrieval failed with error: {}", err), + Error::Cancelled => + writeln!(f, "Operation cancelled by delegate"), + Error::FieldClash(field) => + writeln!(f, "The custom parameter '{}' is already provided natively by the CallBuilder.", field), + Error::JsonDecodeError(ref json_str, ref err) + => writeln!(f, "{}: {}", err, json_str), + Error::Failure(ref response) => + writeln!(f, "Http status indicates failure: {:?}", response), + } + } +} + +impl error::Error for Error { + fn description(&self) -> &str { + match *self { + Error::HttpError(ref err) => err.description(), + Error::JsonDecodeError(_, ref err) => err.description(), + _ => "NO DESCRIPTION POSSIBLE - use `Display.fmt()` instead" + } + } + + fn cause(&self) -> Option<&error::Error> { + match *self { + Error::HttpError(ref err) => err.cause(), + Error::JsonDecodeError(_, ref err) => err.cause(), + _ => None + } + } +} + +/// A universal result type used as return for all calls. +pub type Result = std::result::Result; + +/// Contains information about an API request. +pub struct MethodInfo { + pub id: &'static str, + pub http_method: Method, +} + +const BOUNDARY: &'static str = "MDuXWGyeE33QFXGchb2VFWc4Z7945d"; + +/// Provides a `Read` interface that converts multiple parts into the protocol +/// identified by [RFC2387](https://tools.ietf.org/html/rfc2387). +/// **Note**: This implementation is just as rich as it needs to be to perform uploads +/// to google APIs, and might not be a fully-featured implementation. +#[derive(Default)] +pub struct MultiPartReader<'a> { + raw_parts: Vec<(Headers, &'a mut Read)>, + current_part: Option<(Cursor>, &'a mut Read)>, + last_part_boundary: Option>>, +} + +impl<'a> MultiPartReader<'a> { + + /// Reserve memory for exactly the given amount of parts + pub fn reserve_exact(&mut self, cap: usize) { + self.raw_parts.reserve_exact(cap); + } + + /// Add a new part to the queue of parts to be read on the first `read` call. + /// + /// # Arguments + /// + /// `headers` - identifying the body of the part. It's similar to the header + /// in an ordinary single-part call, and should thus contain the + /// same information. + /// `reader` - a reader providing the part's body + /// `size` - the amount of bytes provided by the reader. It will be put onto the header as + /// content-size. + /// `mime` - It will be put onto the content type + pub fn add_part(&mut self, reader: &'a mut Read, size: u64, mime_type: Mime) -> &mut MultiPartReader<'a> { + let mut headers = Headers::new(); + headers.set(ContentType(mime_type)); + headers.set(ContentLength(size)); + self.raw_parts.push((headers, reader)); + self + } + + /// Returns the mime-type representing our multi-part message. + /// Use it with the ContentType header. + pub fn mime_type(&self) -> Mime { + Mime( + TopLevel::Multipart, + SubLevel::Ext("Related".to_string()), + vec![(Attr::Ext("boundary".to_string()), Value::Ext(BOUNDARY.to_string()))], + ) + } + + /// Returns true if we are totally used + fn is_depleted(&self) -> bool { + self.raw_parts.len() == 0 && self.current_part.is_none() && self.last_part_boundary.is_none() + } + + /// Returns true if we are handling our last part + fn is_last_part(&self) -> bool { + self.raw_parts.len() == 0 && self.current_part.is_some() + } +} + +impl<'a> Read for MultiPartReader<'a> { + fn read(&mut self, buf: &mut [u8]) -> io::Result { + match (self.raw_parts.len(), + self.current_part.is_none(), + self.last_part_boundary.is_none()) { + (_, _, false) => { + let br = self.last_part_boundary.as_mut().unwrap().read(buf).unwrap_or(0); + if br < buf.len() { + self.last_part_boundary = None; + } + return Ok(br) + }, + (0, true, true) => return Ok(0), + (n, true, _) if n > 0 => { + let (headers, reader) = self.raw_parts.remove(0); + let mut c = Cursor::new(Vec::::new()); + (write!(&mut c, "{}--{}{}{}{}", LINE_ENDING, BOUNDARY, LINE_ENDING, + headers, LINE_ENDING)).unwrap(); + c.seek(SeekFrom::Start(0)).unwrap(); + self.current_part = Some((c, reader)); + } + _ => {}, + } + + // read headers as long as possible + let (hb, rr) = { + let &mut (ref mut c, ref mut reader) = self.current_part.as_mut().unwrap(); + let b = c.read(buf).unwrap_or(0); + (b, reader.read(&mut buf[b..])) + }; + + match rr { + Ok(bytes_read) => { + if hb < buf.len() && bytes_read == 0 { + if self.is_last_part() { + // before clearing the last part, we will add the boundary that + // will be written last + self.last_part_boundary = Some(Cursor::new( + format!("{}--{}--", LINE_ENDING, BOUNDARY).into_bytes())) + } + // We are depleted - this can trigger the next part to come in + self.current_part = None; + } + let mut total_bytes_read = hb + bytes_read; + while total_bytes_read < buf.len() && !self.is_depleted() { + match self.read(&mut buf[total_bytes_read ..]) { + Ok(br) => total_bytes_read += br, + Err(err) => return Err(err), + } + } + Ok(total_bytes_read) + } + Err(err) => { + // fail permanently + self.current_part = None; + self.last_part_boundary = None; + self.raw_parts.clear(); + Err(err) + } + } + } +} + +// The following macro invocation needs to be expanded, as `include!` +// doens't support external macros +// header!{ +// #[doc="The `X-Upload-Content-Type` header."] +// (XUploadContentType, "X-Upload-Content-Type") => [Mime] + +// xupload_content_type { +// test_header!( +// test1, +// vec![b"text/plain"], +// Some(HeaderField( +// vec![Mime(TopLevel::Text, SubLevel::Plain, Vec::new())] +// ))); + +// } +// } + +/// The `X-Upload-Content-Type` header. +/// +/// Generated via rustc --pretty expanded -Z unstable-options, and manually +/// processed to be more readable. +#[derive(PartialEq, Debug, Clone)] +pub struct XUploadContentType(pub Mime); + +impl ::std::ops::Deref for XUploadContentType { + type Target = Mime; + fn deref<'a>(&'a self) -> &'a Mime { &self.0 } +} +impl ::std::ops::DerefMut for XUploadContentType { + fn deref_mut<'a>(&'a mut self) -> &'a mut Mime { &mut self.0 } +} +impl Header for XUploadContentType { + fn header_name() -> &'static str { "X-Upload-Content-Type" } + fn parse_header(raw: &[Vec]) -> hyper::error::Result { + hyper::header::parsing::from_one_raw_str(raw).map(XUploadContentType) + } +} +impl HeaderFormat for XUploadContentType { + fn fmt_header(&self, f: &mut fmt::Formatter) -> fmt::Result { + Display::fmt(&**self, f) + } +} +impl Display for XUploadContentType { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + fmt::Display::fmt(&**self, f) + } +} + +#[derive(Clone, PartialEq, Debug)] +pub struct Chunk { + pub first: u64, + pub last: u64 +} + +impl fmt::Display for Chunk { + fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result { + (write!(fmt, "{}-{}", self.first, self.last)).ok(); + Ok(()) + } +} + +impl FromStr for Chunk { + type Err = &'static str; + + /// NOTE: only implements `%i-%i`, not `*` + fn from_str(s: &str) -> std::result::Result { + let parts: Vec<&str> = s.split('-').collect(); + if parts.len() != 2 { + return Err("Expected two parts: %i-%i") + } + Ok( + Chunk { + first: match FromStr::from_str(parts[0]) { + Ok(d) => d, + _ => return Err("Couldn't parse 'first' as digit") + }, + last: match FromStr::from_str(parts[1]) { + Ok(d) => d, + _ => return Err("Couldn't parse 'last' as digit") + } + } + ) + } +} + +/// Implements the Content-Range header, for serialization only +#[derive(Clone, PartialEq, Debug)] +pub struct ContentRange { + pub range: Option, + pub total_length: u64, +} + +impl Header for ContentRange { + fn header_name() -> &'static str { + "Content-Range" + } + + /// We are not parsable, as parsing is done by the `Range` header + fn parse_header(_: &[Vec]) -> hyper::error::Result { + Err(hyper::error::Error::Method) + } +} + + +impl HeaderFormat for ContentRange { + fn fmt_header(&self, fmt: &mut fmt::Formatter) -> fmt::Result { + try!(fmt.write_str("bytes ")); + match self.range { + Some(ref c) => try!(c.fmt(fmt)), + None => try!(fmt.write_str("*")) + } + (write!(fmt, "/{}", self.total_length)).ok(); + Ok(()) + } +} + +#[derive(Clone, PartialEq, Debug)] +pub struct RangeResponseHeader(pub Chunk); + +impl Header for RangeResponseHeader { + fn header_name() -> &'static str { + "Range" + } + + fn parse_header(raw: &[Vec]) -> hyper::error::Result { + if raw.len() > 0 { + let v = &raw[0]; + if let Ok(s) = std::str::from_utf8(v) { + const PREFIX: &'static str = "bytes "; + if s.starts_with(PREFIX) { + if let Ok(c) = ::from_str(&s[PREFIX.len()..]) { + return Ok(RangeResponseHeader(c)) + } + } + } + } + Err(hyper::error::Error::Method) + } +} + +impl HeaderFormat for RangeResponseHeader { + /// No implmentation necessary, we just need to parse + fn fmt_header(&self, _: &mut fmt::Formatter) -> fmt::Result { + Err(fmt::Error) + } +} + +/// A utility type to perform a resumable upload from start to end. +pub struct ResumableUploadHelper<'a, A: 'a> { + pub client: &'a mut hyper::client::Client, + pub delegate: &'a mut Delegate, + pub start_at: Option, + pub auth: &'a mut A, + pub user_agent: &'a str, + pub auth_header: Authorization, + pub url: &'a str, + pub reader: &'a mut ReadSeek, + pub media_type: Mime, + pub content_length: u64 +} + +impl<'a, A> ResumableUploadHelper<'a, A> + where A: oauth2::GetToken { + + fn query_transfer_status(&mut self) -> std::result::Result> { + loop { + match self.client.post(self.url) + .header(UserAgent(self.user_agent.to_string())) + .header(ContentRange { range: None, total_length: self.content_length }) + .header(self.auth_header.clone()) + .send() { + Ok(r) => { + // 308 = resume-incomplete == PermanentRedirect + let headers = r.headers.clone(); + let h: &RangeResponseHeader = match headers.get() { + Some(hh) if r.status == StatusCode::PermanentRedirect => hh, + None|Some(_) => { + if let Retry::After(d) = self.delegate.http_failure(&r, None, None) { + sleep(d); + continue; + } + return Err(Ok(r)) + } + }; + return Ok(h.0.last) + } + Err(err) => { + if let Retry::After(d) = self.delegate.http_error(&err) { + sleep(d); + continue; + } + return Err(Err(err)) + } + } + } + } + + /// returns None if operation was cancelled by delegate, or the HttpResult. + /// It can be that we return the result just because we didn't understand the status code - + /// caller should check for status himself before assuming it's OK to use + pub fn upload(&mut self) -> Option> { + let mut start = match self.start_at { + Some(s) => s, + None => match self.query_transfer_status() { + Ok(s) => s, + Err(result) => return Some(result) + } + }; + + const MIN_CHUNK_SIZE: u64 = 1 << 18; + let chunk_size = match self.delegate.chunk_size() { + cs if cs > MIN_CHUNK_SIZE => cs, + _ => MIN_CHUNK_SIZE + }; + + self.reader.seek(SeekFrom::Start(start)).unwrap(); + loop { + let request_size = match self.content_length - start { + rs if rs > chunk_size => chunk_size, + rs => rs + }; + + let mut section_reader = self.reader.take(request_size); + let range_header = ContentRange { + range: Some(Chunk {first: start, last: start + request_size - 1}), + total_length: self.content_length + }; + start += request_size; + if self.delegate.cancel_chunk_upload(&range_header) { + return None + } + // workaround https://github.com/rust-lang/rust/issues/22252 + let res = self.client.post(self.url) + .header(range_header) + .header(ContentType(self.media_type.clone())) + .header(UserAgent(self.user_agent.to_string())) + .body(&mut section_reader) + .send(); + match res { + Ok(mut res) => { + if res.status == StatusCode::PermanentRedirect { + continue + } + if !res.status.is_success() { + let mut json_err = String::new(); + res.read_to_string(&mut json_err).unwrap(); + if let Retry::After(d) = self.delegate.http_failure(&res, + json::from_str(&json_err).ok(), + json::from_str(&json_err).ok()) { + sleep(d); + continue; + } + } + return Some(Ok(res)) + }, + Err(err) => { + if let Retry::After(d) = self.delegate.http_error(&err) { + sleep(d); + continue; + } + return Some(Err(err)) + } + } + } + } +} + +// Copy of src/rust/cli/cmn.rs +// TODO(ST): Allow sharing common code between program types +pub fn remove_json_null_values(value: &mut json::value::Value) { + match *value { + json::value::Value::Object(ref mut map) => { + let mut for_removal = Vec::new(); + + for (key, mut value) in map.iter_mut() { + if value.is_null() { + for_removal.push(key.clone()); + } else { + remove_json_null_values(&mut value); + } + } + + for key in &for_removal { + map.remove(key); + } + } + _ => {} + } +} diff --git a/gen/consumersurveys2/src/lib.rs b/gen/consumersurveys2/src/lib.rs new file mode 100644 index 0000000000..8f315410d3 --- /dev/null +++ b/gen/consumersurveys2/src/lib.rs @@ -0,0 +1,188 @@ +// DO NOT EDIT ! +// This file was generated automatically from 'src/mako/api/lib.rs.mako' +// DO NOT EDIT ! + +//! This documentation was generated from *consumersurveys* crate version *0.1.13+20160405*, where *20160405* is the exact revision of the *consumersurveys:v2* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.13*. +//! The original source code is [on github](https://github.com/Byron/google-apis-rs/tree/master/gen/consumersurveys2). +//! # Features +//! +//! Handle the following *Resources* with ease from the central [hub](struct.Consumersurveys.html) ... +//! +//! * results +//! * [*get*](struct.ResultGetCall.html) +//! * [surveys](struct.Survey.html) +//! * [*get*](struct.SurveyGetCall.html), [*insert*](struct.SurveyInsertCall.html), [*list*](struct.SurveyListCall.html), [*start*](struct.SurveyStartCall.html), [*stop*](struct.SurveyStopCall.html) and [*update*](struct.SurveyUpdateCall.html) +//! +//! +//! Download supported by ... +//! +//! * [*get results*](struct.ResultGetCall.html) +//! +//! +//! +//! Not what you are looking for ? Find all other Google APIs in their Rust [documentation index](../index.html). +//! +//! # Structure of this Library +//! +//! The API is structured into the following primary items: +//! +//! * **[Hub](struct.Consumersurveys.html)** +//! * a central object to maintain state and allow accessing all *Activities* +//! * creates [*Method Builders*](trait.MethodsBuilder.html) which in turn +//! allow access to individual [*Call Builders*](trait.CallBuilder.html) +//! * **[Resources](trait.Resource.html)** +//! * primary types that you can apply *Activities* to +//! * a collection of properties and *Parts* +//! * **[Parts](trait.Part.html)** +//! * a collection of properties +//! * never directly used in *Activities* +//! * **[Activities](trait.CallBuilder.html)** +//! * operations to apply to *Resources* +//! +//! All *structures* are marked with applicable traits to further categorize them and ease browsing. +//! +//! Generally speaking, you can invoke *Activities* like this: +//! +//! ```Rust,ignore +//! let r = hub.resource().activity(...).doit() +//! ``` +//! +//! Or specifically ... +//! +//! ```ignore +//! let r = hub.surveys().insert(...).doit() +//! let r = hub.surveys().list(...).doit() +//! let r = hub.surveys().update(...).doit() +//! let r = hub.surveys().get(...).doit() +//! let r = hub.surveys().stop(...).doit() +//! let r = hub.surveys().start(...).doit() +//! ``` +//! +//! The `resource()` and `activity(...)` calls create [builders][builder-pattern]. The second one dealing with `Activities` +//! supports various methods to configure the impending operation (not shown here). It is made such that all required arguments have to be +//! specified right away (i.e. `(...)`), whereas all optional ones can be [build up][builder-pattern] as desired. +//! The `doit()` method performs the actual communication with the server and returns the respective result. +//! +//! # Usage +//! +//! ## Setting up your Project +//! +//! To use this library, you would put the following lines into your `Cargo.toml` file: +//! +//! ```toml +//! [dependencies] +//! google-consumersurveys2 = "*" +//! ``` +//! +//! ## A complete example +//! +//! ```test_harness,no_run +//! extern crate hyper; +//! extern crate yup_oauth2 as oauth2; +//! extern crate google_consumersurveys2 as consumersurveys2; +//! use consumersurveys2::{Result, Error}; +//! # #[test] fn egal() { +//! use std::default::Default; +//! use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; +//! use consumersurveys2::Consumersurveys; +//! +//! // Get an ApplicationSecret instance by some means. It contains the `client_id` and +//! // `client_secret`, among other things. +//! let secret: ApplicationSecret = Default::default(); +//! // Instantiate the authenticator. It will choose a suitable authentication flow for you, +//! // unless you replace `None` with the desired Flow. +//! // Provide your own `AuthenticatorDelegate` to adjust the way it operates and get feedback about +//! // what's going on. You probably want to bring in your own `TokenStorage` to persist tokens and +//! // retrieve them from storage. +//! let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, +//! hyper::Client::new(), +//! ::default(), None); +//! let mut hub = Consumersurveys::new(hyper::Client::new(), auth); +//! // You can configure optional parameters by calling the respective setters at will, and +//! // execute the final call using `doit()`. +//! // Values shown here are possibly random and not representative ! +//! let result = hub.surveys().list() +//! .token("nonumy") +//! .start_index(82) +//! .max_results(40) +//! .doit(); +//! +//! match result { +//! Err(e) => match e { +//! // The Error enum provides details about what exactly happened. +//! // You can also just use its `Debug`, `Display` or `Error` traits +//! Error::HttpError(_) +//! |Error::MissingAPIKey +//! |Error::MissingToken(_) +//! |Error::Cancelled +//! |Error::UploadSizeLimitExceeded(_, _) +//! |Error::Failure(_) +//! |Error::BadRequest(_) +//! |Error::FieldClash(_) +//! |Error::JsonDecodeError(_, _) => println!("{}", e), +//! }, +//! Ok(res) => println!("Success: {:?}", res), +//! } +//! # } +//! ``` +//! ## Handling Errors +//! +//! All errors produced by the system are provided either as [Result](enum.Result.html) enumeration as return value of +//! the doit() methods, or handed as possibly intermediate results to either the +//! [Hub Delegate](trait.Delegate.html), or the [Authenticator Delegate](../yup-oauth2/trait.AuthenticatorDelegate.html). +//! +//! When delegates handle errors or intermediate values, they may have a chance to instruct the system to retry. This +//! makes the system potentially resilient to all kinds of errors. +//! +//! ## Uploads and Downloads +//! If a method supports downloads, the response body, which is part of the [Result](enum.Result.html), should be +//! read by you to obtain the media. +//! If such a method also supports a [Response Result](trait.ResponseResult.html), it will return that by default. +//! You can see it as meta-data for the actual media. To trigger a media download, you will have to set up the builder by making +//! this call: `.param("alt", "media")`. +//! +//! Methods supporting uploads can do so using up to 2 different protocols: +//! *simple* and *resumable*. The distinctiveness of each is represented by customized +//! `doit(...)` methods, which are then named `upload(...)` and `upload_resumable(...)` respectively. +//! +//! ## Customization and Callbacks +//! +//! You may alter the way an `doit()` method is called by providing a [delegate](trait.Delegate.html) to the +//! [Method Builder](trait.CallBuilder.html) before making the final `doit()` call. +//! Respective methods will be called to provide progress information, as well as determine whether the system should +//! retry on failure. +//! +//! The [delegate trait](trait.Delegate.html) is default-implemented, allowing you to customize it with minimal effort. +//! +//! ## Optional Parts in Server-Requests +//! +//! All structures provided by this library are made to be [enocodable](trait.RequestValue.html) and +//! [decodable](trait.ResponseResult.html) via *json*. Optionals are used to indicate that partial requests are responses +//! are valid. +//! Most optionals are are considered [Parts](trait.Part.html) which are identifiable by name, which will be sent to +//! the server to indicate either the set parts of the request or the desired parts in the response. +//! +//! ## Builder Arguments +//! +//! Using [method builders](trait.CallBuilder.html), you are able to prepare an action call by repeatedly calling it's methods. +//! These will always take a single argument, for which the following statements are true. +//! +//! * [PODs][wiki-pod] are handed by copy +//! * strings are passed as `&str` +//! * [request values](trait.RequestValue.html) are moved +//! +//! Arguments will always be copied or cloned into the builder, to make them independent of their original life times. +//! +//! [wiki-pod]: http://en.wikipedia.org/wiki/Plain_old_data_structure +//! [builder-pattern]: http://en.wikipedia.org/wiki/Builder_pattern +//! [google-go-api]: https://github.com/google/google-api-go-client +//! +//! + +// 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 +// unused imports in fully featured APIs. Same with unused_mut ... . +#![allow(unused_imports, unused_mut, dead_code)] + +include!(concat!(env!("OUT_DIR"), "/lib.rs")); \ No newline at end of file diff --git a/gen/consumersurveys2/src/lib.rs.in b/gen/consumersurveys2/src/lib.rs.in new file mode 100644 index 0000000000..a8c6607a0b --- /dev/null +++ b/gen/consumersurveys2/src/lib.rs.in @@ -0,0 +1,2447 @@ +// DO NOT EDIT ! +// This file was generated automatically from 'src/mako/api/lib.rs.in.mako' +// DO NOT EDIT ! + +extern crate hyper; +extern crate serde; +extern crate serde_json; +extern crate yup_oauth2 as oauth2; +extern crate mime; +extern crate url; + +mod cmn; + +use std::collections::HashMap; +use std::cell::RefCell; +use std::borrow::BorrowMut; +use std::default::Default; +use std::collections::BTreeMap; +use serde_json as json; +use std::io; +use std::fs; +use std::thread::sleep; +use std::time::Duration; + +pub use cmn::{MultiPartReader, ToParts, MethodInfo, Result, Error, CallBuilder, Hub, ReadSeek, Part, + ResponseResult, RequestValue, NestedType, Delegate, DefaultDelegate, MethodsBuilder, + Resource, ErrorResponse, remove_json_null_values}; + + +// ############## +// UTILITIES ### +// ############ + +/// Identifies the an OAuth2 authorization scope. +/// A scope is needed when requesting an +/// [authorization token](https://developers.google.com/youtube/v3/guides/authentication). +#[derive(PartialEq, Eq, Hash)] +pub enum Scope { + /// View your email address + UserinfoEmail, + + /// View the results for your surveys + Readonly, + + /// View and edit your surveys and results + Full, +} + +impl AsRef for Scope { + fn as_ref(&self) -> &str { + match *self { + Scope::UserinfoEmail => "https://www.googleapis.com/auth/userinfo.email", + Scope::Readonly => "https://www.googleapis.com/auth/consumersurveys.readonly", + Scope::Full => "https://www.googleapis.com/auth/consumersurveys", + } + } +} + +impl Default for Scope { + fn default() -> Scope { + Scope::Readonly + } +} + + + +// ######## +// HUB ### +// ###### + +/// Central instance to access all Consumersurveys related resource activities +/// +/// # Examples +/// +/// Instantiate a new hub +/// +/// ```test_harness,no_run +/// extern crate hyper; +/// extern crate yup_oauth2 as oauth2; +/// extern crate google_consumersurveys2 as consumersurveys2; +/// use consumersurveys2::{Result, Error}; +/// # #[test] fn egal() { +/// use std::default::Default; +/// use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; +/// use consumersurveys2::Consumersurveys; +/// +/// // Get an ApplicationSecret instance by some means. It contains the `client_id` and +/// // `client_secret`, among other things. +/// let secret: ApplicationSecret = Default::default(); +/// // Instantiate the authenticator. It will choose a suitable authentication flow for you, +/// // unless you replace `None` with the desired Flow. +/// // Provide your own `AuthenticatorDelegate` to adjust the way it operates and get feedback about +/// // what's going on. You probably want to bring in your own `TokenStorage` to persist tokens and +/// // retrieve them from storage. +/// let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, +/// hyper::Client::new(), +/// ::default(), None); +/// let mut hub = Consumersurveys::new(hyper::Client::new(), auth); +/// // You can configure optional parameters by calling the respective setters at will, and +/// // execute the final call using `doit()`. +/// // Values shown here are possibly random and not representative ! +/// let result = hub.surveys().list() +/// .token("sed") +/// .start_index(16) +/// .max_results(83) +/// .doit(); +/// +/// match result { +/// Err(e) => match e { +/// // The Error enum provides details about what exactly happened. +/// // You can also just use its `Debug`, `Display` or `Error` traits +/// Error::HttpError(_) +/// |Error::MissingAPIKey +/// |Error::MissingToken(_) +/// |Error::Cancelled +/// |Error::UploadSizeLimitExceeded(_, _) +/// |Error::Failure(_) +/// |Error::BadRequest(_) +/// |Error::FieldClash(_) +/// |Error::JsonDecodeError(_, _) => println!("{}", e), +/// }, +/// Ok(res) => println!("Success: {:?}", res), +/// } +/// # } +/// ``` +pub struct Consumersurveys { + client: RefCell, + auth: RefCell, + _user_agent: String, +} + +impl<'a, C, A> Hub for Consumersurveys {} + +impl<'a, C, A> Consumersurveys + where C: BorrowMut, A: oauth2::GetToken { + + pub fn new(client: C, authenticator: A) -> Consumersurveys { + Consumersurveys { + client: RefCell::new(client), + auth: RefCell::new(authenticator), + _user_agent: "google-api-rust-client/0.1.13".to_string(), + } + } + + pub fn results(&'a self) -> ResultMethods<'a, C, A> { + ResultMethods { hub: &self } + } + pub fn surveys(&'a self) -> SurveyMethods<'a, C, A> { + SurveyMethods { hub: &self } + } + + /// Set the user-agent header field to use in all requests to the server. + /// It defaults to `google-api-rust-client/0.1.13`. + /// + /// Returns the previously set user-agent. + pub fn user_agent(&mut self, agent_name: String) -> String { + let prev = self._user_agent.clone(); + self._user_agent = agent_name; + prev + } +} + + +// ############ +// SCHEMAS ### +// ########## +/// Reference to the current results for a given survey. +/// +/// # Activities +/// +/// This type is used in activities, which are methods you may call on this type or where this type is involved in. +/// The list links the activity name, along with information about where it is used (one of *request* and *response*). +/// +/// * [get results](struct.ResultGetCall.html) (response) +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct SurveyResults { + /// Human readable string describing the status of the request. + pub status: Option, + /// External survey ID as viewable by survey owners in the editor view. + #[serde(rename="surveyUrlId")] + pub survey_url_id: Option, +} + +impl ResponseResult for SurveyResults {} + + +/// Specifications for the target audience of a survey run through the API. +/// +/// This type is not used in any activity, and only used as *part* of another schema. +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct SurveyAudience { + /// Language code that surveys should be targeted to. For instance, 'en-US'. Surveys may target bilingual users by specifying a list of language codes (for example, 'de' and 'en-US'). In that case, all languages will be used for targeting users but the survey content (which is displayed) must match the first language listed. Accepts standard BCP47 language codes. See specification. + pub languages: Option>, + /// Country subdivision (states/provinces/etc) that surveys should be targeted to. For all countries except GB, ISO-3166-2 subdivision code is required (eg. 'US-OH' for Ohio, United States). For GB, NUTS 1 statistical region codes for the United Kingdom is required (eg. 'UK-UKC' for North East England). + #[serde(rename="countrySubdivision")] + pub country_subdivision: Option, + /// Required country code that surveys should be targeted to. Accepts standard ISO 3166-1 2 character language codes. For instance, 'US' for the United States, and 'GB' for the United Kingdom. + pub country: Option, + /// Optional gender to target. + pub gender: Option, + /// Optional list of age buckets to target. Supported age buckets are: ['18-24', '25-34', '35-44', '45-54', '55-64', '65+'] + pub ages: Option>, + /// Online population source where the respondents are sampled from. + #[serde(rename="populationSource")] + pub population_source: Option, +} + +impl Part for SurveyAudience {} + + +/// There is no detailed description. +/// +/// This type is not used in any activity, and only used as *part* of another schema. +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct TokenPagination { + /// no description provided + #[serde(rename="nextPageToken")] + pub next_page_token: Option, + /// no description provided + #[serde(rename="previousPageToken")] + pub previous_page_token: Option, +} + +impl Part for TokenPagination {} + + +/// Container object for image data and alt_text. +/// +/// This type is not used in any activity, and only used as *part* of another schema. +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct SurveyQuestionImage { + /// The read-only URL for the hosted images. + pub url: Option, + /// The alt text property used in image tags is required for all images. + #[serde(rename="altText")] + pub alt_text: Option, + /// Inline jpeg, gif, tiff, bmp, or png image raw bytes for an image question types. + pub data: Option, +} + +impl Part for SurveyQuestionImage {} + + +/// There is no detailed description. +/// +/// # Activities +/// +/// This type is used in activities, which are methods you may call on this type or where this type is involved in. +/// The list links the activity name, along with information about where it is used (one of *request* and *response*). +/// +/// * [get results](struct.ResultGetCall.html) (request) +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct ResultsGetRequest { + /// no description provided + #[serde(rename="resultMask")] + pub result_mask: Option, +} + +impl RequestValue for ResultsGetRequest {} + + +/// There is no detailed description. +/// +/// This type is not used in any activity, and only used as *part* of another schema. +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct FieldMask { + /// no description provided + pub fields: Option>, + /// no description provided + pub id: Option, +} + +impl Part for FieldMask {} + + +/// There is no detailed description. +/// +/// # Activities +/// +/// This type is used in activities, which are methods you may call on this type or where this type is involved in. +/// The list links the activity name, along with information about where it is used (one of *request* and *response*). +/// +/// * [start surveys](struct.SurveyStartCall.html) (response) +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct SurveysStartResponse { + /// Survey object containing the specification of the started Survey. + pub resource: Option, + /// Unique request ID used for logging and debugging. Please include in any error reporting or troubleshooting requests. + #[serde(rename="requestId")] + pub request_id: Option, +} + +impl ResponseResult for SurveysStartResponse {} + + +/// There is no detailed description. +/// +/// # Activities +/// +/// This type is used in activities, which are methods you may call on this type or where this type is involved in. +/// The list links the activity name, along with information about where it is used (one of *request* and *response*). +/// +/// * [list surveys](struct.SurveyListCall.html) (response) +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct SurveysListResponse { + /// no description provided + #[serde(rename="tokenPagination")] + pub token_pagination: Option, + /// no description provided + #[serde(rename="pageInfo")] + pub page_info: Option, + /// An individual survey resource. + pub resources: Option>, + /// Unique request ID used for logging and debugging. Please include in any error reporting or troubleshooting requests. + #[serde(rename="requestId")] + pub request_id: Option, +} + +impl ResponseResult for SurveysListResponse {} + + +/// There is no detailed description. +/// +/// This type is not used in any activity, and only used as *part* of another schema. +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct ResultsMask { + /// no description provided + pub fields: Option>, + /// no description provided + pub projection: Option, +} + +impl Part for ResultsMask {} + + +/// Representation of an individual survey object. +/// +/// # Activities +/// +/// This type is used in activities, which are methods you may call on this type or where this type is involved in. +/// The list links the activity name, along with information about where it is used (one of *request* and *response*). +/// +/// * [insert surveys](struct.SurveyInsertCall.html) (request|response) +/// * [list surveys](struct.SurveyListCall.html) (none) +/// * [update surveys](struct.SurveyUpdateCall.html) (request|response) +/// * [get surveys](struct.SurveyGetCall.html) (response) +/// * [stop surveys](struct.SurveyStopCall.html) (none) +/// * [start surveys](struct.SurveyStartCall.html) (none) +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct Survey { + /// List of email addresses for survey owners. Must contain at least the address of the user making the API call. + pub owners: Option>, + /// Text description of the survey. + pub description: Option, + /// Optional name that will be given to the survey. + pub title: Option, + /// Additional information to store on behalf of the API consumer and associate with this question. This binary blob is treated as opaque. This field is limited to 64K bytes. + #[serde(rename="customerData")] + pub customer_data: Option, + /// State that the survey is in. Can be modified to start, stop, or pause survey. + pub state: Option, + /// Targeting-criteria message containing demographic information + pub audience: Option, + /// Cost to run the survey and collect the necessary number of responses. + pub cost: Option, + /// Unique survey ID, that is viewable in the URL of the Survey Creator UI + #[serde(rename="surveyUrlId")] + pub survey_url_id: Option, + /// List of questions defining the survey. + pub questions: Option>, + /// Number of responses desired for the survey. + #[serde(rename="wantedResponseCount")] + pub wanted_response_count: Option, +} + +impl RequestValue for Survey {} +impl Resource for Survey {} +impl ResponseResult for Survey {} + + +/// Message defining the cost to run a given survey through API. +/// +/// This type is not used in any activity, and only used as *part* of another schema. +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct SurveyCost { + /// Cost of survey in nano units of the given currency. + pub nanos: Option, + /// Currency code that the cost is given in. + #[serde(rename="currencyCode")] + pub currency_code: Option, +} + +impl Part for SurveyCost {} + + +/// Message defining the question specifications. +/// +/// This type is not used in any activity, and only used as *part* of another schema. +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct SurveyQuestion { + /// Option to force the user to pick one of the open text suggestions. This requires that suggestions are provided for this question. + #[serde(rename="mustPickSuggestion")] + pub must_pick_suggestion: Option, + /// The threshold/screener answer options, which will screen a user into the rest of the survey. These will be a subset of the answer option strings. + #[serde(rename="thresholdAnswers")] + pub threshold_answers: Option>, + /// Number of stars to use for ratings questions. + #[serde(rename="numStars")] + pub num_stars: Option, + /// For rating questions, the text for the lower end of the scale, such as 'Worst'. For numeric questions, a string representing a floating-point that is the minimum allowed number for a response. + #[serde(rename="lowValueLabel")] + pub low_value_label: Option, + /// The YouTube video ID to be show in video questions. + #[serde(rename="videoId")] + pub video_id: Option, + /// Required list of answer options for a question. + pub answers: Option>, + /// Option to allow open-ended text box for Single Answer and Multiple Answer question types. This can be used with SINGLE_ANSWER, SINGLE_ANSWER_WITH_IMAGE, MULTIPLE_ANSWERS, and MULTIPLE_ANSWERS_WITH_IMAGE question types. + #[serde(rename="hasOther")] + pub has_other: Option, + /// no description provided + pub images: Option>, + /// Optional unit of measurement for display (for example: hours, people, miles). + #[serde(rename="unitOfMeasurementLabel")] + pub unit_of_measurement_label: Option, + /// Currently only support pinning an answer option to the last position. + #[serde(rename="lastAnswerPositionPinned")] + pub last_answer_position_pinned: Option, + /// A list of suggested answers for open text question auto-complete. This is only valid if single_line_response is true. + #[serde(rename="openTextSuggestions")] + pub open_text_suggestions: Option>, + /// For rating questions, the text for the higher end of the scale, such as 'Best'. For numeric questions, a string representing a floating-point that is the maximum allowed number for a response. + #[serde(rename="highValueLabel")] + pub high_value_label: Option, + /// Required question text shown to the respondent. + pub question: Option, + /// Used by the Rating Scale with Text question type. This text goes along with the question field that is presented to the respondent, and is the actual text that the respondent is asked to rate. + #[serde(rename="sentimentText")] + pub sentiment_text: Option, + /// Option to allow multiple line open text responses instead of a single line response. Note that we don't show auto-complete suggestions with multiple line responses. + #[serde(rename="singleLineResponse")] + pub single_line_response: Option, + /// Required field defining the question type. For details about configuring different type of questions, consult the question configuration guide. + #[serde(rename="type")] + pub type_: Option, + /// The randomization option for multiple choice and multi-select questions. If not specified, this option defaults to randomize. + #[serde(rename="answerOrder")] + pub answer_order: Option, + /// Placeholder text for an open text question. + #[serde(rename="openTextPlaceholder")] + pub open_text_placeholder: Option, +} + +impl Part for SurveyQuestion {} + + +/// There is no detailed description. +/// +/// This type is not used in any activity, and only used as *part* of another schema. +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct PageInfo { + /// no description provided + #[serde(rename="resultPerPage")] + pub result_per_page: Option, + /// no description provided + #[serde(rename="startIndex")] + pub start_index: Option, + /// no description provided + #[serde(rename="totalResults")] + pub total_results: Option, +} + +impl Part for PageInfo {} + + +/// There is no detailed description. +/// +/// # Activities +/// +/// This type is used in activities, which are methods you may call on this type or where this type is involved in. +/// The list links the activity name, along with information about where it is used (one of *request* and *response*). +/// +/// * [stop surveys](struct.SurveyStopCall.html) (response) +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct SurveysStopResponse { + /// Survey object containing the specification of the stopped Survey. + pub resource: Option, + /// Unique request ID used for logging and debugging. Please include in any error reporting or troubleshooting requests. + #[serde(rename="requestId")] + pub request_id: Option, +} + +impl ResponseResult for SurveysStopResponse {} + + + +// ################### +// MethodBuilders ### +// ################# + +/// A builder providing access to all methods supported on *survey* resources. +/// It is not used directly, but through the `Consumersurveys` hub. +/// +/// # Example +/// +/// Instantiate a resource builder +/// +/// ```test_harness,no_run +/// extern crate hyper; +/// extern crate yup_oauth2 as oauth2; +/// extern crate google_consumersurveys2 as consumersurveys2; +/// +/// # #[test] fn egal() { +/// use std::default::Default; +/// use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; +/// use consumersurveys2::Consumersurveys; +/// +/// let secret: ApplicationSecret = Default::default(); +/// let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, +/// hyper::Client::new(), +/// ::default(), None); +/// let mut hub = Consumersurveys::new(hyper::Client::new(), auth); +/// // Usually you wouldn't bind this to a variable, but keep calling *CallBuilders* +/// // like `get(...)`, `insert(...)`, `list(...)`, `start(...)`, `stop(...)` and `update(...)` +/// // to build up your call. +/// let rb = hub.surveys(); +/// # } +/// ``` +pub struct SurveyMethods<'a, C, A> + where C: 'a, A: 'a { + + hub: &'a Consumersurveys, +} + +impl<'a, C, A> MethodsBuilder for SurveyMethods<'a, C, A> {} + +impl<'a, C, A> SurveyMethods<'a, C, A> { + + /// Create a builder to help you perform the following task: + /// + /// Creates a survey. + /// + /// # Arguments + /// + /// * `request` - No description provided. + pub fn insert(&self, request: Survey) -> SurveyInsertCall<'a, C, A> { + SurveyInsertCall { + hub: self.hub, + _request: request, + _delegate: Default::default(), + _scopes: Default::default(), + _additional_params: Default::default(), + } + } + + /// Create a builder to help you perform the following task: + /// + /// Lists the surveys owned by the authenticated user. + pub fn list(&self) -> SurveyListCall<'a, C, A> { + SurveyListCall { + hub: self.hub, + _token: Default::default(), + _start_index: Default::default(), + _max_results: Default::default(), + _delegate: Default::default(), + _scopes: Default::default(), + _additional_params: Default::default(), + } + } + + /// Create a builder to help you perform the following task: + /// + /// Updates a survey. Currently the only property that can be updated is the owners property. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `surveyUrlId` - External URL ID for the survey. + pub fn update(&self, request: Survey, survey_url_id: &str) -> SurveyUpdateCall<'a, C, A> { + SurveyUpdateCall { + hub: self.hub, + _request: request, + _survey_url_id: survey_url_id.to_string(), + _delegate: Default::default(), + _scopes: Default::default(), + _additional_params: Default::default(), + } + } + + /// Create a builder to help you perform the following task: + /// + /// Retrieves information about the specified survey. + /// + /// # Arguments + /// + /// * `surveyUrlId` - External URL ID for the survey. + pub fn get(&self, survey_url_id: &str) -> SurveyGetCall<'a, C, A> { + SurveyGetCall { + hub: self.hub, + _survey_url_id: survey_url_id.to_string(), + _delegate: Default::default(), + _scopes: Default::default(), + _additional_params: Default::default(), + } + } + + /// Create a builder to help you perform the following task: + /// + /// Stops a running survey. + /// + /// # Arguments + /// + /// * `resourceId` - No description provided. + pub fn stop(&self, resource_id: &str) -> SurveyStopCall<'a, C, A> { + SurveyStopCall { + hub: self.hub, + _resource_id: resource_id.to_string(), + _delegate: Default::default(), + _scopes: Default::default(), + _additional_params: Default::default(), + } + } + + /// Create a builder to help you perform the following task: + /// + /// Begins running a survey. + /// + /// # Arguments + /// + /// * `resourceId` - No description provided. + pub fn start(&self, resource_id: &str) -> SurveyStartCall<'a, C, A> { + SurveyStartCall { + hub: self.hub, + _resource_id: resource_id.to_string(), + _delegate: Default::default(), + _scopes: Default::default(), + _additional_params: Default::default(), + } + } +} + + + +/// A builder providing access to all methods supported on *result* resources. +/// It is not used directly, but through the `Consumersurveys` hub. +/// +/// # Example +/// +/// Instantiate a resource builder +/// +/// ```test_harness,no_run +/// extern crate hyper; +/// extern crate yup_oauth2 as oauth2; +/// extern crate google_consumersurveys2 as consumersurveys2; +/// +/// # #[test] fn egal() { +/// use std::default::Default; +/// use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; +/// use consumersurveys2::Consumersurveys; +/// +/// let secret: ApplicationSecret = Default::default(); +/// let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, +/// hyper::Client::new(), +/// ::default(), None); +/// let mut hub = Consumersurveys::new(hyper::Client::new(), auth); +/// // Usually you wouldn't bind this to a variable, but keep calling *CallBuilders* +/// // like `get(...)` +/// // to build up your call. +/// let rb = hub.results(); +/// # } +/// ``` +pub struct ResultMethods<'a, C, A> + where C: 'a, A: 'a { + + hub: &'a Consumersurveys, +} + +impl<'a, C, A> MethodsBuilder for ResultMethods<'a, C, A> {} + +impl<'a, C, A> ResultMethods<'a, C, A> { + + /// Create a builder to help you perform the following task: + /// + /// Retrieves any survey results that have been produced so far. Results are formatted as an Excel file. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `surveyUrlId` - External URL ID for the survey. + pub fn get(&self, request: ResultsGetRequest, survey_url_id: &str) -> ResultGetCall<'a, C, A> { + ResultGetCall { + hub: self.hub, + _request: request, + _survey_url_id: survey_url_id.to_string(), + _delegate: Default::default(), + _scopes: Default::default(), + _additional_params: Default::default(), + } + } +} + + + + + +// ################### +// CallBuilders ### +// ################# + +/// Creates a survey. +/// +/// A builder for the *insert* method supported by a *survey* resource. +/// It is not used directly, but through a `SurveyMethods` instance. +/// +/// # Example +/// +/// Instantiate a resource method builder +/// +/// ```test_harness,no_run +/// # extern crate hyper; +/// # extern crate yup_oauth2 as oauth2; +/// # extern crate google_consumersurveys2 as consumersurveys2; +/// use consumersurveys2::Survey; +/// # #[test] fn egal() { +/// # use std::default::Default; +/// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; +/// # use consumersurveys2::Consumersurveys; +/// +/// # let secret: ApplicationSecret = Default::default(); +/// # let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, +/// # hyper::Client::new(), +/// # ::default(), None); +/// # let mut hub = Consumersurveys::new(hyper::Client::new(), auth); +/// // As the method needs a request, you would usually fill it with the desired information +/// // into the respective structure. Some of the parts shown here might not be applicable ! +/// // Values shown here are possibly random and not representative ! +/// let mut req = Survey::default(); +/// +/// // You can configure optional parameters by calling the respective setters at will, and +/// // execute the final call using `doit()`. +/// // Values shown here are possibly random and not representative ! +/// let result = hub.surveys().insert(req) +/// .doit(); +/// # } +/// ``` +pub struct SurveyInsertCall<'a, C, A> + where C: 'a, A: 'a { + + hub: &'a Consumersurveys, + _request: Survey, + _delegate: Option<&'a mut Delegate>, + _additional_params: HashMap, + _scopes: BTreeMap +} + +impl<'a, C, A> CallBuilder for SurveyInsertCall<'a, C, A> {} + +impl<'a, C, A> SurveyInsertCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { + + + /// Perform the operation you have build so far. + pub fn doit(mut self) -> Result<(hyper::client::Response, Survey)> { + use std::io::{Read, Seek}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; + let mut dd = DefaultDelegate; + let mut dlg: &mut Delegate = match self._delegate { + Some(d) => d, + None => &mut dd + }; + dlg.begin(MethodInfo { id: "consumersurveys.surveys.insert", + http_method: hyper::method::Method::Post }); + let mut params: Vec<(&str, String)> = Vec::with_capacity((3 + self._additional_params.len())); + for &field in ["alt"].iter() { + if self._additional_params.contains_key(field) { + dlg.finished(false); + return Err(Error::FieldClash(field)); + } + } + for (name, value) in self._additional_params.iter() { + params.push((&name, value.clone())); + } + + params.push(("alt", "json".to_string())); + + let mut url = "https://www.googleapis.com/consumersurveys/v2/surveys".to_string(); + if self._scopes.len() == 0 { + self._scopes.insert(Scope::Full.as_ref().to_string(), ()); + } + + + if params.len() > 0 { + url.push('?'); + url.push_str(&url::form_urlencoded::serialize(params)); + } + + let mut json_mime_type = mime::Mime(mime::TopLevel::Application, mime::SubLevel::Json, Default::default()); + let mut request_value_reader = + { + let mut value = json::value::to_value(&self._request); + remove_json_null_values(&mut value); + let mut dst = io::Cursor::new(Vec::with_capacity(128)); + json::to_writer(&mut dst, &value).unwrap(); + dst + }; + let request_size = request_value_reader.seek(io::SeekFrom::End(0)).unwrap(); + request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); + + + loop { + let token = match self.hub.auth.borrow_mut().token(self._scopes.keys()) { + Ok(token) => token, + Err(err) => { + match dlg.token(&*err) { + Some(token) => token, + None => { + dlg.finished(false); + return Err(Error::MissingToken(err)) + } + } + } + }; + let auth_header = Authorization(Bearer { token: token.access_token }); + request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); + let mut req_result = { + let mut client = &mut *self.hub.client.borrow_mut(); + let mut req = client.borrow_mut().request(hyper::method::Method::Post, &url) + .header(UserAgent(self.hub._user_agent.clone())) + .header(auth_header.clone()) + .header(ContentType(json_mime_type.clone())) + .header(ContentLength(request_size as u64)) + .body(&mut request_value_reader); + + dlg.pre_request(); + req.send() + }; + + match req_result { + Err(err) => { + if let oauth2::Retry::After(d) = dlg.http_error(&err) { + sleep(d); + continue; + } + dlg.finished(false); + return Err(Error::HttpError(err)) + } + Ok(mut res) => { + if !res.status.is_success() { + let mut json_err = String::new(); + res.read_to_string(&mut json_err).unwrap(); + if let oauth2::Retry::After(d) = dlg.http_failure(&res, + json::from_str(&json_err).ok(), + json::from_str(&json_err).ok()) { + sleep(d); + continue; + } + dlg.finished(false); + return match json::from_str::(&json_err){ + Err(_) => Err(Error::Failure(res)), + Ok(serr) => Err(Error::BadRequest(serr)) + } + } + let result_value = { + let mut json_response = String::new(); + res.read_to_string(&mut json_response).unwrap(); + match json::from_str(&json_response) { + Ok(decoded) => (res, decoded), + Err(err) => { + dlg.response_json_decode_error(&json_response, &err); + return Err(Error::JsonDecodeError(json_response, err)); + } + } + }; + + dlg.finished(true); + return Ok(result_value) + } + } + } + } + + + /// + /// Sets the *request* property to the given value. + /// + /// Even though the property as already been set when instantiating this call, + /// we provide this method for API completeness. + pub fn request(mut self, new_value: Survey) -> SurveyInsertCall<'a, C, A> { + self._request = new_value; + self + } + /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong + /// while executing the actual API request. + /// + /// It should be used to handle progress information, and to implement a certain level of resilience. + /// + /// Sets the *delegate* property to the given value. + pub fn delegate(mut self, new_value: &'a mut Delegate) -> SurveyInsertCall<'a, C, A> { + self._delegate = Some(new_value); + self + } + + /// Set any additional parameter of the query string used in the request. + /// It should be used to set parameters which are not yet available through their own + /// setters. + /// + /// Please note that this method must not be used to set any of the known paramters + /// which have their own setter method. If done anyway, the request will fail. + /// + /// # Additional Parameters + /// + /// * *quotaUser* (query-string) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. Overrides userIp if both are provided. + /// * *oauth_token* (query-string) - OAuth 2.0 token for the current user. + /// * *key* (query-string) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. + /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. + /// * *userIp* (query-string) - IP address of the site where the request originates. Use this if you want to enforce per-user limits. + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *alt* (query-string) - Data format for the response. + pub fn param(mut self, name: T, value: T) -> SurveyInsertCall<'a, C, A> + where T: AsRef { + self._additional_params.insert(name.as_ref().to_string(), value.as_ref().to_string()); + self + } + + /// Identifies the authorization scope for the method you are building. + /// + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. + /// + /// The `scope` will be added to a set of scopes. This is important as one can maintain access + /// tokens for more than one scope. + /// + /// Usually there is more than one suitable scope to authorize an operation, some of which may + /// encompass more rights than others. For example, for listing resources, a *read-only* scope will be + /// sufficient, a read-write scope will do as well. + pub fn add_scope(mut self, scope: T) -> SurveyInsertCall<'a, C, A> + where T: AsRef { + self._scopes.insert(scope.as_ref().to_string(), ()); + self + } +} + + +/// Lists the surveys owned by the authenticated user. +/// +/// A builder for the *list* method supported by a *survey* resource. +/// It is not used directly, but through a `SurveyMethods` instance. +/// +/// # Example +/// +/// Instantiate a resource method builder +/// +/// ```test_harness,no_run +/// # extern crate hyper; +/// # extern crate yup_oauth2 as oauth2; +/// # extern crate google_consumersurveys2 as consumersurveys2; +/// # #[test] fn egal() { +/// # use std::default::Default; +/// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; +/// # use consumersurveys2::Consumersurveys; +/// +/// # let secret: ApplicationSecret = Default::default(); +/// # let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, +/// # hyper::Client::new(), +/// # ::default(), None); +/// # let mut hub = Consumersurveys::new(hyper::Client::new(), auth); +/// // You can configure optional parameters by calling the respective setters at will, and +/// // execute the final call using `doit()`. +/// // Values shown here are possibly random and not representative ! +/// let result = hub.surveys().list() +/// .token("kasd") +/// .start_index(79) +/// .max_results(93) +/// .doit(); +/// # } +/// ``` +pub struct SurveyListCall<'a, C, A> + where C: 'a, A: 'a { + + hub: &'a Consumersurveys, + _token: Option, + _start_index: Option, + _max_results: Option, + _delegate: Option<&'a mut Delegate>, + _additional_params: HashMap, + _scopes: BTreeMap +} + +impl<'a, C, A> CallBuilder for SurveyListCall<'a, C, A> {} + +impl<'a, C, A> SurveyListCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { + + + /// Perform the operation you have build so far. + pub fn doit(mut self) -> Result<(hyper::client::Response, SurveysListResponse)> { + use std::io::{Read, Seek}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; + let mut dd = DefaultDelegate; + let mut dlg: &mut Delegate = match self._delegate { + Some(d) => d, + None => &mut dd + }; + dlg.begin(MethodInfo { id: "consumersurveys.surveys.list", + http_method: hyper::method::Method::Get }); + let mut params: Vec<(&str, String)> = Vec::with_capacity((5 + self._additional_params.len())); + if let Some(value) = self._token { + params.push(("token", value.to_string())); + } + if let Some(value) = self._start_index { + params.push(("startIndex", value.to_string())); + } + if let Some(value) = self._max_results { + params.push(("maxResults", value.to_string())); + } + for &field in ["alt", "token", "startIndex", "maxResults"].iter() { + if self._additional_params.contains_key(field) { + dlg.finished(false); + return Err(Error::FieldClash(field)); + } + } + for (name, value) in self._additional_params.iter() { + params.push((&name, value.clone())); + } + + params.push(("alt", "json".to_string())); + + let mut url = "https://www.googleapis.com/consumersurveys/v2/surveys".to_string(); + if self._scopes.len() == 0 { + self._scopes.insert(Scope::Readonly.as_ref().to_string(), ()); + } + + + if params.len() > 0 { + url.push('?'); + url.push_str(&url::form_urlencoded::serialize(params)); + } + + + + loop { + let token = match self.hub.auth.borrow_mut().token(self._scopes.keys()) { + Ok(token) => token, + Err(err) => { + match dlg.token(&*err) { + Some(token) => token, + None => { + dlg.finished(false); + return Err(Error::MissingToken(err)) + } + } + } + }; + let auth_header = Authorization(Bearer { token: token.access_token }); + let mut req_result = { + let mut client = &mut *self.hub.client.borrow_mut(); + let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) + .header(UserAgent(self.hub._user_agent.clone())) + .header(auth_header.clone()); + + dlg.pre_request(); + req.send() + }; + + match req_result { + Err(err) => { + if let oauth2::Retry::After(d) = dlg.http_error(&err) { + sleep(d); + continue; + } + dlg.finished(false); + return Err(Error::HttpError(err)) + } + Ok(mut res) => { + if !res.status.is_success() { + let mut json_err = String::new(); + res.read_to_string(&mut json_err).unwrap(); + if let oauth2::Retry::After(d) = dlg.http_failure(&res, + json::from_str(&json_err).ok(), + json::from_str(&json_err).ok()) { + sleep(d); + continue; + } + dlg.finished(false); + return match json::from_str::(&json_err){ + Err(_) => Err(Error::Failure(res)), + Ok(serr) => Err(Error::BadRequest(serr)) + } + } + let result_value = { + let mut json_response = String::new(); + res.read_to_string(&mut json_response).unwrap(); + match json::from_str(&json_response) { + Ok(decoded) => (res, decoded), + Err(err) => { + dlg.response_json_decode_error(&json_response, &err); + return Err(Error::JsonDecodeError(json_response, err)); + } + } + }; + + dlg.finished(true); + return Ok(result_value) + } + } + } + } + + + /// + /// Sets the *token* query property to the given value. + pub fn token(mut self, new_value: &str) -> SurveyListCall<'a, C, A> { + self._token = Some(new_value.to_string()); + self + } + /// + /// Sets the *start index* query property to the given value. + pub fn start_index(mut self, new_value: u32) -> SurveyListCall<'a, C, A> { + self._start_index = Some(new_value); + self + } + /// + /// Sets the *max results* query property to the given value. + pub fn max_results(mut self, new_value: u32) -> SurveyListCall<'a, C, A> { + self._max_results = Some(new_value); + self + } + /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong + /// while executing the actual API request. + /// + /// It should be used to handle progress information, and to implement a certain level of resilience. + /// + /// Sets the *delegate* property to the given value. + pub fn delegate(mut self, new_value: &'a mut Delegate) -> SurveyListCall<'a, C, A> { + self._delegate = Some(new_value); + self + } + + /// Set any additional parameter of the query string used in the request. + /// It should be used to set parameters which are not yet available through their own + /// setters. + /// + /// Please note that this method must not be used to set any of the known paramters + /// which have their own setter method. If done anyway, the request will fail. + /// + /// # Additional Parameters + /// + /// * *quotaUser* (query-string) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. Overrides userIp if both are provided. + /// * *oauth_token* (query-string) - OAuth 2.0 token for the current user. + /// * *key* (query-string) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. + /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. + /// * *userIp* (query-string) - IP address of the site where the request originates. Use this if you want to enforce per-user limits. + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *alt* (query-string) - Data format for the response. + pub fn param(mut self, name: T, value: T) -> SurveyListCall<'a, C, A> + where T: AsRef { + self._additional_params.insert(name.as_ref().to_string(), value.as_ref().to_string()); + self + } + + /// Identifies the authorization scope for the method you are building. + /// + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Readonly`. + /// + /// The `scope` will be added to a set of scopes. This is important as one can maintain access + /// tokens for more than one scope. + /// + /// Usually there is more than one suitable scope to authorize an operation, some of which may + /// encompass more rights than others. For example, for listing resources, a *read-only* scope will be + /// sufficient, a read-write scope will do as well. + pub fn add_scope(mut self, scope: T) -> SurveyListCall<'a, C, A> + where T: AsRef { + self._scopes.insert(scope.as_ref().to_string(), ()); + self + } +} + + +/// Updates a survey. Currently the only property that can be updated is the owners property. +/// +/// A builder for the *update* method supported by a *survey* resource. +/// It is not used directly, but through a `SurveyMethods` instance. +/// +/// # Example +/// +/// Instantiate a resource method builder +/// +/// ```test_harness,no_run +/// # extern crate hyper; +/// # extern crate yup_oauth2 as oauth2; +/// # extern crate google_consumersurveys2 as consumersurveys2; +/// use consumersurveys2::Survey; +/// # #[test] fn egal() { +/// # use std::default::Default; +/// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; +/// # use consumersurveys2::Consumersurveys; +/// +/// # let secret: ApplicationSecret = Default::default(); +/// # let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, +/// # hyper::Client::new(), +/// # ::default(), None); +/// # let mut hub = Consumersurveys::new(hyper::Client::new(), auth); +/// // As the method needs a request, you would usually fill it with the desired information +/// // into the respective structure. Some of the parts shown here might not be applicable ! +/// // Values shown here are possibly random and not representative ! +/// let mut req = Survey::default(); +/// +/// // You can configure optional parameters by calling the respective setters at will, and +/// // execute the final call using `doit()`. +/// // Values shown here are possibly random and not representative ! +/// let result = hub.surveys().update(req, "surveyUrlId") +/// .doit(); +/// # } +/// ``` +pub struct SurveyUpdateCall<'a, C, A> + where C: 'a, A: 'a { + + hub: &'a Consumersurveys, + _request: Survey, + _survey_url_id: String, + _delegate: Option<&'a mut Delegate>, + _additional_params: HashMap, + _scopes: BTreeMap +} + +impl<'a, C, A> CallBuilder for SurveyUpdateCall<'a, C, A> {} + +impl<'a, C, A> SurveyUpdateCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { + + + /// Perform the operation you have build so far. + pub fn doit(mut self) -> Result<(hyper::client::Response, Survey)> { + use std::io::{Read, Seek}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; + let mut dd = DefaultDelegate; + let mut dlg: &mut Delegate = match self._delegate { + Some(d) => d, + None => &mut dd + }; + dlg.begin(MethodInfo { id: "consumersurveys.surveys.update", + http_method: hyper::method::Method::Put }); + let mut params: Vec<(&str, String)> = Vec::with_capacity((4 + self._additional_params.len())); + params.push(("surveyUrlId", self._survey_url_id.to_string())); + for &field in ["alt", "surveyUrlId"].iter() { + if self._additional_params.contains_key(field) { + dlg.finished(false); + return Err(Error::FieldClash(field)); + } + } + for (name, value) in self._additional_params.iter() { + params.push((&name, value.clone())); + } + + params.push(("alt", "json".to_string())); + + let mut url = "https://www.googleapis.com/consumersurveys/v2/surveys/{surveyUrlId}".to_string(); + if self._scopes.len() == 0 { + self._scopes.insert(Scope::Full.as_ref().to_string(), ()); + } + + for &(find_this, param_name) in [("{surveyUrlId}", "surveyUrlId")].iter() { + let mut replace_with: Option<&str> = None; + for &(name, ref value) in params.iter() { + if name == param_name { + replace_with = Some(value); + break; + } + } + url = url.replace(find_this, replace_with.expect("to find substitution value in params")); + } + { + let mut indices_for_removal: Vec = Vec::with_capacity(1); + for param_name in ["surveyUrlId"].iter() { + if let Some(index) = params.iter().position(|t| &t.0 == param_name) { + indices_for_removal.push(index); + } + } + for &index in indices_for_removal.iter() { + params.remove(index); + } + } + + if params.len() > 0 { + url.push('?'); + url.push_str(&url::form_urlencoded::serialize(params)); + } + + let mut json_mime_type = mime::Mime(mime::TopLevel::Application, mime::SubLevel::Json, Default::default()); + let mut request_value_reader = + { + let mut value = json::value::to_value(&self._request); + remove_json_null_values(&mut value); + let mut dst = io::Cursor::new(Vec::with_capacity(128)); + json::to_writer(&mut dst, &value).unwrap(); + dst + }; + let request_size = request_value_reader.seek(io::SeekFrom::End(0)).unwrap(); + request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); + + + loop { + let token = match self.hub.auth.borrow_mut().token(self._scopes.keys()) { + Ok(token) => token, + Err(err) => { + match dlg.token(&*err) { + Some(token) => token, + None => { + dlg.finished(false); + return Err(Error::MissingToken(err)) + } + } + } + }; + let auth_header = Authorization(Bearer { token: token.access_token }); + request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); + let mut req_result = { + let mut client = &mut *self.hub.client.borrow_mut(); + let mut req = client.borrow_mut().request(hyper::method::Method::Put, &url) + .header(UserAgent(self.hub._user_agent.clone())) + .header(auth_header.clone()) + .header(ContentType(json_mime_type.clone())) + .header(ContentLength(request_size as u64)) + .body(&mut request_value_reader); + + dlg.pre_request(); + req.send() + }; + + match req_result { + Err(err) => { + if let oauth2::Retry::After(d) = dlg.http_error(&err) { + sleep(d); + continue; + } + dlg.finished(false); + return Err(Error::HttpError(err)) + } + Ok(mut res) => { + if !res.status.is_success() { + let mut json_err = String::new(); + res.read_to_string(&mut json_err).unwrap(); + if let oauth2::Retry::After(d) = dlg.http_failure(&res, + json::from_str(&json_err).ok(), + json::from_str(&json_err).ok()) { + sleep(d); + continue; + } + dlg.finished(false); + return match json::from_str::(&json_err){ + Err(_) => Err(Error::Failure(res)), + Ok(serr) => Err(Error::BadRequest(serr)) + } + } + let result_value = { + let mut json_response = String::new(); + res.read_to_string(&mut json_response).unwrap(); + match json::from_str(&json_response) { + Ok(decoded) => (res, decoded), + Err(err) => { + dlg.response_json_decode_error(&json_response, &err); + return Err(Error::JsonDecodeError(json_response, err)); + } + } + }; + + dlg.finished(true); + return Ok(result_value) + } + } + } + } + + + /// + /// Sets the *request* property to the given value. + /// + /// Even though the property as already been set when instantiating this call, + /// we provide this method for API completeness. + pub fn request(mut self, new_value: Survey) -> SurveyUpdateCall<'a, C, A> { + self._request = new_value; + self + } + /// External URL ID for the survey. + /// + /// Sets the *survey url id* path property to the given value. + /// + /// Even though the property as already been set when instantiating this call, + /// we provide this method for API completeness. + pub fn survey_url_id(mut self, new_value: &str) -> SurveyUpdateCall<'a, C, A> { + self._survey_url_id = new_value.to_string(); + self + } + /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong + /// while executing the actual API request. + /// + /// It should be used to handle progress information, and to implement a certain level of resilience. + /// + /// Sets the *delegate* property to the given value. + pub fn delegate(mut self, new_value: &'a mut Delegate) -> SurveyUpdateCall<'a, C, A> { + self._delegate = Some(new_value); + self + } + + /// Set any additional parameter of the query string used in the request. + /// It should be used to set parameters which are not yet available through their own + /// setters. + /// + /// Please note that this method must not be used to set any of the known paramters + /// which have their own setter method. If done anyway, the request will fail. + /// + /// # Additional Parameters + /// + /// * *quotaUser* (query-string) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. Overrides userIp if both are provided. + /// * *oauth_token* (query-string) - OAuth 2.0 token for the current user. + /// * *key* (query-string) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. + /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. + /// * *userIp* (query-string) - IP address of the site where the request originates. Use this if you want to enforce per-user limits. + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *alt* (query-string) - Data format for the response. + pub fn param(mut self, name: T, value: T) -> SurveyUpdateCall<'a, C, A> + where T: AsRef { + self._additional_params.insert(name.as_ref().to_string(), value.as_ref().to_string()); + self + } + + /// Identifies the authorization scope for the method you are building. + /// + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. + /// + /// The `scope` will be added to a set of scopes. This is important as one can maintain access + /// tokens for more than one scope. + /// + /// Usually there is more than one suitable scope to authorize an operation, some of which may + /// encompass more rights than others. For example, for listing resources, a *read-only* scope will be + /// sufficient, a read-write scope will do as well. + pub fn add_scope(mut self, scope: T) -> SurveyUpdateCall<'a, C, A> + where T: AsRef { + self._scopes.insert(scope.as_ref().to_string(), ()); + self + } +} + + +/// Retrieves information about the specified survey. +/// +/// A builder for the *get* method supported by a *survey* resource. +/// It is not used directly, but through a `SurveyMethods` instance. +/// +/// # Example +/// +/// Instantiate a resource method builder +/// +/// ```test_harness,no_run +/// # extern crate hyper; +/// # extern crate yup_oauth2 as oauth2; +/// # extern crate google_consumersurveys2 as consumersurveys2; +/// # #[test] fn egal() { +/// # use std::default::Default; +/// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; +/// # use consumersurveys2::Consumersurveys; +/// +/// # let secret: ApplicationSecret = Default::default(); +/// # let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, +/// # hyper::Client::new(), +/// # ::default(), None); +/// # let mut hub = Consumersurveys::new(hyper::Client::new(), auth); +/// // You can configure optional parameters by calling the respective setters at will, and +/// // execute the final call using `doit()`. +/// // Values shown here are possibly random and not representative ! +/// let result = hub.surveys().get("surveyUrlId") +/// .doit(); +/// # } +/// ``` +pub struct SurveyGetCall<'a, C, A> + where C: 'a, A: 'a { + + hub: &'a Consumersurveys, + _survey_url_id: String, + _delegate: Option<&'a mut Delegate>, + _additional_params: HashMap, + _scopes: BTreeMap +} + +impl<'a, C, A> CallBuilder for SurveyGetCall<'a, C, A> {} + +impl<'a, C, A> SurveyGetCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { + + + /// Perform the operation you have build so far. + pub fn doit(mut self) -> Result<(hyper::client::Response, Survey)> { + use std::io::{Read, Seek}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; + let mut dd = DefaultDelegate; + let mut dlg: &mut Delegate = match self._delegate { + Some(d) => d, + None => &mut dd + }; + dlg.begin(MethodInfo { id: "consumersurveys.surveys.get", + http_method: hyper::method::Method::Get }); + let mut params: Vec<(&str, String)> = Vec::with_capacity((3 + self._additional_params.len())); + params.push(("surveyUrlId", self._survey_url_id.to_string())); + for &field in ["alt", "surveyUrlId"].iter() { + if self._additional_params.contains_key(field) { + dlg.finished(false); + return Err(Error::FieldClash(field)); + } + } + for (name, value) in self._additional_params.iter() { + params.push((&name, value.clone())); + } + + params.push(("alt", "json".to_string())); + + let mut url = "https://www.googleapis.com/consumersurveys/v2/surveys/{surveyUrlId}".to_string(); + if self._scopes.len() == 0 { + self._scopes.insert(Scope::Readonly.as_ref().to_string(), ()); + } + + for &(find_this, param_name) in [("{surveyUrlId}", "surveyUrlId")].iter() { + let mut replace_with: Option<&str> = None; + for &(name, ref value) in params.iter() { + if name == param_name { + replace_with = Some(value); + break; + } + } + url = url.replace(find_this, replace_with.expect("to find substitution value in params")); + } + { + let mut indices_for_removal: Vec = Vec::with_capacity(1); + for param_name in ["surveyUrlId"].iter() { + if let Some(index) = params.iter().position(|t| &t.0 == param_name) { + indices_for_removal.push(index); + } + } + for &index in indices_for_removal.iter() { + params.remove(index); + } + } + + if params.len() > 0 { + url.push('?'); + url.push_str(&url::form_urlencoded::serialize(params)); + } + + + + loop { + let token = match self.hub.auth.borrow_mut().token(self._scopes.keys()) { + Ok(token) => token, + Err(err) => { + match dlg.token(&*err) { + Some(token) => token, + None => { + dlg.finished(false); + return Err(Error::MissingToken(err)) + } + } + } + }; + let auth_header = Authorization(Bearer { token: token.access_token }); + let mut req_result = { + let mut client = &mut *self.hub.client.borrow_mut(); + let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) + .header(UserAgent(self.hub._user_agent.clone())) + .header(auth_header.clone()); + + dlg.pre_request(); + req.send() + }; + + match req_result { + Err(err) => { + if let oauth2::Retry::After(d) = dlg.http_error(&err) { + sleep(d); + continue; + } + dlg.finished(false); + return Err(Error::HttpError(err)) + } + Ok(mut res) => { + if !res.status.is_success() { + let mut json_err = String::new(); + res.read_to_string(&mut json_err).unwrap(); + if let oauth2::Retry::After(d) = dlg.http_failure(&res, + json::from_str(&json_err).ok(), + json::from_str(&json_err).ok()) { + sleep(d); + continue; + } + dlg.finished(false); + return match json::from_str::(&json_err){ + Err(_) => Err(Error::Failure(res)), + Ok(serr) => Err(Error::BadRequest(serr)) + } + } + let result_value = { + let mut json_response = String::new(); + res.read_to_string(&mut json_response).unwrap(); + match json::from_str(&json_response) { + Ok(decoded) => (res, decoded), + Err(err) => { + dlg.response_json_decode_error(&json_response, &err); + return Err(Error::JsonDecodeError(json_response, err)); + } + } + }; + + dlg.finished(true); + return Ok(result_value) + } + } + } + } + + + /// External URL ID for the survey. + /// + /// Sets the *survey url id* path property to the given value. + /// + /// Even though the property as already been set when instantiating this call, + /// we provide this method for API completeness. + pub fn survey_url_id(mut self, new_value: &str) -> SurveyGetCall<'a, C, A> { + self._survey_url_id = new_value.to_string(); + self + } + /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong + /// while executing the actual API request. + /// + /// It should be used to handle progress information, and to implement a certain level of resilience. + /// + /// Sets the *delegate* property to the given value. + pub fn delegate(mut self, new_value: &'a mut Delegate) -> SurveyGetCall<'a, C, A> { + self._delegate = Some(new_value); + self + } + + /// Set any additional parameter of the query string used in the request. + /// It should be used to set parameters which are not yet available through their own + /// setters. + /// + /// Please note that this method must not be used to set any of the known paramters + /// which have their own setter method. If done anyway, the request will fail. + /// + /// # Additional Parameters + /// + /// * *quotaUser* (query-string) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. Overrides userIp if both are provided. + /// * *oauth_token* (query-string) - OAuth 2.0 token for the current user. + /// * *key* (query-string) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. + /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. + /// * *userIp* (query-string) - IP address of the site where the request originates. Use this if you want to enforce per-user limits. + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *alt* (query-string) - Data format for the response. + pub fn param(mut self, name: T, value: T) -> SurveyGetCall<'a, C, A> + where T: AsRef { + self._additional_params.insert(name.as_ref().to_string(), value.as_ref().to_string()); + self + } + + /// Identifies the authorization scope for the method you are building. + /// + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Readonly`. + /// + /// The `scope` will be added to a set of scopes. This is important as one can maintain access + /// tokens for more than one scope. + /// + /// Usually there is more than one suitable scope to authorize an operation, some of which may + /// encompass more rights than others. For example, for listing resources, a *read-only* scope will be + /// sufficient, a read-write scope will do as well. + pub fn add_scope(mut self, scope: T) -> SurveyGetCall<'a, C, A> + where T: AsRef { + self._scopes.insert(scope.as_ref().to_string(), ()); + self + } +} + + +/// Stops a running survey. +/// +/// A builder for the *stop* method supported by a *survey* resource. +/// It is not used directly, but through a `SurveyMethods` instance. +/// +/// # Example +/// +/// Instantiate a resource method builder +/// +/// ```test_harness,no_run +/// # extern crate hyper; +/// # extern crate yup_oauth2 as oauth2; +/// # extern crate google_consumersurveys2 as consumersurveys2; +/// # #[test] fn egal() { +/// # use std::default::Default; +/// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; +/// # use consumersurveys2::Consumersurveys; +/// +/// # let secret: ApplicationSecret = Default::default(); +/// # let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, +/// # hyper::Client::new(), +/// # ::default(), None); +/// # let mut hub = Consumersurveys::new(hyper::Client::new(), auth); +/// // You can configure optional parameters by calling the respective setters at will, and +/// // execute the final call using `doit()`. +/// // Values shown here are possibly random and not representative ! +/// let result = hub.surveys().stop("resourceId") +/// .doit(); +/// # } +/// ``` +pub struct SurveyStopCall<'a, C, A> + where C: 'a, A: 'a { + + hub: &'a Consumersurveys, + _resource_id: String, + _delegate: Option<&'a mut Delegate>, + _additional_params: HashMap, + _scopes: BTreeMap +} + +impl<'a, C, A> CallBuilder for SurveyStopCall<'a, C, A> {} + +impl<'a, C, A> SurveyStopCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { + + + /// Perform the operation you have build so far. + pub fn doit(mut self) -> Result<(hyper::client::Response, SurveysStopResponse)> { + use std::io::{Read, Seek}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; + let mut dd = DefaultDelegate; + let mut dlg: &mut Delegate = match self._delegate { + Some(d) => d, + None => &mut dd + }; + dlg.begin(MethodInfo { id: "consumersurveys.surveys.stop", + http_method: hyper::method::Method::Post }); + let mut params: Vec<(&str, String)> = Vec::with_capacity((3 + self._additional_params.len())); + params.push(("resourceId", self._resource_id.to_string())); + for &field in ["alt", "resourceId"].iter() { + if self._additional_params.contains_key(field) { + dlg.finished(false); + return Err(Error::FieldClash(field)); + } + } + for (name, value) in self._additional_params.iter() { + params.push((&name, value.clone())); + } + + params.push(("alt", "json".to_string())); + + let mut url = "https://www.googleapis.com/consumersurveys/v2/surveys/{resourceId}/stop".to_string(); + if self._scopes.len() == 0 { + self._scopes.insert(Scope::Full.as_ref().to_string(), ()); + } + + for &(find_this, param_name) in [("{resourceId}", "resourceId")].iter() { + let mut replace_with: Option<&str> = None; + for &(name, ref value) in params.iter() { + if name == param_name { + replace_with = Some(value); + break; + } + } + url = url.replace(find_this, replace_with.expect("to find substitution value in params")); + } + { + let mut indices_for_removal: Vec = Vec::with_capacity(1); + for param_name in ["resourceId"].iter() { + if let Some(index) = params.iter().position(|t| &t.0 == param_name) { + indices_for_removal.push(index); + } + } + for &index in indices_for_removal.iter() { + params.remove(index); + } + } + + if params.len() > 0 { + url.push('?'); + url.push_str(&url::form_urlencoded::serialize(params)); + } + + + + loop { + let token = match self.hub.auth.borrow_mut().token(self._scopes.keys()) { + Ok(token) => token, + Err(err) => { + match dlg.token(&*err) { + Some(token) => token, + None => { + dlg.finished(false); + return Err(Error::MissingToken(err)) + } + } + } + }; + let auth_header = Authorization(Bearer { token: token.access_token }); + let mut req_result = { + let mut client = &mut *self.hub.client.borrow_mut(); + let mut req = client.borrow_mut().request(hyper::method::Method::Post, &url) + .header(UserAgent(self.hub._user_agent.clone())) + .header(auth_header.clone()); + + dlg.pre_request(); + req.send() + }; + + match req_result { + Err(err) => { + if let oauth2::Retry::After(d) = dlg.http_error(&err) { + sleep(d); + continue; + } + dlg.finished(false); + return Err(Error::HttpError(err)) + } + Ok(mut res) => { + if !res.status.is_success() { + let mut json_err = String::new(); + res.read_to_string(&mut json_err).unwrap(); + if let oauth2::Retry::After(d) = dlg.http_failure(&res, + json::from_str(&json_err).ok(), + json::from_str(&json_err).ok()) { + sleep(d); + continue; + } + dlg.finished(false); + return match json::from_str::(&json_err){ + Err(_) => Err(Error::Failure(res)), + Ok(serr) => Err(Error::BadRequest(serr)) + } + } + let result_value = { + let mut json_response = String::new(); + res.read_to_string(&mut json_response).unwrap(); + match json::from_str(&json_response) { + Ok(decoded) => (res, decoded), + Err(err) => { + dlg.response_json_decode_error(&json_response, &err); + return Err(Error::JsonDecodeError(json_response, err)); + } + } + }; + + dlg.finished(true); + return Ok(result_value) + } + } + } + } + + + /// + /// Sets the *resource id* path property to the given value. + /// + /// Even though the property as already been set when instantiating this call, + /// we provide this method for API completeness. + pub fn resource_id(mut self, new_value: &str) -> SurveyStopCall<'a, C, A> { + self._resource_id = new_value.to_string(); + self + } + /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong + /// while executing the actual API request. + /// + /// It should be used to handle progress information, and to implement a certain level of resilience. + /// + /// Sets the *delegate* property to the given value. + pub fn delegate(mut self, new_value: &'a mut Delegate) -> SurveyStopCall<'a, C, A> { + self._delegate = Some(new_value); + self + } + + /// Set any additional parameter of the query string used in the request. + /// It should be used to set parameters which are not yet available through their own + /// setters. + /// + /// Please note that this method must not be used to set any of the known paramters + /// which have their own setter method. If done anyway, the request will fail. + /// + /// # Additional Parameters + /// + /// * *quotaUser* (query-string) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. Overrides userIp if both are provided. + /// * *oauth_token* (query-string) - OAuth 2.0 token for the current user. + /// * *key* (query-string) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. + /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. + /// * *userIp* (query-string) - IP address of the site where the request originates. Use this if you want to enforce per-user limits. + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *alt* (query-string) - Data format for the response. + pub fn param(mut self, name: T, value: T) -> SurveyStopCall<'a, C, A> + where T: AsRef { + self._additional_params.insert(name.as_ref().to_string(), value.as_ref().to_string()); + self + } + + /// Identifies the authorization scope for the method you are building. + /// + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. + /// + /// The `scope` will be added to a set of scopes. This is important as one can maintain access + /// tokens for more than one scope. + /// + /// Usually there is more than one suitable scope to authorize an operation, some of which may + /// encompass more rights than others. For example, for listing resources, a *read-only* scope will be + /// sufficient, a read-write scope will do as well. + pub fn add_scope(mut self, scope: T) -> SurveyStopCall<'a, C, A> + where T: AsRef { + self._scopes.insert(scope.as_ref().to_string(), ()); + self + } +} + + +/// Begins running a survey. +/// +/// A builder for the *start* method supported by a *survey* resource. +/// It is not used directly, but through a `SurveyMethods` instance. +/// +/// # Example +/// +/// Instantiate a resource method builder +/// +/// ```test_harness,no_run +/// # extern crate hyper; +/// # extern crate yup_oauth2 as oauth2; +/// # extern crate google_consumersurveys2 as consumersurveys2; +/// # #[test] fn egal() { +/// # use std::default::Default; +/// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; +/// # use consumersurveys2::Consumersurveys; +/// +/// # let secret: ApplicationSecret = Default::default(); +/// # let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, +/// # hyper::Client::new(), +/// # ::default(), None); +/// # let mut hub = Consumersurveys::new(hyper::Client::new(), auth); +/// // You can configure optional parameters by calling the respective setters at will, and +/// // execute the final call using `doit()`. +/// // Values shown here are possibly random and not representative ! +/// let result = hub.surveys().start("resourceId") +/// .doit(); +/// # } +/// ``` +pub struct SurveyStartCall<'a, C, A> + where C: 'a, A: 'a { + + hub: &'a Consumersurveys, + _resource_id: String, + _delegate: Option<&'a mut Delegate>, + _additional_params: HashMap, + _scopes: BTreeMap +} + +impl<'a, C, A> CallBuilder for SurveyStartCall<'a, C, A> {} + +impl<'a, C, A> SurveyStartCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { + + + /// Perform the operation you have build so far. + pub fn doit(mut self) -> Result<(hyper::client::Response, SurveysStartResponse)> { + use std::io::{Read, Seek}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; + let mut dd = DefaultDelegate; + let mut dlg: &mut Delegate = match self._delegate { + Some(d) => d, + None => &mut dd + }; + dlg.begin(MethodInfo { id: "consumersurveys.surveys.start", + http_method: hyper::method::Method::Post }); + let mut params: Vec<(&str, String)> = Vec::with_capacity((3 + self._additional_params.len())); + params.push(("resourceId", self._resource_id.to_string())); + for &field in ["alt", "resourceId"].iter() { + if self._additional_params.contains_key(field) { + dlg.finished(false); + return Err(Error::FieldClash(field)); + } + } + for (name, value) in self._additional_params.iter() { + params.push((&name, value.clone())); + } + + params.push(("alt", "json".to_string())); + + let mut url = "https://www.googleapis.com/consumersurveys/v2/surveys/{resourceId}/start".to_string(); + if self._scopes.len() == 0 { + self._scopes.insert(Scope::Full.as_ref().to_string(), ()); + } + + for &(find_this, param_name) in [("{resourceId}", "resourceId")].iter() { + let mut replace_with: Option<&str> = None; + for &(name, ref value) in params.iter() { + if name == param_name { + replace_with = Some(value); + break; + } + } + url = url.replace(find_this, replace_with.expect("to find substitution value in params")); + } + { + let mut indices_for_removal: Vec = Vec::with_capacity(1); + for param_name in ["resourceId"].iter() { + if let Some(index) = params.iter().position(|t| &t.0 == param_name) { + indices_for_removal.push(index); + } + } + for &index in indices_for_removal.iter() { + params.remove(index); + } + } + + if params.len() > 0 { + url.push('?'); + url.push_str(&url::form_urlencoded::serialize(params)); + } + + + + loop { + let token = match self.hub.auth.borrow_mut().token(self._scopes.keys()) { + Ok(token) => token, + Err(err) => { + match dlg.token(&*err) { + Some(token) => token, + None => { + dlg.finished(false); + return Err(Error::MissingToken(err)) + } + } + } + }; + let auth_header = Authorization(Bearer { token: token.access_token }); + let mut req_result = { + let mut client = &mut *self.hub.client.borrow_mut(); + let mut req = client.borrow_mut().request(hyper::method::Method::Post, &url) + .header(UserAgent(self.hub._user_agent.clone())) + .header(auth_header.clone()); + + dlg.pre_request(); + req.send() + }; + + match req_result { + Err(err) => { + if let oauth2::Retry::After(d) = dlg.http_error(&err) { + sleep(d); + continue; + } + dlg.finished(false); + return Err(Error::HttpError(err)) + } + Ok(mut res) => { + if !res.status.is_success() { + let mut json_err = String::new(); + res.read_to_string(&mut json_err).unwrap(); + if let oauth2::Retry::After(d) = dlg.http_failure(&res, + json::from_str(&json_err).ok(), + json::from_str(&json_err).ok()) { + sleep(d); + continue; + } + dlg.finished(false); + return match json::from_str::(&json_err){ + Err(_) => Err(Error::Failure(res)), + Ok(serr) => Err(Error::BadRequest(serr)) + } + } + let result_value = { + let mut json_response = String::new(); + res.read_to_string(&mut json_response).unwrap(); + match json::from_str(&json_response) { + Ok(decoded) => (res, decoded), + Err(err) => { + dlg.response_json_decode_error(&json_response, &err); + return Err(Error::JsonDecodeError(json_response, err)); + } + } + }; + + dlg.finished(true); + return Ok(result_value) + } + } + } + } + + + /// + /// Sets the *resource id* path property to the given value. + /// + /// Even though the property as already been set when instantiating this call, + /// we provide this method for API completeness. + pub fn resource_id(mut self, new_value: &str) -> SurveyStartCall<'a, C, A> { + self._resource_id = new_value.to_string(); + self + } + /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong + /// while executing the actual API request. + /// + /// It should be used to handle progress information, and to implement a certain level of resilience. + /// + /// Sets the *delegate* property to the given value. + pub fn delegate(mut self, new_value: &'a mut Delegate) -> SurveyStartCall<'a, C, A> { + self._delegate = Some(new_value); + self + } + + /// Set any additional parameter of the query string used in the request. + /// It should be used to set parameters which are not yet available through their own + /// setters. + /// + /// Please note that this method must not be used to set any of the known paramters + /// which have their own setter method. If done anyway, the request will fail. + /// + /// # Additional Parameters + /// + /// * *quotaUser* (query-string) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. Overrides userIp if both are provided. + /// * *oauth_token* (query-string) - OAuth 2.0 token for the current user. + /// * *key* (query-string) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. + /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. + /// * *userIp* (query-string) - IP address of the site where the request originates. Use this if you want to enforce per-user limits. + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *alt* (query-string) - Data format for the response. + pub fn param(mut self, name: T, value: T) -> SurveyStartCall<'a, C, A> + where T: AsRef { + self._additional_params.insert(name.as_ref().to_string(), value.as_ref().to_string()); + self + } + + /// Identifies the authorization scope for the method you are building. + /// + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Full`. + /// + /// The `scope` will be added to a set of scopes. This is important as one can maintain access + /// tokens for more than one scope. + /// + /// Usually there is more than one suitable scope to authorize an operation, some of which may + /// encompass more rights than others. For example, for listing resources, a *read-only* scope will be + /// sufficient, a read-write scope will do as well. + pub fn add_scope(mut self, scope: T) -> SurveyStartCall<'a, C, A> + where T: AsRef { + self._scopes.insert(scope.as_ref().to_string(), ()); + self + } +} + + +/// Retrieves any survey results that have been produced so far. Results are formatted as an Excel file. +/// +/// This method supports **media download**. To enable it, adjust the builder like this: +/// `.param("alt", "media")`. +/// Please note that due to missing multi-part support on the server side, you will only receive the media, +/// but not the `SurveyResults` structure that you would usually get. The latter will be a default value. +/// +/// A builder for the *get* method supported by a *result* resource. +/// It is not used directly, but through a `ResultMethods` instance. +/// +/// # Example +/// +/// Instantiate a resource method builder +/// +/// ```test_harness,no_run +/// # extern crate hyper; +/// # extern crate yup_oauth2 as oauth2; +/// # extern crate google_consumersurveys2 as consumersurveys2; +/// use consumersurveys2::ResultsGetRequest; +/// # #[test] fn egal() { +/// # use std::default::Default; +/// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; +/// # use consumersurveys2::Consumersurveys; +/// +/// # let secret: ApplicationSecret = Default::default(); +/// # let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, +/// # hyper::Client::new(), +/// # ::default(), None); +/// # let mut hub = Consumersurveys::new(hyper::Client::new(), auth); +/// // As the method needs a request, you would usually fill it with the desired information +/// // into the respective structure. Some of the parts shown here might not be applicable ! +/// // Values shown here are possibly random and not representative ! +/// let mut req = ResultsGetRequest::default(); +/// +/// // You can configure optional parameters by calling the respective setters at will, and +/// // execute the final call using `doit()`. +/// // Values shown here are possibly random and not representative ! +/// let result = hub.results().get(req, "surveyUrlId") +/// .doit(); +/// # } +/// ``` +pub struct ResultGetCall<'a, C, A> + where C: 'a, A: 'a { + + hub: &'a Consumersurveys, + _request: ResultsGetRequest, + _survey_url_id: String, + _delegate: Option<&'a mut Delegate>, + _additional_params: HashMap, + _scopes: BTreeMap +} + +impl<'a, C, A> CallBuilder for ResultGetCall<'a, C, A> {} + +impl<'a, C, A> ResultGetCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { + + + /// Perform the operation you have build so far. + pub fn doit(mut self) -> Result<(hyper::client::Response, SurveyResults)> { + use std::io::{Read, Seek}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; + let mut dd = DefaultDelegate; + let mut dlg: &mut Delegate = match self._delegate { + Some(d) => d, + None => &mut dd + }; + dlg.begin(MethodInfo { id: "consumersurveys.results.get", + http_method: hyper::method::Method::Get }); + let mut params: Vec<(&str, String)> = Vec::with_capacity((3 + self._additional_params.len())); + params.push(("surveyUrlId", self._survey_url_id.to_string())); + for &field in ["surveyUrlId"].iter() { + if self._additional_params.contains_key(field) { + dlg.finished(false); + return Err(Error::FieldClash(field)); + } + } + for (name, value) in self._additional_params.iter() { + params.push((&name, value.clone())); + } + + let (json_field_missing, enable_resource_parsing) = { + let mut enable = true; + let mut field_present = true; + for &(name, ref value) in params.iter() { + if name == "alt" { + field_present = false; + if >::as_ref(&value) != "json" { + enable = false; + } + break; + } + } + (field_present, enable) + }; + if json_field_missing { + params.push(("alt", "json".to_string())); + } + + let mut url = "https://www.googleapis.com/consumersurveys/v2/surveys/{surveyUrlId}/results".to_string(); + if self._scopes.len() == 0 { + self._scopes.insert(Scope::Readonly.as_ref().to_string(), ()); + } + + for &(find_this, param_name) in [("{surveyUrlId}", "surveyUrlId")].iter() { + let mut replace_with: Option<&str> = None; + for &(name, ref value) in params.iter() { + if name == param_name { + replace_with = Some(value); + break; + } + } + url = url.replace(find_this, replace_with.expect("to find substitution value in params")); + } + { + let mut indices_for_removal: Vec = Vec::with_capacity(1); + for param_name in ["surveyUrlId"].iter() { + if let Some(index) = params.iter().position(|t| &t.0 == param_name) { + indices_for_removal.push(index); + } + } + for &index in indices_for_removal.iter() { + params.remove(index); + } + } + + if params.len() > 0 { + url.push('?'); + url.push_str(&url::form_urlencoded::serialize(params)); + } + + let mut json_mime_type = mime::Mime(mime::TopLevel::Application, mime::SubLevel::Json, Default::default()); + let mut request_value_reader = + { + let mut value = json::value::to_value(&self._request); + remove_json_null_values(&mut value); + let mut dst = io::Cursor::new(Vec::with_capacity(128)); + json::to_writer(&mut dst, &value).unwrap(); + dst + }; + let request_size = request_value_reader.seek(io::SeekFrom::End(0)).unwrap(); + request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); + + + loop { + let token = match self.hub.auth.borrow_mut().token(self._scopes.keys()) { + Ok(token) => token, + Err(err) => { + match dlg.token(&*err) { + Some(token) => token, + None => { + dlg.finished(false); + return Err(Error::MissingToken(err)) + } + } + } + }; + let auth_header = Authorization(Bearer { token: token.access_token }); + request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); + let mut req_result = { + let mut client = &mut *self.hub.client.borrow_mut(); + let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) + .header(UserAgent(self.hub._user_agent.clone())) + .header(auth_header.clone()) + .header(ContentType(json_mime_type.clone())) + .header(ContentLength(request_size as u64)) + .body(&mut request_value_reader); + + dlg.pre_request(); + req.send() + }; + + match req_result { + Err(err) => { + if let oauth2::Retry::After(d) = dlg.http_error(&err) { + sleep(d); + continue; + } + dlg.finished(false); + return Err(Error::HttpError(err)) + } + Ok(mut res) => { + if !res.status.is_success() { + let mut json_err = String::new(); + res.read_to_string(&mut json_err).unwrap(); + if let oauth2::Retry::After(d) = dlg.http_failure(&res, + json::from_str(&json_err).ok(), + json::from_str(&json_err).ok()) { + sleep(d); + continue; + } + dlg.finished(false); + return match json::from_str::(&json_err){ + Err(_) => Err(Error::Failure(res)), + Ok(serr) => Err(Error::BadRequest(serr)) + } + } + let result_value = if enable_resource_parsing { + let mut json_response = String::new(); + res.read_to_string(&mut json_response).unwrap(); + match json::from_str(&json_response) { + Ok(decoded) => (res, decoded), + Err(err) => { + dlg.response_json_decode_error(&json_response, &err); + return Err(Error::JsonDecodeError(json_response, err)); + } + } + } else { (res, Default::default()) }; + + dlg.finished(true); + return Ok(result_value) + } + } + } + } + + + /// + /// Sets the *request* property to the given value. + /// + /// Even though the property as already been set when instantiating this call, + /// we provide this method for API completeness. + pub fn request(mut self, new_value: ResultsGetRequest) -> ResultGetCall<'a, C, A> { + self._request = new_value; + self + } + /// External URL ID for the survey. + /// + /// Sets the *survey url id* path property to the given value. + /// + /// Even though the property as already been set when instantiating this call, + /// we provide this method for API completeness. + pub fn survey_url_id(mut self, new_value: &str) -> ResultGetCall<'a, C, A> { + self._survey_url_id = new_value.to_string(); + self + } + /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong + /// while executing the actual API request. + /// + /// It should be used to handle progress information, and to implement a certain level of resilience. + /// + /// Sets the *delegate* property to the given value. + pub fn delegate(mut self, new_value: &'a mut Delegate) -> ResultGetCall<'a, C, A> { + self._delegate = Some(new_value); + self + } + + /// Set any additional parameter of the query string used in the request. + /// It should be used to set parameters which are not yet available through their own + /// setters. + /// + /// Please note that this method must not be used to set any of the known paramters + /// which have their own setter method. If done anyway, the request will fail. + /// + /// # Additional Parameters + /// + /// * *quotaUser* (query-string) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. Overrides userIp if both are provided. + /// * *oauth_token* (query-string) - OAuth 2.0 token for the current user. + /// * *key* (query-string) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. + /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. + /// * *userIp* (query-string) - IP address of the site where the request originates. Use this if you want to enforce per-user limits. + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *alt* (query-string) - Data format for the response. + pub fn param(mut self, name: T, value: T) -> ResultGetCall<'a, C, A> + where T: AsRef { + self._additional_params.insert(name.as_ref().to_string(), value.as_ref().to_string()); + self + } + + /// Identifies the authorization scope for the method you are building. + /// + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Readonly`. + /// + /// The `scope` will be added to a set of scopes. This is important as one can maintain access + /// tokens for more than one scope. + /// + /// Usually there is more than one suitable scope to authorize an operation, some of which may + /// encompass more rights than others. For example, for listing resources, a *read-only* scope will be + /// sufficient, a read-write scope will do as well. + pub fn add_scope(mut self, scope: T) -> ResultGetCall<'a, C, A> + where T: AsRef { + self._scopes.insert(scope.as_ref().to_string(), ()); + self + } +} + + diff --git a/gen/container1-cli/Cargo.toml b/gen/container1-cli/Cargo.toml index 7f1c6161b6..d508a5277c 100644 --- a/gen/container1-cli/Cargo.toml +++ b/gen/container1-cli/Cargo.toml @@ -4,7 +4,7 @@ [package] name = "google-container1-cli" -version = "0.3.3+20150603" +version = "0.3.4+20160321" authors = ["Sebastian Thiel "] description = "A complete library to interact with container (protocol v1)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/container1-cli" @@ -17,18 +17,18 @@ keywords = ["container", "google", "cli"] name = "container1" [dependencies] -hyper = "0.7" -mime = "0.1.0" -serde = ">= 0.7.0" -serde_json = ">= 0.7.0" -yup-oauth2 = ">= 0.5.4" +hyper = "0.8" +mime = "0.2.0" +serde = "0.6.0" +serde_json = "0.6.0" +yup-oauth2 = ">= 0.5.6" strsim = "0.4" yup-hyper-mock = "1.0" clap = "2.0" [build-dependencies] -syntex = { version = ">= 0.23" } -serde_codegen = { version = ">= 0.6" } +syntex = { version = "= 0.28" } +serde_codegen = { version = "= 0.6.13" } [dependencies.google-container1] diff --git a/gen/container1-cli/README.md b/gen/container1-cli/README.md index 0c81dee5fd..7549a526d3 100644 --- a/gen/container1-cli/README.md +++ b/gen/container1-cli/README.md @@ -17,14 +17,14 @@ Everything else about the *container* API can be found at the You can download the pre-compiled 64bit binaries for the following platforms: -* ![icon](http://megaicons.net/static/img/icons_sizes/6/140/16/ubuntu-icon.png) [ubuntu](http://dl.byronimo.de/google.rs/cli/0.3.3/ubuntu/container1.tar.gz) -* ![icon](http://hydra-media.cursecdn.com/wow.gamepedia.com/a/a2/Apple-icon-16x16.png?version=25ddd67ac3dd3b634478e3978b76cb74) [osx](http://dl.byronimo.de/google.rs/cli/0.3.3/osx/container1.tar.gz) +* ![icon](http://megaicons.net/static/img/icons_sizes/6/140/16/ubuntu-icon.png) [ubuntu](http://dl.byronimo.de/google.rs/cli/0.3.4/ubuntu/container1.tar.gz) +* ![icon](http://hydra-media.cursecdn.com/wow.gamepedia.com/a/a2/Apple-icon-16x16.png?version=25ddd67ac3dd3b634478e3978b76cb74) [osx](http://dl.byronimo.de/google.rs/cli/0.3.4/osx/container1.tar.gz) Find the source code [on github](https://github.com/Byron/google-apis-rs/tree/master/gen/container1-cli). # Usage -This documentation was generated from the *container* API at revision *20150603*. The CLI is at version *0.3.3*. +This documentation was generated from the *container* API at revision *20160321*. The CLI is at version *0.3.4*. ```bash container1 [options] diff --git a/gen/container1-cli/mkdocs.yml b/gen/container1-cli/mkdocs.yml index 19f19cb87d..924e181119 100644 --- a/gen/container1-cli/mkdocs.yml +++ b/gen/container1-cli/mkdocs.yml @@ -1,4 +1,4 @@ -site_name: container v0.3.3+20150603 +site_name: container v0.3.4+20160321 site_url: http://byron.github.io/google-apis-rs/google-container1-cli site_description: Write integrating applications with bcore diff --git a/gen/container1-cli/src/cmn.rs b/gen/container1-cli/src/cmn.rs index 188159ee80..ae86fdef65 100644 --- a/gen/container1-cli/src/cmn.rs +++ b/gen/container1-cli/src/cmn.rs @@ -414,7 +414,7 @@ impl TokenStorage for JsonTokenStorage { Err(err) => match err.kind() { io::ErrorKind::NotFound => Ok(()), - _ => Err(json::Error::Io(err)) + _ => Err(json::Error::IoError(err)) }, Ok(_) => Ok(()), } @@ -427,7 +427,7 @@ impl TokenStorage for JsonTokenStorage { Err(serde_err) => Err(serde_err), } }, - Err(io_err) => Err(json::Error::Io(io_err)) + Err(io_err) => Err(json::Error::IoError(io_err)) } } } @@ -444,7 +444,7 @@ impl TokenStorage for JsonTokenStorage { Err(io_err) => { match io_err.kind() { io::ErrorKind::NotFound => Ok(None), - _ => Err(json::Error::Io(io_err)) + _ => Err(json::Error::IoError(io_err)) } } } @@ -683,7 +683,7 @@ pub fn application_secret_from_directory(dir: &str, = json::from_str(json_console_secret).unwrap(); match json::to_writer_pretty(&mut f, &console_secret) { Err(serde_err) => match serde_err { - json::Error::Io(err) => err, + json::Error::IoError(err) => err, _ => panic!("Unexpected serde error: {:#?}", serde_err) }, Ok(_) => continue, @@ -696,7 +696,7 @@ pub fn application_secret_from_directory(dir: &str, }, Ok(f) => { match json::de::from_reader::<_, ConsoleApplicationSecret>(f) { - Err(json::Error::Io(err)) => + Err(json::Error::IoError(err)) => return secret_io_error(err), Err(json_err) => return Err(CLIError::Configuration( diff --git a/gen/container1-cli/src/main.rs b/gen/container1-cli/src/main.rs index fdb231b7c3..0559a173ca 100644 --- a/gen/container1-cli/src/main.rs +++ b/gen/container1-cli/src/main.rs @@ -68,35 +68,40 @@ impl<'n> Engine<'n> { let type_info: Option<(&'static str, JsonTypeInfo)> = match &temp_cursor.to_string()[..] { - "cluster.status" => Some(("cluster.status", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "cluster.node-ipv4-cidr-size" => Some(("cluster.nodeIpv4CidrSize", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), - "cluster.status-message" => Some(("cluster.statusMessage", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), - "cluster.endpoint" => Some(("cluster.endpoint", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), - "cluster.description" => Some(("cluster.description", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "cluster.addons-config.http-load-balancing.disabled" => Some(("cluster.addonsConfig.httpLoadBalancing.disabled", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "cluster.addons-config.horizontal-pod-autoscaling.disabled" => Some(("cluster.addonsConfig.horizontalPodAutoscaling.disabled", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "cluster.network" => Some(("cluster.network", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "cluster.logging-service" => Some(("cluster.loggingService", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), - "cluster.current-node-version" => Some(("cluster.currentNodeVersion", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "cluster.instance-group-urls" => Some(("cluster.instanceGroupUrls", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Vec })), - "cluster.current-master-version" => Some(("cluster.currentMasterVersion", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "cluster.status-message" => Some(("cluster.statusMessage", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "cluster.services-ipv4-cidr" => Some(("cluster.servicesIpv4Cidr", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "cluster.status" => Some(("cluster.status", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "cluster.description" => Some(("cluster.description", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "cluster.current-node-version" => Some(("cluster.currentNodeVersion", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "cluster.current-master-version" => Some(("cluster.currentMasterVersion", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "cluster.master-auth.username" => Some(("cluster.masterAuth.username", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "cluster.master-auth.password" => Some(("cluster.masterAuth.password", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "cluster.master-auth.client-key" => Some(("cluster.masterAuth.clientKey", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "cluster.master-auth.client-certificate" => Some(("cluster.masterAuth.clientCertificate", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "cluster.master-auth.cluster-ca-certificate" => Some(("cluster.masterAuth.clusterCaCertificate", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "cluster.initial-node-count" => Some(("cluster.initialNodeCount", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), + "cluster.monitoring-service" => Some(("cluster.monitoringService", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "cluster.create-time" => Some(("cluster.createTime", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "cluster.name" => Some(("cluster.name", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "cluster.endpoint" => Some(("cluster.endpoint", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "cluster.current-node-count" => Some(("cluster.currentNodeCount", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), + "cluster.zone" => Some(("cluster.zone", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "cluster.initial-cluster-version" => Some(("cluster.initialClusterVersion", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "cluster.node-config.disk-size-gb" => Some(("cluster.nodeConfig.diskSizeGb", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), "cluster.node-config.machine-type" => Some(("cluster.nodeConfig.machineType", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "cluster.node-config.oauth-scopes" => Some(("cluster.nodeConfig.oauthScopes", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Vec })), - "cluster.initial-node-count" => Some(("cluster.initialNodeCount", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), + "cluster.node-config.metadata" => Some(("cluster.nodeConfig.metadata", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Map })), "cluster.cluster-ipv4-cidr" => Some(("cluster.clusterIpv4Cidr", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), - "cluster.monitoring-service" => Some(("cluster.monitoringService", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), - "cluster.zone" => Some(("cluster.zone", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), - "cluster.create-time" => Some(("cluster.createTime", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "cluster.subnetwork" => Some(("cluster.subnetwork", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "cluster.self-link" => Some(("cluster.selfLink", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), - "cluster.network" => Some(("cluster.network", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), _ => { - let suggestion = FieldCursor::did_you_mean(key, &vec!["client-certificate", "client-key", "cluster", "cluster-ca-certificate", "cluster-ipv4-cidr", "create-time", "current-master-version", "current-node-version", "description", "disk-size-gb", "endpoint", "initial-cluster-version", "initial-node-count", "instance-group-urls", "logging-service", "machine-type", "master-auth", "monitoring-service", "name", "network", "node-config", "node-ipv4-cidr-size", "oauth-scopes", "password", "self-link", "services-ipv4-cidr", "status", "status-message", "username", "zone"]); + let suggestion = FieldCursor::did_you_mean(key, &vec!["addons-config", "client-certificate", "client-key", "cluster", "cluster-ca-certificate", "cluster-ipv4-cidr", "create-time", "current-master-version", "current-node-count", "current-node-version", "description", "disabled", "disk-size-gb", "endpoint", "horizontal-pod-autoscaling", "http-load-balancing", "initial-cluster-version", "initial-node-count", "instance-group-urls", "logging-service", "machine-type", "master-auth", "metadata", "monitoring-service", "name", "network", "node-config", "node-ipv4-cidr-size", "oauth-scopes", "password", "self-link", "services-ipv4-cidr", "status", "status-message", "subnetwork", "username", "zone"]); err.issues.push(CLIError::Field(FieldError::Unknown(temp_cursor.to_string(), suggestion, value.map(|v| v.to_string())))); None } @@ -335,9 +340,13 @@ impl<'n> Engine<'n> { let type_info: Option<(&'static str, JsonTypeInfo)> = match &temp_cursor.to_string()[..] { + "update.desired-master-version" => Some(("update.desiredMasterVersion", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "update.desired-node-version" => Some(("update.desiredNodeVersion", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "update.desired-monitoring-service" => Some(("update.desiredMonitoringService", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "update.desired-addons-config.http-load-balancing.disabled" => Some(("update.desiredAddonsConfig.httpLoadBalancing.disabled", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "update.desired-addons-config.horizontal-pod-autoscaling.disabled" => Some(("update.desiredAddonsConfig.horizontalPodAutoscaling.disabled", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), _ => { - let suggestion = FieldCursor::did_you_mean(key, &vec!["desired-node-version", "update"]); + let suggestion = FieldCursor::did_you_mean(key, &vec!["desired-addons-config", "desired-master-version", "desired-monitoring-service", "desired-node-version", "disabled", "horizontal-pod-autoscaling", "http-load-balancing", "update"]); err.issues.push(CLIError::Field(FieldError::Unknown(temp_cursor.to_string(), suggestion, value.map(|v| v.to_string())))); None } @@ -678,12 +687,12 @@ fn main() { let arg_data = [ ("projects", "methods: 'zones-clusters-create', 'zones-clusters-delete', 'zones-clusters-get', 'zones-clusters-list', 'zones-clusters-update', 'zones-get-serverconfig', 'zones-operations-get' and 'zones-operations-list'", vec![ ("zones-clusters-create", - Some(r##"Creates a cluster, consisting of the specified number and type of Google Compute Engine instances, plus a Kubernetes master endpoint. By default, the cluster is created in the project's [default network](/compute/docs/networking#networks_1). One firewall is added for the cluster. After cluster creation, the cluster creates routes for each node to allow the containers on that node to communicate with all other instances in the cluster. Finally, an entry is added to the project's global metadata indicating which CIDR range is being used by the cluster."##), + Some(r##"Creates a cluster, consisting of the specified number and type of Google Compute Engine instances. By default, the cluster is created in the project's [default network](/compute/docs/networks-and-firewalls#networks). One firewall is added for the cluster. After cluster creation, the cluster creates routes for each node to allow the containers on that node to communicate with all other instances in the cluster. Finally, an entry is added to the project's global metadata indicating which CIDR range is being used by the cluster."##), "Details at http://byron.github.io/google-apis-rs/google_container1_cli/projects_zones-clusters-create", vec![ (Some(r##"project-id"##), None, - Some(r##"The Google Developers Console [project ID or project number](https://developers.google.com/console/help/new/#projectnumber)."##), + Some(r##"The Google Developers Console [project ID or project number](https://support.google.com/cloud/answer/6158840)."##), Some(true), Some(false)), @@ -712,12 +721,12 @@ fn main() { Some(false)), ]), ("zones-clusters-delete", - Some(r##"Deletes the cluster, including the Kubernetes endpoint and all worker nodes. Firewalls and routes that were configured during cluster creation are also deleted."##), + Some(r##"Deletes the cluster, including the Kubernetes endpoint and all worker nodes. Firewalls and routes that were configured during cluster creation are also deleted. Other Google Compute Engine resources that might be in use by the cluster (e.g. load balancer resources) will not be deleted if they weren't present at the initial create time."##), "Details at http://byron.github.io/google-apis-rs/google_container1_cli/projects_zones-clusters-delete", vec![ (Some(r##"project-id"##), None, - Some(r##"The Google Developers Console [project ID or project number](https://developers.google.com/console/help/new/#projectnumber)."##), + Some(r##"The Google Developers Console [project ID or project number](https://support.google.com/cloud/answer/6158840)."##), Some(true), Some(false)), @@ -746,12 +755,12 @@ fn main() { Some(false)), ]), ("zones-clusters-get", - Some(r##"Gets a specific cluster."##), + Some(r##"Gets the details of a specific cluster."##), "Details at http://byron.github.io/google-apis-rs/google_container1_cli/projects_zones-clusters-get", vec![ (Some(r##"project-id"##), None, - Some(r##"The Google Developers Console [project ID or project number](https://developers.google.com/console/help/new/#projectnumber)."##), + Some(r##"The Google Developers Console [project ID or project number](https://support.google.com/cloud/answer/6158840)."##), Some(true), Some(false)), @@ -785,7 +794,7 @@ fn main() { vec![ (Some(r##"project-id"##), None, - Some(r##"The Google Developers Console [project ID or project number](https://developers.google.com/console/help/new/#projectnumber)."##), + Some(r##"The Google Developers Console [project ID or project number](https://support.google.com/cloud/answer/6158840)."##), Some(true), Some(false)), @@ -808,12 +817,12 @@ fn main() { Some(false)), ]), ("zones-clusters-update", - Some(r##"Update settings of a specific cluster."##), + Some(r##"Updates the settings of a specific cluster."##), "Details at http://byron.github.io/google-apis-rs/google_container1_cli/projects_zones-clusters-update", vec![ (Some(r##"project-id"##), None, - Some(r##"The Google Developers Console [project ID or project number](https://developers.google.com/console/help/new/#projectnumber)."##), + Some(r##"The Google Developers Console [project ID or project number](https://support.google.com/cloud/answer/6158840)."##), Some(true), Some(false)), @@ -853,13 +862,13 @@ fn main() { vec![ (Some(r##"project-id"##), None, - Some(r##"The Google Developers Console [project ID or project number](https://developers.google.com/console/help/new/#projectnumber)."##), + Some(r##"The Google Developers Console [project ID or project number](https://support.google.com/cloud/answer/6158840)."##), Some(true), Some(false)), (Some(r##"zone"##), None, - Some(r##"The name of the Google Compute Engine [zone](/compute/docs/zones#available) to return operations for, or "-" for all zones."##), + Some(r##"The name of the Google Compute Engine [zone](/compute/docs/zones#available) to return operations for."##), Some(true), Some(false)), @@ -881,7 +890,7 @@ fn main() { vec![ (Some(r##"project-id"##), None, - Some(r##"The Google Developers Console [project ID or project number](https://developers.google.com/console/help/new/#projectnumber)."##), + Some(r##"The Google Developers Console [project ID or project number](https://support.google.com/cloud/answer/6158840)."##), Some(true), Some(false)), @@ -915,13 +924,13 @@ fn main() { vec![ (Some(r##"project-id"##), None, - Some(r##"The Google Developers Console [project ID or project number](https://developers.google.com/console/help/new/#projectnumber)."##), + Some(r##"The Google Developers Console [project ID or project number](https://support.google.com/cloud/answer/6158840)."##), Some(true), Some(false)), (Some(r##"zone"##), None, - Some(r##"The name of the Google Compute Engine [zone](/compute/docs/zones#available) to return operations for, or "-" for all zones."##), + Some(r##"The name of the Google Compute Engine [zone](/compute/docs/zones#available) to return operations for, or `-` for all zones."##), Some(true), Some(false)), @@ -943,8 +952,8 @@ fn main() { let mut app = App::new("container1") .author("Sebastian Thiel ") - .version("0.3.3+20150603") - .about("The Google Container Engine API is used for building and managing container based applications, powered by the open source Kubernetes technology.") + .version("0.3.4+20160321") + .about("Builds and manages clusters that run container-based applications, powered by open source Kubernetes technology.") .after_help("All documentation details can be found at http://byron.github.io/google-apis-rs/google_container1_cli") .arg(Arg::with_name("url") .long("scope") diff --git a/gen/container1/Cargo.toml b/gen/container1/Cargo.toml index e193b2c6ec..7c74ad11b6 100644 --- a/gen/container1/Cargo.toml +++ b/gen/container1/Cargo.toml @@ -4,7 +4,7 @@ [package] name = "google-container1" -version = "0.1.12+20150603" +version = "0.1.13+20160321" authors = ["Sebastian Thiel "] description = "A complete library to interact with container (protocol v1)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/container1" @@ -16,14 +16,14 @@ build = "src/build.rs" [dependencies] -hyper = "0.7" -mime = "0.1.0" -serde = ">= 0.7.0" -serde_json = ">= 0.7.0" -yup-oauth2 = ">= 0.5.4" +hyper = "0.8" +mime = "0.2.0" +serde = "0.6.0" +serde_json = "0.6.0" +yup-oauth2 = ">= 0.5.6" url = ">= 0.5" [build-dependencies] -syntex = { version = ">= 0.23" } -serde_codegen = { version = ">= 0.6" } +syntex = { version = "= 0.28" } +serde_codegen = { version = "= 0.6.13" } diff --git a/gen/container1/README.md b/gen/container1/README.md index 95d9c12aa4..152d5e444a 100644 --- a/gen/container1/README.md +++ b/gen/container1/README.md @@ -5,7 +5,7 @@ DO NOT EDIT ! --> The `google-container1` library allows access to all features of the *Google container* service. -This documentation was generated from *container* crate version *0.1.12+20150603*, where *20150603* is the exact revision of the *container:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.12*. +This documentation was generated from *container* crate version *0.1.13+20160321*, where *20160321* is the exact revision of the *container:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.13*. Everything else about the *container* *v1* API can be found at the [official documentation site](https://cloud.google.com/container-engine/). diff --git a/gen/container1/src/cmn.rs b/gen/container1/src/cmn.rs index 87b91a8986..c69621da55 100644 --- a/gen/container1/src/cmn.rs +++ b/gen/container1/src/cmn.rs @@ -12,7 +12,7 @@ use mime::{Mime, TopLevel, SubLevel, Attr, Value}; use oauth2::{TokenType, Retry, self}; use hyper; use hyper::header::{ContentType, ContentLength, Headers, UserAgent, Authorization, Header, - HeaderFormat}; + HeaderFormat, Bearer}; use hyper::http::h1::LINE_ENDING; use hyper::method::Method; use hyper::status::StatusCode; @@ -634,7 +634,7 @@ pub struct ResumableUploadHelper<'a, A: 'a> { pub start_at: Option, pub auth: &'a mut A, pub user_agent: &'a str, - pub auth_header: Authorization, + pub auth_header: Authorization, pub url: &'a str, pub reader: &'a mut ReadSeek, pub media_type: Mime, diff --git a/gen/container1/src/lib.rs b/gen/container1/src/lib.rs index 820a7a1006..3a11ee67cf 100644 --- a/gen/container1/src/lib.rs +++ b/gen/container1/src/lib.rs @@ -2,7 +2,7 @@ // This file was generated automatically from 'src/mako/api/lib.rs.mako' // DO NOT EDIT ! -//! This documentation was generated from *container* crate version *0.1.12+20150603*, where *20150603* is the exact revision of the *container:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.12*. +//! This documentation was generated from *container* crate version *0.1.13+20160321*, where *20160321* is the exact revision of the *container:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.13*. //! //! Everything else about the *container* *v1* API can be found at the //! [official documentation site](https://cloud.google.com/container-engine/). diff --git a/gen/container1/src/lib.rs.in b/gen/container1/src/lib.rs.in index c4f91c80ac..7e6823a179 100644 --- a/gen/container1/src/lib.rs.in +++ b/gen/container1/src/lib.rs.in @@ -133,7 +133,7 @@ impl<'a, C, A> Container Container { client: RefCell::new(client), auth: RefCell::new(authenticator), - _user_agent: "google-api-rust-client/0.1.12".to_string(), + _user_agent: "google-api-rust-client/0.1.13".to_string(), } } @@ -142,7 +142,7 @@ impl<'a, C, A> Container } /// Set the user-agent header field to use in all requests to the server. - /// It defaults to `google-api-rust-client/0.1.12`. + /// It defaults to `google-api-rust-client/0.1.13`. /// /// Returns the previously set user-agent. pub fn user_agent(&mut self, agent_name: String) -> String { @@ -156,15 +156,24 @@ impl<'a, C, A> Container // ############ // SCHEMAS ### // ########## -/// ClusterUpdate describes an update to the cluster. +/// ClusterUpdate describes an update to the cluster. Exactly one update can be applied to a cluster with each request, so at most one field can be provided. /// /// This type is not used in any activity, and only used as *part* of another schema. /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ClusterUpdate { - /// The Kubernetes version to change the nodes to (typically an upgrade). Use "-" to upgrade to the latest version supported by the server. + /// The Kubernetes version to change the master to. The only valid value is the latest supported version. Use "-" to have the server automatically select the latest version. + #[serde(rename="desiredMasterVersion")] + pub desired_master_version: Option, + /// The Kubernetes version to change the nodes to (typically an upgrade). Use `-` to upgrade to the latest version supported by the server. #[serde(rename="desiredNodeVersion")] pub desired_node_version: Option, + /// The monitoring service the cluster should use to write metrics. Currently available options: * "monitoring.googleapis.com" - the Google Cloud Monitoring service * "none" - no metrics will be exported from the cluster + #[serde(rename="desiredMonitoringService")] + pub desired_monitoring_service: Option, + /// Configurations for the various addons available to run in the cluster. + #[serde(rename="desiredAddonsConfig")] + pub desired_addons_config: Option, } impl Part for ClusterUpdate {} @@ -188,7 +197,7 @@ pub struct CreateClusterRequest { impl RequestValue for CreateClusterRequest {} -/// UpdateClusterRequest updates a cluster. +/// UpdateClusterRequest updates the settings of a cluster. /// /// # Activities /// @@ -206,6 +215,36 @@ pub struct UpdateClusterRequest { impl RequestValue for UpdateClusterRequest {} +/// Configuration options for the HTTP (L7) load balancing controller addon, which makes it easy to set up HTTP load balancers for services in a cluster. +/// +/// This type is not used in any activity, and only used as *part* of another schema. +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct HttpLoadBalancing { + /// Whether the HTTP Load Balancing controller is enabled in the cluster. When enabled, it runs a small pod in the cluster that manages the load balancers. + pub disabled: Option, +} + +impl Part for HttpLoadBalancing {} + + +/// Configuration for the addons that can be automatically spun up in the cluster, enabling additional functionality. +/// +/// This type is not used in any activity, and only used as *part* of another schema. +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct AddonsConfig { + /// Configuration for the HTTP (L7) load balancing controller addon, which makes it easy to set up HTTP load balancers for services in a cluster. + #[serde(rename="httpLoadBalancing")] + pub http_load_balancing: Option, + /// Configuration for the horizontal pod autoscaling feature, which increases or decreases the number of replica pods a replication controller has based on the resource usage of the existing pods. + #[serde(rename="horizontalPodAutoscaling")] + pub horizontal_pod_autoscaling: Option, +} + +impl Part for AddonsConfig {} + + /// ListClustersResponse is the result of ListClustersRequest. /// /// # Activities @@ -219,6 +258,9 @@ impl RequestValue for UpdateClusterRequest {} pub struct ListClustersResponse { /// A list of clusters in the project in the specified zone, or across all ones. pub clusters: Option>, + /// If any zones are listed here, the list of clusters returned may be missing those zones. + #[serde(rename="missingZones")] + pub missing_zones: Option>, } impl ResponseResult for ListClustersResponse {} @@ -230,17 +272,17 @@ impl ResponseResult for ListClustersResponse {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct MasterAuth { - /// The username to use for HTTP basic authentication when accessing the Kubernetes master endpoint. + /// The username to use for HTTP basic authentication to the master endpoint. pub username: Option, - /// The password to use for HTTP basic authentication when accessing the Kubernetes master endpoint. Because the master endpoint is open to the internet, you should create a strong password. + /// The password to use for HTTP basic authentication to the master endpoint. Because the master endpoint is open to the Internet, you should create a strong password. pub password: Option, - /// [Output only] Base64 encoded private key used by clients to authenticate to the cluster endpoint. + /// [Output only] Base64-encoded private key used by clients to authenticate to the cluster endpoint. #[serde(rename="clientKey")] pub client_key: Option, - /// [Output only] Base64 encoded public certificate used by clients to authenticate to the cluster endpoint. + /// [Output only] Base64-encoded public certificate used by clients to authenticate to the cluster endpoint. #[serde(rename="clientCertificate")] pub client_certificate: Option, - /// [Output only] Base64 encoded public certificate that is the root of trust for the cluster. + /// [Output only] Base64-encoded public certificate that is the root of trust for the cluster. #[serde(rename="clusterCaCertificate")] pub cluster_ca_certificate: Option, } @@ -248,26 +290,17 @@ pub struct MasterAuth { impl Part for MasterAuth {} -/// Container Engine Server configuration. +/// Configuration options for the horizontal pod autoscaling feature, which increases or decreases the number of replica pods a replication controller has based on the resource usage of the existing pods. /// -/// # Activities -/// -/// This type is used in activities, which are methods you may call on this type or where this type is involved in. -/// The list links the activity name, along with information about where it is used (one of *request* and *response*). -/// -/// * [zones get serverconfig projects](struct.ProjectZoneGetServerconfigCall.html) (response) +/// This type is not used in any activity, and only used as *part* of another schema. /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] -pub struct ServerConfig { - /// What version this server deploys by default. - #[serde(rename="defaultClusterVersion")] - pub default_cluster_version: Option, - /// List of valid node upgrade target versions. - #[serde(rename="validNodeVersions")] - pub valid_node_versions: Option>, +pub struct HorizontalPodAutoscaling { + /// Whether the Horizontal Pod Autoscaling feature is enabled in the cluster. When enabled, it ensures that a Heapster pod is running in the cluster, which is also used by the Cloud Monitoring service. + pub disabled: Option, } -impl ResponseResult for ServerConfig {} +impl Part for HorizontalPodAutoscaling {} /// A Google Container Engine cluster. @@ -281,47 +314,53 @@ impl ResponseResult for ServerConfig {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Cluster { - /// [Output only] The current status of this cluster. - pub status: Option, - /// [Output only] The size of the address space on each node for hosting containers. This is provisioned from within the container_ipv4_cidr range. + /// [Output only] The size of the address space on each node for hosting containers. This is provisioned from within the `container_ipv4_cidr` range. #[serde(rename="nodeIpv4CidrSize")] pub node_ipv4_cidr_size: Option, - /// An optional description of this cluster. - pub description: Option, - /// [Output only] The current version of the node software components. If they are currently at different versions because they're in the process of being upgraded, this reflects the minimum version of any of them. - #[serde(rename="currentNodeVersion")] - pub current_node_version: Option, + /// [Output only] The current status of this cluster. + pub status: Option, /// [Output only] The current software version of the master endpoint. #[serde(rename="currentMasterVersion")] pub current_master_version: Option, - /// The authentication information for accessing the master. + /// An optional description of this cluster. + pub description: Option, + /// [Output only] The current version of the node software components. If they are currently at multiple versions because they're in the process of being upgraded, this reflects the minimum version of all nodes. + #[serde(rename="currentNodeVersion")] + pub current_node_version: Option, + /// Configurations for the various addons available to run in the cluster. + #[serde(rename="addonsConfig")] + pub addons_config: Option, + /// The authentication information for accessing the master endpoint. #[serde(rename="masterAuth")] pub master_auth: Option, - /// The number of nodes to create in this cluster. You must ensure that your Compute Engine [resource quota](/compute/docs/resource-quotas) is sufficient for this number of instances. You must also have available firewall and routes quota. + /// The number of nodes to create in this cluster. You must ensure that your Compute Engine resource quota is sufficient for this number of instances. You must also have available firewall and routes quota. For requests, this field should only be used in lieu of a "node_pool" object, since this configuration (along with the "node_config") will be used to create a "NodePool" object with an auto-generated name. Do not use this and a node_pool at the same time. #[serde(rename="initialNodeCount")] pub initial_node_count: Option, - /// The monitoring service that the cluster should write metrics to. Currently available options: * "monitoring.googleapis.com" - the Google Cloud Monitoring service * "none" - no metrics will be exported from the cluster * "" - default value; the default is "monitoring.googleapis.com" + /// The monitoring service the cluster should use to write metrics. Currently available options: * `monitoring.googleapis.com` - the Google Cloud Monitoring service. * `none` - no metrics will be exported from the cluster. * if left as an empty string, `monitoring.googleapis.com` will be used. #[serde(rename="monitoringService")] pub monitoring_service: Option, /// [Output only] The time the cluster was created, in [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text format. #[serde(rename="createTime")] pub create_time: Option, - /// The name of the Google Compute Engine [network](/compute/docs/networking#networks_1) to which the cluster is connected. If left unspecified, the "default" network will be used. - pub network: Option, - /// [Output only] The IP address of this cluster's Kubernetes master endpoint. The endpoint can be accessed from the internet at `https://username:password@endpoint/`. See the `masterAuth` property of this resource for username and password information. - pub endpoint: Option, /// The name of this cluster. The name must be unique within this project and zone, and can be up to 40 characters with the following restrictions: * Lowercase letters, numbers, and hyphens only. * Must start with a letter. * Must end with a number or a letter. pub name: Option, - /// The logging service that the cluster should write logs to. Currently available options: * "logging.googleapis.com" - the Google Cloud Logging service * "none" - no logs will be exported from the cluster * "" - default value; the default is "logging.googleapis.com" + /// [Output only] The IP address of this cluster's master endpoint. The endpoint can be accessed from the internet at `https://username:password@endpoint/`. See the `masterAuth` property of this resource for username and password information. + pub endpoint: Option, + /// [Output only] The number of nodes currently in the cluster. + #[serde(rename="currentNodeCount")] + pub current_node_count: Option, + /// The name of the Google Compute Engine [network](/compute/docs/networks-and-firewalls#networks) to which the cluster is connected. If left unspecified, the `default` network will be used. + pub network: Option, + /// The logging service the cluster should use to write logs. Currently available options: * `logging.googleapis.com` - the Google Cloud Logging service. * `none` - no logs will be exported from the cluster. * if left as an empty string,`logging.googleapis.com` will be used. #[serde(rename="loggingService")] pub logging_service: Option, /// [Output only] The resource URLs of [instance groups](/compute/docs/instance-groups/) associated with this cluster. #[serde(rename="instanceGroupUrls")] pub instance_group_urls: Option>, - /// [Output only] The software version of Kubernetes master and kubelets used in the cluster when it was first created. The version can be upgraded over time. + /// [Output only] The software version of the master endpoint and kubelets used in the cluster when it was first created. The version can be upgraded over time. #[serde(rename="initialClusterVersion")] pub initial_cluster_version: Option, - /// Parameters used in creating the cluster's nodes. See the descriptions of the child properties of `nodeConfig`. If unspecified, the defaults for all child properties are used. + /// Parameters used in creating the cluster's nodes. See `nodeConfig` for the description of its properties. For requests, this field should only be used in lieu of a "node_pool" object, since this configuration (along with the "initial_node_count") will be used to create a "NodePool" object with an auto-generated name. Do not use this and a node_pool at the same time. For responses, this field will be populated with the node configuration of the first node pool. If unspecified, the defaults are used. #[serde(rename="nodeConfig")] pub node_config: Option, /// [Output only] Server-defined URL for the resource. @@ -330,12 +369,14 @@ pub struct Cluster { /// The IP address range of the container pods in this cluster, in [CIDR](http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing) notation (e.g. `10.96.0.0/14`). Leave blank to have one automatically chosen or specify a `/14` block in `10.0.0.0/8`. #[serde(rename="clusterIpv4Cidr")] pub cluster_ipv4_cidr: Option, + /// The name of the Google Compute Engine [subnetwork](/compute/docs/subnetworks) to which the cluster is connected. + pub subnetwork: Option, /// [Output only] The name of the Google Compute Engine [zone](/compute/docs/zones#available) in which the cluster resides. pub zone: Option, /// [Output only] Additional information about the current status of this cluster, if available. #[serde(rename="statusMessage")] pub status_message: Option, - /// [Output only] The IP address range of the Kubernetes services in this cluster, in [CIDR](http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing) notation (e.g. `1.2.3.4/29`). Service addresses are typically put in the last /16 from the container CIDR. + /// [Output only] The IP address range of the Kubernetes services in this cluster, in [CIDR](http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing) notation (e.g. `1.2.3.4/29`). Service addresses are typically put in the last `/16` from the container CIDR. #[serde(rename="servicesIpv4Cidr")] pub services_ipv4_cidr: Option, } @@ -343,7 +384,7 @@ pub struct Cluster { impl ResponseResult for Cluster {} -/// Per-node parameters. +/// Parameters that describe the nodes in a cluster. /// /// This type is not used in any activity, and only used as *part* of another schema. /// @@ -355,15 +396,17 @@ pub struct NodeConfig { /// The name of a Google Compute Engine [machine type](/compute/docs/machine-types) (e.g. `n1-standard-1`). If unspecified, the default machine type is `n1-standard-1`. #[serde(rename="machineType")] pub machine_type: Option, - /// The set of Google API scopes to be made available on all of the node VMs under the "default" service account. The following scopes are recommended, but not required, and by default are not included: * `https://www.googleapis.com/auth/compute` is required for mounting persistent storage on your nodes. * `https://www.googleapis.com/auth/devstorage.read_only` is required for communicating with *gcr.io*. If unspecified, no scopes are added. + /// The set of Google API scopes to be made available on all of the node VMs under the "default" service account. The following scopes are recommended, but not required, and by default are not included: * `https://www.googleapis.com/auth/compute` is required for mounting persistent storage on your nodes. * `https://www.googleapis.com/auth/devstorage.read_only` is required for communicating with **gcr.io** (the [Google Container Registry](/container-registry/)). If unspecified, no scopes are added, unless Cloud Logging or Cloud Monitoring are enabled, in which case their required scopes will be added. #[serde(rename="oauthScopes")] pub oauth_scopes: Option>, + /// The metadata key/value pairs assigned to instances in the cluster. Keys must conform to the regexp [a-zA-Z0-9-_]+ and be less than 128 bytes in length. These are reflected as part of a URL in the metadata server. Additionally, to avoid ambiguity, keys must not conflict with any other metadata keys for the project or be one of the four reserved keys: "instance-template", "kube-env", "startup-script", and "user-data" Values are free-form strings, and only have meaning as interpreted by the image running in the instance. The only restriction placed on them is that each value's size must be less than or equal to 32 KB. The total size of all keys and values must be less than 512 KB. + pub metadata: Option>, } impl Part for NodeConfig {} -/// Defines the operation resource. All fields are output only. +/// This operation resource represents operations that may have happened or are happening on the cluster. All fields are output only. /// /// # Activities /// @@ -379,16 +422,18 @@ impl Part for NodeConfig {} pub struct Operation { /// The current status of the operation. pub status: Option, - /// The operation type. - #[serde(rename="operationType")] - pub operation_type: Option, /// The server-assigned ID for the operation. pub name: Option, /// The name of the Google Compute Engine [zone](/compute/docs/zones#available) in which the operation is taking place. pub zone: Option, + /// Detailed operation progress, if available. + pub detail: Option, /// If an error has occurred, a textual description of the error. #[serde(rename="statusMessage")] pub status_message: Option, + /// The operation type. + #[serde(rename="operationType")] + pub operation_type: Option, /// Server-defined URL for the resource. #[serde(rename="selfLink")] pub self_link: Option, @@ -400,6 +445,28 @@ pub struct Operation { impl ResponseResult for Operation {} +/// Container Engine service configuration. +/// +/// # Activities +/// +/// This type is used in activities, which are methods you may call on this type or where this type is involved in. +/// The list links the activity name, along with information about where it is used (one of *request* and *response*). +/// +/// * [zones get serverconfig projects](struct.ProjectZoneGetServerconfigCall.html) (response) +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct ServerConfig { + /// Version of Kubernetes the service deploys by default. + #[serde(rename="defaultClusterVersion")] + pub default_cluster_version: Option, + /// List of valid node upgrade target versions. + #[serde(rename="validNodeVersions")] + pub valid_node_versions: Option>, +} + +impl ResponseResult for ServerConfig {} + + /// ListOperationsResponse is the result of ListOperationsRequest. /// /// # Activities @@ -413,6 +480,9 @@ impl ResponseResult for Operation {} pub struct ListOperationsResponse { /// A list of operations in the project in the specified zone. pub operations: Option>, + /// If any zones are listed here, the list of operations returned may be missing the operations from those zones. + #[serde(rename="missingZones")] + pub missing_zones: Option>, } impl ResponseResult for ListOperationsResponse {} @@ -463,11 +533,11 @@ impl<'a, C, A> ProjectMethods<'a, C, A> { /// Create a builder to help you perform the following task: /// - /// Gets a specific cluster. + /// Gets the details of a specific cluster. /// /// # Arguments /// - /// * `projectId` - The Google Developers Console [project ID or project number](https://developers.google.com/console/help/new/#projectnumber). + /// * `projectId` - The Google Developers Console [project ID or project number](https://support.google.com/cloud/answer/6158840). /// * `zone` - The name of the Google Compute Engine [zone](/compute/docs/zones#available) in which the cluster resides. /// * `clusterId` - The name of the cluster to retrieve. pub fn zones_clusters_get(&self, project_id: &str, zone: &str, cluster_id: &str) -> ProjectZoneClusterGetCall<'a, C, A> { @@ -488,8 +558,8 @@ impl<'a, C, A> ProjectMethods<'a, C, A> { /// /// # Arguments /// - /// * `projectId` - The Google Developers Console [project ID or project number](https://developers.google.com/console/help/new/#projectnumber). - /// * `zone` - The name of the Google Compute Engine [zone](/compute/docs/zones#available) to return operations for, or "-" for all zones. + /// * `projectId` - The Google Developers Console [project ID or project number](https://support.google.com/cloud/answer/6158840). + /// * `zone` - The name of the Google Compute Engine [zone](/compute/docs/zones#available) to return operations for. pub fn zones_get_serverconfig(&self, project_id: &str, zone: &str) -> ProjectZoneGetServerconfigCall<'a, C, A> { ProjectZoneGetServerconfigCall { hub: self.hub, @@ -503,11 +573,11 @@ impl<'a, C, A> ProjectMethods<'a, C, A> { /// Create a builder to help you perform the following task: /// - /// Deletes the cluster, including the Kubernetes endpoint and all worker nodes. Firewalls and routes that were configured during cluster creation are also deleted. + /// Deletes the cluster, including the Kubernetes endpoint and all worker nodes. Firewalls and routes that were configured during cluster creation are also deleted. Other Google Compute Engine resources that might be in use by the cluster (e.g. load balancer resources) will not be deleted if they weren't present at the initial create time. /// /// # Arguments /// - /// * `projectId` - The Google Developers Console [project ID or project number](https://developers.google.com/console/help/new/#projectnumber). + /// * `projectId` - The Google Developers Console [project ID or project number](https://support.google.com/cloud/answer/6158840). /// * `zone` - The name of the Google Compute Engine [zone](/compute/docs/zones#available) in which the cluster resides. /// * `clusterId` - The name of the cluster to delete. pub fn zones_clusters_delete(&self, project_id: &str, zone: &str, cluster_id: &str) -> ProjectZoneClusterDeleteCall<'a, C, A> { @@ -528,7 +598,7 @@ impl<'a, C, A> ProjectMethods<'a, C, A> { /// /// # Arguments /// - /// * `projectId` - The Google Developers Console [project ID or project number](https://developers.google.com/console/help/new/#projectnumber). + /// * `projectId` - The Google Developers Console [project ID or project number](https://support.google.com/cloud/answer/6158840). /// * `zone` - The name of the Google Compute Engine [zone](/compute/docs/zones#available) in which the cluster resides, or "-" for all zones. pub fn zones_clusters_list(&self, project_id: &str, zone: &str) -> ProjectZoneClusterListCall<'a, C, A> { ProjectZoneClusterListCall { @@ -547,8 +617,8 @@ impl<'a, C, A> ProjectMethods<'a, C, A> { /// /// # Arguments /// - /// * `projectId` - The Google Developers Console [project ID or project number](https://developers.google.com/console/help/new/#projectnumber). - /// * `zone` - The name of the Google Compute Engine [zone](/compute/docs/zones#available) to return operations for, or "-" for all zones. + /// * `projectId` - The Google Developers Console [project ID or project number](https://support.google.com/cloud/answer/6158840). + /// * `zone` - The name of the Google Compute Engine [zone](/compute/docs/zones#available) to return operations for, or `-` for all zones. pub fn zones_operations_list(&self, project_id: &str, zone: &str) -> ProjectZoneOperationListCall<'a, C, A> { ProjectZoneOperationListCall { hub: self.hub, @@ -562,12 +632,12 @@ impl<'a, C, A> ProjectMethods<'a, C, A> { /// Create a builder to help you perform the following task: /// - /// Creates a cluster, consisting of the specified number and type of Google Compute Engine instances, plus a Kubernetes master endpoint. By default, the cluster is created in the project's [default network](/compute/docs/networking#networks_1). One firewall is added for the cluster. After cluster creation, the cluster creates routes for each node to allow the containers on that node to communicate with all other instances in the cluster. Finally, an entry is added to the project's global metadata indicating which CIDR range is being used by the cluster. + /// Creates a cluster, consisting of the specified number and type of Google Compute Engine instances. By default, the cluster is created in the project's [default network](/compute/docs/networks-and-firewalls#networks). One firewall is added for the cluster. After cluster creation, the cluster creates routes for each node to allow the containers on that node to communicate with all other instances in the cluster. Finally, an entry is added to the project's global metadata indicating which CIDR range is being used by the cluster. /// /// # Arguments /// /// * `request` - No description provided. - /// * `projectId` - The Google Developers Console [project ID or project number](https://developers.google.com/console/help/new/#projectnumber). + /// * `projectId` - The Google Developers Console [project ID or project number](https://support.google.com/cloud/answer/6158840). /// * `zone` - The name of the Google Compute Engine [zone](/compute/docs/zones#available) in which the cluster resides. pub fn zones_clusters_create(&self, request: CreateClusterRequest, project_id: &str, zone: &str) -> ProjectZoneClusterCreateCall<'a, C, A> { ProjectZoneClusterCreateCall { @@ -583,12 +653,12 @@ impl<'a, C, A> ProjectMethods<'a, C, A> { /// Create a builder to help you perform the following task: /// - /// Update settings of a specific cluster. + /// Updates the settings of a specific cluster. /// /// # Arguments /// /// * `request` - No description provided. - /// * `projectId` - The Google Developers Console [project ID or project number](https://developers.google.com/console/help/new/#projectnumber). + /// * `projectId` - The Google Developers Console [project ID or project number](https://support.google.com/cloud/answer/6158840). /// * `zone` - The name of the Google Compute Engine [zone](/compute/docs/zones#available) in which the cluster resides. /// * `clusterId` - The name of the cluster to upgrade. pub fn zones_clusters_update(&self, request: UpdateClusterRequest, project_id: &str, zone: &str, cluster_id: &str) -> ProjectZoneClusterUpdateCall<'a, C, A> { @@ -610,7 +680,7 @@ impl<'a, C, A> ProjectMethods<'a, C, A> { /// /// # Arguments /// - /// * `projectId` - The Google Developers Console [project ID or project number](https://developers.google.com/console/help/new/#projectnumber). + /// * `projectId` - The Google Developers Console [project ID or project number](https://support.google.com/cloud/answer/6158840). /// * `zone` - The name of the Google Compute Engine [zone](/compute/docs/zones#available) in which the cluster resides. /// * `operationId` - The server-assigned `name` of the operation. pub fn zones_operations_get(&self, project_id: &str, zone: &str, operation_id: &str) -> ProjectZoneOperationGetCall<'a, C, A> { @@ -634,7 +704,7 @@ impl<'a, C, A> ProjectMethods<'a, C, A> { // CallBuilders ### // ################# -/// Gets a specific cluster. +/// Gets the details of a specific cluster. /// /// A builder for the *zones.clusters.get* method supported by a *project* resource. /// It is not used directly, but through a `ProjectMethods` instance. @@ -684,7 +754,7 @@ impl<'a, C, A> ProjectZoneClusterGetCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, Cluster)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -755,8 +825,7 @@ impl<'a, C, A> ProjectZoneClusterGetCall<'a, C, A> where C: BorrowMut ProjectZoneClusterGetCall<'a, C, A> where C: BorrowMut ProjectZoneGetServerconfigCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, ServerConfig)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -1019,8 +1088,7 @@ impl<'a, C, A> ProjectZoneGetServerconfigCall<'a, C, A> where C: BorrowMut ProjectZoneGetServerconfigCall<'a, C, A> where C: BorrowMut ProjectZoneGetServerconfigCall<'a, C, A> where C: BorrowMut ProjectZoneGetServerconfigCall<'a, C, A> where C: BorrowMut ProjectZoneClusterDeleteCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, Operation)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -1275,8 +1343,7 @@ impl<'a, C, A> ProjectZoneClusterDeleteCall<'a, C, A> where C: BorrowMut ProjectZoneClusterDeleteCall<'a, C, A> where C: BorrowMut ProjectZoneClusterListCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, ListClustersResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -1539,8 +1606,7 @@ impl<'a, C, A> ProjectZoneClusterListCall<'a, C, A> where C: BorrowMut ProjectZoneClusterListCall<'a, C, A> where C: BorrowMut ProjectZoneOperationListCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, ListOperationsResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -1793,8 +1859,7 @@ impl<'a, C, A> ProjectZoneOperationListCall<'a, C, A> where C: BorrowMut ProjectZoneOperationListCall<'a, C, A> where C: BorrowMut ProjectZoneOperationListCall<'a, C, A> where C: BorrowMut ProjectZoneOperationListCall<'a, C, A> where C: BorrowMut ProjectZoneClusterCreateCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, Operation)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -2065,8 +2130,7 @@ impl<'a, C, A> ProjectZoneClusterCreateCall<'a, C, A> where C: BorrowMut ProjectZoneClusterCreateCall<'a, C, A> where C: BorrowMut ProjectZoneClusterCreateCall<'a, C, A> where C: BorrowMut ProjectZoneClusterUpdateCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, Operation)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -2352,8 +2416,7 @@ impl<'a, C, A> ProjectZoneClusterUpdateCall<'a, C, A> where C: BorrowMut ProjectZoneClusterUpdateCall<'a, C, A> where C: BorrowMut ProjectZoneOperationGetCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, Operation)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -2631,8 +2694,7 @@ impl<'a, C, A> ProjectZoneOperationGetCall<'a, C, A> where C: BorrowMut ProjectZoneOperationGetCall<'a, C, A> where C: BorrowMut"] description = "A complete library to interact with Shopping Content (protocol v2)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/content2-cli" @@ -17,18 +17,18 @@ keywords = ["content", "google", "cli"] name = "content2" [dependencies] -hyper = "0.7" -mime = "0.1.0" -serde = ">= 0.7.0" -serde_json = ">= 0.7.0" -yup-oauth2 = ">= 0.5.4" +hyper = "0.8" +mime = "0.2.0" +serde = "0.6.0" +serde_json = "0.6.0" +yup-oauth2 = ">= 0.5.6" strsim = "0.4" yup-hyper-mock = "1.0" clap = "2.0" [build-dependencies] -syntex = { version = ">= 0.23" } -serde_codegen = { version = ">= 0.6" } +syntex = { version = "= 0.28" } +serde_codegen = { version = "= 0.6.13" } [dependencies.google-content2] diff --git a/gen/content2-cli/README.md b/gen/content2-cli/README.md index 2698211f9f..33d2937871 100644 --- a/gen/content2-cli/README.md +++ b/gen/content2-cli/README.md @@ -17,14 +17,14 @@ Everything else about the *Shopping Content* API can be found at the You can download the pre-compiled 64bit binaries for the following platforms: -* ![icon](http://megaicons.net/static/img/icons_sizes/6/140/16/ubuntu-icon.png) [ubuntu](http://dl.byronimo.de/google.rs/cli/0.3.3/ubuntu/content2.tar.gz) -* ![icon](http://hydra-media.cursecdn.com/wow.gamepedia.com/a/a2/Apple-icon-16x16.png?version=25ddd67ac3dd3b634478e3978b76cb74) [osx](http://dl.byronimo.de/google.rs/cli/0.3.3/osx/content2.tar.gz) +* ![icon](http://megaicons.net/static/img/icons_sizes/6/140/16/ubuntu-icon.png) [ubuntu](http://dl.byronimo.de/google.rs/cli/0.3.4/ubuntu/content2.tar.gz) +* ![icon](http://hydra-media.cursecdn.com/wow.gamepedia.com/a/a2/Apple-icon-16x16.png?version=25ddd67ac3dd3b634478e3978b76cb74) [osx](http://dl.byronimo.de/google.rs/cli/0.3.4/osx/content2.tar.gz) Find the source code [on github](https://github.com/Byron/google-apis-rs/tree/master/gen/content2-cli). # Usage -This documentation was generated from the *Shopping Content* API at revision *20160204*. The CLI is at version *0.3.3*. +This documentation was generated from the *Shopping Content* API at revision *20160331*. The CLI is at version *0.3.4*. ```bash content2 [options] diff --git a/gen/content2-cli/mkdocs.yml b/gen/content2-cli/mkdocs.yml index 342ff0529c..c5c5ad299e 100644 --- a/gen/content2-cli/mkdocs.yml +++ b/gen/content2-cli/mkdocs.yml @@ -1,4 +1,4 @@ -site_name: Shopping Content v0.3.3+20160204 +site_name: Shopping Content v0.3.4+20160331 site_url: http://byron.github.io/google-apis-rs/google-content2-cli site_description: Write integrating applications with bcore diff --git a/gen/content2-cli/src/cmn.rs b/gen/content2-cli/src/cmn.rs index 188159ee80..ae86fdef65 100644 --- a/gen/content2-cli/src/cmn.rs +++ b/gen/content2-cli/src/cmn.rs @@ -414,7 +414,7 @@ impl TokenStorage for JsonTokenStorage { Err(err) => match err.kind() { io::ErrorKind::NotFound => Ok(()), - _ => Err(json::Error::Io(err)) + _ => Err(json::Error::IoError(err)) }, Ok(_) => Ok(()), } @@ -427,7 +427,7 @@ impl TokenStorage for JsonTokenStorage { Err(serde_err) => Err(serde_err), } }, - Err(io_err) => Err(json::Error::Io(io_err)) + Err(io_err) => Err(json::Error::IoError(io_err)) } } } @@ -444,7 +444,7 @@ impl TokenStorage for JsonTokenStorage { Err(io_err) => { match io_err.kind() { io::ErrorKind::NotFound => Ok(None), - _ => Err(json::Error::Io(io_err)) + _ => Err(json::Error::IoError(io_err)) } } } @@ -683,7 +683,7 @@ pub fn application_secret_from_directory(dir: &str, = json::from_str(json_console_secret).unwrap(); match json::to_writer_pretty(&mut f, &console_secret) { Err(serde_err) => match serde_err { - json::Error::Io(err) => err, + json::Error::IoError(err) => err, _ => panic!("Unexpected serde error: {:#?}", serde_err) }, Ok(_) => continue, @@ -696,7 +696,7 @@ pub fn application_secret_from_directory(dir: &str, }, Ok(f) => { match json::de::from_reader::<_, ConsoleApplicationSecret>(f) { - Err(json::Error::Io(err)) => + Err(json::Error::IoError(err)) => return secret_io_error(err), Err(json_err) => return Err(CLIError::Configuration( diff --git a/gen/content2-cli/src/main.rs b/gen/content2-cli/src/main.rs index 6f0d257cdd..d7b7215c07 100644 --- a/gen/content2-cli/src/main.rs +++ b/gen/content2-cli/src/main.rs @@ -1806,6 +1806,7 @@ impl<'n> Engine<'n> { "fetch-schedule.weekday" => Some(("fetchSchedule.weekday", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "fetch-schedule.time-zone" => Some(("fetchSchedule.timeZone", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "fetch-schedule.password" => Some(("fetchSchedule.password", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "fetch-schedule.minute-of-hour" => Some(("fetchSchedule.minuteOfHour", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), "fetch-schedule.day-of-month" => Some(("fetchSchedule.dayOfMonth", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), "target-country" => Some(("targetCountry", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), "file-name" => Some(("fileName", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), @@ -1813,7 +1814,7 @@ impl<'n> Engine<'n> { "id" => Some(("id", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "attribute-language" => Some(("attributeLanguage", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), _ => { - let suggestion = FieldCursor::did_you_mean(key, &vec!["attribute-language", "column-delimiter", "content-language", "content-type", "day-of-month", "fetch-schedule", "fetch-url", "file-encoding", "file-name", "format", "hour", "id", "intended-destinations", "kind", "name", "password", "quoting-mode", "target-country", "time-zone", "username", "weekday"]); + let suggestion = FieldCursor::did_you_mean(key, &vec!["attribute-language", "column-delimiter", "content-language", "content-type", "day-of-month", "fetch-schedule", "fetch-url", "file-encoding", "file-name", "format", "hour", "id", "intended-destinations", "kind", "minute-of-hour", "name", "password", "quoting-mode", "target-country", "time-zone", "username", "weekday"]); err.issues.push(CLIError::Field(FieldError::Unknown(temp_cursor.to_string(), suggestion, value.map(|v| v.to_string())))); None } @@ -1972,6 +1973,7 @@ impl<'n> Engine<'n> { "fetch-schedule.weekday" => Some(("fetchSchedule.weekday", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "fetch-schedule.time-zone" => Some(("fetchSchedule.timeZone", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "fetch-schedule.password" => Some(("fetchSchedule.password", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "fetch-schedule.minute-of-hour" => Some(("fetchSchedule.minuteOfHour", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), "fetch-schedule.day-of-month" => Some(("fetchSchedule.dayOfMonth", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), "target-country" => Some(("targetCountry", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), "file-name" => Some(("fileName", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), @@ -1979,7 +1981,7 @@ impl<'n> Engine<'n> { "id" => Some(("id", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "attribute-language" => Some(("attributeLanguage", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), _ => { - let suggestion = FieldCursor::did_you_mean(key, &vec!["attribute-language", "column-delimiter", "content-language", "content-type", "day-of-month", "fetch-schedule", "fetch-url", "file-encoding", "file-name", "format", "hour", "id", "intended-destinations", "kind", "name", "password", "quoting-mode", "target-country", "time-zone", "username", "weekday"]); + let suggestion = FieldCursor::did_you_mean(key, &vec!["attribute-language", "column-delimiter", "content-language", "content-type", "day-of-month", "fetch-schedule", "fetch-url", "file-encoding", "file-name", "format", "hour", "id", "intended-destinations", "kind", "minute-of-hour", "name", "password", "quoting-mode", "target-country", "time-zone", "username", "weekday"]); err.issues.push(CLIError::Field(FieldError::Unknown(temp_cursor.to_string(), suggestion, value.map(|v| v.to_string())))); None } @@ -2079,6 +2081,7 @@ impl<'n> Engine<'n> { "fetch-schedule.weekday" => Some(("fetchSchedule.weekday", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "fetch-schedule.time-zone" => Some(("fetchSchedule.timeZone", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "fetch-schedule.password" => Some(("fetchSchedule.password", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "fetch-schedule.minute-of-hour" => Some(("fetchSchedule.minuteOfHour", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), "fetch-schedule.day-of-month" => Some(("fetchSchedule.dayOfMonth", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), "target-country" => Some(("targetCountry", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), "file-name" => Some(("fileName", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), @@ -2086,7 +2089,7 @@ impl<'n> Engine<'n> { "id" => Some(("id", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "attribute-language" => Some(("attributeLanguage", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), _ => { - let suggestion = FieldCursor::did_you_mean(key, &vec!["attribute-language", "column-delimiter", "content-language", "content-type", "day-of-month", "fetch-schedule", "fetch-url", "file-encoding", "file-name", "format", "hour", "id", "intended-destinations", "kind", "name", "password", "quoting-mode", "target-country", "time-zone", "username", "weekday"]); + let suggestion = FieldCursor::did_you_mean(key, &vec!["attribute-language", "column-delimiter", "content-language", "content-type", "day-of-month", "fetch-schedule", "fetch-url", "file-encoding", "file-name", "format", "hour", "id", "intended-destinations", "kind", "minute-of-hour", "name", "password", "quoting-mode", "target-country", "time-zone", "username", "weekday"]); err.issues.push(CLIError::Field(FieldError::Unknown(temp_cursor.to_string(), suggestion, value.map(|v| v.to_string())))); None } @@ -6218,8 +6221,8 @@ fn main() { let mut app = App::new("content2") .author("Sebastian Thiel ") - .version("0.3.3+20160204") - .about("Manage product items, inventory, and Merchant Center accounts for Google Shopping.") + .version("0.3.4+20160331") + .about("Manages product items, inventory, and Merchant Center accounts for Google Shopping.") .after_help("All documentation details can be found at http://byron.github.io/google-apis-rs/google_content2_cli") .arg(Arg::with_name("url") .long("scope") diff --git a/gen/content2/Cargo.toml b/gen/content2/Cargo.toml index 40436687cf..9ee00804d8 100644 --- a/gen/content2/Cargo.toml +++ b/gen/content2/Cargo.toml @@ -4,7 +4,7 @@ [package] name = "google-content2" -version = "0.1.12+20160204" +version = "0.1.13+20160331" authors = ["Sebastian Thiel "] description = "A complete library to interact with Shopping Content (protocol v2)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/content2" @@ -16,14 +16,14 @@ build = "src/build.rs" [dependencies] -hyper = "0.7" -mime = "0.1.0" -serde = ">= 0.7.0" -serde_json = ">= 0.7.0" -yup-oauth2 = ">= 0.5.4" +hyper = "0.8" +mime = "0.2.0" +serde = "0.6.0" +serde_json = "0.6.0" +yup-oauth2 = ">= 0.5.6" url = ">= 0.5" [build-dependencies] -syntex = { version = ">= 0.23" } -serde_codegen = { version = ">= 0.6" } +syntex = { version = "= 0.28" } +serde_codegen = { version = "= 0.6.13" } diff --git a/gen/content2/README.md b/gen/content2/README.md index 7ad152520e..a47504dcf1 100644 --- a/gen/content2/README.md +++ b/gen/content2/README.md @@ -5,7 +5,7 @@ DO NOT EDIT ! --> The `google-content2` library allows access to all features of the *Google Shopping Content* service. -This documentation was generated from *Shopping Content* crate version *0.1.12+20160204*, where *20160204* is the exact revision of the *content:v2* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.12*. +This documentation was generated from *Shopping Content* crate version *0.1.13+20160331*, where *20160331* is the exact revision of the *content:v2* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.13*. Everything else about the *Shopping Content* *v2* API can be found at the [official documentation site](https://developers.google.com/shopping-content). diff --git a/gen/content2/src/cmn.rs b/gen/content2/src/cmn.rs index 87b91a8986..c69621da55 100644 --- a/gen/content2/src/cmn.rs +++ b/gen/content2/src/cmn.rs @@ -12,7 +12,7 @@ use mime::{Mime, TopLevel, SubLevel, Attr, Value}; use oauth2::{TokenType, Retry, self}; use hyper; use hyper::header::{ContentType, ContentLength, Headers, UserAgent, Authorization, Header, - HeaderFormat}; + HeaderFormat, Bearer}; use hyper::http::h1::LINE_ENDING; use hyper::method::Method; use hyper::status::StatusCode; @@ -634,7 +634,7 @@ pub struct ResumableUploadHelper<'a, A: 'a> { pub start_at: Option, pub auth: &'a mut A, pub user_agent: &'a str, - pub auth_header: Authorization, + pub auth_header: Authorization, pub url: &'a str, pub reader: &'a mut ReadSeek, pub media_type: Mime, diff --git a/gen/content2/src/lib.rs b/gen/content2/src/lib.rs index 24ed334d27..8344094f44 100644 --- a/gen/content2/src/lib.rs +++ b/gen/content2/src/lib.rs @@ -2,7 +2,7 @@ // This file was generated automatically from 'src/mako/api/lib.rs.mako' // DO NOT EDIT ! -//! This documentation was generated from *Shopping Content* crate version *0.1.12+20160204*, where *20160204* is the exact revision of the *content:v2* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.12*. +//! This documentation was generated from *Shopping Content* crate version *0.1.13+20160331*, where *20160331* is the exact revision of the *content:v2* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.13*. //! //! Everything else about the *Shopping Content* *v2* API can be found at the //! [official documentation site](https://developers.google.com/shopping-content). diff --git a/gen/content2/src/lib.rs.in b/gen/content2/src/lib.rs.in index a836d8e2fc..582d28b661 100644 --- a/gen/content2/src/lib.rs.in +++ b/gen/content2/src/lib.rs.in @@ -134,7 +134,7 @@ impl<'a, C, A> ShoppingContent ShoppingContent { client: RefCell::new(client), auth: RefCell::new(authenticator), - _user_agent: "google-api-rust-client/0.1.12".to_string(), + _user_agent: "google-api-rust-client/0.1.13".to_string(), } } @@ -170,7 +170,7 @@ impl<'a, C, A> ShoppingContent } /// Set the user-agent header field to use in all requests to the server. - /// It defaults to `google-api-rust-client/0.1.12`. + /// It defaults to `google-api-rust-client/0.1.13`. /// /// Returns the previously set user-agent. pub fn user_agent(&mut self, agent_name: String) -> String { @@ -1593,18 +1593,21 @@ impl Part for OrderDeliveryDetails {} pub struct DatafeedFetchSchedule { /// An optional user name for fetch_url. pub username: Option, - /// An optional password for fetch_url. - pub password: Option, - /// The day of the week the feed file should be fetched. - pub weekday: Option, /// The hour of the day the feed file should be fetched (0-23). pub hour: Option, - /// Time zone used for schedule. UTC by default. E.g., "America/Los_Angeles". - #[serde(rename="timeZone")] - pub time_zone: Option, /// The URL where the feed file can be fetched. Google Merchant Center will support automatic scheduled uploads using the HTTP, HTTPS, FTP, or SFTP protocols, so the value will need to be a valid link using one of those four protocols. #[serde(rename="fetchUrl")] pub fetch_url: Option, + /// The day of the week the feed file should be fetched. + pub weekday: Option, + /// Time zone used for schedule. UTC by default. E.g., "America/Los_Angeles". + #[serde(rename="timeZone")] + pub time_zone: Option, + /// An optional password for fetch_url. + pub password: Option, + /// The minute of the hour the feed file should be fetched (0-59). Read-only. + #[serde(rename="minuteOfHour")] + pub minute_of_hour: Option, /// The day of the month the feed file should be fetched (1-31). #[serde(rename="dayOfMonth")] pub day_of_month: Option, @@ -5408,7 +5411,7 @@ impl<'a, C, A> AccounttaxCustombatchCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, AccounttaxCustomBatchResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -5469,8 +5472,7 @@ impl<'a, C, A> AccounttaxCustombatchCall<'a, C, A> where C: BorrowMut AccounttaxPatchCall<'a, C, A> where C: BorrowMut, /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, AccountTax)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -5740,8 +5742,7 @@ impl<'a, C, A> AccounttaxPatchCall<'a, C, A> where C: BorrowMut, } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -5941,7 +5942,7 @@ impl<'a, C, A> AccounttaxListCall<'a, C, A> where C: BorrowMut, A /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, AccounttaxListResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -6016,8 +6017,7 @@ impl<'a, C, A> AccounttaxListCall<'a, C, A> where C: BorrowMut, A } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -6207,7 +6207,7 @@ impl<'a, C, A> AccounttaxUpdateCall<'a, C, A> where C: BorrowMut, /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, AccountTax)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -6291,8 +6291,7 @@ impl<'a, C, A> AccounttaxUpdateCall<'a, C, A> where C: BorrowMut, } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -6489,7 +6488,7 @@ impl<'a, C, A> AccounttaxGetCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, AccountTax)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -6559,8 +6558,7 @@ impl<'a, C, A> AccounttaxGetCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -6737,7 +6735,7 @@ impl<'a, C, A> DatafeedstatuseGetCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, DatafeedStatus)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -6807,8 +6805,7 @@ impl<'a, C, A> DatafeedstatuseGetCall<'a, C, A> where C: BorrowMut DatafeedstatuseListCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, DatafeedstatusesListResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -7061,8 +7058,7 @@ impl<'a, C, A> DatafeedstatuseListCall<'a, C, A> where C: BorrowMut DatafeedstatuseCustombatchCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, DatafeedstatusesCustomBatchResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -7304,8 +7300,7 @@ impl<'a, C, A> DatafeedstatuseCustombatchCall<'a, C, A> where C: BorrowMut DatafeedCustombatchCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, DatafeedsCustomBatchResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -7541,8 +7536,7 @@ impl<'a, C, A> DatafeedCustombatchCall<'a, C, A> where C: BorrowMut DatafeedGetCall<'a, C, A> where C: BorrowMut, A: o /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Datafeed)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -7789,8 +7783,7 @@ impl<'a, C, A> DatafeedGetCall<'a, C, A> where C: BorrowMut, A: o } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -7974,7 +7967,7 @@ impl<'a, C, A> DatafeedPatchCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Datafeed)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -8058,8 +8051,7 @@ impl<'a, C, A> DatafeedPatchCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -8256,7 +8248,7 @@ impl<'a, C, A> DatafeedDeleteCall<'a, C, A> where C: BorrowMut, A /// Perform the operation you have build so far. pub fn doit(mut self) -> Result { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -8328,8 +8320,7 @@ impl<'a, C, A> DatafeedDeleteCall<'a, C, A> where C: BorrowMut, A } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Delete, &url) @@ -8509,7 +8500,7 @@ impl<'a, C, A> DatafeedInsertCall<'a, C, A> where C: BorrowMut, A /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Datafeed)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -8592,8 +8583,7 @@ impl<'a, C, A> DatafeedInsertCall<'a, C, A> where C: BorrowMut, A } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -8782,7 +8772,7 @@ impl<'a, C, A> DatafeedListCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, DatafeedsListResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -8857,8 +8847,7 @@ impl<'a, C, A> DatafeedListCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -9048,7 +9037,7 @@ impl<'a, C, A> DatafeedUpdateCall<'a, C, A> where C: BorrowMut, A /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Datafeed)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -9132,8 +9121,7 @@ impl<'a, C, A> DatafeedUpdateCall<'a, C, A> where C: BorrowMut, A } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -9328,7 +9316,7 @@ impl<'a, C, A> ProductstatuseGetCall<'a, C, A> where C: BorrowMut /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, ProductStatus)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -9398,8 +9386,7 @@ impl<'a, C, A> ProductstatuseGetCall<'a, C, A> where C: BorrowMut } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -9581,7 +9568,7 @@ impl<'a, C, A> ProductstatuseListCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, ProductstatusesListResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -9659,8 +9646,7 @@ impl<'a, C, A> ProductstatuseListCall<'a, C, A> where C: BorrowMut ProductstatuseCustombatchCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, ProductstatusesCustomBatchResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -9911,8 +9897,7 @@ impl<'a, C, A> ProductstatuseCustombatchCall<'a, C, A> where C: BorrowMut AccountAuthinfoCall<'a, C, A> where C: BorrowMut, /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, AccountsAuthInfoResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -10127,8 +10112,7 @@ impl<'a, C, A> AccountAuthinfoCall<'a, C, A> where C: BorrowMut, } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -10294,7 +10278,7 @@ impl<'a, C, A> AccountPatchCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Account)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -10378,8 +10362,7 @@ impl<'a, C, A> AccountPatchCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -10576,7 +10559,7 @@ impl<'a, C, A> AccountGetCall<'a, C, A> where C: BorrowMut, A: oa /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Account)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -10646,8 +10629,7 @@ impl<'a, C, A> AccountGetCall<'a, C, A> where C: BorrowMut, A: oa } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -10833,7 +10815,7 @@ impl<'a, C, A> AccountUpdateCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Account)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -10917,8 +10899,7 @@ impl<'a, C, A> AccountUpdateCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -11118,7 +11099,7 @@ impl<'a, C, A> AccountListCall<'a, C, A> where C: BorrowMut, A: o /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, AccountsListResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -11193,8 +11174,7 @@ impl<'a, C, A> AccountListCall<'a, C, A> where C: BorrowMut, A: o } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -11377,7 +11357,7 @@ impl<'a, C, A> AccountDeleteCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -11449,8 +11429,7 @@ impl<'a, C, A> AccountDeleteCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Delete, &url) @@ -11631,7 +11610,7 @@ impl<'a, C, A> AccountCustombatchCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, AccountsCustomBatchResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -11692,8 +11671,7 @@ impl<'a, C, A> AccountCustombatchCall<'a, C, A> where C: BorrowMut AccountInsertCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Account)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -11961,8 +11939,7 @@ impl<'a, C, A> AccountInsertCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -12159,7 +12136,7 @@ impl<'a, C, A> InventorySetCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, InventorySetResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -12244,8 +12221,7 @@ impl<'a, C, A> InventorySetCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -12459,7 +12435,7 @@ impl<'a, C, A> InventoryCustombatchCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, InventoryCustomBatchResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -12520,8 +12496,7 @@ impl<'a, C, A> InventoryCustombatchCall<'a, C, A> where C: BorrowMut AccountstatuseGetCall<'a, C, A> where C: BorrowMut /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, AccountStatus)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -12768,8 +12743,7 @@ impl<'a, C, A> AccountstatuseGetCall<'a, C, A> where C: BorrowMut } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -12949,7 +12923,7 @@ impl<'a, C, A> AccountstatuseListCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, AccountstatusesListResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -13024,8 +12998,7 @@ impl<'a, C, A> AccountstatuseListCall<'a, C, A> where C: BorrowMut AccountstatuseCustombatchCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, AccountstatusesCustomBatchResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -13267,8 +13240,7 @@ impl<'a, C, A> AccountstatuseCustombatchCall<'a, C, A> where C: BorrowMut ProductListCall<'a, C, A> where C: BorrowMut, A: o /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, ProductsListResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -13521,8 +13493,7 @@ impl<'a, C, A> ProductListCall<'a, C, A> where C: BorrowMut, A: o } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -13710,7 +13681,7 @@ impl<'a, C, A> ProductGetCall<'a, C, A> where C: BorrowMut, A: oa /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Product)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -13780,8 +13751,7 @@ impl<'a, C, A> ProductGetCall<'a, C, A> where C: BorrowMut, A: oa } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -13960,7 +13930,7 @@ impl<'a, C, A> ProductDeleteCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -14032,8 +14002,7 @@ impl<'a, C, A> ProductDeleteCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Delete, &url) @@ -14214,7 +14183,7 @@ impl<'a, C, A> ProductCustombatchCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, ProductsCustomBatchResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -14275,8 +14244,7 @@ impl<'a, C, A> ProductCustombatchCall<'a, C, A> where C: BorrowMut ProductInsertCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Product)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -14544,8 +14512,7 @@ impl<'a, C, A> ProductInsertCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -14735,7 +14702,7 @@ impl<'a, C, A> AccountshippingListCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, AccountshippingListResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -14810,8 +14777,7 @@ impl<'a, C, A> AccountshippingListCall<'a, C, A> where C: BorrowMut AccountshippingPatchCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, AccountShipping)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -15085,8 +15051,7 @@ impl<'a, C, A> AccountshippingPatchCall<'a, C, A> where C: BorrowMut AccountshippingUpdateCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, AccountShipping)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -15376,8 +15341,7 @@ impl<'a, C, A> AccountshippingUpdateCall<'a, C, A> where C: BorrowMut AccountshippingCustombatchCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, AccountshippingCustomBatchResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -15642,8 +15606,7 @@ impl<'a, C, A> AccountshippingCustombatchCall<'a, C, A> where C: BorrowMut AccountshippingGetCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, AccountShipping)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -15890,8 +15853,7 @@ impl<'a, C, A> AccountshippingGetCall<'a, C, A> where C: BorrowMut OrderListCall<'a, C, A> where C: BorrowMut, A: oau /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, OrdersListResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -16173,8 +16135,7 @@ impl<'a, C, A> OrderListCall<'a, C, A> where C: BorrowMut, A: oau } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -16393,7 +16354,7 @@ impl<'a, C, A> OrderGettestordertemplateCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, OrdersGetTestOrderTemplateResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -16463,8 +16424,7 @@ impl<'a, C, A> OrderGettestordertemplateCall<'a, C, A> where C: BorrowMut OrderGetCall<'a, C, A> where C: BorrowMut, A: oaut /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Order)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -16711,8 +16671,7 @@ impl<'a, C, A> OrderGetCall<'a, C, A> where C: BorrowMut, A: oaut } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -16896,7 +16855,7 @@ impl<'a, C, A> OrderRefundCall<'a, C, A> where C: BorrowMut, A: o /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, OrdersRefundResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -16977,8 +16936,7 @@ impl<'a, C, A> OrderRefundCall<'a, C, A> where C: BorrowMut, A: o } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -17175,7 +17133,7 @@ impl<'a, C, A> OrderAcknowledgeCall<'a, C, A> where C: BorrowMut, /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, OrdersAcknowledgeResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -17256,8 +17214,7 @@ impl<'a, C, A> OrderAcknowledgeCall<'a, C, A> where C: BorrowMut, } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -17454,7 +17411,7 @@ impl<'a, C, A> OrderUpdatemerchantorderidCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, OrdersUpdateMerchantOrderIdResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -17535,8 +17492,7 @@ impl<'a, C, A> OrderUpdatemerchantorderidCall<'a, C, A> where C: BorrowMut OrderAdvancetestorderCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, OrdersAdvanceTestOrderResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -17796,8 +17752,7 @@ impl<'a, C, A> OrderAdvancetestorderCall<'a, C, A> where C: BorrowMut OrderCreatetestorderCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, OrdersCreateTestOrderResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -18060,8 +18015,7 @@ impl<'a, C, A> OrderCreatetestorderCall<'a, C, A> where C: BorrowMut OrderReturnlineitemCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, OrdersReturnLineItemResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -18329,8 +18283,7 @@ impl<'a, C, A> OrderReturnlineitemCall<'a, C, A> where C: BorrowMut OrderGetbymerchantorderidCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, OrdersGetByMerchantOrderIdResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -18590,8 +18543,7 @@ impl<'a, C, A> OrderGetbymerchantorderidCall<'a, C, A> where C: BorrowMut OrderCustombatchCall<'a, C, A> where C: BorrowMut, /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, OrdersCustomBatchResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -18831,8 +18783,7 @@ impl<'a, C, A> OrderCustombatchCall<'a, C, A> where C: BorrowMut, } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -19009,7 +18960,7 @@ impl<'a, C, A> OrderShiplineitemCall<'a, C, A> where C: BorrowMut /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, OrdersShipLineItemsResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -19090,8 +19041,7 @@ impl<'a, C, A> OrderShiplineitemCall<'a, C, A> where C: BorrowMut } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -19288,7 +19238,7 @@ impl<'a, C, A> OrderUpdateshipmentCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, OrdersUpdateShipmentResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -19369,8 +19319,7 @@ impl<'a, C, A> OrderUpdateshipmentCall<'a, C, A> where C: BorrowMut OrderCancellineitemCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, OrdersCancelLineItemResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -19648,8 +19597,7 @@ impl<'a, C, A> OrderCancellineitemCall<'a, C, A> where C: BorrowMut OrderCancelCall<'a, C, A> where C: BorrowMut, A: o /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, OrdersCancelResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -19927,8 +19875,7 @@ impl<'a, C, A> OrderCancelCall<'a, C, A> where C: BorrowMut, A: o } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); diff --git a/gen/content2_sandbox-cli/Cargo.toml b/gen/content2_sandbox-cli/Cargo.toml index b66355549a..5ee3b1ed52 100644 --- a/gen/content2_sandbox-cli/Cargo.toml +++ b/gen/content2_sandbox-cli/Cargo.toml @@ -4,7 +4,7 @@ [package] name = "google-content2_sandbox-cli" -version = "0.3.3+20160204" +version = "0.3.4+20160331" authors = ["Sebastian Thiel "] description = "A complete library to interact with Shopping Content (protocol v2sandbox)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/content2_sandbox-cli" @@ -17,18 +17,18 @@ keywords = ["content", "google", "cli"] name = "content2-sandbox" [dependencies] -hyper = "0.7" -mime = "0.1.0" -serde = ">= 0.7.0" -serde_json = ">= 0.7.0" -yup-oauth2 = ">= 0.5.4" +hyper = "0.8" +mime = "0.2.0" +serde = "0.6.0" +serde_json = "0.6.0" +yup-oauth2 = ">= 0.5.6" strsim = "0.4" yup-hyper-mock = "1.0" clap = "2.0" [build-dependencies] -syntex = { version = ">= 0.23" } -serde_codegen = { version = ">= 0.6" } +syntex = { version = "= 0.28" } +serde_codegen = { version = "= 0.6.13" } [dependencies.google-content2_sandbox] diff --git a/gen/content2_sandbox-cli/README.md b/gen/content2_sandbox-cli/README.md index 0d26da021c..52d403ee18 100644 --- a/gen/content2_sandbox-cli/README.md +++ b/gen/content2_sandbox-cli/README.md @@ -17,14 +17,14 @@ Everything else about the *Shopping Content* API can be found at the You can download the pre-compiled 64bit binaries for the following platforms: -* ![icon](http://megaicons.net/static/img/icons_sizes/6/140/16/ubuntu-icon.png) [ubuntu](http://dl.byronimo.de/google.rs/cli/0.3.3/ubuntu/content2-sandbox.tar.gz) -* ![icon](http://hydra-media.cursecdn.com/wow.gamepedia.com/a/a2/Apple-icon-16x16.png?version=25ddd67ac3dd3b634478e3978b76cb74) [osx](http://dl.byronimo.de/google.rs/cli/0.3.3/osx/content2-sandbox.tar.gz) +* ![icon](http://megaicons.net/static/img/icons_sizes/6/140/16/ubuntu-icon.png) [ubuntu](http://dl.byronimo.de/google.rs/cli/0.3.4/ubuntu/content2-sandbox.tar.gz) +* ![icon](http://hydra-media.cursecdn.com/wow.gamepedia.com/a/a2/Apple-icon-16x16.png?version=25ddd67ac3dd3b634478e3978b76cb74) [osx](http://dl.byronimo.de/google.rs/cli/0.3.4/osx/content2-sandbox.tar.gz) Find the source code [on github](https://github.com/Byron/google-apis-rs/tree/master/gen/content2_sandbox-cli). # Usage -This documentation was generated from the *Shopping Content* API at revision *20160204*. The CLI is at version *0.3.3*. +This documentation was generated from the *Shopping Content* API at revision *20160331*. The CLI is at version *0.3.4*. ```bash content2-sandbox [options] diff --git a/gen/content2_sandbox-cli/mkdocs.yml b/gen/content2_sandbox-cli/mkdocs.yml index cbd9628b6d..ea0b828e97 100644 --- a/gen/content2_sandbox-cli/mkdocs.yml +++ b/gen/content2_sandbox-cli/mkdocs.yml @@ -1,4 +1,4 @@ -site_name: Shopping Content v0.3.3+20160204 +site_name: Shopping Content v0.3.4+20160331 site_url: http://byron.github.io/google-apis-rs/google-content2_sandbox-cli site_description: Write integrating applications with bcore diff --git a/gen/content2_sandbox-cli/src/cmn.rs b/gen/content2_sandbox-cli/src/cmn.rs index 188159ee80..ae86fdef65 100644 --- a/gen/content2_sandbox-cli/src/cmn.rs +++ b/gen/content2_sandbox-cli/src/cmn.rs @@ -414,7 +414,7 @@ impl TokenStorage for JsonTokenStorage { Err(err) => match err.kind() { io::ErrorKind::NotFound => Ok(()), - _ => Err(json::Error::Io(err)) + _ => Err(json::Error::IoError(err)) }, Ok(_) => Ok(()), } @@ -427,7 +427,7 @@ impl TokenStorage for JsonTokenStorage { Err(serde_err) => Err(serde_err), } }, - Err(io_err) => Err(json::Error::Io(io_err)) + Err(io_err) => Err(json::Error::IoError(io_err)) } } } @@ -444,7 +444,7 @@ impl TokenStorage for JsonTokenStorage { Err(io_err) => { match io_err.kind() { io::ErrorKind::NotFound => Ok(None), - _ => Err(json::Error::Io(io_err)) + _ => Err(json::Error::IoError(io_err)) } } } @@ -683,7 +683,7 @@ pub fn application_secret_from_directory(dir: &str, = json::from_str(json_console_secret).unwrap(); match json::to_writer_pretty(&mut f, &console_secret) { Err(serde_err) => match serde_err { - json::Error::Io(err) => err, + json::Error::IoError(err) => err, _ => panic!("Unexpected serde error: {:#?}", serde_err) }, Ok(_) => continue, @@ -696,7 +696,7 @@ pub fn application_secret_from_directory(dir: &str, }, Ok(f) => { match json::de::from_reader::<_, ConsoleApplicationSecret>(f) { - Err(json::Error::Io(err)) => + Err(json::Error::IoError(err)) => return secret_io_error(err), Err(json_err) => return Err(CLIError::Configuration( diff --git a/gen/content2_sandbox-cli/src/main.rs b/gen/content2_sandbox-cli/src/main.rs index fd77deb304..b6257b38a2 100644 --- a/gen/content2_sandbox-cli/src/main.rs +++ b/gen/content2_sandbox-cli/src/main.rs @@ -1818,8 +1818,8 @@ fn main() { let mut app = App::new("content2-sandbox") .author("Sebastian Thiel ") - .version("0.3.3+20160204") - .about("Manage product items, inventory, and Merchant Center accounts for Google Shopping.") + .version("0.3.4+20160331") + .about("Manages product items, inventory, and Merchant Center accounts for Google Shopping.") .after_help("All documentation details can be found at http://byron.github.io/google-apis-rs/google_content2_sandbox_cli") .arg(Arg::with_name("url") .long("scope") diff --git a/gen/content2_sandbox/Cargo.toml b/gen/content2_sandbox/Cargo.toml index 819848f974..8e40170e3f 100644 --- a/gen/content2_sandbox/Cargo.toml +++ b/gen/content2_sandbox/Cargo.toml @@ -4,7 +4,7 @@ [package] name = "google-content2_sandbox" -version = "0.1.12+20160204" +version = "0.1.13+20160331" authors = ["Sebastian Thiel "] description = "A complete library to interact with Shopping Content (protocol v2sandbox)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/content2_sandbox" @@ -16,14 +16,14 @@ build = "src/build.rs" [dependencies] -hyper = "0.7" -mime = "0.1.0" -serde = ">= 0.7.0" -serde_json = ">= 0.7.0" -yup-oauth2 = ">= 0.5.4" +hyper = "0.8" +mime = "0.2.0" +serde = "0.6.0" +serde_json = "0.6.0" +yup-oauth2 = ">= 0.5.6" url = ">= 0.5" [build-dependencies] -syntex = { version = ">= 0.23" } -serde_codegen = { version = ">= 0.6" } +syntex = { version = "= 0.28" } +serde_codegen = { version = "= 0.6.13" } diff --git a/gen/content2_sandbox/README.md b/gen/content2_sandbox/README.md index c76e399841..061cfe8f9a 100644 --- a/gen/content2_sandbox/README.md +++ b/gen/content2_sandbox/README.md @@ -5,7 +5,7 @@ DO NOT EDIT ! --> The `google-content2_sandbox` library allows access to all features of the *Google Shopping Content* service. -This documentation was generated from *Shopping Content* crate version *0.1.12+20160204*, where *20160204* is the exact revision of the *content:v2sandbox* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.12*. +This documentation was generated from *Shopping Content* crate version *0.1.13+20160331*, where *20160331* is the exact revision of the *content:v2sandbox* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.13*. Everything else about the *Shopping Content* *v2_sandbox* API can be found at the [official documentation site](https://developers.google.com/shopping-content). diff --git a/gen/content2_sandbox/src/cmn.rs b/gen/content2_sandbox/src/cmn.rs index 87b91a8986..c69621da55 100644 --- a/gen/content2_sandbox/src/cmn.rs +++ b/gen/content2_sandbox/src/cmn.rs @@ -12,7 +12,7 @@ use mime::{Mime, TopLevel, SubLevel, Attr, Value}; use oauth2::{TokenType, Retry, self}; use hyper; use hyper::header::{ContentType, ContentLength, Headers, UserAgent, Authorization, Header, - HeaderFormat}; + HeaderFormat, Bearer}; use hyper::http::h1::LINE_ENDING; use hyper::method::Method; use hyper::status::StatusCode; @@ -634,7 +634,7 @@ pub struct ResumableUploadHelper<'a, A: 'a> { pub start_at: Option, pub auth: &'a mut A, pub user_agent: &'a str, - pub auth_header: Authorization, + pub auth_header: Authorization, pub url: &'a str, pub reader: &'a mut ReadSeek, pub media_type: Mime, diff --git a/gen/content2_sandbox/src/lib.rs b/gen/content2_sandbox/src/lib.rs index ac58529da2..5798f69ca2 100644 --- a/gen/content2_sandbox/src/lib.rs +++ b/gen/content2_sandbox/src/lib.rs @@ -2,7 +2,7 @@ // This file was generated automatically from 'src/mako/api/lib.rs.mako' // DO NOT EDIT ! -//! This documentation was generated from *Shopping Content* crate version *0.1.12+20160204*, where *20160204* is the exact revision of the *content:v2sandbox* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.12*. +//! This documentation was generated from *Shopping Content* crate version *0.1.13+20160331*, where *20160331* is the exact revision of the *content:v2sandbox* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.13*. //! //! Everything else about the *Shopping Content* *v2_sandbox* API can be found at the //! [official documentation site](https://developers.google.com/shopping-content). diff --git a/gen/content2_sandbox/src/lib.rs.in b/gen/content2_sandbox/src/lib.rs.in index f6d59a0257..af3aa2b262 100644 --- a/gen/content2_sandbox/src/lib.rs.in +++ b/gen/content2_sandbox/src/lib.rs.in @@ -134,7 +134,7 @@ impl<'a, C, A> ShoppingContent ShoppingContent { client: RefCell::new(client), auth: RefCell::new(authenticator), - _user_agent: "google-api-rust-client/0.1.12".to_string(), + _user_agent: "google-api-rust-client/0.1.13".to_string(), } } @@ -143,7 +143,7 @@ impl<'a, C, A> ShoppingContent } /// Set the user-agent header field to use in all requests to the server. - /// It defaults to `google-api-rust-client/0.1.12`. + /// It defaults to `google-api-rust-client/0.1.13`. /// /// Returns the previously set user-agent. pub fn user_agent(&mut self, agent_name: String) -> String { @@ -2008,7 +2008,7 @@ impl<'a, C, A> OrderGetCall<'a, C, A> where C: BorrowMut, A: oaut /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Order)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -2078,8 +2078,7 @@ impl<'a, C, A> OrderGetCall<'a, C, A> where C: BorrowMut, A: oaut } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -2269,7 +2268,7 @@ impl<'a, C, A> OrderListCall<'a, C, A> where C: BorrowMut, A: oau /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, OrdersListResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -2361,8 +2360,7 @@ impl<'a, C, A> OrderListCall<'a, C, A> where C: BorrowMut, A: oau } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -2588,7 +2586,7 @@ impl<'a, C, A> OrderUpdateshipmentCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, OrdersUpdateShipmentResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -2669,8 +2667,7 @@ impl<'a, C, A> OrderUpdateshipmentCall<'a, C, A> where C: BorrowMut OrderAdvancetestorderCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, OrdersAdvanceTestOrderResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -2930,8 +2927,7 @@ impl<'a, C, A> OrderAdvancetestorderCall<'a, C, A> where C: BorrowMut OrderUpdatemerchantorderidCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, OrdersUpdateMerchantOrderIdResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -3196,8 +3192,7 @@ impl<'a, C, A> OrderUpdatemerchantorderidCall<'a, C, A> where C: BorrowMut OrderReturnlineitemCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, OrdersReturnLineItemResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -3475,8 +3470,7 @@ impl<'a, C, A> OrderReturnlineitemCall<'a, C, A> where C: BorrowMut OrderGettestordertemplateCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, OrdersGetTestOrderTemplateResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -3736,8 +3730,7 @@ impl<'a, C, A> OrderGettestordertemplateCall<'a, C, A> where C: BorrowMut OrderCreatetestorderCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, OrdersCreateTestOrderResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -4000,8 +3993,7 @@ impl<'a, C, A> OrderCreatetestorderCall<'a, C, A> where C: BorrowMut OrderRefundCall<'a, C, A> where C: BorrowMut, A: o /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, OrdersRefundResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -4269,8 +4261,7 @@ impl<'a, C, A> OrderRefundCall<'a, C, A> where C: BorrowMut, A: o } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -4465,7 +4456,7 @@ impl<'a, C, A> OrderCustombatchCall<'a, C, A> where C: BorrowMut, /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, OrdersCustomBatchResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -4523,8 +4514,7 @@ impl<'a, C, A> OrderCustombatchCall<'a, C, A> where C: BorrowMut, } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -4701,7 +4691,7 @@ impl<'a, C, A> OrderCancellineitemCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, OrdersCancelLineItemResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -4782,8 +4772,7 @@ impl<'a, C, A> OrderCancellineitemCall<'a, C, A> where C: BorrowMut OrderGetbymerchantorderidCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, OrdersGetByMerchantOrderIdResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -5043,8 +5032,7 @@ impl<'a, C, A> OrderGetbymerchantorderidCall<'a, C, A> where C: BorrowMut OrderAcknowledgeCall<'a, C, A> where C: BorrowMut, /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, OrdersAcknowledgeResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -5309,8 +5297,7 @@ impl<'a, C, A> OrderAcknowledgeCall<'a, C, A> where C: BorrowMut, } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -5507,7 +5494,7 @@ impl<'a, C, A> OrderCancelCall<'a, C, A> where C: BorrowMut, A: o /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, OrdersCancelResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -5588,8 +5575,7 @@ impl<'a, C, A> OrderCancelCall<'a, C, A> where C: BorrowMut, A: o } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -5786,7 +5772,7 @@ impl<'a, C, A> OrderShiplineitemCall<'a, C, A> where C: BorrowMut /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, OrdersShipLineItemsResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -5867,8 +5853,7 @@ impl<'a, C, A> OrderShiplineitemCall<'a, C, A> where C: BorrowMut } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); diff --git a/gen/coordinate1-cli/Cargo.toml b/gen/coordinate1-cli/Cargo.toml index 173b563dfb..ab60ab2d40 100644 --- a/gen/coordinate1-cli/Cargo.toml +++ b/gen/coordinate1-cli/Cargo.toml @@ -4,7 +4,7 @@ [package] name = "google-coordinate1-cli" -version = "0.3.3+20150811" +version = "0.3.4+20150811" authors = ["Sebastian Thiel "] description = "A complete library to interact with coordinate (protocol v1)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/coordinate1-cli" @@ -17,18 +17,18 @@ keywords = ["coordinate", "google", "cli"] name = "coordinate1" [dependencies] -hyper = "0.7" -mime = "0.1.0" -serde = ">= 0.7.0" -serde_json = ">= 0.7.0" -yup-oauth2 = ">= 0.5.4" +hyper = "0.8" +mime = "0.2.0" +serde = "0.6.0" +serde_json = "0.6.0" +yup-oauth2 = ">= 0.5.6" strsim = "0.4" yup-hyper-mock = "1.0" clap = "2.0" [build-dependencies] -syntex = { version = ">= 0.23" } -serde_codegen = { version = ">= 0.6" } +syntex = { version = "= 0.28" } +serde_codegen = { version = "= 0.6.13" } [dependencies.google-coordinate1] diff --git a/gen/coordinate1-cli/README.md b/gen/coordinate1-cli/README.md index d510afb7b3..6810c9bd37 100644 --- a/gen/coordinate1-cli/README.md +++ b/gen/coordinate1-cli/README.md @@ -17,14 +17,14 @@ Everything else about the *coordinate* API can be found at the You can download the pre-compiled 64bit binaries for the following platforms: -* ![icon](http://megaicons.net/static/img/icons_sizes/6/140/16/ubuntu-icon.png) [ubuntu](http://dl.byronimo.de/google.rs/cli/0.3.3/ubuntu/coordinate1.tar.gz) -* ![icon](http://hydra-media.cursecdn.com/wow.gamepedia.com/a/a2/Apple-icon-16x16.png?version=25ddd67ac3dd3b634478e3978b76cb74) [osx](http://dl.byronimo.de/google.rs/cli/0.3.3/osx/coordinate1.tar.gz) +* ![icon](http://megaicons.net/static/img/icons_sizes/6/140/16/ubuntu-icon.png) [ubuntu](http://dl.byronimo.de/google.rs/cli/0.3.4/ubuntu/coordinate1.tar.gz) +* ![icon](http://hydra-media.cursecdn.com/wow.gamepedia.com/a/a2/Apple-icon-16x16.png?version=25ddd67ac3dd3b634478e3978b76cb74) [osx](http://dl.byronimo.de/google.rs/cli/0.3.4/osx/coordinate1.tar.gz) Find the source code [on github](https://github.com/Byron/google-apis-rs/tree/master/gen/coordinate1-cli). # Usage -This documentation was generated from the *coordinate* API at revision *20150811*. The CLI is at version *0.3.3*. +This documentation was generated from the *coordinate* API at revision *20150811*. The CLI is at version *0.3.4*. ```bash coordinate1 [options] diff --git a/gen/coordinate1-cli/mkdocs.yml b/gen/coordinate1-cli/mkdocs.yml index c0c5c6f777..8c51bb9898 100644 --- a/gen/coordinate1-cli/mkdocs.yml +++ b/gen/coordinate1-cli/mkdocs.yml @@ -1,4 +1,4 @@ -site_name: coordinate v0.3.3+20150811 +site_name: coordinate v0.3.4+20150811 site_url: http://byron.github.io/google-apis-rs/google-coordinate1-cli site_description: Write integrating applications with bcore diff --git a/gen/coordinate1-cli/src/cmn.rs b/gen/coordinate1-cli/src/cmn.rs index 188159ee80..ae86fdef65 100644 --- a/gen/coordinate1-cli/src/cmn.rs +++ b/gen/coordinate1-cli/src/cmn.rs @@ -414,7 +414,7 @@ impl TokenStorage for JsonTokenStorage { Err(err) => match err.kind() { io::ErrorKind::NotFound => Ok(()), - _ => Err(json::Error::Io(err)) + _ => Err(json::Error::IoError(err)) }, Ok(_) => Ok(()), } @@ -427,7 +427,7 @@ impl TokenStorage for JsonTokenStorage { Err(serde_err) => Err(serde_err), } }, - Err(io_err) => Err(json::Error::Io(io_err)) + Err(io_err) => Err(json::Error::IoError(io_err)) } } } @@ -444,7 +444,7 @@ impl TokenStorage for JsonTokenStorage { Err(io_err) => { match io_err.kind() { io::ErrorKind::NotFound => Ok(None), - _ => Err(json::Error::Io(io_err)) + _ => Err(json::Error::IoError(io_err)) } } } @@ -683,7 +683,7 @@ pub fn application_secret_from_directory(dir: &str, = json::from_str(json_console_secret).unwrap(); match json::to_writer_pretty(&mut f, &console_secret) { Err(serde_err) => match serde_err { - json::Error::Io(err) => err, + json::Error::IoError(err) => err, _ => panic!("Unexpected serde error: {:#?}", serde_err) }, Ok(_) => continue, @@ -696,7 +696,7 @@ pub fn application_secret_from_directory(dir: &str, }, Ok(f) => { match json::de::from_reader::<_, ConsoleApplicationSecret>(f) { - Err(json::Error::Io(err)) => + Err(json::Error::IoError(err)) => return secret_io_error(err), Err(json_err) => return Err(CLIError::Configuration( diff --git a/gen/coordinate1-cli/src/main.rs b/gen/coordinate1-cli/src/main.rs index 24425e18b1..a5530a652c 100644 --- a/gen/coordinate1-cli/src/main.rs +++ b/gen/coordinate1-cli/src/main.rs @@ -1570,7 +1570,7 @@ fn main() { let mut app = App::new("coordinate1") .author("Sebastian Thiel ") - .version("0.3.3+20150811") + .version("0.3.4+20150811") .about("Lets you view and manage jobs in a Coordinate team.") .after_help("All documentation details can be found at http://byron.github.io/google-apis-rs/google_coordinate1_cli") .arg(Arg::with_name("url") diff --git a/gen/coordinate1/Cargo.toml b/gen/coordinate1/Cargo.toml index 78452ebd69..7755fdeae0 100644 --- a/gen/coordinate1/Cargo.toml +++ b/gen/coordinate1/Cargo.toml @@ -4,7 +4,7 @@ [package] name = "google-coordinate1" -version = "0.1.12+20150811" +version = "0.1.13+20150811" authors = ["Sebastian Thiel "] description = "A complete library to interact with coordinate (protocol v1)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/coordinate1" @@ -16,14 +16,14 @@ build = "src/build.rs" [dependencies] -hyper = "0.7" -mime = "0.1.0" -serde = ">= 0.7.0" -serde_json = ">= 0.7.0" -yup-oauth2 = ">= 0.5.4" +hyper = "0.8" +mime = "0.2.0" +serde = "0.6.0" +serde_json = "0.6.0" +yup-oauth2 = ">= 0.5.6" url = ">= 0.5" [build-dependencies] -syntex = { version = ">= 0.23" } -serde_codegen = { version = ">= 0.6" } +syntex = { version = "= 0.28" } +serde_codegen = { version = "= 0.6.13" } diff --git a/gen/coordinate1/README.md b/gen/coordinate1/README.md index 71bd7881e9..8d3761f53f 100644 --- a/gen/coordinate1/README.md +++ b/gen/coordinate1/README.md @@ -5,7 +5,7 @@ DO NOT EDIT ! --> The `google-coordinate1` library allows access to all features of the *Google coordinate* service. -This documentation was generated from *coordinate* crate version *0.1.12+20150811*, where *20150811* is the exact revision of the *coordinate:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.12*. +This documentation was generated from *coordinate* crate version *0.1.13+20150811*, where *20150811* is the exact revision of the *coordinate:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.13*. Everything else about the *coordinate* *v1* API can be found at the [official documentation site](https://developers.google.com/coordinate/). diff --git a/gen/coordinate1/src/cmn.rs b/gen/coordinate1/src/cmn.rs index 87b91a8986..c69621da55 100644 --- a/gen/coordinate1/src/cmn.rs +++ b/gen/coordinate1/src/cmn.rs @@ -12,7 +12,7 @@ use mime::{Mime, TopLevel, SubLevel, Attr, Value}; use oauth2::{TokenType, Retry, self}; use hyper; use hyper::header::{ContentType, ContentLength, Headers, UserAgent, Authorization, Header, - HeaderFormat}; + HeaderFormat, Bearer}; use hyper::http::h1::LINE_ENDING; use hyper::method::Method; use hyper::status::StatusCode; @@ -634,7 +634,7 @@ pub struct ResumableUploadHelper<'a, A: 'a> { pub start_at: Option, pub auth: &'a mut A, pub user_agent: &'a str, - pub auth_header: Authorization, + pub auth_header: Authorization, pub url: &'a str, pub reader: &'a mut ReadSeek, pub media_type: Mime, diff --git a/gen/coordinate1/src/lib.rs b/gen/coordinate1/src/lib.rs index 97a60d6a5c..ebab90c812 100644 --- a/gen/coordinate1/src/lib.rs +++ b/gen/coordinate1/src/lib.rs @@ -2,7 +2,7 @@ // This file was generated automatically from 'src/mako/api/lib.rs.mako' // DO NOT EDIT ! -//! This documentation was generated from *coordinate* crate version *0.1.12+20150811*, where *20150811* is the exact revision of the *coordinate:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.12*. +//! This documentation was generated from *coordinate* crate version *0.1.13+20150811*, where *20150811* is the exact revision of the *coordinate:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.13*. //! //! Everything else about the *coordinate* *v1* API can be found at the //! [official documentation site](https://developers.google.com/coordinate/). diff --git a/gen/coordinate1/src/lib.rs.in b/gen/coordinate1/src/lib.rs.in index 95d1387475..9feb1fb8f3 100644 --- a/gen/coordinate1/src/lib.rs.in +++ b/gen/coordinate1/src/lib.rs.in @@ -147,7 +147,7 @@ impl<'a, C, A> Coordinate Coordinate { client: RefCell::new(client), auth: RefCell::new(authenticator), - _user_agent: "google-api-rust-client/0.1.12".to_string(), + _user_agent: "google-api-rust-client/0.1.13".to_string(), } } @@ -171,7 +171,7 @@ impl<'a, C, A> Coordinate } /// Set the user-agent header field to use in all requests to the server. - /// It defaults to `google-api-rust-client/0.1.12`. + /// It defaults to `google-api-rust-client/0.1.13`. /// /// Returns the previously set user-agent. pub fn user_agent(&mut self, agent_name: String) -> String { @@ -1159,7 +1159,7 @@ impl<'a, C, A> JobGetCall<'a, C, A> where C: BorrowMut, A: oauth2 /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Job)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -1229,8 +1229,7 @@ impl<'a, C, A> JobGetCall<'a, C, A> where C: BorrowMut, A: oauth2 } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -1434,7 +1433,7 @@ impl<'a, C, A> JobUpdateCall<'a, C, A> where C: BorrowMut, A: oau /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Job)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -1547,8 +1546,7 @@ impl<'a, C, A> JobUpdateCall<'a, C, A> where C: BorrowMut, A: oau } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -1836,7 +1834,7 @@ impl<'a, C, A> JobPatchCall<'a, C, A> where C: BorrowMut, A: oaut /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Job)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -1949,8 +1947,7 @@ impl<'a, C, A> JobPatchCall<'a, C, A> where C: BorrowMut, A: oaut } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -2218,7 +2215,7 @@ impl<'a, C, A> JobListCall<'a, C, A> where C: BorrowMut, A: oauth /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, JobListResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -2299,8 +2296,7 @@ impl<'a, C, A> JobListCall<'a, C, A> where C: BorrowMut, A: oauth } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -2515,7 +2511,7 @@ impl<'a, C, A> JobInsertCall<'a, C, A> where C: BorrowMut, A: oau /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Job)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -2616,8 +2612,7 @@ impl<'a, C, A> JobInsertCall<'a, C, A> where C: BorrowMut, A: oau } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -2888,7 +2883,7 @@ impl<'a, C, A> ScheduleUpdateCall<'a, C, A> where C: BorrowMut, A /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Schedule)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -2981,8 +2976,7 @@ impl<'a, C, A> ScheduleUpdateCall<'a, C, A> where C: BorrowMut, A } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -3215,7 +3209,7 @@ impl<'a, C, A> SchedulePatchCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Schedule)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -3308,8 +3302,7 @@ impl<'a, C, A> SchedulePatchCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -3527,7 +3520,7 @@ impl<'a, C, A> ScheduleGetCall<'a, C, A> where C: BorrowMut, A: o /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Schedule)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -3597,8 +3590,7 @@ impl<'a, C, A> ScheduleGetCall<'a, C, A> where C: BorrowMut, A: o } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -3774,7 +3766,7 @@ impl<'a, C, A> WorkerListCall<'a, C, A> where C: BorrowMut, A: oa /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, WorkerListResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -3843,8 +3835,7 @@ impl<'a, C, A> WorkerListCall<'a, C, A> where C: BorrowMut, A: oa } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -4016,7 +4007,7 @@ impl<'a, C, A> LocationListCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, LocationListResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -4093,8 +4084,7 @@ impl<'a, C, A> LocationListCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -4299,7 +4289,7 @@ impl<'a, C, A> TeamListCall<'a, C, A> where C: BorrowMut, A: oaut /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, TeamListResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -4355,8 +4345,7 @@ impl<'a, C, A> TeamListCall<'a, C, A> where C: BorrowMut, A: oaut } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -4533,7 +4522,7 @@ impl<'a, C, A> CustomFieldDefListCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, CustomFieldDefListResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -4602,8 +4591,7 @@ impl<'a, C, A> CustomFieldDefListCall<'a, C, A> where C: BorrowMut"] description = "A complete library to interact with customsearch (protocol v1)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/customsearch1-cli" @@ -17,18 +17,18 @@ keywords = ["customsearch", "google", "cli"] name = "customsearch1" [dependencies] -hyper = "0.7" -mime = "0.1.0" -serde = ">= 0.7.0" -serde_json = ">= 0.7.0" -yup-oauth2 = ">= 0.5.4" +hyper = "0.8" +mime = "0.2.0" +serde = "0.6.0" +serde_json = "0.6.0" +yup-oauth2 = ">= 0.5.6" strsim = "0.4" yup-hyper-mock = "1.0" clap = "2.0" [build-dependencies] -syntex = { version = ">= 0.23" } -serde_codegen = { version = ">= 0.6" } +syntex = { version = "= 0.28" } +serde_codegen = { version = "= 0.6.13" } [dependencies.google-customsearch1] diff --git a/gen/customsearch1-cli/README.md b/gen/customsearch1-cli/README.md index 23bd5134c3..32d84692f7 100644 --- a/gen/customsearch1-cli/README.md +++ b/gen/customsearch1-cli/README.md @@ -17,14 +17,14 @@ Everything else about the *customsearch* API can be found at the You can download the pre-compiled 64bit binaries for the following platforms: -* ![icon](http://megaicons.net/static/img/icons_sizes/6/140/16/ubuntu-icon.png) [ubuntu](http://dl.byronimo.de/google.rs/cli/0.3.3/ubuntu/customsearch1.tar.gz) -* ![icon](http://hydra-media.cursecdn.com/wow.gamepedia.com/a/a2/Apple-icon-16x16.png?version=25ddd67ac3dd3b634478e3978b76cb74) [osx](http://dl.byronimo.de/google.rs/cli/0.3.3/osx/customsearch1.tar.gz) +* ![icon](http://megaicons.net/static/img/icons_sizes/6/140/16/ubuntu-icon.png) [ubuntu](http://dl.byronimo.de/google.rs/cli/0.3.4/ubuntu/customsearch1.tar.gz) +* ![icon](http://hydra-media.cursecdn.com/wow.gamepedia.com/a/a2/Apple-icon-16x16.png?version=25ddd67ac3dd3b634478e3978b76cb74) [osx](http://dl.byronimo.de/google.rs/cli/0.3.4/osx/customsearch1.tar.gz) Find the source code [on github](https://github.com/Byron/google-apis-rs/tree/master/gen/customsearch1-cli). # Usage -This documentation was generated from the *customsearch* API at revision *20151130*. The CLI is at version *0.3.3*. +This documentation was generated from the *customsearch* API at revision *20151130*. The CLI is at version *0.3.4*. ```bash customsearch1 [options] diff --git a/gen/customsearch1-cli/mkdocs.yml b/gen/customsearch1-cli/mkdocs.yml index 291d48fa88..af863b5803 100644 --- a/gen/customsearch1-cli/mkdocs.yml +++ b/gen/customsearch1-cli/mkdocs.yml @@ -1,4 +1,4 @@ -site_name: customsearch v0.3.3+20151130 +site_name: customsearch v0.3.4+20151130 site_url: http://byron.github.io/google-apis-rs/google-customsearch1-cli site_description: Write integrating applications with bcore diff --git a/gen/customsearch1-cli/src/cmn.rs b/gen/customsearch1-cli/src/cmn.rs index 188159ee80..ae86fdef65 100644 --- a/gen/customsearch1-cli/src/cmn.rs +++ b/gen/customsearch1-cli/src/cmn.rs @@ -414,7 +414,7 @@ impl TokenStorage for JsonTokenStorage { Err(err) => match err.kind() { io::ErrorKind::NotFound => Ok(()), - _ => Err(json::Error::Io(err)) + _ => Err(json::Error::IoError(err)) }, Ok(_) => Ok(()), } @@ -427,7 +427,7 @@ impl TokenStorage for JsonTokenStorage { Err(serde_err) => Err(serde_err), } }, - Err(io_err) => Err(json::Error::Io(io_err)) + Err(io_err) => Err(json::Error::IoError(io_err)) } } } @@ -444,7 +444,7 @@ impl TokenStorage for JsonTokenStorage { Err(io_err) => { match io_err.kind() { io::ErrorKind::NotFound => Ok(None), - _ => Err(json::Error::Io(io_err)) + _ => Err(json::Error::IoError(io_err)) } } } @@ -683,7 +683,7 @@ pub fn application_secret_from_directory(dir: &str, = json::from_str(json_console_secret).unwrap(); match json::to_writer_pretty(&mut f, &console_secret) { Err(serde_err) => match serde_err { - json::Error::Io(err) => err, + json::Error::IoError(err) => err, _ => panic!("Unexpected serde error: {:#?}", serde_err) }, Ok(_) => continue, @@ -696,7 +696,7 @@ pub fn application_secret_from_directory(dir: &str, }, Ok(f) => { match json::de::from_reader::<_, ConsoleApplicationSecret>(f) { - Err(json::Error::Io(err)) => + Err(json::Error::IoError(err)) => return secret_io_error(err), Err(json_err) => return Err(CLIError::Configuration( diff --git a/gen/customsearch1-cli/src/main.rs b/gen/customsearch1-cli/src/main.rs index 1600583f70..be250d2c0f 100644 --- a/gen/customsearch1-cli/src/main.rs +++ b/gen/customsearch1-cli/src/main.rs @@ -315,7 +315,7 @@ fn main() { let mut app = App::new("customsearch1") .author("Sebastian Thiel ") - .version("0.3.3+20151130") + .version("0.3.4+20151130") .about("Lets you search over a website or collection of websites") .after_help("All documentation details can be found at http://byron.github.io/google-apis-rs/google_customsearch1_cli") .arg(Arg::with_name("folder") diff --git a/gen/customsearch1/Cargo.toml b/gen/customsearch1/Cargo.toml index 16645297e3..9e28949794 100644 --- a/gen/customsearch1/Cargo.toml +++ b/gen/customsearch1/Cargo.toml @@ -4,7 +4,7 @@ [package] name = "google-customsearch1" -version = "0.1.12+20151130" +version = "0.1.13+20151130" authors = ["Sebastian Thiel "] description = "A complete library to interact with customsearch (protocol v1)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/customsearch1" @@ -16,14 +16,14 @@ build = "src/build.rs" [dependencies] -hyper = "0.7" -mime = "0.1.0" -serde = ">= 0.7.0" -serde_json = ">= 0.7.0" -yup-oauth2 = ">= 0.5.4" +hyper = "0.8" +mime = "0.2.0" +serde = "0.6.0" +serde_json = "0.6.0" +yup-oauth2 = ">= 0.5.6" url = ">= 0.5" [build-dependencies] -syntex = { version = ">= 0.23" } -serde_codegen = { version = ">= 0.6" } +syntex = { version = "= 0.28" } +serde_codegen = { version = "= 0.6.13" } diff --git a/gen/customsearch1/README.md b/gen/customsearch1/README.md index 6fb97c0a44..edf20196ce 100644 --- a/gen/customsearch1/README.md +++ b/gen/customsearch1/README.md @@ -5,7 +5,7 @@ DO NOT EDIT ! --> The `google-customsearch1` library allows access to all features of the *Google customsearch* service. -This documentation was generated from *customsearch* crate version *0.1.12+20151130*, where *20151130* is the exact revision of the *customsearch:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.12*. +This documentation was generated from *customsearch* crate version *0.1.13+20151130*, where *20151130* is the exact revision of the *customsearch:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.13*. Everything else about the *customsearch* *v1* API can be found at the [official documentation site](https://developers.google.com/custom-search/v1/using_rest). diff --git a/gen/customsearch1/src/cmn.rs b/gen/customsearch1/src/cmn.rs index 87b91a8986..c69621da55 100644 --- a/gen/customsearch1/src/cmn.rs +++ b/gen/customsearch1/src/cmn.rs @@ -12,7 +12,7 @@ use mime::{Mime, TopLevel, SubLevel, Attr, Value}; use oauth2::{TokenType, Retry, self}; use hyper; use hyper::header::{ContentType, ContentLength, Headers, UserAgent, Authorization, Header, - HeaderFormat}; + HeaderFormat, Bearer}; use hyper::http::h1::LINE_ENDING; use hyper::method::Method; use hyper::status::StatusCode; @@ -634,7 +634,7 @@ pub struct ResumableUploadHelper<'a, A: 'a> { pub start_at: Option, pub auth: &'a mut A, pub user_agent: &'a str, - pub auth_header: Authorization, + pub auth_header: Authorization, pub url: &'a str, pub reader: &'a mut ReadSeek, pub media_type: Mime, diff --git a/gen/customsearch1/src/lib.rs b/gen/customsearch1/src/lib.rs index 62077aaca9..2eac80361b 100644 --- a/gen/customsearch1/src/lib.rs +++ b/gen/customsearch1/src/lib.rs @@ -2,7 +2,7 @@ // This file was generated automatically from 'src/mako/api/lib.rs.mako' // DO NOT EDIT ! -//! This documentation was generated from *customsearch* crate version *0.1.12+20151130*, where *20151130* is the exact revision of the *customsearch:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.12*. +//! This documentation was generated from *customsearch* crate version *0.1.13+20151130*, where *20151130* is the exact revision of the *customsearch:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.13*. //! //! Everything else about the *customsearch* *v1* API can be found at the //! [official documentation site](https://developers.google.com/custom-search/v1/using_rest). diff --git a/gen/customsearch1/src/lib.rs.in b/gen/customsearch1/src/lib.rs.in index be6d00d96e..e012c8bc62 100644 --- a/gen/customsearch1/src/lib.rs.in +++ b/gen/customsearch1/src/lib.rs.in @@ -136,7 +136,7 @@ impl<'a, C, A> Customsearch Customsearch { client: RefCell::new(client), auth: RefCell::new(authenticator), - _user_agent: "google-api-rust-client/0.1.12".to_string(), + _user_agent: "google-api-rust-client/0.1.13".to_string(), } } @@ -145,7 +145,7 @@ impl<'a, C, A> Customsearch } /// Set the user-agent header field to use in all requests to the server. - /// It defaults to `google-api-rust-client/0.1.12`. + /// It defaults to `google-api-rust-client/0.1.13`. /// /// Returns the previously set user-agent. pub fn user_agent(&mut self, agent_name: String) -> String { @@ -764,7 +764,7 @@ impl<'a, C, A> CseListCall<'a, C, A> where C: BorrowMut, A: oauth /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Search)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, diff --git a/gen/dataproc1-cli/Cargo.toml b/gen/dataproc1-cli/Cargo.toml index 59dd86b034..826e2392f1 100644 --- a/gen/dataproc1-cli/Cargo.toml +++ b/gen/dataproc1-cli/Cargo.toml @@ -4,7 +4,7 @@ [package] name = "google-dataproc1-cli" -version = "0.3.3+20160219" +version = "0.3.4+20160219" authors = ["Sebastian Thiel "] description = "A complete library to interact with dataproc (protocol v1)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/dataproc1-cli" @@ -17,18 +17,18 @@ keywords = ["dataproc", "google", "cli"] name = "dataproc1" [dependencies] -hyper = "0.7" -mime = "0.1.0" -serde = ">= 0.7.0" -serde_json = ">= 0.7.0" -yup-oauth2 = ">= 0.5.4" +hyper = "0.8" +mime = "0.2.0" +serde = "0.6.0" +serde_json = "0.6.0" +yup-oauth2 = ">= 0.5.6" strsim = "0.4" yup-hyper-mock = "1.0" clap = "2.0" [build-dependencies] -syntex = { version = ">= 0.23" } -serde_codegen = { version = ">= 0.6" } +syntex = { version = "= 0.28" } +serde_codegen = { version = "= 0.6.13" } [dependencies.google-dataproc1] diff --git a/gen/dataproc1-cli/README.md b/gen/dataproc1-cli/README.md index 5c576206fc..cfa63876e5 100644 --- a/gen/dataproc1-cli/README.md +++ b/gen/dataproc1-cli/README.md @@ -17,14 +17,14 @@ Everything else about the *dataproc* API can be found at the You can download the pre-compiled 64bit binaries for the following platforms: -* ![icon](http://megaicons.net/static/img/icons_sizes/6/140/16/ubuntu-icon.png) [ubuntu](http://dl.byronimo.de/google.rs/cli/0.3.3/ubuntu/dataproc1.tar.gz) -* ![icon](http://hydra-media.cursecdn.com/wow.gamepedia.com/a/a2/Apple-icon-16x16.png?version=25ddd67ac3dd3b634478e3978b76cb74) [osx](http://dl.byronimo.de/google.rs/cli/0.3.3/osx/dataproc1.tar.gz) +* ![icon](http://megaicons.net/static/img/icons_sizes/6/140/16/ubuntu-icon.png) [ubuntu](http://dl.byronimo.de/google.rs/cli/0.3.4/ubuntu/dataproc1.tar.gz) +* ![icon](http://hydra-media.cursecdn.com/wow.gamepedia.com/a/a2/Apple-icon-16x16.png?version=25ddd67ac3dd3b634478e3978b76cb74) [osx](http://dl.byronimo.de/google.rs/cli/0.3.4/osx/dataproc1.tar.gz) Find the source code [on github](https://github.com/Byron/google-apis-rs/tree/master/gen/dataproc1-cli). # Usage -This documentation was generated from the *dataproc* API at revision *20160219*. The CLI is at version *0.3.3*. +This documentation was generated from the *dataproc* API at revision *20160219*. The CLI is at version *0.3.4*. ```bash dataproc1 [options] diff --git a/gen/dataproc1-cli/mkdocs.yml b/gen/dataproc1-cli/mkdocs.yml index dee5179a9a..82716f9f7f 100644 --- a/gen/dataproc1-cli/mkdocs.yml +++ b/gen/dataproc1-cli/mkdocs.yml @@ -1,4 +1,4 @@ -site_name: dataproc v0.3.3+20160219 +site_name: dataproc v0.3.4+20160219 site_url: http://byron.github.io/google-apis-rs/google-dataproc1-cli site_description: Write integrating applications with bcore diff --git a/gen/dataproc1-cli/src/cmn.rs b/gen/dataproc1-cli/src/cmn.rs index 188159ee80..ae86fdef65 100644 --- a/gen/dataproc1-cli/src/cmn.rs +++ b/gen/dataproc1-cli/src/cmn.rs @@ -414,7 +414,7 @@ impl TokenStorage for JsonTokenStorage { Err(err) => match err.kind() { io::ErrorKind::NotFound => Ok(()), - _ => Err(json::Error::Io(err)) + _ => Err(json::Error::IoError(err)) }, Ok(_) => Ok(()), } @@ -427,7 +427,7 @@ impl TokenStorage for JsonTokenStorage { Err(serde_err) => Err(serde_err), } }, - Err(io_err) => Err(json::Error::Io(io_err)) + Err(io_err) => Err(json::Error::IoError(io_err)) } } } @@ -444,7 +444,7 @@ impl TokenStorage for JsonTokenStorage { Err(io_err) => { match io_err.kind() { io::ErrorKind::NotFound => Ok(None), - _ => Err(json::Error::Io(io_err)) + _ => Err(json::Error::IoError(io_err)) } } } @@ -683,7 +683,7 @@ pub fn application_secret_from_directory(dir: &str, = json::from_str(json_console_secret).unwrap(); match json::to_writer_pretty(&mut f, &console_secret) { Err(serde_err) => match serde_err { - json::Error::Io(err) => err, + json::Error::IoError(err) => err, _ => panic!("Unexpected serde error: {:#?}", serde_err) }, Ok(_) => continue, @@ -696,7 +696,7 @@ pub fn application_secret_from_directory(dir: &str, }, Ok(f) => { match json::de::from_reader::<_, ConsoleApplicationSecret>(f) { - Err(json::Error::Io(err)) => + Err(json::Error::IoError(err)) => return secret_io_error(err), Err(json_err) => return Err(CLIError::Configuration( diff --git a/gen/dataproc1-cli/src/main.rs b/gen/dataproc1-cli/src/main.rs index 49ca42c3de..1ef3db315f 100644 --- a/gen/dataproc1-cli/src/main.rs +++ b/gen/dataproc1-cli/src/main.rs @@ -1998,7 +1998,7 @@ fn main() { let mut app = App::new("dataproc1") .author("Sebastian Thiel ") - .version("0.3.3+20160219") + .version("0.3.4+20160219") .about("An API for managing Hadoop-based clusters and jobs on Google Cloud Platform.") .after_help("All documentation details can be found at http://byron.github.io/google-apis-rs/google_dataproc1_cli") .arg(Arg::with_name("url") diff --git a/gen/dataproc1/Cargo.toml b/gen/dataproc1/Cargo.toml index 79479e5c46..d3e69b9857 100644 --- a/gen/dataproc1/Cargo.toml +++ b/gen/dataproc1/Cargo.toml @@ -4,7 +4,7 @@ [package] name = "google-dataproc1" -version = "0.1.12+20160219" +version = "0.1.13+20160219" authors = ["Sebastian Thiel "] description = "A complete library to interact with dataproc (protocol v1)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/dataproc1" @@ -16,14 +16,14 @@ build = "src/build.rs" [dependencies] -hyper = "0.7" -mime = "0.1.0" -serde = ">= 0.7.0" -serde_json = ">= 0.7.0" -yup-oauth2 = ">= 0.5.4" +hyper = "0.8" +mime = "0.2.0" +serde = "0.6.0" +serde_json = "0.6.0" +yup-oauth2 = ">= 0.5.6" url = ">= 0.5" [build-dependencies] -syntex = { version = ">= 0.23" } -serde_codegen = { version = ">= 0.6" } +syntex = { version = "= 0.28" } +serde_codegen = { version = "= 0.6.13" } diff --git a/gen/dataproc1/README.md b/gen/dataproc1/README.md index 5fc4a4d83f..54e689b647 100644 --- a/gen/dataproc1/README.md +++ b/gen/dataproc1/README.md @@ -5,7 +5,7 @@ DO NOT EDIT ! --> The `google-dataproc1` library allows access to all features of the *Google dataproc* service. -This documentation was generated from *dataproc* crate version *0.1.12+20160219*, where *20160219* is the exact revision of the *dataproc:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.12*. +This documentation was generated from *dataproc* crate version *0.1.13+20160219*, where *20160219* is the exact revision of the *dataproc:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.13*. Everything else about the *dataproc* *v1* API can be found at the [official documentation site](https://cloud.google.com/dataproc/). diff --git a/gen/dataproc1/src/cmn.rs b/gen/dataproc1/src/cmn.rs index 87b91a8986..c69621da55 100644 --- a/gen/dataproc1/src/cmn.rs +++ b/gen/dataproc1/src/cmn.rs @@ -12,7 +12,7 @@ use mime::{Mime, TopLevel, SubLevel, Attr, Value}; use oauth2::{TokenType, Retry, self}; use hyper; use hyper::header::{ContentType, ContentLength, Headers, UserAgent, Authorization, Header, - HeaderFormat}; + HeaderFormat, Bearer}; use hyper::http::h1::LINE_ENDING; use hyper::method::Method; use hyper::status::StatusCode; @@ -634,7 +634,7 @@ pub struct ResumableUploadHelper<'a, A: 'a> { pub start_at: Option, pub auth: &'a mut A, pub user_agent: &'a str, - pub auth_header: Authorization, + pub auth_header: Authorization, pub url: &'a str, pub reader: &'a mut ReadSeek, pub media_type: Mime, diff --git a/gen/dataproc1/src/lib.rs b/gen/dataproc1/src/lib.rs index 90ee92cdb6..59d0c1c903 100644 --- a/gen/dataproc1/src/lib.rs +++ b/gen/dataproc1/src/lib.rs @@ -2,7 +2,7 @@ // This file was generated automatically from 'src/mako/api/lib.rs.mako' // DO NOT EDIT ! -//! This documentation was generated from *dataproc* crate version *0.1.12+20160219*, where *20160219* is the exact revision of the *dataproc:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.12*. +//! This documentation was generated from *dataproc* crate version *0.1.13+20160219*, where *20160219* is the exact revision of the *dataproc:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.13*. //! //! Everything else about the *dataproc* *v1* API can be found at the //! [official documentation site](https://cloud.google.com/dataproc/). diff --git a/gen/dataproc1/src/lib.rs.in b/gen/dataproc1/src/lib.rs.in index e6f9469d4c..ebad3dc4c7 100644 --- a/gen/dataproc1/src/lib.rs.in +++ b/gen/dataproc1/src/lib.rs.in @@ -146,7 +146,7 @@ impl<'a, C, A> Dataproc Dataproc { client: RefCell::new(client), auth: RefCell::new(authenticator), - _user_agent: "google-api-rust-client/0.1.12".to_string(), + _user_agent: "google-api-rust-client/0.1.13".to_string(), } } @@ -158,7 +158,7 @@ impl<'a, C, A> Dataproc } /// Set the user-agent header field to use in all requests to the server. - /// It defaults to `google-api-rust-client/0.1.12`. + /// It defaults to `google-api-rust-client/0.1.13`. /// /// Returns the previously set user-agent. pub fn user_agent(&mut self, agent_name: String) -> String { @@ -1389,7 +1389,7 @@ impl<'a, C, A> MediaDownloadCall<'a, C, A> where C: BorrowMut, A: pub fn doit(mut self) -> Result<(hyper::client::Response, Media)> { use url::percent_encoding::{percent_encode, FORM_URLENCODED_ENCODE_SET}; use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -1477,8 +1477,7 @@ impl<'a, C, A> MediaDownloadCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -1660,7 +1659,7 @@ impl<'a, C, A> MediaUploadCall<'a, C, A> where C: BorrowMut, A: o where RS: ReadSeek { use url::percent_encoding::{percent_encode, FORM_URLENCODED_ENCODE_SET}; use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -1754,8 +1753,7 @@ impl<'a, C, A> MediaUploadCall<'a, C, A> where C: BorrowMut, A: o } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { if should_ask_dlg_for_url && (upload_url = dlg.upload_url()) == () && upload_url.is_some() { @@ -2045,7 +2043,7 @@ impl<'a, C, A> ProjectRegionJobSubmitCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, Job)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -2126,8 +2124,7 @@ impl<'a, C, A> ProjectRegionJobSubmitCall<'a, C, A> where C: BorrowMut ProjectRegionClusterGetCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, Cluster)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -2395,8 +2392,7 @@ impl<'a, C, A> ProjectRegionClusterGetCall<'a, C, A> where C: BorrowMut ProjectRegionClusterListCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, ListClustersResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -2669,8 +2665,7 @@ impl<'a, C, A> ProjectRegionClusterListCall<'a, C, A> where C: BorrowMut ProjectRegionClusterDiagnoseCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, Operation)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -2957,8 +2952,7 @@ impl<'a, C, A> ProjectRegionClusterDiagnoseCall<'a, C, A> where C: BorrowMut ProjectRegionClusterPatchCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, Operation)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -3259,8 +3253,7 @@ impl<'a, C, A> ProjectRegionClusterPatchCall<'a, C, A> where C: BorrowMut ProjectRegionJobGetCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, Job)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -3545,8 +3538,7 @@ impl<'a, C, A> ProjectRegionJobGetCall<'a, C, A> where C: BorrowMut ProjectRegionOperationCancelCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, Empty)> { use url::percent_encoding::{percent_encode, FORM_URLENCODED_ENCODE_SET}; use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -3811,8 +3803,7 @@ impl<'a, C, A> ProjectRegionOperationCancelCall<'a, C, A> where C: BorrowMut ProjectRegionOperationDeleteCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, Empty)> { use url::percent_encoding::{percent_encode, FORM_URLENCODED_ENCODE_SET}; use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -4057,8 +4048,7 @@ impl<'a, C, A> ProjectRegionOperationDeleteCall<'a, C, A> where C: BorrowMut ProjectRegionClusterDeleteCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, Operation)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -4303,8 +4293,7 @@ impl<'a, C, A> ProjectRegionClusterDeleteCall<'a, C, A> where C: BorrowMut ProjectRegionOperationGetCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, Operation)> { use url::percent_encoding::{percent_encode, FORM_URLENCODED_ENCODE_SET}; use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -4569,8 +4558,7 @@ impl<'a, C, A> ProjectRegionOperationGetCall<'a, C, A> where C: BorrowMut ProjectRegionJobListCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, ListJobsResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -4833,8 +4821,7 @@ impl<'a, C, A> ProjectRegionJobListCall<'a, C, A> where C: BorrowMut ProjectRegionClusterCreateCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, Operation)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -5133,8 +5120,7 @@ impl<'a, C, A> ProjectRegionClusterCreateCall<'a, C, A> where C: BorrowMut ProjectRegionJobDeleteCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, Empty)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -5402,8 +5388,7 @@ impl<'a, C, A> ProjectRegionJobDeleteCall<'a, C, A> where C: BorrowMut ProjectRegionOperationListCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, ListOperationsResponse)> { use url::percent_encoding::{percent_encode, FORM_URLENCODED_ENCODE_SET}; use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -5683,8 +5668,7 @@ impl<'a, C, A> ProjectRegionOperationListCall<'a, C, A> where C: BorrowMut ProjectRegionJobCancelCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, Job)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -5968,8 +5952,7 @@ impl<'a, C, A> ProjectRegionJobCancelCall<'a, C, A> where C: BorrowMut"] description = "A complete library to interact with datastore (protocol v1beta2)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/datastore1_beta2-cli" @@ -17,18 +17,18 @@ keywords = ["datastore", "google", "cli"] name = "datastore1-beta2" [dependencies] -hyper = "0.7" -mime = "0.1.0" -serde = ">= 0.7.0" -serde_json = ">= 0.7.0" -yup-oauth2 = ">= 0.5.4" +hyper = "0.8" +mime = "0.2.0" +serde = "0.6.0" +serde_json = "0.6.0" +yup-oauth2 = ">= 0.5.6" strsim = "0.4" yup-hyper-mock = "1.0" clap = "2.0" [build-dependencies] -syntex = { version = ">= 0.23" } -serde_codegen = { version = ">= 0.6" } +syntex = { version = "= 0.28" } +serde_codegen = { version = "= 0.6.13" } [dependencies.google-datastore1_beta2] diff --git a/gen/datastore1_beta2-cli/README.md b/gen/datastore1_beta2-cli/README.md index 810a280e19..8603a18d7d 100644 --- a/gen/datastore1_beta2-cli/README.md +++ b/gen/datastore1_beta2-cli/README.md @@ -17,14 +17,14 @@ Everything else about the *datastore* API can be found at the You can download the pre-compiled 64bit binaries for the following platforms: -* ![icon](http://megaicons.net/static/img/icons_sizes/6/140/16/ubuntu-icon.png) [ubuntu](http://dl.byronimo.de/google.rs/cli/0.3.3/ubuntu/datastore1-beta2.tar.gz) -* ![icon](http://hydra-media.cursecdn.com/wow.gamepedia.com/a/a2/Apple-icon-16x16.png?version=25ddd67ac3dd3b634478e3978b76cb74) [osx](http://dl.byronimo.de/google.rs/cli/0.3.3/osx/datastore1-beta2.tar.gz) +* ![icon](http://megaicons.net/static/img/icons_sizes/6/140/16/ubuntu-icon.png) [ubuntu](http://dl.byronimo.de/google.rs/cli/0.3.4/ubuntu/datastore1-beta2.tar.gz) +* ![icon](http://hydra-media.cursecdn.com/wow.gamepedia.com/a/a2/Apple-icon-16x16.png?version=25ddd67ac3dd3b634478e3978b76cb74) [osx](http://dl.byronimo.de/google.rs/cli/0.3.4/osx/datastore1-beta2.tar.gz) Find the source code [on github](https://github.com/Byron/google-apis-rs/tree/master/gen/datastore1_beta2-cli). # Usage -This documentation was generated from the *datastore* API at revision *20151008*. The CLI is at version *0.3.3*. +This documentation was generated from the *datastore* API at revision *20160314*. The CLI is at version *0.3.4*. ```bash datastore1-beta2 [options] diff --git a/gen/datastore1_beta2-cli/mkdocs.yml b/gen/datastore1_beta2-cli/mkdocs.yml index ea42d1ff0b..6165eb5ea3 100644 --- a/gen/datastore1_beta2-cli/mkdocs.yml +++ b/gen/datastore1_beta2-cli/mkdocs.yml @@ -1,4 +1,4 @@ -site_name: datastore v0.3.3+20151008 +site_name: datastore v0.3.4+20160314 site_url: http://byron.github.io/google-apis-rs/google-datastore1_beta2-cli site_description: Write integrating applications with bcore diff --git a/gen/datastore1_beta2-cli/src/cmn.rs b/gen/datastore1_beta2-cli/src/cmn.rs index 188159ee80..ae86fdef65 100644 --- a/gen/datastore1_beta2-cli/src/cmn.rs +++ b/gen/datastore1_beta2-cli/src/cmn.rs @@ -414,7 +414,7 @@ impl TokenStorage for JsonTokenStorage { Err(err) => match err.kind() { io::ErrorKind::NotFound => Ok(()), - _ => Err(json::Error::Io(err)) + _ => Err(json::Error::IoError(err)) }, Ok(_) => Ok(()), } @@ -427,7 +427,7 @@ impl TokenStorage for JsonTokenStorage { Err(serde_err) => Err(serde_err), } }, - Err(io_err) => Err(json::Error::Io(io_err)) + Err(io_err) => Err(json::Error::IoError(io_err)) } } } @@ -444,7 +444,7 @@ impl TokenStorage for JsonTokenStorage { Err(io_err) => { match io_err.kind() { io::ErrorKind::NotFound => Ok(None), - _ => Err(json::Error::Io(io_err)) + _ => Err(json::Error::IoError(io_err)) } } } @@ -683,7 +683,7 @@ pub fn application_secret_from_directory(dir: &str, = json::from_str(json_console_secret).unwrap(); match json::to_writer_pretty(&mut f, &console_secret) { Err(serde_err) => match serde_err { - json::Error::Io(err) => err, + json::Error::IoError(err) => err, _ => panic!("Unexpected serde error: {:#?}", serde_err) }, Ok(_) => continue, @@ -696,7 +696,7 @@ pub fn application_secret_from_directory(dir: &str, }, Ok(f) => { match json::de::from_reader::<_, ConsoleApplicationSecret>(f) { - Err(json::Error::Io(err)) => + Err(json::Error::IoError(err)) => return secret_io_error(err), Err(json_err) => return Err(CLIError::Configuration( diff --git a/gen/datastore1_beta2-cli/src/main.rs b/gen/datastore1_beta2-cli/src/main.rs index ff2bc17e14..aa9ed3c9f2 100644 --- a/gen/datastore1_beta2-cli/src/main.rs +++ b/gen/datastore1_beta2-cli/src/main.rs @@ -871,8 +871,8 @@ fn main() { let mut app = App::new("datastore1-beta2") .author("Sebastian Thiel ") - .version("0.3.3+20151008") - .about("API for accessing Google Cloud Datastore.") + .version("0.3.4+20160314") + .about("Stores and queries data in Google Cloud Datastore.") .after_help("All documentation details can be found at http://byron.github.io/google-apis-rs/google_datastore1_beta2_cli") .arg(Arg::with_name("url") .long("scope") diff --git a/gen/datastore1_beta2/Cargo.toml b/gen/datastore1_beta2/Cargo.toml index 2db6923763..e1f5746fd7 100644 --- a/gen/datastore1_beta2/Cargo.toml +++ b/gen/datastore1_beta2/Cargo.toml @@ -4,7 +4,7 @@ [package] name = "google-datastore1_beta2" -version = "0.1.12+20151008" +version = "0.1.13+20160314" authors = ["Sebastian Thiel "] description = "A complete library to interact with datastore (protocol v1beta2)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/datastore1_beta2" @@ -16,14 +16,14 @@ build = "src/build.rs" [dependencies] -hyper = "0.7" -mime = "0.1.0" -serde = ">= 0.7.0" -serde_json = ">= 0.7.0" -yup-oauth2 = ">= 0.5.4" +hyper = "0.8" +mime = "0.2.0" +serde = "0.6.0" +serde_json = "0.6.0" +yup-oauth2 = ">= 0.5.6" url = ">= 0.5" [build-dependencies] -syntex = { version = ">= 0.23" } -serde_codegen = { version = ">= 0.6" } +syntex = { version = "= 0.28" } +serde_codegen = { version = "= 0.6.13" } diff --git a/gen/datastore1_beta2/README.md b/gen/datastore1_beta2/README.md index a7d5038610..1383f61097 100644 --- a/gen/datastore1_beta2/README.md +++ b/gen/datastore1_beta2/README.md @@ -5,7 +5,7 @@ DO NOT EDIT ! --> The `google-datastore1_beta2` library allows access to all features of the *Google datastore* service. -This documentation was generated from *datastore* crate version *0.1.12+20151008*, where *20151008* is the exact revision of the *datastore:v1beta2* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.12*. +This documentation was generated from *datastore* crate version *0.1.13+20160314*, where *20160314* is the exact revision of the *datastore:v1beta2* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.13*. Everything else about the *datastore* *v1_beta2* API can be found at the [official documentation site](https://developers.google.com/datastore/). diff --git a/gen/datastore1_beta2/src/cmn.rs b/gen/datastore1_beta2/src/cmn.rs index 87b91a8986..c69621da55 100644 --- a/gen/datastore1_beta2/src/cmn.rs +++ b/gen/datastore1_beta2/src/cmn.rs @@ -12,7 +12,7 @@ use mime::{Mime, TopLevel, SubLevel, Attr, Value}; use oauth2::{TokenType, Retry, self}; use hyper; use hyper::header::{ContentType, ContentLength, Headers, UserAgent, Authorization, Header, - HeaderFormat}; + HeaderFormat, Bearer}; use hyper::http::h1::LINE_ENDING; use hyper::method::Method; use hyper::status::StatusCode; @@ -634,7 +634,7 @@ pub struct ResumableUploadHelper<'a, A: 'a> { pub start_at: Option, pub auth: &'a mut A, pub user_agent: &'a str, - pub auth_header: Authorization, + pub auth_header: Authorization, pub url: &'a str, pub reader: &'a mut ReadSeek, pub media_type: Mime, diff --git a/gen/datastore1_beta2/src/lib.rs b/gen/datastore1_beta2/src/lib.rs index fe020c785f..7d569eedfd 100644 --- a/gen/datastore1_beta2/src/lib.rs +++ b/gen/datastore1_beta2/src/lib.rs @@ -2,7 +2,7 @@ // This file was generated automatically from 'src/mako/api/lib.rs.mako' // DO NOT EDIT ! -//! This documentation was generated from *datastore* crate version *0.1.12+20151008*, where *20151008* is the exact revision of the *datastore:v1beta2* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.12*. +//! This documentation was generated from *datastore* crate version *0.1.13+20160314*, where *20160314* is the exact revision of the *datastore:v1beta2* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.13*. //! //! Everything else about the *datastore* *v1_beta2* API can be found at the //! [official documentation site](https://developers.google.com/datastore/). diff --git a/gen/datastore1_beta2/src/lib.rs.in b/gen/datastore1_beta2/src/lib.rs.in index 89756ef33b..d32fdc5302 100644 --- a/gen/datastore1_beta2/src/lib.rs.in +++ b/gen/datastore1_beta2/src/lib.rs.in @@ -141,7 +141,7 @@ impl<'a, C, A> Datastore Datastore { client: RefCell::new(client), auth: RefCell::new(authenticator), - _user_agent: "google-api-rust-client/0.1.12".to_string(), + _user_agent: "google-api-rust-client/0.1.13".to_string(), } } @@ -150,7 +150,7 @@ impl<'a, C, A> Datastore } /// Set the user-agent header field to use in all requests to the server. - /// It defaults to `google-api-rust-client/0.1.12`. + /// It defaults to `google-api-rust-client/0.1.13`. /// /// Returns the previously set user-agent. pub fn user_agent(&mut self, agent_name: String) -> String { @@ -1087,7 +1087,7 @@ impl<'a, C, A> DatasetCommitCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, CommitResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -1167,8 +1167,7 @@ impl<'a, C, A> DatasetCommitCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -1354,7 +1353,7 @@ impl<'a, C, A> DatasetAllocateIdCall<'a, C, A> where C: BorrowMut /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, AllocateIdsResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -1434,8 +1433,7 @@ impl<'a, C, A> DatasetAllocateIdCall<'a, C, A> where C: BorrowMut } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -1621,7 +1619,7 @@ impl<'a, C, A> DatasetRollbackCall<'a, C, A> where C: BorrowMut, /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, RollbackResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -1701,8 +1699,7 @@ impl<'a, C, A> DatasetRollbackCall<'a, C, A> where C: BorrowMut, } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -1888,7 +1885,7 @@ impl<'a, C, A> DatasetLookupCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, LookupResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -1968,8 +1965,7 @@ impl<'a, C, A> DatasetLookupCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -2155,7 +2151,7 @@ impl<'a, C, A> DatasetRunQueryCall<'a, C, A> where C: BorrowMut, /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, RunQueryResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -2235,8 +2231,7 @@ impl<'a, C, A> DatasetRunQueryCall<'a, C, A> where C: BorrowMut, } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -2422,7 +2417,7 @@ impl<'a, C, A> DatasetBeginTransactionCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, BeginTransactionResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -2502,8 +2497,7 @@ impl<'a, C, A> DatasetBeginTransactionCall<'a, C, A> where C: BorrowMut"] description = "A complete library to interact with Deployment Manager (protocol v2)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/deploymentmanager2-cli" @@ -17,18 +17,18 @@ keywords = ["deploymentmanager", "google", "cli"] name = "deploymentmanager2" [dependencies] -hyper = "0.7" -mime = "0.1.0" -serde = ">= 0.7.0" -serde_json = ">= 0.7.0" -yup-oauth2 = ">= 0.5.4" +hyper = "0.8" +mime = "0.2.0" +serde = "0.6.0" +serde_json = "0.6.0" +yup-oauth2 = ">= 0.5.6" strsim = "0.4" yup-hyper-mock = "1.0" clap = "2.0" [build-dependencies] -syntex = { version = ">= 0.23" } -serde_codegen = { version = ">= 0.6" } +syntex = { version = "= 0.28" } +serde_codegen = { version = "= 0.6.13" } [dependencies.google-deploymentmanager2] diff --git a/gen/deploymentmanager2-cli/README.md b/gen/deploymentmanager2-cli/README.md index 0e6dc07c74..80f3054b1b 100644 --- a/gen/deploymentmanager2-cli/README.md +++ b/gen/deploymentmanager2-cli/README.md @@ -17,14 +17,14 @@ Everything else about the *Deployment Manager* API can be found at the You can download the pre-compiled 64bit binaries for the following platforms: -* ![icon](http://megaicons.net/static/img/icons_sizes/6/140/16/ubuntu-icon.png) [ubuntu](http://dl.byronimo.de/google.rs/cli/0.3.3/ubuntu/deploymentmanager2.tar.gz) -* ![icon](http://hydra-media.cursecdn.com/wow.gamepedia.com/a/a2/Apple-icon-16x16.png?version=25ddd67ac3dd3b634478e3978b76cb74) [osx](http://dl.byronimo.de/google.rs/cli/0.3.3/osx/deploymentmanager2.tar.gz) +* ![icon](http://megaicons.net/static/img/icons_sizes/6/140/16/ubuntu-icon.png) [ubuntu](http://dl.byronimo.de/google.rs/cli/0.3.4/ubuntu/deploymentmanager2.tar.gz) +* ![icon](http://hydra-media.cursecdn.com/wow.gamepedia.com/a/a2/Apple-icon-16x16.png?version=25ddd67ac3dd3b634478e3978b76cb74) [osx](http://dl.byronimo.de/google.rs/cli/0.3.4/osx/deploymentmanager2.tar.gz) Find the source code [on github](https://github.com/Byron/google-apis-rs/tree/master/gen/deploymentmanager2-cli). # Usage -This documentation was generated from the *Deployment Manager* API at revision *20160201*. The CLI is at version *0.3.3*. +This documentation was generated from the *Deployment Manager* API at revision *20160406*. The CLI is at version *0.3.4*. ```bash deploymentmanager2 [options] diff --git a/gen/deploymentmanager2-cli/mkdocs.yml b/gen/deploymentmanager2-cli/mkdocs.yml index 533f965e37..8542a4616c 100644 --- a/gen/deploymentmanager2-cli/mkdocs.yml +++ b/gen/deploymentmanager2-cli/mkdocs.yml @@ -1,4 +1,4 @@ -site_name: Deployment Manager v0.3.3+20160201 +site_name: Deployment Manager v0.3.4+20160406 site_url: http://byron.github.io/google-apis-rs/google-deploymentmanager2-cli site_description: Write integrating applications with bcore diff --git a/gen/deploymentmanager2-cli/src/cmn.rs b/gen/deploymentmanager2-cli/src/cmn.rs index 188159ee80..ae86fdef65 100644 --- a/gen/deploymentmanager2-cli/src/cmn.rs +++ b/gen/deploymentmanager2-cli/src/cmn.rs @@ -414,7 +414,7 @@ impl TokenStorage for JsonTokenStorage { Err(err) => match err.kind() { io::ErrorKind::NotFound => Ok(()), - _ => Err(json::Error::Io(err)) + _ => Err(json::Error::IoError(err)) }, Ok(_) => Ok(()), } @@ -427,7 +427,7 @@ impl TokenStorage for JsonTokenStorage { Err(serde_err) => Err(serde_err), } }, - Err(io_err) => Err(json::Error::Io(io_err)) + Err(io_err) => Err(json::Error::IoError(io_err)) } } } @@ -444,7 +444,7 @@ impl TokenStorage for JsonTokenStorage { Err(io_err) => { match io_err.kind() { io::ErrorKind::NotFound => Ok(None), - _ => Err(json::Error::Io(io_err)) + _ => Err(json::Error::IoError(io_err)) } } } @@ -683,7 +683,7 @@ pub fn application_secret_from_directory(dir: &str, = json::from_str(json_console_secret).unwrap(); match json::to_writer_pretty(&mut f, &console_secret) { Err(serde_err) => match serde_err { - json::Error::Io(err) => err, + json::Error::IoError(err) => err, _ => panic!("Unexpected serde error: {:#?}", serde_err) }, Ok(_) => continue, @@ -696,7 +696,7 @@ pub fn application_secret_from_directory(dir: &str, }, Ok(f) => { match json::de::from_reader::<_, ConsoleApplicationSecret>(f) { - Err(json::Error::Io(err)) => + Err(json::Error::IoError(err)) => return secret_io_error(err), Err(json_err) => return Err(CLIError::Configuration( diff --git a/gen/deploymentmanager2-cli/src/main.rs b/gen/deploymentmanager2-cli/src/main.rs index e813e3f12d..7df6a13eee 100644 --- a/gen/deploymentmanager2-cli/src/main.rs +++ b/gen/deploymentmanager2-cli/src/main.rs @@ -285,6 +285,7 @@ impl<'n> Engine<'n> { "operation.name" => Some(("operation.name", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "target.config.content" => Some(("target.config.content", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "id" => Some(("id", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "self-link" => Some(("selfLink", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "name" => Some(("name", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), _ => { let suggestion = FieldCursor::did_you_mean(key, &vec!["client-operation-id", "config", "content", "creation-timestamp", "description", "end-time", "fingerprint", "http-error-message", "http-error-status-code", "id", "insert-time", "kind", "manifest", "name", "operation", "operation-type", "progress", "region", "self-link", "start-time", "status", "status-message", "target", "target-id", "target-link", "update", "user", "zone"]); @@ -464,6 +465,7 @@ impl<'n> Engine<'n> { "operation.name" => Some(("operation.name", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "target.config.content" => Some(("target.config.content", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "id" => Some(("id", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "self-link" => Some(("selfLink", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "name" => Some(("name", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), _ => { let suggestion = FieldCursor::did_you_mean(key, &vec!["client-operation-id", "config", "content", "creation-timestamp", "description", "end-time", "fingerprint", "http-error-message", "http-error-status-code", "id", "insert-time", "kind", "manifest", "name", "operation", "operation-type", "progress", "region", "self-link", "start-time", "status", "status-message", "target", "target-id", "target-link", "update", "user", "zone"]); @@ -672,6 +674,7 @@ impl<'n> Engine<'n> { "operation.name" => Some(("operation.name", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "target.config.content" => Some(("target.config.content", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "id" => Some(("id", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "self-link" => Some(("selfLink", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "name" => Some(("name", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), _ => { let suggestion = FieldCursor::did_you_mean(key, &vec!["client-operation-id", "config", "content", "creation-timestamp", "description", "end-time", "fingerprint", "http-error-message", "http-error-status-code", "id", "insert-time", "kind", "manifest", "name", "operation", "operation-type", "progress", "region", "self-link", "start-time", "status", "status-message", "target", "target-id", "target-link", "update", "user", "zone"]); @@ -1777,8 +1780,8 @@ fn main() { let mut app = App::new("deploymentmanager2") .author("Sebastian Thiel ") - .version("0.3.3+20160201") - .about("The Deployment Manager API allows users to declaratively configure, deploy and run complex solutions on the Google Cloud Platform.") + .version("0.3.4+20160406") + .about("Declares, configures, and deploys complex solutions on Google Cloud Platform.") .after_help("All documentation details can be found at http://byron.github.io/google-apis-rs/google_deploymentmanager2_cli") .arg(Arg::with_name("url") .long("scope") diff --git a/gen/deploymentmanager2/Cargo.toml b/gen/deploymentmanager2/Cargo.toml index 36f2465b89..fb4617ba4c 100644 --- a/gen/deploymentmanager2/Cargo.toml +++ b/gen/deploymentmanager2/Cargo.toml @@ -4,7 +4,7 @@ [package] name = "google-deploymentmanager2" -version = "0.1.12+20160201" +version = "0.1.13+20160406" authors = ["Sebastian Thiel "] description = "A complete library to interact with Deployment Manager (protocol v2)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/deploymentmanager2" @@ -16,14 +16,14 @@ build = "src/build.rs" [dependencies] -hyper = "0.7" -mime = "0.1.0" -serde = ">= 0.7.0" -serde_json = ">= 0.7.0" -yup-oauth2 = ">= 0.5.4" +hyper = "0.8" +mime = "0.2.0" +serde = "0.6.0" +serde_json = "0.6.0" +yup-oauth2 = ">= 0.5.6" url = ">= 0.5" [build-dependencies] -syntex = { version = ">= 0.23" } -serde_codegen = { version = ">= 0.6" } +syntex = { version = "= 0.28" } +serde_codegen = { version = "= 0.6.13" } diff --git a/gen/deploymentmanager2/README.md b/gen/deploymentmanager2/README.md index 2a963ed65e..ffdb910889 100644 --- a/gen/deploymentmanager2/README.md +++ b/gen/deploymentmanager2/README.md @@ -5,7 +5,7 @@ DO NOT EDIT ! --> The `google-deploymentmanager2` library allows access to all features of the *Google Deployment Manager* service. -This documentation was generated from *Deployment Manager* crate version *0.1.12+20160201*, where *20160201* is the exact revision of the *deploymentmanager:v2* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.12*. +This documentation was generated from *Deployment Manager* crate version *0.1.13+20160406*, where *20160406* is the exact revision of the *deploymentmanager:v2* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.13*. Everything else about the *Deployment Manager* *v2* API can be found at the [official documentation site](https://cloud.google.com/deployment-manager/). diff --git a/gen/deploymentmanager2/src/cmn.rs b/gen/deploymentmanager2/src/cmn.rs index 87b91a8986..c69621da55 100644 --- a/gen/deploymentmanager2/src/cmn.rs +++ b/gen/deploymentmanager2/src/cmn.rs @@ -12,7 +12,7 @@ use mime::{Mime, TopLevel, SubLevel, Attr, Value}; use oauth2::{TokenType, Retry, self}; use hyper; use hyper::header::{ContentType, ContentLength, Headers, UserAgent, Authorization, Header, - HeaderFormat}; + HeaderFormat, Bearer}; use hyper::http::h1::LINE_ENDING; use hyper::method::Method; use hyper::status::StatusCode; @@ -634,7 +634,7 @@ pub struct ResumableUploadHelper<'a, A: 'a> { pub start_at: Option, pub auth: &'a mut A, pub user_agent: &'a str, - pub auth_header: Authorization, + pub auth_header: Authorization, pub url: &'a str, pub reader: &'a mut ReadSeek, pub media_type: Mime, diff --git a/gen/deploymentmanager2/src/lib.rs b/gen/deploymentmanager2/src/lib.rs index 95f19934ba..5d2b15d927 100644 --- a/gen/deploymentmanager2/src/lib.rs +++ b/gen/deploymentmanager2/src/lib.rs @@ -2,7 +2,7 @@ // This file was generated automatically from 'src/mako/api/lib.rs.mako' // DO NOT EDIT ! -//! This documentation was generated from *Deployment Manager* crate version *0.1.12+20160201*, where *20160201* is the exact revision of the *deploymentmanager:v2* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.12*. +//! This documentation was generated from *Deployment Manager* crate version *0.1.13+20160406*, where *20160406* is the exact revision of the *deploymentmanager:v2* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.13*. //! //! Everything else about the *Deployment Manager* *v2* API can be found at the //! [official documentation site](https://cloud.google.com/deployment-manager/). diff --git a/gen/deploymentmanager2/src/lib.rs.in b/gen/deploymentmanager2/src/lib.rs.in index 76d56903b7..9e37570076 100644 --- a/gen/deploymentmanager2/src/lib.rs.in +++ b/gen/deploymentmanager2/src/lib.rs.in @@ -148,7 +148,7 @@ impl<'a, C, A> DeploymentManager DeploymentManager { client: RefCell::new(client), auth: RefCell::new(authenticator), - _user_agent: "google-api-rust-client/0.1.12".to_string(), + _user_agent: "google-api-rust-client/0.1.13".to_string(), } } @@ -169,7 +169,7 @@ impl<'a, C, A> DeploymentManager } /// Set the user-agent header field to use in all requests to the server. - /// It defaults to `google-api-rust-client/0.1.12`. + /// It defaults to `google-api-rust-client/0.1.13`. /// /// Returns the previously set user-agent. pub fn user_agent(&mut self, agent_name: String) -> String { @@ -314,7 +314,7 @@ impl ResponseResult for ResourcesListResponse {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ResourceUpdateWarningsData { - /// [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource, and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding). + /// [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding). pub key: Option, /// [Output Only] A warning data value corresponding to the key. pub value: Option, @@ -420,7 +420,7 @@ pub struct OperationErrorErrors { pub message: Option, /// [Output Only] The error type identifier for this error. pub code: Option, - /// [Output Only] Indicates the field in the request which caused the error. This property is optional. + /// [Output Only] Indicates the field in the request that caused the error. This property is optional. pub location: Option, } @@ -526,7 +526,7 @@ pub struct ResourceUpdateErrorErrors { pub message: Option, /// [Output Only] The error type identifier for this error. pub code: Option, - /// [Output Only] Indicates the field in the request which caused the error. This property is optional. + /// [Output Only] Indicates the field in the request that caused the error. This property is optional. pub location: Option, } @@ -556,7 +556,7 @@ impl Part for ImportFile {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct OperationWarningsData { - /// [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource, and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding). + /// [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding). pub key: Option, /// [Output Only] A warning data value corresponding to the key. pub value: Option, @@ -722,6 +722,9 @@ pub struct Deployment { pub operation: Option, /// [Output Only] Unique identifier for the resource; defined by the server. pub id: Option, + /// [Output Only] Self link for the deployment. + #[serde(rename="selfLink")] + pub self_link: Option, /// [Input Only] The parameters that define your deployment, including the deployment configuration and relevant templates. pub target: Option, } @@ -841,7 +844,7 @@ impl ResponseResult for ManifestsListResponse {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ResourceWarningsData { - /// [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource, and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding). + /// [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding). pub key: Option, /// [Output Only] A warning data value corresponding to the key. pub value: Option, @@ -1429,7 +1432,7 @@ impl<'a, C, A> OperationGetCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Operation)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -1499,8 +1502,7 @@ impl<'a, C, A> OperationGetCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -1682,7 +1684,7 @@ impl<'a, C, A> OperationListCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, OperationsListResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -1760,8 +1762,7 @@ impl<'a, C, A> OperationListCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -1845,11 +1846,11 @@ impl<'a, C, A> OperationListCall<'a, C, A> where C: BorrowMut, A: /// /// The field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field. /// - /// For example, to filter for instances whose name is not equal to example-instance, you would use filter=name ne example-instance. + /// For example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance. /// - /// Compute Engine Beta API Only: If you use filtering in the Beta API, you can also filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. In particular, use filtering on nested fields to take advantage of instance labels to organize and filter results based on label values. + /// Compute Engine Beta API Only: When filtering in the Beta API, you can also filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values. /// - /// The Beta API also supports filtering on multiple expressions by providing each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions meaning that resources must match all expressions to pass the filters. + /// The Beta API also supports filtering on multiple expressions by providing each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters. /// /// Sets the *filter* query property to the given value. pub fn filter(mut self, new_value: &str) -> OperationListCall<'a, C, A> { @@ -1963,7 +1964,7 @@ impl<'a, C, A> ManifestListCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, ManifestsListResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -2042,8 +2043,7 @@ impl<'a, C, A> ManifestListCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -2137,11 +2137,11 @@ impl<'a, C, A> ManifestListCall<'a, C, A> where C: BorrowMut, A: /// /// The field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field. /// - /// For example, to filter for instances whose name is not equal to example-instance, you would use filter=name ne example-instance. + /// For example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance. /// - /// Compute Engine Beta API Only: If you use filtering in the Beta API, you can also filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. In particular, use filtering on nested fields to take advantage of instance labels to organize and filter results based on label values. + /// Compute Engine Beta API Only: When filtering in the Beta API, you can also filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values. /// - /// The Beta API also supports filtering on multiple expressions by providing each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions meaning that resources must match all expressions to pass the filters. + /// The Beta API also supports filtering on multiple expressions by providing each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters. /// /// Sets the *filter* query property to the given value. pub fn filter(mut self, new_value: &str) -> ManifestListCall<'a, C, A> { @@ -2250,7 +2250,7 @@ impl<'a, C, A> ManifestGetCall<'a, C, A> where C: BorrowMut, A: o /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Manifest)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -2321,8 +2321,7 @@ impl<'a, C, A> ManifestGetCall<'a, C, A> where C: BorrowMut, A: o } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -2514,7 +2513,7 @@ impl<'a, C, A> TypeListCall<'a, C, A> where C: BorrowMut, A: oaut /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, TypesListResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -2592,8 +2591,7 @@ impl<'a, C, A> TypeListCall<'a, C, A> where C: BorrowMut, A: oaut } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -2677,11 +2675,11 @@ impl<'a, C, A> TypeListCall<'a, C, A> where C: BorrowMut, A: oaut /// /// The field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field. /// - /// For example, to filter for instances whose name is not equal to example-instance, you would use filter=name ne example-instance. + /// For example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance. /// - /// Compute Engine Beta API Only: If you use filtering in the Beta API, you can also filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. In particular, use filtering on nested fields to take advantage of instance labels to organize and filter results based on label values. + /// Compute Engine Beta API Only: When filtering in the Beta API, you can also filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values. /// - /// The Beta API also supports filtering on multiple expressions by providing each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions meaning that resources must match all expressions to pass the filters. + /// The Beta API also supports filtering on multiple expressions by providing each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters. /// /// Sets the *filter* query property to the given value. pub fn filter(mut self, new_value: &str) -> TypeListCall<'a, C, A> { @@ -2790,7 +2788,7 @@ impl<'a, C, A> ResourceGetCall<'a, C, A> where C: BorrowMut, A: o /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, ResourceType)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -2861,8 +2859,7 @@ impl<'a, C, A> ResourceGetCall<'a, C, A> where C: BorrowMut, A: o } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -3055,7 +3052,7 @@ impl<'a, C, A> ResourceListCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, ResourcesListResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -3134,8 +3131,7 @@ impl<'a, C, A> ResourceListCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -3229,11 +3225,11 @@ impl<'a, C, A> ResourceListCall<'a, C, A> where C: BorrowMut, A: /// /// The field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field. /// - /// For example, to filter for instances whose name is not equal to example-instance, you would use filter=name ne example-instance. + /// For example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance. /// - /// Compute Engine Beta API Only: If you use filtering in the Beta API, you can also filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. In particular, use filtering on nested fields to take advantage of instance labels to organize and filter results based on label values. + /// Compute Engine Beta API Only: When filtering in the Beta API, you can also filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values. /// - /// The Beta API also supports filtering on multiple expressions by providing each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions meaning that resources must match all expressions to pass the filters. + /// The Beta API also supports filtering on multiple expressions by providing each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters. /// /// Sets the *filter* query property to the given value. pub fn filter(mut self, new_value: &str) -> ResourceListCall<'a, C, A> { @@ -3354,7 +3350,7 @@ impl<'a, C, A> DeploymentUpdateCall<'a, C, A> where C: BorrowMut, /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Operation)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -3444,8 +3440,7 @@ impl<'a, C, A> DeploymentUpdateCall<'a, C, A> where C: BorrowMut, } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -3656,7 +3651,7 @@ impl<'a, C, A> DeploymentGetCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Deployment)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -3726,8 +3721,7 @@ impl<'a, C, A> DeploymentGetCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -3912,7 +3906,7 @@ impl<'a, C, A> DeploymentInsertCall<'a, C, A> where C: BorrowMut, /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Operation)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -3995,8 +3989,7 @@ impl<'a, C, A> DeploymentInsertCall<'a, C, A> where C: BorrowMut, } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -4190,7 +4183,7 @@ impl<'a, C, A> DeploymentCancelPreviewCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, Operation)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -4271,8 +4264,7 @@ impl<'a, C, A> DeploymentCancelPreviewCall<'a, C, A> where C: BorrowMut DeploymentListCall<'a, C, A> where C: BorrowMut, A /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, DeploymentsListResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -4545,8 +4537,7 @@ impl<'a, C, A> DeploymentListCall<'a, C, A> where C: BorrowMut, A } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -4630,11 +4621,11 @@ impl<'a, C, A> DeploymentListCall<'a, C, A> where C: BorrowMut, A /// /// The field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field. /// - /// For example, to filter for instances whose name is not equal to example-instance, you would use filter=name ne example-instance. + /// For example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance. /// - /// Compute Engine Beta API Only: If you use filtering in the Beta API, you can also filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. In particular, use filtering on nested fields to take advantage of instance labels to organize and filter results based on label values. + /// Compute Engine Beta API Only: When filtering in the Beta API, you can also filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values. /// - /// The Beta API also supports filtering on multiple expressions by providing each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions meaning that resources must match all expressions to pass the filters. + /// The Beta API also supports filtering on multiple expressions by providing each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters. /// /// Sets the *filter* query property to the given value. pub fn filter(mut self, new_value: &str) -> DeploymentListCall<'a, C, A> { @@ -4755,7 +4746,7 @@ impl<'a, C, A> DeploymentPatchCall<'a, C, A> where C: BorrowMut, /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Operation)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -4845,8 +4836,7 @@ impl<'a, C, A> DeploymentPatchCall<'a, C, A> where C: BorrowMut, } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -5064,7 +5054,7 @@ impl<'a, C, A> DeploymentStopCall<'a, C, A> where C: BorrowMut, A /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Operation)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -5145,8 +5135,7 @@ impl<'a, C, A> DeploymentStopCall<'a, C, A> where C: BorrowMut, A } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -5336,7 +5325,7 @@ impl<'a, C, A> DeploymentDeleteCall<'a, C, A> where C: BorrowMut, /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Operation)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -5406,8 +5395,7 @@ impl<'a, C, A> DeploymentDeleteCall<'a, C, A> where C: BorrowMut, } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Delete, &url) diff --git a/gen/deploymentmanager2_beta2-cli/Cargo.toml b/gen/deploymentmanager2_beta2-cli/Cargo.toml index 7309ecc815..65b5c86fb1 100644 --- a/gen/deploymentmanager2_beta2-cli/Cargo.toml +++ b/gen/deploymentmanager2_beta2-cli/Cargo.toml @@ -4,7 +4,7 @@ [package] name = "google-deploymentmanager2_beta2-cli" -version = "0.3.3+20160201" +version = "0.3.4+20160201" authors = ["Sebastian Thiel "] description = "A complete library to interact with Deployment Manager (protocol v2beta2)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/deploymentmanager2_beta2-cli" @@ -17,18 +17,18 @@ keywords = ["deploymentmanager", "google", "cli"] name = "deploymentmanager2-beta2" [dependencies] -hyper = "0.7" -mime = "0.1.0" -serde = ">= 0.7.0" -serde_json = ">= 0.7.0" -yup-oauth2 = ">= 0.5.4" +hyper = "0.8" +mime = "0.2.0" +serde = "0.6.0" +serde_json = "0.6.0" +yup-oauth2 = ">= 0.5.6" strsim = "0.4" yup-hyper-mock = "1.0" clap = "2.0" [build-dependencies] -syntex = { version = ">= 0.23" } -serde_codegen = { version = ">= 0.6" } +syntex = { version = "= 0.28" } +serde_codegen = { version = "= 0.6.13" } [dependencies.google-deploymentmanager2_beta2] diff --git a/gen/deploymentmanager2_beta2-cli/README.md b/gen/deploymentmanager2_beta2-cli/README.md index 4976967512..36cbb4c351 100644 --- a/gen/deploymentmanager2_beta2-cli/README.md +++ b/gen/deploymentmanager2_beta2-cli/README.md @@ -17,14 +17,14 @@ Everything else about the *Deployment Manager* API can be found at the You can download the pre-compiled 64bit binaries for the following platforms: -* ![icon](http://megaicons.net/static/img/icons_sizes/6/140/16/ubuntu-icon.png) [ubuntu](http://dl.byronimo.de/google.rs/cli/0.3.3/ubuntu/deploymentmanager2-beta2.tar.gz) -* ![icon](http://hydra-media.cursecdn.com/wow.gamepedia.com/a/a2/Apple-icon-16x16.png?version=25ddd67ac3dd3b634478e3978b76cb74) [osx](http://dl.byronimo.de/google.rs/cli/0.3.3/osx/deploymentmanager2-beta2.tar.gz) +* ![icon](http://megaicons.net/static/img/icons_sizes/6/140/16/ubuntu-icon.png) [ubuntu](http://dl.byronimo.de/google.rs/cli/0.3.4/ubuntu/deploymentmanager2-beta2.tar.gz) +* ![icon](http://hydra-media.cursecdn.com/wow.gamepedia.com/a/a2/Apple-icon-16x16.png?version=25ddd67ac3dd3b634478e3978b76cb74) [osx](http://dl.byronimo.de/google.rs/cli/0.3.4/osx/deploymentmanager2-beta2.tar.gz) Find the source code [on github](https://github.com/Byron/google-apis-rs/tree/master/gen/deploymentmanager2_beta2-cli). # Usage -This documentation was generated from the *Deployment Manager* API at revision *20160201*. The CLI is at version *0.3.3*. +This documentation was generated from the *Deployment Manager* API at revision *20160201*. The CLI is at version *0.3.4*. ```bash deploymentmanager2-beta2 [options] diff --git a/gen/deploymentmanager2_beta2-cli/mkdocs.yml b/gen/deploymentmanager2_beta2-cli/mkdocs.yml index 51304cabe0..0184cb78ca 100644 --- a/gen/deploymentmanager2_beta2-cli/mkdocs.yml +++ b/gen/deploymentmanager2_beta2-cli/mkdocs.yml @@ -1,4 +1,4 @@ -site_name: Deployment Manager v0.3.3+20160201 +site_name: Deployment Manager v0.3.4+20160201 site_url: http://byron.github.io/google-apis-rs/google-deploymentmanager2_beta2-cli site_description: Write integrating applications with bcore diff --git a/gen/deploymentmanager2_beta2-cli/src/cmn.rs b/gen/deploymentmanager2_beta2-cli/src/cmn.rs index 188159ee80..ae86fdef65 100644 --- a/gen/deploymentmanager2_beta2-cli/src/cmn.rs +++ b/gen/deploymentmanager2_beta2-cli/src/cmn.rs @@ -414,7 +414,7 @@ impl TokenStorage for JsonTokenStorage { Err(err) => match err.kind() { io::ErrorKind::NotFound => Ok(()), - _ => Err(json::Error::Io(err)) + _ => Err(json::Error::IoError(err)) }, Ok(_) => Ok(()), } @@ -427,7 +427,7 @@ impl TokenStorage for JsonTokenStorage { Err(serde_err) => Err(serde_err), } }, - Err(io_err) => Err(json::Error::Io(io_err)) + Err(io_err) => Err(json::Error::IoError(io_err)) } } } @@ -444,7 +444,7 @@ impl TokenStorage for JsonTokenStorage { Err(io_err) => { match io_err.kind() { io::ErrorKind::NotFound => Ok(None), - _ => Err(json::Error::Io(io_err)) + _ => Err(json::Error::IoError(io_err)) } } } @@ -683,7 +683,7 @@ pub fn application_secret_from_directory(dir: &str, = json::from_str(json_console_secret).unwrap(); match json::to_writer_pretty(&mut f, &console_secret) { Err(serde_err) => match serde_err { - json::Error::Io(err) => err, + json::Error::IoError(err) => err, _ => panic!("Unexpected serde error: {:#?}", serde_err) }, Ok(_) => continue, @@ -696,7 +696,7 @@ pub fn application_secret_from_directory(dir: &str, }, Ok(f) => { match json::de::from_reader::<_, ConsoleApplicationSecret>(f) { - Err(json::Error::Io(err)) => + Err(json::Error::IoError(err)) => return secret_io_error(err), Err(json_err) => return Err(CLIError::Configuration( diff --git a/gen/deploymentmanager2_beta2-cli/src/main.rs b/gen/deploymentmanager2_beta2-cli/src/main.rs index 3a6914b79a..dbebcab5bc 100644 --- a/gen/deploymentmanager2_beta2-cli/src/main.rs +++ b/gen/deploymentmanager2_beta2-cli/src/main.rs @@ -1478,7 +1478,7 @@ fn main() { let mut app = App::new("deploymentmanager2-beta2") .author("Sebastian Thiel ") - .version("0.3.3+20160201") + .version("0.3.4+20160201") .about("The Deployment Manager API allows users to declaratively configure, deploy and run complex solutions on the Google Cloud Platform.") .after_help("All documentation details can be found at http://byron.github.io/google-apis-rs/google_deploymentmanager2_beta2_cli") .arg(Arg::with_name("url") diff --git a/gen/deploymentmanager2_beta2/src/cmn.rs b/gen/deploymentmanager2_beta2/src/cmn.rs index 87b91a8986..c69621da55 100644 --- a/gen/deploymentmanager2_beta2/src/cmn.rs +++ b/gen/deploymentmanager2_beta2/src/cmn.rs @@ -12,7 +12,7 @@ use mime::{Mime, TopLevel, SubLevel, Attr, Value}; use oauth2::{TokenType, Retry, self}; use hyper; use hyper::header::{ContentType, ContentLength, Headers, UserAgent, Authorization, Header, - HeaderFormat}; + HeaderFormat, Bearer}; use hyper::http::h1::LINE_ENDING; use hyper::method::Method; use hyper::status::StatusCode; @@ -634,7 +634,7 @@ pub struct ResumableUploadHelper<'a, A: 'a> { pub start_at: Option, pub auth: &'a mut A, pub user_agent: &'a str, - pub auth_header: Authorization, + pub auth_header: Authorization, pub url: &'a str, pub reader: &'a mut ReadSeek, pub media_type: Mime, diff --git a/gen/dfareporting2d1-cli/Cargo.toml b/gen/dfareporting2d1-cli/Cargo.toml index ab50caa600..d4afc928c9 100644 --- a/gen/dfareporting2d1-cli/Cargo.toml +++ b/gen/dfareporting2d1-cli/Cargo.toml @@ -4,7 +4,7 @@ [package] name = "google-dfareporting2d1-cli" -version = "0.3.3+20160128" +version = "0.3.4+20160323" authors = ["Sebastian Thiel "] description = "A complete library to interact with dfareporting (protocol v2.1)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/dfareporting2d1-cli" @@ -17,18 +17,18 @@ keywords = ["dfareporting", "google", "cli"] name = "dfareporting2d1" [dependencies] -hyper = "0.7" -mime = "0.1.0" -serde = ">= 0.7.0" -serde_json = ">= 0.7.0" -yup-oauth2 = ">= 0.5.4" +hyper = "0.8" +mime = "0.2.0" +serde = "0.6.0" +serde_json = "0.6.0" +yup-oauth2 = ">= 0.5.6" strsim = "0.4" yup-hyper-mock = "1.0" clap = "2.0" [build-dependencies] -syntex = { version = ">= 0.23" } -serde_codegen = { version = ">= 0.6" } +syntex = { version = "= 0.28" } +serde_codegen = { version = "= 0.6.13" } [dependencies.google-dfareporting2d1] diff --git a/gen/dfareporting2d1-cli/README.md b/gen/dfareporting2d1-cli/README.md index ba7c95668f..fd026d019f 100644 --- a/gen/dfareporting2d1-cli/README.md +++ b/gen/dfareporting2d1-cli/README.md @@ -17,14 +17,14 @@ Everything else about the *dfareporting* API can be found at the You can download the pre-compiled 64bit binaries for the following platforms: -* ![icon](http://megaicons.net/static/img/icons_sizes/6/140/16/ubuntu-icon.png) [ubuntu](http://dl.byronimo.de/google.rs/cli/0.3.3/ubuntu/dfareporting2d1.tar.gz) -* ![icon](http://hydra-media.cursecdn.com/wow.gamepedia.com/a/a2/Apple-icon-16x16.png?version=25ddd67ac3dd3b634478e3978b76cb74) [osx](http://dl.byronimo.de/google.rs/cli/0.3.3/osx/dfareporting2d1.tar.gz) +* ![icon](http://megaicons.net/static/img/icons_sizes/6/140/16/ubuntu-icon.png) [ubuntu](http://dl.byronimo.de/google.rs/cli/0.3.4/ubuntu/dfareporting2d1.tar.gz) +* ![icon](http://hydra-media.cursecdn.com/wow.gamepedia.com/a/a2/Apple-icon-16x16.png?version=25ddd67ac3dd3b634478e3978b76cb74) [osx](http://dl.byronimo.de/google.rs/cli/0.3.4/osx/dfareporting2d1.tar.gz) Find the source code [on github](https://github.com/Byron/google-apis-rs/tree/master/gen/dfareporting2d1-cli). # Usage -This documentation was generated from the *dfareporting* API at revision *20160128*. The CLI is at version *0.3.3*. +This documentation was generated from the *dfareporting* API at revision *20160323*. The CLI is at version *0.3.4*. ```bash dfareporting2d1 [options] diff --git a/gen/dfareporting2d1-cli/mkdocs.yml b/gen/dfareporting2d1-cli/mkdocs.yml index 64a4d3eff6..e1bc818c95 100644 --- a/gen/dfareporting2d1-cli/mkdocs.yml +++ b/gen/dfareporting2d1-cli/mkdocs.yml @@ -1,4 +1,4 @@ -site_name: dfareporting v0.3.3+20160128 +site_name: dfareporting v0.3.4+20160323 site_url: http://byron.github.io/google-apis-rs/google-dfareporting2d1-cli site_description: Write integrating applications with bcore diff --git a/gen/dfareporting2d1-cli/src/cmn.rs b/gen/dfareporting2d1-cli/src/cmn.rs index 188159ee80..ae86fdef65 100644 --- a/gen/dfareporting2d1-cli/src/cmn.rs +++ b/gen/dfareporting2d1-cli/src/cmn.rs @@ -414,7 +414,7 @@ impl TokenStorage for JsonTokenStorage { Err(err) => match err.kind() { io::ErrorKind::NotFound => Ok(()), - _ => Err(json::Error::Io(err)) + _ => Err(json::Error::IoError(err)) }, Ok(_) => Ok(()), } @@ -427,7 +427,7 @@ impl TokenStorage for JsonTokenStorage { Err(serde_err) => Err(serde_err), } }, - Err(io_err) => Err(json::Error::Io(io_err)) + Err(io_err) => Err(json::Error::IoError(io_err)) } } } @@ -444,7 +444,7 @@ impl TokenStorage for JsonTokenStorage { Err(io_err) => { match io_err.kind() { io::ErrorKind::NotFound => Ok(None), - _ => Err(json::Error::Io(io_err)) + _ => Err(json::Error::IoError(io_err)) } } } @@ -683,7 +683,7 @@ pub fn application_secret_from_directory(dir: &str, = json::from_str(json_console_secret).unwrap(); match json::to_writer_pretty(&mut f, &console_secret) { Err(serde_err) => match serde_err { - json::Error::Io(err) => err, + json::Error::IoError(err) => err, _ => panic!("Unexpected serde error: {:#?}", serde_err) }, Ok(_) => continue, @@ -696,7 +696,7 @@ pub fn application_secret_from_directory(dir: &str, }, Ok(f) => { match json::de::from_reader::<_, ConsoleApplicationSecret>(f) { - Err(json::Error::Io(err)) => + Err(json::Error::IoError(err)) => return secret_io_error(err), Err(json_err) => return Err(CLIError::Configuration( diff --git a/gen/dfareporting2d1-cli/src/main.rs b/gen/dfareporting2d1-cli/src/main.rs index 8d09e1ae9b..b094d8f906 100644 --- a/gen/dfareporting2d1-cli/src/main.rs +++ b/gen/dfareporting2d1-cli/src/main.rs @@ -22314,8 +22314,8 @@ fn main() { let mut app = App::new("dfareporting2d1") .author("Sebastian Thiel ") - .version("0.3.3+20160128") - .about("Manage your DoubleClick Campaign Manager ad campaigns and reports.") + .version("0.3.4+20160323") + .about("Manages your DoubleClick Campaign Manager ad campaigns and reports.") .after_help("All documentation details can be found at http://byron.github.io/google-apis-rs/google_dfareporting2d1_cli") .arg(Arg::with_name("url") .long("scope") diff --git a/gen/dfareporting2d1/Cargo.toml b/gen/dfareporting2d1/Cargo.toml index e066dcfe1d..89a4a6d4fb 100644 --- a/gen/dfareporting2d1/Cargo.toml +++ b/gen/dfareporting2d1/Cargo.toml @@ -4,7 +4,7 @@ [package] name = "google-dfareporting2d1" -version = "0.1.12+20160128" +version = "0.1.13+20160323" authors = ["Sebastian Thiel "] description = "A complete library to interact with dfareporting (protocol v2.1)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/dfareporting2d1" @@ -16,14 +16,14 @@ build = "src/build.rs" [dependencies] -hyper = "0.7" -mime = "0.1.0" -serde = ">= 0.7.0" -serde_json = ">= 0.7.0" -yup-oauth2 = ">= 0.5.4" +hyper = "0.8" +mime = "0.2.0" +serde = "0.6.0" +serde_json = "0.6.0" +yup-oauth2 = ">= 0.5.6" url = ">= 0.5" [build-dependencies] -syntex = { version = ">= 0.23" } -serde_codegen = { version = ">= 0.6" } +syntex = { version = "= 0.28" } +serde_codegen = { version = "= 0.6.13" } diff --git a/gen/dfareporting2d1/README.md b/gen/dfareporting2d1/README.md index f5551d41a2..ff05d56cd2 100644 --- a/gen/dfareporting2d1/README.md +++ b/gen/dfareporting2d1/README.md @@ -5,7 +5,7 @@ DO NOT EDIT ! --> The `google-dfareporting2d1` library allows access to all features of the *Google dfareporting* service. -This documentation was generated from *dfareporting* crate version *0.1.12+20160128*, where *20160128* is the exact revision of the *dfareporting:v2.1* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.12*. +This documentation was generated from *dfareporting* crate version *0.1.13+20160323*, where *20160323* is the exact revision of the *dfareporting:v2.1* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.13*. Everything else about the *dfareporting* *v2d1* API can be found at the [official documentation site](https://developers.google.com/doubleclick-advertisers/reporting/). diff --git a/gen/dfareporting2d1/src/cmn.rs b/gen/dfareporting2d1/src/cmn.rs index 87b91a8986..c69621da55 100644 --- a/gen/dfareporting2d1/src/cmn.rs +++ b/gen/dfareporting2d1/src/cmn.rs @@ -12,7 +12,7 @@ use mime::{Mime, TopLevel, SubLevel, Attr, Value}; use oauth2::{TokenType, Retry, self}; use hyper; use hyper::header::{ContentType, ContentLength, Headers, UserAgent, Authorization, Header, - HeaderFormat}; + HeaderFormat, Bearer}; use hyper::http::h1::LINE_ENDING; use hyper::method::Method; use hyper::status::StatusCode; @@ -634,7 +634,7 @@ pub struct ResumableUploadHelper<'a, A: 'a> { pub start_at: Option, pub auth: &'a mut A, pub user_agent: &'a str, - pub auth_header: Authorization, + pub auth_header: Authorization, pub url: &'a str, pub reader: &'a mut ReadSeek, pub media_type: Mime, diff --git a/gen/dfareporting2d1/src/lib.rs b/gen/dfareporting2d1/src/lib.rs index 0816871490..9849a4296b 100644 --- a/gen/dfareporting2d1/src/lib.rs +++ b/gen/dfareporting2d1/src/lib.rs @@ -2,7 +2,7 @@ // This file was generated automatically from 'src/mako/api/lib.rs.mako' // DO NOT EDIT ! -//! This documentation was generated from *dfareporting* crate version *0.1.12+20160128*, where *20160128* is the exact revision of the *dfareporting:v2.1* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.12*. +//! This documentation was generated from *dfareporting* crate version *0.1.13+20160323*, where *20160323* is the exact revision of the *dfareporting:v2.1* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.13*. //! //! Everything else about the *dfareporting* *v2d1* API can be found at the //! [official documentation site](https://developers.google.com/doubleclick-advertisers/reporting/). diff --git a/gen/dfareporting2d1/src/lib.rs.in b/gen/dfareporting2d1/src/lib.rs.in index 98f3efe022..5353c81d8f 100644 --- a/gen/dfareporting2d1/src/lib.rs.in +++ b/gen/dfareporting2d1/src/lib.rs.in @@ -136,7 +136,7 @@ impl<'a, C, A> Dfareporting Dfareporting { client: RefCell::new(client), auth: RefCell::new(authenticator), - _user_agent: "google-api-rust-client/0.1.12".to_string(), + _user_agent: "google-api-rust-client/0.1.13".to_string(), } } @@ -307,7 +307,7 @@ impl<'a, C, A> Dfareporting } /// Set the user-agent header field to use in all requests to the server. - /// It defaults to `google-api-rust-client/0.1.12`. + /// It defaults to `google-api-rust-client/0.1.13`. /// /// Returns the previously set user-agent. pub fn user_agent(&mut self, agent_name: String) -> String { @@ -1772,7 +1772,7 @@ pub struct Placement { /// Dimension value for the ID of the site. This is a read-only, auto-generated field. #[serde(rename="siteIdDimensionValue")] pub site_id_dimension_value: Option, - /// Placement compatibility. WEB and WEB_INTERSTITIAL refer to rendering either on desktop or on mobile devices for regular or interstitial ads, respectively. APP and APP_INTERSTITIAL are for rendering in mobile apps.IN_STREAM_VIDEO refers to rendering in in-stream video ads developed with the VAST standard. This field is required on insertion. + /// Placement compatibility. WEB and WEB_INTERSTITIAL refer to rendering either on desktop or on mobile devices for regular or interstitial ads, respectively. APP and APP_INTERSTITIAL are for rendering in mobile apps. IN_STREAM_VIDEO refers to rendering in in-stream video ads developed with the VAST standard. This field is required on insertion. pub compatibility: Option, /// ID of the placement strategy assigned to this placement. #[serde(rename="placementStrategyId")] @@ -12900,7 +12900,7 @@ impl<'a, C, A> UserRolePermissionGroupGetCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, UserRolePermissionGroup)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -12970,8 +12970,7 @@ impl<'a, C, A> UserRolePermissionGroupGetCall<'a, C, A> where C: BorrowMut UserRolePermissionGroupListCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, UserRolePermissionGroupsListResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -13216,8 +13215,7 @@ impl<'a, C, A> UserRolePermissionGroupListCall<'a, C, A> where C: BorrowMut PlatformTypeGetCall<'a, C, A> where C: BorrowMut, /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, PlatformType)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -13454,8 +13452,7 @@ impl<'a, C, A> PlatformTypeGetCall<'a, C, A> where C: BorrowMut, } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -13631,7 +13628,7 @@ impl<'a, C, A> PlatformTypeListCall<'a, C, A> where C: BorrowMut, /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, PlatformTypesListResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -13700,8 +13697,7 @@ impl<'a, C, A> PlatformTypeListCall<'a, C, A> where C: BorrowMut, } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -13876,7 +13872,7 @@ impl<'a, C, A> CreativeFieldValuePatchCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, CreativeFieldValue)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -13958,8 +13954,7 @@ impl<'a, C, A> CreativeFieldValuePatchCall<'a, C, A> where C: BorrowMut CreativeFieldValueGetCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, CreativeFieldValue)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -14231,8 +14226,7 @@ impl<'a, C, A> CreativeFieldValueGetCall<'a, C, A> where C: BorrowMut CreativeFieldValueDeleteCall<'a, C, A> where C: BorrowMut Result { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -14490,8 +14484,7 @@ impl<'a, C, A> CreativeFieldValueDeleteCall<'a, C, A> where C: BorrowMut CreativeFieldValueInsertCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, CreativeFieldValue)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -14756,8 +14749,7 @@ impl<'a, C, A> CreativeFieldValueInsertCall<'a, C, A> where C: BorrowMut CreativeFieldValueUpdateCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, CreativeFieldValue)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -15035,8 +15027,7 @@ impl<'a, C, A> CreativeFieldValueUpdateCall<'a, C, A> where C: BorrowMut CreativeFieldValueListCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, CreativeFieldValuesListResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -15328,8 +15319,7 @@ impl<'a, C, A> CreativeFieldValueListCall<'a, C, A> where C: BorrowMut CreativeFieldUpdateCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, CreativeField)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -15635,8 +15625,7 @@ impl<'a, C, A> CreativeFieldUpdateCall<'a, C, A> where C: BorrowMut CreativeFieldListCall<'a, C, A> where C: BorrowMut /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, CreativeFieldsListResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -15923,8 +15912,7 @@ impl<'a, C, A> CreativeFieldListCall<'a, C, A> where C: BorrowMut } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -16142,7 +16130,7 @@ impl<'a, C, A> CreativeFieldDeleteCall<'a, C, A> where C: BorrowMut Result { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -16211,8 +16199,7 @@ impl<'a, C, A> CreativeFieldDeleteCall<'a, C, A> where C: BorrowMut CreativeFieldGetCall<'a, C, A> where C: BorrowMut, /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, CreativeField)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -16449,8 +16436,7 @@ impl<'a, C, A> CreativeFieldGetCall<'a, C, A> where C: BorrowMut, } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -16633,7 +16619,7 @@ impl<'a, C, A> CreativeFieldInsertCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, CreativeField)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -16713,8 +16699,7 @@ impl<'a, C, A> CreativeFieldInsertCall<'a, C, A> where C: BorrowMut CreativeFieldPatchCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, CreativeField)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -16982,8 +16967,7 @@ impl<'a, C, A> CreativeFieldPatchCall<'a, C, A> where C: BorrowMut UserRoleInsertCall<'a, C, A> where C: BorrowMut, A /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, UserRole)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -17259,8 +17243,7 @@ impl<'a, C, A> UserRoleInsertCall<'a, C, A> where C: BorrowMut, A } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -17440,7 +17423,7 @@ impl<'a, C, A> UserRoleGetCall<'a, C, A> where C: BorrowMut, A: o /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, UserRole)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -17510,8 +17493,7 @@ impl<'a, C, A> UserRoleGetCall<'a, C, A> where C: BorrowMut, A: o } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -17694,7 +17676,7 @@ impl<'a, C, A> UserRoleUpdateCall<'a, C, A> where C: BorrowMut, A /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, UserRole)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -17774,8 +17756,7 @@ impl<'a, C, A> UserRoleUpdateCall<'a, C, A> where C: BorrowMut, A } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -17955,7 +17936,7 @@ impl<'a, C, A> UserRoleDeleteCall<'a, C, A> where C: BorrowMut, A /// Perform the operation you have build so far. pub fn doit(mut self) -> Result { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -18024,8 +18005,7 @@ impl<'a, C, A> UserRoleDeleteCall<'a, C, A> where C: BorrowMut, A } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Delete, &url) @@ -18199,7 +18179,7 @@ impl<'a, C, A> UserRolePatchCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, UserRole)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -18280,8 +18260,7 @@ impl<'a, C, A> UserRolePatchCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -18486,7 +18465,7 @@ impl<'a, C, A> UserRoleListCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, UserRolesListResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -18581,8 +18560,7 @@ impl<'a, C, A> UserRoleListCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -18806,7 +18784,7 @@ impl<'a, C, A> OperatingSystemVersionGetCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, OperatingSystemVersion)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -18876,8 +18854,7 @@ impl<'a, C, A> OperatingSystemVersionGetCall<'a, C, A> where C: BorrowMut OperatingSystemVersionListCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, OperatingSystemVersionsListResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -19122,8 +19099,7 @@ impl<'a, C, A> OperatingSystemVersionListCall<'a, C, A> where C: BorrowMut LandingPageGetCall<'a, C, A> where C: BorrowMut, A /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, LandingPage)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -19362,8 +19338,7 @@ impl<'a, C, A> LandingPageGetCall<'a, C, A> where C: BorrowMut, A } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -19557,7 +19532,7 @@ impl<'a, C, A> LandingPageUpdateCall<'a, C, A> where C: BorrowMut /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, LandingPage)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -19638,8 +19613,7 @@ impl<'a, C, A> LandingPageUpdateCall<'a, C, A> where C: BorrowMut } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -19829,7 +19803,7 @@ impl<'a, C, A> LandingPageListCall<'a, C, A> where C: BorrowMut, /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, LandingPagesListResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -19899,8 +19873,7 @@ impl<'a, C, A> LandingPageListCall<'a, C, A> where C: BorrowMut, } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -20084,7 +20057,7 @@ impl<'a, C, A> LandingPageInsertCall<'a, C, A> where C: BorrowMut /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, LandingPage)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -20165,8 +20138,7 @@ impl<'a, C, A> LandingPageInsertCall<'a, C, A> where C: BorrowMut } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -20364,7 +20336,7 @@ impl<'a, C, A> LandingPagePatchCall<'a, C, A> where C: BorrowMut, /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, LandingPage)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -20446,8 +20418,7 @@ impl<'a, C, A> LandingPagePatchCall<'a, C, A> where C: BorrowMut, } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -20648,7 +20619,7 @@ impl<'a, C, A> LandingPageDeleteCall<'a, C, A> where C: BorrowMut /// Perform the operation you have build so far. pub fn doit(mut self) -> Result { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -20718,8 +20689,7 @@ impl<'a, C, A> LandingPageDeleteCall<'a, C, A> where C: BorrowMut } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Delete, &url) @@ -20905,7 +20875,7 @@ impl<'a, C, A> CreativeAssetInsertCall<'a, C, A> where C: BorrowMut(mut self, mut reader: RS, reader_mime_type: mime::Mime, protocol: &'static str) -> Result<(hyper::client::Response, CreativeAssetMetadata)> where RS: ReadSeek { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -20997,8 +20967,7 @@ impl<'a, C, A> CreativeAssetInsertCall<'a, C, A> where C: BorrowMut CampaignCreativeAssociationInsertCall<'a, C, A> where C: BorrowMu /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, CampaignCreativeAssociation)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -21377,8 +21346,7 @@ impl<'a, C, A> CampaignCreativeAssociationInsertCall<'a, C, A> where C: BorrowMu } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -21574,7 +21542,7 @@ impl<'a, C, A> CampaignCreativeAssociationListCall<'a, C, A> where C: BorrowMut< /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, CampaignCreativeAssociationsListResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -21653,8 +21621,7 @@ impl<'a, C, A> CampaignCreativeAssociationListCall<'a, C, A> where C: BorrowMut< } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -21871,7 +21838,7 @@ impl<'a, C, A> ChangeLogListCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, ChangeLogsListResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -21976,8 +21943,7 @@ impl<'a, C, A> ChangeLogListCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -22217,7 +22183,7 @@ impl<'a, C, A> ChangeLogGetCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, ChangeLog)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -22287,8 +22253,7 @@ impl<'a, C, A> ChangeLogGetCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -22465,7 +22430,7 @@ impl<'a, C, A> RemarketingListShareGetCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, RemarketingListShare)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -22535,8 +22500,7 @@ impl<'a, C, A> RemarketingListShareGetCall<'a, C, A> where C: BorrowMut RemarketingListSharePatchCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, RemarketingListShare)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -22801,8 +22765,7 @@ impl<'a, C, A> RemarketingListSharePatchCall<'a, C, A> where C: BorrowMut RemarketingListShareUpdateCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, RemarketingListShare)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -23078,8 +23041,7 @@ impl<'a, C, A> RemarketingListShareUpdateCall<'a, C, A> where C: BorrowMut ReportRunCall<'a, C, A> where C: BorrowMut, A: oau /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, File)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -23334,8 +23296,7 @@ impl<'a, C, A> ReportRunCall<'a, C, A> where C: BorrowMut, A: oau } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Post, &url) @@ -23526,7 +23487,7 @@ impl<'a, C, A> ReportPatchCall<'a, C, A> where C: BorrowMut, A: o /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Report)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -23607,8 +23568,7 @@ impl<'a, C, A> ReportPatchCall<'a, C, A> where C: BorrowMut, A: o } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -23806,7 +23766,7 @@ impl<'a, C, A> ReportFileListCall<'a, C, A> where C: BorrowMut, A /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, FileList)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -23888,8 +23848,7 @@ impl<'a, C, A> ReportFileListCall<'a, C, A> where C: BorrowMut, A } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -24100,7 +24059,7 @@ impl<'a, C, A> ReportInsertCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Report)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -24180,8 +24139,7 @@ impl<'a, C, A> ReportInsertCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -24368,7 +24326,7 @@ impl<'a, C, A> ReportUpdateCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Report)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -24449,8 +24407,7 @@ impl<'a, C, A> ReportUpdateCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -24646,7 +24603,7 @@ impl<'a, C, A> ReportCompatibleFieldQueryCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, CompatibleFields)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -24726,8 +24683,7 @@ impl<'a, C, A> ReportCompatibleFieldQueryCall<'a, C, A> where C: BorrowMut ReportGetCall<'a, C, A> where C: BorrowMut, A: oau /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Report)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -24977,8 +24933,7 @@ impl<'a, C, A> ReportGetCall<'a, C, A> where C: BorrowMut, A: oau } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -25161,7 +25116,7 @@ impl<'a, C, A> ReportFileGetCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, File)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -25248,8 +25203,7 @@ impl<'a, C, A> ReportFileGetCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -25436,7 +25390,7 @@ impl<'a, C, A> ReportDeleteCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -25505,8 +25459,7 @@ impl<'a, C, A> ReportDeleteCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Delete, &url) @@ -25682,7 +25635,7 @@ impl<'a, C, A> ReportListCall<'a, C, A> where C: BorrowMut, A: oa /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, ReportList)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -25766,8 +25719,7 @@ impl<'a, C, A> ReportListCall<'a, C, A> where C: BorrowMut, A: oa } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -25975,7 +25927,7 @@ impl<'a, C, A> AdvertiserInsertCall<'a, C, A> where C: BorrowMut, /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Advertiser)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -26055,8 +26007,7 @@ impl<'a, C, A> AdvertiserInsertCall<'a, C, A> where C: BorrowMut, } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -26243,7 +26194,7 @@ impl<'a, C, A> AdvertiserPatchCall<'a, C, A> where C: BorrowMut, /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Advertiser)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -26324,8 +26275,7 @@ impl<'a, C, A> AdvertiserPatchCall<'a, C, A> where C: BorrowMut, } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -26538,7 +26488,7 @@ impl<'a, C, A> AdvertiserListCall<'a, C, A> where C: BorrowMut, A /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, AdvertisersListResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -26649,8 +26599,7 @@ impl<'a, C, A> AdvertiserListCall<'a, C, A> where C: BorrowMut, A } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -26910,7 +26859,7 @@ impl<'a, C, A> AdvertiserUpdateCall<'a, C, A> where C: BorrowMut, /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Advertiser)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -26990,8 +26939,7 @@ impl<'a, C, A> AdvertiserUpdateCall<'a, C, A> where C: BorrowMut, } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -27171,7 +27119,7 @@ impl<'a, C, A> AdvertiserGetCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Advertiser)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -27241,8 +27189,7 @@ impl<'a, C, A> AdvertiserGetCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -27429,7 +27376,7 @@ impl<'a, C, A> DimensionValueQueryCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, DimensionValueList)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -27515,8 +27462,7 @@ impl<'a, C, A> DimensionValueQueryCall<'a, C, A> where C: BorrowMut FloodlightActivityGroupDeleteCall<'a, C, A> where C: BorrowMut Result { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -27779,8 +27725,7 @@ impl<'a, C, A> FloodlightActivityGroupDeleteCall<'a, C, A> where C: BorrowMut FloodlightActivityGroupGetCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, FloodlightActivityGroup)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -28017,8 +27962,7 @@ impl<'a, C, A> FloodlightActivityGroupGetCall<'a, C, A> where C: BorrowMut FloodlightActivityGroupPatchCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, FloodlightActivityGroup)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -28283,8 +28227,7 @@ impl<'a, C, A> FloodlightActivityGroupPatchCall<'a, C, A> where C: BorrowMut FloodlightActivityGroupListCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, FloodlightActivityGroupsListResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -28589,8 +28532,7 @@ impl<'a, C, A> FloodlightActivityGroupListCall<'a, C, A> where C: BorrowMut FloodlightActivityGroupInsertCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, FloodlightActivityGroup)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -28907,8 +28849,7 @@ impl<'a, C, A> FloodlightActivityGroupInsertCall<'a, C, A> where C: BorrowMut FloodlightActivityGroupUpdateCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, FloodlightActivityGroup)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -29174,8 +29115,7 @@ impl<'a, C, A> FloodlightActivityGroupUpdateCall<'a, C, A> where C: BorrowMut MetroListCall<'a, C, A> where C: BorrowMut, A: oau /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, MetrosListResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -29423,8 +29363,7 @@ impl<'a, C, A> MetroListCall<'a, C, A> where C: BorrowMut, A: oau } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -29605,7 +29544,7 @@ impl<'a, C, A> OrderListCall<'a, C, A> where C: BorrowMut, A: oau /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, OrdersListResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -29700,8 +29639,7 @@ impl<'a, C, A> OrderListCall<'a, C, A> where C: BorrowMut, A: oau } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -29930,7 +29868,7 @@ impl<'a, C, A> OrderGetCall<'a, C, A> where C: BorrowMut, A: oaut /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Order)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -30001,8 +29939,7 @@ impl<'a, C, A> OrderGetCall<'a, C, A> where C: BorrowMut, A: oaut } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -30189,7 +30126,7 @@ impl<'a, C, A> DirectorySiteContactGetCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, DirectorySiteContact)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -30259,8 +30196,7 @@ impl<'a, C, A> DirectorySiteContactGetCall<'a, C, A> where C: BorrowMut DirectorySiteContactListCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, DirectorySiteContactsListResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -30544,8 +30480,7 @@ impl<'a, C, A> DirectorySiteContactListCall<'a, C, A> where C: BorrowMut UserProfileListCall<'a, C, A> where C: BorrowMut, /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, UserProfileList)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -30808,8 +30743,7 @@ impl<'a, C, A> UserProfileListCall<'a, C, A> where C: BorrowMut, } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -30965,7 +30899,7 @@ impl<'a, C, A> UserProfileGetCall<'a, C, A> where C: BorrowMut, A /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, UserProfile)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -31034,8 +30968,7 @@ impl<'a, C, A> UserProfileGetCall<'a, C, A> where C: BorrowMut, A } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -31209,7 +31142,7 @@ impl<'a, C, A> AdPatchCall<'a, C, A> where C: BorrowMut, A: oauth /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Ad)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -31290,8 +31223,7 @@ impl<'a, C, A> AdPatchCall<'a, C, A> where C: BorrowMut, A: oauth } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -31487,7 +31419,7 @@ impl<'a, C, A> AdInsertCall<'a, C, A> where C: BorrowMut, A: oaut /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Ad)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -31567,8 +31499,7 @@ impl<'a, C, A> AdInsertCall<'a, C, A> where C: BorrowMut, A: oaut } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -31795,7 +31726,7 @@ impl<'a, C, A> AdListCall<'a, C, A> where C: BorrowMut, A: oauth2 /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, AdsListResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -31956,8 +31887,7 @@ impl<'a, C, A> AdListCall<'a, C, A> where C: BorrowMut, A: oauth2 } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -32302,7 +32232,7 @@ impl<'a, C, A> AdGetCall<'a, C, A> where C: BorrowMut, A: oauth2: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Ad)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -32372,8 +32302,7 @@ impl<'a, C, A> AdGetCall<'a, C, A> where C: BorrowMut, A: oauth2: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -32556,7 +32485,7 @@ impl<'a, C, A> AdUpdateCall<'a, C, A> where C: BorrowMut, A: oaut /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Ad)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -32636,8 +32565,7 @@ impl<'a, C, A> AdUpdateCall<'a, C, A> where C: BorrowMut, A: oaut } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -32817,7 +32745,7 @@ impl<'a, C, A> AccountPermissionGetCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, AccountPermission)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -32887,8 +32815,7 @@ impl<'a, C, A> AccountPermissionGetCall<'a, C, A> where C: BorrowMut AccountPermissionListCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, AccountPermissionsListResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -33133,8 +33060,7 @@ impl<'a, C, A> AccountPermissionListCall<'a, C, A> where C: BorrowMut ConnectionTypeListCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, ConnectionTypesListResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -33369,8 +33295,7 @@ impl<'a, C, A> ConnectionTypeListCall<'a, C, A> where C: BorrowMut ConnectionTypeGetCall<'a, C, A> where C: BorrowMut /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, ConnectionType)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -33607,8 +33532,7 @@ impl<'a, C, A> ConnectionTypeGetCall<'a, C, A> where C: BorrowMut } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -33785,7 +33709,7 @@ impl<'a, C, A> AdvertiserGroupGetCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, AdvertiserGroup)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -33855,8 +33779,7 @@ impl<'a, C, A> AdvertiserGroupGetCall<'a, C, A> where C: BorrowMut AdvertiserGroupListCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, AdvertiserGroupsListResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -34133,8 +34056,7 @@ impl<'a, C, A> AdvertiserGroupListCall<'a, C, A> where C: BorrowMut AdvertiserGroupInsertCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, AdvertiserGroup)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -34430,8 +34352,7 @@ impl<'a, C, A> AdvertiserGroupInsertCall<'a, C, A> where C: BorrowMut AdvertiserGroupUpdateCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, AdvertiserGroup)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -34697,8 +34618,7 @@ impl<'a, C, A> AdvertiserGroupUpdateCall<'a, C, A> where C: BorrowMut AdvertiserGroupPatchCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, AdvertiserGroup)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -34966,8 +34886,7 @@ impl<'a, C, A> AdvertiserGroupPatchCall<'a, C, A> where C: BorrowMut AdvertiserGroupDeleteCall<'a, C, A> where C: BorrowMut Result { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -35226,8 +35145,7 @@ impl<'a, C, A> AdvertiserGroupDeleteCall<'a, C, A> where C: BorrowMut SiteInsertCall<'a, C, A> where C: BorrowMut, A: oa /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Site)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -35480,8 +35398,7 @@ impl<'a, C, A> SiteInsertCall<'a, C, A> where C: BorrowMut, A: oa } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -35661,7 +35578,7 @@ impl<'a, C, A> SiteGetCall<'a, C, A> where C: BorrowMut, A: oauth /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Site)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -35731,8 +35648,7 @@ impl<'a, C, A> SiteGetCall<'a, C, A> where C: BorrowMut, A: oauth } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -35938,7 +35854,7 @@ impl<'a, C, A> SiteListCall<'a, C, A> where C: BorrowMut, A: oaut /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, SitesListResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -36058,8 +35974,7 @@ impl<'a, C, A> SiteListCall<'a, C, A> where C: BorrowMut, A: oaut } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -36340,7 +36255,7 @@ impl<'a, C, A> SiteUpdateCall<'a, C, A> where C: BorrowMut, A: oa /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Site)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -36420,8 +36335,7 @@ impl<'a, C, A> SiteUpdateCall<'a, C, A> where C: BorrowMut, A: oa } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -36608,7 +36522,7 @@ impl<'a, C, A> SitePatchCall<'a, C, A> where C: BorrowMut, A: oau /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Site)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -36689,8 +36603,7 @@ impl<'a, C, A> SitePatchCall<'a, C, A> where C: BorrowMut, A: oau } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -36880,7 +36793,7 @@ impl<'a, C, A> FloodlightActivityGetCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, FloodlightActivity)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -36950,8 +36863,7 @@ impl<'a, C, A> FloodlightActivityGetCall<'a, C, A> where C: BorrowMut FloodlightActivityListCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, FloodlightActivitiesListResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -37265,8 +37177,7 @@ impl<'a, C, A> FloodlightActivityListCall<'a, C, A> where C: BorrowMut FloodlightActivityInsertCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, FloodlightActivity)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -37612,8 +37523,7 @@ impl<'a, C, A> FloodlightActivityInsertCall<'a, C, A> where C: BorrowMut FloodlightActivityDeleteCall<'a, C, A> where C: BorrowMut Result { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -37862,8 +37772,7 @@ impl<'a, C, A> FloodlightActivityDeleteCall<'a, C, A> where C: BorrowMut FloodlightActivityPatchCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, FloodlightActivity)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -38118,8 +38027,7 @@ impl<'a, C, A> FloodlightActivityPatchCall<'a, C, A> where C: BorrowMut FloodlightActivityGeneratetagCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, FloodlightActivitiesGenerateTagResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -38382,8 +38290,7 @@ impl<'a, C, A> FloodlightActivityGeneratetagCall<'a, C, A> where C: BorrowMut FloodlightActivityUpdateCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, FloodlightActivity)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -38643,8 +38550,7 @@ impl<'a, C, A> FloodlightActivityUpdateCall<'a, C, A> where C: BorrowMut RegionListCall<'a, C, A> where C: BorrowMut, A: oa /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, RegionsListResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -38892,8 +38798,7 @@ impl<'a, C, A> RegionListCall<'a, C, A> where C: BorrowMut, A: oa } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -39066,7 +38971,7 @@ impl<'a, C, A> CreativeGroupInsertCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, CreativeGroup)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -39146,8 +39051,7 @@ impl<'a, C, A> CreativeGroupInsertCall<'a, C, A> where C: BorrowMut CreativeGroupGetCall<'a, C, A> where C: BorrowMut, /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, CreativeGroup)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -39397,8 +39301,7 @@ impl<'a, C, A> CreativeGroupGetCall<'a, C, A> where C: BorrowMut, } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -39581,7 +39484,7 @@ impl<'a, C, A> CreativeGroupUpdateCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, CreativeGroup)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -39661,8 +39564,7 @@ impl<'a, C, A> CreativeGroupUpdateCall<'a, C, A> where C: BorrowMut CreativeGroupListCall<'a, C, A> where C: BorrowMut /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, CreativeGroupsListResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -39954,8 +39856,7 @@ impl<'a, C, A> CreativeGroupListCall<'a, C, A> where C: BorrowMut } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -40187,7 +40088,7 @@ impl<'a, C, A> CreativeGroupPatchCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, CreativeGroup)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -40268,8 +40169,7 @@ impl<'a, C, A> CreativeGroupPatchCall<'a, C, A> where C: BorrowMut TargetableRemarketingListListCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, TargetableRemarketingListsListResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -40559,8 +40459,7 @@ impl<'a, C, A> TargetableRemarketingListListCall<'a, C, A> where C: BorrowMut TargetableRemarketingListGetCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, TargetableRemarketingList)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -40849,8 +40748,7 @@ impl<'a, C, A> TargetableRemarketingListGetCall<'a, C, A> where C: BorrowMut SubaccountPatchCall<'a, C, A> where C: BorrowMut, /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Subaccount)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -41115,8 +41013,7 @@ impl<'a, C, A> SubaccountPatchCall<'a, C, A> where C: BorrowMut, } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -41312,7 +41209,7 @@ impl<'a, C, A> SubaccountInsertCall<'a, C, A> where C: BorrowMut, /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Subaccount)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -41392,8 +41289,7 @@ impl<'a, C, A> SubaccountInsertCall<'a, C, A> where C: BorrowMut, } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -41584,7 +41480,7 @@ impl<'a, C, A> SubaccountListCall<'a, C, A> where C: BorrowMut, A /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, SubaccountsListResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -41673,8 +41569,7 @@ impl<'a, C, A> SubaccountListCall<'a, C, A> where C: BorrowMut, A } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -41890,7 +41785,7 @@ impl<'a, C, A> SubaccountUpdateCall<'a, C, A> where C: BorrowMut, /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Subaccount)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -41970,8 +41865,7 @@ impl<'a, C, A> SubaccountUpdateCall<'a, C, A> where C: BorrowMut, } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -42151,7 +42045,7 @@ impl<'a, C, A> SubaccountGetCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Subaccount)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -42221,8 +42115,7 @@ impl<'a, C, A> SubaccountGetCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -42399,7 +42292,7 @@ impl<'a, C, A> MobileCarrierGetCall<'a, C, A> where C: BorrowMut, /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, MobileCarrier)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -42469,8 +42362,7 @@ impl<'a, C, A> MobileCarrierGetCall<'a, C, A> where C: BorrowMut, } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -42646,7 +42538,7 @@ impl<'a, C, A> MobileCarrierListCall<'a, C, A> where C: BorrowMut /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, MobileCarriersListResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -42715,8 +42607,7 @@ impl<'a, C, A> MobileCarrierListCall<'a, C, A> where C: BorrowMut } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -42883,7 +42774,7 @@ impl<'a, C, A> FloodlightConfigurationGetCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, FloodlightConfiguration)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -42953,8 +42844,7 @@ impl<'a, C, A> FloodlightConfigurationGetCall<'a, C, A> where C: BorrowMut FloodlightConfigurationUpdateCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, FloodlightConfiguration)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -43217,8 +43107,7 @@ impl<'a, C, A> FloodlightConfigurationUpdateCall<'a, C, A> where C: BorrowMut FloodlightConfigurationPatchCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, FloodlightConfiguration)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -43486,8 +43375,7 @@ impl<'a, C, A> FloodlightConfigurationPatchCall<'a, C, A> where C: BorrowMut FloodlightConfigurationListCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, FloodlightConfigurationsListResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -43752,8 +43640,7 @@ impl<'a, C, A> FloodlightConfigurationListCall<'a, C, A> where C: BorrowMut OperatingSystemListCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, OperatingSystemsListResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -43996,8 +43883,7 @@ impl<'a, C, A> OperatingSystemListCall<'a, C, A> where C: BorrowMut OperatingSystemGetCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, OperatingSystem)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -44234,8 +44120,7 @@ impl<'a, C, A> OperatingSystemGetCall<'a, C, A> where C: BorrowMut FileListCall<'a, C, A> where C: BorrowMut, A: oaut /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, FileList)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -44505,8 +44390,7 @@ impl<'a, C, A> FileListCall<'a, C, A> where C: BorrowMut, A: oaut } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -44713,7 +44597,7 @@ impl<'a, C, A> FileGetCall<'a, C, A> where C: BorrowMut, A: oauth /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, File)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -44799,8 +44683,7 @@ impl<'a, C, A> FileGetCall<'a, C, A> where C: BorrowMut, A: oauth } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -45006,7 +44889,7 @@ impl<'a, C, A> PlacementGroupListCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, PlacementGroupsListResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -45136,8 +45019,7 @@ impl<'a, C, A> PlacementGroupListCall<'a, C, A> where C: BorrowMut PlacementGroupUpdateCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, PlacementGroup)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -45503,8 +45385,7 @@ impl<'a, C, A> PlacementGroupUpdateCall<'a, C, A> where C: BorrowMut PlacementGroupInsertCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, PlacementGroup)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -45770,8 +45651,7 @@ impl<'a, C, A> PlacementGroupInsertCall<'a, C, A> where C: BorrowMut PlacementGroupGetCall<'a, C, A> where C: BorrowMut /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, PlacementGroup)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -46021,8 +45901,7 @@ impl<'a, C, A> PlacementGroupGetCall<'a, C, A> where C: BorrowMut } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -46206,7 +46085,7 @@ impl<'a, C, A> PlacementGroupPatchCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, PlacementGroup)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -46287,8 +46166,7 @@ impl<'a, C, A> PlacementGroupPatchCall<'a, C, A> where C: BorrowMut InventoryItemListCall<'a, C, A> where C: BorrowMut /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, InventoryItemsListResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -46594,8 +46472,7 @@ impl<'a, C, A> InventoryItemListCall<'a, C, A> where C: BorrowMut } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -46832,7 +46709,7 @@ impl<'a, C, A> InventoryItemGetCall<'a, C, A> where C: BorrowMut, /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, InventoryItem)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -46903,8 +46780,7 @@ impl<'a, C, A> InventoryItemGetCall<'a, C, A> where C: BorrowMut, } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -47091,7 +46967,7 @@ impl<'a, C, A> UserRolePermissionGetCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, UserRolePermission)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -47161,8 +47037,7 @@ impl<'a, C, A> UserRolePermissionGetCall<'a, C, A> where C: BorrowMut UserRolePermissionListCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, UserRolePermissionsListResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -47414,8 +47289,7 @@ impl<'a, C, A> UserRolePermissionListCall<'a, C, A> where C: BorrowMut AccountPermissionGroupListCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, AccountPermissionGroupsListResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -47658,8 +47532,7 @@ impl<'a, C, A> AccountPermissionGroupListCall<'a, C, A> where C: BorrowMut AccountPermissionGroupGetCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, AccountPermissionGroup)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -47896,8 +47769,7 @@ impl<'a, C, A> AccountPermissionGroupGetCall<'a, C, A> where C: BorrowMut ContentCategoryListCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, ContentCategoriesListResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -48174,8 +48046,7 @@ impl<'a, C, A> ContentCategoryListCall<'a, C, A> where C: BorrowMut ContentCategoryUpdateCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, ContentCategory)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -48471,8 +48342,7 @@ impl<'a, C, A> ContentCategoryUpdateCall<'a, C, A> where C: BorrowMut ContentCategoryInsertCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, ContentCategory)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -48738,8 +48608,7 @@ impl<'a, C, A> ContentCategoryInsertCall<'a, C, A> where C: BorrowMut ContentCategoryDeleteCall<'a, C, A> where C: BorrowMut Result { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -48988,8 +48857,7 @@ impl<'a, C, A> ContentCategoryDeleteCall<'a, C, A> where C: BorrowMut ContentCategoryGetCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, ContentCategory)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -49226,8 +49094,7 @@ impl<'a, C, A> ContentCategoryGetCall<'a, C, A> where C: BorrowMut ContentCategoryPatchCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, ContentCategory)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -49492,8 +49359,7 @@ impl<'a, C, A> ContentCategoryPatchCall<'a, C, A> where C: BorrowMut CreativeUpdateCall<'a, C, A> where C: BorrowMut, A /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Creative)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -49769,8 +49635,7 @@ impl<'a, C, A> CreativeUpdateCall<'a, C, A> where C: BorrowMut, A } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -49956,7 +49821,7 @@ impl<'a, C, A> CreativeInsertCall<'a, C, A> where C: BorrowMut, A /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Creative)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -50036,8 +49901,7 @@ impl<'a, C, A> CreativeInsertCall<'a, C, A> where C: BorrowMut, A } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -50217,7 +50081,7 @@ impl<'a, C, A> CreativeGetCall<'a, C, A> where C: BorrowMut, A: o /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Creative)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -50287,8 +50151,7 @@ impl<'a, C, A> CreativeGetCall<'a, C, A> where C: BorrowMut, A: o } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -50496,7 +50359,7 @@ impl<'a, C, A> CreativeListCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, CreativesListResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -50625,8 +50488,7 @@ impl<'a, C, A> CreativeListCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -50918,7 +50780,7 @@ impl<'a, C, A> CreativePatchCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Creative)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -50999,8 +50861,7 @@ impl<'a, C, A> CreativePatchCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -51190,7 +51051,7 @@ impl<'a, C, A> CampaignGetCall<'a, C, A> where C: BorrowMut, A: o /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Campaign)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -51260,8 +51121,7 @@ impl<'a, C, A> CampaignGetCall<'a, C, A> where C: BorrowMut, A: o } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -51446,7 +51306,7 @@ impl<'a, C, A> CampaignInsertCall<'a, C, A> where C: BorrowMut, A /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Campaign)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -51528,8 +51388,7 @@ impl<'a, C, A> CampaignInsertCall<'a, C, A> where C: BorrowMut, A } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -51736,7 +51595,7 @@ impl<'a, C, A> CampaignPatchCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Campaign)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -51817,8 +51676,7 @@ impl<'a, C, A> CampaignPatchCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -52014,7 +51872,7 @@ impl<'a, C, A> CampaignUpdateCall<'a, C, A> where C: BorrowMut, A /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Campaign)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -52094,8 +51952,7 @@ impl<'a, C, A> CampaignUpdateCall<'a, C, A> where C: BorrowMut, A } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -52300,7 +52157,7 @@ impl<'a, C, A> CampaignListCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, CampaignsListResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -52416,8 +52273,7 @@ impl<'a, C, A> CampaignListCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -52679,7 +52535,7 @@ impl<'a, C, A> EventTagDeleteCall<'a, C, A> where C: BorrowMut, A /// Perform the operation you have build so far. pub fn doit(mut self) -> Result { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -52748,8 +52604,7 @@ impl<'a, C, A> EventTagDeleteCall<'a, C, A> where C: BorrowMut, A } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Delete, &url) @@ -52935,7 +52790,7 @@ impl<'a, C, A> EventTagListCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, EventTagsListResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -53038,8 +52893,7 @@ impl<'a, C, A> EventTagListCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -53284,7 +53138,7 @@ impl<'a, C, A> EventTagInsertCall<'a, C, A> where C: BorrowMut, A /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, EventTag)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -53364,8 +53218,7 @@ impl<'a, C, A> EventTagInsertCall<'a, C, A> where C: BorrowMut, A } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -53552,7 +53405,7 @@ impl<'a, C, A> EventTagPatchCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, EventTag)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -53633,8 +53486,7 @@ impl<'a, C, A> EventTagPatchCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -53830,7 +53682,7 @@ impl<'a, C, A> EventTagUpdateCall<'a, C, A> where C: BorrowMut, A /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, EventTag)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -53910,8 +53762,7 @@ impl<'a, C, A> EventTagUpdateCall<'a, C, A> where C: BorrowMut, A } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -54091,7 +53942,7 @@ impl<'a, C, A> EventTagGetCall<'a, C, A> where C: BorrowMut, A: o /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, EventTag)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -54161,8 +54012,7 @@ impl<'a, C, A> EventTagGetCall<'a, C, A> where C: BorrowMut, A: o } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -54339,7 +54189,7 @@ impl<'a, C, A> RemarketingListGetCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, RemarketingList)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -54409,8 +54259,7 @@ impl<'a, C, A> RemarketingListGetCall<'a, C, A> where C: BorrowMut RemarketingListUpdateCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, RemarketingList)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -54673,8 +54522,7 @@ impl<'a, C, A> RemarketingListUpdateCall<'a, C, A> where C: BorrowMut RemarketingListListCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, RemarketingListsListResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -54959,8 +54807,7 @@ impl<'a, C, A> RemarketingListListCall<'a, C, A> where C: BorrowMut RemarketingListPatchCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, RemarketingList)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -55274,8 +55121,7 @@ impl<'a, C, A> RemarketingListPatchCall<'a, C, A> where C: BorrowMut RemarketingListInsertCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, RemarketingList)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -55551,8 +55397,7 @@ impl<'a, C, A> RemarketingListInsertCall<'a, C, A> where C: BorrowMut CityListCall<'a, C, A> where C: BorrowMut, A: oaut /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, CitiesListResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -55826,8 +55671,7 @@ impl<'a, C, A> CityListCall<'a, C, A> where C: BorrowMut, A: oaut } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -56031,7 +55875,7 @@ impl<'a, C, A> PlacementStrategyUpdateCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, PlacementStrategy)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -56111,8 +55955,7 @@ impl<'a, C, A> PlacementStrategyUpdateCall<'a, C, A> where C: BorrowMut PlacementStrategyGetCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, PlacementStrategy)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -56362,8 +56205,7 @@ impl<'a, C, A> PlacementStrategyGetCall<'a, C, A> where C: BorrowMut PlacementStrategyListCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, PlacementStrategiesListResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -56640,8 +56482,7 @@ impl<'a, C, A> PlacementStrategyListCall<'a, C, A> where C: BorrowMut PlacementStrategyDeleteCall<'a, C, A> where C: BorrowMut Result { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -56920,8 +56761,7 @@ impl<'a, C, A> PlacementStrategyDeleteCall<'a, C, A> where C: BorrowMut PlacementStrategyInsertCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, PlacementStrategy)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -57174,8 +57014,7 @@ impl<'a, C, A> PlacementStrategyInsertCall<'a, C, A> where C: BorrowMut PlacementStrategyPatchCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, PlacementStrategy)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -57443,8 +57282,7 @@ impl<'a, C, A> PlacementStrategyPatchCall<'a, C, A> where C: BorrowMut ProjectListCall<'a, C, A> where C: BorrowMut, A: o /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, ProjectsListResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -57741,8 +57579,7 @@ impl<'a, C, A> ProjectListCall<'a, C, A> where C: BorrowMut, A: o } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -57960,7 +57797,7 @@ impl<'a, C, A> ProjectGetCall<'a, C, A> where C: BorrowMut, A: oa /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Project)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -58030,8 +57867,7 @@ impl<'a, C, A> ProjectGetCall<'a, C, A> where C: BorrowMut, A: oa } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -58214,7 +58050,7 @@ impl<'a, C, A> DirectorySiteInsertCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, DirectorySite)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -58294,8 +58130,7 @@ impl<'a, C, A> DirectorySiteInsertCall<'a, C, A> where C: BorrowMut DirectorySiteListCall<'a, C, A> where C: BorrowMut /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, DirectorySitesListResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -58610,8 +58445,7 @@ impl<'a, C, A> DirectorySiteListCall<'a, C, A> where C: BorrowMut } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -58870,7 +58704,7 @@ impl<'a, C, A> DirectorySiteGetCall<'a, C, A> where C: BorrowMut, /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, DirectorySite)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -58940,8 +58774,7 @@ impl<'a, C, A> DirectorySiteGetCall<'a, C, A> where C: BorrowMut, } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -59124,7 +58957,7 @@ impl<'a, C, A> SizeInsertCall<'a, C, A> where C: BorrowMut, A: oa /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Size)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -59204,8 +59037,7 @@ impl<'a, C, A> SizeInsertCall<'a, C, A> where C: BorrowMut, A: oa } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -59392,7 +59224,7 @@ impl<'a, C, A> SizeListCall<'a, C, A> where C: BorrowMut, A: oaut /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, SizesListResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -59475,8 +59307,7 @@ impl<'a, C, A> SizeListCall<'a, C, A> where C: BorrowMut, A: oaut } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -59672,7 +59503,7 @@ impl<'a, C, A> SizeGetCall<'a, C, A> where C: BorrowMut, A: oauth /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Size)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -59742,8 +59573,7 @@ impl<'a, C, A> SizeGetCall<'a, C, A> where C: BorrowMut, A: oauth } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -59920,7 +59750,7 @@ impl<'a, C, A> AccountActiveAdSummaryGetCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, AccountActiveAdSummary)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -59990,8 +59820,7 @@ impl<'a, C, A> AccountActiveAdSummaryGetCall<'a, C, A> where C: BorrowMut AccountUserProfileUpdateCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, AccountUserProfile)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -60254,8 +60083,7 @@ impl<'a, C, A> AccountUserProfileUpdateCall<'a, C, A> where C: BorrowMut AccountUserProfileListCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, AccountUserProfilesListResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -60550,8 +60378,7 @@ impl<'a, C, A> AccountUserProfileListCall<'a, C, A> where C: BorrowMut AccountUserProfileInsertCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, AccountUserProfile)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -60868,8 +60695,7 @@ impl<'a, C, A> AccountUserProfileInsertCall<'a, C, A> where C: BorrowMut AccountUserProfilePatchCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, AccountUserProfile)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -61137,8 +60963,7 @@ impl<'a, C, A> AccountUserProfilePatchCall<'a, C, A> where C: BorrowMut AccountUserProfileGetCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, AccountUserProfile)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -61398,8 +61223,7 @@ impl<'a, C, A> AccountUserProfileGetCall<'a, C, A> where C: BorrowMut CountryListCall<'a, C, A> where C: BorrowMut, A: o /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, CountriesListResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -61644,8 +61468,7 @@ impl<'a, C, A> CountryListCall<'a, C, A> where C: BorrowMut, A: o } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -61812,7 +61635,7 @@ impl<'a, C, A> CountryGetCall<'a, C, A> where C: BorrowMut, A: oa /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Country)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -61882,8 +61705,7 @@ impl<'a, C, A> CountryGetCall<'a, C, A> where C: BorrowMut, A: oa } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -62061,7 +61883,7 @@ impl<'a, C, A> OrderDocumentGetCall<'a, C, A> where C: BorrowMut, /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, OrderDocument)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -62132,8 +61954,7 @@ impl<'a, C, A> OrderDocumentGetCall<'a, C, A> where C: BorrowMut, } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -62338,7 +62159,7 @@ impl<'a, C, A> OrderDocumentListCall<'a, C, A> where C: BorrowMut /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, OrderDocumentsListResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -62441,8 +62262,7 @@ impl<'a, C, A> OrderDocumentListCall<'a, C, A> where C: BorrowMut } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -62685,7 +62505,7 @@ impl<'a, C, A> PostalCodeGetCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, PostalCode)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -62755,8 +62575,7 @@ impl<'a, C, A> PostalCodeGetCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -62932,7 +62751,7 @@ impl<'a, C, A> PostalCodeListCall<'a, C, A> where C: BorrowMut, A /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, PostalCodesListResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -63001,8 +62820,7 @@ impl<'a, C, A> PostalCodeListCall<'a, C, A> where C: BorrowMut, A } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -63168,7 +62986,7 @@ impl<'a, C, A> BrowserListCall<'a, C, A> where C: BorrowMut, A: o /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, BrowsersListResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -63237,8 +63055,7 @@ impl<'a, C, A> BrowserListCall<'a, C, A> where C: BorrowMut, A: o } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -63405,7 +63222,7 @@ impl<'a, C, A> AccountGetCall<'a, C, A> where C: BorrowMut, A: oa /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Account)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -63475,8 +63292,7 @@ impl<'a, C, A> AccountGetCall<'a, C, A> where C: BorrowMut, A: oa } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -63666,7 +63482,7 @@ impl<'a, C, A> AccountListCall<'a, C, A> where C: BorrowMut, A: o /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, AccountsListResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -63758,8 +63574,7 @@ impl<'a, C, A> AccountListCall<'a, C, A> where C: BorrowMut, A: o } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -63982,7 +63797,7 @@ impl<'a, C, A> AccountUpdateCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Account)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -64062,8 +63877,7 @@ impl<'a, C, A> AccountUpdateCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -64250,7 +64064,7 @@ impl<'a, C, A> AccountPatchCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Account)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -64331,8 +64145,7 @@ impl<'a, C, A> AccountPatchCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -64529,7 +64342,7 @@ impl<'a, C, A> PlacementPatchCall<'a, C, A> where C: BorrowMut, A /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Placement)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -64610,8 +64423,7 @@ impl<'a, C, A> PlacementPatchCall<'a, C, A> where C: BorrowMut, A } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -64836,7 +64648,7 @@ impl<'a, C, A> PlacementListCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, PlacementsListResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -64981,8 +64793,7 @@ impl<'a, C, A> PlacementListCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -65154,7 +64965,7 @@ impl<'a, C, A> PlacementListCall<'a, C, A> where C: BorrowMut, A: self._content_category_ids.push(new_value.to_string()); self } - /// Select only placements that are associated with these compatibilities. WEB and WEB_INTERSTITIAL refer to rendering either on desktop or on mobile devices for regular or interstitial ads respectively. APP and APP_INTERSTITIAL are for rendering in mobile apps.IN_STREAM_VIDEO refers to rendering in in-stream video ads developed with the VAST standard. + /// Select only placements that are associated with these compatibilities. WEB and WEB_INTERSTITIAL refer to rendering either on desktop or on mobile devices for regular or interstitial ads respectively. APP and APP_INTERSTITIAL are for rendering in mobile apps. IN_STREAM_VIDEO refers to rendering in in-stream video ads developed with the VAST standard. /// /// Append the given value to the *compatibilities* query property. /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. @@ -65292,7 +65103,7 @@ impl<'a, C, A> PlacementInsertCall<'a, C, A> where C: BorrowMut, /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Placement)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -65372,8 +65183,7 @@ impl<'a, C, A> PlacementInsertCall<'a, C, A> where C: BorrowMut, } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -65559,7 +65369,7 @@ impl<'a, C, A> PlacementUpdateCall<'a, C, A> where C: BorrowMut, /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Placement)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -65639,8 +65449,7 @@ impl<'a, C, A> PlacementUpdateCall<'a, C, A> where C: BorrowMut, } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -65825,7 +65634,7 @@ impl<'a, C, A> PlacementGeneratetagCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, PlacementsGenerateTagsResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -65907,8 +65716,7 @@ impl<'a, C, A> PlacementGeneratetagCall<'a, C, A> where C: BorrowMut PlacementGetCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Placement)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -66168,8 +65976,7 @@ impl<'a, C, A> PlacementGetCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) diff --git a/gen/dfareporting2d2-cli/Cargo.toml b/gen/dfareporting2d2-cli/Cargo.toml index 5d8103bccc..c76c40f78d 100644 --- a/gen/dfareporting2d2-cli/Cargo.toml +++ b/gen/dfareporting2d2-cli/Cargo.toml @@ -4,7 +4,7 @@ [package] name = "google-dfareporting2d2-cli" -version = "0.3.3+20160128" +version = "0.3.4+20160323" authors = ["Sebastian Thiel "] description = "A complete library to interact with dfareporting (protocol v2.2)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/dfareporting2d2-cli" @@ -17,18 +17,18 @@ keywords = ["dfareporting", "google", "cli"] name = "dfareporting2d2" [dependencies] -hyper = "0.7" -mime = "0.1.0" -serde = ">= 0.7.0" -serde_json = ">= 0.7.0" -yup-oauth2 = ">= 0.5.4" +hyper = "0.8" +mime = "0.2.0" +serde = "0.6.0" +serde_json = "0.6.0" +yup-oauth2 = ">= 0.5.6" strsim = "0.4" yup-hyper-mock = "1.0" clap = "2.0" [build-dependencies] -syntex = { version = ">= 0.23" } -serde_codegen = { version = ">= 0.6" } +syntex = { version = "= 0.28" } +serde_codegen = { version = "= 0.6.13" } [dependencies.google-dfareporting2d2] diff --git a/gen/dfareporting2d2-cli/README.md b/gen/dfareporting2d2-cli/README.md index bcc4903277..6d21332230 100644 --- a/gen/dfareporting2d2-cli/README.md +++ b/gen/dfareporting2d2-cli/README.md @@ -17,14 +17,14 @@ Everything else about the *dfareporting* API can be found at the You can download the pre-compiled 64bit binaries for the following platforms: -* ![icon](http://megaicons.net/static/img/icons_sizes/6/140/16/ubuntu-icon.png) [ubuntu](http://dl.byronimo.de/google.rs/cli/0.3.3/ubuntu/dfareporting2d2.tar.gz) -* ![icon](http://hydra-media.cursecdn.com/wow.gamepedia.com/a/a2/Apple-icon-16x16.png?version=25ddd67ac3dd3b634478e3978b76cb74) [osx](http://dl.byronimo.de/google.rs/cli/0.3.3/osx/dfareporting2d2.tar.gz) +* ![icon](http://megaicons.net/static/img/icons_sizes/6/140/16/ubuntu-icon.png) [ubuntu](http://dl.byronimo.de/google.rs/cli/0.3.4/ubuntu/dfareporting2d2.tar.gz) +* ![icon](http://hydra-media.cursecdn.com/wow.gamepedia.com/a/a2/Apple-icon-16x16.png?version=25ddd67ac3dd3b634478e3978b76cb74) [osx](http://dl.byronimo.de/google.rs/cli/0.3.4/osx/dfareporting2d2.tar.gz) Find the source code [on github](https://github.com/Byron/google-apis-rs/tree/master/gen/dfareporting2d2-cli). # Usage -This documentation was generated from the *dfareporting* API at revision *20160128*. The CLI is at version *0.3.3*. +This documentation was generated from the *dfareporting* API at revision *20160323*. The CLI is at version *0.3.4*. ```bash dfareporting2d2 [options] diff --git a/gen/dfareporting2d2-cli/mkdocs.yml b/gen/dfareporting2d2-cli/mkdocs.yml index c5d547909a..47457a79e1 100644 --- a/gen/dfareporting2d2-cli/mkdocs.yml +++ b/gen/dfareporting2d2-cli/mkdocs.yml @@ -1,4 +1,4 @@ -site_name: dfareporting v0.3.3+20160128 +site_name: dfareporting v0.3.4+20160323 site_url: http://byron.github.io/google-apis-rs/google-dfareporting2d2-cli site_description: Write integrating applications with bcore diff --git a/gen/dfareporting2d2-cli/src/cmn.rs b/gen/dfareporting2d2-cli/src/cmn.rs index 188159ee80..ae86fdef65 100644 --- a/gen/dfareporting2d2-cli/src/cmn.rs +++ b/gen/dfareporting2d2-cli/src/cmn.rs @@ -414,7 +414,7 @@ impl TokenStorage for JsonTokenStorage { Err(err) => match err.kind() { io::ErrorKind::NotFound => Ok(()), - _ => Err(json::Error::Io(err)) + _ => Err(json::Error::IoError(err)) }, Ok(_) => Ok(()), } @@ -427,7 +427,7 @@ impl TokenStorage for JsonTokenStorage { Err(serde_err) => Err(serde_err), } }, - Err(io_err) => Err(json::Error::Io(io_err)) + Err(io_err) => Err(json::Error::IoError(io_err)) } } } @@ -444,7 +444,7 @@ impl TokenStorage for JsonTokenStorage { Err(io_err) => { match io_err.kind() { io::ErrorKind::NotFound => Ok(None), - _ => Err(json::Error::Io(io_err)) + _ => Err(json::Error::IoError(io_err)) } } } @@ -683,7 +683,7 @@ pub fn application_secret_from_directory(dir: &str, = json::from_str(json_console_secret).unwrap(); match json::to_writer_pretty(&mut f, &console_secret) { Err(serde_err) => match serde_err { - json::Error::Io(err) => err, + json::Error::IoError(err) => err, _ => panic!("Unexpected serde error: {:#?}", serde_err) }, Ok(_) => continue, @@ -696,7 +696,7 @@ pub fn application_secret_from_directory(dir: &str, }, Ok(f) => { match json::de::from_reader::<_, ConsoleApplicationSecret>(f) { - Err(json::Error::Io(err)) => + Err(json::Error::IoError(err)) => return secret_io_error(err), Err(json_err) => return Err(CLIError::Configuration( diff --git a/gen/dfareporting2d2-cli/src/main.rs b/gen/dfareporting2d2-cli/src/main.rs index d3aa9968af..bb571e107a 100644 --- a/gen/dfareporting2d2-cli/src/main.rs +++ b/gen/dfareporting2d2-cli/src/main.rs @@ -22334,8 +22334,8 @@ fn main() { let mut app = App::new("dfareporting2d2") .author("Sebastian Thiel ") - .version("0.3.3+20160128") - .about("Manage your DoubleClick Campaign Manager ad campaigns and reports.") + .version("0.3.4+20160323") + .about("Manages your DoubleClick Campaign Manager ad campaigns and reports.") .after_help("All documentation details can be found at http://byron.github.io/google-apis-rs/google_dfareporting2d2_cli") .arg(Arg::with_name("url") .long("scope") diff --git a/gen/dfareporting2d2/Cargo.toml b/gen/dfareporting2d2/Cargo.toml index 74fd9cbfb3..31b9426211 100644 --- a/gen/dfareporting2d2/Cargo.toml +++ b/gen/dfareporting2d2/Cargo.toml @@ -4,7 +4,7 @@ [package] name = "google-dfareporting2d2" -version = "0.1.12+20160128" +version = "0.1.13+20160323" authors = ["Sebastian Thiel "] description = "A complete library to interact with dfareporting (protocol v2.2)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/dfareporting2d2" @@ -16,14 +16,14 @@ build = "src/build.rs" [dependencies] -hyper = "0.7" -mime = "0.1.0" -serde = ">= 0.7.0" -serde_json = ">= 0.7.0" -yup-oauth2 = ">= 0.5.4" +hyper = "0.8" +mime = "0.2.0" +serde = "0.6.0" +serde_json = "0.6.0" +yup-oauth2 = ">= 0.5.6" url = ">= 0.5" [build-dependencies] -syntex = { version = ">= 0.23" } -serde_codegen = { version = ">= 0.6" } +syntex = { version = "= 0.28" } +serde_codegen = { version = "= 0.6.13" } diff --git a/gen/dfareporting2d2/README.md b/gen/dfareporting2d2/README.md index 21e1670772..bf4e9f9d65 100644 --- a/gen/dfareporting2d2/README.md +++ b/gen/dfareporting2d2/README.md @@ -5,7 +5,7 @@ DO NOT EDIT ! --> The `google-dfareporting2d2` library allows access to all features of the *Google dfareporting* service. -This documentation was generated from *dfareporting* crate version *0.1.12+20160128*, where *20160128* is the exact revision of the *dfareporting:v2.2* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.12*. +This documentation was generated from *dfareporting* crate version *0.1.13+20160323*, where *20160323* is the exact revision of the *dfareporting:v2.2* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.13*. Everything else about the *dfareporting* *v2d2* API can be found at the [official documentation site](https://developers.google.com/doubleclick-advertisers/reporting/). diff --git a/gen/dfareporting2d2/src/cmn.rs b/gen/dfareporting2d2/src/cmn.rs index 87b91a8986..c69621da55 100644 --- a/gen/dfareporting2d2/src/cmn.rs +++ b/gen/dfareporting2d2/src/cmn.rs @@ -12,7 +12,7 @@ use mime::{Mime, TopLevel, SubLevel, Attr, Value}; use oauth2::{TokenType, Retry, self}; use hyper; use hyper::header::{ContentType, ContentLength, Headers, UserAgent, Authorization, Header, - HeaderFormat}; + HeaderFormat, Bearer}; use hyper::http::h1::LINE_ENDING; use hyper::method::Method; use hyper::status::StatusCode; @@ -634,7 +634,7 @@ pub struct ResumableUploadHelper<'a, A: 'a> { pub start_at: Option, pub auth: &'a mut A, pub user_agent: &'a str, - pub auth_header: Authorization, + pub auth_header: Authorization, pub url: &'a str, pub reader: &'a mut ReadSeek, pub media_type: Mime, diff --git a/gen/dfareporting2d2/src/lib.rs b/gen/dfareporting2d2/src/lib.rs index 9d2af5e998..5480703fab 100644 --- a/gen/dfareporting2d2/src/lib.rs +++ b/gen/dfareporting2d2/src/lib.rs @@ -2,7 +2,7 @@ // This file was generated automatically from 'src/mako/api/lib.rs.mako' // DO NOT EDIT ! -//! This documentation was generated from *dfareporting* crate version *0.1.12+20160128*, where *20160128* is the exact revision of the *dfareporting:v2.2* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.12*. +//! This documentation was generated from *dfareporting* crate version *0.1.13+20160323*, where *20160323* is the exact revision of the *dfareporting:v2.2* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.13*. //! //! Everything else about the *dfareporting* *v2d2* API can be found at the //! [official documentation site](https://developers.google.com/doubleclick-advertisers/reporting/). diff --git a/gen/dfareporting2d2/src/lib.rs.in b/gen/dfareporting2d2/src/lib.rs.in index 2a1e76ec03..de865a186c 100644 --- a/gen/dfareporting2d2/src/lib.rs.in +++ b/gen/dfareporting2d2/src/lib.rs.in @@ -136,7 +136,7 @@ impl<'a, C, A> Dfareporting Dfareporting { client: RefCell::new(client), auth: RefCell::new(authenticator), - _user_agent: "google-api-rust-client/0.1.12".to_string(), + _user_agent: "google-api-rust-client/0.1.13".to_string(), } } @@ -307,7 +307,7 @@ impl<'a, C, A> Dfareporting } /// Set the user-agent header field to use in all requests to the server. - /// It defaults to `google-api-rust-client/0.1.12`. + /// It defaults to `google-api-rust-client/0.1.13`. /// /// Returns the previously set user-agent. pub fn user_agent(&mut self, agent_name: String) -> String { @@ -1772,7 +1772,7 @@ pub struct Placement { /// Dimension value for the ID of the site. This is a read-only, auto-generated field. #[serde(rename="siteIdDimensionValue")] pub site_id_dimension_value: Option, - /// Placement compatibility. WEB and WEB_INTERSTITIAL refer to rendering either on desktop or on mobile devices for regular or interstitial ads, respectively. APP and APP_INTERSTITIAL are for rendering in mobile apps.IN_STREAM_VIDEO refers to rendering in in-stream video ads developed with the VAST standard. This field is required on insertion. + /// Placement compatibility. WEB and WEB_INTERSTITIAL refer to rendering either on desktop or on mobile devices for regular or interstitial ads, respectively. APP and APP_INTERSTITIAL are for rendering in mobile apps. IN_STREAM_VIDEO refers to rendering in in-stream video ads developed with the VAST standard. This field is required on insertion. pub compatibility: Option, /// ID of the placement strategy assigned to this placement. #[serde(rename="placementStrategyId")] @@ -12917,7 +12917,7 @@ impl<'a, C, A> UserRolePermissionGroupGetCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, UserRolePermissionGroup)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -12987,8 +12987,7 @@ impl<'a, C, A> UserRolePermissionGroupGetCall<'a, C, A> where C: BorrowMut UserRolePermissionGroupListCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, UserRolePermissionGroupsListResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -13233,8 +13232,7 @@ impl<'a, C, A> UserRolePermissionGroupListCall<'a, C, A> where C: BorrowMut PlatformTypeGetCall<'a, C, A> where C: BorrowMut, /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, PlatformType)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -13471,8 +13469,7 @@ impl<'a, C, A> PlatformTypeGetCall<'a, C, A> where C: BorrowMut, } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -13648,7 +13645,7 @@ impl<'a, C, A> PlatformTypeListCall<'a, C, A> where C: BorrowMut, /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, PlatformTypesListResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -13717,8 +13714,7 @@ impl<'a, C, A> PlatformTypeListCall<'a, C, A> where C: BorrowMut, } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -13893,7 +13889,7 @@ impl<'a, C, A> CreativeFieldValuePatchCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, CreativeFieldValue)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -13975,8 +13971,7 @@ impl<'a, C, A> CreativeFieldValuePatchCall<'a, C, A> where C: BorrowMut CreativeFieldValueGetCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, CreativeFieldValue)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -14248,8 +14243,7 @@ impl<'a, C, A> CreativeFieldValueGetCall<'a, C, A> where C: BorrowMut CreativeFieldValueDeleteCall<'a, C, A> where C: BorrowMut Result { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -14507,8 +14501,7 @@ impl<'a, C, A> CreativeFieldValueDeleteCall<'a, C, A> where C: BorrowMut CreativeFieldValueInsertCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, CreativeFieldValue)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -14773,8 +14766,7 @@ impl<'a, C, A> CreativeFieldValueInsertCall<'a, C, A> where C: BorrowMut CreativeFieldValueUpdateCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, CreativeFieldValue)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -15052,8 +15044,7 @@ impl<'a, C, A> CreativeFieldValueUpdateCall<'a, C, A> where C: BorrowMut CreativeFieldValueListCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, CreativeFieldValuesListResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -15345,8 +15336,7 @@ impl<'a, C, A> CreativeFieldValueListCall<'a, C, A> where C: BorrowMut CreativeFieldUpdateCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, CreativeField)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -15652,8 +15642,7 @@ impl<'a, C, A> CreativeFieldUpdateCall<'a, C, A> where C: BorrowMut CreativeFieldListCall<'a, C, A> where C: BorrowMut /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, CreativeFieldsListResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -15940,8 +15929,7 @@ impl<'a, C, A> CreativeFieldListCall<'a, C, A> where C: BorrowMut } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -16159,7 +16147,7 @@ impl<'a, C, A> CreativeFieldDeleteCall<'a, C, A> where C: BorrowMut Result { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -16228,8 +16216,7 @@ impl<'a, C, A> CreativeFieldDeleteCall<'a, C, A> where C: BorrowMut CreativeFieldGetCall<'a, C, A> where C: BorrowMut, /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, CreativeField)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -16466,8 +16453,7 @@ impl<'a, C, A> CreativeFieldGetCall<'a, C, A> where C: BorrowMut, } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -16650,7 +16636,7 @@ impl<'a, C, A> CreativeFieldInsertCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, CreativeField)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -16730,8 +16716,7 @@ impl<'a, C, A> CreativeFieldInsertCall<'a, C, A> where C: BorrowMut CreativeFieldPatchCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, CreativeField)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -16999,8 +16984,7 @@ impl<'a, C, A> CreativeFieldPatchCall<'a, C, A> where C: BorrowMut UserRoleInsertCall<'a, C, A> where C: BorrowMut, A /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, UserRole)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -17276,8 +17260,7 @@ impl<'a, C, A> UserRoleInsertCall<'a, C, A> where C: BorrowMut, A } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -17457,7 +17440,7 @@ impl<'a, C, A> UserRoleGetCall<'a, C, A> where C: BorrowMut, A: o /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, UserRole)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -17527,8 +17510,7 @@ impl<'a, C, A> UserRoleGetCall<'a, C, A> where C: BorrowMut, A: o } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -17711,7 +17693,7 @@ impl<'a, C, A> UserRoleUpdateCall<'a, C, A> where C: BorrowMut, A /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, UserRole)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -17791,8 +17773,7 @@ impl<'a, C, A> UserRoleUpdateCall<'a, C, A> where C: BorrowMut, A } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -17972,7 +17953,7 @@ impl<'a, C, A> UserRoleDeleteCall<'a, C, A> where C: BorrowMut, A /// Perform the operation you have build so far. pub fn doit(mut self) -> Result { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -18041,8 +18022,7 @@ impl<'a, C, A> UserRoleDeleteCall<'a, C, A> where C: BorrowMut, A } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Delete, &url) @@ -18216,7 +18196,7 @@ impl<'a, C, A> UserRolePatchCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, UserRole)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -18297,8 +18277,7 @@ impl<'a, C, A> UserRolePatchCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -18503,7 +18482,7 @@ impl<'a, C, A> UserRoleListCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, UserRolesListResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -18598,8 +18577,7 @@ impl<'a, C, A> UserRoleListCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -18823,7 +18801,7 @@ impl<'a, C, A> OperatingSystemVersionGetCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, OperatingSystemVersion)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -18893,8 +18871,7 @@ impl<'a, C, A> OperatingSystemVersionGetCall<'a, C, A> where C: BorrowMut OperatingSystemVersionListCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, OperatingSystemVersionsListResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -19139,8 +19116,7 @@ impl<'a, C, A> OperatingSystemVersionListCall<'a, C, A> where C: BorrowMut LandingPageGetCall<'a, C, A> where C: BorrowMut, A /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, LandingPage)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -19379,8 +19355,7 @@ impl<'a, C, A> LandingPageGetCall<'a, C, A> where C: BorrowMut, A } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -19574,7 +19549,7 @@ impl<'a, C, A> LandingPageUpdateCall<'a, C, A> where C: BorrowMut /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, LandingPage)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -19655,8 +19630,7 @@ impl<'a, C, A> LandingPageUpdateCall<'a, C, A> where C: BorrowMut } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -19846,7 +19820,7 @@ impl<'a, C, A> LandingPageListCall<'a, C, A> where C: BorrowMut, /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, LandingPagesListResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -19916,8 +19890,7 @@ impl<'a, C, A> LandingPageListCall<'a, C, A> where C: BorrowMut, } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -20101,7 +20074,7 @@ impl<'a, C, A> LandingPageInsertCall<'a, C, A> where C: BorrowMut /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, LandingPage)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -20182,8 +20155,7 @@ impl<'a, C, A> LandingPageInsertCall<'a, C, A> where C: BorrowMut } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -20381,7 +20353,7 @@ impl<'a, C, A> LandingPagePatchCall<'a, C, A> where C: BorrowMut, /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, LandingPage)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -20463,8 +20435,7 @@ impl<'a, C, A> LandingPagePatchCall<'a, C, A> where C: BorrowMut, } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -20665,7 +20636,7 @@ impl<'a, C, A> LandingPageDeleteCall<'a, C, A> where C: BorrowMut /// Perform the operation you have build so far. pub fn doit(mut self) -> Result { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -20735,8 +20706,7 @@ impl<'a, C, A> LandingPageDeleteCall<'a, C, A> where C: BorrowMut } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Delete, &url) @@ -20922,7 +20892,7 @@ impl<'a, C, A> CreativeAssetInsertCall<'a, C, A> where C: BorrowMut(mut self, mut reader: RS, reader_mime_type: mime::Mime, protocol: &'static str) -> Result<(hyper::client::Response, CreativeAssetMetadata)> where RS: ReadSeek { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -21014,8 +20984,7 @@ impl<'a, C, A> CreativeAssetInsertCall<'a, C, A> where C: BorrowMut CampaignCreativeAssociationInsertCall<'a, C, A> where C: BorrowMu /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, CampaignCreativeAssociation)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -21394,8 +21363,7 @@ impl<'a, C, A> CampaignCreativeAssociationInsertCall<'a, C, A> where C: BorrowMu } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -21591,7 +21559,7 @@ impl<'a, C, A> CampaignCreativeAssociationListCall<'a, C, A> where C: BorrowMut< /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, CampaignCreativeAssociationsListResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -21670,8 +21638,7 @@ impl<'a, C, A> CampaignCreativeAssociationListCall<'a, C, A> where C: BorrowMut< } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -21888,7 +21855,7 @@ impl<'a, C, A> ChangeLogListCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, ChangeLogsListResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -21993,8 +21960,7 @@ impl<'a, C, A> ChangeLogListCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -22234,7 +22200,7 @@ impl<'a, C, A> ChangeLogGetCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, ChangeLog)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -22304,8 +22270,7 @@ impl<'a, C, A> ChangeLogGetCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -22482,7 +22447,7 @@ impl<'a, C, A> RemarketingListShareGetCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, RemarketingListShare)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -22552,8 +22517,7 @@ impl<'a, C, A> RemarketingListShareGetCall<'a, C, A> where C: BorrowMut RemarketingListSharePatchCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, RemarketingListShare)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -22818,8 +22782,7 @@ impl<'a, C, A> RemarketingListSharePatchCall<'a, C, A> where C: BorrowMut RemarketingListShareUpdateCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, RemarketingListShare)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -23095,8 +23058,7 @@ impl<'a, C, A> RemarketingListShareUpdateCall<'a, C, A> where C: BorrowMut ReportRunCall<'a, C, A> where C: BorrowMut, A: oau /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, File)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -23351,8 +23313,7 @@ impl<'a, C, A> ReportRunCall<'a, C, A> where C: BorrowMut, A: oau } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Post, &url) @@ -23543,7 +23504,7 @@ impl<'a, C, A> ReportPatchCall<'a, C, A> where C: BorrowMut, A: o /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Report)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -23624,8 +23585,7 @@ impl<'a, C, A> ReportPatchCall<'a, C, A> where C: BorrowMut, A: o } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -23823,7 +23783,7 @@ impl<'a, C, A> ReportFileListCall<'a, C, A> where C: BorrowMut, A /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, FileList)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -23905,8 +23865,7 @@ impl<'a, C, A> ReportFileListCall<'a, C, A> where C: BorrowMut, A } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -24117,7 +24076,7 @@ impl<'a, C, A> ReportInsertCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Report)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -24197,8 +24156,7 @@ impl<'a, C, A> ReportInsertCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -24385,7 +24343,7 @@ impl<'a, C, A> ReportUpdateCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Report)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -24466,8 +24424,7 @@ impl<'a, C, A> ReportUpdateCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -24663,7 +24620,7 @@ impl<'a, C, A> ReportCompatibleFieldQueryCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, CompatibleFields)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -24743,8 +24700,7 @@ impl<'a, C, A> ReportCompatibleFieldQueryCall<'a, C, A> where C: BorrowMut ReportGetCall<'a, C, A> where C: BorrowMut, A: oau /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Report)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -24994,8 +24950,7 @@ impl<'a, C, A> ReportGetCall<'a, C, A> where C: BorrowMut, A: oau } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -25178,7 +25133,7 @@ impl<'a, C, A> ReportFileGetCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, File)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -25265,8 +25220,7 @@ impl<'a, C, A> ReportFileGetCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -25453,7 +25407,7 @@ impl<'a, C, A> ReportDeleteCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -25522,8 +25476,7 @@ impl<'a, C, A> ReportDeleteCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Delete, &url) @@ -25699,7 +25652,7 @@ impl<'a, C, A> ReportListCall<'a, C, A> where C: BorrowMut, A: oa /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, ReportList)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -25783,8 +25736,7 @@ impl<'a, C, A> ReportListCall<'a, C, A> where C: BorrowMut, A: oa } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -25992,7 +25944,7 @@ impl<'a, C, A> AdvertiserInsertCall<'a, C, A> where C: BorrowMut, /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Advertiser)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -26072,8 +26024,7 @@ impl<'a, C, A> AdvertiserInsertCall<'a, C, A> where C: BorrowMut, } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -26260,7 +26211,7 @@ impl<'a, C, A> AdvertiserPatchCall<'a, C, A> where C: BorrowMut, /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Advertiser)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -26341,8 +26292,7 @@ impl<'a, C, A> AdvertiserPatchCall<'a, C, A> where C: BorrowMut, } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -26555,7 +26505,7 @@ impl<'a, C, A> AdvertiserListCall<'a, C, A> where C: BorrowMut, A /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, AdvertisersListResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -26666,8 +26616,7 @@ impl<'a, C, A> AdvertiserListCall<'a, C, A> where C: BorrowMut, A } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -26927,7 +26876,7 @@ impl<'a, C, A> AdvertiserUpdateCall<'a, C, A> where C: BorrowMut, /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Advertiser)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -27007,8 +26956,7 @@ impl<'a, C, A> AdvertiserUpdateCall<'a, C, A> where C: BorrowMut, } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -27188,7 +27136,7 @@ impl<'a, C, A> AdvertiserGetCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Advertiser)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -27258,8 +27206,7 @@ impl<'a, C, A> AdvertiserGetCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -27446,7 +27393,7 @@ impl<'a, C, A> DimensionValueQueryCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, DimensionValueList)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -27532,8 +27479,7 @@ impl<'a, C, A> DimensionValueQueryCall<'a, C, A> where C: BorrowMut FloodlightActivityGroupDeleteCall<'a, C, A> where C: BorrowMut Result { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -27796,8 +27742,7 @@ impl<'a, C, A> FloodlightActivityGroupDeleteCall<'a, C, A> where C: BorrowMut FloodlightActivityGroupGetCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, FloodlightActivityGroup)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -28034,8 +27979,7 @@ impl<'a, C, A> FloodlightActivityGroupGetCall<'a, C, A> where C: BorrowMut FloodlightActivityGroupPatchCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, FloodlightActivityGroup)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -28300,8 +28244,7 @@ impl<'a, C, A> FloodlightActivityGroupPatchCall<'a, C, A> where C: BorrowMut FloodlightActivityGroupListCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, FloodlightActivityGroupsListResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -28606,8 +28549,7 @@ impl<'a, C, A> FloodlightActivityGroupListCall<'a, C, A> where C: BorrowMut FloodlightActivityGroupInsertCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, FloodlightActivityGroup)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -28924,8 +28866,7 @@ impl<'a, C, A> FloodlightActivityGroupInsertCall<'a, C, A> where C: BorrowMut FloodlightActivityGroupUpdateCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, FloodlightActivityGroup)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -29191,8 +29132,7 @@ impl<'a, C, A> FloodlightActivityGroupUpdateCall<'a, C, A> where C: BorrowMut MetroListCall<'a, C, A> where C: BorrowMut, A: oau /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, MetrosListResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -29440,8 +29380,7 @@ impl<'a, C, A> MetroListCall<'a, C, A> where C: BorrowMut, A: oau } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -29622,7 +29561,7 @@ impl<'a, C, A> OrderListCall<'a, C, A> where C: BorrowMut, A: oau /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, OrdersListResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -29717,8 +29656,7 @@ impl<'a, C, A> OrderListCall<'a, C, A> where C: BorrowMut, A: oau } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -29947,7 +29885,7 @@ impl<'a, C, A> OrderGetCall<'a, C, A> where C: BorrowMut, A: oaut /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Order)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -30018,8 +29956,7 @@ impl<'a, C, A> OrderGetCall<'a, C, A> where C: BorrowMut, A: oaut } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -30206,7 +30143,7 @@ impl<'a, C, A> DirectorySiteContactGetCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, DirectorySiteContact)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -30276,8 +30213,7 @@ impl<'a, C, A> DirectorySiteContactGetCall<'a, C, A> where C: BorrowMut DirectorySiteContactListCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, DirectorySiteContactsListResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -30561,8 +30497,7 @@ impl<'a, C, A> DirectorySiteContactListCall<'a, C, A> where C: BorrowMut UserProfileListCall<'a, C, A> where C: BorrowMut, /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, UserProfileList)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -30825,8 +30760,7 @@ impl<'a, C, A> UserProfileListCall<'a, C, A> where C: BorrowMut, } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -30982,7 +30916,7 @@ impl<'a, C, A> UserProfileGetCall<'a, C, A> where C: BorrowMut, A /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, UserProfile)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -31051,8 +30985,7 @@ impl<'a, C, A> UserProfileGetCall<'a, C, A> where C: BorrowMut, A } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -31226,7 +31159,7 @@ impl<'a, C, A> AdPatchCall<'a, C, A> where C: BorrowMut, A: oauth /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Ad)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -31307,8 +31240,7 @@ impl<'a, C, A> AdPatchCall<'a, C, A> where C: BorrowMut, A: oauth } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -31504,7 +31436,7 @@ impl<'a, C, A> AdInsertCall<'a, C, A> where C: BorrowMut, A: oaut /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Ad)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -31584,8 +31516,7 @@ impl<'a, C, A> AdInsertCall<'a, C, A> where C: BorrowMut, A: oaut } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -31812,7 +31743,7 @@ impl<'a, C, A> AdListCall<'a, C, A> where C: BorrowMut, A: oauth2 /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, AdsListResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -31973,8 +31904,7 @@ impl<'a, C, A> AdListCall<'a, C, A> where C: BorrowMut, A: oauth2 } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -32319,7 +32249,7 @@ impl<'a, C, A> AdGetCall<'a, C, A> where C: BorrowMut, A: oauth2: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Ad)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -32389,8 +32319,7 @@ impl<'a, C, A> AdGetCall<'a, C, A> where C: BorrowMut, A: oauth2: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -32573,7 +32502,7 @@ impl<'a, C, A> AdUpdateCall<'a, C, A> where C: BorrowMut, A: oaut /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Ad)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -32653,8 +32582,7 @@ impl<'a, C, A> AdUpdateCall<'a, C, A> where C: BorrowMut, A: oaut } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -32834,7 +32762,7 @@ impl<'a, C, A> AccountPermissionGetCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, AccountPermission)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -32904,8 +32832,7 @@ impl<'a, C, A> AccountPermissionGetCall<'a, C, A> where C: BorrowMut AccountPermissionListCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, AccountPermissionsListResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -33150,8 +33077,7 @@ impl<'a, C, A> AccountPermissionListCall<'a, C, A> where C: BorrowMut ConnectionTypeListCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, ConnectionTypesListResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -33386,8 +33312,7 @@ impl<'a, C, A> ConnectionTypeListCall<'a, C, A> where C: BorrowMut ConnectionTypeGetCall<'a, C, A> where C: BorrowMut /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, ConnectionType)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -33624,8 +33549,7 @@ impl<'a, C, A> ConnectionTypeGetCall<'a, C, A> where C: BorrowMut } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -33802,7 +33726,7 @@ impl<'a, C, A> AdvertiserGroupGetCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, AdvertiserGroup)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -33872,8 +33796,7 @@ impl<'a, C, A> AdvertiserGroupGetCall<'a, C, A> where C: BorrowMut AdvertiserGroupListCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, AdvertiserGroupsListResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -34150,8 +34073,7 @@ impl<'a, C, A> AdvertiserGroupListCall<'a, C, A> where C: BorrowMut AdvertiserGroupInsertCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, AdvertiserGroup)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -34447,8 +34369,7 @@ impl<'a, C, A> AdvertiserGroupInsertCall<'a, C, A> where C: BorrowMut AdvertiserGroupUpdateCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, AdvertiserGroup)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -34714,8 +34635,7 @@ impl<'a, C, A> AdvertiserGroupUpdateCall<'a, C, A> where C: BorrowMut AdvertiserGroupPatchCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, AdvertiserGroup)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -34983,8 +34903,7 @@ impl<'a, C, A> AdvertiserGroupPatchCall<'a, C, A> where C: BorrowMut AdvertiserGroupDeleteCall<'a, C, A> where C: BorrowMut Result { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -35243,8 +35162,7 @@ impl<'a, C, A> AdvertiserGroupDeleteCall<'a, C, A> where C: BorrowMut SiteInsertCall<'a, C, A> where C: BorrowMut, A: oa /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Site)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -35497,8 +35415,7 @@ impl<'a, C, A> SiteInsertCall<'a, C, A> where C: BorrowMut, A: oa } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -35678,7 +35595,7 @@ impl<'a, C, A> SiteGetCall<'a, C, A> where C: BorrowMut, A: oauth /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Site)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -35748,8 +35665,7 @@ impl<'a, C, A> SiteGetCall<'a, C, A> where C: BorrowMut, A: oauth } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -35955,7 +35871,7 @@ impl<'a, C, A> SiteListCall<'a, C, A> where C: BorrowMut, A: oaut /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, SitesListResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -36075,8 +35991,7 @@ impl<'a, C, A> SiteListCall<'a, C, A> where C: BorrowMut, A: oaut } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -36357,7 +36272,7 @@ impl<'a, C, A> SiteUpdateCall<'a, C, A> where C: BorrowMut, A: oa /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Site)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -36437,8 +36352,7 @@ impl<'a, C, A> SiteUpdateCall<'a, C, A> where C: BorrowMut, A: oa } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -36625,7 +36539,7 @@ impl<'a, C, A> SitePatchCall<'a, C, A> where C: BorrowMut, A: oau /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Site)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -36706,8 +36620,7 @@ impl<'a, C, A> SitePatchCall<'a, C, A> where C: BorrowMut, A: oau } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -36897,7 +36810,7 @@ impl<'a, C, A> FloodlightActivityGetCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, FloodlightActivity)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -36967,8 +36880,7 @@ impl<'a, C, A> FloodlightActivityGetCall<'a, C, A> where C: BorrowMut FloodlightActivityListCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, FloodlightActivitiesListResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -37282,8 +37194,7 @@ impl<'a, C, A> FloodlightActivityListCall<'a, C, A> where C: BorrowMut FloodlightActivityInsertCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, FloodlightActivity)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -37629,8 +37540,7 @@ impl<'a, C, A> FloodlightActivityInsertCall<'a, C, A> where C: BorrowMut FloodlightActivityDeleteCall<'a, C, A> where C: BorrowMut Result { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -37879,8 +37789,7 @@ impl<'a, C, A> FloodlightActivityDeleteCall<'a, C, A> where C: BorrowMut FloodlightActivityPatchCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, FloodlightActivity)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -38135,8 +38044,7 @@ impl<'a, C, A> FloodlightActivityPatchCall<'a, C, A> where C: BorrowMut FloodlightActivityGeneratetagCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, FloodlightActivitiesGenerateTagResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -38399,8 +38307,7 @@ impl<'a, C, A> FloodlightActivityGeneratetagCall<'a, C, A> where C: BorrowMut FloodlightActivityUpdateCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, FloodlightActivity)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -38660,8 +38567,7 @@ impl<'a, C, A> FloodlightActivityUpdateCall<'a, C, A> where C: BorrowMut RegionListCall<'a, C, A> where C: BorrowMut, A: oa /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, RegionsListResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -38909,8 +38815,7 @@ impl<'a, C, A> RegionListCall<'a, C, A> where C: BorrowMut, A: oa } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -39083,7 +38988,7 @@ impl<'a, C, A> CreativeGroupInsertCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, CreativeGroup)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -39163,8 +39068,7 @@ impl<'a, C, A> CreativeGroupInsertCall<'a, C, A> where C: BorrowMut CreativeGroupGetCall<'a, C, A> where C: BorrowMut, /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, CreativeGroup)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -39414,8 +39318,7 @@ impl<'a, C, A> CreativeGroupGetCall<'a, C, A> where C: BorrowMut, } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -39598,7 +39501,7 @@ impl<'a, C, A> CreativeGroupUpdateCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, CreativeGroup)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -39678,8 +39581,7 @@ impl<'a, C, A> CreativeGroupUpdateCall<'a, C, A> where C: BorrowMut CreativeGroupListCall<'a, C, A> where C: BorrowMut /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, CreativeGroupsListResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -39971,8 +39873,7 @@ impl<'a, C, A> CreativeGroupListCall<'a, C, A> where C: BorrowMut } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -40204,7 +40105,7 @@ impl<'a, C, A> CreativeGroupPatchCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, CreativeGroup)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -40285,8 +40186,7 @@ impl<'a, C, A> CreativeGroupPatchCall<'a, C, A> where C: BorrowMut TargetableRemarketingListListCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, TargetableRemarketingListsListResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -40576,8 +40476,7 @@ impl<'a, C, A> TargetableRemarketingListListCall<'a, C, A> where C: BorrowMut TargetableRemarketingListGetCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, TargetableRemarketingList)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -40866,8 +40765,7 @@ impl<'a, C, A> TargetableRemarketingListGetCall<'a, C, A> where C: BorrowMut SubaccountPatchCall<'a, C, A> where C: BorrowMut, /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Subaccount)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -41132,8 +41030,7 @@ impl<'a, C, A> SubaccountPatchCall<'a, C, A> where C: BorrowMut, } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -41329,7 +41226,7 @@ impl<'a, C, A> SubaccountInsertCall<'a, C, A> where C: BorrowMut, /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Subaccount)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -41409,8 +41306,7 @@ impl<'a, C, A> SubaccountInsertCall<'a, C, A> where C: BorrowMut, } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -41601,7 +41497,7 @@ impl<'a, C, A> SubaccountListCall<'a, C, A> where C: BorrowMut, A /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, SubaccountsListResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -41690,8 +41586,7 @@ impl<'a, C, A> SubaccountListCall<'a, C, A> where C: BorrowMut, A } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -41907,7 +41802,7 @@ impl<'a, C, A> SubaccountUpdateCall<'a, C, A> where C: BorrowMut, /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Subaccount)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -41987,8 +41882,7 @@ impl<'a, C, A> SubaccountUpdateCall<'a, C, A> where C: BorrowMut, } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -42168,7 +42062,7 @@ impl<'a, C, A> SubaccountGetCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Subaccount)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -42238,8 +42132,7 @@ impl<'a, C, A> SubaccountGetCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -42416,7 +42309,7 @@ impl<'a, C, A> MobileCarrierGetCall<'a, C, A> where C: BorrowMut, /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, MobileCarrier)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -42486,8 +42379,7 @@ impl<'a, C, A> MobileCarrierGetCall<'a, C, A> where C: BorrowMut, } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -42663,7 +42555,7 @@ impl<'a, C, A> MobileCarrierListCall<'a, C, A> where C: BorrowMut /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, MobileCarriersListResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -42732,8 +42624,7 @@ impl<'a, C, A> MobileCarrierListCall<'a, C, A> where C: BorrowMut } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -42900,7 +42791,7 @@ impl<'a, C, A> FloodlightConfigurationGetCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, FloodlightConfiguration)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -42970,8 +42861,7 @@ impl<'a, C, A> FloodlightConfigurationGetCall<'a, C, A> where C: BorrowMut FloodlightConfigurationUpdateCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, FloodlightConfiguration)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -43234,8 +43124,7 @@ impl<'a, C, A> FloodlightConfigurationUpdateCall<'a, C, A> where C: BorrowMut FloodlightConfigurationPatchCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, FloodlightConfiguration)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -43503,8 +43392,7 @@ impl<'a, C, A> FloodlightConfigurationPatchCall<'a, C, A> where C: BorrowMut FloodlightConfigurationListCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, FloodlightConfigurationsListResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -43769,8 +43657,7 @@ impl<'a, C, A> FloodlightConfigurationListCall<'a, C, A> where C: BorrowMut OperatingSystemListCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, OperatingSystemsListResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -44013,8 +43900,7 @@ impl<'a, C, A> OperatingSystemListCall<'a, C, A> where C: BorrowMut OperatingSystemGetCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, OperatingSystem)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -44251,8 +44137,7 @@ impl<'a, C, A> OperatingSystemGetCall<'a, C, A> where C: BorrowMut FileListCall<'a, C, A> where C: BorrowMut, A: oaut /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, FileList)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -44522,8 +44407,7 @@ impl<'a, C, A> FileListCall<'a, C, A> where C: BorrowMut, A: oaut } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -44730,7 +44614,7 @@ impl<'a, C, A> FileGetCall<'a, C, A> where C: BorrowMut, A: oauth /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, File)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -44816,8 +44700,7 @@ impl<'a, C, A> FileGetCall<'a, C, A> where C: BorrowMut, A: oauth } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -45031,7 +44914,7 @@ impl<'a, C, A> PlacementGroupListCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, PlacementGroupsListResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -45173,8 +45056,7 @@ impl<'a, C, A> PlacementGroupListCall<'a, C, A> where C: BorrowMut PlacementGroupUpdateCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, PlacementGroup)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -45568,8 +45450,7 @@ impl<'a, C, A> PlacementGroupUpdateCall<'a, C, A> where C: BorrowMut PlacementGroupInsertCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, PlacementGroup)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -45835,8 +45716,7 @@ impl<'a, C, A> PlacementGroupInsertCall<'a, C, A> where C: BorrowMut PlacementGroupGetCall<'a, C, A> where C: BorrowMut /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, PlacementGroup)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -46086,8 +45966,7 @@ impl<'a, C, A> PlacementGroupGetCall<'a, C, A> where C: BorrowMut } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -46271,7 +46150,7 @@ impl<'a, C, A> PlacementGroupPatchCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, PlacementGroup)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -46352,8 +46231,7 @@ impl<'a, C, A> PlacementGroupPatchCall<'a, C, A> where C: BorrowMut InventoryItemListCall<'a, C, A> where C: BorrowMut /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, InventoryItemsListResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -46659,8 +46537,7 @@ impl<'a, C, A> InventoryItemListCall<'a, C, A> where C: BorrowMut } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -46897,7 +46774,7 @@ impl<'a, C, A> InventoryItemGetCall<'a, C, A> where C: BorrowMut, /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, InventoryItem)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -46968,8 +46845,7 @@ impl<'a, C, A> InventoryItemGetCall<'a, C, A> where C: BorrowMut, } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -47156,7 +47032,7 @@ impl<'a, C, A> UserRolePermissionGetCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, UserRolePermission)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -47226,8 +47102,7 @@ impl<'a, C, A> UserRolePermissionGetCall<'a, C, A> where C: BorrowMut UserRolePermissionListCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, UserRolePermissionsListResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -47479,8 +47354,7 @@ impl<'a, C, A> UserRolePermissionListCall<'a, C, A> where C: BorrowMut AccountPermissionGroupListCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, AccountPermissionGroupsListResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -47723,8 +47597,7 @@ impl<'a, C, A> AccountPermissionGroupListCall<'a, C, A> where C: BorrowMut AccountPermissionGroupGetCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, AccountPermissionGroup)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -47961,8 +47834,7 @@ impl<'a, C, A> AccountPermissionGroupGetCall<'a, C, A> where C: BorrowMut ContentCategoryListCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, ContentCategoriesListResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -48239,8 +48111,7 @@ impl<'a, C, A> ContentCategoryListCall<'a, C, A> where C: BorrowMut ContentCategoryUpdateCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, ContentCategory)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -48536,8 +48407,7 @@ impl<'a, C, A> ContentCategoryUpdateCall<'a, C, A> where C: BorrowMut ContentCategoryInsertCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, ContentCategory)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -48803,8 +48673,7 @@ impl<'a, C, A> ContentCategoryInsertCall<'a, C, A> where C: BorrowMut ContentCategoryDeleteCall<'a, C, A> where C: BorrowMut Result { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -49053,8 +48922,7 @@ impl<'a, C, A> ContentCategoryDeleteCall<'a, C, A> where C: BorrowMut ContentCategoryGetCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, ContentCategory)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -49291,8 +49159,7 @@ impl<'a, C, A> ContentCategoryGetCall<'a, C, A> where C: BorrowMut ContentCategoryPatchCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, ContentCategory)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -49557,8 +49424,7 @@ impl<'a, C, A> ContentCategoryPatchCall<'a, C, A> where C: BorrowMut CreativeUpdateCall<'a, C, A> where C: BorrowMut, A /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Creative)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -49834,8 +49700,7 @@ impl<'a, C, A> CreativeUpdateCall<'a, C, A> where C: BorrowMut, A } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -50021,7 +49886,7 @@ impl<'a, C, A> CreativeInsertCall<'a, C, A> where C: BorrowMut, A /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Creative)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -50101,8 +49966,7 @@ impl<'a, C, A> CreativeInsertCall<'a, C, A> where C: BorrowMut, A } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -50282,7 +50146,7 @@ impl<'a, C, A> CreativeGetCall<'a, C, A> where C: BorrowMut, A: o /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Creative)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -50352,8 +50216,7 @@ impl<'a, C, A> CreativeGetCall<'a, C, A> where C: BorrowMut, A: o } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -50561,7 +50424,7 @@ impl<'a, C, A> CreativeListCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, CreativesListResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -50690,8 +50553,7 @@ impl<'a, C, A> CreativeListCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -50983,7 +50845,7 @@ impl<'a, C, A> CreativePatchCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Creative)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -51064,8 +50926,7 @@ impl<'a, C, A> CreativePatchCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -51255,7 +51116,7 @@ impl<'a, C, A> CampaignGetCall<'a, C, A> where C: BorrowMut, A: o /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Campaign)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -51325,8 +51186,7 @@ impl<'a, C, A> CampaignGetCall<'a, C, A> where C: BorrowMut, A: o } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -51511,7 +51371,7 @@ impl<'a, C, A> CampaignInsertCall<'a, C, A> where C: BorrowMut, A /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Campaign)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -51593,8 +51453,7 @@ impl<'a, C, A> CampaignInsertCall<'a, C, A> where C: BorrowMut, A } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -51801,7 +51660,7 @@ impl<'a, C, A> CampaignPatchCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Campaign)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -51882,8 +51741,7 @@ impl<'a, C, A> CampaignPatchCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -52079,7 +51937,7 @@ impl<'a, C, A> CampaignUpdateCall<'a, C, A> where C: BorrowMut, A /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Campaign)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -52159,8 +52017,7 @@ impl<'a, C, A> CampaignUpdateCall<'a, C, A> where C: BorrowMut, A } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -52365,7 +52222,7 @@ impl<'a, C, A> CampaignListCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, CampaignsListResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -52481,8 +52338,7 @@ impl<'a, C, A> CampaignListCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -52744,7 +52600,7 @@ impl<'a, C, A> EventTagDeleteCall<'a, C, A> where C: BorrowMut, A /// Perform the operation you have build so far. pub fn doit(mut self) -> Result { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -52813,8 +52669,7 @@ impl<'a, C, A> EventTagDeleteCall<'a, C, A> where C: BorrowMut, A } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Delete, &url) @@ -53000,7 +52855,7 @@ impl<'a, C, A> EventTagListCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, EventTagsListResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -53103,8 +52958,7 @@ impl<'a, C, A> EventTagListCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -53349,7 +53203,7 @@ impl<'a, C, A> EventTagInsertCall<'a, C, A> where C: BorrowMut, A /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, EventTag)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -53429,8 +53283,7 @@ impl<'a, C, A> EventTagInsertCall<'a, C, A> where C: BorrowMut, A } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -53617,7 +53470,7 @@ impl<'a, C, A> EventTagPatchCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, EventTag)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -53698,8 +53551,7 @@ impl<'a, C, A> EventTagPatchCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -53895,7 +53747,7 @@ impl<'a, C, A> EventTagUpdateCall<'a, C, A> where C: BorrowMut, A /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, EventTag)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -53975,8 +53827,7 @@ impl<'a, C, A> EventTagUpdateCall<'a, C, A> where C: BorrowMut, A } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -54156,7 +54007,7 @@ impl<'a, C, A> EventTagGetCall<'a, C, A> where C: BorrowMut, A: o /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, EventTag)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -54226,8 +54077,7 @@ impl<'a, C, A> EventTagGetCall<'a, C, A> where C: BorrowMut, A: o } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -54404,7 +54254,7 @@ impl<'a, C, A> RemarketingListGetCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, RemarketingList)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -54474,8 +54324,7 @@ impl<'a, C, A> RemarketingListGetCall<'a, C, A> where C: BorrowMut RemarketingListUpdateCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, RemarketingList)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -54738,8 +54587,7 @@ impl<'a, C, A> RemarketingListUpdateCall<'a, C, A> where C: BorrowMut RemarketingListListCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, RemarketingListsListResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -55024,8 +54872,7 @@ impl<'a, C, A> RemarketingListListCall<'a, C, A> where C: BorrowMut RemarketingListPatchCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, RemarketingList)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -55339,8 +55186,7 @@ impl<'a, C, A> RemarketingListPatchCall<'a, C, A> where C: BorrowMut RemarketingListInsertCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, RemarketingList)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -55616,8 +55462,7 @@ impl<'a, C, A> RemarketingListInsertCall<'a, C, A> where C: BorrowMut CityListCall<'a, C, A> where C: BorrowMut, A: oaut /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, CitiesListResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -55891,8 +55736,7 @@ impl<'a, C, A> CityListCall<'a, C, A> where C: BorrowMut, A: oaut } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -56096,7 +55940,7 @@ impl<'a, C, A> PlacementStrategyUpdateCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, PlacementStrategy)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -56176,8 +56020,7 @@ impl<'a, C, A> PlacementStrategyUpdateCall<'a, C, A> where C: BorrowMut PlacementStrategyGetCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, PlacementStrategy)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -56427,8 +56270,7 @@ impl<'a, C, A> PlacementStrategyGetCall<'a, C, A> where C: BorrowMut PlacementStrategyListCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, PlacementStrategiesListResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -56705,8 +56547,7 @@ impl<'a, C, A> PlacementStrategyListCall<'a, C, A> where C: BorrowMut PlacementStrategyDeleteCall<'a, C, A> where C: BorrowMut Result { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -56985,8 +56826,7 @@ impl<'a, C, A> PlacementStrategyDeleteCall<'a, C, A> where C: BorrowMut PlacementStrategyInsertCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, PlacementStrategy)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -57239,8 +57079,7 @@ impl<'a, C, A> PlacementStrategyInsertCall<'a, C, A> where C: BorrowMut PlacementStrategyPatchCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, PlacementStrategy)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -57508,8 +57347,7 @@ impl<'a, C, A> PlacementStrategyPatchCall<'a, C, A> where C: BorrowMut ProjectListCall<'a, C, A> where C: BorrowMut, A: o /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, ProjectsListResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -57806,8 +57644,7 @@ impl<'a, C, A> ProjectListCall<'a, C, A> where C: BorrowMut, A: o } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -58025,7 +57862,7 @@ impl<'a, C, A> ProjectGetCall<'a, C, A> where C: BorrowMut, A: oa /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Project)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -58095,8 +57932,7 @@ impl<'a, C, A> ProjectGetCall<'a, C, A> where C: BorrowMut, A: oa } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -58279,7 +58115,7 @@ impl<'a, C, A> DirectorySiteInsertCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, DirectorySite)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -58359,8 +58195,7 @@ impl<'a, C, A> DirectorySiteInsertCall<'a, C, A> where C: BorrowMut DirectorySiteListCall<'a, C, A> where C: BorrowMut /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, DirectorySitesListResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -58675,8 +58510,7 @@ impl<'a, C, A> DirectorySiteListCall<'a, C, A> where C: BorrowMut } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -58935,7 +58769,7 @@ impl<'a, C, A> DirectorySiteGetCall<'a, C, A> where C: BorrowMut, /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, DirectorySite)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -59005,8 +58839,7 @@ impl<'a, C, A> DirectorySiteGetCall<'a, C, A> where C: BorrowMut, } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -59189,7 +59022,7 @@ impl<'a, C, A> SizeInsertCall<'a, C, A> where C: BorrowMut, A: oa /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Size)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -59269,8 +59102,7 @@ impl<'a, C, A> SizeInsertCall<'a, C, A> where C: BorrowMut, A: oa } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -59457,7 +59289,7 @@ impl<'a, C, A> SizeListCall<'a, C, A> where C: BorrowMut, A: oaut /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, SizesListResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -59540,8 +59372,7 @@ impl<'a, C, A> SizeListCall<'a, C, A> where C: BorrowMut, A: oaut } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -59737,7 +59568,7 @@ impl<'a, C, A> SizeGetCall<'a, C, A> where C: BorrowMut, A: oauth /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Size)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -59807,8 +59638,7 @@ impl<'a, C, A> SizeGetCall<'a, C, A> where C: BorrowMut, A: oauth } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -59985,7 +59815,7 @@ impl<'a, C, A> AccountActiveAdSummaryGetCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, AccountActiveAdSummary)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -60055,8 +59885,7 @@ impl<'a, C, A> AccountActiveAdSummaryGetCall<'a, C, A> where C: BorrowMut AccountUserProfileUpdateCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, AccountUserProfile)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -60319,8 +60148,7 @@ impl<'a, C, A> AccountUserProfileUpdateCall<'a, C, A> where C: BorrowMut AccountUserProfileListCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, AccountUserProfilesListResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -60615,8 +60443,7 @@ impl<'a, C, A> AccountUserProfileListCall<'a, C, A> where C: BorrowMut AccountUserProfileInsertCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, AccountUserProfile)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -60933,8 +60760,7 @@ impl<'a, C, A> AccountUserProfileInsertCall<'a, C, A> where C: BorrowMut AccountUserProfilePatchCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, AccountUserProfile)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -61202,8 +61028,7 @@ impl<'a, C, A> AccountUserProfilePatchCall<'a, C, A> where C: BorrowMut AccountUserProfileGetCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, AccountUserProfile)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -61463,8 +61288,7 @@ impl<'a, C, A> AccountUserProfileGetCall<'a, C, A> where C: BorrowMut CountryListCall<'a, C, A> where C: BorrowMut, A: o /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, CountriesListResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -61709,8 +61533,7 @@ impl<'a, C, A> CountryListCall<'a, C, A> where C: BorrowMut, A: o } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -61877,7 +61700,7 @@ impl<'a, C, A> CountryGetCall<'a, C, A> where C: BorrowMut, A: oa /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Country)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -61947,8 +61770,7 @@ impl<'a, C, A> CountryGetCall<'a, C, A> where C: BorrowMut, A: oa } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -62126,7 +61948,7 @@ impl<'a, C, A> OrderDocumentGetCall<'a, C, A> where C: BorrowMut, /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, OrderDocument)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -62197,8 +62019,7 @@ impl<'a, C, A> OrderDocumentGetCall<'a, C, A> where C: BorrowMut, } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -62403,7 +62224,7 @@ impl<'a, C, A> OrderDocumentListCall<'a, C, A> where C: BorrowMut /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, OrderDocumentsListResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -62506,8 +62327,7 @@ impl<'a, C, A> OrderDocumentListCall<'a, C, A> where C: BorrowMut } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -62750,7 +62570,7 @@ impl<'a, C, A> PostalCodeGetCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, PostalCode)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -62820,8 +62640,7 @@ impl<'a, C, A> PostalCodeGetCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -62997,7 +62816,7 @@ impl<'a, C, A> PostalCodeListCall<'a, C, A> where C: BorrowMut, A /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, PostalCodesListResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -63066,8 +62885,7 @@ impl<'a, C, A> PostalCodeListCall<'a, C, A> where C: BorrowMut, A } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -63233,7 +63051,7 @@ impl<'a, C, A> BrowserListCall<'a, C, A> where C: BorrowMut, A: o /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, BrowsersListResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -63302,8 +63120,7 @@ impl<'a, C, A> BrowserListCall<'a, C, A> where C: BorrowMut, A: o } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -63470,7 +63287,7 @@ impl<'a, C, A> AccountGetCall<'a, C, A> where C: BorrowMut, A: oa /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Account)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -63540,8 +63357,7 @@ impl<'a, C, A> AccountGetCall<'a, C, A> where C: BorrowMut, A: oa } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -63731,7 +63547,7 @@ impl<'a, C, A> AccountListCall<'a, C, A> where C: BorrowMut, A: o /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, AccountsListResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -63823,8 +63639,7 @@ impl<'a, C, A> AccountListCall<'a, C, A> where C: BorrowMut, A: o } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -64047,7 +63862,7 @@ impl<'a, C, A> AccountUpdateCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Account)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -64127,8 +63942,7 @@ impl<'a, C, A> AccountUpdateCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -64315,7 +64129,7 @@ impl<'a, C, A> AccountPatchCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Account)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -64396,8 +64210,7 @@ impl<'a, C, A> AccountPatchCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -64594,7 +64407,7 @@ impl<'a, C, A> PlacementPatchCall<'a, C, A> where C: BorrowMut, A /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Placement)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -64675,8 +64488,7 @@ impl<'a, C, A> PlacementPatchCall<'a, C, A> where C: BorrowMut, A } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -64909,7 +64721,7 @@ impl<'a, C, A> PlacementListCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, PlacementsListResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -65066,8 +64878,7 @@ impl<'a, C, A> PlacementListCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -65267,7 +65078,7 @@ impl<'a, C, A> PlacementListCall<'a, C, A> where C: BorrowMut, A: self._content_category_ids.push(new_value.to_string()); self } - /// Select only placements that are associated with these compatibilities. WEB and WEB_INTERSTITIAL refer to rendering either on desktop or on mobile devices for regular or interstitial ads respectively. APP and APP_INTERSTITIAL are for rendering in mobile apps.IN_STREAM_VIDEO refers to rendering in in-stream video ads developed with the VAST standard. + /// Select only placements that are associated with these compatibilities. WEB and WEB_INTERSTITIAL refer to rendering either on desktop or on mobile devices for regular or interstitial ads respectively. APP and APP_INTERSTITIAL are for rendering in mobile apps. IN_STREAM_VIDEO refers to rendering in in-stream video ads developed with the VAST standard. /// /// Append the given value to the *compatibilities* query property. /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. @@ -65405,7 +65216,7 @@ impl<'a, C, A> PlacementInsertCall<'a, C, A> where C: BorrowMut, /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Placement)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -65485,8 +65296,7 @@ impl<'a, C, A> PlacementInsertCall<'a, C, A> where C: BorrowMut, } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -65672,7 +65482,7 @@ impl<'a, C, A> PlacementUpdateCall<'a, C, A> where C: BorrowMut, /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Placement)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -65752,8 +65562,7 @@ impl<'a, C, A> PlacementUpdateCall<'a, C, A> where C: BorrowMut, } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -65938,7 +65747,7 @@ impl<'a, C, A> PlacementGeneratetagCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, PlacementsGenerateTagsResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -66020,8 +65829,7 @@ impl<'a, C, A> PlacementGeneratetagCall<'a, C, A> where C: BorrowMut PlacementGetCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Placement)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -66281,8 +66089,7 @@ impl<'a, C, A> PlacementGetCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) diff --git a/gen/dfareporting2d3-cli/Cargo.toml b/gen/dfareporting2d3-cli/Cargo.toml index 1ddfffb2ea..4f5a80e0b4 100644 --- a/gen/dfareporting2d3-cli/Cargo.toml +++ b/gen/dfareporting2d3-cli/Cargo.toml @@ -4,7 +4,7 @@ [package] name = "google-dfareporting2d3-cli" -version = "0.3.3+20160128" +version = "0.3.4+20160323" authors = ["Sebastian Thiel "] description = "A complete library to interact with dfareporting (protocol v2.3)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/dfareporting2d3-cli" @@ -17,18 +17,18 @@ keywords = ["dfareporting", "google", "cli"] name = "dfareporting2d3" [dependencies] -hyper = "0.7" -mime = "0.1.0" -serde = ">= 0.7.0" -serde_json = ">= 0.7.0" -yup-oauth2 = ">= 0.5.4" +hyper = "0.8" +mime = "0.2.0" +serde = "0.6.0" +serde_json = "0.6.0" +yup-oauth2 = ">= 0.5.6" strsim = "0.4" yup-hyper-mock = "1.0" clap = "2.0" [build-dependencies] -syntex = { version = ">= 0.23" } -serde_codegen = { version = ">= 0.6" } +syntex = { version = "= 0.28" } +serde_codegen = { version = "= 0.6.13" } [dependencies.google-dfareporting2d3] diff --git a/gen/dfareporting2d3-cli/README.md b/gen/dfareporting2d3-cli/README.md index c41f541da9..0ac8587c5f 100644 --- a/gen/dfareporting2d3-cli/README.md +++ b/gen/dfareporting2d3-cli/README.md @@ -17,14 +17,14 @@ Everything else about the *dfareporting* API can be found at the You can download the pre-compiled 64bit binaries for the following platforms: -* ![icon](http://megaicons.net/static/img/icons_sizes/6/140/16/ubuntu-icon.png) [ubuntu](http://dl.byronimo.de/google.rs/cli/0.3.3/ubuntu/dfareporting2d3.tar.gz) -* ![icon](http://hydra-media.cursecdn.com/wow.gamepedia.com/a/a2/Apple-icon-16x16.png?version=25ddd67ac3dd3b634478e3978b76cb74) [osx](http://dl.byronimo.de/google.rs/cli/0.3.3/osx/dfareporting2d3.tar.gz) +* ![icon](http://megaicons.net/static/img/icons_sizes/6/140/16/ubuntu-icon.png) [ubuntu](http://dl.byronimo.de/google.rs/cli/0.3.4/ubuntu/dfareporting2d3.tar.gz) +* ![icon](http://hydra-media.cursecdn.com/wow.gamepedia.com/a/a2/Apple-icon-16x16.png?version=25ddd67ac3dd3b634478e3978b76cb74) [osx](http://dl.byronimo.de/google.rs/cli/0.3.4/osx/dfareporting2d3.tar.gz) Find the source code [on github](https://github.com/Byron/google-apis-rs/tree/master/gen/dfareporting2d3-cli). # Usage -This documentation was generated from the *dfareporting* API at revision *20160128*. The CLI is at version *0.3.3*. +This documentation was generated from the *dfareporting* API at revision *20160323*. The CLI is at version *0.3.4*. ```bash dfareporting2d3 [options] diff --git a/gen/dfareporting2d3-cli/mkdocs.yml b/gen/dfareporting2d3-cli/mkdocs.yml index b01d7db734..10705abf44 100644 --- a/gen/dfareporting2d3-cli/mkdocs.yml +++ b/gen/dfareporting2d3-cli/mkdocs.yml @@ -1,4 +1,4 @@ -site_name: dfareporting v0.3.3+20160128 +site_name: dfareporting v0.3.4+20160323 site_url: http://byron.github.io/google-apis-rs/google-dfareporting2d3-cli site_description: Write integrating applications with bcore diff --git a/gen/dfareporting2d3-cli/src/cmn.rs b/gen/dfareporting2d3-cli/src/cmn.rs index 188159ee80..ae86fdef65 100644 --- a/gen/dfareporting2d3-cli/src/cmn.rs +++ b/gen/dfareporting2d3-cli/src/cmn.rs @@ -414,7 +414,7 @@ impl TokenStorage for JsonTokenStorage { Err(err) => match err.kind() { io::ErrorKind::NotFound => Ok(()), - _ => Err(json::Error::Io(err)) + _ => Err(json::Error::IoError(err)) }, Ok(_) => Ok(()), } @@ -427,7 +427,7 @@ impl TokenStorage for JsonTokenStorage { Err(serde_err) => Err(serde_err), } }, - Err(io_err) => Err(json::Error::Io(io_err)) + Err(io_err) => Err(json::Error::IoError(io_err)) } } } @@ -444,7 +444,7 @@ impl TokenStorage for JsonTokenStorage { Err(io_err) => { match io_err.kind() { io::ErrorKind::NotFound => Ok(None), - _ => Err(json::Error::Io(io_err)) + _ => Err(json::Error::IoError(io_err)) } } } @@ -683,7 +683,7 @@ pub fn application_secret_from_directory(dir: &str, = json::from_str(json_console_secret).unwrap(); match json::to_writer_pretty(&mut f, &console_secret) { Err(serde_err) => match serde_err { - json::Error::Io(err) => err, + json::Error::IoError(err) => err, _ => panic!("Unexpected serde error: {:#?}", serde_err) }, Ok(_) => continue, @@ -696,7 +696,7 @@ pub fn application_secret_from_directory(dir: &str, }, Ok(f) => { match json::de::from_reader::<_, ConsoleApplicationSecret>(f) { - Err(json::Error::Io(err)) => + Err(json::Error::IoError(err)) => return secret_io_error(err), Err(json_err) => return Err(CLIError::Configuration( diff --git a/gen/dfareporting2d3-cli/src/main.rs b/gen/dfareporting2d3-cli/src/main.rs index 31ba75d5fc..d672a39581 100644 --- a/gen/dfareporting2d3-cli/src/main.rs +++ b/gen/dfareporting2d3-cli/src/main.rs @@ -22269,8 +22269,8 @@ fn main() { let mut app = App::new("dfareporting2d3") .author("Sebastian Thiel ") - .version("0.3.3+20160128") - .about("Manage your DoubleClick Campaign Manager ad campaigns and reports.") + .version("0.3.4+20160323") + .about("Manages your DoubleClick Campaign Manager ad campaigns and reports.") .after_help("All documentation details can be found at http://byron.github.io/google-apis-rs/google_dfareporting2d3_cli") .arg(Arg::with_name("url") .long("scope") diff --git a/gen/dfareporting2d3/Cargo.toml b/gen/dfareporting2d3/Cargo.toml index 90db595211..354684f049 100644 --- a/gen/dfareporting2d3/Cargo.toml +++ b/gen/dfareporting2d3/Cargo.toml @@ -4,7 +4,7 @@ [package] name = "google-dfareporting2d3" -version = "0.1.12+20160128" +version = "0.1.13+20160323" authors = ["Sebastian Thiel "] description = "A complete library to interact with dfareporting (protocol v2.3)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/dfareporting2d3" @@ -16,14 +16,14 @@ build = "src/build.rs" [dependencies] -hyper = "0.7" -mime = "0.1.0" -serde = ">= 0.7.0" -serde_json = ">= 0.7.0" -yup-oauth2 = ">= 0.5.4" +hyper = "0.8" +mime = "0.2.0" +serde = "0.6.0" +serde_json = "0.6.0" +yup-oauth2 = ">= 0.5.6" url = ">= 0.5" [build-dependencies] -syntex = { version = ">= 0.23" } -serde_codegen = { version = ">= 0.6" } +syntex = { version = "= 0.28" } +serde_codegen = { version = "= 0.6.13" } diff --git a/gen/dfareporting2d3/README.md b/gen/dfareporting2d3/README.md index 15f089d60d..1bc50efcb1 100644 --- a/gen/dfareporting2d3/README.md +++ b/gen/dfareporting2d3/README.md @@ -5,7 +5,7 @@ DO NOT EDIT ! --> The `google-dfareporting2d3` library allows access to all features of the *Google dfareporting* service. -This documentation was generated from *dfareporting* crate version *0.1.12+20160128*, where *20160128* is the exact revision of the *dfareporting:v2.3* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.12*. +This documentation was generated from *dfareporting* crate version *0.1.13+20160323*, where *20160323* is the exact revision of the *dfareporting:v2.3* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.13*. Everything else about the *dfareporting* *v2d3* API can be found at the [official documentation site](https://developers.google.com/doubleclick-advertisers/reporting/). diff --git a/gen/dfareporting2d3/src/cmn.rs b/gen/dfareporting2d3/src/cmn.rs index 87b91a8986..c69621da55 100644 --- a/gen/dfareporting2d3/src/cmn.rs +++ b/gen/dfareporting2d3/src/cmn.rs @@ -12,7 +12,7 @@ use mime::{Mime, TopLevel, SubLevel, Attr, Value}; use oauth2::{TokenType, Retry, self}; use hyper; use hyper::header::{ContentType, ContentLength, Headers, UserAgent, Authorization, Header, - HeaderFormat}; + HeaderFormat, Bearer}; use hyper::http::h1::LINE_ENDING; use hyper::method::Method; use hyper::status::StatusCode; @@ -634,7 +634,7 @@ pub struct ResumableUploadHelper<'a, A: 'a> { pub start_at: Option, pub auth: &'a mut A, pub user_agent: &'a str, - pub auth_header: Authorization, + pub auth_header: Authorization, pub url: &'a str, pub reader: &'a mut ReadSeek, pub media_type: Mime, diff --git a/gen/dfareporting2d3/src/lib.rs b/gen/dfareporting2d3/src/lib.rs index 53c5ba9702..0cea9c99b7 100644 --- a/gen/dfareporting2d3/src/lib.rs +++ b/gen/dfareporting2d3/src/lib.rs @@ -2,7 +2,7 @@ // This file was generated automatically from 'src/mako/api/lib.rs.mako' // DO NOT EDIT ! -//! This documentation was generated from *dfareporting* crate version *0.1.12+20160128*, where *20160128* is the exact revision of the *dfareporting:v2.3* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.12*. +//! This documentation was generated from *dfareporting* crate version *0.1.13+20160323*, where *20160323* is the exact revision of the *dfareporting:v2.3* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.13*. //! //! Everything else about the *dfareporting* *v2d3* API can be found at the //! [official documentation site](https://developers.google.com/doubleclick-advertisers/reporting/). diff --git a/gen/dfareporting2d3/src/lib.rs.in b/gen/dfareporting2d3/src/lib.rs.in index 201639705e..cb88c52270 100644 --- a/gen/dfareporting2d3/src/lib.rs.in +++ b/gen/dfareporting2d3/src/lib.rs.in @@ -136,7 +136,7 @@ impl<'a, C, A> Dfareporting Dfareporting { client: RefCell::new(client), auth: RefCell::new(authenticator), - _user_agent: "google-api-rust-client/0.1.12".to_string(), + _user_agent: "google-api-rust-client/0.1.13".to_string(), } } @@ -307,7 +307,7 @@ impl<'a, C, A> Dfareporting } /// Set the user-agent header field to use in all requests to the server. - /// It defaults to `google-api-rust-client/0.1.12`. + /// It defaults to `google-api-rust-client/0.1.13`. /// /// Returns the previously set user-agent. pub fn user_agent(&mut self, agent_name: String) -> String { @@ -1774,7 +1774,7 @@ pub struct Placement { /// Dimension value for the ID of the site. This is a read-only, auto-generated field. #[serde(rename="siteIdDimensionValue")] pub site_id_dimension_value: Option, - /// Placement compatibility. WEB and WEB_INTERSTITIAL refer to rendering either on desktop or on mobile devices for regular or interstitial ads, respectively. APP and APP_INTERSTITIAL are for rendering in mobile apps.IN_STREAM_VIDEO refers to rendering in in-stream video ads developed with the VAST standard. This field is required on insertion. + /// Placement compatibility. WEB and WEB_INTERSTITIAL refer to rendering either on desktop or on mobile devices for regular or interstitial ads, respectively. APP and APP_INTERSTITIAL are for rendering in mobile apps. IN_STREAM_VIDEO refers to rendering in in-stream video ads developed with the VAST standard. This field is required on insertion. pub compatibility: Option, /// ID of the placement strategy assigned to this placement. #[serde(rename="placementStrategyId")] @@ -12903,7 +12903,7 @@ impl<'a, C, A> UserRolePermissionGroupGetCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, UserRolePermissionGroup)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -12973,8 +12973,7 @@ impl<'a, C, A> UserRolePermissionGroupGetCall<'a, C, A> where C: BorrowMut UserRolePermissionGroupListCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, UserRolePermissionGroupsListResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -13219,8 +13218,7 @@ impl<'a, C, A> UserRolePermissionGroupListCall<'a, C, A> where C: BorrowMut PlatformTypeGetCall<'a, C, A> where C: BorrowMut, /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, PlatformType)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -13457,8 +13455,7 @@ impl<'a, C, A> PlatformTypeGetCall<'a, C, A> where C: BorrowMut, } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -13634,7 +13631,7 @@ impl<'a, C, A> PlatformTypeListCall<'a, C, A> where C: BorrowMut, /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, PlatformTypesListResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -13703,8 +13700,7 @@ impl<'a, C, A> PlatformTypeListCall<'a, C, A> where C: BorrowMut, } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -13879,7 +13875,7 @@ impl<'a, C, A> CreativeFieldValuePatchCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, CreativeFieldValue)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -13961,8 +13957,7 @@ impl<'a, C, A> CreativeFieldValuePatchCall<'a, C, A> where C: BorrowMut CreativeFieldValueGetCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, CreativeFieldValue)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -14234,8 +14229,7 @@ impl<'a, C, A> CreativeFieldValueGetCall<'a, C, A> where C: BorrowMut CreativeFieldValueDeleteCall<'a, C, A> where C: BorrowMut Result { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -14493,8 +14487,7 @@ impl<'a, C, A> CreativeFieldValueDeleteCall<'a, C, A> where C: BorrowMut CreativeFieldValueInsertCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, CreativeFieldValue)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -14759,8 +14752,7 @@ impl<'a, C, A> CreativeFieldValueInsertCall<'a, C, A> where C: BorrowMut CreativeFieldValueUpdateCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, CreativeFieldValue)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -15038,8 +15030,7 @@ impl<'a, C, A> CreativeFieldValueUpdateCall<'a, C, A> where C: BorrowMut CreativeFieldValueListCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, CreativeFieldValuesListResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -15331,8 +15322,7 @@ impl<'a, C, A> CreativeFieldValueListCall<'a, C, A> where C: BorrowMut CreativeFieldUpdateCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, CreativeField)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -15638,8 +15628,7 @@ impl<'a, C, A> CreativeFieldUpdateCall<'a, C, A> where C: BorrowMut CreativeFieldListCall<'a, C, A> where C: BorrowMut /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, CreativeFieldsListResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -15926,8 +15915,7 @@ impl<'a, C, A> CreativeFieldListCall<'a, C, A> where C: BorrowMut } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -16145,7 +16133,7 @@ impl<'a, C, A> CreativeFieldDeleteCall<'a, C, A> where C: BorrowMut Result { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -16214,8 +16202,7 @@ impl<'a, C, A> CreativeFieldDeleteCall<'a, C, A> where C: BorrowMut CreativeFieldGetCall<'a, C, A> where C: BorrowMut, /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, CreativeField)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -16452,8 +16439,7 @@ impl<'a, C, A> CreativeFieldGetCall<'a, C, A> where C: BorrowMut, } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -16636,7 +16622,7 @@ impl<'a, C, A> CreativeFieldInsertCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, CreativeField)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -16716,8 +16702,7 @@ impl<'a, C, A> CreativeFieldInsertCall<'a, C, A> where C: BorrowMut CreativeFieldPatchCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, CreativeField)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -16985,8 +16970,7 @@ impl<'a, C, A> CreativeFieldPatchCall<'a, C, A> where C: BorrowMut UserRoleInsertCall<'a, C, A> where C: BorrowMut, A /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, UserRole)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -17262,8 +17246,7 @@ impl<'a, C, A> UserRoleInsertCall<'a, C, A> where C: BorrowMut, A } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -17443,7 +17426,7 @@ impl<'a, C, A> UserRoleGetCall<'a, C, A> where C: BorrowMut, A: o /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, UserRole)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -17513,8 +17496,7 @@ impl<'a, C, A> UserRoleGetCall<'a, C, A> where C: BorrowMut, A: o } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -17697,7 +17679,7 @@ impl<'a, C, A> UserRoleUpdateCall<'a, C, A> where C: BorrowMut, A /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, UserRole)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -17777,8 +17759,7 @@ impl<'a, C, A> UserRoleUpdateCall<'a, C, A> where C: BorrowMut, A } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -17958,7 +17939,7 @@ impl<'a, C, A> UserRoleDeleteCall<'a, C, A> where C: BorrowMut, A /// Perform the operation you have build so far. pub fn doit(mut self) -> Result { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -18027,8 +18008,7 @@ impl<'a, C, A> UserRoleDeleteCall<'a, C, A> where C: BorrowMut, A } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Delete, &url) @@ -18202,7 +18182,7 @@ impl<'a, C, A> UserRolePatchCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, UserRole)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -18283,8 +18263,7 @@ impl<'a, C, A> UserRolePatchCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -18489,7 +18468,7 @@ impl<'a, C, A> UserRoleListCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, UserRolesListResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -18584,8 +18563,7 @@ impl<'a, C, A> UserRoleListCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -18809,7 +18787,7 @@ impl<'a, C, A> OperatingSystemVersionGetCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, OperatingSystemVersion)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -18879,8 +18857,7 @@ impl<'a, C, A> OperatingSystemVersionGetCall<'a, C, A> where C: BorrowMut OperatingSystemVersionListCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, OperatingSystemVersionsListResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -19125,8 +19102,7 @@ impl<'a, C, A> OperatingSystemVersionListCall<'a, C, A> where C: BorrowMut LandingPageGetCall<'a, C, A> where C: BorrowMut, A /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, LandingPage)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -19365,8 +19341,7 @@ impl<'a, C, A> LandingPageGetCall<'a, C, A> where C: BorrowMut, A } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -19560,7 +19535,7 @@ impl<'a, C, A> LandingPageUpdateCall<'a, C, A> where C: BorrowMut /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, LandingPage)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -19641,8 +19616,7 @@ impl<'a, C, A> LandingPageUpdateCall<'a, C, A> where C: BorrowMut } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -19832,7 +19806,7 @@ impl<'a, C, A> LandingPageListCall<'a, C, A> where C: BorrowMut, /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, LandingPagesListResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -19902,8 +19876,7 @@ impl<'a, C, A> LandingPageListCall<'a, C, A> where C: BorrowMut, } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -20087,7 +20060,7 @@ impl<'a, C, A> LandingPageInsertCall<'a, C, A> where C: BorrowMut /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, LandingPage)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -20168,8 +20141,7 @@ impl<'a, C, A> LandingPageInsertCall<'a, C, A> where C: BorrowMut } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -20367,7 +20339,7 @@ impl<'a, C, A> LandingPagePatchCall<'a, C, A> where C: BorrowMut, /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, LandingPage)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -20449,8 +20421,7 @@ impl<'a, C, A> LandingPagePatchCall<'a, C, A> where C: BorrowMut, } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -20651,7 +20622,7 @@ impl<'a, C, A> LandingPageDeleteCall<'a, C, A> where C: BorrowMut /// Perform the operation you have build so far. pub fn doit(mut self) -> Result { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -20721,8 +20692,7 @@ impl<'a, C, A> LandingPageDeleteCall<'a, C, A> where C: BorrowMut } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Delete, &url) @@ -20908,7 +20878,7 @@ impl<'a, C, A> CreativeAssetInsertCall<'a, C, A> where C: BorrowMut(mut self, mut reader: RS, reader_mime_type: mime::Mime, protocol: &'static str) -> Result<(hyper::client::Response, CreativeAssetMetadata)> where RS: ReadSeek { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -21000,8 +20970,7 @@ impl<'a, C, A> CreativeAssetInsertCall<'a, C, A> where C: BorrowMut CampaignCreativeAssociationInsertCall<'a, C, A> where C: BorrowMu /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, CampaignCreativeAssociation)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -21380,8 +21349,7 @@ impl<'a, C, A> CampaignCreativeAssociationInsertCall<'a, C, A> where C: BorrowMu } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -21577,7 +21545,7 @@ impl<'a, C, A> CampaignCreativeAssociationListCall<'a, C, A> where C: BorrowMut< /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, CampaignCreativeAssociationsListResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -21656,8 +21624,7 @@ impl<'a, C, A> CampaignCreativeAssociationListCall<'a, C, A> where C: BorrowMut< } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -21874,7 +21841,7 @@ impl<'a, C, A> ChangeLogListCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, ChangeLogsListResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -21979,8 +21946,7 @@ impl<'a, C, A> ChangeLogListCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -22220,7 +22186,7 @@ impl<'a, C, A> ChangeLogGetCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, ChangeLog)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -22290,8 +22256,7 @@ impl<'a, C, A> ChangeLogGetCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -22468,7 +22433,7 @@ impl<'a, C, A> RemarketingListShareGetCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, RemarketingListShare)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -22538,8 +22503,7 @@ impl<'a, C, A> RemarketingListShareGetCall<'a, C, A> where C: BorrowMut RemarketingListSharePatchCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, RemarketingListShare)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -22804,8 +22768,7 @@ impl<'a, C, A> RemarketingListSharePatchCall<'a, C, A> where C: BorrowMut RemarketingListShareUpdateCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, RemarketingListShare)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -23081,8 +23044,7 @@ impl<'a, C, A> RemarketingListShareUpdateCall<'a, C, A> where C: BorrowMut ReportRunCall<'a, C, A> where C: BorrowMut, A: oau /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, File)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -23337,8 +23299,7 @@ impl<'a, C, A> ReportRunCall<'a, C, A> where C: BorrowMut, A: oau } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Post, &url) @@ -23529,7 +23490,7 @@ impl<'a, C, A> ReportPatchCall<'a, C, A> where C: BorrowMut, A: o /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Report)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -23610,8 +23571,7 @@ impl<'a, C, A> ReportPatchCall<'a, C, A> where C: BorrowMut, A: o } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -23809,7 +23769,7 @@ impl<'a, C, A> ReportFileListCall<'a, C, A> where C: BorrowMut, A /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, FileList)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -23891,8 +23851,7 @@ impl<'a, C, A> ReportFileListCall<'a, C, A> where C: BorrowMut, A } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -24103,7 +24062,7 @@ impl<'a, C, A> ReportInsertCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Report)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -24183,8 +24142,7 @@ impl<'a, C, A> ReportInsertCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -24371,7 +24329,7 @@ impl<'a, C, A> ReportUpdateCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Report)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -24452,8 +24410,7 @@ impl<'a, C, A> ReportUpdateCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -24649,7 +24606,7 @@ impl<'a, C, A> ReportCompatibleFieldQueryCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, CompatibleFields)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -24729,8 +24686,7 @@ impl<'a, C, A> ReportCompatibleFieldQueryCall<'a, C, A> where C: BorrowMut ReportGetCall<'a, C, A> where C: BorrowMut, A: oau /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Report)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -24980,8 +24936,7 @@ impl<'a, C, A> ReportGetCall<'a, C, A> where C: BorrowMut, A: oau } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -25164,7 +25119,7 @@ impl<'a, C, A> ReportFileGetCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, File)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -25251,8 +25206,7 @@ impl<'a, C, A> ReportFileGetCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -25439,7 +25393,7 @@ impl<'a, C, A> ReportDeleteCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -25508,8 +25462,7 @@ impl<'a, C, A> ReportDeleteCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Delete, &url) @@ -25685,7 +25638,7 @@ impl<'a, C, A> ReportListCall<'a, C, A> where C: BorrowMut, A: oa /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, ReportList)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -25769,8 +25722,7 @@ impl<'a, C, A> ReportListCall<'a, C, A> where C: BorrowMut, A: oa } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -25978,7 +25930,7 @@ impl<'a, C, A> AdvertiserInsertCall<'a, C, A> where C: BorrowMut, /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Advertiser)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -26058,8 +26010,7 @@ impl<'a, C, A> AdvertiserInsertCall<'a, C, A> where C: BorrowMut, } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -26246,7 +26197,7 @@ impl<'a, C, A> AdvertiserPatchCall<'a, C, A> where C: BorrowMut, /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Advertiser)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -26327,8 +26278,7 @@ impl<'a, C, A> AdvertiserPatchCall<'a, C, A> where C: BorrowMut, } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -26541,7 +26491,7 @@ impl<'a, C, A> AdvertiserListCall<'a, C, A> where C: BorrowMut, A /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, AdvertisersListResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -26652,8 +26602,7 @@ impl<'a, C, A> AdvertiserListCall<'a, C, A> where C: BorrowMut, A } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -26913,7 +26862,7 @@ impl<'a, C, A> AdvertiserUpdateCall<'a, C, A> where C: BorrowMut, /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Advertiser)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -26993,8 +26942,7 @@ impl<'a, C, A> AdvertiserUpdateCall<'a, C, A> where C: BorrowMut, } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -27174,7 +27122,7 @@ impl<'a, C, A> AdvertiserGetCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Advertiser)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -27244,8 +27192,7 @@ impl<'a, C, A> AdvertiserGetCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -27432,7 +27379,7 @@ impl<'a, C, A> DimensionValueQueryCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, DimensionValueList)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -27518,8 +27465,7 @@ impl<'a, C, A> DimensionValueQueryCall<'a, C, A> where C: BorrowMut FloodlightActivityGroupGetCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, FloodlightActivityGroup)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -27783,8 +27729,7 @@ impl<'a, C, A> FloodlightActivityGroupGetCall<'a, C, A> where C: BorrowMut FloodlightActivityGroupPatchCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, FloodlightActivityGroup)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -28049,8 +27994,7 @@ impl<'a, C, A> FloodlightActivityGroupPatchCall<'a, C, A> where C: BorrowMut FloodlightActivityGroupListCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, FloodlightActivityGroupsListResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -28355,8 +28299,7 @@ impl<'a, C, A> FloodlightActivityGroupListCall<'a, C, A> where C: BorrowMut FloodlightActivityGroupInsertCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, FloodlightActivityGroup)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -28673,8 +28616,7 @@ impl<'a, C, A> FloodlightActivityGroupInsertCall<'a, C, A> where C: BorrowMut FloodlightActivityGroupUpdateCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, FloodlightActivityGroup)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -28940,8 +28882,7 @@ impl<'a, C, A> FloodlightActivityGroupUpdateCall<'a, C, A> where C: BorrowMut MetroListCall<'a, C, A> where C: BorrowMut, A: oau /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, MetrosListResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -29189,8 +29130,7 @@ impl<'a, C, A> MetroListCall<'a, C, A> where C: BorrowMut, A: oau } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -29371,7 +29311,7 @@ impl<'a, C, A> OrderListCall<'a, C, A> where C: BorrowMut, A: oau /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, OrdersListResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -29466,8 +29406,7 @@ impl<'a, C, A> OrderListCall<'a, C, A> where C: BorrowMut, A: oau } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -29696,7 +29635,7 @@ impl<'a, C, A> OrderGetCall<'a, C, A> where C: BorrowMut, A: oaut /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Order)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -29767,8 +29706,7 @@ impl<'a, C, A> OrderGetCall<'a, C, A> where C: BorrowMut, A: oaut } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -29955,7 +29893,7 @@ impl<'a, C, A> DirectorySiteContactGetCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, DirectorySiteContact)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -30025,8 +29963,7 @@ impl<'a, C, A> DirectorySiteContactGetCall<'a, C, A> where C: BorrowMut DirectorySiteContactListCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, DirectorySiteContactsListResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -30310,8 +30247,7 @@ impl<'a, C, A> DirectorySiteContactListCall<'a, C, A> where C: BorrowMut UserProfileListCall<'a, C, A> where C: BorrowMut, /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, UserProfileList)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -30574,8 +30510,7 @@ impl<'a, C, A> UserProfileListCall<'a, C, A> where C: BorrowMut, } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -30731,7 +30666,7 @@ impl<'a, C, A> UserProfileGetCall<'a, C, A> where C: BorrowMut, A /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, UserProfile)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -30800,8 +30735,7 @@ impl<'a, C, A> UserProfileGetCall<'a, C, A> where C: BorrowMut, A } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -30975,7 +30909,7 @@ impl<'a, C, A> AdPatchCall<'a, C, A> where C: BorrowMut, A: oauth /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Ad)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -31056,8 +30990,7 @@ impl<'a, C, A> AdPatchCall<'a, C, A> where C: BorrowMut, A: oauth } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -31253,7 +31186,7 @@ impl<'a, C, A> AdInsertCall<'a, C, A> where C: BorrowMut, A: oaut /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Ad)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -31333,8 +31266,7 @@ impl<'a, C, A> AdInsertCall<'a, C, A> where C: BorrowMut, A: oaut } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -31561,7 +31493,7 @@ impl<'a, C, A> AdListCall<'a, C, A> where C: BorrowMut, A: oauth2 /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, AdsListResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -31722,8 +31654,7 @@ impl<'a, C, A> AdListCall<'a, C, A> where C: BorrowMut, A: oauth2 } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -32068,7 +31999,7 @@ impl<'a, C, A> AdGetCall<'a, C, A> where C: BorrowMut, A: oauth2: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Ad)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -32138,8 +32069,7 @@ impl<'a, C, A> AdGetCall<'a, C, A> where C: BorrowMut, A: oauth2: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -32322,7 +32252,7 @@ impl<'a, C, A> AdUpdateCall<'a, C, A> where C: BorrowMut, A: oaut /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Ad)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -32402,8 +32332,7 @@ impl<'a, C, A> AdUpdateCall<'a, C, A> where C: BorrowMut, A: oaut } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -32583,7 +32512,7 @@ impl<'a, C, A> AccountPermissionGetCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, AccountPermission)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -32653,8 +32582,7 @@ impl<'a, C, A> AccountPermissionGetCall<'a, C, A> where C: BorrowMut AccountPermissionListCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, AccountPermissionsListResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -32899,8 +32827,7 @@ impl<'a, C, A> AccountPermissionListCall<'a, C, A> where C: BorrowMut ConnectionTypeListCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, ConnectionTypesListResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -33135,8 +33062,7 @@ impl<'a, C, A> ConnectionTypeListCall<'a, C, A> where C: BorrowMut ConnectionTypeGetCall<'a, C, A> where C: BorrowMut /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, ConnectionType)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -33373,8 +33299,7 @@ impl<'a, C, A> ConnectionTypeGetCall<'a, C, A> where C: BorrowMut } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -33551,7 +33476,7 @@ impl<'a, C, A> AdvertiserGroupGetCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, AdvertiserGroup)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -33621,8 +33546,7 @@ impl<'a, C, A> AdvertiserGroupGetCall<'a, C, A> where C: BorrowMut AdvertiserGroupListCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, AdvertiserGroupsListResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -33899,8 +33823,7 @@ impl<'a, C, A> AdvertiserGroupListCall<'a, C, A> where C: BorrowMut AdvertiserGroupInsertCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, AdvertiserGroup)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -34196,8 +34119,7 @@ impl<'a, C, A> AdvertiserGroupInsertCall<'a, C, A> where C: BorrowMut AdvertiserGroupUpdateCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, AdvertiserGroup)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -34463,8 +34385,7 @@ impl<'a, C, A> AdvertiserGroupUpdateCall<'a, C, A> where C: BorrowMut AdvertiserGroupPatchCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, AdvertiserGroup)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -34732,8 +34653,7 @@ impl<'a, C, A> AdvertiserGroupPatchCall<'a, C, A> where C: BorrowMut AdvertiserGroupDeleteCall<'a, C, A> where C: BorrowMut Result { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -34992,8 +34912,7 @@ impl<'a, C, A> AdvertiserGroupDeleteCall<'a, C, A> where C: BorrowMut SiteInsertCall<'a, C, A> where C: BorrowMut, A: oa /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Site)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -35246,8 +35165,7 @@ impl<'a, C, A> SiteInsertCall<'a, C, A> where C: BorrowMut, A: oa } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -35427,7 +35345,7 @@ impl<'a, C, A> SiteGetCall<'a, C, A> where C: BorrowMut, A: oauth /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Site)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -35497,8 +35415,7 @@ impl<'a, C, A> SiteGetCall<'a, C, A> where C: BorrowMut, A: oauth } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -35704,7 +35621,7 @@ impl<'a, C, A> SiteListCall<'a, C, A> where C: BorrowMut, A: oaut /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, SitesListResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -35824,8 +35741,7 @@ impl<'a, C, A> SiteListCall<'a, C, A> where C: BorrowMut, A: oaut } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -36106,7 +36022,7 @@ impl<'a, C, A> SiteUpdateCall<'a, C, A> where C: BorrowMut, A: oa /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Site)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -36186,8 +36102,7 @@ impl<'a, C, A> SiteUpdateCall<'a, C, A> where C: BorrowMut, A: oa } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -36374,7 +36289,7 @@ impl<'a, C, A> SitePatchCall<'a, C, A> where C: BorrowMut, A: oau /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Site)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -36455,8 +36370,7 @@ impl<'a, C, A> SitePatchCall<'a, C, A> where C: BorrowMut, A: oau } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -36646,7 +36560,7 @@ impl<'a, C, A> FloodlightActivityGetCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, FloodlightActivity)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -36716,8 +36630,7 @@ impl<'a, C, A> FloodlightActivityGetCall<'a, C, A> where C: BorrowMut FloodlightActivityListCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, FloodlightActivitiesListResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -37031,8 +36944,7 @@ impl<'a, C, A> FloodlightActivityListCall<'a, C, A> where C: BorrowMut FloodlightActivityInsertCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, FloodlightActivity)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -37378,8 +37290,7 @@ impl<'a, C, A> FloodlightActivityInsertCall<'a, C, A> where C: BorrowMut FloodlightActivityDeleteCall<'a, C, A> where C: BorrowMut Result { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -37628,8 +37539,7 @@ impl<'a, C, A> FloodlightActivityDeleteCall<'a, C, A> where C: BorrowMut FloodlightActivityPatchCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, FloodlightActivity)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -37884,8 +37794,7 @@ impl<'a, C, A> FloodlightActivityPatchCall<'a, C, A> where C: BorrowMut FloodlightActivityGeneratetagCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, FloodlightActivitiesGenerateTagResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -38148,8 +38057,7 @@ impl<'a, C, A> FloodlightActivityGeneratetagCall<'a, C, A> where C: BorrowMut FloodlightActivityUpdateCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, FloodlightActivity)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -38409,8 +38317,7 @@ impl<'a, C, A> FloodlightActivityUpdateCall<'a, C, A> where C: BorrowMut RegionListCall<'a, C, A> where C: BorrowMut, A: oa /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, RegionsListResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -38658,8 +38565,7 @@ impl<'a, C, A> RegionListCall<'a, C, A> where C: BorrowMut, A: oa } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -38832,7 +38738,7 @@ impl<'a, C, A> CreativeGroupInsertCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, CreativeGroup)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -38912,8 +38818,7 @@ impl<'a, C, A> CreativeGroupInsertCall<'a, C, A> where C: BorrowMut CreativeGroupGetCall<'a, C, A> where C: BorrowMut, /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, CreativeGroup)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -39163,8 +39068,7 @@ impl<'a, C, A> CreativeGroupGetCall<'a, C, A> where C: BorrowMut, } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -39347,7 +39251,7 @@ impl<'a, C, A> CreativeGroupUpdateCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, CreativeGroup)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -39427,8 +39331,7 @@ impl<'a, C, A> CreativeGroupUpdateCall<'a, C, A> where C: BorrowMut CreativeGroupListCall<'a, C, A> where C: BorrowMut /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, CreativeGroupsListResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -39720,8 +39623,7 @@ impl<'a, C, A> CreativeGroupListCall<'a, C, A> where C: BorrowMut } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -39953,7 +39855,7 @@ impl<'a, C, A> CreativeGroupPatchCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, CreativeGroup)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -40034,8 +39936,7 @@ impl<'a, C, A> CreativeGroupPatchCall<'a, C, A> where C: BorrowMut TargetableRemarketingListListCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, TargetableRemarketingListsListResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -40325,8 +40226,7 @@ impl<'a, C, A> TargetableRemarketingListListCall<'a, C, A> where C: BorrowMut TargetableRemarketingListGetCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, TargetableRemarketingList)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -40615,8 +40515,7 @@ impl<'a, C, A> TargetableRemarketingListGetCall<'a, C, A> where C: BorrowMut SubaccountPatchCall<'a, C, A> where C: BorrowMut, /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Subaccount)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -40881,8 +40780,7 @@ impl<'a, C, A> SubaccountPatchCall<'a, C, A> where C: BorrowMut, } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -41078,7 +40976,7 @@ impl<'a, C, A> SubaccountInsertCall<'a, C, A> where C: BorrowMut, /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Subaccount)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -41158,8 +41056,7 @@ impl<'a, C, A> SubaccountInsertCall<'a, C, A> where C: BorrowMut, } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -41350,7 +41247,7 @@ impl<'a, C, A> SubaccountListCall<'a, C, A> where C: BorrowMut, A /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, SubaccountsListResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -41439,8 +41336,7 @@ impl<'a, C, A> SubaccountListCall<'a, C, A> where C: BorrowMut, A } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -41656,7 +41552,7 @@ impl<'a, C, A> SubaccountUpdateCall<'a, C, A> where C: BorrowMut, /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Subaccount)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -41736,8 +41632,7 @@ impl<'a, C, A> SubaccountUpdateCall<'a, C, A> where C: BorrowMut, } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -41917,7 +41812,7 @@ impl<'a, C, A> SubaccountGetCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Subaccount)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -41987,8 +41882,7 @@ impl<'a, C, A> SubaccountGetCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -42165,7 +42059,7 @@ impl<'a, C, A> MobileCarrierGetCall<'a, C, A> where C: BorrowMut, /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, MobileCarrier)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -42235,8 +42129,7 @@ impl<'a, C, A> MobileCarrierGetCall<'a, C, A> where C: BorrowMut, } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -42412,7 +42305,7 @@ impl<'a, C, A> MobileCarrierListCall<'a, C, A> where C: BorrowMut /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, MobileCarriersListResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -42481,8 +42374,7 @@ impl<'a, C, A> MobileCarrierListCall<'a, C, A> where C: BorrowMut } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -42649,7 +42541,7 @@ impl<'a, C, A> FloodlightConfigurationGetCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, FloodlightConfiguration)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -42719,8 +42611,7 @@ impl<'a, C, A> FloodlightConfigurationGetCall<'a, C, A> where C: BorrowMut FloodlightConfigurationUpdateCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, FloodlightConfiguration)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -42983,8 +42874,7 @@ impl<'a, C, A> FloodlightConfigurationUpdateCall<'a, C, A> where C: BorrowMut FloodlightConfigurationPatchCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, FloodlightConfiguration)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -43252,8 +43142,7 @@ impl<'a, C, A> FloodlightConfigurationPatchCall<'a, C, A> where C: BorrowMut FloodlightConfigurationListCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, FloodlightConfigurationsListResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -43518,8 +43407,7 @@ impl<'a, C, A> FloodlightConfigurationListCall<'a, C, A> where C: BorrowMut OperatingSystemListCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, OperatingSystemsListResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -43762,8 +43650,7 @@ impl<'a, C, A> OperatingSystemListCall<'a, C, A> where C: BorrowMut OperatingSystemGetCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, OperatingSystem)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -44000,8 +43887,7 @@ impl<'a, C, A> OperatingSystemGetCall<'a, C, A> where C: BorrowMut FileListCall<'a, C, A> where C: BorrowMut, A: oaut /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, FileList)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -44271,8 +44157,7 @@ impl<'a, C, A> FileListCall<'a, C, A> where C: BorrowMut, A: oaut } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -44479,7 +44364,7 @@ impl<'a, C, A> FileGetCall<'a, C, A> where C: BorrowMut, A: oauth /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, File)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -44565,8 +44450,7 @@ impl<'a, C, A> FileGetCall<'a, C, A> where C: BorrowMut, A: oauth } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -44780,7 +44664,7 @@ impl<'a, C, A> PlacementGroupListCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, PlacementGroupsListResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -44922,8 +44806,7 @@ impl<'a, C, A> PlacementGroupListCall<'a, C, A> where C: BorrowMut PlacementGroupUpdateCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, PlacementGroup)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -45317,8 +45200,7 @@ impl<'a, C, A> PlacementGroupUpdateCall<'a, C, A> where C: BorrowMut PlacementGroupInsertCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, PlacementGroup)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -45584,8 +45466,7 @@ impl<'a, C, A> PlacementGroupInsertCall<'a, C, A> where C: BorrowMut PlacementGroupGetCall<'a, C, A> where C: BorrowMut /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, PlacementGroup)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -45835,8 +45716,7 @@ impl<'a, C, A> PlacementGroupGetCall<'a, C, A> where C: BorrowMut } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -46020,7 +45900,7 @@ impl<'a, C, A> PlacementGroupPatchCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, PlacementGroup)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -46101,8 +45981,7 @@ impl<'a, C, A> PlacementGroupPatchCall<'a, C, A> where C: BorrowMut InventoryItemListCall<'a, C, A> where C: BorrowMut /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, InventoryItemsListResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -46408,8 +46287,7 @@ impl<'a, C, A> InventoryItemListCall<'a, C, A> where C: BorrowMut } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -46646,7 +46524,7 @@ impl<'a, C, A> InventoryItemGetCall<'a, C, A> where C: BorrowMut, /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, InventoryItem)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -46717,8 +46595,7 @@ impl<'a, C, A> InventoryItemGetCall<'a, C, A> where C: BorrowMut, } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -46905,7 +46782,7 @@ impl<'a, C, A> UserRolePermissionGetCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, UserRolePermission)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -46975,8 +46852,7 @@ impl<'a, C, A> UserRolePermissionGetCall<'a, C, A> where C: BorrowMut UserRolePermissionListCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, UserRolePermissionsListResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -47228,8 +47104,7 @@ impl<'a, C, A> UserRolePermissionListCall<'a, C, A> where C: BorrowMut AccountPermissionGroupListCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, AccountPermissionGroupsListResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -47472,8 +47347,7 @@ impl<'a, C, A> AccountPermissionGroupListCall<'a, C, A> where C: BorrowMut AccountPermissionGroupGetCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, AccountPermissionGroup)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -47710,8 +47584,7 @@ impl<'a, C, A> AccountPermissionGroupGetCall<'a, C, A> where C: BorrowMut ContentCategoryListCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, ContentCategoriesListResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -47988,8 +47861,7 @@ impl<'a, C, A> ContentCategoryListCall<'a, C, A> where C: BorrowMut ContentCategoryUpdateCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, ContentCategory)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -48285,8 +48157,7 @@ impl<'a, C, A> ContentCategoryUpdateCall<'a, C, A> where C: BorrowMut ContentCategoryInsertCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, ContentCategory)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -48552,8 +48423,7 @@ impl<'a, C, A> ContentCategoryInsertCall<'a, C, A> where C: BorrowMut ContentCategoryDeleteCall<'a, C, A> where C: BorrowMut Result { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -48802,8 +48672,7 @@ impl<'a, C, A> ContentCategoryDeleteCall<'a, C, A> where C: BorrowMut ContentCategoryGetCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, ContentCategory)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -49040,8 +48909,7 @@ impl<'a, C, A> ContentCategoryGetCall<'a, C, A> where C: BorrowMut ContentCategoryPatchCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, ContentCategory)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -49306,8 +49174,7 @@ impl<'a, C, A> ContentCategoryPatchCall<'a, C, A> where C: BorrowMut CreativeUpdateCall<'a, C, A> where C: BorrowMut, A /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Creative)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -49583,8 +49450,7 @@ impl<'a, C, A> CreativeUpdateCall<'a, C, A> where C: BorrowMut, A } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -49770,7 +49636,7 @@ impl<'a, C, A> CreativeInsertCall<'a, C, A> where C: BorrowMut, A /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Creative)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -49850,8 +49716,7 @@ impl<'a, C, A> CreativeInsertCall<'a, C, A> where C: BorrowMut, A } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -50031,7 +49896,7 @@ impl<'a, C, A> CreativeGetCall<'a, C, A> where C: BorrowMut, A: o /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Creative)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -50101,8 +49966,7 @@ impl<'a, C, A> CreativeGetCall<'a, C, A> where C: BorrowMut, A: o } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -50310,7 +50174,7 @@ impl<'a, C, A> CreativeListCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, CreativesListResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -50439,8 +50303,7 @@ impl<'a, C, A> CreativeListCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -50732,7 +50595,7 @@ impl<'a, C, A> CreativePatchCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Creative)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -50813,8 +50676,7 @@ impl<'a, C, A> CreativePatchCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -51004,7 +50866,7 @@ impl<'a, C, A> CampaignGetCall<'a, C, A> where C: BorrowMut, A: o /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Campaign)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -51074,8 +50936,7 @@ impl<'a, C, A> CampaignGetCall<'a, C, A> where C: BorrowMut, A: o } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -51260,7 +51121,7 @@ impl<'a, C, A> CampaignInsertCall<'a, C, A> where C: BorrowMut, A /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Campaign)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -51342,8 +51203,7 @@ impl<'a, C, A> CampaignInsertCall<'a, C, A> where C: BorrowMut, A } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -51550,7 +51410,7 @@ impl<'a, C, A> CampaignPatchCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Campaign)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -51631,8 +51491,7 @@ impl<'a, C, A> CampaignPatchCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -51828,7 +51687,7 @@ impl<'a, C, A> CampaignUpdateCall<'a, C, A> where C: BorrowMut, A /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Campaign)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -51908,8 +51767,7 @@ impl<'a, C, A> CampaignUpdateCall<'a, C, A> where C: BorrowMut, A } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -52114,7 +51972,7 @@ impl<'a, C, A> CampaignListCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, CampaignsListResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -52230,8 +52088,7 @@ impl<'a, C, A> CampaignListCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -52493,7 +52350,7 @@ impl<'a, C, A> EventTagDeleteCall<'a, C, A> where C: BorrowMut, A /// Perform the operation you have build so far. pub fn doit(mut self) -> Result { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -52562,8 +52419,7 @@ impl<'a, C, A> EventTagDeleteCall<'a, C, A> where C: BorrowMut, A } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Delete, &url) @@ -52749,7 +52605,7 @@ impl<'a, C, A> EventTagListCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, EventTagsListResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -52852,8 +52708,7 @@ impl<'a, C, A> EventTagListCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -53098,7 +52953,7 @@ impl<'a, C, A> EventTagInsertCall<'a, C, A> where C: BorrowMut, A /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, EventTag)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -53178,8 +53033,7 @@ impl<'a, C, A> EventTagInsertCall<'a, C, A> where C: BorrowMut, A } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -53366,7 +53220,7 @@ impl<'a, C, A> EventTagPatchCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, EventTag)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -53447,8 +53301,7 @@ impl<'a, C, A> EventTagPatchCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -53644,7 +53497,7 @@ impl<'a, C, A> EventTagUpdateCall<'a, C, A> where C: BorrowMut, A /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, EventTag)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -53724,8 +53577,7 @@ impl<'a, C, A> EventTagUpdateCall<'a, C, A> where C: BorrowMut, A } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -53905,7 +53757,7 @@ impl<'a, C, A> EventTagGetCall<'a, C, A> where C: BorrowMut, A: o /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, EventTag)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -53975,8 +53827,7 @@ impl<'a, C, A> EventTagGetCall<'a, C, A> where C: BorrowMut, A: o } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -54153,7 +54004,7 @@ impl<'a, C, A> RemarketingListGetCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, RemarketingList)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -54223,8 +54074,7 @@ impl<'a, C, A> RemarketingListGetCall<'a, C, A> where C: BorrowMut RemarketingListUpdateCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, RemarketingList)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -54487,8 +54337,7 @@ impl<'a, C, A> RemarketingListUpdateCall<'a, C, A> where C: BorrowMut RemarketingListListCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, RemarketingListsListResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -54773,8 +54622,7 @@ impl<'a, C, A> RemarketingListListCall<'a, C, A> where C: BorrowMut RemarketingListPatchCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, RemarketingList)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -55088,8 +54936,7 @@ impl<'a, C, A> RemarketingListPatchCall<'a, C, A> where C: BorrowMut RemarketingListInsertCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, RemarketingList)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -55365,8 +55212,7 @@ impl<'a, C, A> RemarketingListInsertCall<'a, C, A> where C: BorrowMut CityListCall<'a, C, A> where C: BorrowMut, A: oaut /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, CitiesListResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -55640,8 +55486,7 @@ impl<'a, C, A> CityListCall<'a, C, A> where C: BorrowMut, A: oaut } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -55845,7 +55690,7 @@ impl<'a, C, A> PlacementStrategyUpdateCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, PlacementStrategy)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -55925,8 +55770,7 @@ impl<'a, C, A> PlacementStrategyUpdateCall<'a, C, A> where C: BorrowMut PlacementStrategyGetCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, PlacementStrategy)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -56176,8 +56020,7 @@ impl<'a, C, A> PlacementStrategyGetCall<'a, C, A> where C: BorrowMut PlacementStrategyListCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, PlacementStrategiesListResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -56454,8 +56297,7 @@ impl<'a, C, A> PlacementStrategyListCall<'a, C, A> where C: BorrowMut PlacementStrategyDeleteCall<'a, C, A> where C: BorrowMut Result { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -56734,8 +56576,7 @@ impl<'a, C, A> PlacementStrategyDeleteCall<'a, C, A> where C: BorrowMut PlacementStrategyInsertCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, PlacementStrategy)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -56988,8 +56829,7 @@ impl<'a, C, A> PlacementStrategyInsertCall<'a, C, A> where C: BorrowMut PlacementStrategyPatchCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, PlacementStrategy)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -57257,8 +57097,7 @@ impl<'a, C, A> PlacementStrategyPatchCall<'a, C, A> where C: BorrowMut ProjectListCall<'a, C, A> where C: BorrowMut, A: o /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, ProjectsListResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -57555,8 +57394,7 @@ impl<'a, C, A> ProjectListCall<'a, C, A> where C: BorrowMut, A: o } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -57774,7 +57612,7 @@ impl<'a, C, A> ProjectGetCall<'a, C, A> where C: BorrowMut, A: oa /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Project)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -57844,8 +57682,7 @@ impl<'a, C, A> ProjectGetCall<'a, C, A> where C: BorrowMut, A: oa } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -58028,7 +57865,7 @@ impl<'a, C, A> DirectorySiteInsertCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, DirectorySite)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -58108,8 +57945,7 @@ impl<'a, C, A> DirectorySiteInsertCall<'a, C, A> where C: BorrowMut DirectorySiteListCall<'a, C, A> where C: BorrowMut /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, DirectorySitesListResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -58424,8 +58260,7 @@ impl<'a, C, A> DirectorySiteListCall<'a, C, A> where C: BorrowMut } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -58684,7 +58519,7 @@ impl<'a, C, A> DirectorySiteGetCall<'a, C, A> where C: BorrowMut, /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, DirectorySite)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -58754,8 +58589,7 @@ impl<'a, C, A> DirectorySiteGetCall<'a, C, A> where C: BorrowMut, } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -58938,7 +58772,7 @@ impl<'a, C, A> SizeInsertCall<'a, C, A> where C: BorrowMut, A: oa /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Size)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -59018,8 +58852,7 @@ impl<'a, C, A> SizeInsertCall<'a, C, A> where C: BorrowMut, A: oa } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -59206,7 +59039,7 @@ impl<'a, C, A> SizeListCall<'a, C, A> where C: BorrowMut, A: oaut /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, SizesListResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -59289,8 +59122,7 @@ impl<'a, C, A> SizeListCall<'a, C, A> where C: BorrowMut, A: oaut } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -59486,7 +59318,7 @@ impl<'a, C, A> SizeGetCall<'a, C, A> where C: BorrowMut, A: oauth /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Size)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -59556,8 +59388,7 @@ impl<'a, C, A> SizeGetCall<'a, C, A> where C: BorrowMut, A: oauth } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -59734,7 +59565,7 @@ impl<'a, C, A> AccountActiveAdSummaryGetCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, AccountActiveAdSummary)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -59804,8 +59635,7 @@ impl<'a, C, A> AccountActiveAdSummaryGetCall<'a, C, A> where C: BorrowMut AccountUserProfileUpdateCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, AccountUserProfile)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -60068,8 +59898,7 @@ impl<'a, C, A> AccountUserProfileUpdateCall<'a, C, A> where C: BorrowMut AccountUserProfileListCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, AccountUserProfilesListResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -60364,8 +60193,7 @@ impl<'a, C, A> AccountUserProfileListCall<'a, C, A> where C: BorrowMut AccountUserProfileInsertCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, AccountUserProfile)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -60682,8 +60510,7 @@ impl<'a, C, A> AccountUserProfileInsertCall<'a, C, A> where C: BorrowMut AccountUserProfilePatchCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, AccountUserProfile)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -60951,8 +60778,7 @@ impl<'a, C, A> AccountUserProfilePatchCall<'a, C, A> where C: BorrowMut AccountUserProfileGetCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, AccountUserProfile)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -61212,8 +61038,7 @@ impl<'a, C, A> AccountUserProfileGetCall<'a, C, A> where C: BorrowMut CountryListCall<'a, C, A> where C: BorrowMut, A: o /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, CountriesListResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -61458,8 +61283,7 @@ impl<'a, C, A> CountryListCall<'a, C, A> where C: BorrowMut, A: o } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -61626,7 +61450,7 @@ impl<'a, C, A> CountryGetCall<'a, C, A> where C: BorrowMut, A: oa /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Country)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -61696,8 +61520,7 @@ impl<'a, C, A> CountryGetCall<'a, C, A> where C: BorrowMut, A: oa } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -61875,7 +61698,7 @@ impl<'a, C, A> OrderDocumentGetCall<'a, C, A> where C: BorrowMut, /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, OrderDocument)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -61946,8 +61769,7 @@ impl<'a, C, A> OrderDocumentGetCall<'a, C, A> where C: BorrowMut, } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -62152,7 +61974,7 @@ impl<'a, C, A> OrderDocumentListCall<'a, C, A> where C: BorrowMut /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, OrderDocumentsListResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -62255,8 +62077,7 @@ impl<'a, C, A> OrderDocumentListCall<'a, C, A> where C: BorrowMut } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -62499,7 +62320,7 @@ impl<'a, C, A> PostalCodeGetCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, PostalCode)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -62569,8 +62390,7 @@ impl<'a, C, A> PostalCodeGetCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -62746,7 +62566,7 @@ impl<'a, C, A> PostalCodeListCall<'a, C, A> where C: BorrowMut, A /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, PostalCodesListResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -62815,8 +62635,7 @@ impl<'a, C, A> PostalCodeListCall<'a, C, A> where C: BorrowMut, A } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -62982,7 +62801,7 @@ impl<'a, C, A> BrowserListCall<'a, C, A> where C: BorrowMut, A: o /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, BrowsersListResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -63051,8 +62870,7 @@ impl<'a, C, A> BrowserListCall<'a, C, A> where C: BorrowMut, A: o } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -63219,7 +63037,7 @@ impl<'a, C, A> AccountGetCall<'a, C, A> where C: BorrowMut, A: oa /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Account)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -63289,8 +63107,7 @@ impl<'a, C, A> AccountGetCall<'a, C, A> where C: BorrowMut, A: oa } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -63480,7 +63297,7 @@ impl<'a, C, A> AccountListCall<'a, C, A> where C: BorrowMut, A: o /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, AccountsListResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -63572,8 +63389,7 @@ impl<'a, C, A> AccountListCall<'a, C, A> where C: BorrowMut, A: o } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -63796,7 +63612,7 @@ impl<'a, C, A> AccountUpdateCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Account)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -63876,8 +63692,7 @@ impl<'a, C, A> AccountUpdateCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -64064,7 +63879,7 @@ impl<'a, C, A> AccountPatchCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Account)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -64145,8 +63960,7 @@ impl<'a, C, A> AccountPatchCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -64343,7 +64157,7 @@ impl<'a, C, A> PlacementPatchCall<'a, C, A> where C: BorrowMut, A /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Placement)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -64424,8 +64238,7 @@ impl<'a, C, A> PlacementPatchCall<'a, C, A> where C: BorrowMut, A } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -64658,7 +64471,7 @@ impl<'a, C, A> PlacementListCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, PlacementsListResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -64815,8 +64628,7 @@ impl<'a, C, A> PlacementListCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -65016,7 +64828,7 @@ impl<'a, C, A> PlacementListCall<'a, C, A> where C: BorrowMut, A: self._content_category_ids.push(new_value.to_string()); self } - /// Select only placements that are associated with these compatibilities. WEB and WEB_INTERSTITIAL refer to rendering either on desktop or on mobile devices for regular or interstitial ads respectively. APP and APP_INTERSTITIAL are for rendering in mobile apps.IN_STREAM_VIDEO refers to rendering in in-stream video ads developed with the VAST standard. + /// Select only placements that are associated with these compatibilities. WEB and WEB_INTERSTITIAL refer to rendering either on desktop or on mobile devices for regular or interstitial ads respectively. APP and APP_INTERSTITIAL are for rendering in mobile apps. IN_STREAM_VIDEO refers to rendering in in-stream video ads developed with the VAST standard. /// /// Append the given value to the *compatibilities* query property. /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. @@ -65154,7 +64966,7 @@ impl<'a, C, A> PlacementInsertCall<'a, C, A> where C: BorrowMut, /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Placement)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -65234,8 +65046,7 @@ impl<'a, C, A> PlacementInsertCall<'a, C, A> where C: BorrowMut, } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -65421,7 +65232,7 @@ impl<'a, C, A> PlacementUpdateCall<'a, C, A> where C: BorrowMut, /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Placement)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -65501,8 +65312,7 @@ impl<'a, C, A> PlacementUpdateCall<'a, C, A> where C: BorrowMut, } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -65687,7 +65497,7 @@ impl<'a, C, A> PlacementGeneratetagCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, PlacementsGenerateTagsResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -65769,8 +65579,7 @@ impl<'a, C, A> PlacementGeneratetagCall<'a, C, A> where C: BorrowMut PlacementGetCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Placement)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -66030,8 +65839,7 @@ impl<'a, C, A> PlacementGetCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) diff --git a/gen/dfareporting2d4-cli/Cargo.toml b/gen/dfareporting2d4-cli/Cargo.toml index 4294665694..059fa9cd5c 100644 --- a/gen/dfareporting2d4-cli/Cargo.toml +++ b/gen/dfareporting2d4-cli/Cargo.toml @@ -4,7 +4,7 @@ [package] name = "google-dfareporting2d4-cli" -version = "0.3.3+20160128" +version = "0.3.4+20160323" authors = ["Sebastian Thiel "] description = "A complete library to interact with dfareporting (protocol v2.4)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/dfareporting2d4-cli" @@ -17,18 +17,18 @@ keywords = ["dfareporting", "google", "cli"] name = "dfareporting2d4" [dependencies] -hyper = "0.7" -mime = "0.1.0" -serde = ">= 0.7.0" -serde_json = ">= 0.7.0" -yup-oauth2 = ">= 0.5.4" +hyper = "0.8" +mime = "0.2.0" +serde = "0.6.0" +serde_json = "0.6.0" +yup-oauth2 = ">= 0.5.6" strsim = "0.4" yup-hyper-mock = "1.0" clap = "2.0" [build-dependencies] -syntex = { version = ">= 0.23" } -serde_codegen = { version = ">= 0.6" } +syntex = { version = "= 0.28" } +serde_codegen = { version = "= 0.6.13" } [dependencies.google-dfareporting2d4] diff --git a/gen/dfareporting2d4-cli/README.md b/gen/dfareporting2d4-cli/README.md index 88518618dd..94af2ba950 100644 --- a/gen/dfareporting2d4-cli/README.md +++ b/gen/dfareporting2d4-cli/README.md @@ -17,14 +17,14 @@ Everything else about the *dfareporting* API can be found at the You can download the pre-compiled 64bit binaries for the following platforms: -* ![icon](http://megaicons.net/static/img/icons_sizes/6/140/16/ubuntu-icon.png) [ubuntu](http://dl.byronimo.de/google.rs/cli/0.3.3/ubuntu/dfareporting2d4.tar.gz) -* ![icon](http://hydra-media.cursecdn.com/wow.gamepedia.com/a/a2/Apple-icon-16x16.png?version=25ddd67ac3dd3b634478e3978b76cb74) [osx](http://dl.byronimo.de/google.rs/cli/0.3.3/osx/dfareporting2d4.tar.gz) +* ![icon](http://megaicons.net/static/img/icons_sizes/6/140/16/ubuntu-icon.png) [ubuntu](http://dl.byronimo.de/google.rs/cli/0.3.4/ubuntu/dfareporting2d4.tar.gz) +* ![icon](http://hydra-media.cursecdn.com/wow.gamepedia.com/a/a2/Apple-icon-16x16.png?version=25ddd67ac3dd3b634478e3978b76cb74) [osx](http://dl.byronimo.de/google.rs/cli/0.3.4/osx/dfareporting2d4.tar.gz) Find the source code [on github](https://github.com/Byron/google-apis-rs/tree/master/gen/dfareporting2d4-cli). # Usage -This documentation was generated from the *dfareporting* API at revision *20160128*. The CLI is at version *0.3.3*. +This documentation was generated from the *dfareporting* API at revision *20160323*. The CLI is at version *0.3.4*. ```bash dfareporting2d4 [options] diff --git a/gen/dfareporting2d4-cli/mkdocs.yml b/gen/dfareporting2d4-cli/mkdocs.yml index fdd6523300..039edbca50 100644 --- a/gen/dfareporting2d4-cli/mkdocs.yml +++ b/gen/dfareporting2d4-cli/mkdocs.yml @@ -1,4 +1,4 @@ -site_name: dfareporting v0.3.3+20160128 +site_name: dfareporting v0.3.4+20160323 site_url: http://byron.github.io/google-apis-rs/google-dfareporting2d4-cli site_description: Write integrating applications with bcore diff --git a/gen/dfareporting2d4-cli/src/cmn.rs b/gen/dfareporting2d4-cli/src/cmn.rs index 188159ee80..ae86fdef65 100644 --- a/gen/dfareporting2d4-cli/src/cmn.rs +++ b/gen/dfareporting2d4-cli/src/cmn.rs @@ -414,7 +414,7 @@ impl TokenStorage for JsonTokenStorage { Err(err) => match err.kind() { io::ErrorKind::NotFound => Ok(()), - _ => Err(json::Error::Io(err)) + _ => Err(json::Error::IoError(err)) }, Ok(_) => Ok(()), } @@ -427,7 +427,7 @@ impl TokenStorage for JsonTokenStorage { Err(serde_err) => Err(serde_err), } }, - Err(io_err) => Err(json::Error::Io(io_err)) + Err(io_err) => Err(json::Error::IoError(io_err)) } } } @@ -444,7 +444,7 @@ impl TokenStorage for JsonTokenStorage { Err(io_err) => { match io_err.kind() { io::ErrorKind::NotFound => Ok(None), - _ => Err(json::Error::Io(io_err)) + _ => Err(json::Error::IoError(io_err)) } } } @@ -683,7 +683,7 @@ pub fn application_secret_from_directory(dir: &str, = json::from_str(json_console_secret).unwrap(); match json::to_writer_pretty(&mut f, &console_secret) { Err(serde_err) => match serde_err { - json::Error::Io(err) => err, + json::Error::IoError(err) => err, _ => panic!("Unexpected serde error: {:#?}", serde_err) }, Ok(_) => continue, @@ -696,7 +696,7 @@ pub fn application_secret_from_directory(dir: &str, }, Ok(f) => { match json::de::from_reader::<_, ConsoleApplicationSecret>(f) { - Err(json::Error::Io(err)) => + Err(json::Error::IoError(err)) => return secret_io_error(err), Err(json_err) => return Err(CLIError::Configuration( diff --git a/gen/dfareporting2d4-cli/src/main.rs b/gen/dfareporting2d4-cli/src/main.rs index 0b581fd348..54469cc047 100644 --- a/gen/dfareporting2d4-cli/src/main.rs +++ b/gen/dfareporting2d4-cli/src/main.rs @@ -22272,8 +22272,8 @@ fn main() { let mut app = App::new("dfareporting2d4") .author("Sebastian Thiel ") - .version("0.3.3+20160128") - .about("Manage your DoubleClick Campaign Manager ad campaigns and reports.") + .version("0.3.4+20160323") + .about("Manages your DoubleClick Campaign Manager ad campaigns and reports.") .after_help("All documentation details can be found at http://byron.github.io/google-apis-rs/google_dfareporting2d4_cli") .arg(Arg::with_name("url") .long("scope") diff --git a/gen/dfareporting2d4/Cargo.toml b/gen/dfareporting2d4/Cargo.toml index 81ef1d48e6..534feed4ed 100644 --- a/gen/dfareporting2d4/Cargo.toml +++ b/gen/dfareporting2d4/Cargo.toml @@ -4,7 +4,7 @@ [package] name = "google-dfareporting2d4" -version = "0.1.12+20160128" +version = "0.1.13+20160323" authors = ["Sebastian Thiel "] description = "A complete library to interact with dfareporting (protocol v2.4)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/dfareporting2d4" @@ -16,14 +16,14 @@ build = "src/build.rs" [dependencies] -hyper = "0.7" -mime = "0.1.0" -serde = ">= 0.7.0" -serde_json = ">= 0.7.0" -yup-oauth2 = ">= 0.5.4" +hyper = "0.8" +mime = "0.2.0" +serde = "0.6.0" +serde_json = "0.6.0" +yup-oauth2 = ">= 0.5.6" url = ">= 0.5" [build-dependencies] -syntex = { version = ">= 0.23" } -serde_codegen = { version = ">= 0.6" } +syntex = { version = "= 0.28" } +serde_codegen = { version = "= 0.6.13" } diff --git a/gen/dfareporting2d4/README.md b/gen/dfareporting2d4/README.md index 9241337357..5c2a4a970d 100644 --- a/gen/dfareporting2d4/README.md +++ b/gen/dfareporting2d4/README.md @@ -5,7 +5,7 @@ DO NOT EDIT ! --> The `google-dfareporting2d4` library allows access to all features of the *Google dfareporting* service. -This documentation was generated from *dfareporting* crate version *0.1.12+20160128*, where *20160128* is the exact revision of the *dfareporting:v2.4* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.12*. +This documentation was generated from *dfareporting* crate version *0.1.13+20160323*, where *20160323* is the exact revision of the *dfareporting:v2.4* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.13*. Everything else about the *dfareporting* *v2d4* API can be found at the [official documentation site](https://developers.google.com/doubleclick-advertisers/reporting/). diff --git a/gen/dfareporting2d4/src/cmn.rs b/gen/dfareporting2d4/src/cmn.rs index 87b91a8986..c69621da55 100644 --- a/gen/dfareporting2d4/src/cmn.rs +++ b/gen/dfareporting2d4/src/cmn.rs @@ -12,7 +12,7 @@ use mime::{Mime, TopLevel, SubLevel, Attr, Value}; use oauth2::{TokenType, Retry, self}; use hyper; use hyper::header::{ContentType, ContentLength, Headers, UserAgent, Authorization, Header, - HeaderFormat}; + HeaderFormat, Bearer}; use hyper::http::h1::LINE_ENDING; use hyper::method::Method; use hyper::status::StatusCode; @@ -634,7 +634,7 @@ pub struct ResumableUploadHelper<'a, A: 'a> { pub start_at: Option, pub auth: &'a mut A, pub user_agent: &'a str, - pub auth_header: Authorization, + pub auth_header: Authorization, pub url: &'a str, pub reader: &'a mut ReadSeek, pub media_type: Mime, diff --git a/gen/dfareporting2d4/src/lib.rs b/gen/dfareporting2d4/src/lib.rs index 0fd62e1bef..b9c7c1ab5a 100644 --- a/gen/dfareporting2d4/src/lib.rs +++ b/gen/dfareporting2d4/src/lib.rs @@ -2,7 +2,7 @@ // This file was generated automatically from 'src/mako/api/lib.rs.mako' // DO NOT EDIT ! -//! This documentation was generated from *dfareporting* crate version *0.1.12+20160128*, where *20160128* is the exact revision of the *dfareporting:v2.4* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.12*. +//! This documentation was generated from *dfareporting* crate version *0.1.13+20160323*, where *20160323* is the exact revision of the *dfareporting:v2.4* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.13*. //! //! Everything else about the *dfareporting* *v2d4* API can be found at the //! [official documentation site](https://developers.google.com/doubleclick-advertisers/reporting/). diff --git a/gen/dfareporting2d4/src/lib.rs.in b/gen/dfareporting2d4/src/lib.rs.in index 3ec00c6dea..693be23631 100644 --- a/gen/dfareporting2d4/src/lib.rs.in +++ b/gen/dfareporting2d4/src/lib.rs.in @@ -136,7 +136,7 @@ impl<'a, C, A> Dfareporting Dfareporting { client: RefCell::new(client), auth: RefCell::new(authenticator), - _user_agent: "google-api-rust-client/0.1.12".to_string(), + _user_agent: "google-api-rust-client/0.1.13".to_string(), } } @@ -307,7 +307,7 @@ impl<'a, C, A> Dfareporting } /// Set the user-agent header field to use in all requests to the server. - /// It defaults to `google-api-rust-client/0.1.12`. + /// It defaults to `google-api-rust-client/0.1.13`. /// /// Returns the previously set user-agent. pub fn user_agent(&mut self, agent_name: String) -> String { @@ -1774,7 +1774,7 @@ pub struct Placement { /// Dimension value for the ID of the site. This is a read-only, auto-generated field. #[serde(rename="siteIdDimensionValue")] pub site_id_dimension_value: Option, - /// Placement compatibility. DISPLAY and DISPLAY_INTERSTITIAL refer to rendering on desktop, mobile devices or in mobile apps for regular or interstitial ads respectively. APP and APP_INTERSTITIAL are no longer allowed for new placement insertions. Instead, use DISPLAY or DISPLAY_INTERSTITIAL. IN_STREAM_VIDEO refers to rendering in in-stream video ads developed with the VAST standard.This field is required on insertion. + /// Placement compatibility. DISPLAY and DISPLAY_INTERSTITIAL refer to rendering on desktop, mobile devices or in mobile apps for regular or interstitial ads respectively. APP and APP_INTERSTITIAL are no longer allowed for new placement insertions. Instead, use DISPLAY or DISPLAY_INTERSTITIAL. IN_STREAM_VIDEO refers to rendering in in-stream video ads developed with the VAST standard. This field is required on insertion. pub compatibility: Option, /// ID of the placement strategy assigned to this placement. #[serde(rename="placementStrategyId")] @@ -12907,7 +12907,7 @@ impl<'a, C, A> UserRolePermissionGroupGetCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, UserRolePermissionGroup)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -12977,8 +12977,7 @@ impl<'a, C, A> UserRolePermissionGroupGetCall<'a, C, A> where C: BorrowMut UserRolePermissionGroupListCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, UserRolePermissionGroupsListResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -13223,8 +13222,7 @@ impl<'a, C, A> UserRolePermissionGroupListCall<'a, C, A> where C: BorrowMut PlatformTypeGetCall<'a, C, A> where C: BorrowMut, /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, PlatformType)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -13461,8 +13459,7 @@ impl<'a, C, A> PlatformTypeGetCall<'a, C, A> where C: BorrowMut, } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -13638,7 +13635,7 @@ impl<'a, C, A> PlatformTypeListCall<'a, C, A> where C: BorrowMut, /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, PlatformTypesListResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -13707,8 +13704,7 @@ impl<'a, C, A> PlatformTypeListCall<'a, C, A> where C: BorrowMut, } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -13883,7 +13879,7 @@ impl<'a, C, A> CreativeFieldValuePatchCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, CreativeFieldValue)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -13965,8 +13961,7 @@ impl<'a, C, A> CreativeFieldValuePatchCall<'a, C, A> where C: BorrowMut CreativeFieldValueGetCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, CreativeFieldValue)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -14238,8 +14233,7 @@ impl<'a, C, A> CreativeFieldValueGetCall<'a, C, A> where C: BorrowMut CreativeFieldValueDeleteCall<'a, C, A> where C: BorrowMut Result { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -14497,8 +14491,7 @@ impl<'a, C, A> CreativeFieldValueDeleteCall<'a, C, A> where C: BorrowMut CreativeFieldValueInsertCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, CreativeFieldValue)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -14763,8 +14756,7 @@ impl<'a, C, A> CreativeFieldValueInsertCall<'a, C, A> where C: BorrowMut CreativeFieldValueUpdateCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, CreativeFieldValue)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -15042,8 +15034,7 @@ impl<'a, C, A> CreativeFieldValueUpdateCall<'a, C, A> where C: BorrowMut CreativeFieldValueListCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, CreativeFieldValuesListResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -15335,8 +15326,7 @@ impl<'a, C, A> CreativeFieldValueListCall<'a, C, A> where C: BorrowMut CreativeFieldUpdateCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, CreativeField)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -15642,8 +15632,7 @@ impl<'a, C, A> CreativeFieldUpdateCall<'a, C, A> where C: BorrowMut CreativeFieldListCall<'a, C, A> where C: BorrowMut /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, CreativeFieldsListResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -15930,8 +15919,7 @@ impl<'a, C, A> CreativeFieldListCall<'a, C, A> where C: BorrowMut } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -16149,7 +16137,7 @@ impl<'a, C, A> CreativeFieldDeleteCall<'a, C, A> where C: BorrowMut Result { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -16218,8 +16206,7 @@ impl<'a, C, A> CreativeFieldDeleteCall<'a, C, A> where C: BorrowMut CreativeFieldGetCall<'a, C, A> where C: BorrowMut, /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, CreativeField)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -16456,8 +16443,7 @@ impl<'a, C, A> CreativeFieldGetCall<'a, C, A> where C: BorrowMut, } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -16640,7 +16626,7 @@ impl<'a, C, A> CreativeFieldInsertCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, CreativeField)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -16720,8 +16706,7 @@ impl<'a, C, A> CreativeFieldInsertCall<'a, C, A> where C: BorrowMut CreativeFieldPatchCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, CreativeField)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -16989,8 +16974,7 @@ impl<'a, C, A> CreativeFieldPatchCall<'a, C, A> where C: BorrowMut UserRoleInsertCall<'a, C, A> where C: BorrowMut, A /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, UserRole)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -17266,8 +17250,7 @@ impl<'a, C, A> UserRoleInsertCall<'a, C, A> where C: BorrowMut, A } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -17447,7 +17430,7 @@ impl<'a, C, A> UserRoleGetCall<'a, C, A> where C: BorrowMut, A: o /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, UserRole)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -17517,8 +17500,7 @@ impl<'a, C, A> UserRoleGetCall<'a, C, A> where C: BorrowMut, A: o } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -17701,7 +17683,7 @@ impl<'a, C, A> UserRoleUpdateCall<'a, C, A> where C: BorrowMut, A /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, UserRole)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -17781,8 +17763,7 @@ impl<'a, C, A> UserRoleUpdateCall<'a, C, A> where C: BorrowMut, A } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -17962,7 +17943,7 @@ impl<'a, C, A> UserRoleDeleteCall<'a, C, A> where C: BorrowMut, A /// Perform the operation you have build so far. pub fn doit(mut self) -> Result { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -18031,8 +18012,7 @@ impl<'a, C, A> UserRoleDeleteCall<'a, C, A> where C: BorrowMut, A } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Delete, &url) @@ -18206,7 +18186,7 @@ impl<'a, C, A> UserRolePatchCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, UserRole)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -18287,8 +18267,7 @@ impl<'a, C, A> UserRolePatchCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -18493,7 +18472,7 @@ impl<'a, C, A> UserRoleListCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, UserRolesListResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -18588,8 +18567,7 @@ impl<'a, C, A> UserRoleListCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -18813,7 +18791,7 @@ impl<'a, C, A> OperatingSystemVersionGetCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, OperatingSystemVersion)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -18883,8 +18861,7 @@ impl<'a, C, A> OperatingSystemVersionGetCall<'a, C, A> where C: BorrowMut OperatingSystemVersionListCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, OperatingSystemVersionsListResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -19129,8 +19106,7 @@ impl<'a, C, A> OperatingSystemVersionListCall<'a, C, A> where C: BorrowMut LandingPageGetCall<'a, C, A> where C: BorrowMut, A /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, LandingPage)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -19369,8 +19345,7 @@ impl<'a, C, A> LandingPageGetCall<'a, C, A> where C: BorrowMut, A } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -19564,7 +19539,7 @@ impl<'a, C, A> LandingPageUpdateCall<'a, C, A> where C: BorrowMut /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, LandingPage)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -19645,8 +19620,7 @@ impl<'a, C, A> LandingPageUpdateCall<'a, C, A> where C: BorrowMut } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -19836,7 +19810,7 @@ impl<'a, C, A> LandingPageListCall<'a, C, A> where C: BorrowMut, /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, LandingPagesListResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -19906,8 +19880,7 @@ impl<'a, C, A> LandingPageListCall<'a, C, A> where C: BorrowMut, } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -20091,7 +20064,7 @@ impl<'a, C, A> LandingPageInsertCall<'a, C, A> where C: BorrowMut /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, LandingPage)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -20172,8 +20145,7 @@ impl<'a, C, A> LandingPageInsertCall<'a, C, A> where C: BorrowMut } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -20371,7 +20343,7 @@ impl<'a, C, A> LandingPagePatchCall<'a, C, A> where C: BorrowMut, /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, LandingPage)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -20453,8 +20425,7 @@ impl<'a, C, A> LandingPagePatchCall<'a, C, A> where C: BorrowMut, } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -20655,7 +20626,7 @@ impl<'a, C, A> LandingPageDeleteCall<'a, C, A> where C: BorrowMut /// Perform the operation you have build so far. pub fn doit(mut self) -> Result { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -20725,8 +20696,7 @@ impl<'a, C, A> LandingPageDeleteCall<'a, C, A> where C: BorrowMut } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Delete, &url) @@ -20912,7 +20882,7 @@ impl<'a, C, A> CreativeAssetInsertCall<'a, C, A> where C: BorrowMut(mut self, mut reader: RS, reader_mime_type: mime::Mime, protocol: &'static str) -> Result<(hyper::client::Response, CreativeAssetMetadata)> where RS: ReadSeek { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -21004,8 +20974,7 @@ impl<'a, C, A> CreativeAssetInsertCall<'a, C, A> where C: BorrowMut CampaignCreativeAssociationInsertCall<'a, C, A> where C: BorrowMu /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, CampaignCreativeAssociation)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -21384,8 +21353,7 @@ impl<'a, C, A> CampaignCreativeAssociationInsertCall<'a, C, A> where C: BorrowMu } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -21581,7 +21549,7 @@ impl<'a, C, A> CampaignCreativeAssociationListCall<'a, C, A> where C: BorrowMut< /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, CampaignCreativeAssociationsListResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -21660,8 +21628,7 @@ impl<'a, C, A> CampaignCreativeAssociationListCall<'a, C, A> where C: BorrowMut< } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -21878,7 +21845,7 @@ impl<'a, C, A> ChangeLogListCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, ChangeLogsListResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -21983,8 +21950,7 @@ impl<'a, C, A> ChangeLogListCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -22224,7 +22190,7 @@ impl<'a, C, A> ChangeLogGetCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, ChangeLog)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -22294,8 +22260,7 @@ impl<'a, C, A> ChangeLogGetCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -22472,7 +22437,7 @@ impl<'a, C, A> RemarketingListShareGetCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, RemarketingListShare)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -22542,8 +22507,7 @@ impl<'a, C, A> RemarketingListShareGetCall<'a, C, A> where C: BorrowMut RemarketingListSharePatchCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, RemarketingListShare)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -22808,8 +22772,7 @@ impl<'a, C, A> RemarketingListSharePatchCall<'a, C, A> where C: BorrowMut RemarketingListShareUpdateCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, RemarketingListShare)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -23085,8 +23048,7 @@ impl<'a, C, A> RemarketingListShareUpdateCall<'a, C, A> where C: BorrowMut ReportRunCall<'a, C, A> where C: BorrowMut, A: oau /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, File)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -23341,8 +23303,7 @@ impl<'a, C, A> ReportRunCall<'a, C, A> where C: BorrowMut, A: oau } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Post, &url) @@ -23533,7 +23494,7 @@ impl<'a, C, A> ReportPatchCall<'a, C, A> where C: BorrowMut, A: o /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Report)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -23614,8 +23575,7 @@ impl<'a, C, A> ReportPatchCall<'a, C, A> where C: BorrowMut, A: o } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -23813,7 +23773,7 @@ impl<'a, C, A> ReportFileListCall<'a, C, A> where C: BorrowMut, A /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, FileList)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -23895,8 +23855,7 @@ impl<'a, C, A> ReportFileListCall<'a, C, A> where C: BorrowMut, A } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -24107,7 +24066,7 @@ impl<'a, C, A> ReportInsertCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Report)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -24187,8 +24146,7 @@ impl<'a, C, A> ReportInsertCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -24375,7 +24333,7 @@ impl<'a, C, A> ReportUpdateCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Report)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -24456,8 +24414,7 @@ impl<'a, C, A> ReportUpdateCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -24653,7 +24610,7 @@ impl<'a, C, A> ReportCompatibleFieldQueryCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, CompatibleFields)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -24733,8 +24690,7 @@ impl<'a, C, A> ReportCompatibleFieldQueryCall<'a, C, A> where C: BorrowMut ReportGetCall<'a, C, A> where C: BorrowMut, A: oau /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Report)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -24984,8 +24940,7 @@ impl<'a, C, A> ReportGetCall<'a, C, A> where C: BorrowMut, A: oau } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -25168,7 +25123,7 @@ impl<'a, C, A> ReportFileGetCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, File)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -25255,8 +25210,7 @@ impl<'a, C, A> ReportFileGetCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -25443,7 +25397,7 @@ impl<'a, C, A> ReportDeleteCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -25512,8 +25466,7 @@ impl<'a, C, A> ReportDeleteCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Delete, &url) @@ -25689,7 +25642,7 @@ impl<'a, C, A> ReportListCall<'a, C, A> where C: BorrowMut, A: oa /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, ReportList)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -25773,8 +25726,7 @@ impl<'a, C, A> ReportListCall<'a, C, A> where C: BorrowMut, A: oa } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -25982,7 +25934,7 @@ impl<'a, C, A> AdvertiserInsertCall<'a, C, A> where C: BorrowMut, /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Advertiser)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -26062,8 +26014,7 @@ impl<'a, C, A> AdvertiserInsertCall<'a, C, A> where C: BorrowMut, } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -26250,7 +26201,7 @@ impl<'a, C, A> AdvertiserPatchCall<'a, C, A> where C: BorrowMut, /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Advertiser)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -26331,8 +26282,7 @@ impl<'a, C, A> AdvertiserPatchCall<'a, C, A> where C: BorrowMut, } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -26545,7 +26495,7 @@ impl<'a, C, A> AdvertiserListCall<'a, C, A> where C: BorrowMut, A /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, AdvertisersListResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -26656,8 +26606,7 @@ impl<'a, C, A> AdvertiserListCall<'a, C, A> where C: BorrowMut, A } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -26917,7 +26866,7 @@ impl<'a, C, A> AdvertiserUpdateCall<'a, C, A> where C: BorrowMut, /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Advertiser)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -26997,8 +26946,7 @@ impl<'a, C, A> AdvertiserUpdateCall<'a, C, A> where C: BorrowMut, } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -27178,7 +27126,7 @@ impl<'a, C, A> AdvertiserGetCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Advertiser)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -27248,8 +27196,7 @@ impl<'a, C, A> AdvertiserGetCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -27436,7 +27383,7 @@ impl<'a, C, A> DimensionValueQueryCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, DimensionValueList)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -27522,8 +27469,7 @@ impl<'a, C, A> DimensionValueQueryCall<'a, C, A> where C: BorrowMut FloodlightActivityGroupGetCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, FloodlightActivityGroup)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -27787,8 +27733,7 @@ impl<'a, C, A> FloodlightActivityGroupGetCall<'a, C, A> where C: BorrowMut FloodlightActivityGroupPatchCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, FloodlightActivityGroup)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -28053,8 +27998,7 @@ impl<'a, C, A> FloodlightActivityGroupPatchCall<'a, C, A> where C: BorrowMut FloodlightActivityGroupListCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, FloodlightActivityGroupsListResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -28359,8 +28303,7 @@ impl<'a, C, A> FloodlightActivityGroupListCall<'a, C, A> where C: BorrowMut FloodlightActivityGroupInsertCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, FloodlightActivityGroup)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -28677,8 +28620,7 @@ impl<'a, C, A> FloodlightActivityGroupInsertCall<'a, C, A> where C: BorrowMut FloodlightActivityGroupUpdateCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, FloodlightActivityGroup)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -28944,8 +28886,7 @@ impl<'a, C, A> FloodlightActivityGroupUpdateCall<'a, C, A> where C: BorrowMut MetroListCall<'a, C, A> where C: BorrowMut, A: oau /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, MetrosListResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -29193,8 +29134,7 @@ impl<'a, C, A> MetroListCall<'a, C, A> where C: BorrowMut, A: oau } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -29375,7 +29315,7 @@ impl<'a, C, A> OrderListCall<'a, C, A> where C: BorrowMut, A: oau /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, OrdersListResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -29470,8 +29410,7 @@ impl<'a, C, A> OrderListCall<'a, C, A> where C: BorrowMut, A: oau } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -29700,7 +29639,7 @@ impl<'a, C, A> OrderGetCall<'a, C, A> where C: BorrowMut, A: oaut /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Order)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -29771,8 +29710,7 @@ impl<'a, C, A> OrderGetCall<'a, C, A> where C: BorrowMut, A: oaut } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -29959,7 +29897,7 @@ impl<'a, C, A> DirectorySiteContactGetCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, DirectorySiteContact)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -30029,8 +29967,7 @@ impl<'a, C, A> DirectorySiteContactGetCall<'a, C, A> where C: BorrowMut DirectorySiteContactListCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, DirectorySiteContactsListResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -30314,8 +30251,7 @@ impl<'a, C, A> DirectorySiteContactListCall<'a, C, A> where C: BorrowMut UserProfileListCall<'a, C, A> where C: BorrowMut, /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, UserProfileList)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -30578,8 +30514,7 @@ impl<'a, C, A> UserProfileListCall<'a, C, A> where C: BorrowMut, } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -30735,7 +30670,7 @@ impl<'a, C, A> UserProfileGetCall<'a, C, A> where C: BorrowMut, A /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, UserProfile)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -30804,8 +30739,7 @@ impl<'a, C, A> UserProfileGetCall<'a, C, A> where C: BorrowMut, A } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -30979,7 +30913,7 @@ impl<'a, C, A> AdPatchCall<'a, C, A> where C: BorrowMut, A: oauth /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Ad)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -31060,8 +30994,7 @@ impl<'a, C, A> AdPatchCall<'a, C, A> where C: BorrowMut, A: oauth } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -31257,7 +31190,7 @@ impl<'a, C, A> AdInsertCall<'a, C, A> where C: BorrowMut, A: oaut /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Ad)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -31337,8 +31270,7 @@ impl<'a, C, A> AdInsertCall<'a, C, A> where C: BorrowMut, A: oaut } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -31565,7 +31497,7 @@ impl<'a, C, A> AdListCall<'a, C, A> where C: BorrowMut, A: oauth2 /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, AdsListResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -31726,8 +31658,7 @@ impl<'a, C, A> AdListCall<'a, C, A> where C: BorrowMut, A: oauth2 } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -32072,7 +32003,7 @@ impl<'a, C, A> AdGetCall<'a, C, A> where C: BorrowMut, A: oauth2: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Ad)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -32142,8 +32073,7 @@ impl<'a, C, A> AdGetCall<'a, C, A> where C: BorrowMut, A: oauth2: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -32326,7 +32256,7 @@ impl<'a, C, A> AdUpdateCall<'a, C, A> where C: BorrowMut, A: oaut /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Ad)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -32406,8 +32336,7 @@ impl<'a, C, A> AdUpdateCall<'a, C, A> where C: BorrowMut, A: oaut } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -32587,7 +32516,7 @@ impl<'a, C, A> AccountPermissionGetCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, AccountPermission)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -32657,8 +32586,7 @@ impl<'a, C, A> AccountPermissionGetCall<'a, C, A> where C: BorrowMut AccountPermissionListCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, AccountPermissionsListResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -32903,8 +32831,7 @@ impl<'a, C, A> AccountPermissionListCall<'a, C, A> where C: BorrowMut ConnectionTypeListCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, ConnectionTypesListResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -33139,8 +33066,7 @@ impl<'a, C, A> ConnectionTypeListCall<'a, C, A> where C: BorrowMut ConnectionTypeGetCall<'a, C, A> where C: BorrowMut /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, ConnectionType)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -33377,8 +33303,7 @@ impl<'a, C, A> ConnectionTypeGetCall<'a, C, A> where C: BorrowMut } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -33555,7 +33480,7 @@ impl<'a, C, A> AdvertiserGroupGetCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, AdvertiserGroup)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -33625,8 +33550,7 @@ impl<'a, C, A> AdvertiserGroupGetCall<'a, C, A> where C: BorrowMut AdvertiserGroupListCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, AdvertiserGroupsListResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -33903,8 +33827,7 @@ impl<'a, C, A> AdvertiserGroupListCall<'a, C, A> where C: BorrowMut AdvertiserGroupInsertCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, AdvertiserGroup)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -34200,8 +34123,7 @@ impl<'a, C, A> AdvertiserGroupInsertCall<'a, C, A> where C: BorrowMut AdvertiserGroupUpdateCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, AdvertiserGroup)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -34467,8 +34389,7 @@ impl<'a, C, A> AdvertiserGroupUpdateCall<'a, C, A> where C: BorrowMut AdvertiserGroupPatchCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, AdvertiserGroup)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -34736,8 +34657,7 @@ impl<'a, C, A> AdvertiserGroupPatchCall<'a, C, A> where C: BorrowMut AdvertiserGroupDeleteCall<'a, C, A> where C: BorrowMut Result { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -34996,8 +34916,7 @@ impl<'a, C, A> AdvertiserGroupDeleteCall<'a, C, A> where C: BorrowMut SiteInsertCall<'a, C, A> where C: BorrowMut, A: oa /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Site)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -35250,8 +35169,7 @@ impl<'a, C, A> SiteInsertCall<'a, C, A> where C: BorrowMut, A: oa } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -35431,7 +35349,7 @@ impl<'a, C, A> SiteGetCall<'a, C, A> where C: BorrowMut, A: oauth /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Site)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -35501,8 +35419,7 @@ impl<'a, C, A> SiteGetCall<'a, C, A> where C: BorrowMut, A: oauth } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -35708,7 +35625,7 @@ impl<'a, C, A> SiteListCall<'a, C, A> where C: BorrowMut, A: oaut /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, SitesListResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -35828,8 +35745,7 @@ impl<'a, C, A> SiteListCall<'a, C, A> where C: BorrowMut, A: oaut } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -36110,7 +36026,7 @@ impl<'a, C, A> SiteUpdateCall<'a, C, A> where C: BorrowMut, A: oa /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Site)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -36190,8 +36106,7 @@ impl<'a, C, A> SiteUpdateCall<'a, C, A> where C: BorrowMut, A: oa } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -36378,7 +36293,7 @@ impl<'a, C, A> SitePatchCall<'a, C, A> where C: BorrowMut, A: oau /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Site)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -36459,8 +36374,7 @@ impl<'a, C, A> SitePatchCall<'a, C, A> where C: BorrowMut, A: oau } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -36650,7 +36564,7 @@ impl<'a, C, A> FloodlightActivityGetCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, FloodlightActivity)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -36720,8 +36634,7 @@ impl<'a, C, A> FloodlightActivityGetCall<'a, C, A> where C: BorrowMut FloodlightActivityListCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, FloodlightActivitiesListResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -37035,8 +36948,7 @@ impl<'a, C, A> FloodlightActivityListCall<'a, C, A> where C: BorrowMut FloodlightActivityInsertCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, FloodlightActivity)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -37382,8 +37294,7 @@ impl<'a, C, A> FloodlightActivityInsertCall<'a, C, A> where C: BorrowMut FloodlightActivityDeleteCall<'a, C, A> where C: BorrowMut Result { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -37632,8 +37543,7 @@ impl<'a, C, A> FloodlightActivityDeleteCall<'a, C, A> where C: BorrowMut FloodlightActivityPatchCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, FloodlightActivity)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -37888,8 +37798,7 @@ impl<'a, C, A> FloodlightActivityPatchCall<'a, C, A> where C: BorrowMut FloodlightActivityGeneratetagCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, FloodlightActivitiesGenerateTagResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -38152,8 +38061,7 @@ impl<'a, C, A> FloodlightActivityGeneratetagCall<'a, C, A> where C: BorrowMut FloodlightActivityUpdateCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, FloodlightActivity)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -38413,8 +38321,7 @@ impl<'a, C, A> FloodlightActivityUpdateCall<'a, C, A> where C: BorrowMut RegionListCall<'a, C, A> where C: BorrowMut, A: oa /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, RegionsListResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -38662,8 +38569,7 @@ impl<'a, C, A> RegionListCall<'a, C, A> where C: BorrowMut, A: oa } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -38836,7 +38742,7 @@ impl<'a, C, A> CreativeGroupInsertCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, CreativeGroup)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -38916,8 +38822,7 @@ impl<'a, C, A> CreativeGroupInsertCall<'a, C, A> where C: BorrowMut CreativeGroupGetCall<'a, C, A> where C: BorrowMut, /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, CreativeGroup)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -39167,8 +39072,7 @@ impl<'a, C, A> CreativeGroupGetCall<'a, C, A> where C: BorrowMut, } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -39351,7 +39255,7 @@ impl<'a, C, A> CreativeGroupUpdateCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, CreativeGroup)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -39431,8 +39335,7 @@ impl<'a, C, A> CreativeGroupUpdateCall<'a, C, A> where C: BorrowMut CreativeGroupListCall<'a, C, A> where C: BorrowMut /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, CreativeGroupsListResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -39724,8 +39627,7 @@ impl<'a, C, A> CreativeGroupListCall<'a, C, A> where C: BorrowMut } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -39957,7 +39859,7 @@ impl<'a, C, A> CreativeGroupPatchCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, CreativeGroup)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -40038,8 +39940,7 @@ impl<'a, C, A> CreativeGroupPatchCall<'a, C, A> where C: BorrowMut TargetableRemarketingListListCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, TargetableRemarketingListsListResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -40329,8 +40230,7 @@ impl<'a, C, A> TargetableRemarketingListListCall<'a, C, A> where C: BorrowMut TargetableRemarketingListGetCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, TargetableRemarketingList)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -40619,8 +40519,7 @@ impl<'a, C, A> TargetableRemarketingListGetCall<'a, C, A> where C: BorrowMut SubaccountPatchCall<'a, C, A> where C: BorrowMut, /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Subaccount)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -40885,8 +40784,7 @@ impl<'a, C, A> SubaccountPatchCall<'a, C, A> where C: BorrowMut, } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -41082,7 +40980,7 @@ impl<'a, C, A> SubaccountInsertCall<'a, C, A> where C: BorrowMut, /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Subaccount)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -41162,8 +41060,7 @@ impl<'a, C, A> SubaccountInsertCall<'a, C, A> where C: BorrowMut, } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -41354,7 +41251,7 @@ impl<'a, C, A> SubaccountListCall<'a, C, A> where C: BorrowMut, A /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, SubaccountsListResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -41443,8 +41340,7 @@ impl<'a, C, A> SubaccountListCall<'a, C, A> where C: BorrowMut, A } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -41660,7 +41556,7 @@ impl<'a, C, A> SubaccountUpdateCall<'a, C, A> where C: BorrowMut, /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Subaccount)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -41740,8 +41636,7 @@ impl<'a, C, A> SubaccountUpdateCall<'a, C, A> where C: BorrowMut, } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -41921,7 +41816,7 @@ impl<'a, C, A> SubaccountGetCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Subaccount)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -41991,8 +41886,7 @@ impl<'a, C, A> SubaccountGetCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -42169,7 +42063,7 @@ impl<'a, C, A> MobileCarrierGetCall<'a, C, A> where C: BorrowMut, /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, MobileCarrier)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -42239,8 +42133,7 @@ impl<'a, C, A> MobileCarrierGetCall<'a, C, A> where C: BorrowMut, } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -42416,7 +42309,7 @@ impl<'a, C, A> MobileCarrierListCall<'a, C, A> where C: BorrowMut /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, MobileCarriersListResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -42485,8 +42378,7 @@ impl<'a, C, A> MobileCarrierListCall<'a, C, A> where C: BorrowMut } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -42653,7 +42545,7 @@ impl<'a, C, A> FloodlightConfigurationGetCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, FloodlightConfiguration)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -42723,8 +42615,7 @@ impl<'a, C, A> FloodlightConfigurationGetCall<'a, C, A> where C: BorrowMut FloodlightConfigurationUpdateCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, FloodlightConfiguration)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -42987,8 +42878,7 @@ impl<'a, C, A> FloodlightConfigurationUpdateCall<'a, C, A> where C: BorrowMut FloodlightConfigurationPatchCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, FloodlightConfiguration)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -43256,8 +43146,7 @@ impl<'a, C, A> FloodlightConfigurationPatchCall<'a, C, A> where C: BorrowMut FloodlightConfigurationListCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, FloodlightConfigurationsListResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -43522,8 +43411,7 @@ impl<'a, C, A> FloodlightConfigurationListCall<'a, C, A> where C: BorrowMut OperatingSystemListCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, OperatingSystemsListResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -43766,8 +43654,7 @@ impl<'a, C, A> OperatingSystemListCall<'a, C, A> where C: BorrowMut OperatingSystemGetCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, OperatingSystem)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -44004,8 +43891,7 @@ impl<'a, C, A> OperatingSystemGetCall<'a, C, A> where C: BorrowMut FileListCall<'a, C, A> where C: BorrowMut, A: oaut /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, FileList)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -44275,8 +44161,7 @@ impl<'a, C, A> FileListCall<'a, C, A> where C: BorrowMut, A: oaut } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -44483,7 +44368,7 @@ impl<'a, C, A> FileGetCall<'a, C, A> where C: BorrowMut, A: oauth /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, File)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -44569,8 +44454,7 @@ impl<'a, C, A> FileGetCall<'a, C, A> where C: BorrowMut, A: oauth } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -44784,7 +44668,7 @@ impl<'a, C, A> PlacementGroupListCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, PlacementGroupsListResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -44926,8 +44810,7 @@ impl<'a, C, A> PlacementGroupListCall<'a, C, A> where C: BorrowMut PlacementGroupUpdateCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, PlacementGroup)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -45321,8 +45204,7 @@ impl<'a, C, A> PlacementGroupUpdateCall<'a, C, A> where C: BorrowMut PlacementGroupInsertCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, PlacementGroup)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -45588,8 +45470,7 @@ impl<'a, C, A> PlacementGroupInsertCall<'a, C, A> where C: BorrowMut PlacementGroupGetCall<'a, C, A> where C: BorrowMut /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, PlacementGroup)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -45839,8 +45720,7 @@ impl<'a, C, A> PlacementGroupGetCall<'a, C, A> where C: BorrowMut } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -46024,7 +45904,7 @@ impl<'a, C, A> PlacementGroupPatchCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, PlacementGroup)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -46105,8 +45985,7 @@ impl<'a, C, A> PlacementGroupPatchCall<'a, C, A> where C: BorrowMut InventoryItemListCall<'a, C, A> where C: BorrowMut /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, InventoryItemsListResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -46417,8 +46296,7 @@ impl<'a, C, A> InventoryItemListCall<'a, C, A> where C: BorrowMut } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -46662,7 +46540,7 @@ impl<'a, C, A> InventoryItemGetCall<'a, C, A> where C: BorrowMut, /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, InventoryItem)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -46733,8 +46611,7 @@ impl<'a, C, A> InventoryItemGetCall<'a, C, A> where C: BorrowMut, } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -46921,7 +46798,7 @@ impl<'a, C, A> UserRolePermissionGetCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, UserRolePermission)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -46991,8 +46868,7 @@ impl<'a, C, A> UserRolePermissionGetCall<'a, C, A> where C: BorrowMut UserRolePermissionListCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, UserRolePermissionsListResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -47244,8 +47120,7 @@ impl<'a, C, A> UserRolePermissionListCall<'a, C, A> where C: BorrowMut AccountPermissionGroupListCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, AccountPermissionGroupsListResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -47488,8 +47363,7 @@ impl<'a, C, A> AccountPermissionGroupListCall<'a, C, A> where C: BorrowMut AccountPermissionGroupGetCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, AccountPermissionGroup)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -47726,8 +47600,7 @@ impl<'a, C, A> AccountPermissionGroupGetCall<'a, C, A> where C: BorrowMut ContentCategoryListCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, ContentCategoriesListResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -48004,8 +47877,7 @@ impl<'a, C, A> ContentCategoryListCall<'a, C, A> where C: BorrowMut ContentCategoryUpdateCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, ContentCategory)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -48301,8 +48173,7 @@ impl<'a, C, A> ContentCategoryUpdateCall<'a, C, A> where C: BorrowMut ContentCategoryInsertCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, ContentCategory)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -48568,8 +48439,7 @@ impl<'a, C, A> ContentCategoryInsertCall<'a, C, A> where C: BorrowMut ContentCategoryDeleteCall<'a, C, A> where C: BorrowMut Result { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -48818,8 +48688,7 @@ impl<'a, C, A> ContentCategoryDeleteCall<'a, C, A> where C: BorrowMut ContentCategoryGetCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, ContentCategory)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -49056,8 +48925,7 @@ impl<'a, C, A> ContentCategoryGetCall<'a, C, A> where C: BorrowMut ContentCategoryPatchCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, ContentCategory)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -49322,8 +49190,7 @@ impl<'a, C, A> ContentCategoryPatchCall<'a, C, A> where C: BorrowMut CreativeUpdateCall<'a, C, A> where C: BorrowMut, A /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Creative)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -49599,8 +49466,7 @@ impl<'a, C, A> CreativeUpdateCall<'a, C, A> where C: BorrowMut, A } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -49786,7 +49652,7 @@ impl<'a, C, A> CreativeInsertCall<'a, C, A> where C: BorrowMut, A /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Creative)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -49866,8 +49732,7 @@ impl<'a, C, A> CreativeInsertCall<'a, C, A> where C: BorrowMut, A } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -50047,7 +49912,7 @@ impl<'a, C, A> CreativeGetCall<'a, C, A> where C: BorrowMut, A: o /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Creative)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -50117,8 +49982,7 @@ impl<'a, C, A> CreativeGetCall<'a, C, A> where C: BorrowMut, A: o } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -50326,7 +50190,7 @@ impl<'a, C, A> CreativeListCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, CreativesListResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -50455,8 +50319,7 @@ impl<'a, C, A> CreativeListCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -50748,7 +50611,7 @@ impl<'a, C, A> CreativePatchCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Creative)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -50829,8 +50692,7 @@ impl<'a, C, A> CreativePatchCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -51020,7 +50882,7 @@ impl<'a, C, A> CampaignGetCall<'a, C, A> where C: BorrowMut, A: o /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Campaign)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -51090,8 +50952,7 @@ impl<'a, C, A> CampaignGetCall<'a, C, A> where C: BorrowMut, A: o } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -51276,7 +51137,7 @@ impl<'a, C, A> CampaignInsertCall<'a, C, A> where C: BorrowMut, A /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Campaign)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -51358,8 +51219,7 @@ impl<'a, C, A> CampaignInsertCall<'a, C, A> where C: BorrowMut, A } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -51566,7 +51426,7 @@ impl<'a, C, A> CampaignPatchCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Campaign)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -51647,8 +51507,7 @@ impl<'a, C, A> CampaignPatchCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -51844,7 +51703,7 @@ impl<'a, C, A> CampaignUpdateCall<'a, C, A> where C: BorrowMut, A /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Campaign)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -51924,8 +51783,7 @@ impl<'a, C, A> CampaignUpdateCall<'a, C, A> where C: BorrowMut, A } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -52130,7 +51988,7 @@ impl<'a, C, A> CampaignListCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, CampaignsListResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -52246,8 +52104,7 @@ impl<'a, C, A> CampaignListCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -52509,7 +52366,7 @@ impl<'a, C, A> EventTagDeleteCall<'a, C, A> where C: BorrowMut, A /// Perform the operation you have build so far. pub fn doit(mut self) -> Result { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -52578,8 +52435,7 @@ impl<'a, C, A> EventTagDeleteCall<'a, C, A> where C: BorrowMut, A } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Delete, &url) @@ -52765,7 +52621,7 @@ impl<'a, C, A> EventTagListCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, EventTagsListResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -52868,8 +52724,7 @@ impl<'a, C, A> EventTagListCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -53114,7 +52969,7 @@ impl<'a, C, A> EventTagInsertCall<'a, C, A> where C: BorrowMut, A /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, EventTag)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -53194,8 +53049,7 @@ impl<'a, C, A> EventTagInsertCall<'a, C, A> where C: BorrowMut, A } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -53382,7 +53236,7 @@ impl<'a, C, A> EventTagPatchCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, EventTag)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -53463,8 +53317,7 @@ impl<'a, C, A> EventTagPatchCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -53660,7 +53513,7 @@ impl<'a, C, A> EventTagUpdateCall<'a, C, A> where C: BorrowMut, A /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, EventTag)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -53740,8 +53593,7 @@ impl<'a, C, A> EventTagUpdateCall<'a, C, A> where C: BorrowMut, A } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -53921,7 +53773,7 @@ impl<'a, C, A> EventTagGetCall<'a, C, A> where C: BorrowMut, A: o /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, EventTag)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -53991,8 +53843,7 @@ impl<'a, C, A> EventTagGetCall<'a, C, A> where C: BorrowMut, A: o } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -54169,7 +54020,7 @@ impl<'a, C, A> RemarketingListGetCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, RemarketingList)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -54239,8 +54090,7 @@ impl<'a, C, A> RemarketingListGetCall<'a, C, A> where C: BorrowMut RemarketingListUpdateCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, RemarketingList)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -54503,8 +54353,7 @@ impl<'a, C, A> RemarketingListUpdateCall<'a, C, A> where C: BorrowMut RemarketingListListCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, RemarketingListsListResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -54789,8 +54638,7 @@ impl<'a, C, A> RemarketingListListCall<'a, C, A> where C: BorrowMut RemarketingListPatchCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, RemarketingList)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -55104,8 +54952,7 @@ impl<'a, C, A> RemarketingListPatchCall<'a, C, A> where C: BorrowMut RemarketingListInsertCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, RemarketingList)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -55381,8 +55228,7 @@ impl<'a, C, A> RemarketingListInsertCall<'a, C, A> where C: BorrowMut CityListCall<'a, C, A> where C: BorrowMut, A: oaut /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, CitiesListResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -55656,8 +55502,7 @@ impl<'a, C, A> CityListCall<'a, C, A> where C: BorrowMut, A: oaut } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -55861,7 +55706,7 @@ impl<'a, C, A> PlacementStrategyUpdateCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, PlacementStrategy)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -55941,8 +55786,7 @@ impl<'a, C, A> PlacementStrategyUpdateCall<'a, C, A> where C: BorrowMut PlacementStrategyGetCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, PlacementStrategy)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -56192,8 +56036,7 @@ impl<'a, C, A> PlacementStrategyGetCall<'a, C, A> where C: BorrowMut PlacementStrategyListCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, PlacementStrategiesListResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -56470,8 +56313,7 @@ impl<'a, C, A> PlacementStrategyListCall<'a, C, A> where C: BorrowMut PlacementStrategyDeleteCall<'a, C, A> where C: BorrowMut Result { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -56750,8 +56592,7 @@ impl<'a, C, A> PlacementStrategyDeleteCall<'a, C, A> where C: BorrowMut PlacementStrategyInsertCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, PlacementStrategy)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -57004,8 +56845,7 @@ impl<'a, C, A> PlacementStrategyInsertCall<'a, C, A> where C: BorrowMut PlacementStrategyPatchCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, PlacementStrategy)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -57273,8 +57113,7 @@ impl<'a, C, A> PlacementStrategyPatchCall<'a, C, A> where C: BorrowMut ProjectListCall<'a, C, A> where C: BorrowMut, A: o /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, ProjectsListResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -57571,8 +57410,7 @@ impl<'a, C, A> ProjectListCall<'a, C, A> where C: BorrowMut, A: o } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -57790,7 +57628,7 @@ impl<'a, C, A> ProjectGetCall<'a, C, A> where C: BorrowMut, A: oa /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Project)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -57860,8 +57698,7 @@ impl<'a, C, A> ProjectGetCall<'a, C, A> where C: BorrowMut, A: oa } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -58044,7 +57881,7 @@ impl<'a, C, A> DirectorySiteInsertCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, DirectorySite)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -58124,8 +57961,7 @@ impl<'a, C, A> DirectorySiteInsertCall<'a, C, A> where C: BorrowMut DirectorySiteListCall<'a, C, A> where C: BorrowMut /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, DirectorySitesListResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -58440,8 +58276,7 @@ impl<'a, C, A> DirectorySiteListCall<'a, C, A> where C: BorrowMut } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -58700,7 +58535,7 @@ impl<'a, C, A> DirectorySiteGetCall<'a, C, A> where C: BorrowMut, /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, DirectorySite)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -58770,8 +58605,7 @@ impl<'a, C, A> DirectorySiteGetCall<'a, C, A> where C: BorrowMut, } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -58954,7 +58788,7 @@ impl<'a, C, A> SizeInsertCall<'a, C, A> where C: BorrowMut, A: oa /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Size)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -59034,8 +58868,7 @@ impl<'a, C, A> SizeInsertCall<'a, C, A> where C: BorrowMut, A: oa } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -59222,7 +59055,7 @@ impl<'a, C, A> SizeListCall<'a, C, A> where C: BorrowMut, A: oaut /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, SizesListResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -59305,8 +59138,7 @@ impl<'a, C, A> SizeListCall<'a, C, A> where C: BorrowMut, A: oaut } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -59502,7 +59334,7 @@ impl<'a, C, A> SizeGetCall<'a, C, A> where C: BorrowMut, A: oauth /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Size)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -59572,8 +59404,7 @@ impl<'a, C, A> SizeGetCall<'a, C, A> where C: BorrowMut, A: oauth } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -59750,7 +59581,7 @@ impl<'a, C, A> AccountActiveAdSummaryGetCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, AccountActiveAdSummary)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -59820,8 +59651,7 @@ impl<'a, C, A> AccountActiveAdSummaryGetCall<'a, C, A> where C: BorrowMut AccountUserProfileUpdateCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, AccountUserProfile)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -60084,8 +59914,7 @@ impl<'a, C, A> AccountUserProfileUpdateCall<'a, C, A> where C: BorrowMut AccountUserProfileListCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, AccountUserProfilesListResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -60380,8 +60209,7 @@ impl<'a, C, A> AccountUserProfileListCall<'a, C, A> where C: BorrowMut AccountUserProfileInsertCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, AccountUserProfile)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -60698,8 +60526,7 @@ impl<'a, C, A> AccountUserProfileInsertCall<'a, C, A> where C: BorrowMut AccountUserProfilePatchCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, AccountUserProfile)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -60967,8 +60794,7 @@ impl<'a, C, A> AccountUserProfilePatchCall<'a, C, A> where C: BorrowMut AccountUserProfileGetCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, AccountUserProfile)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -61228,8 +61054,7 @@ impl<'a, C, A> AccountUserProfileGetCall<'a, C, A> where C: BorrowMut CountryListCall<'a, C, A> where C: BorrowMut, A: o /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, CountriesListResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -61474,8 +61299,7 @@ impl<'a, C, A> CountryListCall<'a, C, A> where C: BorrowMut, A: o } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -61642,7 +61466,7 @@ impl<'a, C, A> CountryGetCall<'a, C, A> where C: BorrowMut, A: oa /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Country)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -61712,8 +61536,7 @@ impl<'a, C, A> CountryGetCall<'a, C, A> where C: BorrowMut, A: oa } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -61891,7 +61714,7 @@ impl<'a, C, A> OrderDocumentGetCall<'a, C, A> where C: BorrowMut, /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, OrderDocument)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -61962,8 +61785,7 @@ impl<'a, C, A> OrderDocumentGetCall<'a, C, A> where C: BorrowMut, } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -62168,7 +61990,7 @@ impl<'a, C, A> OrderDocumentListCall<'a, C, A> where C: BorrowMut /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, OrderDocumentsListResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -62271,8 +62093,7 @@ impl<'a, C, A> OrderDocumentListCall<'a, C, A> where C: BorrowMut } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -62515,7 +62336,7 @@ impl<'a, C, A> PostalCodeGetCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, PostalCode)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -62585,8 +62406,7 @@ impl<'a, C, A> PostalCodeGetCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -62762,7 +62582,7 @@ impl<'a, C, A> PostalCodeListCall<'a, C, A> where C: BorrowMut, A /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, PostalCodesListResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -62831,8 +62651,7 @@ impl<'a, C, A> PostalCodeListCall<'a, C, A> where C: BorrowMut, A } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -62998,7 +62817,7 @@ impl<'a, C, A> BrowserListCall<'a, C, A> where C: BorrowMut, A: o /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, BrowsersListResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -63067,8 +62886,7 @@ impl<'a, C, A> BrowserListCall<'a, C, A> where C: BorrowMut, A: o } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -63235,7 +63053,7 @@ impl<'a, C, A> AccountGetCall<'a, C, A> where C: BorrowMut, A: oa /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Account)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -63305,8 +63123,7 @@ impl<'a, C, A> AccountGetCall<'a, C, A> where C: BorrowMut, A: oa } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -63496,7 +63313,7 @@ impl<'a, C, A> AccountListCall<'a, C, A> where C: BorrowMut, A: o /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, AccountsListResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -63588,8 +63405,7 @@ impl<'a, C, A> AccountListCall<'a, C, A> where C: BorrowMut, A: o } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -63812,7 +63628,7 @@ impl<'a, C, A> AccountUpdateCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Account)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -63892,8 +63708,7 @@ impl<'a, C, A> AccountUpdateCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -64080,7 +63895,7 @@ impl<'a, C, A> AccountPatchCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Account)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -64161,8 +63976,7 @@ impl<'a, C, A> AccountPatchCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -64359,7 +64173,7 @@ impl<'a, C, A> PlacementPatchCall<'a, C, A> where C: BorrowMut, A /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Placement)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -64440,8 +64254,7 @@ impl<'a, C, A> PlacementPatchCall<'a, C, A> where C: BorrowMut, A } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -64674,7 +64487,7 @@ impl<'a, C, A> PlacementListCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, PlacementsListResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -64831,8 +64644,7 @@ impl<'a, C, A> PlacementListCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -65032,7 +64844,7 @@ impl<'a, C, A> PlacementListCall<'a, C, A> where C: BorrowMut, A: self._content_category_ids.push(new_value.to_string()); self } - /// Select only placements that are associated with these compatibilities. DISPLAY and DISPLAY_INTERSTITIAL refer to rendering either on desktop or on mobile devices for regular or interstitial ads respectively. APP and APP_INTERSTITIAL are for rendering in mobile apps.IN_STREAM_VIDEO refers to rendering in in-stream video ads developed with the VAST standard. + /// Select only placements that are associated with these compatibilities. DISPLAY and DISPLAY_INTERSTITIAL refer to rendering either on desktop or on mobile devices for regular or interstitial ads respectively. APP and APP_INTERSTITIAL are for rendering in mobile apps. IN_STREAM_VIDEO refers to rendering in in-stream video ads developed with the VAST standard. /// /// Append the given value to the *compatibilities* query property. /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. @@ -65170,7 +64982,7 @@ impl<'a, C, A> PlacementInsertCall<'a, C, A> where C: BorrowMut, /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Placement)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -65250,8 +65062,7 @@ impl<'a, C, A> PlacementInsertCall<'a, C, A> where C: BorrowMut, } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -65437,7 +65248,7 @@ impl<'a, C, A> PlacementUpdateCall<'a, C, A> where C: BorrowMut, /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Placement)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -65517,8 +65328,7 @@ impl<'a, C, A> PlacementUpdateCall<'a, C, A> where C: BorrowMut, } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -65703,7 +65513,7 @@ impl<'a, C, A> PlacementGeneratetagCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, PlacementsGenerateTagsResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -65785,8 +65595,7 @@ impl<'a, C, A> PlacementGeneratetagCall<'a, C, A> where C: BorrowMut PlacementGetCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Placement)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -66046,8 +65855,7 @@ impl<'a, C, A> PlacementGetCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) diff --git a/gen/discovery1-cli/Cargo.toml b/gen/discovery1-cli/Cargo.toml index c383398776..f831793b16 100644 --- a/gen/discovery1-cli/Cargo.toml +++ b/gen/discovery1-cli/Cargo.toml @@ -4,7 +4,7 @@ [package] name = "google-discovery1-cli" -version = "0.3.3+00000000" +version = "0.3.4+00000000" authors = ["Sebastian Thiel "] description = "A complete library to interact with discovery (protocol v1)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/discovery1-cli" @@ -17,18 +17,18 @@ keywords = ["discovery", "google", "cli"] name = "discovery1" [dependencies] -hyper = "0.7" -mime = "0.1.0" -serde = ">= 0.7.0" -serde_json = ">= 0.7.0" -yup-oauth2 = ">= 0.5.4" +hyper = "0.8" +mime = "0.2.0" +serde = "0.6.0" +serde_json = "0.6.0" +yup-oauth2 = ">= 0.5.6" strsim = "0.4" yup-hyper-mock = "1.0" clap = "2.0" [build-dependencies] -syntex = { version = ">= 0.23" } -serde_codegen = { version = ">= 0.6" } +syntex = { version = "= 0.28" } +serde_codegen = { version = "= 0.6.13" } [dependencies.google-discovery1] diff --git a/gen/discovery1-cli/README.md b/gen/discovery1-cli/README.md index 200fd523a7..91958b128c 100644 --- a/gen/discovery1-cli/README.md +++ b/gen/discovery1-cli/README.md @@ -17,14 +17,14 @@ Everything else about the *discovery* API can be found at the You can download the pre-compiled 64bit binaries for the following platforms: -* ![icon](http://megaicons.net/static/img/icons_sizes/6/140/16/ubuntu-icon.png) [ubuntu](http://dl.byronimo.de/google.rs/cli/0.3.3/ubuntu/discovery1.tar.gz) -* ![icon](http://hydra-media.cursecdn.com/wow.gamepedia.com/a/a2/Apple-icon-16x16.png?version=25ddd67ac3dd3b634478e3978b76cb74) [osx](http://dl.byronimo.de/google.rs/cli/0.3.3/osx/discovery1.tar.gz) +* ![icon](http://megaicons.net/static/img/icons_sizes/6/140/16/ubuntu-icon.png) [ubuntu](http://dl.byronimo.de/google.rs/cli/0.3.4/ubuntu/discovery1.tar.gz) +* ![icon](http://hydra-media.cursecdn.com/wow.gamepedia.com/a/a2/Apple-icon-16x16.png?version=25ddd67ac3dd3b634478e3978b76cb74) [osx](http://dl.byronimo.de/google.rs/cli/0.3.4/osx/discovery1.tar.gz) Find the source code [on github](https://github.com/Byron/google-apis-rs/tree/master/gen/discovery1-cli). # Usage -This documentation was generated from the *discovery* API at revision *00000000*. The CLI is at version *0.3.3*. +This documentation was generated from the *discovery* API at revision *00000000*. The CLI is at version *0.3.4*. ```bash discovery1 [options] diff --git a/gen/discovery1-cli/mkdocs.yml b/gen/discovery1-cli/mkdocs.yml index fa06cb50f7..ae9668d327 100644 --- a/gen/discovery1-cli/mkdocs.yml +++ b/gen/discovery1-cli/mkdocs.yml @@ -1,4 +1,4 @@ -site_name: discovery v0.3.3+00000000 +site_name: discovery v0.3.4+00000000 site_url: http://byron.github.io/google-apis-rs/google-discovery1-cli site_description: Write integrating applications with bcore diff --git a/gen/discovery1-cli/src/cmn.rs b/gen/discovery1-cli/src/cmn.rs index 188159ee80..ae86fdef65 100644 --- a/gen/discovery1-cli/src/cmn.rs +++ b/gen/discovery1-cli/src/cmn.rs @@ -414,7 +414,7 @@ impl TokenStorage for JsonTokenStorage { Err(err) => match err.kind() { io::ErrorKind::NotFound => Ok(()), - _ => Err(json::Error::Io(err)) + _ => Err(json::Error::IoError(err)) }, Ok(_) => Ok(()), } @@ -427,7 +427,7 @@ impl TokenStorage for JsonTokenStorage { Err(serde_err) => Err(serde_err), } }, - Err(io_err) => Err(json::Error::Io(io_err)) + Err(io_err) => Err(json::Error::IoError(io_err)) } } } @@ -444,7 +444,7 @@ impl TokenStorage for JsonTokenStorage { Err(io_err) => { match io_err.kind() { io::ErrorKind::NotFound => Ok(None), - _ => Err(json::Error::Io(io_err)) + _ => Err(json::Error::IoError(io_err)) } } } @@ -683,7 +683,7 @@ pub fn application_secret_from_directory(dir: &str, = json::from_str(json_console_secret).unwrap(); match json::to_writer_pretty(&mut f, &console_secret) { Err(serde_err) => match serde_err { - json::Error::Io(err) => err, + json::Error::IoError(err) => err, _ => panic!("Unexpected serde error: {:#?}", serde_err) }, Ok(_) => continue, @@ -696,7 +696,7 @@ pub fn application_secret_from_directory(dir: &str, }, Ok(f) => { match json::de::from_reader::<_, ConsoleApplicationSecret>(f) { - Err(json::Error::Io(err)) => + Err(json::Error::IoError(err)) => return secret_io_error(err), Err(json_err) => return Err(CLIError::Configuration( diff --git a/gen/discovery1-cli/src/main.rs b/gen/discovery1-cli/src/main.rs index 11209dfa54..b1c699489f 100644 --- a/gen/discovery1-cli/src/main.rs +++ b/gen/discovery1-cli/src/main.rs @@ -302,7 +302,7 @@ fn main() { let mut app = App::new("discovery1") .author("Sebastian Thiel ") - .version("0.3.3+00000000") + .version("0.3.4+00000000") .about("Lets you discover information about other Google APIs, such as what APIs are available, the resource and method details for each API.") .after_help("All documentation details can be found at http://byron.github.io/google-apis-rs/google_discovery1_cli") .arg(Arg::with_name("folder") diff --git a/gen/discovery1/Cargo.toml b/gen/discovery1/Cargo.toml index d8c89f0802..ef0af74693 100644 --- a/gen/discovery1/Cargo.toml +++ b/gen/discovery1/Cargo.toml @@ -4,7 +4,7 @@ [package] name = "google-discovery1" -version = "0.1.12+00000000" +version = "0.1.13+00000000" authors = ["Sebastian Thiel "] description = "A complete library to interact with discovery (protocol v1)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/discovery1" @@ -16,14 +16,14 @@ build = "src/build.rs" [dependencies] -hyper = "0.7" -mime = "0.1.0" -serde = ">= 0.7.0" -serde_json = ">= 0.7.0" -yup-oauth2 = ">= 0.5.4" +hyper = "0.8" +mime = "0.2.0" +serde = "0.6.0" +serde_json = "0.6.0" +yup-oauth2 = ">= 0.5.6" url = ">= 0.5" [build-dependencies] -syntex = { version = ">= 0.23" } -serde_codegen = { version = ">= 0.6" } +syntex = { version = "= 0.28" } +serde_codegen = { version = "= 0.6.13" } diff --git a/gen/discovery1/README.md b/gen/discovery1/README.md index 5a7a222461..5fd8fb4342 100644 --- a/gen/discovery1/README.md +++ b/gen/discovery1/README.md @@ -5,7 +5,7 @@ DO NOT EDIT ! --> The `google-discovery1` library allows access to all features of the *Google discovery* service. -This documentation was generated from *discovery* crate version *0.1.12+00000000*, where *00000000* is the exact revision of the *discovery:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.12*. +This documentation was generated from *discovery* crate version *0.1.13+00000000*, where *00000000* is the exact revision of the *discovery:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.13*. Everything else about the *discovery* *v1* API can be found at the [official documentation site](https://developers.google.com/discovery/). diff --git a/gen/discovery1/src/cmn.rs b/gen/discovery1/src/cmn.rs index 87b91a8986..c69621da55 100644 --- a/gen/discovery1/src/cmn.rs +++ b/gen/discovery1/src/cmn.rs @@ -12,7 +12,7 @@ use mime::{Mime, TopLevel, SubLevel, Attr, Value}; use oauth2::{TokenType, Retry, self}; use hyper; use hyper::header::{ContentType, ContentLength, Headers, UserAgent, Authorization, Header, - HeaderFormat}; + HeaderFormat, Bearer}; use hyper::http::h1::LINE_ENDING; use hyper::method::Method; use hyper::status::StatusCode; @@ -634,7 +634,7 @@ pub struct ResumableUploadHelper<'a, A: 'a> { pub start_at: Option, pub auth: &'a mut A, pub user_agent: &'a str, - pub auth_header: Authorization, + pub auth_header: Authorization, pub url: &'a str, pub reader: &'a mut ReadSeek, pub media_type: Mime, diff --git a/gen/discovery1/src/lib.rs b/gen/discovery1/src/lib.rs index 85c09a04da..811f903bef 100644 --- a/gen/discovery1/src/lib.rs +++ b/gen/discovery1/src/lib.rs @@ -2,7 +2,7 @@ // This file was generated automatically from 'src/mako/api/lib.rs.mako' // DO NOT EDIT ! -//! This documentation was generated from *discovery* crate version *0.1.12+00000000*, where *00000000* is the exact revision of the *discovery:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.12*. +//! This documentation was generated from *discovery* crate version *0.1.13+00000000*, where *00000000* is the exact revision of the *discovery:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.13*. //! //! Everything else about the *discovery* *v1* API can be found at the //! [official documentation site](https://developers.google.com/discovery/). diff --git a/gen/discovery1/src/lib.rs.in b/gen/discovery1/src/lib.rs.in index ebf211dac7..b0adbc9673 100644 --- a/gen/discovery1/src/lib.rs.in +++ b/gen/discovery1/src/lib.rs.in @@ -105,7 +105,7 @@ impl<'a, C, A> Discovery Discovery { client: RefCell::new(client), auth: RefCell::new(authenticator), - _user_agent: "google-api-rust-client/0.1.12".to_string(), + _user_agent: "google-api-rust-client/0.1.13".to_string(), } } @@ -114,7 +114,7 @@ impl<'a, C, A> Discovery } /// Set the user-agent header field to use in all requests to the server. - /// It defaults to `google-api-rust-client/0.1.12`. + /// It defaults to `google-api-rust-client/0.1.13`. /// /// Returns the previously set user-agent. pub fn user_agent(&mut self, agent_name: String) -> String { @@ -751,7 +751,7 @@ impl<'a, C, A> ApiGetRestCall<'a, C, A> where C: BorrowMut, A: oa /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, RestDescription)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -966,7 +966,7 @@ impl<'a, C, A> ApiListCall<'a, C, A> where C: BorrowMut, A: oauth /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, DirectoryList)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, diff --git a/gen/dns1-cli/Cargo.toml b/gen/dns1-cli/Cargo.toml index edce82e76b..1c21b6e34a 100644 --- a/gen/dns1-cli/Cargo.toml +++ b/gen/dns1-cli/Cargo.toml @@ -4,7 +4,7 @@ [package] name = "google-dns1-cli" -version = "0.3.3+20160209" +version = "0.3.4+20160224" authors = ["Sebastian Thiel "] description = "A complete library to interact with dns (protocol v1)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/dns1-cli" @@ -17,18 +17,18 @@ keywords = ["dns", "google", "cli"] name = "dns1" [dependencies] -hyper = "0.7" -mime = "0.1.0" -serde = ">= 0.7.0" -serde_json = ">= 0.7.0" -yup-oauth2 = ">= 0.5.4" +hyper = "0.8" +mime = "0.2.0" +serde = "0.6.0" +serde_json = "0.6.0" +yup-oauth2 = ">= 0.5.6" strsim = "0.4" yup-hyper-mock = "1.0" clap = "2.0" [build-dependencies] -syntex = { version = ">= 0.23" } -serde_codegen = { version = ">= 0.6" } +syntex = { version = "= 0.28" } +serde_codegen = { version = "= 0.6.13" } [dependencies.google-dns1] diff --git a/gen/dns1-cli/README.md b/gen/dns1-cli/README.md index 626cba4214..3f2c43f5e0 100644 --- a/gen/dns1-cli/README.md +++ b/gen/dns1-cli/README.md @@ -17,14 +17,14 @@ Everything else about the *dns* API can be found at the You can download the pre-compiled 64bit binaries for the following platforms: -* ![icon](http://megaicons.net/static/img/icons_sizes/6/140/16/ubuntu-icon.png) [ubuntu](http://dl.byronimo.de/google.rs/cli/0.3.3/ubuntu/dns1.tar.gz) -* ![icon](http://hydra-media.cursecdn.com/wow.gamepedia.com/a/a2/Apple-icon-16x16.png?version=25ddd67ac3dd3b634478e3978b76cb74) [osx](http://dl.byronimo.de/google.rs/cli/0.3.3/osx/dns1.tar.gz) +* ![icon](http://megaicons.net/static/img/icons_sizes/6/140/16/ubuntu-icon.png) [ubuntu](http://dl.byronimo.de/google.rs/cli/0.3.4/ubuntu/dns1.tar.gz) +* ![icon](http://hydra-media.cursecdn.com/wow.gamepedia.com/a/a2/Apple-icon-16x16.png?version=25ddd67ac3dd3b634478e3978b76cb74) [osx](http://dl.byronimo.de/google.rs/cli/0.3.4/osx/dns1.tar.gz) Find the source code [on github](https://github.com/Byron/google-apis-rs/tree/master/gen/dns1-cli). # Usage -This documentation was generated from the *dns* API at revision *20160209*. The CLI is at version *0.3.3*. +This documentation was generated from the *dns* API at revision *20160224*. The CLI is at version *0.3.4*. ```bash dns1 [options] diff --git a/gen/dns1-cli/mkdocs.yml b/gen/dns1-cli/mkdocs.yml index f8d294fdd2..4b3b928df6 100644 --- a/gen/dns1-cli/mkdocs.yml +++ b/gen/dns1-cli/mkdocs.yml @@ -1,4 +1,4 @@ -site_name: dns v0.3.3+20160209 +site_name: dns v0.3.4+20160224 site_url: http://byron.github.io/google-apis-rs/google-dns1-cli site_description: Write integrating applications with bcore diff --git a/gen/dns1-cli/src/cmn.rs b/gen/dns1-cli/src/cmn.rs index 188159ee80..ae86fdef65 100644 --- a/gen/dns1-cli/src/cmn.rs +++ b/gen/dns1-cli/src/cmn.rs @@ -414,7 +414,7 @@ impl TokenStorage for JsonTokenStorage { Err(err) => match err.kind() { io::ErrorKind::NotFound => Ok(()), - _ => Err(json::Error::Io(err)) + _ => Err(json::Error::IoError(err)) }, Ok(_) => Ok(()), } @@ -427,7 +427,7 @@ impl TokenStorage for JsonTokenStorage { Err(serde_err) => Err(serde_err), } }, - Err(io_err) => Err(json::Error::Io(io_err)) + Err(io_err) => Err(json::Error::IoError(io_err)) } } } @@ -444,7 +444,7 @@ impl TokenStorage for JsonTokenStorage { Err(io_err) => { match io_err.kind() { io::ErrorKind::NotFound => Ok(None), - _ => Err(json::Error::Io(io_err)) + _ => Err(json::Error::IoError(io_err)) } } } @@ -683,7 +683,7 @@ pub fn application_secret_from_directory(dir: &str, = json::from_str(json_console_secret).unwrap(); match json::to_writer_pretty(&mut f, &console_secret) { Err(serde_err) => match serde_err { - json::Error::Io(err) => err, + json::Error::IoError(err) => err, _ => panic!("Unexpected serde error: {:#?}", serde_err) }, Ok(_) => continue, @@ -696,7 +696,7 @@ pub fn application_secret_from_directory(dir: &str, }, Ok(f) => { match json::de::from_reader::<_, ConsoleApplicationSecret>(f) { - Err(json::Error::Io(err)) => + Err(json::Error::IoError(err)) => return secret_io_error(err), Err(json_err) => return Err(CLIError::Configuration( diff --git a/gen/dns1-cli/src/main.rs b/gen/dns1-cli/src/main.rs index 728357005b..93ebeb4909 100644 --- a/gen/dns1-cli/src/main.rs +++ b/gen/dns1-cli/src/main.rs @@ -1025,7 +1025,7 @@ fn main() { let mut app = App::new("dns1") .author("Sebastian Thiel ") - .version("0.3.3+20160209") + .version("0.3.4+20160224") .about("The Google Cloud DNS API provides services for configuring and serving authoritative DNS records.") .after_help("All documentation details can be found at http://byron.github.io/google-apis-rs/google_dns1_cli") .arg(Arg::with_name("url") diff --git a/gen/dns1/Cargo.toml b/gen/dns1/Cargo.toml index 1851890991..e8f6578428 100644 --- a/gen/dns1/Cargo.toml +++ b/gen/dns1/Cargo.toml @@ -4,7 +4,7 @@ [package] name = "google-dns1" -version = "0.1.12+20160209" +version = "0.1.13+20160224" authors = ["Sebastian Thiel "] description = "A complete library to interact with dns (protocol v1)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/dns1" @@ -16,14 +16,14 @@ build = "src/build.rs" [dependencies] -hyper = "0.7" -mime = "0.1.0" -serde = ">= 0.7.0" -serde_json = ">= 0.7.0" -yup-oauth2 = ">= 0.5.4" +hyper = "0.8" +mime = "0.2.0" +serde = "0.6.0" +serde_json = "0.6.0" +yup-oauth2 = ">= 0.5.6" url = ">= 0.5" [build-dependencies] -syntex = { version = ">= 0.23" } -serde_codegen = { version = ">= 0.6" } +syntex = { version = "= 0.28" } +serde_codegen = { version = "= 0.6.13" } diff --git a/gen/dns1/README.md b/gen/dns1/README.md index fac9194e61..7864e785f1 100644 --- a/gen/dns1/README.md +++ b/gen/dns1/README.md @@ -5,7 +5,7 @@ DO NOT EDIT ! --> The `google-dns1` library allows access to all features of the *Google dns* service. -This documentation was generated from *dns* crate version *0.1.12+20160209*, where *20160209* is the exact revision of the *dns:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.12*. +This documentation was generated from *dns* crate version *0.1.13+20160224*, where *20160224* is the exact revision of the *dns:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.13*. Everything else about the *dns* *v1* API can be found at the [official documentation site](https://developers.google.com/cloud-dns). diff --git a/gen/dns1/src/cmn.rs b/gen/dns1/src/cmn.rs index 87b91a8986..c69621da55 100644 --- a/gen/dns1/src/cmn.rs +++ b/gen/dns1/src/cmn.rs @@ -12,7 +12,7 @@ use mime::{Mime, TopLevel, SubLevel, Attr, Value}; use oauth2::{TokenType, Retry, self}; use hyper; use hyper::header::{ContentType, ContentLength, Headers, UserAgent, Authorization, Header, - HeaderFormat}; + HeaderFormat, Bearer}; use hyper::http::h1::LINE_ENDING; use hyper::method::Method; use hyper::status::StatusCode; @@ -634,7 +634,7 @@ pub struct ResumableUploadHelper<'a, A: 'a> { pub start_at: Option, pub auth: &'a mut A, pub user_agent: &'a str, - pub auth_header: Authorization, + pub auth_header: Authorization, pub url: &'a str, pub reader: &'a mut ReadSeek, pub media_type: Mime, diff --git a/gen/dns1/src/lib.rs b/gen/dns1/src/lib.rs index fe706cadd2..9d61bd45b5 100644 --- a/gen/dns1/src/lib.rs +++ b/gen/dns1/src/lib.rs @@ -2,7 +2,7 @@ // This file was generated automatically from 'src/mako/api/lib.rs.mako' // DO NOT EDIT ! -//! This documentation was generated from *dns* crate version *0.1.12+20160209*, where *20160209* is the exact revision of the *dns:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.12*. +//! This documentation was generated from *dns* crate version *0.1.13+20160224*, where *20160224* is the exact revision of the *dns:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.13*. //! //! Everything else about the *dns* *v1* API can be found at the //! [official documentation site](https://developers.google.com/cloud-dns). diff --git a/gen/dns1/src/lib.rs.in b/gen/dns1/src/lib.rs.in index cdd398d934..27367c7990 100644 --- a/gen/dns1/src/lib.rs.in +++ b/gen/dns1/src/lib.rs.in @@ -142,7 +142,7 @@ impl<'a, C, A> Dns Dns { client: RefCell::new(client), auth: RefCell::new(authenticator), - _user_agent: "google-api-rust-client/0.1.12".to_string(), + _user_agent: "google-api-rust-client/0.1.13".to_string(), } } @@ -160,7 +160,7 @@ impl<'a, C, A> Dns } /// Set the user-agent header field to use in all requests to the server. - /// It defaults to `google-api-rust-client/0.1.12`. + /// It defaults to `google-api-rust-client/0.1.13`. /// /// Returns the previously set user-agent. pub fn user_agent(&mut self, agent_name: String) -> String { @@ -820,7 +820,7 @@ impl<'a, C, A> ChangeCreateCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Change)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -901,8 +901,7 @@ impl<'a, C, A> ChangeCreateCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -1100,7 +1099,7 @@ impl<'a, C, A> ChangeListCall<'a, C, A> where C: BorrowMut, A: oa /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, ChangesListResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -1182,8 +1181,7 @@ impl<'a, C, A> ChangeListCall<'a, C, A> where C: BorrowMut, A: oa } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -1389,7 +1387,7 @@ impl<'a, C, A> ChangeGetCall<'a, C, A> where C: BorrowMut, A: oau /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Change)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -1460,8 +1458,7 @@ impl<'a, C, A> ChangeGetCall<'a, C, A> where C: BorrowMut, A: oau } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -1654,7 +1651,7 @@ impl<'a, C, A> ManagedZoneCreateCall<'a, C, A> where C: BorrowMut /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, ManagedZone)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -1734,8 +1731,7 @@ impl<'a, C, A> ManagedZoneCreateCall<'a, C, A> where C: BorrowMut } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -1915,7 +1911,7 @@ impl<'a, C, A> ManagedZoneDeleteCall<'a, C, A> where C: BorrowMut /// Perform the operation you have build so far. pub fn doit(mut self) -> Result { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -1984,8 +1980,7 @@ impl<'a, C, A> ManagedZoneDeleteCall<'a, C, A> where C: BorrowMut } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Delete, &url) @@ -2152,7 +2147,7 @@ impl<'a, C, A> ManagedZoneGetCall<'a, C, A> where C: BorrowMut, A /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, ManagedZone)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -2222,8 +2217,7 @@ impl<'a, C, A> ManagedZoneGetCall<'a, C, A> where C: BorrowMut, A } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -2405,7 +2399,7 @@ impl<'a, C, A> ManagedZoneListCall<'a, C, A> where C: BorrowMut, /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, ManagedZonesListResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -2483,8 +2477,7 @@ impl<'a, C, A> ManagedZoneListCall<'a, C, A> where C: BorrowMut, } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -2680,7 +2673,7 @@ impl<'a, C, A> ResourceRecordSetListCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, ResourceRecordSetsListResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -2762,8 +2755,7 @@ impl<'a, C, A> ResourceRecordSetListCall<'a, C, A> where C: BorrowMut ProjectGetCall<'a, C, A> where C: BorrowMut, A: oa /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Project)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -3036,8 +3028,7 @@ impl<'a, C, A> ProjectGetCall<'a, C, A> where C: BorrowMut, A: oa } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) diff --git a/gen/doubleclickbidmanager1-cli/Cargo.toml b/gen/doubleclickbidmanager1-cli/Cargo.toml index 6329666b7f..f13967d472 100644 --- a/gen/doubleclickbidmanager1-cli/Cargo.toml +++ b/gen/doubleclickbidmanager1-cli/Cargo.toml @@ -4,7 +4,7 @@ [package] name = "google-doubleclickbidmanager1-cli" -version = "0.3.3+20160225" +version = "0.3.4+20160225" authors = ["Sebastian Thiel "] description = "A complete library to interact with DoubleClick Bid Manager (protocol v1)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/doubleclickbidmanager1-cli" @@ -17,18 +17,18 @@ keywords = ["doubleclickbidmanage", "google", "cli"] name = "doubleclickbidmanager1" [dependencies] -hyper = "0.7" -mime = "0.1.0" -serde = ">= 0.7.0" -serde_json = ">= 0.7.0" -yup-oauth2 = ">= 0.5.4" +hyper = "0.8" +mime = "0.2.0" +serde = "0.6.0" +serde_json = "0.6.0" +yup-oauth2 = ">= 0.5.6" strsim = "0.4" yup-hyper-mock = "1.0" clap = "2.0" [build-dependencies] -syntex = { version = ">= 0.23" } -serde_codegen = { version = ">= 0.6" } +syntex = { version = "= 0.28" } +serde_codegen = { version = "= 0.6.13" } [dependencies.google-doubleclickbidmanager1] diff --git a/gen/doubleclickbidmanager1-cli/README.md b/gen/doubleclickbidmanager1-cli/README.md index ed8b7fdc6e..7142428ffb 100644 --- a/gen/doubleclickbidmanager1-cli/README.md +++ b/gen/doubleclickbidmanager1-cli/README.md @@ -17,14 +17,14 @@ Everything else about the *DoubleClick Bid Manager* API can be found at the You can download the pre-compiled 64bit binaries for the following platforms: -* ![icon](http://megaicons.net/static/img/icons_sizes/6/140/16/ubuntu-icon.png) [ubuntu](http://dl.byronimo.de/google.rs/cli/0.3.3/ubuntu/doubleclickbidmanager1.tar.gz) -* ![icon](http://hydra-media.cursecdn.com/wow.gamepedia.com/a/a2/Apple-icon-16x16.png?version=25ddd67ac3dd3b634478e3978b76cb74) [osx](http://dl.byronimo.de/google.rs/cli/0.3.3/osx/doubleclickbidmanager1.tar.gz) +* ![icon](http://megaicons.net/static/img/icons_sizes/6/140/16/ubuntu-icon.png) [ubuntu](http://dl.byronimo.de/google.rs/cli/0.3.4/ubuntu/doubleclickbidmanager1.tar.gz) +* ![icon](http://hydra-media.cursecdn.com/wow.gamepedia.com/a/a2/Apple-icon-16x16.png?version=25ddd67ac3dd3b634478e3978b76cb74) [osx](http://dl.byronimo.de/google.rs/cli/0.3.4/osx/doubleclickbidmanager1.tar.gz) Find the source code [on github](https://github.com/Byron/google-apis-rs/tree/master/gen/doubleclickbidmanager1-cli). # Usage -This documentation was generated from the *DoubleClick Bid Manager* API at revision *20160225*. The CLI is at version *0.3.3*. +This documentation was generated from the *DoubleClick Bid Manager* API at revision *20160225*. The CLI is at version *0.3.4*. ```bash doubleclickbidmanager1 [options] diff --git a/gen/doubleclickbidmanager1-cli/mkdocs.yml b/gen/doubleclickbidmanager1-cli/mkdocs.yml index aa0ce2a397..f67729c9ee 100644 --- a/gen/doubleclickbidmanager1-cli/mkdocs.yml +++ b/gen/doubleclickbidmanager1-cli/mkdocs.yml @@ -1,4 +1,4 @@ -site_name: DoubleClick Bid Manager v0.3.3+20160225 +site_name: DoubleClick Bid Manager v0.3.4+20160225 site_url: http://byron.github.io/google-apis-rs/google-doubleclickbidmanager1-cli site_description: Write integrating applications with bcore diff --git a/gen/doubleclickbidmanager1-cli/src/cmn.rs b/gen/doubleclickbidmanager1-cli/src/cmn.rs index 188159ee80..ae86fdef65 100644 --- a/gen/doubleclickbidmanager1-cli/src/cmn.rs +++ b/gen/doubleclickbidmanager1-cli/src/cmn.rs @@ -414,7 +414,7 @@ impl TokenStorage for JsonTokenStorage { Err(err) => match err.kind() { io::ErrorKind::NotFound => Ok(()), - _ => Err(json::Error::Io(err)) + _ => Err(json::Error::IoError(err)) }, Ok(_) => Ok(()), } @@ -427,7 +427,7 @@ impl TokenStorage for JsonTokenStorage { Err(serde_err) => Err(serde_err), } }, - Err(io_err) => Err(json::Error::Io(io_err)) + Err(io_err) => Err(json::Error::IoError(io_err)) } } } @@ -444,7 +444,7 @@ impl TokenStorage for JsonTokenStorage { Err(io_err) => { match io_err.kind() { io::ErrorKind::NotFound => Ok(None), - _ => Err(json::Error::Io(io_err)) + _ => Err(json::Error::IoError(io_err)) } } } @@ -683,7 +683,7 @@ pub fn application_secret_from_directory(dir: &str, = json::from_str(json_console_secret).unwrap(); match json::to_writer_pretty(&mut f, &console_secret) { Err(serde_err) => match serde_err { - json::Error::Io(err) => err, + json::Error::IoError(err) => err, _ => panic!("Unexpected serde error: {:#?}", serde_err) }, Ok(_) => continue, @@ -696,7 +696,7 @@ pub fn application_secret_from_directory(dir: &str, }, Ok(f) => { match json::de::from_reader::<_, ConsoleApplicationSecret>(f) { - Err(json::Error::Io(err)) => + Err(json::Error::IoError(err)) => return secret_io_error(err), Err(json_err) => return Err(CLIError::Configuration( diff --git a/gen/doubleclickbidmanager1-cli/src/main.rs b/gen/doubleclickbidmanager1-cli/src/main.rs index 844f0eec2d..e5fdfbf4df 100644 --- a/gen/doubleclickbidmanager1-cli/src/main.rs +++ b/gen/doubleclickbidmanager1-cli/src/main.rs @@ -1003,7 +1003,7 @@ fn main() { let mut app = App::new("doubleclickbidmanager1") .author("Sebastian Thiel ") - .version("0.3.3+20160225") + .version("0.3.4+20160225") .about("API for viewing and managing your reports in DoubleClick Bid Manager.") .after_help("All documentation details can be found at http://byron.github.io/google-apis-rs/google_doubleclickbidmanager1_cli") .arg(Arg::with_name("folder") diff --git a/gen/doubleclickbidmanager1/Cargo.toml b/gen/doubleclickbidmanager1/Cargo.toml index a9a80b95b0..55f5987e7d 100644 --- a/gen/doubleclickbidmanager1/Cargo.toml +++ b/gen/doubleclickbidmanager1/Cargo.toml @@ -4,7 +4,7 @@ [package] name = "google-doubleclickbidmanager1" -version = "0.1.12+20160225" +version = "0.1.13+20160225" authors = ["Sebastian Thiel "] description = "A complete library to interact with DoubleClick Bid Manager (protocol v1)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/doubleclickbidmanager1" @@ -16,14 +16,14 @@ build = "src/build.rs" [dependencies] -hyper = "0.7" -mime = "0.1.0" -serde = ">= 0.7.0" -serde_json = ">= 0.7.0" -yup-oauth2 = ">= 0.5.4" +hyper = "0.8" +mime = "0.2.0" +serde = "0.6.0" +serde_json = "0.6.0" +yup-oauth2 = ">= 0.5.6" url = ">= 0.5" [build-dependencies] -syntex = { version = ">= 0.23" } -serde_codegen = { version = ">= 0.6" } +syntex = { version = "= 0.28" } +serde_codegen = { version = "= 0.6.13" } diff --git a/gen/doubleclickbidmanager1/README.md b/gen/doubleclickbidmanager1/README.md index b572a6fd11..a3e20733d1 100644 --- a/gen/doubleclickbidmanager1/README.md +++ b/gen/doubleclickbidmanager1/README.md @@ -5,7 +5,7 @@ DO NOT EDIT ! --> The `google-doubleclickbidmanager1` library allows access to all features of the *Google DoubleClick Bid Manager* service. -This documentation was generated from *DoubleClick Bid Manager* crate version *0.1.12+20160225*, where *20160225* is the exact revision of the *doubleclickbidmanager:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.12*. +This documentation was generated from *DoubleClick Bid Manager* crate version *0.1.13+20160225*, where *20160225* is the exact revision of the *doubleclickbidmanager:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.13*. Everything else about the *DoubleClick Bid Manager* *v1* API can be found at the [official documentation site](https://developers.google.com/bid-manager/). diff --git a/gen/doubleclickbidmanager1/src/cmn.rs b/gen/doubleclickbidmanager1/src/cmn.rs index 87b91a8986..c69621da55 100644 --- a/gen/doubleclickbidmanager1/src/cmn.rs +++ b/gen/doubleclickbidmanager1/src/cmn.rs @@ -12,7 +12,7 @@ use mime::{Mime, TopLevel, SubLevel, Attr, Value}; use oauth2::{TokenType, Retry, self}; use hyper; use hyper::header::{ContentType, ContentLength, Headers, UserAgent, Authorization, Header, - HeaderFormat}; + HeaderFormat, Bearer}; use hyper::http::h1::LINE_ENDING; use hyper::method::Method; use hyper::status::StatusCode; @@ -634,7 +634,7 @@ pub struct ResumableUploadHelper<'a, A: 'a> { pub start_at: Option, pub auth: &'a mut A, pub user_agent: &'a str, - pub auth_header: Authorization, + pub auth_header: Authorization, pub url: &'a str, pub reader: &'a mut ReadSeek, pub media_type: Mime, diff --git a/gen/doubleclickbidmanager1/src/lib.rs b/gen/doubleclickbidmanager1/src/lib.rs index cdf29aa5f0..3140298864 100644 --- a/gen/doubleclickbidmanager1/src/lib.rs +++ b/gen/doubleclickbidmanager1/src/lib.rs @@ -2,7 +2,7 @@ // This file was generated automatically from 'src/mako/api/lib.rs.mako' // DO NOT EDIT ! -//! This documentation was generated from *DoubleClick Bid Manager* crate version *0.1.12+20160225*, where *20160225* is the exact revision of the *doubleclickbidmanager:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.12*. +//! This documentation was generated from *DoubleClick Bid Manager* crate version *0.1.13+20160225*, where *20160225* is the exact revision of the *doubleclickbidmanager:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.13*. //! //! Everything else about the *DoubleClick Bid Manager* *v1* API can be found at the //! [official documentation site](https://developers.google.com/bid-manager/). diff --git a/gen/doubleclickbidmanager1/src/lib.rs.in b/gen/doubleclickbidmanager1/src/lib.rs.in index ee10a69696..73bdcb8763 100644 --- a/gen/doubleclickbidmanager1/src/lib.rs.in +++ b/gen/doubleclickbidmanager1/src/lib.rs.in @@ -105,7 +105,7 @@ impl<'a, C, A> DoubleClickBidManager DoubleClickBidManager { client: RefCell::new(client), auth: RefCell::new(authenticator), - _user_agent: "google-api-rust-client/0.1.12".to_string(), + _user_agent: "google-api-rust-client/0.1.13".to_string(), } } @@ -123,7 +123,7 @@ impl<'a, C, A> DoubleClickBidManager } /// Set the user-agent header field to use in all requests to the server. - /// It defaults to `google-api-rust-client/0.1.12`. + /// It defaults to `google-api-rust-client/0.1.13`. /// /// Returns the previously set user-agent. pub fn user_agent(&mut self, agent_name: String) -> String { @@ -989,7 +989,7 @@ impl<'a, C, A> RubiconNotifyproposalchangeCall<'a, C, A> where C: BorrowMut Result { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -1189,7 +1189,7 @@ impl<'a, C, A> LineitemUploadlineitemCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, UploadLineItemsResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -1400,7 +1400,7 @@ impl<'a, C, A> LineitemDownloadlineitemCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, DownloadLineItemsResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -1605,7 +1605,7 @@ impl<'a, C, A> ReportListreportCall<'a, C, A> where C: BorrowMut, /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, ListReportsResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -1817,7 +1817,7 @@ impl<'a, C, A> QueryListqueryCall<'a, C, A> where C: BorrowMut, A /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, ListQueriesResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -1998,7 +1998,7 @@ impl<'a, C, A> QueryGetqueryCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Query)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -2217,7 +2217,7 @@ impl<'a, C, A> QueryCreatequeryCall<'a, C, A> where C: BorrowMut, /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Query)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -2422,7 +2422,7 @@ impl<'a, C, A> QueryDeletequeryCall<'a, C, A> where C: BorrowMut, /// Perform the operation you have build so far. pub fn doit(mut self) -> Result { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -2631,7 +2631,7 @@ impl<'a, C, A> QueryRunqueryCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, diff --git a/gen/doubleclicksearch2-cli/Cargo.toml b/gen/doubleclicksearch2-cli/Cargo.toml index 88938c0811..35ab7bb3fe 100644 --- a/gen/doubleclicksearch2-cli/Cargo.toml +++ b/gen/doubleclicksearch2-cli/Cargo.toml @@ -4,7 +4,7 @@ [package] name = "google-doubleclicksearch2-cli" -version = "0.3.3+20160217" +version = "0.3.4+20160401" authors = ["Sebastian Thiel "] description = "A complete library to interact with doubleclicksearch (protocol v2)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/doubleclicksearch2-cli" @@ -17,18 +17,18 @@ keywords = ["doubleclicksearch", "google", "cli"] name = "doubleclicksearch2" [dependencies] -hyper = "0.7" -mime = "0.1.0" -serde = ">= 0.7.0" -serde_json = ">= 0.7.0" -yup-oauth2 = ">= 0.5.4" +hyper = "0.8" +mime = "0.2.0" +serde = "0.6.0" +serde_json = "0.6.0" +yup-oauth2 = ">= 0.5.6" strsim = "0.4" yup-hyper-mock = "1.0" clap = "2.0" [build-dependencies] -syntex = { version = ">= 0.23" } -serde_codegen = { version = ">= 0.6" } +syntex = { version = "= 0.28" } +serde_codegen = { version = "= 0.6.13" } [dependencies.google-doubleclicksearch2] diff --git a/gen/doubleclicksearch2-cli/README.md b/gen/doubleclicksearch2-cli/README.md index 999d8f9b5f..87a6b66a18 100644 --- a/gen/doubleclicksearch2-cli/README.md +++ b/gen/doubleclicksearch2-cli/README.md @@ -17,14 +17,14 @@ Everything else about the *doubleclicksearch* API can be found at the You can download the pre-compiled 64bit binaries for the following platforms: -* ![icon](http://megaicons.net/static/img/icons_sizes/6/140/16/ubuntu-icon.png) [ubuntu](http://dl.byronimo.de/google.rs/cli/0.3.3/ubuntu/doubleclicksearch2.tar.gz) -* ![icon](http://hydra-media.cursecdn.com/wow.gamepedia.com/a/a2/Apple-icon-16x16.png?version=25ddd67ac3dd3b634478e3978b76cb74) [osx](http://dl.byronimo.de/google.rs/cli/0.3.3/osx/doubleclicksearch2.tar.gz) +* ![icon](http://megaicons.net/static/img/icons_sizes/6/140/16/ubuntu-icon.png) [ubuntu](http://dl.byronimo.de/google.rs/cli/0.3.4/ubuntu/doubleclicksearch2.tar.gz) +* ![icon](http://hydra-media.cursecdn.com/wow.gamepedia.com/a/a2/Apple-icon-16x16.png?version=25ddd67ac3dd3b634478e3978b76cb74) [osx](http://dl.byronimo.de/google.rs/cli/0.3.4/osx/doubleclicksearch2.tar.gz) Find the source code [on github](https://github.com/Byron/google-apis-rs/tree/master/gen/doubleclicksearch2-cli). # Usage -This documentation was generated from the *doubleclicksearch* API at revision *20160217*. The CLI is at version *0.3.3*. +This documentation was generated from the *doubleclicksearch* API at revision *20160401*. The CLI is at version *0.3.4*. ```bash doubleclicksearch2 [options] diff --git a/gen/doubleclicksearch2-cli/mkdocs.yml b/gen/doubleclicksearch2-cli/mkdocs.yml index 87f384d69c..4cb6bbf6c3 100644 --- a/gen/doubleclicksearch2-cli/mkdocs.yml +++ b/gen/doubleclicksearch2-cli/mkdocs.yml @@ -1,4 +1,4 @@ -site_name: doubleclicksearch v0.3.3+20160217 +site_name: doubleclicksearch v0.3.4+20160401 site_url: http://byron.github.io/google-apis-rs/google-doubleclicksearch2-cli site_description: Write integrating applications with bcore diff --git a/gen/doubleclicksearch2-cli/src/cmn.rs b/gen/doubleclicksearch2-cli/src/cmn.rs index 188159ee80..ae86fdef65 100644 --- a/gen/doubleclicksearch2-cli/src/cmn.rs +++ b/gen/doubleclicksearch2-cli/src/cmn.rs @@ -414,7 +414,7 @@ impl TokenStorage for JsonTokenStorage { Err(err) => match err.kind() { io::ErrorKind::NotFound => Ok(()), - _ => Err(json::Error::Io(err)) + _ => Err(json::Error::IoError(err)) }, Ok(_) => Ok(()), } @@ -427,7 +427,7 @@ impl TokenStorage for JsonTokenStorage { Err(serde_err) => Err(serde_err), } }, - Err(io_err) => Err(json::Error::Io(io_err)) + Err(io_err) => Err(json::Error::IoError(io_err)) } } } @@ -444,7 +444,7 @@ impl TokenStorage for JsonTokenStorage { Err(io_err) => { match io_err.kind() { io::ErrorKind::NotFound => Ok(None), - _ => Err(json::Error::Io(io_err)) + _ => Err(json::Error::IoError(io_err)) } } } @@ -683,7 +683,7 @@ pub fn application_secret_from_directory(dir: &str, = json::from_str(json_console_secret).unwrap(); match json::to_writer_pretty(&mut f, &console_secret) { Err(serde_err) => match serde_err { - json::Error::Io(err) => err, + json::Error::IoError(err) => err, _ => panic!("Unexpected serde error: {:#?}", serde_err) }, Ok(_) => continue, @@ -696,7 +696,7 @@ pub fn application_secret_from_directory(dir: &str, }, Ok(f) => { match json::de::from_reader::<_, ConsoleApplicationSecret>(f) { - Err(json::Error::Io(err)) => + Err(json::Error::IoError(err)) => return secret_io_error(err), Err(json_err) => return Err(CLIError::Configuration( diff --git a/gen/doubleclicksearch2-cli/src/main.rs b/gen/doubleclicksearch2-cli/src/main.rs index 644f61103f..a6d8019d97 100644 --- a/gen/doubleclicksearch2-cli/src/main.rs +++ b/gen/doubleclicksearch2-cli/src/main.rs @@ -1291,8 +1291,8 @@ fn main() { let mut app = App::new("doubleclicksearch2") .author("Sebastian Thiel ") - .version("0.3.3+20160217") - .about("Report and modify your advertising data in DoubleClick Search (for example, campaigns, ad groups, keywords, and conversions).") + .version("0.3.4+20160401") + .about("Reports and modifies your advertising data in DoubleClick Search (for example, campaigns, ad groups, keywords, and conversions).") .after_help("All documentation details can be found at http://byron.github.io/google-apis-rs/google_doubleclicksearch2_cli") .arg(Arg::with_name("url") .long("scope") diff --git a/gen/doubleclicksearch2/Cargo.toml b/gen/doubleclicksearch2/Cargo.toml index 78304b5606..865c3e5bb7 100644 --- a/gen/doubleclicksearch2/Cargo.toml +++ b/gen/doubleclicksearch2/Cargo.toml @@ -4,7 +4,7 @@ [package] name = "google-doubleclicksearch2" -version = "0.1.12+20160217" +version = "0.1.13+20160401" authors = ["Sebastian Thiel "] description = "A complete library to interact with doubleclicksearch (protocol v2)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/doubleclicksearch2" @@ -16,14 +16,14 @@ build = "src/build.rs" [dependencies] -hyper = "0.7" -mime = "0.1.0" -serde = ">= 0.7.0" -serde_json = ">= 0.7.0" -yup-oauth2 = ">= 0.5.4" +hyper = "0.8" +mime = "0.2.0" +serde = "0.6.0" +serde_json = "0.6.0" +yup-oauth2 = ">= 0.5.6" url = ">= 0.5" [build-dependencies] -syntex = { version = ">= 0.23" } -serde_codegen = { version = ">= 0.6" } +syntex = { version = "= 0.28" } +serde_codegen = { version = "= 0.6.13" } diff --git a/gen/doubleclicksearch2/README.md b/gen/doubleclicksearch2/README.md index a71c7229ae..aa9ff7fa50 100644 --- a/gen/doubleclicksearch2/README.md +++ b/gen/doubleclicksearch2/README.md @@ -5,7 +5,7 @@ DO NOT EDIT ! --> The `google-doubleclicksearch2` library allows access to all features of the *Google doubleclicksearch* service. -This documentation was generated from *doubleclicksearch* crate version *0.1.12+20160217*, where *20160217* is the exact revision of the *doubleclicksearch:v2* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.12*. +This documentation was generated from *doubleclicksearch* crate version *0.1.13+20160401*, where *20160401* is the exact revision of the *doubleclicksearch:v2* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.13*. Everything else about the *doubleclicksearch* *v2* API can be found at the [official documentation site](https://developers.google.com/doubleclick-search/). diff --git a/gen/doubleclicksearch2/src/cmn.rs b/gen/doubleclicksearch2/src/cmn.rs index 87b91a8986..c69621da55 100644 --- a/gen/doubleclicksearch2/src/cmn.rs +++ b/gen/doubleclicksearch2/src/cmn.rs @@ -12,7 +12,7 @@ use mime::{Mime, TopLevel, SubLevel, Attr, Value}; use oauth2::{TokenType, Retry, self}; use hyper; use hyper::header::{ContentType, ContentLength, Headers, UserAgent, Authorization, Header, - HeaderFormat}; + HeaderFormat, Bearer}; use hyper::http::h1::LINE_ENDING; use hyper::method::Method; use hyper::status::StatusCode; @@ -634,7 +634,7 @@ pub struct ResumableUploadHelper<'a, A: 'a> { pub start_at: Option, pub auth: &'a mut A, pub user_agent: &'a str, - pub auth_header: Authorization, + pub auth_header: Authorization, pub url: &'a str, pub reader: &'a mut ReadSeek, pub media_type: Mime, diff --git a/gen/doubleclicksearch2/src/lib.rs b/gen/doubleclicksearch2/src/lib.rs index 6281eeefd8..dfd2ab457f 100644 --- a/gen/doubleclicksearch2/src/lib.rs +++ b/gen/doubleclicksearch2/src/lib.rs @@ -2,7 +2,7 @@ // This file was generated automatically from 'src/mako/api/lib.rs.mako' // DO NOT EDIT ! -//! This documentation was generated from *doubleclicksearch* crate version *0.1.12+20160217*, where *20160217* is the exact revision of the *doubleclicksearch:v2* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.12*. +//! This documentation was generated from *doubleclicksearch* crate version *0.1.13+20160401*, where *20160401* is the exact revision of the *doubleclicksearch:v2* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.13*. //! //! Everything else about the *doubleclicksearch* *v2* API can be found at the //! [official documentation site](https://developers.google.com/doubleclick-search/). diff --git a/gen/doubleclicksearch2/src/lib.rs.in b/gen/doubleclicksearch2/src/lib.rs.in index fab25bff30..4aec070a88 100644 --- a/gen/doubleclicksearch2/src/lib.rs.in +++ b/gen/doubleclicksearch2/src/lib.rs.in @@ -127,7 +127,7 @@ impl<'a, C, A> Doubleclicksearch Doubleclicksearch { client: RefCell::new(client), auth: RefCell::new(authenticator), - _user_agent: "google-api-rust-client/0.1.12".to_string(), + _user_agent: "google-api-rust-client/0.1.13".to_string(), } } @@ -142,7 +142,7 @@ impl<'a, C, A> Doubleclicksearch } /// Set the user-agent header field to use in all requests to the server. - /// It defaults to `google-api-rust-client/0.1.12`. + /// It defaults to `google-api-rust-client/0.1.13`. /// /// Returns the previously set user-agent. pub fn user_agent(&mut self, agent_name: String) -> String { @@ -204,13 +204,13 @@ pub struct Conversion { /// DS campaign ID. #[serde(rename="campaignId")] pub campaign_id: Option, - /// The revenue amount of this TRANSACTION conversion, in micros (value multiplied by 1000, no decimal). For example, to specify a revenue value of "10" enter "10000" in your request. + /// The revenue amount of this TRANSACTION conversion, in micros (value multiplied by 1000000, no decimal). For example, to specify a revenue value of "10" enter "10000000" (10 million) in your request. #[serde(rename="revenueMicros")] pub revenue_micros: Option, /// DS advertiser ID. #[serde(rename="advertiserId")] pub advertiser_id: Option, - /// This field is ignored. + /// Available to advertisers only after contacting DoubleClick Search customer support. #[serde(rename="countMillis")] pub count_millis: Option, /// The time at which the conversion took place, in epoch millis UTC. @@ -219,7 +219,7 @@ pub struct Conversion { /// DS click ID for the conversion. #[serde(rename="clickId")] pub click_id: Option, - /// This field is ignored. + /// Available to advertisers only after contacting DoubleClick Search customer support. #[serde(rename="attributionModel")] pub attribution_model: Option, /// The currency code for the conversion's revenue. Should be in ISO 4217 alphabetic (3-char) format. @@ -1083,7 +1083,7 @@ impl<'a, C, A> ConversionInsertCall<'a, C, A> where C: BorrowMut, /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, ConversionList)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -1141,8 +1141,7 @@ impl<'a, C, A> ConversionInsertCall<'a, C, A> where C: BorrowMut, } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -1325,7 +1324,7 @@ impl<'a, C, A> ConversionGetCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, ConversionList)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -1412,8 +1411,7 @@ impl<'a, C, A> ConversionGetCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -1673,7 +1671,7 @@ impl<'a, C, A> ConversionUpdateAvailabilityCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, UpdateAvailabilityResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -1731,8 +1729,7 @@ impl<'a, C, A> ConversionUpdateAvailabilityCall<'a, C, A> where C: BorrowMut ConversionPatchCall<'a, C, A> where C: BorrowMut, /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, ConversionList)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -1979,8 +1976,7 @@ impl<'a, C, A> ConversionPatchCall<'a, C, A> where C: BorrowMut, } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -2225,7 +2221,7 @@ impl<'a, C, A> ConversionUpdateCall<'a, C, A> where C: BorrowMut, /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, ConversionList)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -2283,8 +2279,7 @@ impl<'a, C, A> ConversionUpdateCall<'a, C, A> where C: BorrowMut, } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -2454,7 +2449,7 @@ impl<'a, C, A> SavedColumnListCall<'a, C, A> where C: BorrowMut, /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, SavedColumnList)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -2524,8 +2519,7 @@ impl<'a, C, A> SavedColumnListCall<'a, C, A> where C: BorrowMut, } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -2705,7 +2699,7 @@ impl<'a, C, A> ReportGetFileCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -2774,8 +2768,7 @@ impl<'a, C, A> ReportGetFileCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -2947,7 +2940,7 @@ impl<'a, C, A> ReportGenerateCall<'a, C, A> where C: BorrowMut, A /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Report)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -3005,8 +2998,7 @@ impl<'a, C, A> ReportGenerateCall<'a, C, A> where C: BorrowMut, A } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -3175,7 +3167,7 @@ impl<'a, C, A> ReportGetCall<'a, C, A> where C: BorrowMut, A: oau /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Report)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -3244,8 +3236,7 @@ impl<'a, C, A> ReportGetCall<'a, C, A> where C: BorrowMut, A: oau } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -3417,7 +3408,7 @@ impl<'a, C, A> ReportRequestCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Report)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -3475,8 +3466,7 @@ impl<'a, C, A> ReportRequestCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); diff --git a/gen/drive2-cli/Cargo.toml b/gen/drive2-cli/Cargo.toml index a27caddc45..57ccd711c3 100644 --- a/gen/drive2-cli/Cargo.toml +++ b/gen/drive2-cli/Cargo.toml @@ -4,7 +4,7 @@ [package] name = "google-drive2-cli" -version = "0.3.3+20160222" +version = "0.3.4+20160331" authors = ["Sebastian Thiel "] description = "A complete library to interact with drive (protocol v2)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/drive2-cli" @@ -17,18 +17,18 @@ keywords = ["drive", "google", "cli"] name = "drive2" [dependencies] -hyper = "0.7" -mime = "0.1.0" -serde = ">= 0.7.0" -serde_json = ">= 0.7.0" -yup-oauth2 = ">= 0.5.4" +hyper = "0.8" +mime = "0.2.0" +serde = "0.6.0" +serde_json = "0.6.0" +yup-oauth2 = ">= 0.5.6" strsim = "0.4" yup-hyper-mock = "1.0" clap = "2.0" [build-dependencies] -syntex = { version = ">= 0.23" } -serde_codegen = { version = ">= 0.6" } +syntex = { version = "= 0.28" } +serde_codegen = { version = "= 0.6.13" } [dependencies.google-drive2] diff --git a/gen/drive2-cli/README.md b/gen/drive2-cli/README.md index 7f4b70f07b..44a8ede381 100644 --- a/gen/drive2-cli/README.md +++ b/gen/drive2-cli/README.md @@ -17,14 +17,14 @@ Everything else about the *drive* API can be found at the You can download the pre-compiled 64bit binaries for the following platforms: -* ![icon](http://megaicons.net/static/img/icons_sizes/6/140/16/ubuntu-icon.png) [ubuntu](http://dl.byronimo.de/google.rs/cli/0.3.3/ubuntu/drive2.tar.gz) -* ![icon](http://hydra-media.cursecdn.com/wow.gamepedia.com/a/a2/Apple-icon-16x16.png?version=25ddd67ac3dd3b634478e3978b76cb74) [osx](http://dl.byronimo.de/google.rs/cli/0.3.3/osx/drive2.tar.gz) +* ![icon](http://megaicons.net/static/img/icons_sizes/6/140/16/ubuntu-icon.png) [ubuntu](http://dl.byronimo.de/google.rs/cli/0.3.4/ubuntu/drive2.tar.gz) +* ![icon](http://hydra-media.cursecdn.com/wow.gamepedia.com/a/a2/Apple-icon-16x16.png?version=25ddd67ac3dd3b634478e3978b76cb74) [osx](http://dl.byronimo.de/google.rs/cli/0.3.4/osx/drive2.tar.gz) Find the source code [on github](https://github.com/Byron/google-apis-rs/tree/master/gen/drive2-cli). # Usage -This documentation was generated from the *drive* API at revision *20160222*. The CLI is at version *0.3.3*. +This documentation was generated from the *drive* API at revision *20160331*. The CLI is at version *0.3.4*. ```bash drive2 [options] diff --git a/gen/drive2-cli/mkdocs.yml b/gen/drive2-cli/mkdocs.yml index d5ced522d1..2e1f3a9ef4 100644 --- a/gen/drive2-cli/mkdocs.yml +++ b/gen/drive2-cli/mkdocs.yml @@ -1,4 +1,4 @@ -site_name: drive v0.3.3+20160222 +site_name: drive v0.3.4+20160331 site_url: http://byron.github.io/google-apis-rs/google-drive2-cli site_description: Write integrating applications with bcore diff --git a/gen/drive2-cli/src/cmn.rs b/gen/drive2-cli/src/cmn.rs index 188159ee80..ae86fdef65 100644 --- a/gen/drive2-cli/src/cmn.rs +++ b/gen/drive2-cli/src/cmn.rs @@ -414,7 +414,7 @@ impl TokenStorage for JsonTokenStorage { Err(err) => match err.kind() { io::ErrorKind::NotFound => Ok(()), - _ => Err(json::Error::Io(err)) + _ => Err(json::Error::IoError(err)) }, Ok(_) => Ok(()), } @@ -427,7 +427,7 @@ impl TokenStorage for JsonTokenStorage { Err(serde_err) => Err(serde_err), } }, - Err(io_err) => Err(json::Error::Io(io_err)) + Err(io_err) => Err(json::Error::IoError(io_err)) } } } @@ -444,7 +444,7 @@ impl TokenStorage for JsonTokenStorage { Err(io_err) => { match io_err.kind() { io::ErrorKind::NotFound => Ok(None), - _ => Err(json::Error::Io(io_err)) + _ => Err(json::Error::IoError(io_err)) } } } @@ -683,7 +683,7 @@ pub fn application_secret_from_directory(dir: &str, = json::from_str(json_console_secret).unwrap(); match json::to_writer_pretty(&mut f, &console_secret) { Err(serde_err) => match serde_err { - json::Error::Io(err) => err, + json::Error::IoError(err) => err, _ => panic!("Unexpected serde error: {:#?}", serde_err) }, Ok(_) => continue, @@ -696,7 +696,7 @@ pub fn application_secret_from_directory(dir: &str, }, Ok(f) => { match json::de::from_reader::<_, ConsoleApplicationSecret>(f) { - Err(json::Error::Io(err)) => + Err(json::Error::IoError(err)) => return secret_io_error(err), Err(json_err) => return Err(CLIError::Configuration( diff --git a/gen/drive2-cli/src/main.rs b/gen/drive2-cli/src/main.rs index 9d3236de4f..6d9dd8122a 100644 --- a/gen/drive2-cli/src/main.rs +++ b/gen/drive2-cli/src/main.rs @@ -1303,7 +1303,7 @@ impl<'n> Engine<'n> { "labels.trashed" => Some(("labels.trashed", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), "indexable-text.text" => Some(("indexableText.text", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "explicitly-trashed" => Some(("explicitlyTrashed", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), - "etag" => Some(("etag", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "is-app-authorized" => Some(("isAppAuthorized", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), "last-modifying-user-name" => Some(("lastModifyingUserName", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "writers-can-share" => Some(("writersCanShare", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), "owned-by-me" => Some(("ownedByMe", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), @@ -1370,6 +1370,7 @@ impl<'n> Engine<'n> { "icon-link" => Some(("iconLink", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "default-open-with-link" => Some(("defaultOpenWithLink", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "kind" => Some(("kind", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "etag" => Some(("etag", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "alternate-link" => Some(("alternateLink", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "title" => Some(("title", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "modified-by-me-date" => Some(("modifiedByMeDate", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), @@ -1398,7 +1399,7 @@ impl<'n> Engine<'n> { "self-link" => Some(("selfLink", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "modified-date" => Some(("modifiedDate", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), _ => { - let suggestion = FieldCursor::did_you_mean(key, &vec!["additional-roles", "alternate-link", "altitude", "aperture", "app-data-contents", "auth-key", "camera-make", "camera-model", "can-comment", "can-read-revisions", "color-space", "copyable", "created-date", "date", "default-open-with-link", "description", "display-name", "domain", "download-url", "duration-millis", "editable", "email-address", "embed-link", "etag", "explicitly-trashed", "export-links", "exposure-bias", "exposure-mode", "exposure-time", "file-extension", "file-size", "flash-used", "focal-length", "folder-color-rgb", "full-file-extension", "head-revision-id", "height", "hidden", "icon-link", "id", "image", "image-media-metadata", "indexable-text", "is-authenticated-user", "iso-speed", "kind", "labels", "last-modifying-user", "last-modifying-user-name", "last-viewed-by-me-date", "latitude", "lens", "location", "longitude", "marked-viewed-by-me-date", "max-aperture-value", "md5-checksum", "metering-mode", "mime-type", "modified-by-me-date", "modified-date", "name", "open-with-links", "original-filename", "owned-by-me", "owner-names", "permission-id", "photo-link", "picture", "quota-bytes-used", "restricted", "role", "rotation", "self-link", "sensor", "shareable", "shared", "shared-with-me-date", "sharing-user", "spaces", "starred", "subject-distance", "text", "thumbnail", "thumbnail-link", "title", "trashed", "type", "url", "user-permission", "value", "version", "video-media-metadata", "viewed", "web-content-link", "web-view-link", "white-balance", "width", "with-link", "writers-can-share"]); + let suggestion = FieldCursor::did_you_mean(key, &vec!["additional-roles", "alternate-link", "altitude", "aperture", "app-data-contents", "auth-key", "camera-make", "camera-model", "can-comment", "can-read-revisions", "color-space", "copyable", "created-date", "date", "default-open-with-link", "description", "display-name", "domain", "download-url", "duration-millis", "editable", "email-address", "embed-link", "etag", "explicitly-trashed", "export-links", "exposure-bias", "exposure-mode", "exposure-time", "file-extension", "file-size", "flash-used", "focal-length", "folder-color-rgb", "full-file-extension", "head-revision-id", "height", "hidden", "icon-link", "id", "image", "image-media-metadata", "indexable-text", "is-app-authorized", "is-authenticated-user", "iso-speed", "kind", "labels", "last-modifying-user", "last-modifying-user-name", "last-viewed-by-me-date", "latitude", "lens", "location", "longitude", "marked-viewed-by-me-date", "max-aperture-value", "md5-checksum", "metering-mode", "mime-type", "modified-by-me-date", "modified-date", "name", "open-with-links", "original-filename", "owned-by-me", "owner-names", "permission-id", "photo-link", "picture", "quota-bytes-used", "restricted", "role", "rotation", "self-link", "sensor", "shareable", "shared", "shared-with-me-date", "sharing-user", "spaces", "starred", "subject-distance", "text", "thumbnail", "thumbnail-link", "title", "trashed", "type", "url", "user-permission", "value", "version", "video-media-metadata", "viewed", "web-content-link", "web-view-link", "white-balance", "width", "with-link", "writers-can-share"]); err.issues.push(CLIError::Field(FieldError::Unknown(temp_cursor.to_string(), suggestion, value.map(|v| v.to_string())))); None } @@ -1792,7 +1793,7 @@ impl<'n> Engine<'n> { "labels.trashed" => Some(("labels.trashed", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), "indexable-text.text" => Some(("indexableText.text", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "explicitly-trashed" => Some(("explicitlyTrashed", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), - "etag" => Some(("etag", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "is-app-authorized" => Some(("isAppAuthorized", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), "last-modifying-user-name" => Some(("lastModifyingUserName", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "writers-can-share" => Some(("writersCanShare", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), "owned-by-me" => Some(("ownedByMe", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), @@ -1859,6 +1860,7 @@ impl<'n> Engine<'n> { "icon-link" => Some(("iconLink", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "default-open-with-link" => Some(("defaultOpenWithLink", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "kind" => Some(("kind", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "etag" => Some(("etag", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "alternate-link" => Some(("alternateLink", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "title" => Some(("title", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "modified-by-me-date" => Some(("modifiedByMeDate", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), @@ -1887,7 +1889,7 @@ impl<'n> Engine<'n> { "self-link" => Some(("selfLink", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "modified-date" => Some(("modifiedDate", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), _ => { - let suggestion = FieldCursor::did_you_mean(key, &vec!["additional-roles", "alternate-link", "altitude", "aperture", "app-data-contents", "auth-key", "camera-make", "camera-model", "can-comment", "can-read-revisions", "color-space", "copyable", "created-date", "date", "default-open-with-link", "description", "display-name", "domain", "download-url", "duration-millis", "editable", "email-address", "embed-link", "etag", "explicitly-trashed", "export-links", "exposure-bias", "exposure-mode", "exposure-time", "file-extension", "file-size", "flash-used", "focal-length", "folder-color-rgb", "full-file-extension", "head-revision-id", "height", "hidden", "icon-link", "id", "image", "image-media-metadata", "indexable-text", "is-authenticated-user", "iso-speed", "kind", "labels", "last-modifying-user", "last-modifying-user-name", "last-viewed-by-me-date", "latitude", "lens", "location", "longitude", "marked-viewed-by-me-date", "max-aperture-value", "md5-checksum", "metering-mode", "mime-type", "modified-by-me-date", "modified-date", "name", "open-with-links", "original-filename", "owned-by-me", "owner-names", "permission-id", "photo-link", "picture", "quota-bytes-used", "restricted", "role", "rotation", "self-link", "sensor", "shareable", "shared", "shared-with-me-date", "sharing-user", "spaces", "starred", "subject-distance", "text", "thumbnail", "thumbnail-link", "title", "trashed", "type", "url", "user-permission", "value", "version", "video-media-metadata", "viewed", "web-content-link", "web-view-link", "white-balance", "width", "with-link", "writers-can-share"]); + let suggestion = FieldCursor::did_you_mean(key, &vec!["additional-roles", "alternate-link", "altitude", "aperture", "app-data-contents", "auth-key", "camera-make", "camera-model", "can-comment", "can-read-revisions", "color-space", "copyable", "created-date", "date", "default-open-with-link", "description", "display-name", "domain", "download-url", "duration-millis", "editable", "email-address", "embed-link", "etag", "explicitly-trashed", "export-links", "exposure-bias", "exposure-mode", "exposure-time", "file-extension", "file-size", "flash-used", "focal-length", "folder-color-rgb", "full-file-extension", "head-revision-id", "height", "hidden", "icon-link", "id", "image", "image-media-metadata", "indexable-text", "is-app-authorized", "is-authenticated-user", "iso-speed", "kind", "labels", "last-modifying-user", "last-modifying-user-name", "last-viewed-by-me-date", "latitude", "lens", "location", "longitude", "marked-viewed-by-me-date", "max-aperture-value", "md5-checksum", "metering-mode", "mime-type", "modified-by-me-date", "modified-date", "name", "open-with-links", "original-filename", "owned-by-me", "owner-names", "permission-id", "photo-link", "picture", "quota-bytes-used", "restricted", "role", "rotation", "self-link", "sensor", "shareable", "shared", "shared-with-me-date", "sharing-user", "spaces", "starred", "subject-distance", "text", "thumbnail", "thumbnail-link", "title", "trashed", "type", "url", "user-permission", "value", "version", "video-media-metadata", "viewed", "web-content-link", "web-view-link", "white-balance", "width", "with-link", "writers-can-share"]); err.issues.push(CLIError::Field(FieldError::Unknown(temp_cursor.to_string(), suggestion, value.map(|v| v.to_string())))); None } @@ -2084,7 +2086,7 @@ impl<'n> Engine<'n> { "labels.trashed" => Some(("labels.trashed", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), "indexable-text.text" => Some(("indexableText.text", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "explicitly-trashed" => Some(("explicitlyTrashed", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), - "etag" => Some(("etag", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "is-app-authorized" => Some(("isAppAuthorized", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), "last-modifying-user-name" => Some(("lastModifyingUserName", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "writers-can-share" => Some(("writersCanShare", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), "owned-by-me" => Some(("ownedByMe", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), @@ -2151,6 +2153,7 @@ impl<'n> Engine<'n> { "icon-link" => Some(("iconLink", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "default-open-with-link" => Some(("defaultOpenWithLink", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "kind" => Some(("kind", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "etag" => Some(("etag", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "alternate-link" => Some(("alternateLink", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "title" => Some(("title", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "modified-by-me-date" => Some(("modifiedByMeDate", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), @@ -2179,7 +2182,7 @@ impl<'n> Engine<'n> { "self-link" => Some(("selfLink", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "modified-date" => Some(("modifiedDate", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), _ => { - let suggestion = FieldCursor::did_you_mean(key, &vec!["additional-roles", "alternate-link", "altitude", "aperture", "app-data-contents", "auth-key", "camera-make", "camera-model", "can-comment", "can-read-revisions", "color-space", "copyable", "created-date", "date", "default-open-with-link", "description", "display-name", "domain", "download-url", "duration-millis", "editable", "email-address", "embed-link", "etag", "explicitly-trashed", "export-links", "exposure-bias", "exposure-mode", "exposure-time", "file-extension", "file-size", "flash-used", "focal-length", "folder-color-rgb", "full-file-extension", "head-revision-id", "height", "hidden", "icon-link", "id", "image", "image-media-metadata", "indexable-text", "is-authenticated-user", "iso-speed", "kind", "labels", "last-modifying-user", "last-modifying-user-name", "last-viewed-by-me-date", "latitude", "lens", "location", "longitude", "marked-viewed-by-me-date", "max-aperture-value", "md5-checksum", "metering-mode", "mime-type", "modified-by-me-date", "modified-date", "name", "open-with-links", "original-filename", "owned-by-me", "owner-names", "permission-id", "photo-link", "picture", "quota-bytes-used", "restricted", "role", "rotation", "self-link", "sensor", "shareable", "shared", "shared-with-me-date", "sharing-user", "spaces", "starred", "subject-distance", "text", "thumbnail", "thumbnail-link", "title", "trashed", "type", "url", "user-permission", "value", "version", "video-media-metadata", "viewed", "web-content-link", "web-view-link", "white-balance", "width", "with-link", "writers-can-share"]); + let suggestion = FieldCursor::did_you_mean(key, &vec!["additional-roles", "alternate-link", "altitude", "aperture", "app-data-contents", "auth-key", "camera-make", "camera-model", "can-comment", "can-read-revisions", "color-space", "copyable", "created-date", "date", "default-open-with-link", "description", "display-name", "domain", "download-url", "duration-millis", "editable", "email-address", "embed-link", "etag", "explicitly-trashed", "export-links", "exposure-bias", "exposure-mode", "exposure-time", "file-extension", "file-size", "flash-used", "focal-length", "folder-color-rgb", "full-file-extension", "head-revision-id", "height", "hidden", "icon-link", "id", "image", "image-media-metadata", "indexable-text", "is-app-authorized", "is-authenticated-user", "iso-speed", "kind", "labels", "last-modifying-user", "last-modifying-user-name", "last-viewed-by-me-date", "latitude", "lens", "location", "longitude", "marked-viewed-by-me-date", "max-aperture-value", "md5-checksum", "metering-mode", "mime-type", "modified-by-me-date", "modified-date", "name", "open-with-links", "original-filename", "owned-by-me", "owner-names", "permission-id", "photo-link", "picture", "quota-bytes-used", "restricted", "role", "rotation", "self-link", "sensor", "shareable", "shared", "shared-with-me-date", "sharing-user", "spaces", "starred", "subject-distance", "text", "thumbnail", "thumbnail-link", "title", "trashed", "type", "url", "user-permission", "value", "version", "video-media-metadata", "viewed", "web-content-link", "web-view-link", "white-balance", "width", "with-link", "writers-can-share"]); err.issues.push(CLIError::Field(FieldError::Unknown(temp_cursor.to_string(), suggestion, value.map(|v| v.to_string())))); None } @@ -2469,7 +2472,7 @@ impl<'n> Engine<'n> { "labels.trashed" => Some(("labels.trashed", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), "indexable-text.text" => Some(("indexableText.text", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "explicitly-trashed" => Some(("explicitlyTrashed", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), - "etag" => Some(("etag", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "is-app-authorized" => Some(("isAppAuthorized", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), "last-modifying-user-name" => Some(("lastModifyingUserName", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "writers-can-share" => Some(("writersCanShare", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), "owned-by-me" => Some(("ownedByMe", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), @@ -2536,6 +2539,7 @@ impl<'n> Engine<'n> { "icon-link" => Some(("iconLink", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "default-open-with-link" => Some(("defaultOpenWithLink", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "kind" => Some(("kind", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "etag" => Some(("etag", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "alternate-link" => Some(("alternateLink", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "title" => Some(("title", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "modified-by-me-date" => Some(("modifiedByMeDate", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), @@ -2564,7 +2568,7 @@ impl<'n> Engine<'n> { "self-link" => Some(("selfLink", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "modified-date" => Some(("modifiedDate", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), _ => { - let suggestion = FieldCursor::did_you_mean(key, &vec!["additional-roles", "alternate-link", "altitude", "aperture", "app-data-contents", "auth-key", "camera-make", "camera-model", "can-comment", "can-read-revisions", "color-space", "copyable", "created-date", "date", "default-open-with-link", "description", "display-name", "domain", "download-url", "duration-millis", "editable", "email-address", "embed-link", "etag", "explicitly-trashed", "export-links", "exposure-bias", "exposure-mode", "exposure-time", "file-extension", "file-size", "flash-used", "focal-length", "folder-color-rgb", "full-file-extension", "head-revision-id", "height", "hidden", "icon-link", "id", "image", "image-media-metadata", "indexable-text", "is-authenticated-user", "iso-speed", "kind", "labels", "last-modifying-user", "last-modifying-user-name", "last-viewed-by-me-date", "latitude", "lens", "location", "longitude", "marked-viewed-by-me-date", "max-aperture-value", "md5-checksum", "metering-mode", "mime-type", "modified-by-me-date", "modified-date", "name", "open-with-links", "original-filename", "owned-by-me", "owner-names", "permission-id", "photo-link", "picture", "quota-bytes-used", "restricted", "role", "rotation", "self-link", "sensor", "shareable", "shared", "shared-with-me-date", "sharing-user", "spaces", "starred", "subject-distance", "text", "thumbnail", "thumbnail-link", "title", "trashed", "type", "url", "user-permission", "value", "version", "video-media-metadata", "viewed", "web-content-link", "web-view-link", "white-balance", "width", "with-link", "writers-can-share"]); + let suggestion = FieldCursor::did_you_mean(key, &vec!["additional-roles", "alternate-link", "altitude", "aperture", "app-data-contents", "auth-key", "camera-make", "camera-model", "can-comment", "can-read-revisions", "color-space", "copyable", "created-date", "date", "default-open-with-link", "description", "display-name", "domain", "download-url", "duration-millis", "editable", "email-address", "embed-link", "etag", "explicitly-trashed", "export-links", "exposure-bias", "exposure-mode", "exposure-time", "file-extension", "file-size", "flash-used", "focal-length", "folder-color-rgb", "full-file-extension", "head-revision-id", "height", "hidden", "icon-link", "id", "image", "image-media-metadata", "indexable-text", "is-app-authorized", "is-authenticated-user", "iso-speed", "kind", "labels", "last-modifying-user", "last-modifying-user-name", "last-viewed-by-me-date", "latitude", "lens", "location", "longitude", "marked-viewed-by-me-date", "max-aperture-value", "md5-checksum", "metering-mode", "mime-type", "modified-by-me-date", "modified-date", "name", "open-with-links", "original-filename", "owned-by-me", "owner-names", "permission-id", "photo-link", "picture", "quota-bytes-used", "restricted", "role", "rotation", "self-link", "sensor", "shareable", "shared", "shared-with-me-date", "sharing-user", "spaces", "starred", "subject-distance", "text", "thumbnail", "thumbnail-link", "title", "trashed", "type", "url", "user-permission", "value", "version", "video-media-metadata", "viewed", "web-content-link", "web-view-link", "white-balance", "width", "with-link", "writers-can-share"]); err.issues.push(CLIError::Field(FieldError::Unknown(temp_cursor.to_string(), suggestion, value.map(|v| v.to_string())))); None } @@ -6877,7 +6881,7 @@ fn main() { let mut app = App::new("drive2") .author("Sebastian Thiel ") - .version("0.3.3+20160222") + .version("0.3.4+20160331") .about("The API to interact with Drive.") .after_help("All documentation details can be found at http://byron.github.io/google-apis-rs/google_drive2_cli") .arg(Arg::with_name("url") diff --git a/gen/drive2/Cargo.toml b/gen/drive2/Cargo.toml index 6a079f6930..9e423012d2 100644 --- a/gen/drive2/Cargo.toml +++ b/gen/drive2/Cargo.toml @@ -4,7 +4,7 @@ [package] name = "google-drive2" -version = "0.1.12+20160222" +version = "0.1.13+20160331" authors = ["Sebastian Thiel "] description = "A complete library to interact with drive (protocol v2)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/drive2" @@ -16,14 +16,14 @@ build = "src/build.rs" [dependencies] -hyper = "0.7" -mime = "0.1.0" -serde = ">= 0.7.0" -serde_json = ">= 0.7.0" -yup-oauth2 = ">= 0.5.4" +hyper = "0.8" +mime = "0.2.0" +serde = "0.6.0" +serde_json = "0.6.0" +yup-oauth2 = ">= 0.5.6" url = ">= 0.5" [build-dependencies] -syntex = { version = ">= 0.23" } -serde_codegen = { version = ">= 0.6" } +syntex = { version = "= 0.28" } +serde_codegen = { version = "= 0.6.13" } diff --git a/gen/drive2/README.md b/gen/drive2/README.md index f57d20c6a2..24049495d4 100644 --- a/gen/drive2/README.md +++ b/gen/drive2/README.md @@ -5,7 +5,7 @@ DO NOT EDIT ! --> The `google-drive2` library allows access to all features of the *Google drive* service. -This documentation was generated from *drive* crate version *0.1.12+20160222*, where *20160222* is the exact revision of the *drive:v2* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.12*. +This documentation was generated from *drive* crate version *0.1.13+20160331*, where *20160331* is the exact revision of the *drive:v2* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.13*. Everything else about the *drive* *v2* API can be found at the [official documentation site](https://developers.google.com/drive/). diff --git a/gen/drive2/src/cmn.rs b/gen/drive2/src/cmn.rs index 87b91a8986..c69621da55 100644 --- a/gen/drive2/src/cmn.rs +++ b/gen/drive2/src/cmn.rs @@ -12,7 +12,7 @@ use mime::{Mime, TopLevel, SubLevel, Attr, Value}; use oauth2::{TokenType, Retry, self}; use hyper; use hyper::header::{ContentType, ContentLength, Headers, UserAgent, Authorization, Header, - HeaderFormat}; + HeaderFormat, Bearer}; use hyper::http::h1::LINE_ENDING; use hyper::method::Method; use hyper::status::StatusCode; @@ -634,7 +634,7 @@ pub struct ResumableUploadHelper<'a, A: 'a> { pub start_at: Option, pub auth: &'a mut A, pub user_agent: &'a str, - pub auth_header: Authorization, + pub auth_header: Authorization, pub url: &'a str, pub reader: &'a mut ReadSeek, pub media_type: Mime, diff --git a/gen/drive2/src/lib.rs b/gen/drive2/src/lib.rs index e5026a4e47..2c5ac26661 100644 --- a/gen/drive2/src/lib.rs +++ b/gen/drive2/src/lib.rs @@ -2,7 +2,7 @@ // This file was generated automatically from 'src/mako/api/lib.rs.mako' // DO NOT EDIT ! -//! This documentation was generated from *drive* crate version *0.1.12+20160222*, where *20160222* is the exact revision of the *drive:v2* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.12*. +//! This documentation was generated from *drive* crate version *0.1.13+20160331*, where *20160331* is the exact revision of the *drive:v2* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.13*. //! //! Everything else about the *drive* *v2* API can be found at the //! [official documentation site](https://developers.google.com/drive/). diff --git a/gen/drive2/src/lib.rs.in b/gen/drive2/src/lib.rs.in index 25a5862e53..8c576f25d7 100644 --- a/gen/drive2/src/lib.rs.in +++ b/gen/drive2/src/lib.rs.in @@ -178,7 +178,7 @@ impl<'a, C, A> Drive Drive { client: RefCell::new(client), auth: RefCell::new(authenticator), - _user_agent: "google-api-rust-client/0.1.12".to_string(), + _user_agent: "google-api-rust-client/0.1.13".to_string(), } } @@ -223,7 +223,7 @@ impl<'a, C, A> Drive } /// Set the user-agent header field to use in all requests to the server. - /// It defaults to `google-api-rust-client/0.1.12`. + /// It defaults to `google-api-rust-client/0.1.13`. /// /// Returns the previously set user-agent. pub fn user_agent(&mut self, agent_name: String) -> String { @@ -480,8 +480,9 @@ pub struct File { /// Whether this file has been explicitly trashed, as opposed to recursively trashed. #[serde(rename="explicitlyTrashed")] pub explicitly_trashed: Option, - /// ETag of the file. - pub etag: Option, + /// Whether the file was created or opened by the requesting app. + #[serde(rename="isAppAuthorized")] + pub is_app_authorized: Option, /// Name of the last user to modify this file. #[serde(rename="lastModifyingUserName")] pub last_modifying_user_name: Option, @@ -580,6 +581,8 @@ pub struct File { pub image_media_metadata: Option, /// The owner(s) of this file. pub owners: Option>, + /// ETag of the file. + pub etag: Option, /// A link for opening the file in a relevant Google editor or viewer. #[serde(rename="alternateLink")] pub alternate_link: Option, @@ -600,7 +603,7 @@ pub struct File { pub spaces: Option>, /// Whether the file's sharing settings can be modified by the current user. pub shareable: Option, - /// The original filename if the file was uploaded manually, or the original title if the file was inserted through the API. Note that renames of the title will not change the original filename. This field is only populated for files with content stored in Drive; it is not populated for Google Docs or shortcut files. + /// The original filename of the uploaded content if available, or else the original value of the title field. This is only available for files with binary content in Drive. #[serde(rename="originalFilename")] pub original_filename: Option, /// The number of quota bytes used by this file. @@ -3517,7 +3520,7 @@ impl<'a, C, A> FileWatchCall<'a, C, A> where C: BorrowMut, A: oau /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Channel)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -3625,8 +3628,7 @@ impl<'a, C, A> FileWatchCall<'a, C, A> where C: BorrowMut, A: oau } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -3857,7 +3859,7 @@ impl<'a, C, A> FileInsertCall<'a, C, A> where C: BorrowMut, A: oa fn doit(mut self, mut reader: RS, reader_mime_type: mime::Mime, protocol: &'static str) -> Result<(hyper::client::Response, File)> where RS: ReadSeek { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -3950,8 +3952,7 @@ impl<'a, C, A> FileInsertCall<'a, C, A> where C: BorrowMut, A: oa } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { if should_ask_dlg_for_url && (upload_url = dlg.upload_url()) == () && upload_url.is_some() { @@ -4277,7 +4278,7 @@ impl<'a, C, A> FileUntrashCall<'a, C, A> where C: BorrowMut, A: o /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, File)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -4346,8 +4347,7 @@ impl<'a, C, A> FileUntrashCall<'a, C, A> where C: BorrowMut, A: o } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Post, &url) @@ -4534,7 +4534,7 @@ impl<'a, C, A> FileCopyCall<'a, C, A> where C: BorrowMut, A: oaut /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, File)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -4635,8 +4635,7 @@ impl<'a, C, A> FileCopyCall<'a, C, A> where C: BorrowMut, A: oaut } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -4864,7 +4863,7 @@ impl<'a, C, A> FileTrashCall<'a, C, A> where C: BorrowMut, A: oau /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, File)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -4933,8 +4932,7 @@ impl<'a, C, A> FileTrashCall<'a, C, A> where C: BorrowMut, A: oau } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Post, &url) @@ -5104,7 +5102,7 @@ impl<'a, C, A> FileExportCall<'a, C, A> where C: BorrowMut, A: oa /// Perform the operation you have build so far. pub fn doit(mut self) -> Result { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -5173,8 +5171,7 @@ impl<'a, C, A> FileExportCall<'a, C, A> where C: BorrowMut, A: oa } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -5339,7 +5336,7 @@ impl<'a, C, A> FileEmptyTrashCall<'a, C, A> where C: BorrowMut, A /// Perform the operation you have build so far. pub fn doit(mut self) -> Result { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -5385,8 +5382,7 @@ impl<'a, C, A> FileEmptyTrashCall<'a, C, A> where C: BorrowMut, A } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Delete, &url) @@ -5545,7 +5541,7 @@ impl<'a, C, A> FileListCall<'a, C, A> where C: BorrowMut, A: oaut /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, FileList)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -5613,8 +5609,7 @@ impl<'a, C, A> FileListCall<'a, C, A> where C: BorrowMut, A: oaut } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -5819,7 +5814,7 @@ impl<'a, C, A> FileTouchCall<'a, C, A> where C: BorrowMut, A: oau /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, File)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -5888,8 +5883,7 @@ impl<'a, C, A> FileTouchCall<'a, C, A> where C: BorrowMut, A: oau } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Post, &url) @@ -6058,7 +6052,7 @@ impl<'a, C, A> FileGenerateIdCall<'a, C, A> where C: BorrowMut, A /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, GeneratedIds)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -6111,8 +6105,7 @@ impl<'a, C, A> FileGenerateIdCall<'a, C, A> where C: BorrowMut, A } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -6317,7 +6310,7 @@ impl<'a, C, A> FileUpdateCall<'a, C, A> where C: BorrowMut, A: oa fn doit(mut self, mut reader: RS, reader_mime_type: mime::Mime, protocol: &'static str) -> Result<(hyper::client::Response, File)> where RS: ReadSeek { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -6447,8 +6440,7 @@ impl<'a, C, A> FileUpdateCall<'a, C, A> where C: BorrowMut, A: oa } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { if should_ask_dlg_for_url && (upload_url = dlg.upload_url()) == () && upload_url.is_some() { @@ -6819,7 +6811,7 @@ impl<'a, C, A> FileDeleteCall<'a, C, A> where C: BorrowMut, A: oa /// Perform the operation you have build so far. pub fn doit(mut self) -> Result { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -6887,8 +6879,7 @@ impl<'a, C, A> FileDeleteCall<'a, C, A> where C: BorrowMut, A: oa } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Delete, &url) @@ -7077,7 +7068,7 @@ impl<'a, C, A> FilePatchCall<'a, C, A> where C: BorrowMut, A: oau /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, File)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -7196,8 +7187,7 @@ impl<'a, C, A> FilePatchCall<'a, C, A> where C: BorrowMut, A: oau } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -7480,7 +7470,7 @@ impl<'a, C, A> FileGetCall<'a, C, A> where C: BorrowMut, A: oauth /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, File)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -7532,7 +7522,7 @@ impl<'a, C, A> FileGetCall<'a, C, A> where C: BorrowMut, A: oauth let mut url = "https://www.googleapis.com/drive/v2/files/{fileId}".to_string(); if self._scopes.len() == 0 { - self._scopes.insert(Scope::AppReadonly.as_ref().to_string(), ()); + self._scopes.insert(Scope::MetadataReadonly.as_ref().to_string(), ()); } for &(find_this, param_name) in [("{fileId}", "fileId")].iter() { @@ -7577,8 +7567,7 @@ impl<'a, C, A> FileGetCall<'a, C, A> where C: BorrowMut, A: oauth } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -7708,7 +7697,7 @@ impl<'a, C, A> FileGetCall<'a, C, A> where C: BorrowMut, A: oauth /// Identifies the authorization scope for the method you are building. /// /// Use this method to actively specify which scope should be used, instead the default `Scope` variant - /// `Scope::AppReadonly`. + /// `Scope::MetadataReadonly`. /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. @@ -7777,7 +7766,7 @@ impl<'a, C, A> AboutGetCall<'a, C, A> where C: BorrowMut, A: oaut /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, About)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -7833,8 +7822,7 @@ impl<'a, C, A> AboutGetCall<'a, C, A> where C: BorrowMut, A: oaut } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -8015,7 +8003,7 @@ impl<'a, C, A> RealtimeUpdateCall<'a, C, A> where C: BorrowMut, A fn doit(mut self, mut reader: RS, reader_mime_type: mime::Mime, protocol: &'static str) -> Result where RS: ReadSeek { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -8097,8 +8085,7 @@ impl<'a, C, A> RealtimeUpdateCall<'a, C, A> where C: BorrowMut, A } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { if should_ask_dlg_for_url && (upload_url = dlg.upload_url()) == () && upload_url.is_some() { should_ask_dlg_for_url = false; @@ -8362,7 +8349,7 @@ impl<'a, C, A> RealtimeGetCall<'a, C, A> where C: BorrowMut, A: o /// Perform the operation you have build so far. pub fn doit(mut self) -> Result { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -8433,8 +8420,7 @@ impl<'a, C, A> RealtimeGetCall<'a, C, A> where C: BorrowMut, A: o } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -8597,7 +8583,7 @@ impl<'a, C, A> AppGetCall<'a, C, A> where C: BorrowMut, A: oauth2 /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, App)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -8666,8 +8652,7 @@ impl<'a, C, A> AppGetCall<'a, C, A> where C: BorrowMut, A: oauth2 } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -8838,7 +8823,7 @@ impl<'a, C, A> AppListCall<'a, C, A> where C: BorrowMut, A: oauth /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, AppList)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -8894,8 +8879,7 @@ impl<'a, C, A> AppListCall<'a, C, A> where C: BorrowMut, A: oauth } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -9073,7 +9057,7 @@ impl<'a, C, A> CommentDeleteCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -9142,8 +9126,7 @@ impl<'a, C, A> CommentDeleteCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Delete, &url) @@ -9312,7 +9295,7 @@ impl<'a, C, A> CommentGetCall<'a, C, A> where C: BorrowMut, A: oa /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Comment)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -9385,8 +9368,7 @@ impl<'a, C, A> CommentGetCall<'a, C, A> where C: BorrowMut, A: oa } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -9576,7 +9558,7 @@ impl<'a, C, A> CommentInsertCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Comment)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -9656,8 +9638,7 @@ impl<'a, C, A> CommentInsertCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -9844,7 +9825,7 @@ impl<'a, C, A> CommentPatchCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Comment)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -9925,8 +9906,7 @@ impl<'a, C, A> CommentPatchCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -10123,7 +10103,7 @@ impl<'a, C, A> CommentUpdateCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Comment)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -10204,8 +10184,7 @@ impl<'a, C, A> CommentUpdateCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -10402,7 +10381,7 @@ impl<'a, C, A> CommentListCall<'a, C, A> where C: BorrowMut, A: o /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, CommentList)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -10483,8 +10462,7 @@ impl<'a, C, A> CommentListCall<'a, C, A> where C: BorrowMut, A: o } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -10686,7 +10664,7 @@ impl<'a, C, A> ChildrenListCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, ChildList)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -10767,8 +10745,7 @@ impl<'a, C, A> ChildrenListCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -10963,7 +10940,7 @@ impl<'a, C, A> ChildrenGetCall<'a, C, A> where C: BorrowMut, A: o /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, ChildReference)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -11033,8 +11010,7 @@ impl<'a, C, A> ChildrenGetCall<'a, C, A> where C: BorrowMut, A: o } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -11211,7 +11187,7 @@ impl<'a, C, A> ChildrenDeleteCall<'a, C, A> where C: BorrowMut, A /// Perform the operation you have build so far. pub fn doit(mut self) -> Result { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -11280,8 +11256,7 @@ impl<'a, C, A> ChildrenDeleteCall<'a, C, A> where C: BorrowMut, A } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Delete, &url) @@ -11454,7 +11429,7 @@ impl<'a, C, A> ChildrenInsertCall<'a, C, A> where C: BorrowMut, A /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, ChildReference)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -11534,8 +11509,7 @@ impl<'a, C, A> ChildrenInsertCall<'a, C, A> where C: BorrowMut, A } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -11720,7 +11694,7 @@ impl<'a, C, A> ChannelStopCall<'a, C, A> where C: BorrowMut, A: o /// Perform the operation you have build so far. pub fn doit(mut self) -> Result { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -11777,8 +11751,7 @@ impl<'a, C, A> ChannelStopCall<'a, C, A> where C: BorrowMut, A: o } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -11937,7 +11910,7 @@ impl<'a, C, A> ParentListCall<'a, C, A> where C: BorrowMut, A: oa /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, ParentList)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -12006,8 +11979,7 @@ impl<'a, C, A> ParentListCall<'a, C, A> where C: BorrowMut, A: oa } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -12174,7 +12146,7 @@ impl<'a, C, A> ParentDeleteCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -12243,8 +12215,7 @@ impl<'a, C, A> ParentDeleteCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Delete, &url) @@ -12417,7 +12388,7 @@ impl<'a, C, A> ParentInsertCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, ParentReference)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -12497,8 +12468,7 @@ impl<'a, C, A> ParentInsertCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -12678,7 +12648,7 @@ impl<'a, C, A> ParentGetCall<'a, C, A> where C: BorrowMut, A: oau /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, ParentReference)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -12748,8 +12718,7 @@ impl<'a, C, A> ParentGetCall<'a, C, A> where C: BorrowMut, A: oau } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -12934,7 +12903,7 @@ impl<'a, C, A> ReplyPatchCall<'a, C, A> where C: BorrowMut, A: oa /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, CommentReply)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -13016,8 +12985,7 @@ impl<'a, C, A> ReplyPatchCall<'a, C, A> where C: BorrowMut, A: oa } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -13223,7 +13191,7 @@ impl<'a, C, A> ReplyListCall<'a, C, A> where C: BorrowMut, A: oau /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, CommentReplyList)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -13302,8 +13270,7 @@ impl<'a, C, A> ReplyListCall<'a, C, A> where C: BorrowMut, A: oau } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -13504,7 +13471,7 @@ impl<'a, C, A> ReplyGetCall<'a, C, A> where C: BorrowMut, A: oaut /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, CommentReply)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -13578,8 +13545,7 @@ impl<'a, C, A> ReplyGetCall<'a, C, A> where C: BorrowMut, A: oaut } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -13780,7 +13746,7 @@ impl<'a, C, A> ReplyInsertCall<'a, C, A> where C: BorrowMut, A: o /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, CommentReply)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -13861,8 +13827,7 @@ impl<'a, C, A> ReplyInsertCall<'a, C, A> where C: BorrowMut, A: o } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -14053,7 +14018,7 @@ impl<'a, C, A> ReplyDeleteCall<'a, C, A> where C: BorrowMut, A: o /// Perform the operation you have build so far. pub fn doit(mut self) -> Result { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -14123,8 +14088,7 @@ impl<'a, C, A> ReplyDeleteCall<'a, C, A> where C: BorrowMut, A: o } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Delete, &url) @@ -14309,7 +14273,7 @@ impl<'a, C, A> ReplyUpdateCall<'a, C, A> where C: BorrowMut, A: o /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, CommentReply)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -14391,8 +14355,7 @@ impl<'a, C, A> ReplyUpdateCall<'a, C, A> where C: BorrowMut, A: o } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -14592,7 +14555,7 @@ impl<'a, C, A> PermissionDeleteCall<'a, C, A> where C: BorrowMut, /// Perform the operation you have build so far. pub fn doit(mut self) -> Result { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -14661,8 +14624,7 @@ impl<'a, C, A> PermissionDeleteCall<'a, C, A> where C: BorrowMut, } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Delete, &url) @@ -14839,7 +14801,7 @@ impl<'a, C, A> PermissionInsertCall<'a, C, A> where C: BorrowMut, /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Permission)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -14925,8 +14887,7 @@ impl<'a, C, A> PermissionInsertCall<'a, C, A> where C: BorrowMut, } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -15129,7 +15090,7 @@ impl<'a, C, A> PermissionPatchCall<'a, C, A> where C: BorrowMut, /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Permission)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -15213,8 +15174,7 @@ impl<'a, C, A> PermissionPatchCall<'a, C, A> where C: BorrowMut, } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -15410,7 +15370,7 @@ impl<'a, C, A> PermissionListCall<'a, C, A> where C: BorrowMut, A /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, PermissionList)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -15479,8 +15439,7 @@ impl<'a, C, A> PermissionListCall<'a, C, A> where C: BorrowMut, A } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -15656,7 +15615,7 @@ impl<'a, C, A> PermissionUpdateCall<'a, C, A> where C: BorrowMut, /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Permission)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -15740,8 +15699,7 @@ impl<'a, C, A> PermissionUpdateCall<'a, C, A> where C: BorrowMut, } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -15938,7 +15896,7 @@ impl<'a, C, A> PermissionGetCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Permission)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -16008,8 +15966,7 @@ impl<'a, C, A> PermissionGetCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -16185,7 +16142,7 @@ impl<'a, C, A> PermissionGetIdForEmailCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, PermissionId)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -16254,8 +16211,7 @@ impl<'a, C, A> PermissionGetIdForEmailCall<'a, C, A> where C: BorrowMut ChangeWatchCall<'a, C, A> where C: BorrowMut, A: o /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Channel)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -16515,8 +16471,7 @@ impl<'a, C, A> ChangeWatchCall<'a, C, A> where C: BorrowMut, A: o } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -16738,7 +16693,7 @@ impl<'a, C, A> ChangeListCall<'a, C, A> where C: BorrowMut, A: oa /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, ChangeList)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -16803,8 +16758,7 @@ impl<'a, C, A> ChangeListCall<'a, C, A> where C: BorrowMut, A: oa } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -17002,7 +16956,7 @@ impl<'a, C, A> ChangeGetCall<'a, C, A> where C: BorrowMut, A: oau /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Change)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -17071,8 +17025,7 @@ impl<'a, C, A> ChangeGetCall<'a, C, A> where C: BorrowMut, A: oau } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -17248,7 +17201,7 @@ impl<'a, C, A> PropertyPatchCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Property)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -17332,8 +17285,7 @@ impl<'a, C, A> PropertyPatchCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -17532,7 +17484,7 @@ impl<'a, C, A> PropertyDeleteCall<'a, C, A> where C: BorrowMut, A /// Perform the operation you have build so far. pub fn doit(mut self) -> Result { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -17604,8 +17556,7 @@ impl<'a, C, A> PropertyDeleteCall<'a, C, A> where C: BorrowMut, A } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Delete, &url) @@ -17785,7 +17736,7 @@ impl<'a, C, A> PropertyInsertCall<'a, C, A> where C: BorrowMut, A /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Property)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -17865,8 +17816,7 @@ impl<'a, C, A> PropertyInsertCall<'a, C, A> where C: BorrowMut, A } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -18045,7 +17995,7 @@ impl<'a, C, A> PropertyListCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, PropertyList)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -18114,8 +18064,7 @@ impl<'a, C, A> PropertyListCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -18291,7 +18240,7 @@ impl<'a, C, A> PropertyUpdateCall<'a, C, A> where C: BorrowMut, A /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Property)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -18375,8 +18324,7 @@ impl<'a, C, A> PropertyUpdateCall<'a, C, A> where C: BorrowMut, A } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -18575,7 +18523,7 @@ impl<'a, C, A> PropertyGetCall<'a, C, A> where C: BorrowMut, A: o /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Property)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -18648,8 +18596,7 @@ impl<'a, C, A> PropertyGetCall<'a, C, A> where C: BorrowMut, A: o } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -18833,7 +18780,7 @@ impl<'a, C, A> RevisionGetCall<'a, C, A> where C: BorrowMut, A: o /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Revision)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -18903,8 +18850,7 @@ impl<'a, C, A> RevisionGetCall<'a, C, A> where C: BorrowMut, A: o } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -19088,7 +19034,7 @@ impl<'a, C, A> RevisionPatchCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Revision)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -19169,8 +19115,7 @@ impl<'a, C, A> RevisionPatchCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -19360,7 +19305,7 @@ impl<'a, C, A> RevisionDeleteCall<'a, C, A> where C: BorrowMut, A /// Perform the operation you have build so far. pub fn doit(mut self) -> Result { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -19429,8 +19374,7 @@ impl<'a, C, A> RevisionDeleteCall<'a, C, A> where C: BorrowMut, A } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Delete, &url) @@ -19604,7 +19548,7 @@ impl<'a, C, A> RevisionUpdateCall<'a, C, A> where C: BorrowMut, A /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Revision)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -19685,8 +19629,7 @@ impl<'a, C, A> RevisionUpdateCall<'a, C, A> where C: BorrowMut, A } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -19875,7 +19818,7 @@ impl<'a, C, A> RevisionListCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, RevisionList)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -19944,8 +19887,7 @@ impl<'a, C, A> RevisionListCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) diff --git a/gen/drive3-cli/Cargo.toml b/gen/drive3-cli/Cargo.toml index dde062f6f7..f8bfdbd519 100644 --- a/gen/drive3-cli/Cargo.toml +++ b/gen/drive3-cli/Cargo.toml @@ -4,7 +4,7 @@ [package] name = "google-drive3-cli" -version = "0.3.3+20160222" +version = "0.3.4+20160331" authors = ["Sebastian Thiel "] description = "A complete library to interact with drive (protocol v3)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/drive3-cli" @@ -17,18 +17,18 @@ keywords = ["drive", "google", "cli"] name = "drive3" [dependencies] -hyper = "0.7" -mime = "0.1.0" -serde = ">= 0.7.0" -serde_json = ">= 0.7.0" -yup-oauth2 = ">= 0.5.4" +hyper = "0.8" +mime = "0.2.0" +serde = "0.6.0" +serde_json = "0.6.0" +yup-oauth2 = ">= 0.5.6" strsim = "0.4" yup-hyper-mock = "1.0" clap = "2.0" [build-dependencies] -syntex = { version = ">= 0.23" } -serde_codegen = { version = ">= 0.6" } +syntex = { version = "= 0.28" } +serde_codegen = { version = "= 0.6.13" } [dependencies.google-drive3] diff --git a/gen/drive3-cli/README.md b/gen/drive3-cli/README.md index a3a01ad8dc..5fce854019 100644 --- a/gen/drive3-cli/README.md +++ b/gen/drive3-cli/README.md @@ -17,14 +17,14 @@ Everything else about the *drive* API can be found at the You can download the pre-compiled 64bit binaries for the following platforms: -* ![icon](http://megaicons.net/static/img/icons_sizes/6/140/16/ubuntu-icon.png) [ubuntu](http://dl.byronimo.de/google.rs/cli/0.3.3/ubuntu/drive3.tar.gz) -* ![icon](http://hydra-media.cursecdn.com/wow.gamepedia.com/a/a2/Apple-icon-16x16.png?version=25ddd67ac3dd3b634478e3978b76cb74) [osx](http://dl.byronimo.de/google.rs/cli/0.3.3/osx/drive3.tar.gz) +* ![icon](http://megaicons.net/static/img/icons_sizes/6/140/16/ubuntu-icon.png) [ubuntu](http://dl.byronimo.de/google.rs/cli/0.3.4/ubuntu/drive3.tar.gz) +* ![icon](http://hydra-media.cursecdn.com/wow.gamepedia.com/a/a2/Apple-icon-16x16.png?version=25ddd67ac3dd3b634478e3978b76cb74) [osx](http://dl.byronimo.de/google.rs/cli/0.3.4/osx/drive3.tar.gz) Find the source code [on github](https://github.com/Byron/google-apis-rs/tree/master/gen/drive3-cli). # Usage -This documentation was generated from the *drive* API at revision *20160222*. The CLI is at version *0.3.3*. +This documentation was generated from the *drive* API at revision *20160331*. The CLI is at version *0.3.4*. ```bash drive3 [options] diff --git a/gen/drive3-cli/mkdocs.yml b/gen/drive3-cli/mkdocs.yml index 7d979da4a9..c7389f4d39 100644 --- a/gen/drive3-cli/mkdocs.yml +++ b/gen/drive3-cli/mkdocs.yml @@ -1,4 +1,4 @@ -site_name: drive v0.3.3+20160222 +site_name: drive v0.3.4+20160331 site_url: http://byron.github.io/google-apis-rs/google-drive3-cli site_description: Write integrating applications with bcore diff --git a/gen/drive3-cli/src/cmn.rs b/gen/drive3-cli/src/cmn.rs index 188159ee80..ae86fdef65 100644 --- a/gen/drive3-cli/src/cmn.rs +++ b/gen/drive3-cli/src/cmn.rs @@ -414,7 +414,7 @@ impl TokenStorage for JsonTokenStorage { Err(err) => match err.kind() { io::ErrorKind::NotFound => Ok(()), - _ => Err(json::Error::Io(err)) + _ => Err(json::Error::IoError(err)) }, Ok(_) => Ok(()), } @@ -427,7 +427,7 @@ impl TokenStorage for JsonTokenStorage { Err(serde_err) => Err(serde_err), } }, - Err(io_err) => Err(json::Error::Io(io_err)) + Err(io_err) => Err(json::Error::IoError(io_err)) } } } @@ -444,7 +444,7 @@ impl TokenStorage for JsonTokenStorage { Err(io_err) => { match io_err.kind() { io::ErrorKind::NotFound => Ok(None), - _ => Err(json::Error::Io(io_err)) + _ => Err(json::Error::IoError(io_err)) } } } @@ -683,7 +683,7 @@ pub fn application_secret_from_directory(dir: &str, = json::from_str(json_console_secret).unwrap(); match json::to_writer_pretty(&mut f, &console_secret) { Err(serde_err) => match serde_err { - json::Error::Io(err) => err, + json::Error::IoError(err) => err, _ => panic!("Unexpected serde error: {:#?}", serde_err) }, Ok(_) => continue, @@ -696,7 +696,7 @@ pub fn application_secret_from_directory(dir: &str, }, Ok(f) => { match json::de::from_reader::<_, ConsoleApplicationSecret>(f) { - Err(json::Error::Io(err)) => + Err(json::Error::IoError(err)) => return secret_io_error(err), Err(json_err) => return Err(CLIError::Configuration( diff --git a/gen/drive3-cli/src/main.rs b/gen/drive3-cli/src/main.rs index 8c0d8ab8a9..2b79d87d90 100644 --- a/gen/drive3-cli/src/main.rs +++ b/gen/drive3-cli/src/main.rs @@ -801,6 +801,7 @@ impl<'n> Engine<'n> { "modified-by-me-time" => Some(("modifiedByMeTime", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "thumbnail-link" => Some(("thumbnailLink", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "explicitly-trashed" => Some(("explicitlyTrashed", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "is-app-authorized" => Some(("isAppAuthorized", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), "writers-can-share" => Some(("writersCanShare", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), "owned-by-me" => Some(("ownedByMe", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), "viewed-by-me-time" => Some(("viewedByMeTime", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), @@ -879,7 +880,7 @@ impl<'n> Engine<'n> { "starred" => Some(("starred", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), "head-revision-id" => Some(("headRevisionId", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), _ => { - let suggestion = FieldCursor::did_you_mean(key, &vec!["altitude", "aperture", "app-properties", "camera-make", "camera-model", "can-comment", "can-copy", "can-edit", "can-read-revisions", "can-share", "capabilities", "color-space", "content-hints", "created-time", "description", "display-name", "duration-millis", "email-address", "explicitly-trashed", "exposure-bias", "exposure-mode", "exposure-time", "file-extension", "flash-used", "focal-length", "folder-color-rgb", "full-file-extension", "head-revision-id", "height", "icon-link", "id", "image", "image-media-metadata", "indexable-text", "iso-speed", "kind", "last-modifying-user", "latitude", "lens", "location", "longitude", "max-aperture-value", "md5-checksum", "me", "metering-mode", "mime-type", "modified-by-me-time", "modified-time", "name", "original-filename", "owned-by-me", "parents", "permission-id", "photo-link", "properties", "quota-bytes-used", "rotation", "sensor", "shared", "shared-with-me-time", "sharing-user", "size", "spaces", "starred", "subject-distance", "thumbnail", "thumbnail-link", "time", "trashed", "version", "video-media-metadata", "viewed-by-me", "viewed-by-me-time", "viewers-can-copy-content", "web-content-link", "web-view-link", "white-balance", "width", "writers-can-share"]); + let suggestion = FieldCursor::did_you_mean(key, &vec!["altitude", "aperture", "app-properties", "camera-make", "camera-model", "can-comment", "can-copy", "can-edit", "can-read-revisions", "can-share", "capabilities", "color-space", "content-hints", "created-time", "description", "display-name", "duration-millis", "email-address", "explicitly-trashed", "exposure-bias", "exposure-mode", "exposure-time", "file-extension", "flash-used", "focal-length", "folder-color-rgb", "full-file-extension", "head-revision-id", "height", "icon-link", "id", "image", "image-media-metadata", "indexable-text", "is-app-authorized", "iso-speed", "kind", "last-modifying-user", "latitude", "lens", "location", "longitude", "max-aperture-value", "md5-checksum", "me", "metering-mode", "mime-type", "modified-by-me-time", "modified-time", "name", "original-filename", "owned-by-me", "parents", "permission-id", "photo-link", "properties", "quota-bytes-used", "rotation", "sensor", "shared", "shared-with-me-time", "sharing-user", "size", "spaces", "starred", "subject-distance", "thumbnail", "thumbnail-link", "time", "trashed", "version", "video-media-metadata", "viewed-by-me", "viewed-by-me-time", "viewers-can-copy-content", "web-content-link", "web-view-link", "white-balance", "width", "writers-can-share"]); err.issues.push(CLIError::Field(FieldError::Unknown(temp_cursor.to_string(), suggestion, value.map(|v| v.to_string())))); None } @@ -976,6 +977,7 @@ impl<'n> Engine<'n> { "modified-by-me-time" => Some(("modifiedByMeTime", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "thumbnail-link" => Some(("thumbnailLink", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "explicitly-trashed" => Some(("explicitlyTrashed", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "is-app-authorized" => Some(("isAppAuthorized", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), "writers-can-share" => Some(("writersCanShare", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), "owned-by-me" => Some(("ownedByMe", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), "viewed-by-me-time" => Some(("viewedByMeTime", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), @@ -1054,7 +1056,7 @@ impl<'n> Engine<'n> { "starred" => Some(("starred", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), "head-revision-id" => Some(("headRevisionId", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), _ => { - let suggestion = FieldCursor::did_you_mean(key, &vec!["altitude", "aperture", "app-properties", "camera-make", "camera-model", "can-comment", "can-copy", "can-edit", "can-read-revisions", "can-share", "capabilities", "color-space", "content-hints", "created-time", "description", "display-name", "duration-millis", "email-address", "explicitly-trashed", "exposure-bias", "exposure-mode", "exposure-time", "file-extension", "flash-used", "focal-length", "folder-color-rgb", "full-file-extension", "head-revision-id", "height", "icon-link", "id", "image", "image-media-metadata", "indexable-text", "iso-speed", "kind", "last-modifying-user", "latitude", "lens", "location", "longitude", "max-aperture-value", "md5-checksum", "me", "metering-mode", "mime-type", "modified-by-me-time", "modified-time", "name", "original-filename", "owned-by-me", "parents", "permission-id", "photo-link", "properties", "quota-bytes-used", "rotation", "sensor", "shared", "shared-with-me-time", "sharing-user", "size", "spaces", "starred", "subject-distance", "thumbnail", "thumbnail-link", "time", "trashed", "version", "video-media-metadata", "viewed-by-me", "viewed-by-me-time", "viewers-can-copy-content", "web-content-link", "web-view-link", "white-balance", "width", "writers-can-share"]); + let suggestion = FieldCursor::did_you_mean(key, &vec!["altitude", "aperture", "app-properties", "camera-make", "camera-model", "can-comment", "can-copy", "can-edit", "can-read-revisions", "can-share", "capabilities", "color-space", "content-hints", "created-time", "description", "display-name", "duration-millis", "email-address", "explicitly-trashed", "exposure-bias", "exposure-mode", "exposure-time", "file-extension", "flash-used", "focal-length", "folder-color-rgb", "full-file-extension", "head-revision-id", "height", "icon-link", "id", "image", "image-media-metadata", "indexable-text", "is-app-authorized", "iso-speed", "kind", "last-modifying-user", "latitude", "lens", "location", "longitude", "max-aperture-value", "md5-checksum", "me", "metering-mode", "mime-type", "modified-by-me-time", "modified-time", "name", "original-filename", "owned-by-me", "parents", "permission-id", "photo-link", "properties", "quota-bytes-used", "rotation", "sensor", "shared", "shared-with-me-time", "sharing-user", "size", "spaces", "starred", "subject-distance", "thumbnail", "thumbnail-link", "time", "trashed", "version", "video-media-metadata", "viewed-by-me", "viewed-by-me-time", "viewers-can-copy-content", "web-content-link", "web-view-link", "white-balance", "width", "writers-can-share"]); err.issues.push(CLIError::Field(FieldError::Unknown(temp_cursor.to_string(), suggestion, value.map(|v| v.to_string())))); None } @@ -1498,6 +1500,7 @@ impl<'n> Engine<'n> { "modified-by-me-time" => Some(("modifiedByMeTime", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "thumbnail-link" => Some(("thumbnailLink", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "explicitly-trashed" => Some(("explicitlyTrashed", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "is-app-authorized" => Some(("isAppAuthorized", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), "writers-can-share" => Some(("writersCanShare", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), "owned-by-me" => Some(("ownedByMe", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), "viewed-by-me-time" => Some(("viewedByMeTime", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), @@ -1576,7 +1579,7 @@ impl<'n> Engine<'n> { "starred" => Some(("starred", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), "head-revision-id" => Some(("headRevisionId", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), _ => { - let suggestion = FieldCursor::did_you_mean(key, &vec!["altitude", "aperture", "app-properties", "camera-make", "camera-model", "can-comment", "can-copy", "can-edit", "can-read-revisions", "can-share", "capabilities", "color-space", "content-hints", "created-time", "description", "display-name", "duration-millis", "email-address", "explicitly-trashed", "exposure-bias", "exposure-mode", "exposure-time", "file-extension", "flash-used", "focal-length", "folder-color-rgb", "full-file-extension", "head-revision-id", "height", "icon-link", "id", "image", "image-media-metadata", "indexable-text", "iso-speed", "kind", "last-modifying-user", "latitude", "lens", "location", "longitude", "max-aperture-value", "md5-checksum", "me", "metering-mode", "mime-type", "modified-by-me-time", "modified-time", "name", "original-filename", "owned-by-me", "parents", "permission-id", "photo-link", "properties", "quota-bytes-used", "rotation", "sensor", "shared", "shared-with-me-time", "sharing-user", "size", "spaces", "starred", "subject-distance", "thumbnail", "thumbnail-link", "time", "trashed", "version", "video-media-metadata", "viewed-by-me", "viewed-by-me-time", "viewers-can-copy-content", "web-content-link", "web-view-link", "white-balance", "width", "writers-can-share"]); + let suggestion = FieldCursor::did_you_mean(key, &vec!["altitude", "aperture", "app-properties", "camera-make", "camera-model", "can-comment", "can-copy", "can-edit", "can-read-revisions", "can-share", "capabilities", "color-space", "content-hints", "created-time", "description", "display-name", "duration-millis", "email-address", "explicitly-trashed", "exposure-bias", "exposure-mode", "exposure-time", "file-extension", "flash-used", "focal-length", "folder-color-rgb", "full-file-extension", "head-revision-id", "height", "icon-link", "id", "image", "image-media-metadata", "indexable-text", "is-app-authorized", "iso-speed", "kind", "last-modifying-user", "latitude", "lens", "location", "longitude", "max-aperture-value", "md5-checksum", "me", "metering-mode", "mime-type", "modified-by-me-time", "modified-time", "name", "original-filename", "owned-by-me", "parents", "permission-id", "photo-link", "properties", "quota-bytes-used", "rotation", "sensor", "shared", "shared-with-me-time", "sharing-user", "size", "spaces", "starred", "subject-distance", "thumbnail", "thumbnail-link", "time", "trashed", "version", "video-media-metadata", "viewed-by-me", "viewed-by-me-time", "viewers-can-copy-content", "web-content-link", "web-view-link", "white-balance", "width", "writers-can-share"]); err.issues.push(CLIError::Field(FieldError::Unknown(temp_cursor.to_string(), suggestion, value.map(|v| v.to_string())))); None } @@ -3875,7 +3878,7 @@ fn main() { let mut app = App::new("drive3") .author("Sebastian Thiel ") - .version("0.3.3+20160222") + .version("0.3.4+20160331") .about("The API to interact with Drive.") .after_help("All documentation details can be found at http://byron.github.io/google-apis-rs/google_drive3_cli") .arg(Arg::with_name("url") diff --git a/gen/drive3/Cargo.toml b/gen/drive3/Cargo.toml index fab219a32a..cc0aa85af2 100644 --- a/gen/drive3/Cargo.toml +++ b/gen/drive3/Cargo.toml @@ -4,7 +4,7 @@ [package] name = "google-drive3" -version = "0.1.12+20160222" +version = "0.1.13+20160331" authors = ["Sebastian Thiel "] description = "A complete library to interact with drive (protocol v3)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/drive3" @@ -16,14 +16,14 @@ build = "src/build.rs" [dependencies] -hyper = "0.7" -mime = "0.1.0" -serde = ">= 0.7.0" -serde_json = ">= 0.7.0" -yup-oauth2 = ">= 0.5.4" +hyper = "0.8" +mime = "0.2.0" +serde = "0.6.0" +serde_json = "0.6.0" +yup-oauth2 = ">= 0.5.6" url = ">= 0.5" [build-dependencies] -syntex = { version = ">= 0.23" } -serde_codegen = { version = ">= 0.6" } +syntex = { version = "= 0.28" } +serde_codegen = { version = "= 0.6.13" } diff --git a/gen/drive3/README.md b/gen/drive3/README.md index b3d427a07d..b12b292b0d 100644 --- a/gen/drive3/README.md +++ b/gen/drive3/README.md @@ -5,7 +5,7 @@ DO NOT EDIT ! --> The `google-drive3` library allows access to all features of the *Google drive* service. -This documentation was generated from *drive* crate version *0.1.12+20160222*, where *20160222* is the exact revision of the *drive:v3* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.12*. +This documentation was generated from *drive* crate version *0.1.13+20160331*, where *20160331* is the exact revision of the *drive:v3* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.13*. Everything else about the *drive* *v3* API can be found at the [official documentation site](https://developers.google.com/drive/). diff --git a/gen/drive3/src/cmn.rs b/gen/drive3/src/cmn.rs index 87b91a8986..c69621da55 100644 --- a/gen/drive3/src/cmn.rs +++ b/gen/drive3/src/cmn.rs @@ -12,7 +12,7 @@ use mime::{Mime, TopLevel, SubLevel, Attr, Value}; use oauth2::{TokenType, Retry, self}; use hyper; use hyper::header::{ContentType, ContentLength, Headers, UserAgent, Authorization, Header, - HeaderFormat}; + HeaderFormat, Bearer}; use hyper::http::h1::LINE_ENDING; use hyper::method::Method; use hyper::status::StatusCode; @@ -634,7 +634,7 @@ pub struct ResumableUploadHelper<'a, A: 'a> { pub start_at: Option, pub auth: &'a mut A, pub user_agent: &'a str, - pub auth_header: Authorization, + pub auth_header: Authorization, pub url: &'a str, pub reader: &'a mut ReadSeek, pub media_type: Mime, diff --git a/gen/drive3/src/lib.rs b/gen/drive3/src/lib.rs index 1c59b662c1..93c856afe1 100644 --- a/gen/drive3/src/lib.rs +++ b/gen/drive3/src/lib.rs @@ -2,7 +2,7 @@ // This file was generated automatically from 'src/mako/api/lib.rs.mako' // DO NOT EDIT ! -//! This documentation was generated from *drive* crate version *0.1.12+20160222*, where *20160222* is the exact revision of the *drive:v3* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.12*. +//! This documentation was generated from *drive* crate version *0.1.13+20160331*, where *20160331* is the exact revision of the *drive:v3* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.13*. //! //! Everything else about the *drive* *v3* API can be found at the //! [official documentation site](https://developers.google.com/drive/). diff --git a/gen/drive3/src/lib.rs.in b/gen/drive3/src/lib.rs.in index b75e3be15c..c480703ce9 100644 --- a/gen/drive3/src/lib.rs.in +++ b/gen/drive3/src/lib.rs.in @@ -167,7 +167,7 @@ impl<'a, C, A> Drive Drive { client: RefCell::new(client), auth: RefCell::new(authenticator), - _user_agent: "google-api-rust-client/0.1.12".to_string(), + _user_agent: "google-api-rust-client/0.1.13".to_string(), } } @@ -197,7 +197,7 @@ impl<'a, C, A> Drive } /// Set the user-agent header field to use in all requests to the server. - /// It defaults to `google-api-rust-client/0.1.12`. + /// It defaults to `google-api-rust-client/0.1.13`. /// /// Returns the previously set user-agent. pub fn user_agent(&mut self, agent_name: String) -> String { @@ -877,6 +877,9 @@ pub struct File { /// Whether the file has been explicitly trashed, as opposed to recursively trashed from a parent folder. #[serde(rename="explicitlyTrashed")] pub explicitly_trashed: Option, + /// Whether the file was created or opened by the requesting app. + #[serde(rename="isAppAuthorized")] + pub is_app_authorized: Option, /// Whether users with only writer permission can modify the file's permissions. #[serde(rename="writersCanShare")] pub writers_can_share: Option, @@ -2142,7 +2145,7 @@ impl<'a, C, A> FileUpdateCall<'a, C, A> where C: BorrowMut, A: oa fn doit(mut self, mut reader: RS, reader_mime_type: mime::Mime, protocol: &'static str) -> Result<(hyper::client::Response, File)> where RS: ReadSeek { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -2248,8 +2251,7 @@ impl<'a, C, A> FileUpdateCall<'a, C, A> where C: BorrowMut, A: oa } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { if should_ask_dlg_for_url && (upload_url = dlg.upload_url()) == () && upload_url.is_some() { @@ -2578,7 +2580,7 @@ impl<'a, C, A> FileWatchCall<'a, C, A> where C: BorrowMut, A: oau /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Channel)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -2677,8 +2679,7 @@ impl<'a, C, A> FileWatchCall<'a, C, A> where C: BorrowMut, A: oau } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -2877,7 +2878,7 @@ impl<'a, C, A> FileCopyCall<'a, C, A> where C: BorrowMut, A: oaut /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, File)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -2966,8 +2967,7 @@ impl<'a, C, A> FileCopyCall<'a, C, A> where C: BorrowMut, A: oaut } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -3171,7 +3171,7 @@ impl<'a, C, A> FileExportCall<'a, C, A> where C: BorrowMut, A: oa /// Perform the operation you have build so far. pub fn doit(mut self) -> Result { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -3240,8 +3240,7 @@ impl<'a, C, A> FileExportCall<'a, C, A> where C: BorrowMut, A: oa } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -3406,7 +3405,7 @@ impl<'a, C, A> FileEmptyTrashCall<'a, C, A> where C: BorrowMut, A /// Perform the operation you have build so far. pub fn doit(mut self) -> Result { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -3452,8 +3451,7 @@ impl<'a, C, A> FileEmptyTrashCall<'a, C, A> where C: BorrowMut, A } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Delete, &url) @@ -3610,7 +3608,7 @@ impl<'a, C, A> FileListCall<'a, C, A> where C: BorrowMut, A: oaut /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, FileList)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -3675,8 +3673,7 @@ impl<'a, C, A> FileListCall<'a, C, A> where C: BorrowMut, A: oaut } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -3877,7 +3874,7 @@ impl<'a, C, A> FileGenerateIdCall<'a, C, A> where C: BorrowMut, A /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, GeneratedIds)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -3930,8 +3927,7 @@ impl<'a, C, A> FileGenerateIdCall<'a, C, A> where C: BorrowMut, A } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -4117,7 +4113,7 @@ impl<'a, C, A> FileCreateCall<'a, C, A> where C: BorrowMut, A: oa fn doit(mut self, mut reader: RS, reader_mime_type: mime::Mime, protocol: &'static str) -> Result<(hyper::client::Response, File)> where RS: ReadSeek { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -4198,8 +4194,7 @@ impl<'a, C, A> FileCreateCall<'a, C, A> where C: BorrowMut, A: oa } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { if should_ask_dlg_for_url && (upload_url = dlg.upload_url()) == () && upload_url.is_some() { @@ -4497,7 +4492,7 @@ impl<'a, C, A> FileDeleteCall<'a, C, A> where C: BorrowMut, A: oa /// Perform the operation you have build so far. pub fn doit(mut self) -> Result { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -4565,8 +4560,7 @@ impl<'a, C, A> FileDeleteCall<'a, C, A> where C: BorrowMut, A: oa } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Delete, &url) @@ -4729,7 +4723,7 @@ impl<'a, C, A> FileGetCall<'a, C, A> where C: BorrowMut, A: oauth /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, File)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -4817,8 +4811,7 @@ impl<'a, C, A> FileGetCall<'a, C, A> where C: BorrowMut, A: oauth } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -4990,7 +4983,7 @@ impl<'a, C, A> AboutGetCall<'a, C, A> where C: BorrowMut, A: oaut /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, About)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -5037,8 +5030,7 @@ impl<'a, C, A> AboutGetCall<'a, C, A> where C: BorrowMut, A: oaut } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -5195,7 +5187,7 @@ impl<'a, C, A> CommentDeleteCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -5264,8 +5256,7 @@ impl<'a, C, A> CommentDeleteCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Delete, &url) @@ -5434,7 +5425,7 @@ impl<'a, C, A> CommentGetCall<'a, C, A> where C: BorrowMut, A: oa /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Comment)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -5507,8 +5498,7 @@ impl<'a, C, A> CommentGetCall<'a, C, A> where C: BorrowMut, A: oa } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -5699,7 +5689,7 @@ impl<'a, C, A> CommentUpdateCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Comment)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -5780,8 +5770,7 @@ impl<'a, C, A> CommentUpdateCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -5977,7 +5966,7 @@ impl<'a, C, A> CommentCreateCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Comment)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -6057,8 +6046,7 @@ impl<'a, C, A> CommentCreateCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -6245,7 +6233,7 @@ impl<'a, C, A> CommentListCall<'a, C, A> where C: BorrowMut, A: o /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, CommentList)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -6326,8 +6314,7 @@ impl<'a, C, A> CommentListCall<'a, C, A> where C: BorrowMut, A: o } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -6527,7 +6514,7 @@ impl<'a, C, A> ChannelStopCall<'a, C, A> where C: BorrowMut, A: o /// Perform the operation you have build so far. pub fn doit(mut self) -> Result { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -6584,8 +6571,7 @@ impl<'a, C, A> ChannelStopCall<'a, C, A> where C: BorrowMut, A: o } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -6752,7 +6738,7 @@ impl<'a, C, A> ReplyCreateCall<'a, C, A> where C: BorrowMut, A: o /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Reply)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -6833,8 +6819,7 @@ impl<'a, C, A> ReplyCreateCall<'a, C, A> where C: BorrowMut, A: o } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -7025,7 +7010,7 @@ impl<'a, C, A> ReplyDeleteCall<'a, C, A> where C: BorrowMut, A: o /// Perform the operation you have build so far. pub fn doit(mut self) -> Result { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -7095,8 +7080,7 @@ impl<'a, C, A> ReplyDeleteCall<'a, C, A> where C: BorrowMut, A: o } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Delete, &url) @@ -7279,7 +7263,7 @@ impl<'a, C, A> ReplyListCall<'a, C, A> where C: BorrowMut, A: oau /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, ReplyList)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -7358,8 +7342,7 @@ impl<'a, C, A> ReplyListCall<'a, C, A> where C: BorrowMut, A: oau } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -7560,7 +7543,7 @@ impl<'a, C, A> ReplyGetCall<'a, C, A> where C: BorrowMut, A: oaut /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Reply)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -7634,8 +7617,7 @@ impl<'a, C, A> ReplyGetCall<'a, C, A> where C: BorrowMut, A: oaut } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -7837,7 +7819,7 @@ impl<'a, C, A> ReplyUpdateCall<'a, C, A> where C: BorrowMut, A: o /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Reply)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -7919,8 +7901,7 @@ impl<'a, C, A> ReplyUpdateCall<'a, C, A> where C: BorrowMut, A: o } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -8127,7 +8108,7 @@ impl<'a, C, A> RevisionUpdateCall<'a, C, A> where C: BorrowMut, A /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Revision)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -8208,8 +8189,7 @@ impl<'a, C, A> RevisionUpdateCall<'a, C, A> where C: BorrowMut, A } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -8406,7 +8386,7 @@ impl<'a, C, A> RevisionGetCall<'a, C, A> where C: BorrowMut, A: o /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Revision)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -8495,8 +8475,7 @@ impl<'a, C, A> RevisionGetCall<'a, C, A> where C: BorrowMut, A: o } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -8680,7 +8659,7 @@ impl<'a, C, A> RevisionDeleteCall<'a, C, A> where C: BorrowMut, A /// Perform the operation you have build so far. pub fn doit(mut self) -> Result { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -8749,8 +8728,7 @@ impl<'a, C, A> RevisionDeleteCall<'a, C, A> where C: BorrowMut, A } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Delete, &url) @@ -8916,7 +8894,7 @@ impl<'a, C, A> RevisionListCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, RevisionList)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -8985,8 +8963,7 @@ impl<'a, C, A> RevisionListCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -9151,7 +9128,7 @@ impl<'a, C, A> ChangeGetStartPageTokenCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, StartPageToken)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -9198,8 +9175,7 @@ impl<'a, C, A> ChangeGetStartPageTokenCall<'a, C, A> where C: BorrowMut ChangeWatchCall<'a, C, A> where C: BorrowMut, A: o /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Channel)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -9441,8 +9417,7 @@ impl<'a, C, A> ChangeWatchCall<'a, C, A> where C: BorrowMut, A: o } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -9657,7 +9632,7 @@ impl<'a, C, A> ChangeListCall<'a, C, A> where C: BorrowMut, A: oa /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, ChangeList)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -9717,8 +9692,7 @@ impl<'a, C, A> ChangeListCall<'a, C, A> where C: BorrowMut, A: oa } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -9913,7 +9887,7 @@ impl<'a, C, A> PermissionDeleteCall<'a, C, A> where C: BorrowMut, /// Perform the operation you have build so far. pub fn doit(mut self) -> Result { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -9982,8 +9956,7 @@ impl<'a, C, A> PermissionDeleteCall<'a, C, A> where C: BorrowMut, } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Delete, &url) @@ -10149,7 +10122,7 @@ impl<'a, C, A> PermissionListCall<'a, C, A> where C: BorrowMut, A /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, PermissionList)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -10218,8 +10191,7 @@ impl<'a, C, A> PermissionListCall<'a, C, A> where C: BorrowMut, A } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -10395,7 +10367,7 @@ impl<'a, C, A> PermissionUpdateCall<'a, C, A> where C: BorrowMut, /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Permission)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -10479,8 +10451,7 @@ impl<'a, C, A> PermissionUpdateCall<'a, C, A> where C: BorrowMut, } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -10677,7 +10648,7 @@ impl<'a, C, A> PermissionGetCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Permission)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -10747,8 +10718,7 @@ impl<'a, C, A> PermissionGetCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -10937,7 +10907,7 @@ impl<'a, C, A> PermissionCreateCall<'a, C, A> where C: BorrowMut, /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Permission)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -11026,8 +10996,7 @@ impl<'a, C, A> PermissionCreateCall<'a, C, A> where C: BorrowMut, } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); diff --git a/gen/fitness1-cli/Cargo.toml b/gen/fitness1-cli/Cargo.toml index 7d8f1d52ee..184ac46f1e 100644 --- a/gen/fitness1-cli/Cargo.toml +++ b/gen/fitness1-cli/Cargo.toml @@ -4,7 +4,7 @@ [package] name = "google-fitness1-cli" -version = "0.3.3+20151021" +version = "0.3.4+20151021" authors = ["Sebastian Thiel "] description = "A complete library to interact with fitness (protocol v1)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/fitness1-cli" @@ -17,18 +17,18 @@ keywords = ["fitness", "google", "cli"] name = "fitness1" [dependencies] -hyper = "0.7" -mime = "0.1.0" -serde = ">= 0.7.0" -serde_json = ">= 0.7.0" -yup-oauth2 = ">= 0.5.4" +hyper = "0.8" +mime = "0.2.0" +serde = "0.6.0" +serde_json = "0.6.0" +yup-oauth2 = ">= 0.5.6" strsim = "0.4" yup-hyper-mock = "1.0" clap = "2.0" [build-dependencies] -syntex = { version = ">= 0.23" } -serde_codegen = { version = ">= 0.6" } +syntex = { version = "= 0.28" } +serde_codegen = { version = "= 0.6.13" } [dependencies.google-fitness1] diff --git a/gen/fitness1-cli/README.md b/gen/fitness1-cli/README.md index 7b06b25f6c..b61b6672ae 100644 --- a/gen/fitness1-cli/README.md +++ b/gen/fitness1-cli/README.md @@ -17,14 +17,14 @@ Everything else about the *fitness* API can be found at the You can download the pre-compiled 64bit binaries for the following platforms: -* ![icon](http://megaicons.net/static/img/icons_sizes/6/140/16/ubuntu-icon.png) [ubuntu](http://dl.byronimo.de/google.rs/cli/0.3.3/ubuntu/fitness1.tar.gz) -* ![icon](http://hydra-media.cursecdn.com/wow.gamepedia.com/a/a2/Apple-icon-16x16.png?version=25ddd67ac3dd3b634478e3978b76cb74) [osx](http://dl.byronimo.de/google.rs/cli/0.3.3/osx/fitness1.tar.gz) +* ![icon](http://megaicons.net/static/img/icons_sizes/6/140/16/ubuntu-icon.png) [ubuntu](http://dl.byronimo.de/google.rs/cli/0.3.4/ubuntu/fitness1.tar.gz) +* ![icon](http://hydra-media.cursecdn.com/wow.gamepedia.com/a/a2/Apple-icon-16x16.png?version=25ddd67ac3dd3b634478e3978b76cb74) [osx](http://dl.byronimo.de/google.rs/cli/0.3.4/osx/fitness1.tar.gz) Find the source code [on github](https://github.com/Byron/google-apis-rs/tree/master/gen/fitness1-cli). # Usage -This documentation was generated from the *fitness* API at revision *20151021*. The CLI is at version *0.3.3*. +This documentation was generated from the *fitness* API at revision *20151021*. The CLI is at version *0.3.4*. ```bash fitness1 [options] diff --git a/gen/fitness1-cli/mkdocs.yml b/gen/fitness1-cli/mkdocs.yml index d098139f61..554ae6354b 100644 --- a/gen/fitness1-cli/mkdocs.yml +++ b/gen/fitness1-cli/mkdocs.yml @@ -1,4 +1,4 @@ -site_name: fitness v0.3.3+20151021 +site_name: fitness v0.3.4+20151021 site_url: http://byron.github.io/google-apis-rs/google-fitness1-cli site_description: Write integrating applications with bcore diff --git a/gen/fitness1-cli/src/cmn.rs b/gen/fitness1-cli/src/cmn.rs index 188159ee80..ae86fdef65 100644 --- a/gen/fitness1-cli/src/cmn.rs +++ b/gen/fitness1-cli/src/cmn.rs @@ -414,7 +414,7 @@ impl TokenStorage for JsonTokenStorage { Err(err) => match err.kind() { io::ErrorKind::NotFound => Ok(()), - _ => Err(json::Error::Io(err)) + _ => Err(json::Error::IoError(err)) }, Ok(_) => Ok(()), } @@ -427,7 +427,7 @@ impl TokenStorage for JsonTokenStorage { Err(serde_err) => Err(serde_err), } }, - Err(io_err) => Err(json::Error::Io(io_err)) + Err(io_err) => Err(json::Error::IoError(io_err)) } } } @@ -444,7 +444,7 @@ impl TokenStorage for JsonTokenStorage { Err(io_err) => { match io_err.kind() { io::ErrorKind::NotFound => Ok(None), - _ => Err(json::Error::Io(io_err)) + _ => Err(json::Error::IoError(io_err)) } } } @@ -683,7 +683,7 @@ pub fn application_secret_from_directory(dir: &str, = json::from_str(json_console_secret).unwrap(); match json::to_writer_pretty(&mut f, &console_secret) { Err(serde_err) => match serde_err { - json::Error::Io(err) => err, + json::Error::IoError(err) => err, _ => panic!("Unexpected serde error: {:#?}", serde_err) }, Ok(_) => continue, @@ -696,7 +696,7 @@ pub fn application_secret_from_directory(dir: &str, }, Ok(f) => { match json::de::from_reader::<_, ConsoleApplicationSecret>(f) { - Err(json::Error::Io(err)) => + Err(json::Error::IoError(err)) => return secret_io_error(err), Err(json_err) => return Err(CLIError::Configuration( diff --git a/gen/fitness1-cli/src/main.rs b/gen/fitness1-cli/src/main.rs index 8a5914e87d..b28364ee1f 100644 --- a/gen/fitness1-cli/src/main.rs +++ b/gen/fitness1-cli/src/main.rs @@ -1533,7 +1533,7 @@ fn main() { let mut app = App::new("fitness1") .author("Sebastian Thiel ") - .version("0.3.3+20151021") + .version("0.3.4+20151021") .about("Google Fit API") .after_help("All documentation details can be found at http://byron.github.io/google-apis-rs/google_fitness1_cli") .arg(Arg::with_name("url") diff --git a/gen/fitness1/Cargo.toml b/gen/fitness1/Cargo.toml index d1775c08c5..808860b6e8 100644 --- a/gen/fitness1/Cargo.toml +++ b/gen/fitness1/Cargo.toml @@ -4,7 +4,7 @@ [package] name = "google-fitness1" -version = "0.1.12+20151021" +version = "0.1.13+20151021" authors = ["Sebastian Thiel "] description = "A complete library to interact with fitness (protocol v1)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/fitness1" @@ -16,14 +16,14 @@ build = "src/build.rs" [dependencies] -hyper = "0.7" -mime = "0.1.0" -serde = ">= 0.7.0" -serde_json = ">= 0.7.0" -yup-oauth2 = ">= 0.5.4" +hyper = "0.8" +mime = "0.2.0" +serde = "0.6.0" +serde_json = "0.6.0" +yup-oauth2 = ">= 0.5.6" url = ">= 0.5" [build-dependencies] -syntex = { version = ">= 0.23" } -serde_codegen = { version = ">= 0.6" } +syntex = { version = "= 0.28" } +serde_codegen = { version = "= 0.6.13" } diff --git a/gen/fitness1/README.md b/gen/fitness1/README.md index 1bde4ce06c..84f04e2509 100644 --- a/gen/fitness1/README.md +++ b/gen/fitness1/README.md @@ -5,7 +5,7 @@ DO NOT EDIT ! --> The `google-fitness1` library allows access to all features of the *Google fitness* service. -This documentation was generated from *fitness* crate version *0.1.12+20151021*, where *20151021* is the exact revision of the *fitness:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.12*. +This documentation was generated from *fitness* crate version *0.1.13+20151021*, where *20151021* is the exact revision of the *fitness:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.13*. Everything else about the *fitness* *v1* API can be found at the [official documentation site](https://developers.google.com/fit/rest/). diff --git a/gen/fitness1/src/cmn.rs b/gen/fitness1/src/cmn.rs index 87b91a8986..c69621da55 100644 --- a/gen/fitness1/src/cmn.rs +++ b/gen/fitness1/src/cmn.rs @@ -12,7 +12,7 @@ use mime::{Mime, TopLevel, SubLevel, Attr, Value}; use oauth2::{TokenType, Retry, self}; use hyper; use hyper::header::{ContentType, ContentLength, Headers, UserAgent, Authorization, Header, - HeaderFormat}; + HeaderFormat, Bearer}; use hyper::http::h1::LINE_ENDING; use hyper::method::Method; use hyper::status::StatusCode; @@ -634,7 +634,7 @@ pub struct ResumableUploadHelper<'a, A: 'a> { pub start_at: Option, pub auth: &'a mut A, pub user_agent: &'a str, - pub auth_header: Authorization, + pub auth_header: Authorization, pub url: &'a str, pub reader: &'a mut ReadSeek, pub media_type: Mime, diff --git a/gen/fitness1/src/lib.rs b/gen/fitness1/src/lib.rs index 762d3fa1de..97bb469008 100644 --- a/gen/fitness1/src/lib.rs +++ b/gen/fitness1/src/lib.rs @@ -2,7 +2,7 @@ // This file was generated automatically from 'src/mako/api/lib.rs.mako' // DO NOT EDIT ! -//! This documentation was generated from *fitness* crate version *0.1.12+20151021*, where *20151021* is the exact revision of the *fitness:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.12*. +//! This documentation was generated from *fitness* crate version *0.1.13+20151021*, where *20151021* is the exact revision of the *fitness:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.13*. //! //! Everything else about the *fitness* *v1* API can be found at the //! [official documentation site](https://developers.google.com/fit/rest/). diff --git a/gen/fitness1/src/lib.rs.in b/gen/fitness1/src/lib.rs.in index f0bb507106..a033e1a148 100644 --- a/gen/fitness1/src/lib.rs.in +++ b/gen/fitness1/src/lib.rs.in @@ -153,7 +153,7 @@ impl<'a, C, A> Fitness Fitness { client: RefCell::new(client), auth: RefCell::new(authenticator), - _user_agent: "google-api-rust-client/0.1.12".to_string(), + _user_agent: "google-api-rust-client/0.1.13".to_string(), } } @@ -162,7 +162,7 @@ impl<'a, C, A> Fitness } /// Set the user-agent header field to use in all requests to the server. - /// It defaults to `google-api-rust-client/0.1.12`. + /// It defaults to `google-api-rust-client/0.1.13`. /// /// Returns the previously set user-agent. pub fn user_agent(&mut self, agent_name: String) -> String { @@ -1050,7 +1050,7 @@ impl<'a, C, A> UserDatasetAggregateCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, AggregateResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -1130,8 +1130,7 @@ impl<'a, C, A> UserDatasetAggregateCall<'a, C, A> where C: BorrowMut UserDataSourceDeleteCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, DataSource)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -1381,8 +1380,7 @@ impl<'a, C, A> UserDataSourceDeleteCall<'a, C, A> where C: BorrowMut UserDataSourceDatasetGetCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, Dataset)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -1641,8 +1639,7 @@ impl<'a, C, A> UserDataSourceDatasetGetCall<'a, C, A> where C: BorrowMut UserDataSourceCreateCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, DataSource)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -1929,8 +1926,7 @@ impl<'a, C, A> UserDataSourceCreateCall<'a, C, A> where C: BorrowMut UserDataSourceDatasetDeleteCall<'a, C, A> where C: BorrowMut Result { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -2191,8 +2187,7 @@ impl<'a, C, A> UserDataSourceDatasetDeleteCall<'a, C, A> where C: BorrowMut UserDataSourceDatasetPatchCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, Dataset)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -2478,8 +2473,7 @@ impl<'a, C, A> UserDataSourceDatasetPatchCall<'a, C, A> where C: BorrowMut UserSessionDeleteCall<'a, C, A> where C: BorrowMut /// Perform the operation you have build so far. pub fn doit(mut self) -> Result { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -2760,8 +2754,7 @@ impl<'a, C, A> UserSessionDeleteCall<'a, C, A> where C: BorrowMut } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Delete, &url) @@ -2935,7 +2928,7 @@ impl<'a, C, A> UserDataSourceGetCall<'a, C, A> where C: BorrowMut /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, DataSource)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -3005,8 +2998,7 @@ impl<'a, C, A> UserDataSourceGetCall<'a, C, A> where C: BorrowMut } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -3192,7 +3184,7 @@ impl<'a, C, A> UserDataSourceUpdateCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, DataSource)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -3273,8 +3265,7 @@ impl<'a, C, A> UserDataSourceUpdateCall<'a, C, A> where C: BorrowMut UserSessionListCall<'a, C, A> where C: BorrowMut, /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, ListSessionsResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -3552,8 +3543,7 @@ impl<'a, C, A> UserSessionListCall<'a, C, A> where C: BorrowMut, } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -3757,7 +3747,7 @@ impl<'a, C, A> UserSessionUpdateCall<'a, C, A> where C: BorrowMut /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Session)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -3841,8 +3831,7 @@ impl<'a, C, A> UserSessionUpdateCall<'a, C, A> where C: BorrowMut } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -4048,7 +4037,7 @@ impl<'a, C, A> UserDataSourcePatchCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, DataSource)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -4129,8 +4118,7 @@ impl<'a, C, A> UserDataSourcePatchCall<'a, C, A> where C: BorrowMut UserDataSourceListCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, ListDataSourcesResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -4395,8 +4383,7 @@ impl<'a, C, A> UserDataSourceListCall<'a, C, A> where C: BorrowMut"] description = "A complete library to interact with freebase (protocol v1)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/freebase1-cli" @@ -17,18 +17,18 @@ keywords = ["freebase", "google", "cli"] name = "freebase1" [dependencies] -hyper = "0.7" -mime = "0.1.0" -serde = ">= 0.7.0" -serde_json = ">= 0.7.0" -yup-oauth2 = ">= 0.5.4" +hyper = "0.8" +mime = "0.2.0" +serde = "0.6.0" +serde_json = "0.6.0" +yup-oauth2 = ">= 0.5.6" strsim = "0.4" yup-hyper-mock = "1.0" clap = "2.0" [build-dependencies] -syntex = { version = ">= 0.23" } -serde_codegen = { version = ">= 0.6" } +syntex = { version = "= 0.28" } +serde_codegen = { version = "= 0.6.13" } [dependencies.google-freebase1] diff --git a/gen/freebase1-cli/README.md b/gen/freebase1-cli/README.md index 79c3df4a78..b665f1ef9c 100644 --- a/gen/freebase1-cli/README.md +++ b/gen/freebase1-cli/README.md @@ -17,14 +17,14 @@ Everything else about the *freebase* API can be found at the You can download the pre-compiled 64bit binaries for the following platforms: -* ![icon](http://megaicons.net/static/img/icons_sizes/6/140/16/ubuntu-icon.png) [ubuntu](http://dl.byronimo.de/google.rs/cli/0.3.3/ubuntu/freebase1.tar.gz) -* ![icon](http://hydra-media.cursecdn.com/wow.gamepedia.com/a/a2/Apple-icon-16x16.png?version=25ddd67ac3dd3b634478e3978b76cb74) [osx](http://dl.byronimo.de/google.rs/cli/0.3.3/osx/freebase1.tar.gz) +* ![icon](http://megaicons.net/static/img/icons_sizes/6/140/16/ubuntu-icon.png) [ubuntu](http://dl.byronimo.de/google.rs/cli/0.3.4/ubuntu/freebase1.tar.gz) +* ![icon](http://hydra-media.cursecdn.com/wow.gamepedia.com/a/a2/Apple-icon-16x16.png?version=25ddd67ac3dd3b634478e3978b76cb74) [osx](http://dl.byronimo.de/google.rs/cli/0.3.4/osx/freebase1.tar.gz) Find the source code [on github](https://github.com/Byron/google-apis-rs/tree/master/gen/freebase1-cli). # Usage -This documentation was generated from the *freebase* API at revision *20150728*. The CLI is at version *0.3.3*. +This documentation was generated from the *freebase* API at revision *20150728*. The CLI is at version *0.3.4*. ```bash freebase1 [options] diff --git a/gen/freebase1-cli/mkdocs.yml b/gen/freebase1-cli/mkdocs.yml index a834e0a9ec..132fbc44fe 100644 --- a/gen/freebase1-cli/mkdocs.yml +++ b/gen/freebase1-cli/mkdocs.yml @@ -1,4 +1,4 @@ -site_name: freebase v0.3.3+20150728 +site_name: freebase v0.3.4+20150728 site_url: http://byron.github.io/google-apis-rs/google-freebase1-cli site_description: Write integrating applications with bcore diff --git a/gen/freebase1-cli/src/cmn.rs b/gen/freebase1-cli/src/cmn.rs index 188159ee80..ae86fdef65 100644 --- a/gen/freebase1-cli/src/cmn.rs +++ b/gen/freebase1-cli/src/cmn.rs @@ -414,7 +414,7 @@ impl TokenStorage for JsonTokenStorage { Err(err) => match err.kind() { io::ErrorKind::NotFound => Ok(()), - _ => Err(json::Error::Io(err)) + _ => Err(json::Error::IoError(err)) }, Ok(_) => Ok(()), } @@ -427,7 +427,7 @@ impl TokenStorage for JsonTokenStorage { Err(serde_err) => Err(serde_err), } }, - Err(io_err) => Err(json::Error::Io(io_err)) + Err(io_err) => Err(json::Error::IoError(io_err)) } } } @@ -444,7 +444,7 @@ impl TokenStorage for JsonTokenStorage { Err(io_err) => { match io_err.kind() { io::ErrorKind::NotFound => Ok(None), - _ => Err(json::Error::Io(io_err)) + _ => Err(json::Error::IoError(io_err)) } } } @@ -683,7 +683,7 @@ pub fn application_secret_from_directory(dir: &str, = json::from_str(json_console_secret).unwrap(); match json::to_writer_pretty(&mut f, &console_secret) { Err(serde_err) => match serde_err { - json::Error::Io(err) => err, + json::Error::IoError(err) => err, _ => panic!("Unexpected serde error: {:#?}", serde_err) }, Ok(_) => continue, @@ -696,7 +696,7 @@ pub fn application_secret_from_directory(dir: &str, }, Ok(f) => { match json::de::from_reader::<_, ConsoleApplicationSecret>(f) { - Err(json::Error::Io(err)) => + Err(json::Error::IoError(err)) => return secret_io_error(err), Err(json_err) => return Err(CLIError::Configuration( diff --git a/gen/freebase1-cli/src/main.rs b/gen/freebase1-cli/src/main.rs index e12ef11662..f98cb08359 100644 --- a/gen/freebase1-cli/src/main.rs +++ b/gen/freebase1-cli/src/main.rs @@ -377,7 +377,7 @@ fn main() { let mut app = App::new("freebase1") .author("Sebastian Thiel ") - .version("0.3.3+20150728") + .version("0.3.4+20150728") .about("Find Freebase entities using textual queries and other constraints.") .after_help("All documentation details can be found at http://byron.github.io/google-apis-rs/google_freebase1_cli") .arg(Arg::with_name("folder") diff --git a/gen/freebase1/Cargo.toml b/gen/freebase1/Cargo.toml index 72809a652a..16cdaa8088 100644 --- a/gen/freebase1/Cargo.toml +++ b/gen/freebase1/Cargo.toml @@ -4,7 +4,7 @@ [package] name = "google-freebase1" -version = "0.1.12+20150728" +version = "0.1.13+20150728" authors = ["Sebastian Thiel "] description = "A complete library to interact with freebase (protocol v1)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/freebase1" @@ -16,14 +16,14 @@ build = "src/build.rs" [dependencies] -hyper = "0.7" -mime = "0.1.0" -serde = ">= 0.7.0" -serde_json = ">= 0.7.0" -yup-oauth2 = ">= 0.5.4" +hyper = "0.8" +mime = "0.2.0" +serde = "0.6.0" +serde_json = "0.6.0" +yup-oauth2 = ">= 0.5.6" url = ">= 0.5" [build-dependencies] -syntex = { version = ">= 0.23" } -serde_codegen = { version = ">= 0.6" } +syntex = { version = "= 0.28" } +serde_codegen = { version = "= 0.6.13" } diff --git a/gen/freebase1/README.md b/gen/freebase1/README.md index 4222a0eb17..4850b2f9d9 100644 --- a/gen/freebase1/README.md +++ b/gen/freebase1/README.md @@ -5,7 +5,7 @@ DO NOT EDIT ! --> The `google-freebase1` library allows access to all features of the *Google freebase* service. -This documentation was generated from *freebase* crate version *0.1.12+20150728*, where *20150728* is the exact revision of the *freebase:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.12*. +This documentation was generated from *freebase* crate version *0.1.13+20150728*, where *20150728* is the exact revision of the *freebase:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.13*. Everything else about the *freebase* *v1* API can be found at the [official documentation site](https://developers.google.com/freebase/). diff --git a/gen/freebase1/src/cmn.rs b/gen/freebase1/src/cmn.rs index 87b91a8986..c69621da55 100644 --- a/gen/freebase1/src/cmn.rs +++ b/gen/freebase1/src/cmn.rs @@ -12,7 +12,7 @@ use mime::{Mime, TopLevel, SubLevel, Attr, Value}; use oauth2::{TokenType, Retry, self}; use hyper; use hyper::header::{ContentType, ContentLength, Headers, UserAgent, Authorization, Header, - HeaderFormat}; + HeaderFormat, Bearer}; use hyper::http::h1::LINE_ENDING; use hyper::method::Method; use hyper::status::StatusCode; @@ -634,7 +634,7 @@ pub struct ResumableUploadHelper<'a, A: 'a> { pub start_at: Option, pub auth: &'a mut A, pub user_agent: &'a str, - pub auth_header: Authorization, + pub auth_header: Authorization, pub url: &'a str, pub reader: &'a mut ReadSeek, pub media_type: Mime, diff --git a/gen/freebase1/src/lib.rs b/gen/freebase1/src/lib.rs index 533367ae0d..bf3ebd78f8 100644 --- a/gen/freebase1/src/lib.rs +++ b/gen/freebase1/src/lib.rs @@ -2,7 +2,7 @@ // This file was generated automatically from 'src/mako/api/lib.rs.mako' // DO NOT EDIT ! -//! This documentation was generated from *freebase* crate version *0.1.12+20150728*, where *20150728* is the exact revision of the *freebase:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.12*. +//! This documentation was generated from *freebase* crate version *0.1.13+20150728*, where *20150728* is the exact revision of the *freebase:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.13*. //! //! Everything else about the *freebase* *v1* API can be found at the //! [official documentation site](https://developers.google.com/freebase/). diff --git a/gen/freebase1/src/lib.rs.in b/gen/freebase1/src/lib.rs.in index 6ae6b7c7ac..f2c7962209 100644 --- a/gen/freebase1/src/lib.rs.in +++ b/gen/freebase1/src/lib.rs.in @@ -111,7 +111,7 @@ impl<'a, C, A> Freebase Freebase { client: RefCell::new(client), auth: RefCell::new(authenticator), - _user_agent: "google-api-rust-client/0.1.12".to_string(), + _user_agent: "google-api-rust-client/0.1.13".to_string(), } } @@ -120,7 +120,7 @@ impl<'a, C, A> Freebase } /// Set the user-agent header field to use in all requests to the server. - /// It defaults to `google-api-rust-client/0.1.12`. + /// It defaults to `google-api-rust-client/0.1.13`. /// /// Returns the previously set user-agent. pub fn user_agent(&mut self, agent_name: String) -> String { @@ -391,7 +391,7 @@ impl<'a, C, A> MethodReconcileCall<'a, C, A> where C: BorrowMut, /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, ReconcileGet)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -690,7 +690,7 @@ impl<'a, C, A> MethodSearchCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, diff --git a/gen/fusiontables2-cli/Cargo.toml b/gen/fusiontables2-cli/Cargo.toml index 130f5cab4d..617c70ebf6 100644 --- a/gen/fusiontables2-cli/Cargo.toml +++ b/gen/fusiontables2-cli/Cargo.toml @@ -4,7 +4,7 @@ [package] name = "google-fusiontables2-cli" -version = "0.3.3+20160212" +version = "0.3.4+20160317" authors = ["Sebastian Thiel "] description = "A complete library to interact with fusiontables (protocol v2)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/fusiontables2-cli" @@ -17,18 +17,18 @@ keywords = ["fusiontables", "google", "cli"] name = "fusiontables2" [dependencies] -hyper = "0.7" -mime = "0.1.0" -serde = ">= 0.7.0" -serde_json = ">= 0.7.0" -yup-oauth2 = ">= 0.5.4" +hyper = "0.8" +mime = "0.2.0" +serde = "0.6.0" +serde_json = "0.6.0" +yup-oauth2 = ">= 0.5.6" strsim = "0.4" yup-hyper-mock = "1.0" clap = "2.0" [build-dependencies] -syntex = { version = ">= 0.23" } -serde_codegen = { version = ">= 0.6" } +syntex = { version = "= 0.28" } +serde_codegen = { version = "= 0.6.13" } [dependencies.google-fusiontables2] diff --git a/gen/fusiontables2-cli/README.md b/gen/fusiontables2-cli/README.md index d2d504ad0f..421805d7c0 100644 --- a/gen/fusiontables2-cli/README.md +++ b/gen/fusiontables2-cli/README.md @@ -17,14 +17,14 @@ Everything else about the *fusiontables* API can be found at the You can download the pre-compiled 64bit binaries for the following platforms: -* ![icon](http://megaicons.net/static/img/icons_sizes/6/140/16/ubuntu-icon.png) [ubuntu](http://dl.byronimo.de/google.rs/cli/0.3.3/ubuntu/fusiontables2.tar.gz) -* ![icon](http://hydra-media.cursecdn.com/wow.gamepedia.com/a/a2/Apple-icon-16x16.png?version=25ddd67ac3dd3b634478e3978b76cb74) [osx](http://dl.byronimo.de/google.rs/cli/0.3.3/osx/fusiontables2.tar.gz) +* ![icon](http://megaicons.net/static/img/icons_sizes/6/140/16/ubuntu-icon.png) [ubuntu](http://dl.byronimo.de/google.rs/cli/0.3.4/ubuntu/fusiontables2.tar.gz) +* ![icon](http://hydra-media.cursecdn.com/wow.gamepedia.com/a/a2/Apple-icon-16x16.png?version=25ddd67ac3dd3b634478e3978b76cb74) [osx](http://dl.byronimo.de/google.rs/cli/0.3.4/osx/fusiontables2.tar.gz) Find the source code [on github](https://github.com/Byron/google-apis-rs/tree/master/gen/fusiontables2-cli). # Usage -This documentation was generated from the *fusiontables* API at revision *20160212*. The CLI is at version *0.3.3*. +This documentation was generated from the *fusiontables* API at revision *20160317*. The CLI is at version *0.3.4*. ```bash fusiontables2 [options] diff --git a/gen/fusiontables2-cli/mkdocs.yml b/gen/fusiontables2-cli/mkdocs.yml index 6716184c6b..1cee51fcb8 100644 --- a/gen/fusiontables2-cli/mkdocs.yml +++ b/gen/fusiontables2-cli/mkdocs.yml @@ -1,4 +1,4 @@ -site_name: fusiontables v0.3.3+20160212 +site_name: fusiontables v0.3.4+20160317 site_url: http://byron.github.io/google-apis-rs/google-fusiontables2-cli site_description: Write integrating applications with bcore diff --git a/gen/fusiontables2-cli/src/cmn.rs b/gen/fusiontables2-cli/src/cmn.rs index 188159ee80..ae86fdef65 100644 --- a/gen/fusiontables2-cli/src/cmn.rs +++ b/gen/fusiontables2-cli/src/cmn.rs @@ -414,7 +414,7 @@ impl TokenStorage for JsonTokenStorage { Err(err) => match err.kind() { io::ErrorKind::NotFound => Ok(()), - _ => Err(json::Error::Io(err)) + _ => Err(json::Error::IoError(err)) }, Ok(_) => Ok(()), } @@ -427,7 +427,7 @@ impl TokenStorage for JsonTokenStorage { Err(serde_err) => Err(serde_err), } }, - Err(io_err) => Err(json::Error::Io(io_err)) + Err(io_err) => Err(json::Error::IoError(io_err)) } } } @@ -444,7 +444,7 @@ impl TokenStorage for JsonTokenStorage { Err(io_err) => { match io_err.kind() { io::ErrorKind::NotFound => Ok(None), - _ => Err(json::Error::Io(io_err)) + _ => Err(json::Error::IoError(io_err)) } } } @@ -683,7 +683,7 @@ pub fn application_secret_from_directory(dir: &str, = json::from_str(json_console_secret).unwrap(); match json::to_writer_pretty(&mut f, &console_secret) { Err(serde_err) => match serde_err { - json::Error::Io(err) => err, + json::Error::IoError(err) => err, _ => panic!("Unexpected serde error: {:#?}", serde_err) }, Ok(_) => continue, @@ -696,7 +696,7 @@ pub fn application_secret_from_directory(dir: &str, }, Ok(f) => { match json::de::from_reader::<_, ConsoleApplicationSecret>(f) { - Err(json::Error::Io(err)) => + Err(json::Error::IoError(err)) => return secret_io_error(err), Err(json_err) => return Err(CLIError::Configuration( diff --git a/gen/fusiontables2-cli/src/main.rs b/gen/fusiontables2-cli/src/main.rs index 67ee7b8ebc..e291a397f8 100644 --- a/gen/fusiontables2-cli/src/main.rs +++ b/gen/fusiontables2-cli/src/main.rs @@ -3585,7 +3585,7 @@ fn main() { let mut app = App::new("fusiontables2") .author("Sebastian Thiel ") - .version("0.3.3+20160212") + .version("0.3.4+20160317") .about("API for working with Fusion Tables data.") .after_help("All documentation details can be found at http://byron.github.io/google-apis-rs/google_fusiontables2_cli") .arg(Arg::with_name("url") diff --git a/gen/fusiontables2/Cargo.toml b/gen/fusiontables2/Cargo.toml index 831bf2e891..f6a062e337 100644 --- a/gen/fusiontables2/Cargo.toml +++ b/gen/fusiontables2/Cargo.toml @@ -4,7 +4,7 @@ [package] name = "google-fusiontables2" -version = "0.1.12+20160212" +version = "0.1.13+20160317" authors = ["Sebastian Thiel "] description = "A complete library to interact with fusiontables (protocol v2)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/fusiontables2" @@ -16,14 +16,14 @@ build = "src/build.rs" [dependencies] -hyper = "0.7" -mime = "0.1.0" -serde = ">= 0.7.0" -serde_json = ">= 0.7.0" -yup-oauth2 = ">= 0.5.4" +hyper = "0.8" +mime = "0.2.0" +serde = "0.6.0" +serde_json = "0.6.0" +yup-oauth2 = ">= 0.5.6" url = ">= 0.5" [build-dependencies] -syntex = { version = ">= 0.23" } -serde_codegen = { version = ">= 0.6" } +syntex = { version = "= 0.28" } +serde_codegen = { version = "= 0.6.13" } diff --git a/gen/fusiontables2/README.md b/gen/fusiontables2/README.md index 3b0c092bfb..fbb087d9b7 100644 --- a/gen/fusiontables2/README.md +++ b/gen/fusiontables2/README.md @@ -5,7 +5,7 @@ DO NOT EDIT ! --> The `google-fusiontables2` library allows access to all features of the *Google fusiontables* service. -This documentation was generated from *fusiontables* crate version *0.1.12+20160212*, where *20160212* is the exact revision of the *fusiontables:v2* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.12*. +This documentation was generated from *fusiontables* crate version *0.1.13+20160317*, where *20160317* is the exact revision of the *fusiontables:v2* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.13*. Everything else about the *fusiontables* *v2* API can be found at the [official documentation site](https://developers.google.com/fusiontables). diff --git a/gen/fusiontables2/src/cmn.rs b/gen/fusiontables2/src/cmn.rs index 87b91a8986..c69621da55 100644 --- a/gen/fusiontables2/src/cmn.rs +++ b/gen/fusiontables2/src/cmn.rs @@ -12,7 +12,7 @@ use mime::{Mime, TopLevel, SubLevel, Attr, Value}; use oauth2::{TokenType, Retry, self}; use hyper; use hyper::header::{ContentType, ContentLength, Headers, UserAgent, Authorization, Header, - HeaderFormat}; + HeaderFormat, Bearer}; use hyper::http::h1::LINE_ENDING; use hyper::method::Method; use hyper::status::StatusCode; @@ -634,7 +634,7 @@ pub struct ResumableUploadHelper<'a, A: 'a> { pub start_at: Option, pub auth: &'a mut A, pub user_agent: &'a str, - pub auth_header: Authorization, + pub auth_header: Authorization, pub url: &'a str, pub reader: &'a mut ReadSeek, pub media_type: Mime, diff --git a/gen/fusiontables2/src/lib.rs b/gen/fusiontables2/src/lib.rs index c0a8013e7a..7e4dd868b6 100644 --- a/gen/fusiontables2/src/lib.rs +++ b/gen/fusiontables2/src/lib.rs @@ -2,7 +2,7 @@ // This file was generated automatically from 'src/mako/api/lib.rs.mako' // DO NOT EDIT ! -//! This documentation was generated from *fusiontables* crate version *0.1.12+20160212*, where *20160212* is the exact revision of the *fusiontables:v2* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.12*. +//! This documentation was generated from *fusiontables* crate version *0.1.13+20160317*, where *20160317* is the exact revision of the *fusiontables:v2* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.13*. //! //! Everything else about the *fusiontables* *v2* API can be found at the //! [official documentation site](https://developers.google.com/fusiontables). diff --git a/gen/fusiontables2/src/lib.rs.in b/gen/fusiontables2/src/lib.rs.in index c30b8e0249..ec41e4905d 100644 --- a/gen/fusiontables2/src/lib.rs.in +++ b/gen/fusiontables2/src/lib.rs.in @@ -134,7 +134,7 @@ impl<'a, C, A> Fusiontables Fusiontables { client: RefCell::new(client), auth: RefCell::new(authenticator), - _user_agent: "google-api-rust-client/0.1.12".to_string(), + _user_agent: "google-api-rust-client/0.1.13".to_string(), } } @@ -158,7 +158,7 @@ impl<'a, C, A> Fusiontables } /// Set the user-agent header field to use in all requests to the server. - /// It defaults to `google-api-rust-client/0.1.12`. + /// It defaults to `google-api-rust-client/0.1.13`. /// /// Returns the previously set user-agent. pub fn user_agent(&mut self, agent_name: String) -> String { @@ -1695,7 +1695,7 @@ impl<'a, C, A> StyleListCall<'a, C, A> where C: BorrowMut, A: oau /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, StyleSettingList)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -1770,8 +1770,7 @@ impl<'a, C, A> StyleListCall<'a, C, A> where C: BorrowMut, A: oau } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -1959,7 +1958,7 @@ impl<'a, C, A> StyleUpdateCall<'a, C, A> where C: BorrowMut, A: o /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, StyleSetting)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -2040,8 +2039,7 @@ impl<'a, C, A> StyleUpdateCall<'a, C, A> where C: BorrowMut, A: o } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -2237,7 +2235,7 @@ impl<'a, C, A> StyleInsertCall<'a, C, A> where C: BorrowMut, A: o /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, StyleSetting)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -2317,8 +2315,7 @@ impl<'a, C, A> StyleInsertCall<'a, C, A> where C: BorrowMut, A: o } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -2498,7 +2495,7 @@ impl<'a, C, A> StyleGetCall<'a, C, A> where C: BorrowMut, A: oaut /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, StyleSetting)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -2568,8 +2565,7 @@ impl<'a, C, A> StyleGetCall<'a, C, A> where C: BorrowMut, A: oaut } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -2746,7 +2742,7 @@ impl<'a, C, A> StyleDeleteCall<'a, C, A> where C: BorrowMut, A: o /// Perform the operation you have build so far. pub fn doit(mut self) -> Result { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -2815,8 +2811,7 @@ impl<'a, C, A> StyleDeleteCall<'a, C, A> where C: BorrowMut, A: o } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Delete, &url) @@ -2990,7 +2985,7 @@ impl<'a, C, A> StylePatchCall<'a, C, A> where C: BorrowMut, A: oa /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, StyleSetting)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -3071,8 +3066,7 @@ impl<'a, C, A> StylePatchCall<'a, C, A> where C: BorrowMut, A: oa } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -3267,7 +3261,7 @@ impl<'a, C, A> TaskListCall<'a, C, A> where C: BorrowMut, A: oaut /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, TaskList)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -3345,8 +3339,7 @@ impl<'a, C, A> TaskListCall<'a, C, A> where C: BorrowMut, A: oaut } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -3534,7 +3527,7 @@ impl<'a, C, A> TaskDeleteCall<'a, C, A> where C: BorrowMut, A: oa /// Perform the operation you have build so far. pub fn doit(mut self) -> Result { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -3603,8 +3596,7 @@ impl<'a, C, A> TaskDeleteCall<'a, C, A> where C: BorrowMut, A: oa } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Delete, &url) @@ -3771,7 +3763,7 @@ impl<'a, C, A> TaskGetCall<'a, C, A> where C: BorrowMut, A: oauth /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Task)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -3841,8 +3833,7 @@ impl<'a, C, A> TaskGetCall<'a, C, A> where C: BorrowMut, A: oauth } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -4025,7 +4016,7 @@ impl<'a, C, A> ColumnInsertCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Column)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -4105,8 +4096,7 @@ impl<'a, C, A> ColumnInsertCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -4293,7 +4283,7 @@ impl<'a, C, A> ColumnUpdateCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Column)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -4374,8 +4364,7 @@ impl<'a, C, A> ColumnUpdateCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -4568,7 +4557,7 @@ impl<'a, C, A> ColumnListCall<'a, C, A> where C: BorrowMut, A: oa /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, ColumnList)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -4643,8 +4632,7 @@ impl<'a, C, A> ColumnListCall<'a, C, A> where C: BorrowMut, A: oa } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -4832,7 +4820,7 @@ impl<'a, C, A> ColumnPatchCall<'a, C, A> where C: BorrowMut, A: o /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Column)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -4913,8 +4901,7 @@ impl<'a, C, A> ColumnPatchCall<'a, C, A> where C: BorrowMut, A: o } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -5104,7 +5091,7 @@ impl<'a, C, A> ColumnDeleteCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -5173,8 +5160,7 @@ impl<'a, C, A> ColumnDeleteCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Delete, &url) @@ -5341,7 +5327,7 @@ impl<'a, C, A> ColumnGetCall<'a, C, A> where C: BorrowMut, A: oau /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Column)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -5411,8 +5397,7 @@ impl<'a, C, A> ColumnGetCall<'a, C, A> where C: BorrowMut, A: oau } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -5596,7 +5581,7 @@ impl<'a, C, A> TemplateUpdateCall<'a, C, A> where C: BorrowMut, A /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Template)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -5677,8 +5662,7 @@ impl<'a, C, A> TemplateUpdateCall<'a, C, A> where C: BorrowMut, A } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -5871,7 +5855,7 @@ impl<'a, C, A> TemplateListCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, TemplateList)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -5946,8 +5930,7 @@ impl<'a, C, A> TemplateListCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -6128,7 +6111,7 @@ impl<'a, C, A> TemplateDeleteCall<'a, C, A> where C: BorrowMut, A /// Perform the operation you have build so far. pub fn doit(mut self) -> Result { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -6197,8 +6180,7 @@ impl<'a, C, A> TemplateDeleteCall<'a, C, A> where C: BorrowMut, A } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Delete, &url) @@ -6371,7 +6353,7 @@ impl<'a, C, A> TemplateInsertCall<'a, C, A> where C: BorrowMut, A /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Template)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -6451,8 +6433,7 @@ impl<'a, C, A> TemplateInsertCall<'a, C, A> where C: BorrowMut, A } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -6639,7 +6620,7 @@ impl<'a, C, A> TemplatePatchCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Template)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -6720,8 +6701,7 @@ impl<'a, C, A> TemplatePatchCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -6911,7 +6891,7 @@ impl<'a, C, A> TemplateGetCall<'a, C, A> where C: BorrowMut, A: o /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Template)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -6981,8 +6961,7 @@ impl<'a, C, A> TemplateGetCall<'a, C, A> where C: BorrowMut, A: o } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -7170,7 +7149,7 @@ impl<'a, C, A> QuerySqlGetCall<'a, C, A> where C: BorrowMut, A: o /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Sqlresponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -7240,8 +7219,7 @@ impl<'a, C, A> QuerySqlGetCall<'a, C, A> where C: BorrowMut, A: o } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -7440,7 +7418,7 @@ impl<'a, C, A> QuerySqlCall<'a, C, A> where C: BorrowMut, A: oaut /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Sqlresponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -7510,8 +7488,7 @@ impl<'a, C, A> QuerySqlCall<'a, C, A> where C: BorrowMut, A: oaut } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Post, &url) @@ -7707,7 +7684,7 @@ impl<'a, C, A> TablePatchCall<'a, C, A> where C: BorrowMut, A: oa /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Table)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -7790,8 +7767,7 @@ impl<'a, C, A> TablePatchCall<'a, C, A> where C: BorrowMut, A: oa } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -7989,7 +7965,7 @@ impl<'a, C, A> TableReplaceRowCall<'a, C, A> where C: BorrowMut, fn doit(mut self, mut reader: RS, reader_mime_type: mime::Mime, protocol: &'static str) -> Result<(hyper::client::Response, Task)> where RS: ReadSeek { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -8084,8 +8060,7 @@ impl<'a, C, A> TableReplaceRowCall<'a, C, A> where C: BorrowMut, } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { if should_ask_dlg_for_url && (upload_url = dlg.upload_url()) == () && upload_url.is_some() { should_ask_dlg_for_url = false; @@ -8391,7 +8366,7 @@ impl<'a, C, A> TableUpdateCall<'a, C, A> where C: BorrowMut, A: o /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Table)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -8474,8 +8449,7 @@ impl<'a, C, A> TableUpdateCall<'a, C, A> where C: BorrowMut, A: o } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -8661,7 +8635,7 @@ impl<'a, C, A> TableDeleteCall<'a, C, A> where C: BorrowMut, A: o /// Perform the operation you have build so far. pub fn doit(mut self) -> Result { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -8729,8 +8703,7 @@ impl<'a, C, A> TableDeleteCall<'a, C, A> where C: BorrowMut, A: o } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Delete, &url) @@ -8892,7 +8865,7 @@ impl<'a, C, A> TableInsertCall<'a, C, A> where C: BorrowMut, A: o /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Table)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -8950,8 +8923,7 @@ impl<'a, C, A> TableInsertCall<'a, C, A> where C: BorrowMut, A: o } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -9120,7 +9092,7 @@ impl<'a, C, A> TableGetCall<'a, C, A> where C: BorrowMut, A: oaut /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Table)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -9189,8 +9161,7 @@ impl<'a, C, A> TableGetCall<'a, C, A> where C: BorrowMut, A: oaut } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -9359,7 +9330,7 @@ impl<'a, C, A> TableListCall<'a, C, A> where C: BorrowMut, A: oau /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, TableList)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -9412,8 +9383,7 @@ impl<'a, C, A> TableListCall<'a, C, A> where C: BorrowMut, A: oau } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -9595,7 +9565,7 @@ impl<'a, C, A> TableImportRowCall<'a, C, A> where C: BorrowMut, A fn doit(mut self, mut reader: RS, reader_mime_type: mime::Mime, protocol: &'static str) -> Result<(hyper::client::Response, Import)> where RS: ReadSeek { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -9690,8 +9660,7 @@ impl<'a, C, A> TableImportRowCall<'a, C, A> where C: BorrowMut, A } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { if should_ask_dlg_for_url && (upload_url = dlg.upload_url()) == () && upload_url.is_some() { should_ask_dlg_for_url = false; @@ -9994,7 +9963,7 @@ impl<'a, C, A> TableImportTableCall<'a, C, A> where C: BorrowMut, fn doit(mut self, mut reader: RS, reader_mime_type: mime::Mime, protocol: &'static str) -> Result<(hyper::client::Response, Table)> where RS: ReadSeek { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -10059,8 +10028,7 @@ impl<'a, C, A> TableImportTableCall<'a, C, A> where C: BorrowMut, } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { if should_ask_dlg_for_url && (upload_url = dlg.upload_url()) == () && upload_url.is_some() { should_ask_dlg_for_url = false; @@ -10338,7 +10306,7 @@ impl<'a, C, A> TableCopyCall<'a, C, A> where C: BorrowMut, A: oau /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Table)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -10410,8 +10378,7 @@ impl<'a, C, A> TableCopyCall<'a, C, A> where C: BorrowMut, A: oau } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Post, &url) diff --git a/gen/games1-cli/Cargo.toml b/gen/games1-cli/Cargo.toml index c3d9f4f804..02d9dc2fa0 100644 --- a/gen/games1-cli/Cargo.toml +++ b/gen/games1-cli/Cargo.toml @@ -4,7 +4,7 @@ [package] name = "google-games1-cli" -version = "0.3.3+20160224" +version = "0.3.4+20160401" authors = ["Sebastian Thiel "] description = "A complete library to interact with Games (protocol v1)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/games1-cli" @@ -17,18 +17,18 @@ keywords = ["games", "google", "cli"] name = "games1" [dependencies] -hyper = "0.7" -mime = "0.1.0" -serde = ">= 0.7.0" -serde_json = ">= 0.7.0" -yup-oauth2 = ">= 0.5.4" +hyper = "0.8" +mime = "0.2.0" +serde = "0.6.0" +serde_json = "0.6.0" +yup-oauth2 = ">= 0.5.6" strsim = "0.4" yup-hyper-mock = "1.0" clap = "2.0" [build-dependencies] -syntex = { version = ">= 0.23" } -serde_codegen = { version = ">= 0.6" } +syntex = { version = "= 0.28" } +serde_codegen = { version = "= 0.6.13" } [dependencies.google-games1] diff --git a/gen/games1-cli/README.md b/gen/games1-cli/README.md index 3386df84dd..8c11d40c02 100644 --- a/gen/games1-cli/README.md +++ b/gen/games1-cli/README.md @@ -17,14 +17,14 @@ Everything else about the *Games* API can be found at the You can download the pre-compiled 64bit binaries for the following platforms: -* ![icon](http://megaicons.net/static/img/icons_sizes/6/140/16/ubuntu-icon.png) [ubuntu](http://dl.byronimo.de/google.rs/cli/0.3.3/ubuntu/games1.tar.gz) -* ![icon](http://hydra-media.cursecdn.com/wow.gamepedia.com/a/a2/Apple-icon-16x16.png?version=25ddd67ac3dd3b634478e3978b76cb74) [osx](http://dl.byronimo.de/google.rs/cli/0.3.3/osx/games1.tar.gz) +* ![icon](http://megaicons.net/static/img/icons_sizes/6/140/16/ubuntu-icon.png) [ubuntu](http://dl.byronimo.de/google.rs/cli/0.3.4/ubuntu/games1.tar.gz) +* ![icon](http://hydra-media.cursecdn.com/wow.gamepedia.com/a/a2/Apple-icon-16x16.png?version=25ddd67ac3dd3b634478e3978b76cb74) [osx](http://dl.byronimo.de/google.rs/cli/0.3.4/osx/games1.tar.gz) Find the source code [on github](https://github.com/Byron/google-apis-rs/tree/master/gen/games1-cli). # Usage -This documentation was generated from the *Games* API at revision *20160224*. The CLI is at version *0.3.3*. +This documentation was generated from the *Games* API at revision *20160401*. The CLI is at version *0.3.4*. ```bash games1 [options] diff --git a/gen/games1-cli/mkdocs.yml b/gen/games1-cli/mkdocs.yml index f41caa5e4d..f68f75a6a1 100644 --- a/gen/games1-cli/mkdocs.yml +++ b/gen/games1-cli/mkdocs.yml @@ -1,4 +1,4 @@ -site_name: Games v0.3.3+20160224 +site_name: Games v0.3.4+20160401 site_url: http://byron.github.io/google-apis-rs/google-games1-cli site_description: Write integrating applications with bcore diff --git a/gen/games1-cli/src/cmn.rs b/gen/games1-cli/src/cmn.rs index 188159ee80..ae86fdef65 100644 --- a/gen/games1-cli/src/cmn.rs +++ b/gen/games1-cli/src/cmn.rs @@ -414,7 +414,7 @@ impl TokenStorage for JsonTokenStorage { Err(err) => match err.kind() { io::ErrorKind::NotFound => Ok(()), - _ => Err(json::Error::Io(err)) + _ => Err(json::Error::IoError(err)) }, Ok(_) => Ok(()), } @@ -427,7 +427,7 @@ impl TokenStorage for JsonTokenStorage { Err(serde_err) => Err(serde_err), } }, - Err(io_err) => Err(json::Error::Io(io_err)) + Err(io_err) => Err(json::Error::IoError(io_err)) } } } @@ -444,7 +444,7 @@ impl TokenStorage for JsonTokenStorage { Err(io_err) => { match io_err.kind() { io::ErrorKind::NotFound => Ok(None), - _ => Err(json::Error::Io(io_err)) + _ => Err(json::Error::IoError(io_err)) } } } @@ -683,7 +683,7 @@ pub fn application_secret_from_directory(dir: &str, = json::from_str(json_console_secret).unwrap(); match json::to_writer_pretty(&mut f, &console_secret) { Err(serde_err) => match serde_err { - json::Error::Io(err) => err, + json::Error::IoError(err) => err, _ => panic!("Unexpected serde error: {:#?}", serde_err) }, Ok(_) => continue, @@ -696,7 +696,7 @@ pub fn application_secret_from_directory(dir: &str, }, Ok(f) => { match json::de::from_reader::<_, ConsoleApplicationSecret>(f) { - Err(json::Error::Io(err)) => + Err(json::Error::IoError(err)) => return secret_io_error(err), Err(json_err) => return Err(CLIError::Configuration( diff --git a/gen/games1-cli/src/main.rs b/gen/games1-cli/src/main.rs index 603dc51a52..0fa3ea21b2 100644 --- a/gen/games1-cli/src/main.rs +++ b/gen/games1-cli/src/main.rs @@ -5086,7 +5086,7 @@ fn main() { let mut app = App::new("games1") .author("Sebastian Thiel ") - .version("0.3.3+20160224") + .version("0.3.4+20160401") .about("The API for Google Play Game Services.") .after_help("All documentation details can be found at http://byron.github.io/google-apis-rs/google_games1_cli") .arg(Arg::with_name("url") diff --git a/gen/games1/Cargo.toml b/gen/games1/Cargo.toml index 6c806dc598..0b6fb19398 100644 --- a/gen/games1/Cargo.toml +++ b/gen/games1/Cargo.toml @@ -4,7 +4,7 @@ [package] name = "google-games1" -version = "0.1.12+20160224" +version = "0.1.13+20160401" authors = ["Sebastian Thiel "] description = "A complete library to interact with Games (protocol v1)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/games1" @@ -16,14 +16,14 @@ build = "src/build.rs" [dependencies] -hyper = "0.7" -mime = "0.1.0" -serde = ">= 0.7.0" -serde_json = ">= 0.7.0" -yup-oauth2 = ">= 0.5.4" +hyper = "0.8" +mime = "0.2.0" +serde = "0.6.0" +serde_json = "0.6.0" +yup-oauth2 = ">= 0.5.6" url = ">= 0.5" [build-dependencies] -syntex = { version = ">= 0.23" } -serde_codegen = { version = ">= 0.6" } +syntex = { version = "= 0.28" } +serde_codegen = { version = "= 0.6.13" } diff --git a/gen/games1/README.md b/gen/games1/README.md index c679f55600..6c03ec5bc8 100644 --- a/gen/games1/README.md +++ b/gen/games1/README.md @@ -5,7 +5,7 @@ DO NOT EDIT ! --> The `google-games1` library allows access to all features of the *Google Games* service. -This documentation was generated from *Games* crate version *0.1.12+20160224*, where *20160224* is the exact revision of the *games:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.12*. +This documentation was generated from *Games* crate version *0.1.13+20160401*, where *20160401* is the exact revision of the *games:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.13*. Everything else about the *Games* *v1* API can be found at the [official documentation site](https://developers.google.com/games/services/). diff --git a/gen/games1/src/cmn.rs b/gen/games1/src/cmn.rs index 87b91a8986..c69621da55 100644 --- a/gen/games1/src/cmn.rs +++ b/gen/games1/src/cmn.rs @@ -12,7 +12,7 @@ use mime::{Mime, TopLevel, SubLevel, Attr, Value}; use oauth2::{TokenType, Retry, self}; use hyper; use hyper::header::{ContentType, ContentLength, Headers, UserAgent, Authorization, Header, - HeaderFormat}; + HeaderFormat, Bearer}; use hyper::http::h1::LINE_ENDING; use hyper::method::Method; use hyper::status::StatusCode; @@ -634,7 +634,7 @@ pub struct ResumableUploadHelper<'a, A: 'a> { pub start_at: Option, pub auth: &'a mut A, pub user_agent: &'a str, - pub auth_header: Authorization, + pub auth_header: Authorization, pub url: &'a str, pub reader: &'a mut ReadSeek, pub media_type: Mime, diff --git a/gen/games1/src/lib.rs b/gen/games1/src/lib.rs index b6b712ff4c..13752cc725 100644 --- a/gen/games1/src/lib.rs +++ b/gen/games1/src/lib.rs @@ -2,7 +2,7 @@ // This file was generated automatically from 'src/mako/api/lib.rs.mako' // DO NOT EDIT ! -//! This documentation was generated from *Games* crate version *0.1.12+20160224*, where *20160224* is the exact revision of the *games:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.12*. +//! This documentation was generated from *Games* crate version *0.1.13+20160401*, where *20160401* is the exact revision of the *games:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.13*. //! //! Everything else about the *Games* *v1* API can be found at the //! [official documentation site](https://developers.google.com/games/services/). diff --git a/gen/games1/src/lib.rs.in b/gen/games1/src/lib.rs.in index 3b0d8ef50f..cc30f03b93 100644 --- a/gen/games1/src/lib.rs.in +++ b/gen/games1/src/lib.rs.in @@ -137,7 +137,7 @@ impl<'a, C, A> Games Games { client: RefCell::new(client), auth: RefCell::new(authenticator), - _user_agent: "google-api-rust-client/0.1.12".to_string(), + _user_agent: "google-api-rust-client/0.1.13".to_string(), } } @@ -188,7 +188,7 @@ impl<'a, C, A> Games } /// Set the user-agent header field to use in all requests to the server. - /// It defaults to `google-api-rust-client/0.1.12`. + /// It defaults to `google-api-rust-client/0.1.13`. /// /// Returns the previously set user-agent. pub fn user_agent(&mut self, agent_name: String) -> String { @@ -679,7 +679,7 @@ pub struct AchievementIncrementResponse { /// The current steps recorded for this incremental achievement. #[serde(rename="currentSteps")] pub current_steps: Option, - /// Whether the the current steps for the achievement has reached the number of steps required to unlock. + /// Whether the current steps for the achievement has reached the number of steps required to unlock. #[serde(rename="newlyUnlocked")] pub newly_unlocked: Option, /// Uniquely identifies the type of this resource. Value is always the fixed string games#achievementIncrementResponse. @@ -919,6 +919,8 @@ pub struct ApplicationVerifyResponse { pub player_id: Option, /// Uniquely identifies the type of this resource. Value is always the fixed string games#applicationVerifyResponse. pub kind: Option, + /// An alternate ID that was once used for the player that was issued the auth token used in this request. (This field is not normally populated.) + pub alternate_player_id: Option, } impl ResponseResult for ApplicationVerifyResponse {} @@ -4587,7 +4589,7 @@ impl<'a, C, A> AchievementListCall<'a, C, A> where C: BorrowMut, /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, PlayerAchievementListResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -4668,8 +4670,7 @@ impl<'a, C, A> AchievementListCall<'a, C, A> where C: BorrowMut, } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -4866,7 +4867,7 @@ impl<'a, C, A> AchievementIncrementCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, AchievementIncrementResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -4939,8 +4940,7 @@ impl<'a, C, A> AchievementIncrementCall<'a, C, A> where C: BorrowMut AchievementSetStepsAtLeastCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, AchievementSetStepsAtLeastResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -5194,8 +5194,7 @@ impl<'a, C, A> AchievementSetStepsAtLeastCall<'a, C, A> where C: BorrowMut AchievementUpdateMultipleCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, AchievementUpdateMultipleResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -5435,8 +5434,7 @@ impl<'a, C, A> AchievementUpdateMultipleCall<'a, C, A> where C: BorrowMut AchievementRevealCall<'a, C, A> where C: BorrowMut /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, AchievementRevealResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -5674,8 +5672,7 @@ impl<'a, C, A> AchievementRevealCall<'a, C, A> where C: BorrowMut } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Post, &url) @@ -5841,7 +5838,7 @@ impl<'a, C, A> AchievementUnlockCall<'a, C, A> where C: BorrowMut /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, AchievementUnlockResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -5910,8 +5907,7 @@ impl<'a, C, A> AchievementUnlockCall<'a, C, A> where C: BorrowMut } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Post, &url) @@ -6079,7 +6075,7 @@ impl<'a, C, A> LeaderboardGetCall<'a, C, A> where C: BorrowMut, A /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Leaderboard)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -6151,8 +6147,7 @@ impl<'a, C, A> LeaderboardGetCall<'a, C, A> where C: BorrowMut, A } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -6330,7 +6325,7 @@ impl<'a, C, A> LeaderboardListCall<'a, C, A> where C: BorrowMut, /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, LeaderboardListResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -6386,8 +6381,7 @@ impl<'a, C, A> LeaderboardListCall<'a, C, A> where C: BorrowMut, } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -6571,7 +6565,7 @@ impl<'a, C, A> MetagameListCategoriesByPlayerCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, CategoryListResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -6650,8 +6644,7 @@ impl<'a, C, A> MetagameListCategoriesByPlayerCall<'a, C, A> where C: BorrowMut MetagameGetMetagameConfigCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, MetagameConfig)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -6894,8 +6887,7 @@ impl<'a, C, A> MetagameGetMetagameConfigCall<'a, C, A> where C: BorrowMut PlayerListCall<'a, C, A> where C: BorrowMut, A: oa /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, PlayerListResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -7135,8 +7127,7 @@ impl<'a, C, A> PlayerListCall<'a, C, A> where C: BorrowMut, A: oa } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -7325,7 +7316,7 @@ impl<'a, C, A> PlayerGetCall<'a, C, A> where C: BorrowMut, A: oau /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Player)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -7397,8 +7388,7 @@ impl<'a, C, A> PlayerGetCall<'a, C, A> where C: BorrowMut, A: oau } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -7573,7 +7563,7 @@ impl<'a, C, A> QuestAcceptCall<'a, C, A> where C: BorrowMut, A: o /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Quest)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -7645,8 +7635,7 @@ impl<'a, C, A> QuestAcceptCall<'a, C, A> where C: BorrowMut, A: o } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Post, &url) @@ -7825,7 +7814,7 @@ impl<'a, C, A> QuestListCall<'a, C, A> where C: BorrowMut, A: oau /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, QuestListResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -7903,8 +7892,7 @@ impl<'a, C, A> QuestListCall<'a, C, A> where C: BorrowMut, A: oau } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -8093,7 +8081,7 @@ impl<'a, C, A> SnapshotGetCall<'a, C, A> where C: BorrowMut, A: o /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Snapshot)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -8165,8 +8153,7 @@ impl<'a, C, A> SnapshotGetCall<'a, C, A> where C: BorrowMut, A: o } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -8345,7 +8332,7 @@ impl<'a, C, A> SnapshotListCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, SnapshotListResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -8423,8 +8410,7 @@ impl<'a, C, A> SnapshotListCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -8611,7 +8597,7 @@ impl<'a, C, A> TurnBasedMatcheDismisCall<'a, C, A> where C: BorrowMut Result { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -8679,8 +8665,7 @@ impl<'a, C, A> TurnBasedMatcheDismisCall<'a, C, A> where C: BorrowMut TurnBasedMatcheSyncCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, TurnBasedMatchSync)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -8907,8 +8892,7 @@ impl<'a, C, A> TurnBasedMatcheSyncCall<'a, C, A> where C: BorrowMut TurnBasedMatcheDeclineCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, TurnBasedMatch)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -9173,8 +9157,7 @@ impl<'a, C, A> TurnBasedMatcheDeclineCall<'a, C, A> where C: BorrowMut TurnBasedMatcheGetCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, TurnBasedMatch)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -9426,8 +9409,7 @@ impl<'a, C, A> TurnBasedMatcheGetCall<'a, C, A> where C: BorrowMut TurnBasedMatcheCreateCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, TurnBasedMatch)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -9676,8 +9658,7 @@ impl<'a, C, A> TurnBasedMatcheCreateCall<'a, C, A> where C: BorrowMut TurnBasedMatcheJoinCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, TurnBasedMatch)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -9927,8 +9908,7 @@ impl<'a, C, A> TurnBasedMatcheJoinCall<'a, C, A> where C: BorrowMut TurnBasedMatcheLeaveTurnCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, TurnBasedMatch)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -10182,8 +10162,7 @@ impl<'a, C, A> TurnBasedMatcheLeaveTurnCall<'a, C, A> where C: BorrowMut TurnBasedMatcheCancelCall<'a, C, A> where C: BorrowMut Result { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -10441,8 +10420,7 @@ impl<'a, C, A> TurnBasedMatcheCancelCall<'a, C, A> where C: BorrowMut TurnBasedMatcheFinishCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, TurnBasedMatch)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -10690,8 +10668,7 @@ impl<'a, C, A> TurnBasedMatcheFinishCall<'a, C, A> where C: BorrowMut TurnBasedMatcheLeaveCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, TurnBasedMatch)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -10951,8 +10928,7 @@ impl<'a, C, A> TurnBasedMatcheLeaveCall<'a, C, A> where C: BorrowMut TurnBasedMatcheListCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, TurnBasedMatchList)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -11196,8 +11172,7 @@ impl<'a, C, A> TurnBasedMatcheListCall<'a, C, A> where C: BorrowMut TurnBasedMatcheTakeTurnCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, TurnBasedMatch)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -11480,8 +11455,7 @@ impl<'a, C, A> TurnBasedMatcheTakeTurnCall<'a, C, A> where C: BorrowMut TurnBasedMatcheRematchCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, TurnBasedMatchRematch)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -11746,8 +11720,7 @@ impl<'a, C, A> TurnBasedMatcheRematchCall<'a, C, A> where C: BorrowMut ApplicationVerifyCall<'a, C, A> where C: BorrowMut /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, ApplicationVerifyResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -11996,8 +11969,7 @@ impl<'a, C, A> ApplicationVerifyCall<'a, C, A> where C: BorrowMut } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -12167,7 +12139,7 @@ impl<'a, C, A> ApplicationGetCall<'a, C, A> where C: BorrowMut, A /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Application)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -12242,8 +12214,7 @@ impl<'a, C, A> ApplicationGetCall<'a, C, A> where C: BorrowMut, A } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -12422,7 +12393,7 @@ impl<'a, C, A> ApplicationPlayedCall<'a, C, A> where C: BorrowMut /// Perform the operation you have build so far. pub fn doit(mut self) -> Result { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -12468,8 +12439,7 @@ impl<'a, C, A> ApplicationPlayedCall<'a, C, A> where C: BorrowMut } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Post, &url) @@ -12617,7 +12587,7 @@ impl<'a, C, A> RoomGetCall<'a, C, A> where C: BorrowMut, A: oauth /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Room)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -12689,8 +12659,7 @@ impl<'a, C, A> RoomGetCall<'a, C, A> where C: BorrowMut, A: oauth } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -12872,7 +12841,7 @@ impl<'a, C, A> RoomLeaveCall<'a, C, A> where C: BorrowMut, A: oau /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Room)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -12955,8 +12924,7 @@ impl<'a, C, A> RoomLeaveCall<'a, C, A> where C: BorrowMut, A: oau } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -13147,7 +13115,7 @@ impl<'a, C, A> RoomListCall<'a, C, A> where C: BorrowMut, A: oaut /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, RoomList)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -13203,8 +13171,7 @@ impl<'a, C, A> RoomListCall<'a, C, A> where C: BorrowMut, A: oaut } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -13390,7 +13357,7 @@ impl<'a, C, A> RoomReportStatuCall<'a, C, A> where C: BorrowMut, /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, RoomStatus)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -13473,8 +13440,7 @@ impl<'a, C, A> RoomReportStatuCall<'a, C, A> where C: BorrowMut, } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -13668,7 +13634,7 @@ impl<'a, C, A> RoomCreateCall<'a, C, A> where C: BorrowMut, A: oa /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Room)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -13729,8 +13695,7 @@ impl<'a, C, A> RoomCreateCall<'a, C, A> where C: BorrowMut, A: oa } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -13908,7 +13873,7 @@ impl<'a, C, A> RoomDeclineCall<'a, C, A> where C: BorrowMut, A: o /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Room)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -13980,8 +13945,7 @@ impl<'a, C, A> RoomDeclineCall<'a, C, A> where C: BorrowMut, A: o } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Post, &url) @@ -14154,7 +14118,7 @@ impl<'a, C, A> RoomDismisCall<'a, C, A> where C: BorrowMut, A: oa /// Perform the operation you have build so far. pub fn doit(mut self) -> Result { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -14222,8 +14186,7 @@ impl<'a, C, A> RoomDismisCall<'a, C, A> where C: BorrowMut, A: oa } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Post, &url) @@ -14388,7 +14351,7 @@ impl<'a, C, A> RoomJoinCall<'a, C, A> where C: BorrowMut, A: oaut /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Room)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -14471,8 +14434,7 @@ impl<'a, C, A> RoomJoinCall<'a, C, A> where C: BorrowMut, A: oaut } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -14663,7 +14625,7 @@ impl<'a, C, A> ScoreSubmitCall<'a, C, A> where C: BorrowMut, A: o /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, PlayerScoreResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -14739,8 +14701,7 @@ impl<'a, C, A> ScoreSubmitCall<'a, C, A> where C: BorrowMut, A: o } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Post, &url) @@ -14938,7 +14899,7 @@ impl<'a, C, A> ScoreListCall<'a, C, A> where C: BorrowMut, A: oau /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, LeaderboardScores)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -15018,8 +14979,7 @@ impl<'a, C, A> ScoreListCall<'a, C, A> where C: BorrowMut, A: oau } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -15237,7 +15197,7 @@ impl<'a, C, A> ScoreGetCall<'a, C, A> where C: BorrowMut, A: oaut /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, PlayerLeaderboardScoreListResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -15320,8 +15280,7 @@ impl<'a, C, A> ScoreGetCall<'a, C, A> where C: BorrowMut, A: oaut } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -15543,7 +15502,7 @@ impl<'a, C, A> ScoreSubmitMultipleCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, PlayerScoreListResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -15604,8 +15563,7 @@ impl<'a, C, A> ScoreSubmitMultipleCall<'a, C, A> where C: BorrowMut ScoreListWindowCall<'a, C, A> where C: BorrowMut, /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, LeaderboardScores)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -15879,8 +15837,7 @@ impl<'a, C, A> ScoreListWindowCall<'a, C, A> where C: BorrowMut, } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -16107,7 +16064,7 @@ impl<'a, C, A> PushtokenRemoveCall<'a, C, A> where C: BorrowMut, /// Perform the operation you have build so far. pub fn doit(mut self) -> Result { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -16164,8 +16121,7 @@ impl<'a, C, A> PushtokenRemoveCall<'a, C, A> where C: BorrowMut, } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -16330,7 +16286,7 @@ impl<'a, C, A> PushtokenUpdateCall<'a, C, A> where C: BorrowMut, /// Perform the operation you have build so far. pub fn doit(mut self) -> Result { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -16387,8 +16343,7 @@ impl<'a, C, A> PushtokenUpdateCall<'a, C, A> where C: BorrowMut, } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -16547,7 +16502,7 @@ impl<'a, C, A> RevisionCheckCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, RevisionCheckResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -16595,8 +16550,7 @@ impl<'a, C, A> RevisionCheckCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -16772,7 +16726,7 @@ impl<'a, C, A> EventListDefinitionCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, EventDefinitionListResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -16828,8 +16782,7 @@ impl<'a, C, A> EventListDefinitionCall<'a, C, A> where C: BorrowMut EventRecordCall<'a, C, A> where C: BorrowMut, A: o /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, EventUpdateResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -17075,8 +17028,7 @@ impl<'a, C, A> EventRecordCall<'a, C, A> where C: BorrowMut, A: o } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -17257,7 +17209,7 @@ impl<'a, C, A> EventListByPlayerCall<'a, C, A> where C: BorrowMut /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, PlayerEventListResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -17313,8 +17265,7 @@ impl<'a, C, A> EventListByPlayerCall<'a, C, A> where C: BorrowMut } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -17493,7 +17444,7 @@ impl<'a, C, A> QuestMilestoneClaimCall<'a, C, A> where C: BorrowMut Result { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -17563,8 +17514,7 @@ impl<'a, C, A> QuestMilestoneClaimCall<'a, C, A> where C: BorrowMut AchievementDefinitionListCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, AchievementDefinitionsListResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -17801,8 +17751,7 @@ impl<'a, C, A> AchievementDefinitionListCall<'a, C, A> where C: BorrowMut"] description = "A complete library to interact with Games Configuration (protocol v1configuration)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/gamesconfiguration1_configuration-cli" @@ -17,18 +17,18 @@ keywords = ["gamesConfiguration", "google", "cli"] name = "gamesconfiguration1-configuration" [dependencies] -hyper = "0.7" -mime = "0.1.0" -serde = ">= 0.7.0" -serde_json = ">= 0.7.0" -yup-oauth2 = ">= 0.5.4" +hyper = "0.8" +mime = "0.2.0" +serde = "0.6.0" +serde_json = "0.6.0" +yup-oauth2 = ">= 0.5.6" strsim = "0.4" yup-hyper-mock = "1.0" clap = "2.0" [build-dependencies] -syntex = { version = ">= 0.23" } -serde_codegen = { version = ">= 0.6" } +syntex = { version = "= 0.28" } +serde_codegen = { version = "= 0.6.13" } [dependencies.google-gamesconfiguration1_configuration] diff --git a/gen/gamesconfiguration1_configuration-cli/README.md b/gen/gamesconfiguration1_configuration-cli/README.md index 12e9b651bd..44ba8fd65d 100644 --- a/gen/gamesconfiguration1_configuration-cli/README.md +++ b/gen/gamesconfiguration1_configuration-cli/README.md @@ -17,14 +17,14 @@ Everything else about the *Games Configuration* API can be found at the You can download the pre-compiled 64bit binaries for the following platforms: -* ![icon](http://megaicons.net/static/img/icons_sizes/6/140/16/ubuntu-icon.png) [ubuntu](http://dl.byronimo.de/google.rs/cli/0.3.3/ubuntu/gamesconfiguration1-configuration.tar.gz) -* ![icon](http://hydra-media.cursecdn.com/wow.gamepedia.com/a/a2/Apple-icon-16x16.png?version=25ddd67ac3dd3b634478e3978b76cb74) [osx](http://dl.byronimo.de/google.rs/cli/0.3.3/osx/gamesconfiguration1-configuration.tar.gz) +* ![icon](http://megaicons.net/static/img/icons_sizes/6/140/16/ubuntu-icon.png) [ubuntu](http://dl.byronimo.de/google.rs/cli/0.3.4/ubuntu/gamesconfiguration1-configuration.tar.gz) +* ![icon](http://hydra-media.cursecdn.com/wow.gamepedia.com/a/a2/Apple-icon-16x16.png?version=25ddd67ac3dd3b634478e3978b76cb74) [osx](http://dl.byronimo.de/google.rs/cli/0.3.4/osx/gamesconfiguration1-configuration.tar.gz) Find the source code [on github](https://github.com/Byron/google-apis-rs/tree/master/gen/gamesconfiguration1_configuration-cli). # Usage -This documentation was generated from the *Games Configuration* API at revision *20160224*. The CLI is at version *0.3.3*. +This documentation was generated from the *Games Configuration* API at revision *20160401*. The CLI is at version *0.3.4*. ```bash gamesconfiguration1-configuration [options] diff --git a/gen/gamesconfiguration1_configuration-cli/mkdocs.yml b/gen/gamesconfiguration1_configuration-cli/mkdocs.yml index 4f9530f20b..1049f98149 100644 --- a/gen/gamesconfiguration1_configuration-cli/mkdocs.yml +++ b/gen/gamesconfiguration1_configuration-cli/mkdocs.yml @@ -1,4 +1,4 @@ -site_name: Games Configuration v0.3.3+20160224 +site_name: Games Configuration v0.3.4+20160401 site_url: http://byron.github.io/google-apis-rs/google-gamesconfiguration1_configuration-cli site_description: Write integrating applications with bcore diff --git a/gen/gamesconfiguration1_configuration-cli/src/cmn.rs b/gen/gamesconfiguration1_configuration-cli/src/cmn.rs index 188159ee80..ae86fdef65 100644 --- a/gen/gamesconfiguration1_configuration-cli/src/cmn.rs +++ b/gen/gamesconfiguration1_configuration-cli/src/cmn.rs @@ -414,7 +414,7 @@ impl TokenStorage for JsonTokenStorage { Err(err) => match err.kind() { io::ErrorKind::NotFound => Ok(()), - _ => Err(json::Error::Io(err)) + _ => Err(json::Error::IoError(err)) }, Ok(_) => Ok(()), } @@ -427,7 +427,7 @@ impl TokenStorage for JsonTokenStorage { Err(serde_err) => Err(serde_err), } }, - Err(io_err) => Err(json::Error::Io(io_err)) + Err(io_err) => Err(json::Error::IoError(io_err)) } } } @@ -444,7 +444,7 @@ impl TokenStorage for JsonTokenStorage { Err(io_err) => { match io_err.kind() { io::ErrorKind::NotFound => Ok(None), - _ => Err(json::Error::Io(io_err)) + _ => Err(json::Error::IoError(io_err)) } } } @@ -683,7 +683,7 @@ pub fn application_secret_from_directory(dir: &str, = json::from_str(json_console_secret).unwrap(); match json::to_writer_pretty(&mut f, &console_secret) { Err(serde_err) => match serde_err { - json::Error::Io(err) => err, + json::Error::IoError(err) => err, _ => panic!("Unexpected serde error: {:#?}", serde_err) }, Ok(_) => continue, @@ -696,7 +696,7 @@ pub fn application_secret_from_directory(dir: &str, }, Ok(f) => { match json::de::from_reader::<_, ConsoleApplicationSecret>(f) { - Err(json::Error::Io(err)) => + Err(json::Error::IoError(err)) => return secret_io_error(err), Err(json_err) => return Err(CLIError::Configuration( diff --git a/gen/gamesconfiguration1_configuration-cli/src/main.rs b/gen/gamesconfiguration1_configuration-cli/src/main.rs index c2271befaa..96dc84facc 100644 --- a/gen/gamesconfiguration1_configuration-cli/src/main.rs +++ b/gen/gamesconfiguration1_configuration-cli/src/main.rs @@ -1551,7 +1551,7 @@ fn main() { let mut app = App::new("gamesconfiguration1-configuration") .author("Sebastian Thiel ") - .version("0.3.3+20160224") + .version("0.3.4+20160401") .about("The Publishing API for Google Play Game Services.") .after_help("All documentation details can be found at http://byron.github.io/google-apis-rs/google_gamesconfiguration1_configuration_cli") .arg(Arg::with_name("url") diff --git a/gen/gamesconfiguration1_configuration/Cargo.toml b/gen/gamesconfiguration1_configuration/Cargo.toml index 904a369fde..b591f5b738 100644 --- a/gen/gamesconfiguration1_configuration/Cargo.toml +++ b/gen/gamesconfiguration1_configuration/Cargo.toml @@ -4,7 +4,7 @@ [package] name = "google-gamesconfiguration1_configuration" -version = "0.1.12+20160224" +version = "0.1.13+20160401" authors = ["Sebastian Thiel "] description = "A complete library to interact with Games Configuration (protocol v1configuration)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/gamesconfiguration1_configuration" @@ -16,14 +16,14 @@ build = "src/build.rs" [dependencies] -hyper = "0.7" -mime = "0.1.0" -serde = ">= 0.7.0" -serde_json = ">= 0.7.0" -yup-oauth2 = ">= 0.5.4" +hyper = "0.8" +mime = "0.2.0" +serde = "0.6.0" +serde_json = "0.6.0" +yup-oauth2 = ">= 0.5.6" url = ">= 0.5" [build-dependencies] -syntex = { version = ">= 0.23" } -serde_codegen = { version = ">= 0.6" } +syntex = { version = "= 0.28" } +serde_codegen = { version = "= 0.6.13" } diff --git a/gen/gamesconfiguration1_configuration/README.md b/gen/gamesconfiguration1_configuration/README.md index eb7f26cbee..f21629e04d 100644 --- a/gen/gamesconfiguration1_configuration/README.md +++ b/gen/gamesconfiguration1_configuration/README.md @@ -5,7 +5,7 @@ DO NOT EDIT ! --> The `google-gamesconfiguration1_configuration` library allows access to all features of the *Google Games Configuration* service. -This documentation was generated from *Games Configuration* crate version *0.1.12+20160224*, where *20160224* is the exact revision of the *gamesConfiguration:v1configuration* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.12*. +This documentation was generated from *Games Configuration* crate version *0.1.13+20160401*, where *20160401* is the exact revision of the *gamesConfiguration:v1configuration* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.13*. Everything else about the *Games Configuration* *v1_configuration* API can be found at the [official documentation site](https://developers.google.com/games/services). diff --git a/gen/gamesconfiguration1_configuration/src/cmn.rs b/gen/gamesconfiguration1_configuration/src/cmn.rs index 87b91a8986..c69621da55 100644 --- a/gen/gamesconfiguration1_configuration/src/cmn.rs +++ b/gen/gamesconfiguration1_configuration/src/cmn.rs @@ -12,7 +12,7 @@ use mime::{Mime, TopLevel, SubLevel, Attr, Value}; use oauth2::{TokenType, Retry, self}; use hyper; use hyper::header::{ContentType, ContentLength, Headers, UserAgent, Authorization, Header, - HeaderFormat}; + HeaderFormat, Bearer}; use hyper::http::h1::LINE_ENDING; use hyper::method::Method; use hyper::status::StatusCode; @@ -634,7 +634,7 @@ pub struct ResumableUploadHelper<'a, A: 'a> { pub start_at: Option, pub auth: &'a mut A, pub user_agent: &'a str, - pub auth_header: Authorization, + pub auth_header: Authorization, pub url: &'a str, pub reader: &'a mut ReadSeek, pub media_type: Mime, diff --git a/gen/gamesconfiguration1_configuration/src/lib.rs b/gen/gamesconfiguration1_configuration/src/lib.rs index ea3b857c89..09b5be401f 100644 --- a/gen/gamesconfiguration1_configuration/src/lib.rs +++ b/gen/gamesconfiguration1_configuration/src/lib.rs @@ -2,7 +2,7 @@ // This file was generated automatically from 'src/mako/api/lib.rs.mako' // DO NOT EDIT ! -//! This documentation was generated from *Games Configuration* crate version *0.1.12+20160224*, where *20160224* is the exact revision of the *gamesConfiguration:v1configuration* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.12*. +//! This documentation was generated from *Games Configuration* crate version *0.1.13+20160401*, where *20160401* is the exact revision of the *gamesConfiguration:v1configuration* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.13*. //! //! Everything else about the *Games Configuration* *v1_configuration* API can be found at the //! [official documentation site](https://developers.google.com/games/services). diff --git a/gen/gamesconfiguration1_configuration/src/lib.rs.in b/gen/gamesconfiguration1_configuration/src/lib.rs.in index a75f8b4840..38d3a6eb15 100644 --- a/gen/gamesconfiguration1_configuration/src/lib.rs.in +++ b/gen/gamesconfiguration1_configuration/src/lib.rs.in @@ -129,7 +129,7 @@ impl<'a, C, A> GamesConfiguration GamesConfiguration { client: RefCell::new(client), auth: RefCell::new(authenticator), - _user_agent: "google-api-rust-client/0.1.12".to_string(), + _user_agent: "google-api-rust-client/0.1.13".to_string(), } } @@ -144,7 +144,7 @@ impl<'a, C, A> GamesConfiguration } /// Set the user-agent header field to use in all requests to the server. - /// It defaults to `google-api-rust-client/0.1.12`. + /// It defaults to `google-api-rust-client/0.1.13`. /// /// Returns the previously set user-agent. pub fn user_agent(&mut self, agent_name: String) -> String { @@ -880,7 +880,7 @@ impl<'a, C, A> ImageConfigurationUploadCall<'a, C, A> where C: BorrowMut(mut self, mut reader: RS, reader_mime_type: mime::Mime, protocol: &'static str) -> Result<(hyper::client::Response, ImageConfiguration)> where RS: ReadSeek { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -961,8 +961,7 @@ impl<'a, C, A> ImageConfigurationUploadCall<'a, C, A> where C: BorrowMut AchievementConfigurationListCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, AchievementConfigurationListResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -1313,8 +1312,7 @@ impl<'a, C, A> AchievementConfigurationListCall<'a, C, A> where C: BorrowMut AchievementConfigurationUpdateCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, AchievementConfiguration)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -1581,8 +1579,7 @@ impl<'a, C, A> AchievementConfigurationUpdateCall<'a, C, A> where C: BorrowMut AchievementConfigurationInsertCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, AchievementConfiguration)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -1848,8 +1845,7 @@ impl<'a, C, A> AchievementConfigurationInsertCall<'a, C, A> where C: BorrowMut AchievementConfigurationGetCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, AchievementConfiguration)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -2097,8 +2093,7 @@ impl<'a, C, A> AchievementConfigurationGetCall<'a, C, A> where C: BorrowMut AchievementConfigurationPatchCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, AchievementConfiguration)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -2351,8 +2346,7 @@ impl<'a, C, A> AchievementConfigurationPatchCall<'a, C, A> where C: BorrowMut AchievementConfigurationDeleteCall<'a, C, A> where C: BorrowMut Result { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -2599,8 +2593,7 @@ impl<'a, C, A> AchievementConfigurationDeleteCall<'a, C, A> where C: BorrowMut LeaderboardConfigurationInsertCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, LeaderboardConfiguration)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -2843,8 +2836,7 @@ impl<'a, C, A> LeaderboardConfigurationInsertCall<'a, C, A> where C: BorrowMut LeaderboardConfigurationGetCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, LeaderboardConfiguration)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -3092,8 +3084,7 @@ impl<'a, C, A> LeaderboardConfigurationGetCall<'a, C, A> where C: BorrowMut LeaderboardConfigurationPatchCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, LeaderboardConfiguration)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -3346,8 +3337,7 @@ impl<'a, C, A> LeaderboardConfigurationPatchCall<'a, C, A> where C: BorrowMut LeaderboardConfigurationUpdateCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, LeaderboardConfiguration)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -3613,8 +3603,7 @@ impl<'a, C, A> LeaderboardConfigurationUpdateCall<'a, C, A> where C: BorrowMut LeaderboardConfigurationListCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, LeaderboardConfigurationListResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -3872,8 +3861,7 @@ impl<'a, C, A> LeaderboardConfigurationListCall<'a, C, A> where C: BorrowMut LeaderboardConfigurationDeleteCall<'a, C, A> where C: BorrowMut Result { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -4121,8 +4109,7 @@ impl<'a, C, A> LeaderboardConfigurationDeleteCall<'a, C, A> where C: BorrowMut"] description = "A complete library to interact with Games Management (protocol v1management)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/gamesmanagement1_management-cli" @@ -17,18 +17,18 @@ keywords = ["gamesManagement", "google", "cli"] name = "gamesmanagement1-management" [dependencies] -hyper = "0.7" -mime = "0.1.0" -serde = ">= 0.7.0" -serde_json = ">= 0.7.0" -yup-oauth2 = ">= 0.5.4" +hyper = "0.8" +mime = "0.2.0" +serde = "0.6.0" +serde_json = "0.6.0" +yup-oauth2 = ">= 0.5.6" strsim = "0.4" yup-hyper-mock = "1.0" clap = "2.0" [build-dependencies] -syntex = { version = ">= 0.23" } -serde_codegen = { version = ">= 0.6" } +syntex = { version = "= 0.28" } +serde_codegen = { version = "= 0.6.13" } [dependencies.google-gamesmanagement1_management] diff --git a/gen/gamesmanagement1_management-cli/README.md b/gen/gamesmanagement1_management-cli/README.md index 2116ed3c1d..32c5a725cb 100644 --- a/gen/gamesmanagement1_management-cli/README.md +++ b/gen/gamesmanagement1_management-cli/README.md @@ -17,14 +17,14 @@ Everything else about the *Games Management* API can be found at the You can download the pre-compiled 64bit binaries for the following platforms: -* ![icon](http://megaicons.net/static/img/icons_sizes/6/140/16/ubuntu-icon.png) [ubuntu](http://dl.byronimo.de/google.rs/cli/0.3.3/ubuntu/gamesmanagement1-management.tar.gz) -* ![icon](http://hydra-media.cursecdn.com/wow.gamepedia.com/a/a2/Apple-icon-16x16.png?version=25ddd67ac3dd3b634478e3978b76cb74) [osx](http://dl.byronimo.de/google.rs/cli/0.3.3/osx/gamesmanagement1-management.tar.gz) +* ![icon](http://megaicons.net/static/img/icons_sizes/6/140/16/ubuntu-icon.png) [ubuntu](http://dl.byronimo.de/google.rs/cli/0.3.4/ubuntu/gamesmanagement1-management.tar.gz) +* ![icon](http://hydra-media.cursecdn.com/wow.gamepedia.com/a/a2/Apple-icon-16x16.png?version=25ddd67ac3dd3b634478e3978b76cb74) [osx](http://dl.byronimo.de/google.rs/cli/0.3.4/osx/gamesmanagement1-management.tar.gz) Find the source code [on github](https://github.com/Byron/google-apis-rs/tree/master/gen/gamesmanagement1_management-cli). # Usage -This documentation was generated from the *Games Management* API at revision *20160224*. The CLI is at version *0.3.3*. +This documentation was generated from the *Games Management* API at revision *20160401*. The CLI is at version *0.3.4*. ```bash gamesmanagement1-management [options] diff --git a/gen/gamesmanagement1_management-cli/mkdocs.yml b/gen/gamesmanagement1_management-cli/mkdocs.yml index b554955ac5..9b7832ad57 100644 --- a/gen/gamesmanagement1_management-cli/mkdocs.yml +++ b/gen/gamesmanagement1_management-cli/mkdocs.yml @@ -1,4 +1,4 @@ -site_name: Games Management v0.3.3+20160224 +site_name: Games Management v0.3.4+20160401 site_url: http://byron.github.io/google-apis-rs/google-gamesmanagement1_management-cli site_description: Write integrating applications with bcore diff --git a/gen/gamesmanagement1_management-cli/src/cmn.rs b/gen/gamesmanagement1_management-cli/src/cmn.rs index 188159ee80..ae86fdef65 100644 --- a/gen/gamesmanagement1_management-cli/src/cmn.rs +++ b/gen/gamesmanagement1_management-cli/src/cmn.rs @@ -414,7 +414,7 @@ impl TokenStorage for JsonTokenStorage { Err(err) => match err.kind() { io::ErrorKind::NotFound => Ok(()), - _ => Err(json::Error::Io(err)) + _ => Err(json::Error::IoError(err)) }, Ok(_) => Ok(()), } @@ -427,7 +427,7 @@ impl TokenStorage for JsonTokenStorage { Err(serde_err) => Err(serde_err), } }, - Err(io_err) => Err(json::Error::Io(io_err)) + Err(io_err) => Err(json::Error::IoError(io_err)) } } } @@ -444,7 +444,7 @@ impl TokenStorage for JsonTokenStorage { Err(io_err) => { match io_err.kind() { io::ErrorKind::NotFound => Ok(None), - _ => Err(json::Error::Io(io_err)) + _ => Err(json::Error::IoError(io_err)) } } } @@ -683,7 +683,7 @@ pub fn application_secret_from_directory(dir: &str, = json::from_str(json_console_secret).unwrap(); match json::to_writer_pretty(&mut f, &console_secret) { Err(serde_err) => match serde_err { - json::Error::Io(err) => err, + json::Error::IoError(err) => err, _ => panic!("Unexpected serde error: {:#?}", serde_err) }, Ok(_) => continue, @@ -696,7 +696,7 @@ pub fn application_secret_from_directory(dir: &str, }, Ok(f) => { match json::de::from_reader::<_, ConsoleApplicationSecret>(f) { - Err(json::Error::Io(err)) => + Err(json::Error::IoError(err)) => return secret_io_error(err), Err(json_err) => return Err(CLIError::Configuration( diff --git a/gen/gamesmanagement1_management-cli/src/main.rs b/gen/gamesmanagement1_management-cli/src/main.rs index 1375e9704b..dd56f2ddf7 100644 --- a/gen/gamesmanagement1_management-cli/src/main.rs +++ b/gen/gamesmanagement1_management-cli/src/main.rs @@ -2078,7 +2078,7 @@ fn main() { let mut app = App::new("gamesmanagement1-management") .author("Sebastian Thiel ") - .version("0.3.3+20160224") + .version("0.3.4+20160401") .about("The Management API for Google Play Game Services.") .after_help("All documentation details can be found at http://byron.github.io/google-apis-rs/google_gamesmanagement1_management_cli") .arg(Arg::with_name("url") diff --git a/gen/gamesmanagement1_management/Cargo.toml b/gen/gamesmanagement1_management/Cargo.toml index 31e4625ff8..02167fed4b 100644 --- a/gen/gamesmanagement1_management/Cargo.toml +++ b/gen/gamesmanagement1_management/Cargo.toml @@ -4,7 +4,7 @@ [package] name = "google-gamesmanagement1_management" -version = "0.1.12+20160224" +version = "0.1.13+20160401" authors = ["Sebastian Thiel "] description = "A complete library to interact with Games Management (protocol v1management)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/gamesmanagement1_management" @@ -16,14 +16,14 @@ build = "src/build.rs" [dependencies] -hyper = "0.7" -mime = "0.1.0" -serde = ">= 0.7.0" -serde_json = ">= 0.7.0" -yup-oauth2 = ">= 0.5.4" +hyper = "0.8" +mime = "0.2.0" +serde = "0.6.0" +serde_json = "0.6.0" +yup-oauth2 = ">= 0.5.6" url = ">= 0.5" [build-dependencies] -syntex = { version = ">= 0.23" } -serde_codegen = { version = ">= 0.6" } +syntex = { version = "= 0.28" } +serde_codegen = { version = "= 0.6.13" } diff --git a/gen/gamesmanagement1_management/README.md b/gen/gamesmanagement1_management/README.md index 577ab26de7..b412d0d87f 100644 --- a/gen/gamesmanagement1_management/README.md +++ b/gen/gamesmanagement1_management/README.md @@ -5,7 +5,7 @@ DO NOT EDIT ! --> The `google-gamesmanagement1_management` library allows access to all features of the *Google Games Management* service. -This documentation was generated from *Games Management* crate version *0.1.12+20160224*, where *20160224* is the exact revision of the *gamesManagement:v1management* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.12*. +This documentation was generated from *Games Management* crate version *0.1.13+20160401*, where *20160401* is the exact revision of the *gamesManagement:v1management* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.13*. Everything else about the *Games Management* *v1_management* API can be found at the [official documentation site](https://developers.google.com/games/services). diff --git a/gen/gamesmanagement1_management/src/cmn.rs b/gen/gamesmanagement1_management/src/cmn.rs index 87b91a8986..c69621da55 100644 --- a/gen/gamesmanagement1_management/src/cmn.rs +++ b/gen/gamesmanagement1_management/src/cmn.rs @@ -12,7 +12,7 @@ use mime::{Mime, TopLevel, SubLevel, Attr, Value}; use oauth2::{TokenType, Retry, self}; use hyper; use hyper::header::{ContentType, ContentLength, Headers, UserAgent, Authorization, Header, - HeaderFormat}; + HeaderFormat, Bearer}; use hyper::http::h1::LINE_ENDING; use hyper::method::Method; use hyper::status::StatusCode; @@ -634,7 +634,7 @@ pub struct ResumableUploadHelper<'a, A: 'a> { pub start_at: Option, pub auth: &'a mut A, pub user_agent: &'a str, - pub auth_header: Authorization, + pub auth_header: Authorization, pub url: &'a str, pub reader: &'a mut ReadSeek, pub media_type: Mime, diff --git a/gen/gamesmanagement1_management/src/lib.rs b/gen/gamesmanagement1_management/src/lib.rs index bda092f6f1..7fac97512c 100644 --- a/gen/gamesmanagement1_management/src/lib.rs +++ b/gen/gamesmanagement1_management/src/lib.rs @@ -2,7 +2,7 @@ // This file was generated automatically from 'src/mako/api/lib.rs.mako' // DO NOT EDIT ! -//! This documentation was generated from *Games Management* crate version *0.1.12+20160224*, where *20160224* is the exact revision of the *gamesManagement:v1management* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.12*. +//! This documentation was generated from *Games Management* crate version *0.1.13+20160401*, where *20160401* is the exact revision of the *gamesManagement:v1management* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.13*. //! //! Everything else about the *Games Management* *v1_management* API can be found at the //! [official documentation site](https://developers.google.com/games/services). diff --git a/gen/gamesmanagement1_management/src/lib.rs.in b/gen/gamesmanagement1_management/src/lib.rs.in index 904c3dc6d6..a164809544 100644 --- a/gen/gamesmanagement1_management/src/lib.rs.in +++ b/gen/gamesmanagement1_management/src/lib.rs.in @@ -131,7 +131,7 @@ impl<'a, C, A> GamesManagement GamesManagement { client: RefCell::new(client), auth: RefCell::new(authenticator), - _user_agent: "google-api-rust-client/0.1.12".to_string(), + _user_agent: "google-api-rust-client/0.1.13".to_string(), } } @@ -161,7 +161,7 @@ impl<'a, C, A> GamesManagement } /// Set the user-agent header field to use in all requests to the server. - /// It defaults to `google-api-rust-client/0.1.12`. + /// It defaults to `google-api-rust-client/0.1.13`. /// /// Returns the previously set user-agent. pub fn user_agent(&mut self, agent_name: String) -> String { @@ -1310,7 +1310,7 @@ impl<'a, C, A> AchievementResetAllForAllPlayerCall<'a, C, A> where C: BorrowMut< /// Perform the operation you have build so far. pub fn doit(mut self) -> Result { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -1356,8 +1356,7 @@ impl<'a, C, A> AchievementResetAllForAllPlayerCall<'a, C, A> where C: BorrowMut< } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Post, &url) @@ -1503,7 +1502,7 @@ impl<'a, C, A> AchievementResetForAllPlayerCall<'a, C, A> where C: BorrowMut Result { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -1571,8 +1570,7 @@ impl<'a, C, A> AchievementResetForAllPlayerCall<'a, C, A> where C: BorrowMut AchievementResetCall<'a, C, A> where C: BorrowMut, /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, AchievementResetResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -1797,8 +1795,7 @@ impl<'a, C, A> AchievementResetCall<'a, C, A> where C: BorrowMut, } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Post, &url) @@ -1970,7 +1967,7 @@ impl<'a, C, A> AchievementResetMultipleForAllPlayerCall<'a, C, A> where C: Borro /// Perform the operation you have build so far. pub fn doit(mut self) -> Result { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -2027,8 +2024,7 @@ impl<'a, C, A> AchievementResetMultipleForAllPlayerCall<'a, C, A> where C: Borro } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -2186,7 +2182,7 @@ impl<'a, C, A> AchievementResetAllCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, AchievementResetAllResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -2233,8 +2229,7 @@ impl<'a, C, A> AchievementResetAllCall<'a, C, A> where C: BorrowMut PlayerHideCall<'a, C, A> where C: BorrowMut, A: oa /// Perform the operation you have build so far. pub fn doit(mut self) -> Result { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -2460,8 +2455,7 @@ impl<'a, C, A> PlayerHideCall<'a, C, A> where C: BorrowMut, A: oa } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Post, &url) @@ -2628,7 +2622,7 @@ impl<'a, C, A> PlayerUnhideCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -2697,8 +2691,7 @@ impl<'a, C, A> PlayerUnhideCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Delete, &url) @@ -2870,7 +2863,7 @@ impl<'a, C, A> ScoreResetMultipleForAllPlayerCall<'a, C, A> where C: BorrowMut Result { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -2927,8 +2920,7 @@ impl<'a, C, A> ScoreResetMultipleForAllPlayerCall<'a, C, A> where C: BorrowMut ScoreResetAllForAllPlayerCall<'a, C, A> where C: BorrowMut Result { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -3132,8 +3124,7 @@ impl<'a, C, A> ScoreResetAllForAllPlayerCall<'a, C, A> where C: BorrowMut ScoreResetAllCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, PlayerScoreResetAllResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -3325,8 +3316,7 @@ impl<'a, C, A> ScoreResetAllCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Post, &url) @@ -3482,7 +3472,7 @@ impl<'a, C, A> ScoreResetForAllPlayerCall<'a, C, A> where C: BorrowMut Result { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -3550,8 +3540,7 @@ impl<'a, C, A> ScoreResetForAllPlayerCall<'a, C, A> where C: BorrowMut ScoreResetCall<'a, C, A> where C: BorrowMut, A: oa /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, PlayerScoreResetResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -3776,8 +3765,7 @@ impl<'a, C, A> ScoreResetCall<'a, C, A> where C: BorrowMut, A: oa } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Post, &url) @@ -3942,7 +3930,7 @@ impl<'a, C, A> TurnBasedMatcheResetCall<'a, C, A> where C: BorrowMut Result { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -3988,8 +3976,7 @@ impl<'a, C, A> TurnBasedMatcheResetCall<'a, C, A> where C: BorrowMut TurnBasedMatcheResetForAllPlayerCall<'a, C, A> where C: BorrowMut /// Perform the operation you have build so far. pub fn doit(mut self) -> Result { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -4180,8 +4167,7 @@ impl<'a, C, A> TurnBasedMatcheResetForAllPlayerCall<'a, C, A> where C: BorrowMut } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Post, &url) @@ -4331,7 +4317,7 @@ impl<'a, C, A> ApplicationListHiddenCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, HiddenPlayerList)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -4406,8 +4392,7 @@ impl<'a, C, A> ApplicationListHiddenCall<'a, C, A> where C: BorrowMut RoomResetForAllPlayerCall<'a, C, A> where C: BorrowMut Result { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -4632,8 +4617,7 @@ impl<'a, C, A> RoomResetForAllPlayerCall<'a, C, A> where C: BorrowMut RoomResetCall<'a, C, A> where C: BorrowMut, A: oau /// Perform the operation you have build so far. pub fn doit(mut self) -> Result { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -4824,8 +4808,7 @@ impl<'a, C, A> RoomResetCall<'a, C, A> where C: BorrowMut, A: oau } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Post, &url) @@ -4970,7 +4953,7 @@ impl<'a, C, A> QuestResetAllForAllPlayerCall<'a, C, A> where C: BorrowMut Result { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -5016,8 +4999,7 @@ impl<'a, C, A> QuestResetAllForAllPlayerCall<'a, C, A> where C: BorrowMut QuestResetMultipleForAllPlayerCall<'a, C, A> where C: BorrowMut Result { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -5226,8 +5208,7 @@ impl<'a, C, A> QuestResetMultipleForAllPlayerCall<'a, C, A> where C: BorrowMut QuestResetAllCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -5431,8 +5412,7 @@ impl<'a, C, A> QuestResetAllCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Post, &url) @@ -5578,7 +5558,7 @@ impl<'a, C, A> QuestResetForAllPlayerCall<'a, C, A> where C: BorrowMut Result { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -5646,8 +5626,7 @@ impl<'a, C, A> QuestResetForAllPlayerCall<'a, C, A> where C: BorrowMut QuestResetCall<'a, C, A> where C: BorrowMut, A: oa /// Perform the operation you have build so far. pub fn doit(mut self) -> Result { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -5871,8 +5850,7 @@ impl<'a, C, A> QuestResetCall<'a, C, A> where C: BorrowMut, A: oa } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Post, &url) @@ -6027,7 +6005,7 @@ impl<'a, C, A> EventResetAllForAllPlayerCall<'a, C, A> where C: BorrowMut Result { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -6073,8 +6051,7 @@ impl<'a, C, A> EventResetAllForAllPlayerCall<'a, C, A> where C: BorrowMut EventResetCall<'a, C, A> where C: BorrowMut, A: oa /// Perform the operation you have build so far. pub fn doit(mut self) -> Result { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -6288,8 +6265,7 @@ impl<'a, C, A> EventResetCall<'a, C, A> where C: BorrowMut, A: oa } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Post, &url) @@ -6444,7 +6420,7 @@ impl<'a, C, A> EventResetAllCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -6490,8 +6466,7 @@ impl<'a, C, A> EventResetAllCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Post, &url) @@ -6643,7 +6618,7 @@ impl<'a, C, A> EventResetMultipleForAllPlayerCall<'a, C, A> where C: BorrowMut Result { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -6700,8 +6675,7 @@ impl<'a, C, A> EventResetMultipleForAllPlayerCall<'a, C, A> where C: BorrowMut EventResetForAllPlayerCall<'a, C, A> where C: BorrowMut Result { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -6928,8 +6902,7 @@ impl<'a, C, A> EventResetForAllPlayerCall<'a, C, A> where C: BorrowMut"] description = "A complete library to interact with gan (protocol v1beta1)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/gan1_beta1-cli" @@ -17,18 +17,18 @@ keywords = ["gan", "google", "cli"] name = "gan1-beta1" [dependencies] -hyper = "0.7" -mime = "0.1.0" -serde = ">= 0.7.0" -serde_json = ">= 0.7.0" -yup-oauth2 = ">= 0.5.4" +hyper = "0.8" +mime = "0.2.0" +serde = "0.6.0" +serde_json = "0.6.0" +yup-oauth2 = ">= 0.5.6" strsim = "0.4" yup-hyper-mock = "1.0" clap = "2.0" [build-dependencies] -syntex = { version = ">= 0.23" } -serde_codegen = { version = ">= 0.6" } +syntex = { version = "= 0.28" } +serde_codegen = { version = "= 0.6.13" } [dependencies.google-gan1_beta1] diff --git a/gen/gan1_beta1-cli/README.md b/gen/gan1_beta1-cli/README.md index aead160222..6b2a97e691 100644 --- a/gen/gan1_beta1-cli/README.md +++ b/gen/gan1_beta1-cli/README.md @@ -17,14 +17,14 @@ Everything else about the *gan* API can be found at the You can download the pre-compiled 64bit binaries for the following platforms: -* ![icon](http://megaicons.net/static/img/icons_sizes/6/140/16/ubuntu-icon.png) [ubuntu](http://dl.byronimo.de/google.rs/cli/0.3.3/ubuntu/gan1-beta1.tar.gz) -* ![icon](http://hydra-media.cursecdn.com/wow.gamepedia.com/a/a2/Apple-icon-16x16.png?version=25ddd67ac3dd3b634478e3978b76cb74) [osx](http://dl.byronimo.de/google.rs/cli/0.3.3/osx/gan1-beta1.tar.gz) +* ![icon](http://megaicons.net/static/img/icons_sizes/6/140/16/ubuntu-icon.png) [ubuntu](http://dl.byronimo.de/google.rs/cli/0.3.4/ubuntu/gan1-beta1.tar.gz) +* ![icon](http://hydra-media.cursecdn.com/wow.gamepedia.com/a/a2/Apple-icon-16x16.png?version=25ddd67ac3dd3b634478e3978b76cb74) [osx](http://dl.byronimo.de/google.rs/cli/0.3.4/osx/gan1-beta1.tar.gz) Find the source code [on github](https://github.com/Byron/google-apis-rs/tree/master/gen/gan1_beta1-cli). # Usage -This documentation was generated from the *gan* API at revision *20130205*. The CLI is at version *0.3.3*. +This documentation was generated from the *gan* API at revision *20130205*. The CLI is at version *0.3.4*. ```bash gan1-beta1 [options] diff --git a/gen/gan1_beta1-cli/mkdocs.yml b/gen/gan1_beta1-cli/mkdocs.yml index aa9bbf0dd0..5ec85e8b6a 100644 --- a/gen/gan1_beta1-cli/mkdocs.yml +++ b/gen/gan1_beta1-cli/mkdocs.yml @@ -1,4 +1,4 @@ -site_name: gan v0.3.3+20130205 +site_name: gan v0.3.4+20130205 site_url: http://byron.github.io/google-apis-rs/google-gan1_beta1-cli site_description: Write integrating applications with bcore diff --git a/gen/gan1_beta1-cli/src/cmn.rs b/gen/gan1_beta1-cli/src/cmn.rs index 188159ee80..ae86fdef65 100644 --- a/gen/gan1_beta1-cli/src/cmn.rs +++ b/gen/gan1_beta1-cli/src/cmn.rs @@ -414,7 +414,7 @@ impl TokenStorage for JsonTokenStorage { Err(err) => match err.kind() { io::ErrorKind::NotFound => Ok(()), - _ => Err(json::Error::Io(err)) + _ => Err(json::Error::IoError(err)) }, Ok(_) => Ok(()), } @@ -427,7 +427,7 @@ impl TokenStorage for JsonTokenStorage { Err(serde_err) => Err(serde_err), } }, - Err(io_err) => Err(json::Error::Io(io_err)) + Err(io_err) => Err(json::Error::IoError(io_err)) } } } @@ -444,7 +444,7 @@ impl TokenStorage for JsonTokenStorage { Err(io_err) => { match io_err.kind() { io::ErrorKind::NotFound => Ok(None), - _ => Err(json::Error::Io(io_err)) + _ => Err(json::Error::IoError(io_err)) } } } @@ -683,7 +683,7 @@ pub fn application_secret_from_directory(dir: &str, = json::from_str(json_console_secret).unwrap(); match json::to_writer_pretty(&mut f, &console_secret) { Err(serde_err) => match serde_err { - json::Error::Io(err) => err, + json::Error::IoError(err) => err, _ => panic!("Unexpected serde error: {:#?}", serde_err) }, Ok(_) => continue, @@ -696,7 +696,7 @@ pub fn application_secret_from_directory(dir: &str, }, Ok(f) => { match json::de::from_reader::<_, ConsoleApplicationSecret>(f) { - Err(json::Error::Io(err)) => + Err(json::Error::IoError(err)) => return secret_io_error(err), Err(json_err) => return Err(CLIError::Configuration( diff --git a/gen/gan1_beta1-cli/src/main.rs b/gen/gan1_beta1-cli/src/main.rs index 20a1e11191..fce2ec7227 100644 --- a/gen/gan1_beta1-cli/src/main.rs +++ b/gen/gan1_beta1-cli/src/main.rs @@ -1262,7 +1262,7 @@ fn main() { let mut app = App::new("gan1-beta1") .author("Sebastian Thiel ") - .version("0.3.3+20130205") + .version("0.3.4+20130205") .about("Lets you have programmatic access to your Google Affiliate Network data.") .after_help("All documentation details can be found at http://byron.github.io/google-apis-rs/google_gan1_beta1_cli") .arg(Arg::with_name("folder") diff --git a/gen/gan1_beta1/Cargo.toml b/gen/gan1_beta1/Cargo.toml index e0c784d5a7..e38d12c073 100644 --- a/gen/gan1_beta1/Cargo.toml +++ b/gen/gan1_beta1/Cargo.toml @@ -4,7 +4,7 @@ [package] name = "google-gan1_beta1" -version = "0.1.12+20130205" +version = "0.1.13+20130205" authors = ["Sebastian Thiel "] description = "A complete library to interact with gan (protocol v1beta1)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/gan1_beta1" @@ -16,14 +16,14 @@ build = "src/build.rs" [dependencies] -hyper = "0.7" -mime = "0.1.0" -serde = ">= 0.7.0" -serde_json = ">= 0.7.0" -yup-oauth2 = ">= 0.5.4" +hyper = "0.8" +mime = "0.2.0" +serde = "0.6.0" +serde_json = "0.6.0" +yup-oauth2 = ">= 0.5.6" url = ">= 0.5" [build-dependencies] -syntex = { version = ">= 0.23" } -serde_codegen = { version = ">= 0.6" } +syntex = { version = "= 0.28" } +serde_codegen = { version = "= 0.6.13" } diff --git a/gen/gan1_beta1/README.md b/gen/gan1_beta1/README.md index bd3cafdbe3..d897e03096 100644 --- a/gen/gan1_beta1/README.md +++ b/gen/gan1_beta1/README.md @@ -5,7 +5,7 @@ DO NOT EDIT ! --> The `google-gan1_beta1` library allows access to all features of the *Google gan* service. -This documentation was generated from *gan* crate version *0.1.12+20130205*, where *20130205* is the exact revision of the *gan:v1beta1* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.12*. +This documentation was generated from *gan* crate version *0.1.13+20130205*, where *20130205* is the exact revision of the *gan:v1beta1* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.13*. Everything else about the *gan* *v1_beta1* API can be found at the [official documentation site](https://developers.google.com/affiliate-network/). diff --git a/gen/gan1_beta1/src/cmn.rs b/gen/gan1_beta1/src/cmn.rs index 87b91a8986..c69621da55 100644 --- a/gen/gan1_beta1/src/cmn.rs +++ b/gen/gan1_beta1/src/cmn.rs @@ -12,7 +12,7 @@ use mime::{Mime, TopLevel, SubLevel, Attr, Value}; use oauth2::{TokenType, Retry, self}; use hyper; use hyper::header::{ContentType, ContentLength, Headers, UserAgent, Authorization, Header, - HeaderFormat}; + HeaderFormat, Bearer}; use hyper::http::h1::LINE_ENDING; use hyper::method::Method; use hyper::status::StatusCode; @@ -634,7 +634,7 @@ pub struct ResumableUploadHelper<'a, A: 'a> { pub start_at: Option, pub auth: &'a mut A, pub user_agent: &'a str, - pub auth_header: Authorization, + pub auth_header: Authorization, pub url: &'a str, pub reader: &'a mut ReadSeek, pub media_type: Mime, diff --git a/gen/gan1_beta1/src/lib.rs b/gen/gan1_beta1/src/lib.rs index 77892cc8fb..8dd7a1f3f1 100644 --- a/gen/gan1_beta1/src/lib.rs +++ b/gen/gan1_beta1/src/lib.rs @@ -2,7 +2,7 @@ // This file was generated automatically from 'src/mako/api/lib.rs.mako' // DO NOT EDIT ! -//! This documentation was generated from *gan* crate version *0.1.12+20130205*, where *20130205* is the exact revision of the *gan:v1beta1* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.12*. +//! This documentation was generated from *gan* crate version *0.1.13+20130205*, where *20130205* is the exact revision of the *gan:v1beta1* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.13*. //! //! Everything else about the *gan* *v1_beta1* API can be found at the //! [official documentation site](https://developers.google.com/affiliate-network/). diff --git a/gen/gan1_beta1/src/lib.rs.in b/gen/gan1_beta1/src/lib.rs.in index 8bb02f32f5..ae82831c59 100644 --- a/gen/gan1_beta1/src/lib.rs.in +++ b/gen/gan1_beta1/src/lib.rs.in @@ -118,7 +118,7 @@ impl<'a, C, A> Gan Gan { client: RefCell::new(client), auth: RefCell::new(authenticator), - _user_agent: "google-api-rust-client/0.1.12".to_string(), + _user_agent: "google-api-rust-client/0.1.13".to_string(), } } @@ -142,7 +142,7 @@ impl<'a, C, A> Gan } /// Set the user-agent header field to use in all requests to the server. - /// It defaults to `google-api-rust-client/0.1.12`. + /// It defaults to `google-api-rust-client/0.1.13`. /// /// Returns the previously set user-agent. pub fn user_agent(&mut self, agent_name: String) -> String { @@ -1478,7 +1478,7 @@ impl<'a, C, A> PublisherListCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Publishers)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -1775,7 +1775,7 @@ impl<'a, C, A> PublisherGetCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Publisher)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -2017,7 +2017,7 @@ impl<'a, C, A> LinkInsertCall<'a, C, A> where C: BorrowMut, A: oa /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Link)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -2267,7 +2267,7 @@ impl<'a, C, A> LinkGetCall<'a, C, A> where C: BorrowMut, A: oauth /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Link)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -2529,7 +2529,7 @@ impl<'a, C, A> LinkListCall<'a, C, A> where C: BorrowMut, A: oaut /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Links)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -2916,7 +2916,7 @@ impl<'a, C, A> ReportGetCall<'a, C, A> where C: BorrowMut, A: oau /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Report)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -3277,7 +3277,7 @@ impl<'a, C, A> CcOfferListCall<'a, C, A> where C: BorrowMut, A: o /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, CcOffers)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -3516,7 +3516,7 @@ impl<'a, C, A> AdvertiserGetCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Advertiser)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -3765,7 +3765,7 @@ impl<'a, C, A> AdvertiserListCall<'a, C, A> where C: BorrowMut, A /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Advertisers)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -4092,7 +4092,7 @@ impl<'a, C, A> EventListCall<'a, C, A> where C: BorrowMut, A: oau /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Events)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, diff --git a/gen/genomics1-cli/Cargo.toml b/gen/genomics1-cli/Cargo.toml index 24815448f2..cb21aec331 100644 --- a/gen/genomics1-cli/Cargo.toml +++ b/gen/genomics1-cli/Cargo.toml @@ -4,10 +4,11 @@ [package] name = "google-genomics1-cli" -version = "0.3.3+20160224" +version = "0.3.4+20160407" authors = ["Sebastian Thiel "] description = "A complete library to interact with genomics (protocol v1)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/genomics1-cli" +homepage = "https://cloud.google.com/genomics/" documentation = "http://byron.github.io/google-apis-rs/google_genomics1_cli" license = "MIT" keywords = ["genomics", "google", "cli"] @@ -16,18 +17,18 @@ keywords = ["genomics", "google", "cli"] name = "genomics1" [dependencies] -hyper = "0.7" -mime = "0.1.0" -serde = ">= 0.7.0" -serde_json = ">= 0.7.0" -yup-oauth2 = ">= 0.5.4" +hyper = "0.8" +mime = "0.2.0" +serde = "0.6.0" +serde_json = "0.6.0" +yup-oauth2 = ">= 0.5.6" strsim = "0.4" yup-hyper-mock = "1.0" clap = "2.0" [build-dependencies] -syntex = { version = ">= 0.23" } -serde_codegen = { version = ">= 0.6" } +syntex = { version = "= 0.28" } +serde_codegen = { version = "= 0.6.13" } [dependencies.google-genomics1] diff --git a/gen/genomics1-cli/README.md b/gen/genomics1-cli/README.md index 087cc42e28..b5e8490f5a 100644 --- a/gen/genomics1-cli/README.md +++ b/gen/genomics1-cli/README.md @@ -10,21 +10,37 @@ capabilities. Errors will be printed to standard error, and cause the program's If data-structures are requested, these will be returned as pretty-printed JSON, to be useful as input to other tools. +Everything else about the *genomics* API can be found at the +[official documentation site](https://cloud.google.com/genomics/). + # Downloads You can download the pre-compiled 64bit binaries for the following platforms: -* ![icon](http://megaicons.net/static/img/icons_sizes/6/140/16/ubuntu-icon.png) [ubuntu](http://dl.byronimo.de/google.rs/cli/0.3.3/ubuntu/genomics1.tar.gz) -* ![icon](http://hydra-media.cursecdn.com/wow.gamepedia.com/a/a2/Apple-icon-16x16.png?version=25ddd67ac3dd3b634478e3978b76cb74) [osx](http://dl.byronimo.de/google.rs/cli/0.3.3/osx/genomics1.tar.gz) +* ![icon](http://megaicons.net/static/img/icons_sizes/6/140/16/ubuntu-icon.png) [ubuntu](http://dl.byronimo.de/google.rs/cli/0.3.4/ubuntu/genomics1.tar.gz) +* ![icon](http://hydra-media.cursecdn.com/wow.gamepedia.com/a/a2/Apple-icon-16x16.png?version=25ddd67ac3dd3b634478e3978b76cb74) [osx](http://dl.byronimo.de/google.rs/cli/0.3.4/osx/genomics1.tar.gz) Find the source code [on github](https://github.com/Byron/google-apis-rs/tree/master/gen/genomics1-cli). # Usage -This documentation was generated from the *genomics* API at revision *20160224*. The CLI is at version *0.3.3*. +This documentation was generated from the *genomics* API at revision *20160407*. The CLI is at version *0.3.4*. ```bash genomics1 [options] + annotations + batch-create (-r )... [-p ]... [-o ] + create (-r )... [-p ]... [-o ] + delete [-p ]... [-o ] + get [-p ]... [-o ] + search (-r )... [-p ]... [-o ] + update (-r )... [-p ]... [-o ] + annotationsets + create (-r )... [-p ]... [-o ] + delete [-p ]... [-o ] + get [-p ]... [-o ] + search (-r )... [-p ]... [-o ] + update (-r )... [-p ]... [-o ] callsets create (-r )... [-p ]... [-o ] delete [-p ]... [-o ] diff --git a/gen/genomics1-cli/mkdocs.yml b/gen/genomics1-cli/mkdocs.yml index a091b56dc7..984d49f1e0 100644 --- a/gen/genomics1-cli/mkdocs.yml +++ b/gen/genomics1-cli/mkdocs.yml @@ -1,4 +1,4 @@ -site_name: genomics v0.3.3+20160224 +site_name: genomics v0.3.4+20160407 site_url: http://byron.github.io/google-apis-rs/google-genomics1-cli site_description: Write integrating applications with bcore @@ -9,6 +9,17 @@ site_dir: build_html pages: - ['index.md', 'Home'] +- ['annotations_batch-create.md', 'Annotations', 'Batch Create'] +- ['annotations_create.md', 'Annotations', 'Create'] +- ['annotations_delete.md', 'Annotations', 'Delete'] +- ['annotations_get.md', 'Annotations', 'Get'] +- ['annotations_search.md', 'Annotations', 'Search'] +- ['annotations_update.md', 'Annotations', 'Update'] +- ['annotationsets_create.md', 'Annotationsets', 'Create'] +- ['annotationsets_delete.md', 'Annotationsets', 'Delete'] +- ['annotationsets_get.md', 'Annotationsets', 'Get'] +- ['annotationsets_search.md', 'Annotationsets', 'Search'] +- ['annotationsets_update.md', 'Annotationsets', 'Update'] - ['callsets_create.md', 'Callsets', 'Create'] - ['callsets_delete.md', 'Callsets', 'Delete'] - ['callsets_get.md', 'Callsets', 'Get'] diff --git a/gen/genomics1-cli/src/cmn.rs b/gen/genomics1-cli/src/cmn.rs index 188159ee80..ae86fdef65 100644 --- a/gen/genomics1-cli/src/cmn.rs +++ b/gen/genomics1-cli/src/cmn.rs @@ -414,7 +414,7 @@ impl TokenStorage for JsonTokenStorage { Err(err) => match err.kind() { io::ErrorKind::NotFound => Ok(()), - _ => Err(json::Error::Io(err)) + _ => Err(json::Error::IoError(err)) }, Ok(_) => Ok(()), } @@ -427,7 +427,7 @@ impl TokenStorage for JsonTokenStorage { Err(serde_err) => Err(serde_err), } }, - Err(io_err) => Err(json::Error::Io(io_err)) + Err(io_err) => Err(json::Error::IoError(io_err)) } } } @@ -444,7 +444,7 @@ impl TokenStorage for JsonTokenStorage { Err(io_err) => { match io_err.kind() { io::ErrorKind::NotFound => Ok(None), - _ => Err(json::Error::Io(io_err)) + _ => Err(json::Error::IoError(io_err)) } } } @@ -683,7 +683,7 @@ pub fn application_secret_from_directory(dir: &str, = json::from_str(json_console_secret).unwrap(); match json::to_writer_pretty(&mut f, &console_secret) { Err(serde_err) => match serde_err { - json::Error::Io(err) => err, + json::Error::IoError(err) => err, _ => panic!("Unexpected serde error: {:#?}", serde_err) }, Ok(_) => continue, @@ -696,7 +696,7 @@ pub fn application_secret_from_directory(dir: &str, }, Ok(f) => { match json::de::from_reader::<_, ConsoleApplicationSecret>(f) { - Err(json::Error::Io(err)) => + Err(json::Error::IoError(err)) => return secret_io_error(err), Err(json_err) => return Err(CLIError::Configuration( diff --git a/gen/genomics1-cli/src/main.rs b/gen/genomics1-cli/src/main.rs index 13c4e77ed3..8ea23bf780 100644 --- a/gen/genomics1-cli/src/main.rs +++ b/gen/genomics1-cli/src/main.rs @@ -45,6 +45,871 @@ struct Engine<'n> { impl<'n> Engine<'n> { + fn _annotations_batch_create(&self, opt: &ArgMatches<'n>, dry_run: bool, err: &mut InvalidOptionsError) + -> Result<(), DoitError> { + + let mut field_cursor = FieldCursor::default(); + let mut object = json::value::Value::Object(Default::default()); + + for kvarg in opt.values_of("kv").map(|i|i.collect()).unwrap_or(Vec::new()).iter() { + let last_errc = err.issues.len(); + let (key, value) = parse_kv_arg(&*kvarg, err, false); + let mut temp_cursor = field_cursor.clone(); + if let Err(field_err) = temp_cursor.set(&*key) { + err.issues.push(field_err); + } + if value.is_none() { + field_cursor = temp_cursor.clone(); + if err.issues.len() > last_errc { + err.issues.remove(last_errc); + } + continue; + } + + let type_info: Option<(&'static str, JsonTypeInfo)> = + match &temp_cursor.to_string()[..] { + _ => { + let suggestion = FieldCursor::did_you_mean(key, &vec![]); + err.issues.push(CLIError::Field(FieldError::Unknown(temp_cursor.to_string(), suggestion, value.map(|v| v.to_string())))); + None + } + }; + if let Some((field_cursor_str, type_info)) = type_info { + FieldCursor::from(field_cursor_str).set_json_value(&mut object, value.unwrap(), type_info, err, &temp_cursor); + } + } + let mut request: api::BatchCreateAnnotationsRequest = json::value::from_value(object).unwrap(); + let mut call = self.hub.annotations().batch_create(request); + for parg in opt.values_of("v").map(|i|i.collect()).unwrap_or(Vec::new()).iter() { + let (key, value) = parse_kv_arg(&*parg, err, false); + match key { + _ => { + let mut found = false; + for param in &self.gp { + if key == *param { + found = true; + call = call.param(self.gpm.iter().find(|t| t.0 == key).unwrap_or(&("", key)).1, value.unwrap_or("unset")); + break; + } + } + if !found { + err.issues.push(CLIError::UnknownParameter(key.to_string(), + {let mut v = Vec::new(); + v.extend(self.gp.iter().map(|v|*v)); + v } )); + } + } + } + } + let protocol = CallType::Standard; + if dry_run { + Ok(()) + } else { + assert!(err.issues.len() == 0); + for scope in self.opt.values_of("url").map(|i|i.collect()).unwrap_or(Vec::new()).iter() { + call = call.add_scope(scope); + } + let mut ostream = match writer_from_opts(opt.value_of("out")) { + Ok(mut f) => f, + Err(io_err) => return Err(DoitError::IoError(opt.value_of("out").unwrap_or("-").to_string(), io_err)), + }; + match match protocol { + CallType::Standard => call.doit(), + _ => unreachable!() + } { + Err(api_err) => Err(DoitError::ApiError(api_err)), + Ok((mut response, output_schema)) => { + let mut value = json::value::to_value(&output_schema); + remove_json_null_values(&mut value); + json::to_writer_pretty(&mut ostream, &value).unwrap(); + ostream.flush().unwrap(); + Ok(()) + } + } + } + } + + fn _annotations_create(&self, opt: &ArgMatches<'n>, dry_run: bool, err: &mut InvalidOptionsError) + -> Result<(), DoitError> { + + let mut field_cursor = FieldCursor::default(); + let mut object = json::value::Value::Object(Default::default()); + + for kvarg in opt.values_of("kv").map(|i|i.collect()).unwrap_or(Vec::new()).iter() { + let last_errc = err.issues.len(); + let (key, value) = parse_kv_arg(&*kvarg, err, false); + let mut temp_cursor = field_cursor.clone(); + if let Err(field_err) = temp_cursor.set(&*key) { + err.issues.push(field_err); + } + if value.is_none() { + field_cursor = temp_cursor.clone(); + if err.issues.len() > last_errc { + err.issues.remove(last_errc); + } + continue; + } + + let type_info: Option<(&'static str, JsonTypeInfo)> = + match &temp_cursor.to_string()[..] { + "reference-id" => Some(("referenceId", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "end" => Some(("end", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "name" => Some(("name", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "transcript.coding-sequence.start" => Some(("transcript.codingSequence.start", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "transcript.coding-sequence.end" => Some(("transcript.codingSequence.end", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "transcript.gene-id" => Some(("transcript.geneId", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "variant.effect" => Some(("variant.effect", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "variant.transcript-ids" => Some(("variant.transcriptIds", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Vec })), + "variant.alternate-bases" => Some(("variant.alternateBases", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "variant.clinical-significance" => Some(("variant.clinicalSignificance", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "variant.type" => Some(("variant.type", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "variant.gene-id" => Some(("variant.geneId", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "start" => Some(("start", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "annotation-set-id" => Some(("annotationSetId", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "reference-name" => Some(("referenceName", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "reverse-strand" => Some(("reverseStrand", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "type" => Some(("type", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "id" => Some(("id", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + _ => { + let suggestion = FieldCursor::did_you_mean(key, &vec!["alternate-bases", "annotation-set-id", "clinical-significance", "coding-sequence", "effect", "end", "gene-id", "id", "name", "reference-id", "reference-name", "reverse-strand", "start", "transcript", "transcript-ids", "type", "variant"]); + err.issues.push(CLIError::Field(FieldError::Unknown(temp_cursor.to_string(), suggestion, value.map(|v| v.to_string())))); + None + } + }; + if let Some((field_cursor_str, type_info)) = type_info { + FieldCursor::from(field_cursor_str).set_json_value(&mut object, value.unwrap(), type_info, err, &temp_cursor); + } + } + let mut request: api::Annotation = json::value::from_value(object).unwrap(); + let mut call = self.hub.annotations().create(request); + for parg in opt.values_of("v").map(|i|i.collect()).unwrap_or(Vec::new()).iter() { + let (key, value) = parse_kv_arg(&*parg, err, false); + match key { + _ => { + let mut found = false; + for param in &self.gp { + if key == *param { + found = true; + call = call.param(self.gpm.iter().find(|t| t.0 == key).unwrap_or(&("", key)).1, value.unwrap_or("unset")); + break; + } + } + if !found { + err.issues.push(CLIError::UnknownParameter(key.to_string(), + {let mut v = Vec::new(); + v.extend(self.gp.iter().map(|v|*v)); + v } )); + } + } + } + } + let protocol = CallType::Standard; + if dry_run { + Ok(()) + } else { + assert!(err.issues.len() == 0); + for scope in self.opt.values_of("url").map(|i|i.collect()).unwrap_or(Vec::new()).iter() { + call = call.add_scope(scope); + } + let mut ostream = match writer_from_opts(opt.value_of("out")) { + Ok(mut f) => f, + Err(io_err) => return Err(DoitError::IoError(opt.value_of("out").unwrap_or("-").to_string(), io_err)), + }; + match match protocol { + CallType::Standard => call.doit(), + _ => unreachable!() + } { + Err(api_err) => Err(DoitError::ApiError(api_err)), + Ok((mut response, output_schema)) => { + let mut value = json::value::to_value(&output_schema); + remove_json_null_values(&mut value); + json::to_writer_pretty(&mut ostream, &value).unwrap(); + ostream.flush().unwrap(); + Ok(()) + } + } + } + } + + fn _annotations_delete(&self, opt: &ArgMatches<'n>, dry_run: bool, err: &mut InvalidOptionsError) + -> Result<(), DoitError> { + let mut call = self.hub.annotations().delete(opt.value_of("annotation-id").unwrap_or("")); + for parg in opt.values_of("v").map(|i|i.collect()).unwrap_or(Vec::new()).iter() { + let (key, value) = parse_kv_arg(&*parg, err, false); + match key { + _ => { + let mut found = false; + for param in &self.gp { + if key == *param { + found = true; + call = call.param(self.gpm.iter().find(|t| t.0 == key).unwrap_or(&("", key)).1, value.unwrap_or("unset")); + break; + } + } + if !found { + err.issues.push(CLIError::UnknownParameter(key.to_string(), + {let mut v = Vec::new(); + v.extend(self.gp.iter().map(|v|*v)); + v } )); + } + } + } + } + let protocol = CallType::Standard; + if dry_run { + Ok(()) + } else { + assert!(err.issues.len() == 0); + for scope in self.opt.values_of("url").map(|i|i.collect()).unwrap_or(Vec::new()).iter() { + call = call.add_scope(scope); + } + let mut ostream = match writer_from_opts(opt.value_of("out")) { + Ok(mut f) => f, + Err(io_err) => return Err(DoitError::IoError(opt.value_of("out").unwrap_or("-").to_string(), io_err)), + }; + match match protocol { + CallType::Standard => call.doit(), + _ => unreachable!() + } { + Err(api_err) => Err(DoitError::ApiError(api_err)), + Ok((mut response, output_schema)) => { + let mut value = json::value::to_value(&output_schema); + remove_json_null_values(&mut value); + json::to_writer_pretty(&mut ostream, &value).unwrap(); + ostream.flush().unwrap(); + Ok(()) + } + } + } + } + + fn _annotations_get(&self, opt: &ArgMatches<'n>, dry_run: bool, err: &mut InvalidOptionsError) + -> Result<(), DoitError> { + let mut call = self.hub.annotations().get(opt.value_of("annotation-id").unwrap_or("")); + for parg in opt.values_of("v").map(|i|i.collect()).unwrap_or(Vec::new()).iter() { + let (key, value) = parse_kv_arg(&*parg, err, false); + match key { + _ => { + let mut found = false; + for param in &self.gp { + if key == *param { + found = true; + call = call.param(self.gpm.iter().find(|t| t.0 == key).unwrap_or(&("", key)).1, value.unwrap_or("unset")); + break; + } + } + if !found { + err.issues.push(CLIError::UnknownParameter(key.to_string(), + {let mut v = Vec::new(); + v.extend(self.gp.iter().map(|v|*v)); + v } )); + } + } + } + } + let protocol = CallType::Standard; + if dry_run { + Ok(()) + } else { + assert!(err.issues.len() == 0); + for scope in self.opt.values_of("url").map(|i|i.collect()).unwrap_or(Vec::new()).iter() { + call = call.add_scope(scope); + } + let mut ostream = match writer_from_opts(opt.value_of("out")) { + Ok(mut f) => f, + Err(io_err) => return Err(DoitError::IoError(opt.value_of("out").unwrap_or("-").to_string(), io_err)), + }; + match match protocol { + CallType::Standard => call.doit(), + _ => unreachable!() + } { + Err(api_err) => Err(DoitError::ApiError(api_err)), + Ok((mut response, output_schema)) => { + let mut value = json::value::to_value(&output_schema); + remove_json_null_values(&mut value); + json::to_writer_pretty(&mut ostream, &value).unwrap(); + ostream.flush().unwrap(); + Ok(()) + } + } + } + } + + fn _annotations_search(&self, opt: &ArgMatches<'n>, dry_run: bool, err: &mut InvalidOptionsError) + -> Result<(), DoitError> { + + let mut field_cursor = FieldCursor::default(); + let mut object = json::value::Value::Object(Default::default()); + + for kvarg in opt.values_of("kv").map(|i|i.collect()).unwrap_or(Vec::new()).iter() { + let last_errc = err.issues.len(); + let (key, value) = parse_kv_arg(&*kvarg, err, false); + let mut temp_cursor = field_cursor.clone(); + if let Err(field_err) = temp_cursor.set(&*key) { + err.issues.push(field_err); + } + if value.is_none() { + field_cursor = temp_cursor.clone(); + if err.issues.len() > last_errc { + err.issues.remove(last_errc); + } + continue; + } + + let type_info: Option<(&'static str, JsonTypeInfo)> = + match &temp_cursor.to_string()[..] { + "reference-id" => Some(("referenceId", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "end" => Some(("end", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "page-size" => Some(("pageSize", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), + "page-token" => Some(("pageToken", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "annotation-set-ids" => Some(("annotationSetIds", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Vec })), + "start" => Some(("start", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "reference-name" => Some(("referenceName", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + _ => { + let suggestion = FieldCursor::did_you_mean(key, &vec!["annotation-set-ids", "end", "page-size", "page-token", "reference-id", "reference-name", "start"]); + err.issues.push(CLIError::Field(FieldError::Unknown(temp_cursor.to_string(), suggestion, value.map(|v| v.to_string())))); + None + } + }; + if let Some((field_cursor_str, type_info)) = type_info { + FieldCursor::from(field_cursor_str).set_json_value(&mut object, value.unwrap(), type_info, err, &temp_cursor); + } + } + let mut request: api::SearchAnnotationsRequest = json::value::from_value(object).unwrap(); + let mut call = self.hub.annotations().search(request); + for parg in opt.values_of("v").map(|i|i.collect()).unwrap_or(Vec::new()).iter() { + let (key, value) = parse_kv_arg(&*parg, err, false); + match key { + _ => { + let mut found = false; + for param in &self.gp { + if key == *param { + found = true; + call = call.param(self.gpm.iter().find(|t| t.0 == key).unwrap_or(&("", key)).1, value.unwrap_or("unset")); + break; + } + } + if !found { + err.issues.push(CLIError::UnknownParameter(key.to_string(), + {let mut v = Vec::new(); + v.extend(self.gp.iter().map(|v|*v)); + v } )); + } + } + } + } + let protocol = CallType::Standard; + if dry_run { + Ok(()) + } else { + assert!(err.issues.len() == 0); + for scope in self.opt.values_of("url").map(|i|i.collect()).unwrap_or(Vec::new()).iter() { + call = call.add_scope(scope); + } + let mut ostream = match writer_from_opts(opt.value_of("out")) { + Ok(mut f) => f, + Err(io_err) => return Err(DoitError::IoError(opt.value_of("out").unwrap_or("-").to_string(), io_err)), + }; + match match protocol { + CallType::Standard => call.doit(), + _ => unreachable!() + } { + Err(api_err) => Err(DoitError::ApiError(api_err)), + Ok((mut response, output_schema)) => { + let mut value = json::value::to_value(&output_schema); + remove_json_null_values(&mut value); + json::to_writer_pretty(&mut ostream, &value).unwrap(); + ostream.flush().unwrap(); + Ok(()) + } + } + } + } + + fn _annotations_update(&self, opt: &ArgMatches<'n>, dry_run: bool, err: &mut InvalidOptionsError) + -> Result<(), DoitError> { + + let mut field_cursor = FieldCursor::default(); + let mut object = json::value::Value::Object(Default::default()); + + for kvarg in opt.values_of("kv").map(|i|i.collect()).unwrap_or(Vec::new()).iter() { + let last_errc = err.issues.len(); + let (key, value) = parse_kv_arg(&*kvarg, err, false); + let mut temp_cursor = field_cursor.clone(); + if let Err(field_err) = temp_cursor.set(&*key) { + err.issues.push(field_err); + } + if value.is_none() { + field_cursor = temp_cursor.clone(); + if err.issues.len() > last_errc { + err.issues.remove(last_errc); + } + continue; + } + + let type_info: Option<(&'static str, JsonTypeInfo)> = + match &temp_cursor.to_string()[..] { + "reference-id" => Some(("referenceId", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "end" => Some(("end", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "name" => Some(("name", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "transcript.coding-sequence.start" => Some(("transcript.codingSequence.start", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "transcript.coding-sequence.end" => Some(("transcript.codingSequence.end", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "transcript.gene-id" => Some(("transcript.geneId", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "variant.effect" => Some(("variant.effect", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "variant.transcript-ids" => Some(("variant.transcriptIds", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Vec })), + "variant.alternate-bases" => Some(("variant.alternateBases", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "variant.clinical-significance" => Some(("variant.clinicalSignificance", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "variant.type" => Some(("variant.type", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "variant.gene-id" => Some(("variant.geneId", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "start" => Some(("start", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "annotation-set-id" => Some(("annotationSetId", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "reference-name" => Some(("referenceName", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "reverse-strand" => Some(("reverseStrand", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "type" => Some(("type", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "id" => Some(("id", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + _ => { + let suggestion = FieldCursor::did_you_mean(key, &vec!["alternate-bases", "annotation-set-id", "clinical-significance", "coding-sequence", "effect", "end", "gene-id", "id", "name", "reference-id", "reference-name", "reverse-strand", "start", "transcript", "transcript-ids", "type", "variant"]); + err.issues.push(CLIError::Field(FieldError::Unknown(temp_cursor.to_string(), suggestion, value.map(|v| v.to_string())))); + None + } + }; + if let Some((field_cursor_str, type_info)) = type_info { + FieldCursor::from(field_cursor_str).set_json_value(&mut object, value.unwrap(), type_info, err, &temp_cursor); + } + } + let mut request: api::Annotation = json::value::from_value(object).unwrap(); + let mut call = self.hub.annotations().update(request, opt.value_of("annotation-id").unwrap_or("")); + for parg in opt.values_of("v").map(|i|i.collect()).unwrap_or(Vec::new()).iter() { + let (key, value) = parse_kv_arg(&*parg, err, false); + match key { + "update-mask" => { + call = call.update_mask(value.unwrap_or("")); + }, + _ => { + let mut found = false; + for param in &self.gp { + if key == *param { + found = true; + call = call.param(self.gpm.iter().find(|t| t.0 == key).unwrap_or(&("", key)).1, value.unwrap_or("unset")); + break; + } + } + if !found { + err.issues.push(CLIError::UnknownParameter(key.to_string(), + {let mut v = Vec::new(); + v.extend(self.gp.iter().map(|v|*v)); + v.extend(["update-mask"].iter().map(|v|*v)); + v } )); + } + } + } + } + let protocol = CallType::Standard; + if dry_run { + Ok(()) + } else { + assert!(err.issues.len() == 0); + for scope in self.opt.values_of("url").map(|i|i.collect()).unwrap_or(Vec::new()).iter() { + call = call.add_scope(scope); + } + let mut ostream = match writer_from_opts(opt.value_of("out")) { + Ok(mut f) => f, + Err(io_err) => return Err(DoitError::IoError(opt.value_of("out").unwrap_or("-").to_string(), io_err)), + }; + match match protocol { + CallType::Standard => call.doit(), + _ => unreachable!() + } { + Err(api_err) => Err(DoitError::ApiError(api_err)), + Ok((mut response, output_schema)) => { + let mut value = json::value::to_value(&output_schema); + remove_json_null_values(&mut value); + json::to_writer_pretty(&mut ostream, &value).unwrap(); + ostream.flush().unwrap(); + Ok(()) + } + } + } + } + + fn _annotationsets_create(&self, opt: &ArgMatches<'n>, dry_run: bool, err: &mut InvalidOptionsError) + -> Result<(), DoitError> { + + let mut field_cursor = FieldCursor::default(); + let mut object = json::value::Value::Object(Default::default()); + + for kvarg in opt.values_of("kv").map(|i|i.collect()).unwrap_or(Vec::new()).iter() { + let last_errc = err.issues.len(); + let (key, value) = parse_kv_arg(&*kvarg, err, false); + let mut temp_cursor = field_cursor.clone(); + if let Err(field_err) = temp_cursor.set(&*key) { + err.issues.push(field_err); + } + if value.is_none() { + field_cursor = temp_cursor.clone(); + if err.issues.len() > last_errc { + err.issues.remove(last_errc); + } + continue; + } + + let type_info: Option<(&'static str, JsonTypeInfo)> = + match &temp_cursor.to_string()[..] { + "name" => Some(("name", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "source-uri" => Some(("sourceUri", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "reference-set-id" => Some(("referenceSetId", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "type" => Some(("type", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "id" => Some(("id", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "dataset-id" => Some(("datasetId", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + _ => { + let suggestion = FieldCursor::did_you_mean(key, &vec!["dataset-id", "id", "name", "reference-set-id", "source-uri", "type"]); + err.issues.push(CLIError::Field(FieldError::Unknown(temp_cursor.to_string(), suggestion, value.map(|v| v.to_string())))); + None + } + }; + if let Some((field_cursor_str, type_info)) = type_info { + FieldCursor::from(field_cursor_str).set_json_value(&mut object, value.unwrap(), type_info, err, &temp_cursor); + } + } + let mut request: api::AnnotationSet = json::value::from_value(object).unwrap(); + let mut call = self.hub.annotationsets().create(request); + for parg in opt.values_of("v").map(|i|i.collect()).unwrap_or(Vec::new()).iter() { + let (key, value) = parse_kv_arg(&*parg, err, false); + match key { + _ => { + let mut found = false; + for param in &self.gp { + if key == *param { + found = true; + call = call.param(self.gpm.iter().find(|t| t.0 == key).unwrap_or(&("", key)).1, value.unwrap_or("unset")); + break; + } + } + if !found { + err.issues.push(CLIError::UnknownParameter(key.to_string(), + {let mut v = Vec::new(); + v.extend(self.gp.iter().map(|v|*v)); + v } )); + } + } + } + } + let protocol = CallType::Standard; + if dry_run { + Ok(()) + } else { + assert!(err.issues.len() == 0); + for scope in self.opt.values_of("url").map(|i|i.collect()).unwrap_or(Vec::new()).iter() { + call = call.add_scope(scope); + } + let mut ostream = match writer_from_opts(opt.value_of("out")) { + Ok(mut f) => f, + Err(io_err) => return Err(DoitError::IoError(opt.value_of("out").unwrap_or("-").to_string(), io_err)), + }; + match match protocol { + CallType::Standard => call.doit(), + _ => unreachable!() + } { + Err(api_err) => Err(DoitError::ApiError(api_err)), + Ok((mut response, output_schema)) => { + let mut value = json::value::to_value(&output_schema); + remove_json_null_values(&mut value); + json::to_writer_pretty(&mut ostream, &value).unwrap(); + ostream.flush().unwrap(); + Ok(()) + } + } + } + } + + fn _annotationsets_delete(&self, opt: &ArgMatches<'n>, dry_run: bool, err: &mut InvalidOptionsError) + -> Result<(), DoitError> { + let mut call = self.hub.annotationsets().delete(opt.value_of("annotation-set-id").unwrap_or("")); + for parg in opt.values_of("v").map(|i|i.collect()).unwrap_or(Vec::new()).iter() { + let (key, value) = parse_kv_arg(&*parg, err, false); + match key { + _ => { + let mut found = false; + for param in &self.gp { + if key == *param { + found = true; + call = call.param(self.gpm.iter().find(|t| t.0 == key).unwrap_or(&("", key)).1, value.unwrap_or("unset")); + break; + } + } + if !found { + err.issues.push(CLIError::UnknownParameter(key.to_string(), + {let mut v = Vec::new(); + v.extend(self.gp.iter().map(|v|*v)); + v } )); + } + } + } + } + let protocol = CallType::Standard; + if dry_run { + Ok(()) + } else { + assert!(err.issues.len() == 0); + for scope in self.opt.values_of("url").map(|i|i.collect()).unwrap_or(Vec::new()).iter() { + call = call.add_scope(scope); + } + let mut ostream = match writer_from_opts(opt.value_of("out")) { + Ok(mut f) => f, + Err(io_err) => return Err(DoitError::IoError(opt.value_of("out").unwrap_or("-").to_string(), io_err)), + }; + match match protocol { + CallType::Standard => call.doit(), + _ => unreachable!() + } { + Err(api_err) => Err(DoitError::ApiError(api_err)), + Ok((mut response, output_schema)) => { + let mut value = json::value::to_value(&output_schema); + remove_json_null_values(&mut value); + json::to_writer_pretty(&mut ostream, &value).unwrap(); + ostream.flush().unwrap(); + Ok(()) + } + } + } + } + + fn _annotationsets_get(&self, opt: &ArgMatches<'n>, dry_run: bool, err: &mut InvalidOptionsError) + -> Result<(), DoitError> { + let mut call = self.hub.annotationsets().get(opt.value_of("annotation-set-id").unwrap_or("")); + for parg in opt.values_of("v").map(|i|i.collect()).unwrap_or(Vec::new()).iter() { + let (key, value) = parse_kv_arg(&*parg, err, false); + match key { + _ => { + let mut found = false; + for param in &self.gp { + if key == *param { + found = true; + call = call.param(self.gpm.iter().find(|t| t.0 == key).unwrap_or(&("", key)).1, value.unwrap_or("unset")); + break; + } + } + if !found { + err.issues.push(CLIError::UnknownParameter(key.to_string(), + {let mut v = Vec::new(); + v.extend(self.gp.iter().map(|v|*v)); + v } )); + } + } + } + } + let protocol = CallType::Standard; + if dry_run { + Ok(()) + } else { + assert!(err.issues.len() == 0); + for scope in self.opt.values_of("url").map(|i|i.collect()).unwrap_or(Vec::new()).iter() { + call = call.add_scope(scope); + } + let mut ostream = match writer_from_opts(opt.value_of("out")) { + Ok(mut f) => f, + Err(io_err) => return Err(DoitError::IoError(opt.value_of("out").unwrap_or("-").to_string(), io_err)), + }; + match match protocol { + CallType::Standard => call.doit(), + _ => unreachable!() + } { + Err(api_err) => Err(DoitError::ApiError(api_err)), + Ok((mut response, output_schema)) => { + let mut value = json::value::to_value(&output_schema); + remove_json_null_values(&mut value); + json::to_writer_pretty(&mut ostream, &value).unwrap(); + ostream.flush().unwrap(); + Ok(()) + } + } + } + } + + fn _annotationsets_search(&self, opt: &ArgMatches<'n>, dry_run: bool, err: &mut InvalidOptionsError) + -> Result<(), DoitError> { + + let mut field_cursor = FieldCursor::default(); + let mut object = json::value::Value::Object(Default::default()); + + for kvarg in opt.values_of("kv").map(|i|i.collect()).unwrap_or(Vec::new()).iter() { + let last_errc = err.issues.len(); + let (key, value) = parse_kv_arg(&*kvarg, err, false); + let mut temp_cursor = field_cursor.clone(); + if let Err(field_err) = temp_cursor.set(&*key) { + err.issues.push(field_err); + } + if value.is_none() { + field_cursor = temp_cursor.clone(); + if err.issues.len() > last_errc { + err.issues.remove(last_errc); + } + continue; + } + + let type_info: Option<(&'static str, JsonTypeInfo)> = + match &temp_cursor.to_string()[..] { + "name" => Some(("name", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "page-size" => Some(("pageSize", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), + "dataset-ids" => Some(("datasetIds", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Vec })), + "page-token" => Some(("pageToken", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "reference-set-id" => Some(("referenceSetId", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "types" => Some(("types", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Vec })), + _ => { + let suggestion = FieldCursor::did_you_mean(key, &vec!["dataset-ids", "name", "page-size", "page-token", "reference-set-id", "types"]); + err.issues.push(CLIError::Field(FieldError::Unknown(temp_cursor.to_string(), suggestion, value.map(|v| v.to_string())))); + None + } + }; + if let Some((field_cursor_str, type_info)) = type_info { + FieldCursor::from(field_cursor_str).set_json_value(&mut object, value.unwrap(), type_info, err, &temp_cursor); + } + } + let mut request: api::SearchAnnotationSetsRequest = json::value::from_value(object).unwrap(); + let mut call = self.hub.annotationsets().search(request); + for parg in opt.values_of("v").map(|i|i.collect()).unwrap_or(Vec::new()).iter() { + let (key, value) = parse_kv_arg(&*parg, err, false); + match key { + _ => { + let mut found = false; + for param in &self.gp { + if key == *param { + found = true; + call = call.param(self.gpm.iter().find(|t| t.0 == key).unwrap_or(&("", key)).1, value.unwrap_or("unset")); + break; + } + } + if !found { + err.issues.push(CLIError::UnknownParameter(key.to_string(), + {let mut v = Vec::new(); + v.extend(self.gp.iter().map(|v|*v)); + v } )); + } + } + } + } + let protocol = CallType::Standard; + if dry_run { + Ok(()) + } else { + assert!(err.issues.len() == 0); + for scope in self.opt.values_of("url").map(|i|i.collect()).unwrap_or(Vec::new()).iter() { + call = call.add_scope(scope); + } + let mut ostream = match writer_from_opts(opt.value_of("out")) { + Ok(mut f) => f, + Err(io_err) => return Err(DoitError::IoError(opt.value_of("out").unwrap_or("-").to_string(), io_err)), + }; + match match protocol { + CallType::Standard => call.doit(), + _ => unreachable!() + } { + Err(api_err) => Err(DoitError::ApiError(api_err)), + Ok((mut response, output_schema)) => { + let mut value = json::value::to_value(&output_schema); + remove_json_null_values(&mut value); + json::to_writer_pretty(&mut ostream, &value).unwrap(); + ostream.flush().unwrap(); + Ok(()) + } + } + } + } + + fn _annotationsets_update(&self, opt: &ArgMatches<'n>, dry_run: bool, err: &mut InvalidOptionsError) + -> Result<(), DoitError> { + + let mut field_cursor = FieldCursor::default(); + let mut object = json::value::Value::Object(Default::default()); + + for kvarg in opt.values_of("kv").map(|i|i.collect()).unwrap_or(Vec::new()).iter() { + let last_errc = err.issues.len(); + let (key, value) = parse_kv_arg(&*kvarg, err, false); + let mut temp_cursor = field_cursor.clone(); + if let Err(field_err) = temp_cursor.set(&*key) { + err.issues.push(field_err); + } + if value.is_none() { + field_cursor = temp_cursor.clone(); + if err.issues.len() > last_errc { + err.issues.remove(last_errc); + } + continue; + } + + let type_info: Option<(&'static str, JsonTypeInfo)> = + match &temp_cursor.to_string()[..] { + "name" => Some(("name", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "source-uri" => Some(("sourceUri", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "reference-set-id" => Some(("referenceSetId", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "type" => Some(("type", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "id" => Some(("id", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "dataset-id" => Some(("datasetId", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + _ => { + let suggestion = FieldCursor::did_you_mean(key, &vec!["dataset-id", "id", "name", "reference-set-id", "source-uri", "type"]); + err.issues.push(CLIError::Field(FieldError::Unknown(temp_cursor.to_string(), suggestion, value.map(|v| v.to_string())))); + None + } + }; + if let Some((field_cursor_str, type_info)) = type_info { + FieldCursor::from(field_cursor_str).set_json_value(&mut object, value.unwrap(), type_info, err, &temp_cursor); + } + } + let mut request: api::AnnotationSet = json::value::from_value(object).unwrap(); + let mut call = self.hub.annotationsets().update(request, opt.value_of("annotation-set-id").unwrap_or("")); + for parg in opt.values_of("v").map(|i|i.collect()).unwrap_or(Vec::new()).iter() { + let (key, value) = parse_kv_arg(&*parg, err, false); + match key { + "update-mask" => { + call = call.update_mask(value.unwrap_or("")); + }, + _ => { + let mut found = false; + for param in &self.gp { + if key == *param { + found = true; + call = call.param(self.gpm.iter().find(|t| t.0 == key).unwrap_or(&("", key)).1, value.unwrap_or("unset")); + break; + } + } + if !found { + err.issues.push(CLIError::UnknownParameter(key.to_string(), + {let mut v = Vec::new(); + v.extend(self.gp.iter().map(|v|*v)); + v.extend(["update-mask"].iter().map(|v|*v)); + v } )); + } + } + } + } + let protocol = CallType::Standard; + if dry_run { + Ok(()) + } else { + assert!(err.issues.len() == 0); + for scope in self.opt.values_of("url").map(|i|i.collect()).unwrap_or(Vec::new()).iter() { + call = call.add_scope(scope); + } + let mut ostream = match writer_from_opts(opt.value_of("out")) { + Ok(mut f) => f, + Err(io_err) => return Err(DoitError::IoError(opt.value_of("out").unwrap_or("-").to_string(), io_err)), + }; + match match protocol { + CallType::Standard => call.doit(), + _ => unreachable!() + } { + Err(api_err) => Err(DoitError::ApiError(api_err)), + Ok((mut response, output_schema)) => { + let mut value = json::value::to_value(&output_schema); + remove_json_null_values(&mut value); + json::to_writer_pretty(&mut ostream, &value).unwrap(); + ostream.flush().unwrap(); + Ok(()) + } + } + } + } + fn _callsets_create(&self, opt: &ArgMatches<'n>, dry_run: bool, err: &mut InvalidOptionsError) -> Result<(), DoitError> { @@ -2587,9 +3452,10 @@ impl<'n> Engine<'n> { "variant-set-id" => Some(("variantSetId", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "normalize-reference-names" => Some(("normalizeReferenceNames", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), "source-uris" => Some(("sourceUris", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Vec })), + "info-merge-config" => Some(("infoMergeConfig", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Map })), "format" => Some(("format", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), _ => { - let suggestion = FieldCursor::did_you_mean(key, &vec!["format", "normalize-reference-names", "source-uris", "variant-set-id"]); + let suggestion = FieldCursor::did_you_mean(key, &vec!["format", "info-merge-config", "normalize-reference-names", "source-uris", "variant-set-id"]); err.issues.push(CLIError::Field(FieldError::Unknown(temp_cursor.to_string(), suggestion, value.map(|v| v.to_string())))); None } @@ -2673,8 +3539,9 @@ impl<'n> Engine<'n> { let type_info: Option<(&'static str, JsonTypeInfo)> = match &temp_cursor.to_string()[..] { "variant-set-id" => Some(("variantSetId", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "info-merge-config" => Some(("infoMergeConfig", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Map })), _ => { - let suggestion = FieldCursor::did_you_mean(key, &vec!["variant-set-id"]); + let suggestion = FieldCursor::did_you_mean(key, &vec!["info-merge-config", "variant-set-id"]); err.issues.push(CLIError::Field(FieldError::Unknown(temp_cursor.to_string(), suggestion, value.map(|v| v.to_string())))); None } @@ -3479,6 +4346,55 @@ impl<'n> Engine<'n> { let mut call_result: Result<(), DoitError> = Ok(()); let mut err_opt: Option = None; match self.opt.subcommand() { + ("annotations", Some(opt)) => { + match opt.subcommand() { + ("batch-create", Some(opt)) => { + call_result = self._annotations_batch_create(opt, dry_run, &mut err); + }, + ("create", Some(opt)) => { + call_result = self._annotations_create(opt, dry_run, &mut err); + }, + ("delete", Some(opt)) => { + call_result = self._annotations_delete(opt, dry_run, &mut err); + }, + ("get", Some(opt)) => { + call_result = self._annotations_get(opt, dry_run, &mut err); + }, + ("search", Some(opt)) => { + call_result = self._annotations_search(opt, dry_run, &mut err); + }, + ("update", Some(opt)) => { + call_result = self._annotations_update(opt, dry_run, &mut err); + }, + _ => { + err.issues.push(CLIError::MissingMethodError("annotations".to_string())); + writeln!(io::stderr(), "{}\n", opt.usage()).ok(); + } + } + }, + ("annotationsets", Some(opt)) => { + match opt.subcommand() { + ("create", Some(opt)) => { + call_result = self._annotationsets_create(opt, dry_run, &mut err); + }, + ("delete", Some(opt)) => { + call_result = self._annotationsets_delete(opt, dry_run, &mut err); + }, + ("get", Some(opt)) => { + call_result = self._annotationsets_get(opt, dry_run, &mut err); + }, + ("search", Some(opt)) => { + call_result = self._annotationsets_search(opt, dry_run, &mut err); + }, + ("update", Some(opt)) => { + call_result = self._annotationsets_update(opt, dry_run, &mut err); + }, + _ => { + err.issues.push(CLIError::MissingMethodError("annotationsets".to_string())); + writeln!(io::stderr(), "{}\n", opt.usage()).ok(); + } + } + }, ("callsets", Some(opt)) => { match opt.subcommand() { ("create", Some(opt)) => { @@ -3772,6 +4688,266 @@ impl<'n> Engine<'n> { fn main() { let mut exit_status = 0i32; let arg_data = [ + ("annotations", "methods: 'batch-create', 'create', 'delete', 'get', 'search' and 'update'", vec![ + ("batch-create", + Some(r##"Creates one or more new annotations atomically. All annotations must belong to the same annotation set. Caller must have WRITE permission for this annotation set. For optimal performance, batch positionally adjacent annotations together. If the request has a systemic issue, such as an attempt to write to an inaccessible annotation set, the entire RPC will fail accordingly. For lesser data issues, when possible an error will be isolated to the corresponding batch entry in the response; the remaining well formed annotations will be created normally. For details on the requirements for each individual annotation resource, see CreateAnnotation."##), + "Details at http://byron.github.io/google-apis-rs/google_genomics1_cli/annotations_batch-create", + vec![ + (Some(r##"kv"##), + Some(r##"r"##), + Some(r##"Set various fields of the request structure, matching the key=value form"##), + Some(true), + Some(true)), + + (Some(r##"v"##), + Some(r##"p"##), + Some(r##"Set various optional parameters, matching the key=value form"##), + Some(false), + Some(true)), + + (Some(r##"out"##), + Some(r##"o"##), + Some(r##"Specify the file into which to write the program's output"##), + Some(false), + Some(false)), + ]), + ("create", + Some(r##"Creates a new annotation. Caller must have WRITE permission for the associated annotation set. The following fields are required: * annotationSetId * referenceName or referenceId ### Transcripts For annotations of type TRANSCRIPT, the following fields of transcript must be provided: * `exons.start` * `exons.end` All other fields may be optionally specified, unless documented as being server-generated (for example, the `id` field). The annotated range must be no longer than 100Mbp (mega base pairs). See the Annotation resource for additional restrictions on each field."##), + "Details at http://byron.github.io/google-apis-rs/google_genomics1_cli/annotations_create", + vec![ + (Some(r##"kv"##), + Some(r##"r"##), + Some(r##"Set various fields of the request structure, matching the key=value form"##), + Some(true), + Some(true)), + + (Some(r##"v"##), + Some(r##"p"##), + Some(r##"Set various optional parameters, matching the key=value form"##), + Some(false), + Some(true)), + + (Some(r##"out"##), + Some(r##"o"##), + Some(r##"Specify the file into which to write the program's output"##), + Some(false), + Some(false)), + ]), + ("delete", + Some(r##"Deletes an annotation. Caller must have WRITE permission for the associated annotation set."##), + "Details at http://byron.github.io/google-apis-rs/google_genomics1_cli/annotations_delete", + vec![ + (Some(r##"annotation-id"##), + None, + Some(r##"The ID of the annotation to be deleted."##), + Some(true), + Some(false)), + + (Some(r##"v"##), + Some(r##"p"##), + Some(r##"Set various optional parameters, matching the key=value form"##), + Some(false), + Some(true)), + + (Some(r##"out"##), + Some(r##"o"##), + Some(r##"Specify the file into which to write the program's output"##), + Some(false), + Some(false)), + ]), + ("get", + Some(r##"Gets an annotation. Caller must have READ permission for the associated annotation set."##), + "Details at http://byron.github.io/google-apis-rs/google_genomics1_cli/annotations_get", + vec![ + (Some(r##"annotation-id"##), + None, + Some(r##"The ID of the annotation to be retrieved."##), + Some(true), + Some(false)), + + (Some(r##"v"##), + Some(r##"p"##), + Some(r##"Set various optional parameters, matching the key=value form"##), + Some(false), + Some(true)), + + (Some(r##"out"##), + Some(r##"o"##), + Some(r##"Specify the file into which to write the program's output"##), + Some(false), + Some(false)), + ]), + ("search", + Some(r##"Searches for annotations that match the given criteria. Results are ordered by genomic coordinate (by reference sequence, then position). Annotations with equivalent genomic coordinates are returned in an unspecified order. This order is consistent, such that two queries for the same content (regardless of page size) yield annotations in the same order across their respective streams of paginated responses. Caller must have READ permission for the queried annotation sets."##), + "Details at http://byron.github.io/google-apis-rs/google_genomics1_cli/annotations_search", + vec![ + (Some(r##"kv"##), + Some(r##"r"##), + Some(r##"Set various fields of the request structure, matching the key=value form"##), + Some(true), + Some(true)), + + (Some(r##"v"##), + Some(r##"p"##), + Some(r##"Set various optional parameters, matching the key=value form"##), + Some(false), + Some(true)), + + (Some(r##"out"##), + Some(r##"o"##), + Some(r##"Specify the file into which to write the program's output"##), + Some(false), + Some(false)), + ]), + ("update", + Some(r##"Updates an annotation. Caller must have WRITE permission for the associated dataset."##), + "Details at http://byron.github.io/google-apis-rs/google_genomics1_cli/annotations_update", + vec![ + (Some(r##"annotation-id"##), + None, + Some(r##"The ID of the annotation to be updated."##), + Some(true), + Some(false)), + + (Some(r##"kv"##), + Some(r##"r"##), + Some(r##"Set various fields of the request structure, matching the key=value form"##), + Some(true), + Some(true)), + + (Some(r##"v"##), + Some(r##"p"##), + Some(r##"Set various optional parameters, matching the key=value form"##), + Some(false), + Some(true)), + + (Some(r##"out"##), + Some(r##"o"##), + Some(r##"Specify the file into which to write the program's output"##), + Some(false), + Some(false)), + ]), + ]), + + ("annotationsets", "methods: 'create', 'delete', 'get', 'search' and 'update'", vec![ + ("create", + Some(r##"Creates a new annotation set. Caller must have WRITE permission for the associated dataset. The following fields are required: * datasetId * referenceSetId All other fields may be optionally specified, unless documented as being server-generated (for example, the `id` field)."##), + "Details at http://byron.github.io/google-apis-rs/google_genomics1_cli/annotationsets_create", + vec![ + (Some(r##"kv"##), + Some(r##"r"##), + Some(r##"Set various fields of the request structure, matching the key=value form"##), + Some(true), + Some(true)), + + (Some(r##"v"##), + Some(r##"p"##), + Some(r##"Set various optional parameters, matching the key=value form"##), + Some(false), + Some(true)), + + (Some(r##"out"##), + Some(r##"o"##), + Some(r##"Specify the file into which to write the program's output"##), + Some(false), + Some(false)), + ]), + ("delete", + Some(r##"Deletes an annotation set. Caller must have WRITE permission for the associated annotation set."##), + "Details at http://byron.github.io/google-apis-rs/google_genomics1_cli/annotationsets_delete", + vec![ + (Some(r##"annotation-set-id"##), + None, + Some(r##"The ID of the annotation set to be deleted."##), + Some(true), + Some(false)), + + (Some(r##"v"##), + Some(r##"p"##), + Some(r##"Set various optional parameters, matching the key=value form"##), + Some(false), + Some(true)), + + (Some(r##"out"##), + Some(r##"o"##), + Some(r##"Specify the file into which to write the program's output"##), + Some(false), + Some(false)), + ]), + ("get", + Some(r##"Gets an annotation set. Caller must have READ permission for the associated dataset."##), + "Details at http://byron.github.io/google-apis-rs/google_genomics1_cli/annotationsets_get", + vec![ + (Some(r##"annotation-set-id"##), + None, + Some(r##"The ID of the annotation set to be retrieved."##), + Some(true), + Some(false)), + + (Some(r##"v"##), + Some(r##"p"##), + Some(r##"Set various optional parameters, matching the key=value form"##), + Some(false), + Some(true)), + + (Some(r##"out"##), + Some(r##"o"##), + Some(r##"Specify the file into which to write the program's output"##), + Some(false), + Some(false)), + ]), + ("search", + Some(r##"Searches for annotation sets that match the given criteria. Annotation sets are returned in an unspecified order. This order is consistent, such that two queries for the same content (regardless of page size) yield annotation sets in the same order across their respective streams of paginated responses. Caller must have READ permission for the queried datasets."##), + "Details at http://byron.github.io/google-apis-rs/google_genomics1_cli/annotationsets_search", + vec![ + (Some(r##"kv"##), + Some(r##"r"##), + Some(r##"Set various fields of the request structure, matching the key=value form"##), + Some(true), + Some(true)), + + (Some(r##"v"##), + Some(r##"p"##), + Some(r##"Set various optional parameters, matching the key=value form"##), + Some(false), + Some(true)), + + (Some(r##"out"##), + Some(r##"o"##), + Some(r##"Specify the file into which to write the program's output"##), + Some(false), + Some(false)), + ]), + ("update", + Some(r##"Updates an annotation set. The update must respect all mutability restrictions and other invariants described on the annotation set resource. Caller must have WRITE permission for the associated dataset."##), + "Details at http://byron.github.io/google-apis-rs/google_genomics1_cli/annotationsets_update", + vec![ + (Some(r##"annotation-set-id"##), + None, + Some(r##"The ID of the annotation set to be updated."##), + Some(true), + Some(false)), + + (Some(r##"kv"##), + Some(r##"r"##), + Some(r##"Set various fields of the request structure, matching the key=value form"##), + Some(true), + Some(true)), + + (Some(r##"v"##), + Some(r##"p"##), + Some(r##"Set various optional parameters, matching the key=value form"##), + Some(false), + Some(true)), + + (Some(r##"out"##), + Some(r##"o"##), + Some(r##"Specify the file into which to write the program's output"##), + Some(false), + Some(false)), + ]), + ]), + ("callsets", "methods: 'create', 'delete', 'get', 'patch' and 'search'", vec![ ("create", Some(r##"Creates a new call set. For the definitions of call sets and other genomics resources, see [Fundamentals of Google Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)"##), @@ -3915,7 +5091,7 @@ fn main() { Some(false)), ]), ("delete", - Some(r##"Deletes a dataset. For the definitions of datasets and other genomics resources, see [Fundamentals of Google Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)"##), + Some(r##"Deletes a dataset and all of its contents (all read group sets, reference sets, variant sets, call sets, annotation sets, etc.) This is reversible (up to one week after the deletion) via the datasets.undelete operation. For the definitions of datasets and other genomics resources, see [Fundamentals of Google Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)"##), "Details at http://byron.github.io/google-apis-rs/google_genomics1_cli/datasets_delete", vec![ (Some(r##"dataset-id"##), @@ -4591,7 +5767,7 @@ fn main() { Some(false)), ]), ("import", - Some(r##"Creates variant data by asynchronously importing the provided information. For the definitions of variant sets and other genomics resources, see [Fundamentals of Google Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) The variants for import will be merged with any existing variant that matches its reference sequence, start, end, reference bases, and alternative bases. If no such variant exists, a new one will be created. When variants are merged, the call information from the new variant is added to the existing variant, and other fields (such as key/value pairs) are discarded. In particular, this means for merged VCF variants that have conflicting INFO fields, some data will be arbitrarily discarded. As a special case, for single-sample VCF files, QUAL and FILTER fields will be moved to the call level; these are sometimes interpreted in a call-specific context. Imported VCF headers are appended to the metadata already in a variant set."##), + Some(r##"Creates variant data by asynchronously importing the provided information. For the definitions of variant sets and other genomics resources, see [Fundamentals of Google Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) The variants for import will be merged with any existing variant that matches its reference sequence, start, end, reference bases, and alternative bases. If no such variant exists, a new one will be created. When variants are merged, the call information from the new variant is added to the existing variant, and Variant info fields are merged as specified in infoMergeConfig. As a special case, for single-sample VCF files, QUAL and FILTER fields will be moved to the call level; these are sometimes interpreted in a call-specific context. Imported VCF headers are appended to the metadata already in a variant set."##), "Details at http://byron.github.io/google-apis-rs/google_genomics1_cli/variants_import", vec![ (Some(r##"kv"##), @@ -4613,7 +5789,7 @@ fn main() { Some(false)), ]), ("merge", - Some(r##"Merges the given variants with existing variants. For the definitions of variants and other genomics resources, see [Fundamentals of Google Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) Each variant will be merged with an existing variant that matches its reference sequence, start, end, reference bases, and alternative bases. If no such variant exists, a new one will be created. When variants are merged, the call information from the new variant is added to the existing variant, and other fields (such as key/value pairs) are discarded."##), + Some(r##"Merges the given variants with existing variants. For the definitions of variants and other genomics resources, see [Fundamentals of Google Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) Each variant will be merged with an existing variant that matches its reference sequence, start, end, reference bases, and alternative bases. If no such variant exists, a new one will be created. When variants are merged, the call information from the new variant is added to the existing variant. Variant info fields are merged as specified in the infoMergeConfig field of the MergeVariantsRequest. Please exercise caution when using this method! It is easy to introduce mistakes in existing variants and difficult to back out of them. For example, suppose you were trying to merge a new variant with an existing one and both variants contain calls that belong to callsets with the same callset ID. // Existing variant - irrelevant fields trimmed for clarity { "variantSetId": "10473108253681171589", "referenceName": "1", "start": "10582", "referenceBases": "G", "alternateBases": [ "A" ], "calls": [ { "callSetId": "10473108253681171589-0", "callSetName": "CALLSET0", "genotype": [ 0, 1 ], } ] } // New variant with conflicting call information { "variantSetId": "10473108253681171589", "referenceName": "1", "start": "10582", "referenceBases": "G", "alternateBases": [ "A" ], "calls": [ { "callSetId": "10473108253681171589-0", "callSetName": "CALLSET0", "genotype": [ 1, 1 ], } ] } The resulting merged variant would overwrite the existing calls with those from the new variant: { "variantSetId": "10473108253681171589", "referenceName": "1", "start": "10582", "referenceBases": "G", "alternateBases": [ "A" ], "calls": [ { "callSetId": "10473108253681171589-0", "callSetName": "CALLSET0", "genotype": [ 1, 1 ], } ] } This may be the desired outcome, but it is up to the user to determine if if that is indeed the case."##), "Details at http://byron.github.io/google-apis-rs/google_genomics1_cli/variants_merge", vec![ (Some(r##"kv"##), @@ -4859,8 +6035,8 @@ fn main() { let mut app = App::new("genomics1") .author("Sebastian Thiel ") - .version("0.3.3+20160224") - .about("An API to store, process, explore, and share genomic data. It supports reference-based alignments, genetic variants, and reference genomes. This API provides an implementation of the Global Alliance for Genomics and Health (GA4GH) v0.5.1 API as well as several extensions.") + .version("0.3.4+20160407") + .about("Stores, processes, explores and shares genomic data. This API implements the Global Alliance for Genomics and Health (GA4GH) v0.5.1 API as well as several extensions.") .after_help("All documentation details can be found at http://byron.github.io/google-apis-rs/google_genomics1_cli") .arg(Arg::with_name("url") .long("scope") diff --git a/gen/genomics1/Cargo.toml b/gen/genomics1/Cargo.toml index d56118a7a3..eabed5f642 100644 --- a/gen/genomics1/Cargo.toml +++ b/gen/genomics1/Cargo.toml @@ -4,10 +4,11 @@ [package] name = "google-genomics1" -version = "0.1.12+20160224" +version = "0.1.13+20160407" authors = ["Sebastian Thiel "] description = "A complete library to interact with genomics (protocol v1)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/genomics1" +homepage = "https://cloud.google.com/genomics/" documentation = "http://byron.github.io/google-apis-rs/google_genomics1" license = "MIT" keywords = ["genomics", "google", "protocol", "web", "api"] @@ -15,14 +16,14 @@ build = "src/build.rs" [dependencies] -hyper = "0.7" -mime = "0.1.0" -serde = ">= 0.7.0" -serde_json = ">= 0.7.0" -yup-oauth2 = ">= 0.5.4" +hyper = "0.8" +mime = "0.2.0" +serde = "0.6.0" +serde_json = "0.6.0" +yup-oauth2 = ">= 0.5.6" url = ">= 0.5" [build-dependencies] -syntex = { version = ">= 0.23" } -serde_codegen = { version = ">= 0.6" } +syntex = { version = "= 0.28" } +serde_codegen = { version = "= 0.6.13" } diff --git a/gen/genomics1/README.md b/gen/genomics1/README.md index f72e93f635..a7b3d6e1c2 100644 --- a/gen/genomics1/README.md +++ b/gen/genomics1/README.md @@ -5,11 +5,18 @@ DO NOT EDIT ! --> The `google-genomics1` library allows access to all features of the *Google genomics* service. -This documentation was generated from *genomics* crate version *0.1.12+20160224*, where *20160224* is the exact revision of the *genomics:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.12*. +This documentation was generated from *genomics* crate version *0.1.13+20160407*, where *20160407* is the exact revision of the *genomics:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.13*. + +Everything else about the *genomics* *v1* API can be found at the +[official documentation site](https://cloud.google.com/genomics/). # Features Handle the following *Resources* with ease from the central [hub](http://byron.github.io/google-apis-rs/google_genomics1/struct.Genomics.html) ... +* [annotations](http://byron.github.io/google-apis-rs/google_genomics1/struct.Annotation.html) + * [*batch create*](http://byron.github.io/google-apis-rs/google_genomics1/struct.AnnotationBatchCreateCall.html), [*create*](http://byron.github.io/google-apis-rs/google_genomics1/struct.AnnotationCreateCall.html), [*delete*](http://byron.github.io/google-apis-rs/google_genomics1/struct.AnnotationDeleteCall.html), [*get*](http://byron.github.io/google-apis-rs/google_genomics1/struct.AnnotationGetCall.html), [*search*](http://byron.github.io/google-apis-rs/google_genomics1/struct.AnnotationSearchCall.html) and [*update*](http://byron.github.io/google-apis-rs/google_genomics1/struct.AnnotationUpdateCall.html) +* annotationsets + * [*create*](http://byron.github.io/google-apis-rs/google_genomics1/struct.AnnotationsetCreateCall.html), [*delete*](http://byron.github.io/google-apis-rs/google_genomics1/struct.AnnotationsetDeleteCall.html), [*get*](http://byron.github.io/google-apis-rs/google_genomics1/struct.AnnotationsetGetCall.html), [*search*](http://byron.github.io/google-apis-rs/google_genomics1/struct.AnnotationsetSearchCall.html) and [*update*](http://byron.github.io/google-apis-rs/google_genomics1/struct.AnnotationsetUpdateCall.html) * callsets * [*create*](http://byron.github.io/google-apis-rs/google_genomics1/struct.CallsetCreateCall.html), [*delete*](http://byron.github.io/google-apis-rs/google_genomics1/struct.CallsetDeleteCall.html), [*get*](http://byron.github.io/google-apis-rs/google_genomics1/struct.CallsetGetCall.html), [*patch*](http://byron.github.io/google-apis-rs/google_genomics1/struct.CallsetPatchCall.html) and [*search*](http://byron.github.io/google-apis-rs/google_genomics1/struct.CallsetSearchCall.html) * [datasets](http://byron.github.io/google-apis-rs/google_genomics1/struct.Dataset.html) diff --git a/gen/genomics1/src/cmn.rs b/gen/genomics1/src/cmn.rs index 87b91a8986..c69621da55 100644 --- a/gen/genomics1/src/cmn.rs +++ b/gen/genomics1/src/cmn.rs @@ -12,7 +12,7 @@ use mime::{Mime, TopLevel, SubLevel, Attr, Value}; use oauth2::{TokenType, Retry, self}; use hyper; use hyper::header::{ContentType, ContentLength, Headers, UserAgent, Authorization, Header, - HeaderFormat}; + HeaderFormat, Bearer}; use hyper::http::h1::LINE_ENDING; use hyper::method::Method; use hyper::status::StatusCode; @@ -634,7 +634,7 @@ pub struct ResumableUploadHelper<'a, A: 'a> { pub start_at: Option, pub auth: &'a mut A, pub user_agent: &'a str, - pub auth_header: Authorization, + pub auth_header: Authorization, pub url: &'a str, pub reader: &'a mut ReadSeek, pub media_type: Mime, diff --git a/gen/genomics1/src/lib.rs b/gen/genomics1/src/lib.rs index b0285b4f82..507ea6c721 100644 --- a/gen/genomics1/src/lib.rs +++ b/gen/genomics1/src/lib.rs @@ -2,12 +2,19 @@ // This file was generated automatically from 'src/mako/api/lib.rs.mako' // DO NOT EDIT ! -//! This documentation was generated from *genomics* crate version *0.1.12+20160224*, where *20160224* is the exact revision of the *genomics:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.12*. +//! This documentation was generated from *genomics* crate version *0.1.13+20160407*, where *20160407* is the exact revision of the *genomics:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.13*. +//! +//! Everything else about the *genomics* *v1* API can be found at the +//! [official documentation site](https://cloud.google.com/genomics/). //! The original source code is [on github](https://github.com/Byron/google-apis-rs/tree/master/gen/genomics1). //! # Features //! //! Handle the following *Resources* with ease from the central [hub](struct.Genomics.html) ... //! +//! * [annotations](struct.Annotation.html) +//! * [*batch create*](struct.AnnotationBatchCreateCall.html), [*create*](struct.AnnotationCreateCall.html), [*delete*](struct.AnnotationDeleteCall.html), [*get*](struct.AnnotationGetCall.html), [*search*](struct.AnnotationSearchCall.html) and [*update*](struct.AnnotationUpdateCall.html) +//! * annotationsets +//! * [*create*](struct.AnnotationsetCreateCall.html), [*delete*](struct.AnnotationsetDeleteCall.html), [*get*](struct.AnnotationsetGetCall.html), [*search*](struct.AnnotationsetSearchCall.html) and [*update*](struct.AnnotationsetUpdateCall.html) //! * callsets //! * [*create*](struct.CallsetCreateCall.html), [*delete*](struct.CallsetDeleteCall.html), [*get*](struct.CallsetGetCall.html), [*patch*](struct.CallsetPatchCall.html) and [*search*](struct.CallsetSearchCall.html) //! * [datasets](struct.Dataset.html) @@ -121,7 +128,7 @@ //! // execute the final call using `doit()`. //! // Values shown here are possibly random and not representative ! //! let result = hub.datasets().patch(req, "datasetId") -//! .update_mask("et") +//! .update_mask("dolor") //! .doit(); //! //! match result { diff --git a/gen/genomics1/src/lib.rs.in b/gen/genomics1/src/lib.rs.in index a513040a34..eef20f263d 100644 --- a/gen/genomics1/src/lib.rs.in +++ b/gen/genomics1/src/lib.rs.in @@ -150,10 +150,16 @@ impl<'a, C, A> Genomics Genomics { client: RefCell::new(client), auth: RefCell::new(authenticator), - _user_agent: "google-api-rust-client/0.1.12".to_string(), + _user_agent: "google-api-rust-client/0.1.13".to_string(), } } + pub fn annotations(&'a self) -> AnnotationMethods<'a, C, A> { + AnnotationMethods { hub: &self } + } + pub fn annotationsets(&'a self) -> AnnotationsetMethods<'a, C, A> { + AnnotationsetMethods { hub: &self } + } pub fn callsets(&'a self) -> CallsetMethods<'a, C, A> { CallsetMethods { hub: &self } } @@ -183,7 +189,7 @@ impl<'a, C, A> Genomics } /// Set the user-agent header field to use in all requests to the server. - /// It defaults to `google-api-rust-client/0.1.12`. + /// It defaults to `google-api-rust-client/0.1.13`. /// /// Returns the previously set user-agent. pub fn user_agent(&mut self, agent_name: String) -> String { @@ -197,6 +203,96 @@ impl<'a, C, A> Genomics // ############ // SCHEMAS ### // ########## +/// There is no detailed description. +/// +/// # Activities +/// +/// This type is used in activities, which are methods you may call on this type or where this type is involved in. +/// The list links the activity name, along with information about where it is used (one of *request* and *response*). +/// +/// * [stream variants](struct.VariantStreamCall.html) (response) +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct StreamVariantsResponse { + /// no description provided + pub variants: Option>, +} + +impl ResponseResult for StreamVariantsResponse {} + + +/// There is no detailed description. +/// +/// This type is not used in any activity, and only used as *part* of another schema. +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct ClinicalCondition { + /// The MedGen concept id associated with this gene. Search for these IDs at http://www.ncbi.nlm.nih.gov/medgen/ + #[serde(rename="conceptId")] + pub concept_id: Option, + /// The OMIM id for this condition. Search for these IDs at http://omim.org/ + #[serde(rename="omimId")] + pub omim_id: Option, + /// The set of external IDs for this condition. + #[serde(rename="externalIds")] + pub external_ids: Option>, + /// A set of names for the condition. + pub names: Option>, +} + +impl Part for ClinicalCondition {} + + +/// The search variant sets request. +/// +/// # Activities +/// +/// This type is used in activities, which are methods you may call on this type or where this type is involved in. +/// The list links the activity name, along with information about where it is used (one of *request* and *response*). +/// +/// * [search variantsets](struct.VariantsetSearchCall.html) (request) +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct SearchVariantSetsRequest { + /// The continuation token, which is used to page through large result sets. To get the next page of results, set this parameter to the value of `nextPageToken` from the previous response. + #[serde(rename="pageToken")] + pub page_token: Option, + /// Exactly one dataset ID must be provided here. Only variant sets which belong to this dataset will be returned. + #[serde(rename="datasetIds")] + pub dataset_ids: Option>, + /// The maximum number of results to return in a single page. If unspecified, defaults to 1024. + #[serde(rename="pageSize")] + pub page_size: Option, +} + +impl RequestValue for SearchVariantSetsRequest {} + + +/// The read group set export request. +/// +/// # Activities +/// +/// This type is used in activities, which are methods you may call on this type or where this type is involved in. +/// The list links the activity name, along with information about where it is used (one of *request* and *response*). +/// +/// * [export readgroupsets](struct.ReadgroupsetExportCall.html) (request) +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct ExportReadGroupSetRequest { + /// Required. The Google Developers Console project ID that owns this export. The caller must have WRITE access to this project. + #[serde(rename="projectId")] + pub project_id: Option, + /// The reference names to export. If this is not specified, all reference sequences, including unmapped reads, are exported. Use `*` to export only unmapped reads. + #[serde(rename="referenceNames")] + pub reference_names: Option>, + /// Required. A Google Cloud Storage URI for the exported BAM file. The currently authenticated user must have write access to the new file. An error will be returned if the URI already contains data. + #[serde(rename="exportUri")] + pub export_uri: Option, +} + +impl RequestValue for ExportReadGroupSetRequest {} + + /// The read group set search request. /// /// # Activities @@ -226,143 +322,47 @@ impl RequestValue for SearchReadGroupSetsRequest {} /// There is no detailed description. /// -/// # Activities -/// -/// This type is used in activities, which are methods you may call on this type or where this type is involved in. -/// The list links the activity name, along with information about where it is used (one of *request* and *response*). -/// -/// * [stream variants](struct.VariantStreamCall.html) (response) -/// -#[derive(Default, Clone, Debug, Serialize, Deserialize)] -pub struct StreamVariantsResponse { - /// no description provided - pub variants: Option>, -} - -impl ResponseResult for StreamVariantsResponse {} - - -/// Request message for `SetIamPolicy` method. -/// -/// # Activities -/// -/// This type is used in activities, which are methods you may call on this type or where this type is involved in. -/// The list links the activity name, along with information about where it is used (one of *request* and *response*). -/// -/// * [set iam policy datasets](struct.DatasetSetIamPolicyCall.html) (request) -/// -#[derive(Default, Clone, Debug, Serialize, Deserialize)] -pub struct SetIamPolicyRequest { - /// REQUIRED: The complete policy to be applied to the `resource`. The size of the policy is limited to a few 10s of KB. An empty policy is a valid policy but certain Cloud Platform services (such as Projects) might reject them. - pub policy: Option, -} - -impl RequestValue for SetIamPolicyRequest {} - - -/// Associates `members` with a `role`. -/// /// This type is not used in any activity, and only used as *part* of another schema. /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] -pub struct Binding { - /// Role that is assigned to `members`. For example, `roles/viewer`, `roles/editor`, or `roles/owner`. Required - pub role: Option, - /// Specifies the identities requesting access for a Cloud Platform resource. `members` can have the following values: * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account. * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account. * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@gmail.com` or `joe@example.com`. * `serviceAccount:{emailid}`: An email address that represents a service account. For example, `my-other-app@appspot.gserviceaccount.com`. * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`. * `domain:{domain}`: A Google Apps domain name that represents all the users of that domain. For example, `google.com` or `example.com`. - pub members: Option>, +pub struct VariantAnnotation { + /// Google annotation IDs of the transcripts affected by this variant. These should be provided when the variant is created. + #[serde(rename="transcriptIds")] + pub transcript_ids: Option>, + /// The alternate allele for this variant. If multiple alternate alleles exist at this location, create a separate variant for each one, as they may represent distinct conditions. + #[serde(rename="alternateBases")] + pub alternate_bases: Option, + /// Describes the clinical significance of a variant. It is adapted from the ClinVar controlled vocabulary for clinical significance described at: http://www.ncbi.nlm.nih.gov/clinvar/docs/clinsig/ + #[serde(rename="clinicalSignificance")] + pub clinical_significance: Option, + /// The set of conditions associated with this variant. A condition describes the way a variant influences human health. + pub conditions: Option>, + /// Type has been adapted from ClinVar's list of variant types. + #[serde(rename="type")] + pub type_: Option, + /// Effect of the variant on the coding sequence. + pub effect: Option, + /// Google annotation ID of the gene affected by this variant. This should be provided when the variant is created. + #[serde(rename="geneId")] + pub gene_id: Option, } -impl Part for Binding {} - - -/// The search variant sets request. -/// -/// # Activities -/// -/// This type is used in activities, which are methods you may call on this type or where this type is involved in. -/// The list links the activity name, along with information about where it is used (one of *request* and *response*). -/// -/// * [search variantsets](struct.VariantsetSearchCall.html) (request) -/// -#[derive(Default, Clone, Debug, Serialize, Deserialize)] -pub struct SearchVariantSetsRequest { - /// The continuation token, which is used to page through large result sets. To get the next page of results, set this parameter to the value of `nextPageToken` from the previous response. - #[serde(rename="pageToken")] - pub page_token: Option, - /// Exactly one dataset ID must be provided here. Only variant sets which belong to this dataset will be returned. - #[serde(rename="datasetIds")] - pub dataset_ids: Option>, - /// The maximum number of results to return in a single page. If unspecified, defaults to 1024. - #[serde(rename="pageSize")] - pub page_size: Option, -} - -impl RequestValue for SearchVariantSetsRequest {} +impl Part for VariantAnnotation {} /// There is no detailed description. /// -/// # Activities -/// -/// This type is used in activities, which are methods you may call on this type or where this type is involved in. -/// The list links the activity name, along with information about where it is used (one of *request* and *response*). -/// -/// * [bases list references](struct.ReferenceBaseListCall.html) (response) -/// -#[derive(Default, Clone, Debug, Serialize, Deserialize)] -pub struct ListBasesResponse { - /// The continuation token, which is used to page through large result sets. Provide this value in a subsequent request to return the next page of results. This field will be empty if there aren't any additional results. - #[serde(rename="nextPageToken")] - pub next_page_token: Option, - /// The offset position (0-based) of the given `sequence` from the start of this `Reference`. This value will differ for each page in a paginated request. - pub offset: Option, - /// A substring of the bases that make up this reference. - pub sequence: Option, -} - -impl ResponseResult for ListBasesResponse {} - - -/// ReferenceBound records an upper bound for the starting coordinate of variants in a particular reference. -/// /// This type is not used in any activity, and only used as *part* of another schema. /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] -pub struct ReferenceBound { - /// An upper bound (inclusive) on the starting coordinate of any variant in the reference sequence. - #[serde(rename="upperBound")] - pub upper_bound: Option, - /// The name of the reference associated with this reference bound. - #[serde(rename="referenceName")] - pub reference_name: Option, +pub struct Entry { + /// The creation status. + pub status: Option, + /// The created annotation, if creation was successful. + pub annotation: Option, } -impl Part for ReferenceBound {} - - -/// The read group set export request. -/// -/// # Activities -/// -/// This type is used in activities, which are methods you may call on this type or where this type is involved in. -/// The list links the activity name, along with information about where it is used (one of *request* and *response*). -/// -/// * [export readgroupsets](struct.ReadgroupsetExportCall.html) (request) -/// -#[derive(Default, Clone, Debug, Serialize, Deserialize)] -pub struct ExportReadGroupSetRequest { - /// Required. The Google Developers Console project ID that owns this export. The caller must have WRITE access to this project. - #[serde(rename="projectId")] - pub project_id: Option, - /// The reference names to export. If this is not specified, all reference sequences, including unmapped reads, are exported. Use `*` to export only unmapped reads. - #[serde(rename="referenceNames")] - pub reference_names: Option>, - /// Required. A Google Cloud Storage URI for the exported BAM file. The currently authenticated user must have write access to the new file. An error will be returned if the URI already contains data. - #[serde(rename="exportUri")] - pub export_uri: Option, -} - -impl RequestValue for ExportReadGroupSetRequest {} +impl Part for Entry {} /// There is no detailed description. @@ -388,48 +388,6 @@ pub struct Program { impl Part for Program {} -/// An abstraction for referring to a genomic position, in relation to some already known reference. For now, represents a genomic position as a reference name, a base number on that reference (0-based), and a determination of forward or reverse strand. -/// -/// This type is not used in any activity, and only used as *part* of another schema. -/// -#[derive(Default, Clone, Debug, Serialize, Deserialize)] -pub struct Position { - /// The 0-based offset from the start of the forward strand for that reference. - pub position: Option, - /// Whether this position is on the reverse strand, as opposed to the forward strand. - #[serde(rename="reverseStrand")] - pub reverse_strand: Option, - /// The name of the reference in whatever reference set is being used. - #[serde(rename="referenceName")] - pub reference_name: Option, -} - -impl Part for Position {} - - -/// Defines an Identity and Access Management (IAM) policy. It is used to specify access control policies for Cloud Platform resources. A `Policy` consists of a list of `bindings`. A `Binding` binds a list of `members` to a `role`, where the members can be user accounts, Google groups, Google domains, and service accounts. A `role` is a named list of permissions defined by IAM. **Example** { "bindings": [ { "role": "roles/owner", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-other-app@appspot.gserviceaccount.com", ] }, { "role": "roles/viewer", "members": ["user:sean@example.com"] } ] } For a description of IAM and its features, see the [IAM developer's guide](https://cloud.google.com/iam). -/// -/// # Activities -/// -/// This type is used in activities, which are methods you may call on this type or where this type is involved in. -/// The list links the activity name, along with information about where it is used (one of *request* and *response*). -/// -/// * [set iam policy datasets](struct.DatasetSetIamPolicyCall.html) (response) -/// * [get iam policy datasets](struct.DatasetGetIamPolicyCall.html) (response) -/// -#[derive(Default, Clone, Debug, Serialize, Deserialize)] -pub struct Policy { - /// Associates a list of `members` to a `role`. Multiple `bindings` must not be specified for the same `role`. `bindings` with no members will result in an error. - pub bindings: Option>, - /// Version of the `Policy`. The default version is 0. - pub version: Option, - /// `etag` is used for optimistic concurrency control as a way to help prevent simultaneous updates of a policy from overwriting each other. It is strongly suggested that systems make use of the `etag` in the read-modify-write cycle to perform policy updates in order to avoid race conditions: An `etag` is returned in the response to `getIamPolicy`, and systems are expected to put that etag in the request to `setIamPolicy` to ensure that their change will be applied to the same version of the policy. If no `etag` is provided in the call to `setIamPolicy`, then the existing policy is overwritten blindly. - pub etag: Option, -} - -impl ResponseResult for Policy {} - - /// The variant data import request. /// /// # Activities @@ -449,6 +407,9 @@ pub struct ImportVariantsRequest { /// A list of URIs referencing variant files in Google Cloud Storage. URIs can include wildcards [as described here](https://cloud.google.com/storage/docs/gsutil/addlhelp/WildcardNames). Note that recursive wildcards ('**') are not supported. #[serde(rename="sourceUris")] pub source_uris: Option>, + /// A mapping between info field keys and the InfoMergeOperations to be performed on them. This is plumbed down to the MergeVariantRequests generated by the resulting import job. + #[serde(rename="infoMergeConfig")] + pub info_merge_config: Option>, /// Convert reference names to the canonical representation. hg19 haploytypes (those reference names containing "_hap") are not modified in any way. All other reference names are modified according to the following rules: The reference name is capitalized. The "chr" prefix is dropped for all autosomes and sex chromsomes. For example "chr17" becomes "17" and "chrX" becomes "X". All mitochondrial chromosomes ("chrM", "chrMT", etc) become "MT". #[serde(rename="normalizeReferenceNames")] pub normalize_reference_names: Option, @@ -467,10 +428,12 @@ impl RequestValue for ImportVariantsRequest {} /// * [delete datasets](struct.DatasetDeleteCall.html) (response) /// * [cancel operations](struct.OperationCancelCall.html) (response) /// * [delete readgroupsets](struct.ReadgroupsetDeleteCall.html) (response) +/// * [delete annotations](struct.AnnotationDeleteCall.html) (response) /// * [delete callsets](struct.CallsetDeleteCall.html) (response) /// * [delete variantsets](struct.VariantsetDeleteCall.html) (response) /// * [delete variants](struct.VariantDeleteCall.html) (response) /// * [merge variants](struct.VariantMergeCall.html) (response) +/// * [delete annotationsets](struct.AnnotationsetDeleteCall.html) (response) /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Empty; @@ -538,20 +501,713 @@ pub struct TestIamPermissionsResponse { impl ResponseResult for TestIamPermissionsResponse {} -/// A bucket over which read coverage has been precomputed. A bucket corresponds to a specific range of the reference sequence. +/// There is no detailed description. +/// +/// # Activities +/// +/// This type is used in activities, which are methods you may call on this type or where this type is involved in. +/// The list links the activity name, along with information about where it is used (one of *request* and *response*). +/// +/// * [search annotations](struct.AnnotationSearchCall.html) (response) +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct SearchAnnotationsResponse { + /// The continuation token, which is used to page through large result sets. Provide this value in a subsequent request to return the next page of results. This field will be empty if there aren't any additional results. + #[serde(rename="nextPageToken")] + pub next_page_token: Option, + /// The matching annotations. + pub annotations: Option>, +} + +impl ResponseResult for SearchAnnotationsResponse {} + + +/// A transcript represents the assertion that a particular region of the reference genome may be transcribed as RNA. /// /// This type is not used in any activity, and only used as *part* of another schema. /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] -pub struct CoverageBucket { - /// The average number of reads which are aligned to each individual reference base in this bucket. - #[serde(rename="meanCoverage")] - pub mean_coverage: Option, - /// The genomic coordinate range spanned by this bucket. - pub range: Option, +pub struct Transcript { + /// The range of the coding sequence for this transcript, if any. To determine the exact ranges of coding sequence, intersect this range with those of the `exons`, if any. If there are any `exons`, the `codingSequence` must start and end within them. Note that in some cases, the reference genome will not exactly match the observed mRNA transcript e.g. due to variance in the source genome from reference. In these cases, `exon.frame` will not necessarily match the expected reference reading frame and coding exon reference bases cannot necessarily be concatenated to produce the original transcript mRNA. + #[serde(rename="codingSequence")] + pub coding_sequence: Option, + /// The annotation ID of the gene from which this transcript is transcribed. + #[serde(rename="geneId")] + pub gene_id: Option, + /// The exons that compose this transcript. This field should be unset for genomes where transcript splicing does not occur, for example prokaryotes. Introns are regions of the transcript that are not included in the spliced RNA product. Though not explicitly modeled here, intron ranges can be deduced; all regions of this transcript that are not exons are introns. Exonic sequences do not necessarily code for a translational product (amino acids). Only the regions of exons bounded by the `codingSequence` correspond to coding DNA sequence. Exons are ordered by start position and may not overlap. + pub exons: Option>, } -impl Part for CoverageBucket {} +impl Part for Transcript {} + + +/// An annotation describes a region of reference genome. The value of an annotation may be one of several canonical types, supplemented by arbitrary info tags. An annotation is not inherently associated with a specific sample or individual (though a client could choose to use annotations in this way). Example canonical annotation types are `GENE` and `VARIANT`. +/// +/// # Activities +/// +/// This type is used in activities, which are methods you may call on this type or where this type is involved in. +/// The list links the activity name, along with information about where it is used (one of *request* and *response*). +/// +/// * [search annotations](struct.AnnotationSearchCall.html) (none) +/// * [create annotations](struct.AnnotationCreateCall.html) (request|response) +/// * [delete annotations](struct.AnnotationDeleteCall.html) (none) +/// * [update annotations](struct.AnnotationUpdateCall.html) (request|response) +/// * [get annotations](struct.AnnotationGetCall.html) (response) +/// * [batch create annotations](struct.AnnotationBatchCreateCall.html) (none) +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct Annotation { + /// A map of additional read alignment information. This must be of the form map (string key mapping to a list of string values). + pub info: Option>>, + /// The ID of the Google Genomics reference associated with this range. + #[serde(rename="referenceId")] + pub reference_id: Option, + /// The end position of the range on the reference, 0-based exclusive. + pub end: Option, + /// The display name of this annotation. + pub name: Option, + /// The data type for this annotation. Must match the containing annotation set's type. + #[serde(rename="type")] + pub type_: Option, + /// A variant annotation, which describes the effect of a variant on the genome, the coding sequence, and/or higher level consequences at the organism level e.g. pathogenicity. This field is only set for annotations of type `VARIANT`. + pub variant: Option, + /// The start position of the range on the reference, 0-based inclusive. + pub start: Option, + /// The annotation set to which this annotation belongs. + #[serde(rename="annotationSetId")] + pub annotation_set_id: Option, + /// The display name corresponding to the reference specified by `referenceId`, for example `chr1`, `1`, or `chrX`. + #[serde(rename="referenceName")] + pub reference_name: Option, + /// Whether this range refers to the reverse strand, as opposed to the forward strand. Note that regardless of this field, the start/end position of the range always refer to the forward strand. + #[serde(rename="reverseStrand")] + pub reverse_strand: Option, + /// A transcript value represents the assertion that a particular region of the reference genome may be transcribed as RNA. An alternative splicing pattern would be represented as a separate transcript object. This field is only set for annotations of type `TRANSCRIPT`. + pub transcript: Option, + /// The server-generated annotation ID, unique across all annotations. + pub id: Option, +} + +impl RequestValue for Annotation {} +impl Resource for Annotation {} +impl ResponseResult for Annotation {} + + +/// Request message for `GetIamPolicy` method. +/// +/// # Activities +/// +/// This type is used in activities, which are methods you may call on this type or where this type is involved in. +/// The list links the activity name, along with information about where it is used (one of *request* and *response*). +/// +/// * [get iam policy datasets](struct.DatasetGetIamPolicyCall.html) (request) +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct GetIamPolicyRequest; + +impl RequestValue for GetIamPolicyRequest {} + + +/// There is no detailed description. +/// +/// # Activities +/// +/// This type is used in activities, which are methods you may call on this type or where this type is involved in. +/// The list links the activity name, along with information about where it is used (one of *request* and *response*). +/// +/// * [merge variants](struct.VariantMergeCall.html) (request) +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct MergeVariantsRequest { + /// The destination variant set. + #[serde(rename="variantSetId")] + pub variant_set_id: Option, + /// The variants to be merged with existing variants. + pub variants: Option>, + /// A mapping between info field keys and the InfoMergeOperations to be performed on them. + #[serde(rename="infoMergeConfig")] + pub info_merge_config: Option>, +} + +impl RequestValue for MergeVariantsRequest {} + + +/// Metadata describes a single piece of variant call metadata. These data include a top level key and either a single value string (value) or a list of key-value pairs (info.) Value and info are mutually exclusive. +/// +/// This type is not used in any activity, and only used as *part* of another schema. +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct VariantSetMetadata { + /// Remaining structured metadata key-value pairs. This must be of the form map (string key mapping to a list of string values). + pub info: Option>>, + /// A textual description of this metadata. + pub description: Option, + /// The top-level key. + pub key: Option, + /// The type of data. Possible types include: Integer, Float, Flag, Character, and String. + #[serde(rename="type")] + pub type_: Option, + /// The number of values that can be included in a field described by this metadata. + pub number: Option, + /// The value field for simple metadata + pub value: Option, + /// User-provided ID field, not enforced by this API. Two or more pieces of structured metadata with identical id and key fields are considered equivalent. + pub id: Option, +} + +impl Part for VariantSetMetadata {} + + +/// Request message for `TestIamPermissions` method. +/// +/// # Activities +/// +/// This type is used in activities, which are methods you may call on this type or where this type is involved in. +/// The list links the activity name, along with information about where it is used (one of *request* and *response*). +/// +/// * [test iam permissions datasets](struct.DatasetTestIamPermissionCall.html) (request) +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct TestIamPermissionsRequest { + /// REQUIRED: The set of permissions to check for the 'resource'. Permissions with wildcards (such as '*' or 'storage.*') are not allowed. Allowed permissions are: * `genomics.datasets.create` * `genomics.datasets.delete` * `genomics.datasets.get` * `genomics.datasets.list` * `genomics.datasets.update` * `genomics.datasets.getIamPolicy` * `genomics.datasets.setIamPolicy` + pub permissions: Option>, +} + +impl RequestValue for TestIamPermissionsRequest {} + + +/// There is no detailed description. +/// +/// This type is not used in any activity, and only used as *part* of another schema. +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct ExternalId { + /// The name of the source of this data. + #[serde(rename="sourceName")] + pub source_name: Option, + /// The id used by the source of this data. + pub id: Option, +} + +impl Part for ExternalId {} + + +/// A call set is a collection of variant calls, typically for one sample. It belongs to a variant set. For more genomics resource definitions, see [Fundamentals of Google Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) +/// +/// # Activities +/// +/// This type is used in activities, which are methods you may call on this type or where this type is involved in. +/// The list links the activity name, along with information about where it is used (one of *request* and *response*). +/// +/// * [create callsets](struct.CallsetCreateCall.html) (request|response) +/// * [patch callsets](struct.CallsetPatchCall.html) (request|response) +/// * [get callsets](struct.CallsetGetCall.html) (response) +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct CallSet { + /// A map of additional call set information. This must be of the form map (string key mapping to a list of string values). + pub info: Option>>, + /// The IDs of the variant sets this call set belongs to. This field must have exactly length one, as a call set belongs to a single variant set. This field is repeated for compatibility with the [GA4GH 0.5.1 API](https://github.com/ga4gh/schemas/blob/v0.5.1/src/main/resources/avro/variants.avdl#L76). + #[serde(rename="variantSetIds")] + pub variant_set_ids: Option>, + /// The call set name. + pub name: Option, + /// The date this call set was created in milliseconds from the epoch. + pub created: Option, + /// The sample ID this call set corresponds to. + #[serde(rename="sampleId")] + pub sample_id: Option, + /// The server-generated call set ID, unique across all call sets. + pub id: Option, +} + +impl RequestValue for CallSet {} +impl Resource for CallSet {} +impl ResponseResult for CallSet {} + + +/// An abstraction for referring to a genomic position, in relation to some already known reference. For now, represents a genomic position as a reference name, a base number on that reference (0-based), and a determination of forward or reverse strand. +/// +/// This type is not used in any activity, and only used as *part* of another schema. +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct Position { + /// The 0-based offset from the start of the forward strand for that reference. + pub position: Option, + /// Whether this position is on the reverse strand, as opposed to the forward strand. + #[serde(rename="reverseStrand")] + pub reverse_strand: Option, + /// The name of the reference in whatever reference set is being used. + #[serde(rename="referenceName")] + pub reference_name: Option, +} + +impl Part for Position {} + + +/// ReferenceBound records an upper bound for the starting coordinate of variants in a particular reference. +/// +/// This type is not used in any activity, and only used as *part* of another schema. +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct ReferenceBound { + /// An upper bound (inclusive) on the starting coordinate of any variant in the reference sequence. + #[serde(rename="upperBound")] + pub upper_bound: Option, + /// The name of the reference associated with this reference bound. + #[serde(rename="referenceName")] + pub reference_name: Option, +} + +impl Part for ReferenceBound {} + + +/// There is no detailed description. +/// +/// # Activities +/// +/// This type is used in activities, which are methods you may call on this type or where this type is involved in. +/// The list links the activity name, along with information about where it is used (one of *request* and *response*). +/// +/// * [batch create annotations](struct.AnnotationBatchCreateCall.html) (response) +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct BatchCreateAnnotationsResponse { + /// The resulting per-annotation entries, ordered consistently with the original request. + pub entries: Option>, +} + +impl ResponseResult for BatchCreateAnnotationsResponse {} + + +/// The dataset list response. +/// +/// # Activities +/// +/// This type is used in activities, which are methods you may call on this type or where this type is involved in. +/// The list links the activity name, along with information about where it is used (one of *request* and *response*). +/// +/// * [list datasets](struct.DatasetListCall.html) (response) +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct ListDatasetsResponse { + /// The continuation token, which is used to page through large result sets. Provide this value in a subsequent request to return the next page of results. This field will be empty if there aren't any additional results. + #[serde(rename="nextPageToken")] + pub next_page_token: Option, + /// The list of matching Datasets. + pub datasets: Option>, +} + +impl ResponseResult for ListDatasetsResponse {} + + +/// The read group set import request. +/// +/// # Activities +/// +/// This type is used in activities, which are methods you may call on this type or where this type is involved in. +/// The list links the activity name, along with information about where it is used (one of *request* and *response*). +/// +/// * [import readgroupsets](struct.ReadgroupsetImportCall.html) (request) +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct ImportReadGroupSetsRequest { + /// The reference set to which the imported read group sets are aligned to, if any. The reference names of this reference set must be a superset of those found in the imported file headers. If no reference set id is provided, a best effort is made to associate with a matching reference set. + #[serde(rename="referenceSetId")] + pub reference_set_id: Option, + /// A list of URIs pointing at [BAM files](https://samtools.github.io/hts-specs/SAMv1.pdf) in Google Cloud Storage. + #[serde(rename="sourceUris")] + pub source_uris: Option>, + /// The partition strategy describes how read groups are partitioned into read group sets. + #[serde(rename="partitionStrategy")] + pub partition_strategy: Option, + /// Required. The ID of the dataset these read group sets will belong to. The caller must have WRITE permissions to this dataset. + #[serde(rename="datasetId")] + pub dataset_id: Option, +} + +impl RequestValue for ImportReadGroupSetsRequest {} + + +/// A reference is a canonical assembled DNA sequence, intended to act as a reference coordinate space for other genomic annotations. A single reference might represent the human chromosome 1 or mitochandrial DNA, for instance. A reference belongs to one or more reference sets. For more genomics resource definitions, see [Fundamentals of Google Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) +/// +/// # Activities +/// +/// This type is used in activities, which are methods you may call on this type or where this type is involved in. +/// The list links the activity name, along with information about where it is used (one of *request* and *response*). +/// +/// * [bases list references](struct.ReferenceBaseListCall.html) (none) +/// * [search references](struct.ReferenceSearchCall.html) (none) +/// * [get references](struct.ReferenceGetCall.html) (response) +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct Reference { + /// MD5 of the upper-case sequence excluding all whitespace characters (this is equivalent to SQ:M5 in SAM). This value is represented in lower case hexadecimal format. + pub md5checksum: Option, + /// The length of this reference's sequence. + pub length: Option, + /// The name of this reference, for example `22`. + pub name: Option, + /// The URI from which the sequence was obtained. Typically specifies a FASTA format file. + #[serde(rename="sourceUri")] + pub source_uri: Option, + /// All known corresponding accession IDs in INSDC (GenBank/ENA/DDBJ) ideally with a version number, for example `GCF_000001405.26`. + #[serde(rename="sourceAccessions")] + pub source_accessions: Option>, + /// The server-generated reference ID, unique across all references. + pub id: Option, + /// ID from http://www.ncbi.nlm.nih.gov/taxonomy. For example, 9606 for human. + #[serde(rename="ncbiTaxonId")] + pub ncbi_taxon_id: Option, +} + +impl Resource for Reference {} +impl ResponseResult for Reference {} + + +/// The variant data export request. +/// +/// # Activities +/// +/// This type is used in activities, which are methods you may call on this type or where this type is involved in. +/// The list links the activity name, along with information about where it is used (one of *request* and *response*). +/// +/// * [export variantsets](struct.VariantsetExportCall.html) (request) +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct ExportVariantSetRequest { + /// Required. The Google Cloud project ID that owns the destination BigQuery dataset. The caller must have WRITE access to this project. This project will also own the resulting export job. + #[serde(rename="projectId")] + pub project_id: Option, + /// The format for the exported data. + pub format: Option, + /// Required. The BigQuery dataset to export data to. This dataset must already exist. Note that this is distinct from the Genomics concept of "dataset". + #[serde(rename="bigqueryDataset")] + pub bigquery_dataset: Option, + /// If provided, only variant call information from the specified call sets will be exported. By default all variant calls are exported. + #[serde(rename="callSetIds")] + pub call_set_ids: Option>, + /// Required. The BigQuery table to export data to. If the table doesn't exist, it will be created. If it already exists, it will be overwritten. + #[serde(rename="bigqueryTable")] + pub bigquery_table: Option, +} + +impl RequestValue for ExportVariantSetRequest {} + + +/// Associates `members` with a `role`. +/// +/// This type is not used in any activity, and only used as *part* of another schema. +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct Binding { + /// Role that is assigned to `members`. For example, `roles/viewer`, `roles/editor`, or `roles/owner`. Required + pub role: Option, + /// Specifies the identities requesting access for a Cloud Platform resource. `members` can have the following values: * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account. * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account. * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@gmail.com` or `joe@example.com`. * `serviceAccount:{emailid}`: An email address that represents a service account. For example, `my-other-app@appspot.gserviceaccount.com`. * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`. * `domain:{domain}`: A Google Apps domain name that represents all the users of that domain. For example, `google.com` or `example.com`. + pub members: Option>, +} + +impl Part for Binding {} + + +/// There is no detailed description. +/// +/// # Activities +/// +/// This type is used in activities, which are methods you may call on this type or where this type is involved in. +/// The list links the activity name, along with information about where it is used (one of *request* and *response*). +/// +/// * [search references](struct.ReferenceSearchCall.html) (request) +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct SearchReferencesRequest { + /// If present, return references for which the md5checksum matches exactly. + pub md5checksums: Option>, + /// The continuation token, which is used to page through large result sets. To get the next page of results, set this parameter to the value of `nextPageToken` from the previous response. + #[serde(rename="pageToken")] + pub page_token: Option, + /// If present, return only references which belong to this reference set. + #[serde(rename="referenceSetId")] + pub reference_set_id: Option, + /// If present, return references for which a prefix of any of sourceAccessions match any of these strings. Accession numbers typically have a main number and a version, for example `GCF_000001405.26`. + pub accessions: Option>, + /// The maximum number of results to return in a single page. If unspecified, defaults to 1024. The maximum value is 4096. + #[serde(rename="pageSize")] + pub page_size: Option, +} + +impl RequestValue for SearchReferencesRequest {} + + +/// There is no detailed description. +/// +/// This type is not used in any activity, and only used as *part* of another schema. +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct Experiment { + /// The sequencing center used as part of this experiment. + #[serde(rename="sequencingCenter")] + pub sequencing_center: Option, + /// A client-supplied library identifier; a library is a collection of DNA fragments which have been prepared for sequencing from a sample. This field is important for quality control as error or bias can be introduced during sample preparation. + #[serde(rename="libraryId")] + pub library_id: Option, + /// The instrument model used as part of this experiment. This maps to sequencing technology in the SAM spec. + #[serde(rename="instrumentModel")] + pub instrument_model: Option, + /// The platform unit used as part of this experiment, for example flowcell-barcode.lane for Illumina or slide for SOLiD. Corresponds to the @RG PU field in the SAM spec. + #[serde(rename="platformUnit")] + pub platform_unit: Option, +} + +impl Part for Experiment {} + + +/// A read group is all the data that's processed the same way by the sequencer. +/// +/// This type is not used in any activity, and only used as *part* of another schema. +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct ReadGroup { + /// A map of additional read group information. This must be of the form map (string key mapping to a list of string values). + pub info: Option>>, + /// The predicted insert size of this read group. The insert size is the length the sequenced DNA fragment from end-to-end, not including the adapters. + #[serde(rename="predictedInsertSize")] + pub predicted_insert_size: Option, + /// A free-form text description of this read group. + pub description: Option, + /// The programs used to generate this read group. Programs are always identical for all read groups within a read group set. For this reason, only the first read group in a returned set will have this field populated. + pub programs: Option>, + /// A client-supplied sample identifier for the reads in this read group. + #[serde(rename="sampleId")] + pub sample_id: Option, + /// The experiment used to generate this read group. + pub experiment: Option, + /// The reference set the reads in this read group are aligned to. + #[serde(rename="referenceSetId")] + pub reference_set_id: Option, + /// The server-generated read group ID, unique for all read groups. Note: This is different than the @RG ID field in the SAM spec. For that value, see name. + pub id: Option, + /// The dataset to which this read group belongs. + #[serde(rename="datasetId")] + pub dataset_id: Option, + /// The read group name. This corresponds to the @RG ID field in the SAM spec. + pub name: Option, +} + +impl Part for ReadGroup {} + + +/// The read group set search response. +/// +/// # Activities +/// +/// This type is used in activities, which are methods you may call on this type or where this type is involved in. +/// The list links the activity name, along with information about where it is used (one of *request* and *response*). +/// +/// * [search readgroupsets](struct.ReadgroupsetSearchCall.html) (response) +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct SearchReadGroupSetsResponse { + /// The continuation token, which is used to page through large result sets. Provide this value in a subsequent request to return the next page of results. This field will be empty if there aren't any additional results. + #[serde(rename="nextPageToken")] + pub next_page_token: Option, + /// The list of matching read group sets. + #[serde(rename="readGroupSets")] + pub read_group_sets: Option>, +} + +impl ResponseResult for SearchReadGroupSetsResponse {} + + +/// This resource represents a long-running operation that is the result of a network API call. +/// +/// # Activities +/// +/// This type is used in activities, which are methods you may call on this type or where this type is involved in. +/// The list links the activity name, along with information about where it is used (one of *request* and *response*). +/// +/// * [cancel operations](struct.OperationCancelCall.html) (none) +/// * [export variantsets](struct.VariantsetExportCall.html) (response) +/// * [export readgroupsets](struct.ReadgroupsetExportCall.html) (response) +/// * [import variants](struct.VariantImportCall.html) (response) +/// * [import readgroupsets](struct.ReadgroupsetImportCall.html) (response) +/// * [get operations](struct.OperationGetCall.html) (response) +/// * [list operations](struct.OperationListCall.html) (none) +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct Operation { + /// An OperationMetadata object. This will always be returned with the Operation. + pub metadata: Option>, + /// If the value is `false`, it means the operation is still in progress. If true, the operation is completed, and either `error` or `response` is available. + pub done: Option, + /// If importing ReadGroupSets, an ImportReadGroupSetsResponse is returned. If importing Variants, an ImportVariantsResponse is returned. For exports, an empty response is returned. + pub response: Option>, + /// The server-assigned name, which is only unique within the same service that originally returns it. For example: `operations/CJHU7Oi_ChDrveSpBRjfuL-qzoWAgEw` + pub name: Option, + /// The error result of the operation in case of failure. + pub error: Option, +} + +impl Resource for Operation {} +impl ResponseResult for Operation {} + + +/// The call set search request. +/// +/// # Activities +/// +/// This type is used in activities, which are methods you may call on this type or where this type is involved in. +/// The list links the activity name, along with information about where it is used (one of *request* and *response*). +/// +/// * [search callsets](struct.CallsetSearchCall.html) (request) +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct SearchCallSetsRequest { + /// The continuation token, which is used to page through large result sets. To get the next page of results, set this parameter to the value of `nextPageToken` from the previous response. + #[serde(rename="pageToken")] + pub page_token: Option, + /// Restrict the query to call sets within the given variant sets. At least one ID must be provided. + #[serde(rename="variantSetIds")] + pub variant_set_ids: Option>, + /// Only return call sets for which a substring of the name matches this string. + pub name: Option, + /// The maximum number of results to return in a single page. If unspecified, defaults to 1024. + #[serde(rename="pageSize")] + pub page_size: Option, +} + +impl RequestValue for SearchCallSetsRequest {} + + +/// Request message for `SetIamPolicy` method. +/// +/// # Activities +/// +/// This type is used in activities, which are methods you may call on this type or where this type is involved in. +/// The list links the activity name, along with information about where it is used (one of *request* and *response*). +/// +/// * [set iam policy datasets](struct.DatasetSetIamPolicyCall.html) (request) +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct SetIamPolicyRequest { + /// REQUIRED: The complete policy to be applied to the `resource`. The size of the policy is limited to a few 10s of KB. An empty policy is a valid policy but certain Cloud Platform services (such as Projects) might reject them. + pub policy: Option, +} + +impl RequestValue for SetIamPolicyRequest {} + + +/// A call represents the determination of genotype with respect to a particular variant. It may include associated information such as quality and phasing. For example, a call might assign a probability of 0.32 to the occurrence of a SNP named rs1234 in a call set with the name NA12345. +/// +/// This type is not used in any activity, and only used as *part* of another schema. +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct VariantCall { + /// A map of additional variant call information. This must be of the form map (string key mapping to a list of string values). + pub info: Option>>, + /// The genotype of this variant call. Each value represents either the value of the `referenceBases` field or a 1-based index into `alternateBases`. If a variant had a `referenceBases` value of `T` and an `alternateBases` value of `["A", "C"]`, and the `genotype` was `[2, 1]`, that would mean the call represented the heterozygous value `CA` for this variant. If the `genotype` was instead `[0, 1]`, the represented value would be `TA`. Ordering of the genotype values is important if the `phaseset` is present. If a genotype is not called (that is, a `.` is present in the GT string) -1 is returned. + pub genotype: Option>, + /// The ID of the call set this variant call belongs to. + #[serde(rename="callSetId")] + pub call_set_id: Option, + /// If this field is present, this variant call's genotype ordering implies the phase of the bases and is consistent with any other variant calls in the same reference sequence which have the same phaseset value. When importing data from VCF, if the genotype data was phased but no phase set was specified this field will be set to `*`. + pub phaseset: Option, + /// The genotype likelihoods for this variant call. Each array entry represents how likely a specific genotype is for this call. The value ordering is defined by the GL tag in the VCF spec. If Phred-scaled genotype likelihood scores (PL) are available and log10(P) genotype likelihood scores (GL) are not, PL scores are converted to GL scores. If both are available, PL scores are stored in `info`. + #[serde(rename="genotypeLikelihood")] + pub genotype_likelihood: Option>, + /// The name of the call set this variant call belongs to. + #[serde(rename="callSetName")] + pub call_set_name: Option, +} + +impl Part for VariantCall {} + + +/// There is no detailed description. +/// +/// # Activities +/// +/// This type is used in activities, which are methods you may call on this type or where this type is involved in. +/// The list links the activity name, along with information about where it is used (one of *request* and *response*). +/// +/// * [bases list references](struct.ReferenceBaseListCall.html) (response) +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct ListBasesResponse { + /// The continuation token, which is used to page through large result sets. Provide this value in a subsequent request to return the next page of results. This field will be empty if there aren't any additional results. + #[serde(rename="nextPageToken")] + pub next_page_token: Option, + /// The offset position (0-based) of the given `sequence` from the start of this `Reference`. This value will differ for each page in a paginated request. + pub offset: Option, + /// A substring of the bases that make up this reference. + pub sequence: Option, +} + +impl ResponseResult for ListBasesResponse {} + + +/// Defines an Identity and Access Management (IAM) policy. It is used to specify access control policies for Cloud Platform resources. A `Policy` consists of a list of `bindings`. A `Binding` binds a list of `members` to a `role`, where the members can be user accounts, Google groups, Google domains, and service accounts. A `role` is a named list of permissions defined by IAM. **Example** { "bindings": [ { "role": "roles/owner", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-other-app@appspot.gserviceaccount.com", ] }, { "role": "roles/viewer", "members": ["user:sean@example.com"] } ] } For a description of IAM and its features, see the [IAM developer's guide](https://cloud.google.com/iam). +/// +/// # Activities +/// +/// This type is used in activities, which are methods you may call on this type or where this type is involved in. +/// The list links the activity name, along with information about where it is used (one of *request* and *response*). +/// +/// * [set iam policy datasets](struct.DatasetSetIamPolicyCall.html) (response) +/// * [get iam policy datasets](struct.DatasetGetIamPolicyCall.html) (response) +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct Policy { + /// Associates a list of `members` to a `role`. Multiple `bindings` must not be specified for the same `role`. `bindings` with no members will result in an error. + pub bindings: Option>, + /// Version of the `Policy`. The default version is 0. + pub version: Option, + /// `etag` is used for optimistic concurrency control as a way to help prevent simultaneous updates of a policy from overwriting each other. It is strongly suggested that systems make use of the `etag` in the read-modify-write cycle to perform policy updates in order to avoid race conditions: An `etag` is returned in the response to `getIamPolicy`, and systems are expected to put that etag in the request to `setIamPolicy` to ensure that their change will be applied to the same version of the policy. If no `etag` is provided in the call to `setIamPolicy`, then the existing policy is overwritten blindly. + pub etag: Option, +} + +impl ResponseResult for Policy {} + + +/// The variant search request. +/// +/// # Activities +/// +/// This type is used in activities, which are methods you may call on this type or where this type is involved in. +/// The list links the activity name, along with information about where it is used (one of *request* and *response*). +/// +/// * [search variants](struct.VariantSearchCall.html) (request) +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct SearchVariantsRequest { + /// The end of the window, 0-based exclusive. If unspecified or 0, defaults to the length of the reference. + pub end: Option, + /// The maximum number of variants to return in a single page. If unspecified, defaults to 5000. The maximum value is 10000. + #[serde(rename="pageSize")] + pub page_size: Option, + /// The continuation token, which is used to page through large result sets. To get the next page of results, set this parameter to the value of `nextPageToken` from the previous response. + #[serde(rename="pageToken")] + pub page_token: Option, + /// The maximum number of calls to return in a single page. Note that this limit may be exceeded in the event that a matching variant contains more calls than the requested maximum. If unspecified, defaults to 5000. The maximum value is 10000. + #[serde(rename="maxCalls")] + pub max_calls: Option, + /// The beginning of the window (0-based, inclusive) for which overlapping variants should be returned. If unspecified, defaults to 0. + pub start: Option, + /// Only return variant calls which belong to call sets with these ids. Leaving this blank returns all variant calls. If a variant has no calls belonging to any of these call sets, it won't be returned at all. Currently, variants with no calls from any call set will never be returned. + #[serde(rename="callSetIds")] + pub call_set_ids: Option>, + /// Only return variants which have exactly this name. + #[serde(rename="variantName")] + pub variant_name: Option, + /// Required. Only return variants in this reference sequence. + #[serde(rename="referenceName")] + pub reference_name: Option, + /// At most one variant set ID must be provided. Only variants from this variant set will be returned. If omitted, a call set id must be included in the request. + #[serde(rename="variantSetIds")] + pub variant_set_ids: Option>, +} + +impl RequestValue for SearchVariantsRequest {} /// A read alignment describes a linear alignment of a string of DNA to a reference sequence, in addition to metadata about the fragment (the molecule of DNA sequenced) and the read (the bases which were read by the sequencer). A read is equivalent to a line in a SAM file. A read belongs to exactly one read group and exactly one read group set. For more genomics resource definitions, see [Fundamentals of Google Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) ### Reverse-stranded reads Mapped reads (reads having a non-null `alignment`) can be aligned to either the forward or the reverse strand of their associated reference. Strandedness of a mapped read is encoded by `alignment.position.reverseStrand`. If we consider the reference to be a forward-stranded coordinate space of `[0, reference.length)` with `0` as the left-most position and `reference.length` as the right-most position, reads are always aligned left to right. That is, `alignment.position.position` always refers to the left-most reference coordinate and `alignment.cigar` describes the alignment of this read to the reference from left to right. All per-base fields such as `alignedSequence` and `alignedQuality` share this same left-to-right orientation; this is true of reads which are aligned to either strand. For reverse-stranded reads, this means that `alignedSequence` is the reverse complement of the bases that were originally reported by the sequencing machine. ### Generating a reference-aligned sequence string When interacting with mapped reads, it's often useful to produce a string representing the local alignment of the read to reference. The following pseudocode demonstrates one way of doing this: out = "" offset = 0 for c in read.alignment.cigar { switch c.operation { case "ALIGNMENT_MATCH", "SEQUENCE_MATCH", "SEQUENCE_MISMATCH": out += read.alignedSequence[offset:offset+c.operationLength] offset += c.operationLength break case "CLIP_SOFT", "INSERT": offset += c.operationLength break case "PAD": out += repeat("*", c.operationLength) break case "DELETE": out += repeat("-", c.operationLength) break case "SKIP": out += repeat(" ", c.operationLength) break case "CLIP_HARD": break } } return out ### Converting to SAM's CIGAR string The following pseudocode generates a SAM CIGAR string from the `cigar` field. Note that this is a lossy conversion (`cigar.referenceSequence` is lost). cigarMap = { "ALIGNMENT_MATCH": "M", "INSERT": "I", "DELETE": "D", "SKIP": "N", "CLIP_SOFT": "S", "CLIP_HARD": "H", "PAD": "P", "SEQUENCE_MATCH": "=", "SEQUENCE_MISMATCH": "X", } cigarStr = "" for c in read.alignment.cigar { cigarStr += c.operationLength + cigarMap[c.operation] } return cigarStr @@ -674,32 +1330,43 @@ impl Resource for Variant {} impl ResponseResult for Variant {} -/// The read group set import request. +/// There is no detailed description. /// /// # Activities /// /// This type is used in activities, which are methods you may call on this type or where this type is involved in. /// The list links the activity name, along with information about where it is used (one of *request* and *response*). /// -/// * [import readgroupsets](struct.ReadgroupsetImportCall.html) (request) +/// * [search annotationsets](struct.AnnotationsetSearchCall.html) (response) /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] -pub struct ImportReadGroupSetsRequest { - /// The reference set to which the imported read group sets are aligned to, if any. The reference names of this reference set must be a superset of those found in the imported file headers. If no reference set id is provided, a best effort is made to associate with a matching reference set. - #[serde(rename="referenceSetId")] - pub reference_set_id: Option, - /// A list of URIs pointing at [BAM files](https://samtools.github.io/hts-specs/SAMv1.pdf) in Google Cloud Storage. - #[serde(rename="sourceUris")] - pub source_uris: Option>, - /// The partition strategy describes how read groups are partitioned into read group sets. - #[serde(rename="partitionStrategy")] - pub partition_strategy: Option, - /// Required. The ID of the dataset these read group sets will belong to. The caller must have WRITE permissions to this dataset. - #[serde(rename="datasetId")] - pub dataset_id: Option, +pub struct SearchAnnotationSetsResponse { + /// The continuation token, which is used to page through large result sets. Provide this value in a subsequent request to return the next page of results. This field will be empty if there aren't any additional results. + #[serde(rename="nextPageToken")] + pub next_page_token: Option, + /// The matching annotation sets. + #[serde(rename="annotationSets")] + pub annotation_sets: Option>, } -impl RequestValue for ImportReadGroupSetsRequest {} +impl ResponseResult for SearchAnnotationSetsResponse {} + + +/// There is no detailed description. +/// +/// This type is not used in any activity, and only used as *part* of another schema. +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct Exon { + /// The start position of the exon on this annotation's reference sequence, 0-based inclusive. Note that this is relative to the reference start, and **not** the containing annotation start. + pub start: Option, + /// The frame of this exon. Contains a value of 0, 1, or 2, which indicates the offset of the first coding base of the exon within the reading frame of the coding DNA sequence, if any. This field is dependent on the strandedness of this annotation (see Annotation.reverse_strand). For forward stranded annotations, this offset is relative to the `exon.start`. For reverse strand annotations, this offset is relative to the `exon.end - 1`. Unset if this exon does not intersect the coding sequence. Upon creation of a transcript, the frame must be populated for all or none of the coding exons. + pub frame: Option, + /// The end position of the exon on this annotation's reference sequence, 0-based exclusive. Note that this is relative to the reference start, and *not* the containing annotation start. + pub end: Option, +} + +impl Part for Exon {} /// The variant search response. @@ -723,6 +1390,39 @@ pub struct SearchVariantsResponse { impl ResponseResult for SearchVariantsResponse {} +/// There is no detailed description. +/// +/// This type is not used in any activity, and only used as *part* of another schema. +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct CodingSequence { + /// The start of the coding sequence on this annotation's reference sequence, 0-based inclusive. Note that this position is relative to the reference start, and *not* the containing annotation start. + pub start: Option, + /// The end of the coding sequence on this annotation's reference sequence, 0-based exclusive. Note that this position is relative to the reference start, and *not* the containing annotation start. + pub end: Option, +} + +impl Part for CodingSequence {} + + +/// There is no detailed description. +/// +/// # Activities +/// +/// This type is used in activities, which are methods you may call on this type or where this type is involved in. +/// The list links the activity name, along with information about where it is used (one of *request* and *response*). +/// +/// * [batch create annotations](struct.AnnotationBatchCreateCall.html) (request) +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct BatchCreateAnnotationsRequest { + /// The annotations to be created. At most 4096 can be specified in a single request. + pub annotations: Option>, +} + +impl RequestValue for BatchCreateAnnotationsRequest {} + + /// There is no detailed description. /// /// # Activities @@ -745,48 +1445,6 @@ pub struct SearchReferenceSetsResponse { impl ResponseResult for SearchReferenceSetsResponse {} -/// Request message for `GetIamPolicy` method. -/// -/// # Activities -/// -/// This type is used in activities, which are methods you may call on this type or where this type is involved in. -/// The list links the activity name, along with information about where it is used (one of *request* and *response*). -/// -/// * [get iam policy datasets](struct.DatasetGetIamPolicyCall.html) (request) -/// -#[derive(Default, Clone, Debug, Serialize, Deserialize)] -pub struct GetIamPolicyRequest; - -impl RequestValue for GetIamPolicyRequest {} - - -/// The call set search request. -/// -/// # Activities -/// -/// This type is used in activities, which are methods you may call on this type or where this type is involved in. -/// The list links the activity name, along with information about where it is used (one of *request* and *response*). -/// -/// * [search callsets](struct.CallsetSearchCall.html) (request) -/// -#[derive(Default, Clone, Debug, Serialize, Deserialize)] -pub struct SearchCallSetsRequest { - /// The continuation token, which is used to page through large result sets. To get the next page of results, set this parameter to the value of `nextPageToken` from the previous response. - #[serde(rename="pageToken")] - pub page_token: Option, - /// Restrict the query to call sets within the given variant sets. At least one ID must be provided. - #[serde(rename="variantSetIds")] - pub variant_set_ids: Option>, - /// Only return call sets for which a substring of the name matches this string. - pub name: Option, - /// The maximum number of results to return in a single page. If unspecified, defaults to 1024. - #[serde(rename="pageSize")] - pub page_size: Option, -} - -impl RequestValue for SearchCallSetsRequest {} - - /// A reference set is a set of references which typically comprise a reference assembly for a species, such as `GRCh38` which is representative of the human genome. A reference set defines a common coordinate space for comparing reference-aligned experimental data. A reference set contains 1 or more references. For more genomics resource definitions, see [Fundamentals of Google Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) /// /// # Activities @@ -865,180 +1523,132 @@ impl ResponseResult for VariantSet {} /// This type is used in activities, which are methods you may call on this type or where this type is involved in. /// The list links the activity name, along with information about where it is used (one of *request* and *response*). /// -/// * [merge variants](struct.VariantMergeCall.html) (request) +/// * [search annotations](struct.AnnotationSearchCall.html) (request) /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] -pub struct MergeVariantsRequest { - /// The destination variant set. - #[serde(rename="variantSetId")] - pub variant_set_id: Option, - /// The variants to be merged with existing variants. - pub variants: Option>, +pub struct SearchAnnotationsRequest { + /// The start position of the range on the reference, 0-based inclusive. If specified, referenceId or referenceName must be specified. Defaults to 0. + pub start: Option, + /// The ID of the reference to query. + #[serde(rename="referenceId")] + pub reference_id: Option, + /// The end position of the range on the reference, 0-based exclusive. If referenceId or referenceName must be specified, Defaults to the length of the reference. + pub end: Option, + /// The maximum number of results to return in a single page. If unspecified, defaults to 256. The maximum value is 2048. + #[serde(rename="pageSize")] + pub page_size: Option, + /// The continuation token, which is used to page through large result sets. To get the next page of results, set this parameter to the value of `nextPageToken` from the previous response. + #[serde(rename="pageToken")] + pub page_token: Option, + /// The name of the reference to query, within the reference set associated with this query. + #[serde(rename="referenceName")] + pub reference_name: Option, + /// Required. The annotation sets to search within. The caller must have `READ` access to these annotation sets. All queried annotation sets must have the same type. + #[serde(rename="annotationSetIds")] + pub annotation_set_ids: Option>, } -impl RequestValue for MergeVariantsRequest {} +impl RequestValue for SearchAnnotationsRequest {} -/// A single CIGAR operation. +/// The read search request. +/// +/// # Activities +/// +/// This type is used in activities, which are methods you may call on this type or where this type is involved in. +/// The list links the activity name, along with information about where it is used (one of *request* and *response*). +/// +/// * [search reads](struct.ReadSearchCall.html) (request) +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct SearchReadsRequest { + /// The start position of the range on the reference, 0-based inclusive. If specified, `referenceName` must also be specified. + pub start: Option, + /// The IDs of the read groups sets within which to search for reads. All specified read group sets must be aligned against a common set of reference sequences; this defines the genomic coordinates for the query. Must specify one of `readGroupSetIds` or `readGroupIds`. + #[serde(rename="readGroupSetIds")] + pub read_group_set_ids: Option>, + /// The IDs of the read groups within which to search for reads. All specified read groups must belong to the same read group sets. Must specify one of `readGroupSetIds` or `readGroupIds`. + #[serde(rename="readGroupIds")] + pub read_group_ids: Option>, + /// The maximum number of results to return in a single page. If unspecified, defaults to 256. The maximum value is 2048. + #[serde(rename="pageSize")] + pub page_size: Option, + /// The continuation token, which is used to page through large result sets. To get the next page of results, set this parameter to the value of `nextPageToken` from the previous response. + #[serde(rename="pageToken")] + pub page_token: Option, + /// The end position of the range on the reference, 0-based exclusive. If specified, `referenceName` must also be specified. + pub end: Option, + /// The reference sequence name, for example `chr1`, `1`, or `chrX`. If set to `*`, only unmapped reads are returned. If unspecified, all reads (mapped and unmapped) are returned. + #[serde(rename="referenceName")] + pub reference_name: Option, +} + +impl RequestValue for SearchReadsRequest {} + + +/// A 0-based half-open genomic coordinate range for search requests. /// /// This type is not used in any activity, and only used as *part* of another schema. /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] -pub struct CigarUnit { - /// `referenceSequence` is only used at mismatches (`SEQUENCE_MISMATCH`) and deletions (`DELETE`). Filling this field replaces SAM's MD tag. If the relevant information is not available, this field is unset. - #[serde(rename="referenceSequence")] - pub reference_sequence: Option, - /// no description provided - pub operation: Option, - /// The number of genomic bases that the operation runs for. Required. - #[serde(rename="operationLength")] - pub operation_length: Option, +pub struct Range { + /// The start position of the range on the reference, 0-based inclusive. + pub start: Option, + /// The end position of the range on the reference, 0-based exclusive. + pub end: Option, + /// The reference sequence name, for example `chr1`, `1`, or `chrX`. + #[serde(rename="referenceName")] + pub reference_name: Option, } -impl Part for CigarUnit {} +impl Part for Range {} -/// Metadata describes a single piece of variant call metadata. These data include a top level key and either a single value string (value) or a list of key-value pairs (info.) Value and info are mutually exclusive. -/// -/// This type is not used in any activity, and only used as *part* of another schema. -/// -#[derive(Default, Clone, Debug, Serialize, Deserialize)] -pub struct VariantSetMetadata { - /// Remaining structured metadata key-value pairs. This must be of the form map (string key mapping to a list of string values). - pub info: Option>>, - /// A textual description of this metadata. - pub description: Option, - /// The top-level key. - pub key: Option, - /// The type of data. Possible types include: Integer, Float, Flag, Character, and String. - #[serde(rename="type")] - pub type_: Option, - /// The number of values that can be included in a field described by this metadata. - pub number: Option, - /// The value field for simple metadata - pub value: Option, - /// User-provided ID field, not enforced by this API. Two or more pieces of structured metadata with identical id and key fields are considered equivalent. - pub id: Option, -} - -impl Part for VariantSetMetadata {} - - -/// The read group set search response. +/// There is no detailed description. /// /// # Activities /// /// This type is used in activities, which are methods you may call on this type or where this type is involved in. /// The list links the activity name, along with information about where it is used (one of *request* and *response*). /// -/// * [search readgroupsets](struct.ReadgroupsetSearchCall.html) (response) +/// * [search annotationsets](struct.AnnotationsetSearchCall.html) (request) /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] -pub struct SearchReadGroupSetsResponse { - /// The continuation token, which is used to page through large result sets. Provide this value in a subsequent request to return the next page of results. This field will be empty if there aren't any additional results. - #[serde(rename="nextPageToken")] - pub next_page_token: Option, - /// The list of matching read group sets. - #[serde(rename="readGroupSets")] - pub read_group_sets: Option>, -} - -impl ResponseResult for SearchReadGroupSetsResponse {} - - -/// Request message for `TestIamPermissions` method. -/// -/// # Activities -/// -/// This type is used in activities, which are methods you may call on this type or where this type is involved in. -/// The list links the activity name, along with information about where it is used (one of *request* and *response*). -/// -/// * [test iam permissions datasets](struct.DatasetTestIamPermissionCall.html) (request) -/// -#[derive(Default, Clone, Debug, Serialize, Deserialize)] -pub struct TestIamPermissionsRequest { - /// REQUIRED: The set of permissions to check for the 'resource'. Permissions with wildcards (such as '*' or 'storage.*') are not allowed. Allowed permissions are: * `genomics.datasets.create` * `genomics.datasets.delete` * `genomics.datasets.get` * `genomics.datasets.list` * `genomics.datasets.update` * `genomics.datasets.getIamPolicy` * `genomics.datasets.setIamPolicy` - pub permissions: Option>, -} - -impl RequestValue for TestIamPermissionsRequest {} - - -/// The search variant sets response. -/// -/// # Activities -/// -/// This type is used in activities, which are methods you may call on this type or where this type is involved in. -/// The list links the activity name, along with information about where it is used (one of *request* and *response*). -/// -/// * [search variantsets](struct.VariantsetSearchCall.html) (response) -/// -#[derive(Default, Clone, Debug, Serialize, Deserialize)] -pub struct SearchVariantSetsResponse { - /// The continuation token, which is used to page through large result sets. Provide this value in a subsequent request to return the next page of results. This field will be empty if there aren't any additional results. - #[serde(rename="nextPageToken")] - pub next_page_token: Option, - /// The variant sets belonging to the requested dataset. - #[serde(rename="variantSets")] - pub variant_sets: Option>, -} - -impl ResponseResult for SearchVariantSetsResponse {} - - -/// The read search response. -/// -/// # Activities -/// -/// This type is used in activities, which are methods you may call on this type or where this type is involved in. -/// The list links the activity name, along with information about where it is used (one of *request* and *response*). -/// -/// * [search reads](struct.ReadSearchCall.html) (response) -/// -#[derive(Default, Clone, Debug, Serialize, Deserialize)] -pub struct SearchReadsResponse { - /// The continuation token, which is used to page through large result sets. Provide this value in a subsequent request to return the next page of results. This field will be empty if there aren't any additional results. - #[serde(rename="nextPageToken")] - pub next_page_token: Option, - /// The list of matching alignments sorted by mapped genomic coordinate, if any, ascending in position within the same reference. Unmapped reads, which have no position, are returned contiguously and are sorted in ascending lexicographic order by fragment name. - pub alignments: Option>, -} - -impl ResponseResult for SearchReadsResponse {} - - -/// A call set is a collection of variant calls, typically for one sample. It belongs to a variant set. For more genomics resource definitions, see [Fundamentals of Google Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) -/// -/// # Activities -/// -/// This type is used in activities, which are methods you may call on this type or where this type is involved in. -/// The list links the activity name, along with information about where it is used (one of *request* and *response*). -/// -/// * [create callsets](struct.CallsetCreateCall.html) (request|response) -/// * [patch callsets](struct.CallsetPatchCall.html) (request|response) -/// * [get callsets](struct.CallsetGetCall.html) (response) -/// -#[derive(Default, Clone, Debug, Serialize, Deserialize)] -pub struct CallSet { - /// A map of additional call set information. This must be of the form map (string key mapping to a list of string values). - pub info: Option>>, - /// The IDs of the variant sets this call set belongs to. This field must have exactly length one, as a call set belongs to a single variant set. This field is repeated for compatibility with the [GA4GH 0.5.1 API](https://github.com/ga4gh/schemas/blob/v0.5.1/src/main/resources/avro/variants.avdl#L76). - #[serde(rename="variantSetIds")] - pub variant_set_ids: Option>, - /// The call set name. +pub struct SearchAnnotationSetsRequest { + /// The continuation token, which is used to page through large result sets. To get the next page of results, set this parameter to the value of `nextPageToken` from the previous response. + #[serde(rename="pageToken")] + pub page_token: Option, + /// Only return annotations sets for which a substring of the name matches this string (case insensitive). pub name: Option, - /// The date this call set was created in milliseconds from the epoch. - pub created: Option, - /// The sample ID this call set corresponds to. - #[serde(rename="sampleId")] - pub sample_id: Option, - /// The server-generated call set ID, unique across all call sets. - pub id: Option, + /// The maximum number of results to return in a single page. If unspecified, defaults to 128. The maximum value is 1024. + #[serde(rename="pageSize")] + pub page_size: Option, + /// Required. The dataset IDs to search within. Caller must have `READ` access to these datasets. + #[serde(rename="datasetIds")] + pub dataset_ids: Option>, + /// If specified, only annotation sets associated with the given reference set are returned. + #[serde(rename="referenceSetId")] + pub reference_set_id: Option, + /// If specified, only annotation sets that have any of these types are returned. + pub types: Option>, } -impl RequestValue for CallSet {} -impl Resource for CallSet {} -impl ResponseResult for CallSet {} +impl RequestValue for SearchAnnotationSetsRequest {} + + +/// There is no detailed description. +/// +/// # Activities +/// +/// This type is used in activities, which are methods you may call on this type or where this type is involved in. +/// The list links the activity name, along with information about where it is used (one of *request* and *response*). +/// +/// * [undelete datasets](struct.DatasetUndeleteCall.html) (request) +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct UndeleteDatasetRequest; + +impl RequestValue for UndeleteDatasetRequest {} /// There is no detailed description. @@ -1112,60 +1722,6 @@ pub struct StreamVariantsRequest { impl RequestValue for StreamVariantsRequest {} -/// This resource represents a long-running operation that is the result of a network API call. -/// -/// # Activities -/// -/// This type is used in activities, which are methods you may call on this type or where this type is involved in. -/// The list links the activity name, along with information about where it is used (one of *request* and *response*). -/// -/// * [cancel operations](struct.OperationCancelCall.html) (none) -/// * [export variantsets](struct.VariantsetExportCall.html) (response) -/// * [export readgroupsets](struct.ReadgroupsetExportCall.html) (response) -/// * [import variants](struct.VariantImportCall.html) (response) -/// * [import readgroupsets](struct.ReadgroupsetImportCall.html) (response) -/// * [get operations](struct.OperationGetCall.html) (response) -/// * [list operations](struct.OperationListCall.html) (none) -/// -#[derive(Default, Clone, Debug, Serialize, Deserialize)] -pub struct Operation { - /// An OperationMetadata object. This will always be returned with the Operation. - pub metadata: Option>, - /// If the value is `false`, it means the operation is still in progress. If true, the operation is completed, and either `error` or `response` is available. - pub done: Option, - /// If importing ReadGroupSets, an ImportReadGroupSetsResponse is returned. If importing Variants, an ImportVariantsResponse is returned. For exports, an empty response is returned. - pub response: Option>, - /// The server-assigned name, which is only unique within the same service that originally returns it. For example: `operations/CJHU7Oi_ChDrveSpBRjfuL-qzoWAgEw` - pub name: Option, - /// The error result of the operation in case of failure. - pub error: Option, -} - -impl Resource for Operation {} -impl ResponseResult for Operation {} - - -/// The dataset list response. -/// -/// # Activities -/// -/// This type is used in activities, which are methods you may call on this type or where this type is involved in. -/// The list links the activity name, along with information about where it is used (one of *request* and *response*). -/// -/// * [list datasets](struct.DatasetListCall.html) (response) -/// -#[derive(Default, Clone, Debug, Serialize, Deserialize)] -pub struct ListDatasetsResponse { - /// The continuation token, which is used to page through large result sets. Provide this value in a subsequent request to return the next page of results. This field will be empty if there aren't any additional results. - #[serde(rename="nextPageToken")] - pub next_page_token: Option, - /// The list of matching Datasets. - pub datasets: Option>, -} - -impl ResponseResult for ListDatasetsResponse {} - - /// A read group set is a logical collection of read groups, which are collections of reads produced by a sequencer. A read group set typically models reads corresponding to one sample, sequenced one way, and aligned one way. * A read group set belongs to one dataset. * A read group belongs to one read group set. * A read belongs to one read group. For more genomics resource definitions, see [Fundamentals of Google Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) /// /// # Activities @@ -1257,42 +1813,6 @@ pub struct ListOperationsResponse { impl ResponseResult for ListOperationsResponse {} -/// A reference is a canonical assembled DNA sequence, intended to act as a reference coordinate space for other genomic annotations. A single reference might represent the human chromosome 1 or mitochandrial DNA, for instance. A reference belongs to one or more reference sets. For more genomics resource definitions, see [Fundamentals of Google Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) -/// -/// # Activities -/// -/// This type is used in activities, which are methods you may call on this type or where this type is involved in. -/// The list links the activity name, along with information about where it is used (one of *request* and *response*). -/// -/// * [bases list references](struct.ReferenceBaseListCall.html) (none) -/// * [search references](struct.ReferenceSearchCall.html) (none) -/// * [get references](struct.ReferenceGetCall.html) (response) -/// -#[derive(Default, Clone, Debug, Serialize, Deserialize)] -pub struct Reference { - /// MD5 of the upper-case sequence excluding all whitespace characters (this is equivalent to SQ:M5 in SAM). This value is represented in lower case hexadecimal format. - pub md5checksum: Option, - /// The length of this reference's sequence. - pub length: Option, - /// The name of this reference, for example `22`. - pub name: Option, - /// The URI from which the sequence was obtained. Typically specifies a FASTA format file. - #[serde(rename="sourceUri")] - pub source_uri: Option, - /// All known corresponding accession IDs in INSDC (GenBank/ENA/DDBJ) ideally with a version number, for example `GCF_000001405.26`. - #[serde(rename="sourceAccessions")] - pub source_accessions: Option>, - /// The server-generated reference ID, unique across all references. - pub id: Option, - /// ID from http://www.ncbi.nlm.nih.gov/taxonomy. For example, 9606 for human. - #[serde(rename="ncbiTaxonId")] - pub ncbi_taxon_id: Option, -} - -impl Resource for Reference {} -impl ResponseResult for Reference {} - - /// A linear alignment can be represented by one CIGAR string. Describes the mapped position and local alignment of the read to the reference. /// /// This type is not used in any activity, and only used as *part* of another schema. @@ -1311,107 +1831,61 @@ pub struct LinearAlignment { impl Part for LinearAlignment {} -/// The variant data export request. +/// An annotation set is a logical grouping of annotations that share consistent type information and provenance. Examples of annotation sets include 'all genes from refseq', and 'all variant annotations from ClinVar'. /// /// # Activities /// /// This type is used in activities, which are methods you may call on this type or where this type is involved in. /// The list links the activity name, along with information about where it is used (one of *request* and *response*). /// -/// * [export variantsets](struct.VariantsetExportCall.html) (request) +/// * [update annotationsets](struct.AnnotationsetUpdateCall.html) (request|response) +/// * [get annotationsets](struct.AnnotationsetGetCall.html) (response) +/// * [create annotationsets](struct.AnnotationsetCreateCall.html) (request|response) /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] -pub struct ExportVariantSetRequest { - /// Required. The Google Cloud project ID that owns the destination BigQuery dataset. The caller must have WRITE access to this project. This project will also own the resulting export job. - #[serde(rename="projectId")] - pub project_id: Option, - /// The format for the exported data. - pub format: Option, - /// Required. The BigQuery dataset to export data to. This dataset must already exist. Note that this is distinct from the Genomics concept of "dataset". - #[serde(rename="bigqueryDataset")] - pub bigquery_dataset: Option, - /// If provided, only variant call information from the specified call sets will be exported. By default all variant calls are exported. - #[serde(rename="callSetIds")] - pub call_set_ids: Option>, - /// Required. The BigQuery table to export data to. If the table doesn't exist, it will be created. If it already exists, it will be overwritten. - #[serde(rename="bigqueryTable")] - pub bigquery_table: Option, -} - -impl RequestValue for ExportVariantSetRequest {} - - -/// A call represents the determination of genotype with respect to a particular variant. It may include associated information such as quality and phasing. For example, a call might assign a probability of 0.32 to the occurrence of a SNP named rs1234 in a call set with the name NA12345. -/// -/// This type is not used in any activity, and only used as *part* of another schema. -/// -#[derive(Default, Clone, Debug, Serialize, Deserialize)] -pub struct VariantCall { - /// A map of additional variant call information. This must be of the form map (string key mapping to a list of string values). +pub struct AnnotationSet { + /// A map of additional read alignment information. This must be of the form map (string key mapping to a list of string values). pub info: Option>>, - /// The genotype of this variant call. Each value represents either the value of the `referenceBases` field or a 1-based index into `alternateBases`. If a variant had a `referenceBases` value of `T` and an `alternateBases` value of `["A", "C"]`, and the `genotype` was `[2, 1]`, that would mean the call represented the heterozygous value `CA` for this variant. If the `genotype` was instead `[0, 1]`, the represented value would be `TA`. Ordering of the genotype values is important if the `phaseset` is present. If a genotype is not called (that is, a `.` is present in the GT string) -1 is returned. - pub genotype: Option>, - /// The ID of the call set this variant call belongs to. - #[serde(rename="callSetId")] - pub call_set_id: Option, - /// If this field is present, this variant call's genotype ordering implies the phase of the bases and is consistent with any other variant calls in the same reference sequence which have the same phaseset value. When importing data from VCF, if the genotype data was phased but no phase set was specified this field will be set to `*`. - pub phaseset: Option, - /// The genotype likelihoods for this variant call. Each array entry represents how likely a specific genotype is for this call. The value ordering is defined by the GL tag in the VCF spec. If Phred-scaled genotype likelihood scores (PL) are available and log10(P) genotype likelihood scores (GL) are not, PL scores are converted to GL scores. If both are available, PL scores are stored in `info`. - #[serde(rename="genotypeLikelihood")] - pub genotype_likelihood: Option>, - /// The name of the call set this variant call belongs to. - #[serde(rename="callSetName")] - pub call_set_name: Option, -} - -impl Part for VariantCall {} - - -/// A 0-based half-open genomic coordinate range for search requests. -/// -/// This type is not used in any activity, and only used as *part* of another schema. -/// -#[derive(Default, Clone, Debug, Serialize, Deserialize)] -pub struct Range { - /// The start position of the range on the reference, 0-based inclusive. - pub start: Option, - /// The end position of the range on the reference, 0-based exclusive. - pub end: Option, - /// The reference sequence name, for example `chr1`, `1`, or `chrX`. - #[serde(rename="referenceName")] - pub reference_name: Option, -} - -impl Part for Range {} - - -/// There is no detailed description. -/// -/// # Activities -/// -/// This type is used in activities, which are methods you may call on this type or where this type is involved in. -/// The list links the activity name, along with information about where it is used (one of *request* and *response*). -/// -/// * [search references](struct.ReferenceSearchCall.html) (request) -/// -#[derive(Default, Clone, Debug, Serialize, Deserialize)] -pub struct SearchReferencesRequest { - /// If present, return references for which the md5checksum matches exactly. - pub md5checksums: Option>, - /// The continuation token, which is used to page through large result sets. To get the next page of results, set this parameter to the value of `nextPageToken` from the previous response. - #[serde(rename="pageToken")] - pub page_token: Option, - /// If present, return only references which belong to this reference set. + /// The display name for this annotation set. + pub name: Option, + /// The source URI describing the file from which this annotation set was generated, if any. + #[serde(rename="sourceUri")] + pub source_uri: Option, + /// The ID of the reference set that defines the coordinate space for this set's annotations. #[serde(rename="referenceSetId")] pub reference_set_id: Option, - /// If present, return references for which a prefix of any of sourceAccessions match any of these strings. Accession numbers typically have a main number and a version, for example `GCF_000001405.26`. - pub accessions: Option>, - /// The maximum number of results to return in a single page. If unspecified, defaults to 1024. The maximum value is 4096. - #[serde(rename="pageSize")] - pub page_size: Option, + /// The type of annotations contained within this set. + #[serde(rename="type")] + pub type_: Option, + /// The server-generated annotation set ID, unique across all annotation sets. + pub id: Option, + /// The dataset to which this annotation set belongs. + #[serde(rename="datasetId")] + pub dataset_id: Option, } -impl RequestValue for SearchReferencesRequest {} +impl RequestValue for AnnotationSet {} +impl Resource for AnnotationSet {} +impl ResponseResult for AnnotationSet {} + + +/// A single CIGAR operation. +/// +/// This type is not used in any activity, and only used as *part* of another schema. +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct CigarUnit { + /// `referenceSequence` is only used at mismatches (`SEQUENCE_MISMATCH`) and deletions (`DELETE`). Filling this field replaces SAM's MD tag. If the relevant information is not available, this field is unset. + #[serde(rename="referenceSequence")] + pub reference_sequence: Option, + /// no description provided + pub operation: Option, + /// The number of genomic bases that the operation runs for. Required. + #[serde(rename="operationLength")] + pub operation_length: Option, +} + +impl Part for CigarUnit {} /// A Dataset is a collection of genomic data. For more genomics resource definitions, see [Fundamentals of Google Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) @@ -1450,64 +1924,6 @@ impl Resource for Dataset {} impl ResponseResult for Dataset {} -/// There is no detailed description. -/// -/// This type is not used in any activity, and only used as *part* of another schema. -/// -#[derive(Default, Clone, Debug, Serialize, Deserialize)] -pub struct Experiment { - /// The sequencing center used as part of this experiment. - #[serde(rename="sequencingCenter")] - pub sequencing_center: Option, - /// A client-supplied library identifier; a library is a collection of DNA fragments which have been prepared for sequencing from a sample. This field is important for quality control as error or bias can be introduced during sample preparation. - #[serde(rename="libraryId")] - pub library_id: Option, - /// The instrument model used as part of this experiment. This maps to sequencing technology in the SAM spec. - #[serde(rename="instrumentModel")] - pub instrument_model: Option, - /// The platform unit used as part of this experiment, for example flowcell-barcode.lane for Illumina or slide for SOLiD. Corresponds to the @RG PU field in the SAM spec. - #[serde(rename="platformUnit")] - pub platform_unit: Option, -} - -impl Part for Experiment {} - - -/// A read group is all the data that's processed the same way by the sequencer. -/// -/// This type is not used in any activity, and only used as *part* of another schema. -/// -#[derive(Default, Clone, Debug, Serialize, Deserialize)] -pub struct ReadGroup { - /// A map of additional read group information. This must be of the form map (string key mapping to a list of string values). - pub info: Option>>, - /// The predicted insert size of this read group. The insert size is the length the sequenced DNA fragment from end-to-end, not including the adapters. - #[serde(rename="predictedInsertSize")] - pub predicted_insert_size: Option, - /// A free-form text description of this read group. - pub description: Option, - /// The programs used to generate this read group. Programs are always identical for all read groups within a read group set. For this reason, only the first read group in a returned set will have this field populated. - pub programs: Option>, - /// A client-supplied sample identifier for the reads in this read group. - #[serde(rename="sampleId")] - pub sample_id: Option, - /// The experiment used to generate this read group. - pub experiment: Option, - /// The reference set the reads in this read group are aligned to. - #[serde(rename="referenceSetId")] - pub reference_set_id: Option, - /// The server-generated read group ID, unique for all read groups. Note: This is different than the @RG ID field in the SAM spec. For that value, see name. - pub id: Option, - /// The dataset to which this read group belongs. - #[serde(rename="datasetId")] - pub dataset_id: Option, - /// The read group name. This corresponds to the @RG ID field in the SAM spec. - pub name: Option, -} - -impl Part for ReadGroup {} - - /// The request message for Operations.CancelOperation. /// /// # Activities @@ -1523,80 +1939,42 @@ pub struct CancelOperationRequest; impl RequestValue for CancelOperationRequest {} -/// The read search request. +/// The search variant sets response. /// /// # Activities /// /// This type is used in activities, which are methods you may call on this type or where this type is involved in. /// The list links the activity name, along with information about where it is used (one of *request* and *response*). /// -/// * [search reads](struct.ReadSearchCall.html) (request) +/// * [search variantsets](struct.VariantsetSearchCall.html) (response) /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] -pub struct SearchReadsRequest { - /// The start position of the range on the reference, 0-based inclusive. If specified, `referenceName` must also be specified. - pub start: Option, - /// The IDs of the read groups sets within which to search for reads. All specified read group sets must be aligned against a common set of reference sequences; this defines the genomic coordinates for the query. Must specify one of `readGroupSetIds` or `readGroupIds`. - #[serde(rename="readGroupSetIds")] - pub read_group_set_ids: Option>, - /// The IDs of the read groups within which to search for reads. All specified read groups must belong to the same read group sets. Must specify one of `readGroupSetIds` or `readGroupIds`. - #[serde(rename="readGroupIds")] - pub read_group_ids: Option>, - /// The maximum number of results to return in a single page. If unspecified, defaults to 256. The maximum value is 2048. - #[serde(rename="pageSize")] - pub page_size: Option, - /// The continuation token, which is used to page through large result sets. To get the next page of results, set this parameter to the value of `nextPageToken` from the previous response. - #[serde(rename="pageToken")] - pub page_token: Option, - /// The end position of the range on the reference, 0-based exclusive. If specified, `referenceName` must also be specified. - pub end: Option, - /// The reference sequence name, for example `chr1`, `1`, or `chrX`. If set to `*`, only unmapped reads are returned. If unspecified, all reads (mapped and unmapped) are returned. - #[serde(rename="referenceName")] - pub reference_name: Option, +pub struct SearchVariantSetsResponse { + /// The continuation token, which is used to page through large result sets. Provide this value in a subsequent request to return the next page of results. This field will be empty if there aren't any additional results. + #[serde(rename="nextPageToken")] + pub next_page_token: Option, + /// The variant sets belonging to the requested dataset. + #[serde(rename="variantSets")] + pub variant_sets: Option>, } -impl RequestValue for SearchReadsRequest {} +impl ResponseResult for SearchVariantSetsResponse {} -/// The variant search request. +/// A bucket over which read coverage has been precomputed. A bucket corresponds to a specific range of the reference sequence. /// -/// # Activities -/// -/// This type is used in activities, which are methods you may call on this type or where this type is involved in. -/// The list links the activity name, along with information about where it is used (one of *request* and *response*). -/// -/// * [search variants](struct.VariantSearchCall.html) (request) +/// This type is not used in any activity, and only used as *part* of another schema. /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] -pub struct SearchVariantsRequest { - /// The end of the window, 0-based exclusive. If unspecified or 0, defaults to the length of the reference. - pub end: Option, - /// The maximum number of variants to return in a single page. If unspecified, defaults to 5000. The maximum value is 10000. - #[serde(rename="pageSize")] - pub page_size: Option, - /// The continuation token, which is used to page through large result sets. To get the next page of results, set this parameter to the value of `nextPageToken` from the previous response. - #[serde(rename="pageToken")] - pub page_token: Option, - /// The maximum number of calls to return in a single page. Note that this limit may be exceeded in the event that a matching variant contains more calls than the requested maximum. If unspecified, defaults to 5000. The maximum value is 10000. - #[serde(rename="maxCalls")] - pub max_calls: Option, - /// The beginning of the window (0-based, inclusive) for which overlapping variants should be returned. If unspecified, defaults to 0. - pub start: Option, - /// Only return variant calls which belong to call sets with these ids. Leaving this blank returns all variant calls. If a variant has no calls belonging to any of these call sets, it won't be returned at all. Currently, variants with no calls from any call set will never be returned. - #[serde(rename="callSetIds")] - pub call_set_ids: Option>, - /// Only return variants which have exactly this name. - #[serde(rename="variantName")] - pub variant_name: Option, - /// Required. Only return variants in this reference sequence. - #[serde(rename="referenceName")] - pub reference_name: Option, - /// At most one variant set ID must be provided. Only variants from this variant set will be returned. If omitted, a call set id must be included in the request. - #[serde(rename="variantSetIds")] - pub variant_set_ids: Option>, +pub struct CoverageBucket { + /// The average number of reads which are aligned to each individual reference base in this bucket. + #[serde(rename="meanCoverage")] + pub mean_coverage: Option, + /// The genomic coordinate range spanned by this bucket. + pub range: Option, } -impl RequestValue for SearchVariantsRequest {} +impl Part for CoverageBucket {} /// The call set search response. @@ -1650,19 +2028,25 @@ pub struct SearchReferenceSetsRequest { impl RequestValue for SearchReferenceSetsRequest {} -/// There is no detailed description. +/// The read search response. /// /// # Activities /// /// This type is used in activities, which are methods you may call on this type or where this type is involved in. /// The list links the activity name, along with information about where it is used (one of *request* and *response*). /// -/// * [undelete datasets](struct.DatasetUndeleteCall.html) (request) +/// * [search reads](struct.ReadSearchCall.html) (response) /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] -pub struct UndeleteDatasetRequest; +pub struct SearchReadsResponse { + /// The continuation token, which is used to page through large result sets. Provide this value in a subsequent request to return the next page of results. This field will be empty if there aren't any additional results. + #[serde(rename="nextPageToken")] + pub next_page_token: Option, + /// The list of matching alignments sorted by mapped genomic coordinate, if any, ascending in position within the same reference. Unmapped reads, which have no position, are returned contiguously and are sorted in ascending lexicographic order by fragment name. + pub alignments: Option>, +} -impl RequestValue for UndeleteDatasetRequest {} +impl ResponseResult for SearchReadsResponse {} @@ -1824,7 +2208,7 @@ impl<'a, C, A> DatasetMethods<'a, C, A> { /// Create a builder to help you perform the following task: /// - /// Deletes a dataset. For the definitions of datasets and other genomics resources, see [Fundamentals of Google Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) + /// Deletes a dataset and all of its contents (all read group sets, reference sets, variant sets, call sets, annotation sets, etc.) This is reversible (up to one week after the deletion) via the datasets.undelete operation. For the definitions of datasets and other genomics resources, see [Fundamentals of Google Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) /// /// # Arguments /// @@ -2607,7 +2991,7 @@ impl<'a, C, A> VariantMethods<'a, C, A> { /// Create a builder to help you perform the following task: /// - /// Merges the given variants with existing variants. For the definitions of variants and other genomics resources, see [Fundamentals of Google Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) Each variant will be merged with an existing variant that matches its reference sequence, start, end, reference bases, and alternative bases. If no such variant exists, a new one will be created. When variants are merged, the call information from the new variant is added to the existing variant, and other fields (such as key/value pairs) are discarded. + /// Merges the given variants with existing variants. For the definitions of variants and other genomics resources, see [Fundamentals of Google Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) Each variant will be merged with an existing variant that matches its reference sequence, start, end, reference bases, and alternative bases. If no such variant exists, a new one will be created. When variants are merged, the call information from the new variant is added to the existing variant. Variant info fields are merged as specified in the infoMergeConfig field of the MergeVariantsRequest. Please exercise caution when using this method! It is easy to introduce mistakes in existing variants and difficult to back out of them. For example, suppose you were trying to merge a new variant with an existing one and both variants contain calls that belong to callsets with the same callset ID. // Existing variant - irrelevant fields trimmed for clarity { "variantSetId": "10473108253681171589", "referenceName": "1", "start": "10582", "referenceBases": "G", "alternateBases": [ "A" ], "calls": [ { "callSetId": "10473108253681171589-0", "callSetName": "CALLSET0", "genotype": [ 0, 1 ], } ] } // New variant with conflicting call information { "variantSetId": "10473108253681171589", "referenceName": "1", "start": "10582", "referenceBases": "G", "alternateBases": [ "A" ], "calls": [ { "callSetId": "10473108253681171589-0", "callSetName": "CALLSET0", "genotype": [ 1, 1 ], } ] } The resulting merged variant would overwrite the existing calls with those from the new variant: { "variantSetId": "10473108253681171589", "referenceName": "1", "start": "10582", "referenceBases": "G", "alternateBases": [ "A" ], "calls": [ { "callSetId": "10473108253681171589-0", "callSetName": "CALLSET0", "genotype": [ 1, 1 ], } ] } This may be the desired outcome, but it is up to the user to determine if if that is indeed the case. /// /// # Arguments /// @@ -2624,7 +3008,7 @@ impl<'a, C, A> VariantMethods<'a, C, A> { /// Create a builder to help you perform the following task: /// - /// Creates variant data by asynchronously importing the provided information. For the definitions of variant sets and other genomics resources, see [Fundamentals of Google Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) The variants for import will be merged with any existing variant that matches its reference sequence, start, end, reference bases, and alternative bases. If no such variant exists, a new one will be created. When variants are merged, the call information from the new variant is added to the existing variant, and other fields (such as key/value pairs) are discarded. In particular, this means for merged VCF variants that have conflicting INFO fields, some data will be arbitrarily discarded. As a special case, for single-sample VCF files, QUAL and FILTER fields will be moved to the call level; these are sometimes interpreted in a call-specific context. Imported VCF headers are appended to the metadata already in a variant set. + /// Creates variant data by asynchronously importing the provided information. For the definitions of variant sets and other genomics resources, see [Fundamentals of Google Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) The variants for import will be merged with any existing variant that matches its reference sequence, start, end, reference bases, and alternative bases. If no such variant exists, a new one will be created. When variants are merged, the call information from the new variant is added to the existing variant, and Variant info fields are merged as specified in infoMergeConfig. As a special case, for single-sample VCF files, QUAL and FILTER fields will be moved to the call level; these are sometimes interpreted in a call-specific context. Imported VCF headers are appended to the metadata already in a variant set. /// /// # Arguments /// @@ -2696,6 +3080,281 @@ impl<'a, C, A> VariantMethods<'a, C, A> { +/// A builder providing access to all methods supported on *annotation* resources. +/// It is not used directly, but through the `Genomics` hub. +/// +/// # Example +/// +/// Instantiate a resource builder +/// +/// ```test_harness,no_run +/// extern crate hyper; +/// extern crate yup_oauth2 as oauth2; +/// extern crate google_genomics1 as genomics1; +/// +/// # #[test] fn egal() { +/// use std::default::Default; +/// use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; +/// use genomics1::Genomics; +/// +/// let secret: ApplicationSecret = Default::default(); +/// let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, +/// hyper::Client::new(), +/// ::default(), None); +/// let mut hub = Genomics::new(hyper::Client::new(), auth); +/// // Usually you wouldn't bind this to a variable, but keep calling *CallBuilders* +/// // like `batch_create(...)`, `create(...)`, `delete(...)`, `get(...)`, `search(...)` and `update(...)` +/// // to build up your call. +/// let rb = hub.annotations(); +/// # } +/// ``` +pub struct AnnotationMethods<'a, C, A> + where C: 'a, A: 'a { + + hub: &'a Genomics, +} + +impl<'a, C, A> MethodsBuilder for AnnotationMethods<'a, C, A> {} + +impl<'a, C, A> AnnotationMethods<'a, C, A> { + + /// Create a builder to help you perform the following task: + /// + /// Updates an annotation. Caller must have WRITE permission for the associated dataset. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `annotationId` - The ID of the annotation to be updated. + pub fn update(&self, request: Annotation, annotation_id: &str) -> AnnotationUpdateCall<'a, C, A> { + AnnotationUpdateCall { + hub: self.hub, + _request: request, + _annotation_id: annotation_id.to_string(), + _update_mask: Default::default(), + _delegate: Default::default(), + _scopes: Default::default(), + _additional_params: Default::default(), + } + } + + /// Create a builder to help you perform the following task: + /// + /// Gets an annotation. Caller must have READ permission for the associated annotation set. + /// + /// # Arguments + /// + /// * `annotationId` - The ID of the annotation to be retrieved. + pub fn get(&self, annotation_id: &str) -> AnnotationGetCall<'a, C, A> { + AnnotationGetCall { + hub: self.hub, + _annotation_id: annotation_id.to_string(), + _delegate: Default::default(), + _scopes: Default::default(), + _additional_params: Default::default(), + } + } + + /// Create a builder to help you perform the following task: + /// + /// Searches for annotations that match the given criteria. Results are ordered by genomic coordinate (by reference sequence, then position). Annotations with equivalent genomic coordinates are returned in an unspecified order. This order is consistent, such that two queries for the same content (regardless of page size) yield annotations in the same order across their respective streams of paginated responses. Caller must have READ permission for the queried annotation sets. + /// + /// # Arguments + /// + /// * `request` - No description provided. + pub fn search(&self, request: SearchAnnotationsRequest) -> AnnotationSearchCall<'a, C, A> { + AnnotationSearchCall { + hub: self.hub, + _request: request, + _delegate: Default::default(), + _scopes: Default::default(), + _additional_params: Default::default(), + } + } + + /// Create a builder to help you perform the following task: + /// + /// Deletes an annotation. Caller must have WRITE permission for the associated annotation set. + /// + /// # Arguments + /// + /// * `annotationId` - The ID of the annotation to be deleted. + pub fn delete(&self, annotation_id: &str) -> AnnotationDeleteCall<'a, C, A> { + AnnotationDeleteCall { + hub: self.hub, + _annotation_id: annotation_id.to_string(), + _delegate: Default::default(), + _scopes: Default::default(), + _additional_params: Default::default(), + } + } + + /// Create a builder to help you perform the following task: + /// + /// Creates a new annotation. Caller must have WRITE permission for the associated annotation set. The following fields are required: * annotationSetId * referenceName or referenceId ### Transcripts For annotations of type TRANSCRIPT, the following fields of transcript must be provided: * `exons.start` * `exons.end` All other fields may be optionally specified, unless documented as being server-generated (for example, the `id` field). The annotated range must be no longer than 100Mbp (mega base pairs). See the Annotation resource for additional restrictions on each field. + /// + /// # Arguments + /// + /// * `request` - No description provided. + pub fn create(&self, request: Annotation) -> AnnotationCreateCall<'a, C, A> { + AnnotationCreateCall { + hub: self.hub, + _request: request, + _delegate: Default::default(), + _scopes: Default::default(), + _additional_params: Default::default(), + } + } + + /// Create a builder to help you perform the following task: + /// + /// Creates one or more new annotations atomically. All annotations must belong to the same annotation set. Caller must have WRITE permission for this annotation set. For optimal performance, batch positionally adjacent annotations together. If the request has a systemic issue, such as an attempt to write to an inaccessible annotation set, the entire RPC will fail accordingly. For lesser data issues, when possible an error will be isolated to the corresponding batch entry in the response; the remaining well formed annotations will be created normally. For details on the requirements for each individual annotation resource, see CreateAnnotation. + /// + /// # Arguments + /// + /// * `request` - No description provided. + pub fn batch_create(&self, request: BatchCreateAnnotationsRequest) -> AnnotationBatchCreateCall<'a, C, A> { + AnnotationBatchCreateCall { + hub: self.hub, + _request: request, + _delegate: Default::default(), + _scopes: Default::default(), + _additional_params: Default::default(), + } + } +} + + + +/// A builder providing access to all methods supported on *annotationset* resources. +/// It is not used directly, but through the `Genomics` hub. +/// +/// # Example +/// +/// Instantiate a resource builder +/// +/// ```test_harness,no_run +/// extern crate hyper; +/// extern crate yup_oauth2 as oauth2; +/// extern crate google_genomics1 as genomics1; +/// +/// # #[test] fn egal() { +/// use std::default::Default; +/// use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; +/// use genomics1::Genomics; +/// +/// let secret: ApplicationSecret = Default::default(); +/// let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, +/// hyper::Client::new(), +/// ::default(), None); +/// let mut hub = Genomics::new(hyper::Client::new(), auth); +/// // Usually you wouldn't bind this to a variable, but keep calling *CallBuilders* +/// // like `create(...)`, `delete(...)`, `get(...)`, `search(...)` and `update(...)` +/// // to build up your call. +/// let rb = hub.annotationsets(); +/// # } +/// ``` +pub struct AnnotationsetMethods<'a, C, A> + where C: 'a, A: 'a { + + hub: &'a Genomics, +} + +impl<'a, C, A> MethodsBuilder for AnnotationsetMethods<'a, C, A> {} + +impl<'a, C, A> AnnotationsetMethods<'a, C, A> { + + /// Create a builder to help you perform the following task: + /// + /// Updates an annotation set. The update must respect all mutability restrictions and other invariants described on the annotation set resource. Caller must have WRITE permission for the associated dataset. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `annotationSetId` - The ID of the annotation set to be updated. + pub fn update(&self, request: AnnotationSet, annotation_set_id: &str) -> AnnotationsetUpdateCall<'a, C, A> { + AnnotationsetUpdateCall { + hub: self.hub, + _request: request, + _annotation_set_id: annotation_set_id.to_string(), + _update_mask: Default::default(), + _delegate: Default::default(), + _scopes: Default::default(), + _additional_params: Default::default(), + } + } + + /// Create a builder to help you perform the following task: + /// + /// Searches for annotation sets that match the given criteria. Annotation sets are returned in an unspecified order. This order is consistent, such that two queries for the same content (regardless of page size) yield annotation sets in the same order across their respective streams of paginated responses. Caller must have READ permission for the queried datasets. + /// + /// # Arguments + /// + /// * `request` - No description provided. + pub fn search(&self, request: SearchAnnotationSetsRequest) -> AnnotationsetSearchCall<'a, C, A> { + AnnotationsetSearchCall { + hub: self.hub, + _request: request, + _delegate: Default::default(), + _scopes: Default::default(), + _additional_params: Default::default(), + } + } + + /// Create a builder to help you perform the following task: + /// + /// Creates a new annotation set. Caller must have WRITE permission for the associated dataset. The following fields are required: * datasetId * referenceSetId All other fields may be optionally specified, unless documented as being server-generated (for example, the `id` field). + /// + /// # Arguments + /// + /// * `request` - No description provided. + pub fn create(&self, request: AnnotationSet) -> AnnotationsetCreateCall<'a, C, A> { + AnnotationsetCreateCall { + hub: self.hub, + _request: request, + _delegate: Default::default(), + _scopes: Default::default(), + _additional_params: Default::default(), + } + } + + /// Create a builder to help you perform the following task: + /// + /// Deletes an annotation set. Caller must have WRITE permission for the associated annotation set. + /// + /// # Arguments + /// + /// * `annotationSetId` - The ID of the annotation set to be deleted. + pub fn delete(&self, annotation_set_id: &str) -> AnnotationsetDeleteCall<'a, C, A> { + AnnotationsetDeleteCall { + hub: self.hub, + _annotation_set_id: annotation_set_id.to_string(), + _delegate: Default::default(), + _scopes: Default::default(), + _additional_params: Default::default(), + } + } + + /// Create a builder to help you perform the following task: + /// + /// Gets an annotation set. Caller must have READ permission for the associated dataset. + /// + /// # Arguments + /// + /// * `annotationSetId` - The ID of the annotation set to be retrieved. + pub fn get(&self, annotation_set_id: &str) -> AnnotationsetGetCall<'a, C, A> { + AnnotationsetGetCall { + hub: self.hub, + _annotation_set_id: annotation_set_id.to_string(), + _delegate: Default::default(), + _scopes: Default::default(), + _additional_params: Default::default(), + } + } +} + + + /// A builder providing access to all methods supported on *variantset* resources. /// It is not used directly, but through the `Genomics` hub. /// @@ -2906,7 +3565,7 @@ impl<'a, C, A> OperationCancelCall<'a, C, A> where C: BorrowMut, pub fn doit(mut self) -> Result<(hyper::client::Response, Empty)> { use url::percent_encoding::{percent_encode, FORM_URLENCODED_ENCODE_SET}; use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -2989,8 +3648,7 @@ impl<'a, C, A> OperationCancelCall<'a, C, A> where C: BorrowMut, } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -3176,7 +3834,7 @@ impl<'a, C, A> OperationGetCall<'a, C, A> where C: BorrowMut, A: pub fn doit(mut self) -> Result<(hyper::client::Response, Operation)> { use url::percent_encoding::{percent_encode, FORM_URLENCODED_ENCODE_SET}; use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -3248,8 +3906,7 @@ impl<'a, C, A> OperationGetCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -3428,7 +4085,7 @@ impl<'a, C, A> OperationListCall<'a, C, A> where C: BorrowMut, A: pub fn doit(mut self) -> Result<(hyper::client::Response, ListOperationsResponse)> { use url::percent_encoding::{percent_encode, FORM_URLENCODED_ENCODE_SET}; use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -3509,8 +4166,7 @@ impl<'a, C, A> OperationListCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -3709,7 +4365,7 @@ impl<'a, C, A> DatasetCreateCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Dataset)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -3767,8 +4423,7 @@ impl<'a, C, A> DatasetCreateCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -3895,7 +4550,7 @@ impl<'a, C, A> DatasetCreateCall<'a, C, A> where C: BorrowMut, A: } -/// Deletes a dataset. For the definitions of datasets and other genomics resources, see [Fundamentals of Google Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) +/// Deletes a dataset and all of its contents (all read group sets, reference sets, variant sets, call sets, annotation sets, etc.) This is reversible (up to one week after the deletion) via the datasets.undelete operation. For the definitions of datasets and other genomics resources, see [Fundamentals of Google Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) /// /// A builder for the *delete* method supported by a *dataset* resource. /// It is not used directly, but through a `DatasetMethods` instance. @@ -3943,7 +4598,7 @@ impl<'a, C, A> DatasetDeleteCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Empty)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -4012,8 +4667,7 @@ impl<'a, C, A> DatasetDeleteCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Delete, &url) @@ -4192,7 +4846,7 @@ impl<'a, C, A> DatasetUndeleteCall<'a, C, A> where C: BorrowMut, /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Dataset)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -4272,8 +4926,7 @@ impl<'a, C, A> DatasetUndeleteCall<'a, C, A> where C: BorrowMut, } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -4466,7 +5119,7 @@ impl<'a, C, A> DatasetSetIamPolicyCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, Policy)> { use url::percent_encoding::{percent_encode, FORM_URLENCODED_ENCODE_SET}; use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -4549,8 +5202,7 @@ impl<'a, C, A> DatasetSetIamPolicyCall<'a, C, A> where C: BorrowMut DatasetTestIamPermissionCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, TestIamPermissionsResponse)> { use url::percent_encoding::{percent_encode, FORM_URLENCODED_ENCODE_SET}; use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -4826,8 +5478,7 @@ impl<'a, C, A> DatasetTestIamPermissionCall<'a, C, A> where C: BorrowMut DatasetGetCall<'a, C, A> where C: BorrowMut, A: oa /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Dataset)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -5081,8 +5732,7 @@ impl<'a, C, A> DatasetGetCall<'a, C, A> where C: BorrowMut, A: oa } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -5259,7 +5909,7 @@ impl<'a, C, A> DatasetListCall<'a, C, A> where C: BorrowMut, A: o /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, ListDatasetsResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -5315,8 +5965,7 @@ impl<'a, C, A> DatasetListCall<'a, C, A> where C: BorrowMut, A: o } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -5507,7 +6156,7 @@ impl<'a, C, A> DatasetGetIamPolicyCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, Policy)> { use url::percent_encoding::{percent_encode, FORM_URLENCODED_ENCODE_SET}; use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -5590,8 +6239,7 @@ impl<'a, C, A> DatasetGetIamPolicyCall<'a, C, A> where C: BorrowMut DatasetPatchCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Dataset)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -5868,8 +6516,7 @@ impl<'a, C, A> DatasetPatchCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -6067,7 +6714,7 @@ impl<'a, C, A> ReferencesetSearchCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, SearchReferenceSetsResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -6125,8 +6772,7 @@ impl<'a, C, A> ReferencesetSearchCall<'a, C, A> where C: BorrowMut ReferencesetGetCall<'a, C, A> where C: BorrowMut, /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, ReferenceSet)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -6370,8 +7016,7 @@ impl<'a, C, A> ReferencesetGetCall<'a, C, A> where C: BorrowMut, } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -6549,7 +7194,7 @@ impl<'a, C, A> CallsetSearchCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, SearchCallSetsResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -6607,8 +7252,7 @@ impl<'a, C, A> CallsetSearchCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -6792,7 +7436,7 @@ impl<'a, C, A> CallsetPatchCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, CallSet)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -6875,8 +7519,7 @@ impl<'a, C, A> CallsetPatchCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -7074,7 +7717,7 @@ impl<'a, C, A> CallsetCreateCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, CallSet)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -7132,8 +7775,7 @@ impl<'a, C, A> CallsetCreateCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -7308,7 +7950,7 @@ impl<'a, C, A> CallsetDeleteCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Empty)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -7377,8 +8019,7 @@ impl<'a, C, A> CallsetDeleteCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Delete, &url) @@ -7550,7 +8191,7 @@ impl<'a, C, A> CallsetGetCall<'a, C, A> where C: BorrowMut, A: oa /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, CallSet)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -7619,8 +8260,7 @@ impl<'a, C, A> CallsetGetCall<'a, C, A> where C: BorrowMut, A: oa } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -7798,7 +8438,7 @@ impl<'a, C, A> ReadSearchCall<'a, C, A> where C: BorrowMut, A: oa /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, SearchReadsResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -7856,8 +8496,7 @@ impl<'a, C, A> ReadSearchCall<'a, C, A> where C: BorrowMut, A: oa } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -8038,7 +8677,7 @@ impl<'a, C, A> ReadStreamCall<'a, C, A> where C: BorrowMut, A: oa /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, StreamReadsResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -8096,8 +8735,7 @@ impl<'a, C, A> ReadStreamCall<'a, C, A> where C: BorrowMut, A: oa } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -8279,7 +8917,7 @@ impl<'a, C, A> ReadgroupsetExportCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, Operation)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -8359,8 +8997,7 @@ impl<'a, C, A> ReadgroupsetExportCall<'a, C, A> where C: BorrowMut ReadgroupsetImportCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, Operation)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -8609,8 +9246,7 @@ impl<'a, C, A> ReadgroupsetImportCall<'a, C, A> where C: BorrowMut ReadgroupsetPatchCall<'a, C, A> where C: BorrowMut /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, ReadGroupSet)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -8877,8 +9513,7 @@ impl<'a, C, A> ReadgroupsetPatchCall<'a, C, A> where C: BorrowMut } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -9070,7 +9705,7 @@ impl<'a, C, A> ReadgroupsetGetCall<'a, C, A> where C: BorrowMut, /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, ReadGroupSet)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -9139,8 +9774,7 @@ impl<'a, C, A> ReadgroupsetGetCall<'a, C, A> where C: BorrowMut, } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -9324,7 +9958,7 @@ impl<'a, C, A> ReadgroupsetCoveragebucketListCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, ListCoverageBucketsResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -9411,8 +10045,7 @@ impl<'a, C, A> ReadgroupsetCoveragebucketListCall<'a, C, A> where C: BorrowMut ReadgroupsetDeleteCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, Empty)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -9695,8 +10328,7 @@ impl<'a, C, A> ReadgroupsetDeleteCall<'a, C, A> where C: BorrowMut ReadgroupsetSearchCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, SearchReadGroupSetsResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -9932,8 +10564,7 @@ impl<'a, C, A> ReadgroupsetSearchCall<'a, C, A> where C: BorrowMut ReferenceBaseListCall<'a, C, A> where C: BorrowMut /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, ListBasesResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -10197,8 +10828,7 @@ impl<'a, C, A> ReferenceBaseListCall<'a, C, A> where C: BorrowMut } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -10404,7 +11034,7 @@ impl<'a, C, A> ReferenceSearchCall<'a, C, A> where C: BorrowMut, /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, SearchReferencesResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -10462,8 +11092,7 @@ impl<'a, C, A> ReferenceSearchCall<'a, C, A> where C: BorrowMut, } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -10638,7 +11267,7 @@ impl<'a, C, A> ReferenceGetCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Reference)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -10707,8 +11336,7 @@ impl<'a, C, A> ReferenceGetCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -10886,7 +11514,7 @@ impl<'a, C, A> VariantSearchCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, SearchVariantsResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -10944,8 +11572,7 @@ impl<'a, C, A> VariantSearchCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -11120,7 +11747,7 @@ impl<'a, C, A> VariantDeleteCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Empty)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -11189,8 +11816,7 @@ impl<'a, C, A> VariantDeleteCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Delete, &url) @@ -11362,7 +11988,7 @@ impl<'a, C, A> VariantGetCall<'a, C, A> where C: BorrowMut, A: oa /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Variant)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -11431,8 +12057,7 @@ impl<'a, C, A> VariantGetCall<'a, C, A> where C: BorrowMut, A: oa } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -11556,7 +12181,7 @@ impl<'a, C, A> VariantGetCall<'a, C, A> where C: BorrowMut, A: oa } -/// Merges the given variants with existing variants. For the definitions of variants and other genomics resources, see [Fundamentals of Google Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) Each variant will be merged with an existing variant that matches its reference sequence, start, end, reference bases, and alternative bases. If no such variant exists, a new one will be created. When variants are merged, the call information from the new variant is added to the existing variant, and other fields (such as key/value pairs) are discarded. +/// Merges the given variants with existing variants. For the definitions of variants and other genomics resources, see [Fundamentals of Google Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) Each variant will be merged with an existing variant that matches its reference sequence, start, end, reference bases, and alternative bases. If no such variant exists, a new one will be created. When variants are merged, the call information from the new variant is added to the existing variant. Variant info fields are merged as specified in the infoMergeConfig field of the MergeVariantsRequest. Please exercise caution when using this method! It is easy to introduce mistakes in existing variants and difficult to back out of them. For example, suppose you were trying to merge a new variant with an existing one and both variants contain calls that belong to callsets with the same callset ID. // Existing variant - irrelevant fields trimmed for clarity { "variantSetId": "10473108253681171589", "referenceName": "1", "start": "10582", "referenceBases": "G", "alternateBases": [ "A" ], "calls": [ { "callSetId": "10473108253681171589-0", "callSetName": "CALLSET0", "genotype": [ 0, 1 ], } ] } // New variant with conflicting call information { "variantSetId": "10473108253681171589", "referenceName": "1", "start": "10582", "referenceBases": "G", "alternateBases": [ "A" ], "calls": [ { "callSetId": "10473108253681171589-0", "callSetName": "CALLSET0", "genotype": [ 1, 1 ], } ] } The resulting merged variant would overwrite the existing calls with those from the new variant: { "variantSetId": "10473108253681171589", "referenceName": "1", "start": "10582", "referenceBases": "G", "alternateBases": [ "A" ], "calls": [ { "callSetId": "10473108253681171589-0", "callSetName": "CALLSET0", "genotype": [ 1, 1 ], } ] } This may be the desired outcome, but it is up to the user to determine if if that is indeed the case. /// /// A builder for the *merge* method supported by a *variant* resource. /// It is not used directly, but through a `VariantMethods` instance. @@ -11610,7 +12235,7 @@ impl<'a, C, A> VariantMergeCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Empty)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -11668,8 +12293,7 @@ impl<'a, C, A> VariantMergeCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -11796,7 +12420,7 @@ impl<'a, C, A> VariantMergeCall<'a, C, A> where C: BorrowMut, A: } -/// Creates variant data by asynchronously importing the provided information. For the definitions of variant sets and other genomics resources, see [Fundamentals of Google Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) The variants for import will be merged with any existing variant that matches its reference sequence, start, end, reference bases, and alternative bases. If no such variant exists, a new one will be created. When variants are merged, the call information from the new variant is added to the existing variant, and other fields (such as key/value pairs) are discarded. In particular, this means for merged VCF variants that have conflicting INFO fields, some data will be arbitrarily discarded. As a special case, for single-sample VCF files, QUAL and FILTER fields will be moved to the call level; these are sometimes interpreted in a call-specific context. Imported VCF headers are appended to the metadata already in a variant set. +/// Creates variant data by asynchronously importing the provided information. For the definitions of variant sets and other genomics resources, see [Fundamentals of Google Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) The variants for import will be merged with any existing variant that matches its reference sequence, start, end, reference bases, and alternative bases. If no such variant exists, a new one will be created. When variants are merged, the call information from the new variant is added to the existing variant, and Variant info fields are merged as specified in infoMergeConfig. As a special case, for single-sample VCF files, QUAL and FILTER fields will be moved to the call level; these are sometimes interpreted in a call-specific context. Imported VCF headers are appended to the metadata already in a variant set. /// /// A builder for the *import* method supported by a *variant* resource. /// It is not used directly, but through a `VariantMethods` instance. @@ -11850,7 +12474,7 @@ impl<'a, C, A> VariantImportCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Operation)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -11908,8 +12532,7 @@ impl<'a, C, A> VariantImportCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -12090,7 +12713,7 @@ impl<'a, C, A> VariantCreateCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Variant)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -12148,8 +12771,7 @@ impl<'a, C, A> VariantCreateCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -12333,7 +12955,7 @@ impl<'a, C, A> VariantPatchCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Variant)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -12416,8 +13038,7 @@ impl<'a, C, A> VariantPatchCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -12615,7 +13236,7 @@ impl<'a, C, A> VariantStreamCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, StreamVariantsResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -12673,8 +13294,7 @@ impl<'a, C, A> VariantStreamCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -12801,6 +13421,2733 @@ impl<'a, C, A> VariantStreamCall<'a, C, A> where C: BorrowMut, A: } +/// Updates an annotation. Caller must have WRITE permission for the associated dataset. +/// +/// A builder for the *update* method supported by a *annotation* resource. +/// It is not used directly, but through a `AnnotationMethods` instance. +/// +/// # Example +/// +/// Instantiate a resource method builder +/// +/// ```test_harness,no_run +/// # extern crate hyper; +/// # extern crate yup_oauth2 as oauth2; +/// # extern crate google_genomics1 as genomics1; +/// use genomics1::Annotation; +/// # #[test] fn egal() { +/// # use std::default::Default; +/// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; +/// # use genomics1::Genomics; +/// +/// # let secret: ApplicationSecret = Default::default(); +/// # let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, +/// # hyper::Client::new(), +/// # ::default(), None); +/// # let mut hub = Genomics::new(hyper::Client::new(), auth); +/// // As the method needs a request, you would usually fill it with the desired information +/// // into the respective structure. Some of the parts shown here might not be applicable ! +/// // Values shown here are possibly random and not representative ! +/// let mut req = Annotation::default(); +/// +/// // You can configure optional parameters by calling the respective setters at will, and +/// // execute the final call using `doit()`. +/// // Values shown here are possibly random and not representative ! +/// let result = hub.annotations().update(req, "annotationId") +/// .update_mask("et") +/// .doit(); +/// # } +/// ``` +pub struct AnnotationUpdateCall<'a, C, A> + where C: 'a, A: 'a { + + hub: &'a Genomics, + _request: Annotation, + _annotation_id: String, + _update_mask: Option, + _delegate: Option<&'a mut Delegate>, + _additional_params: HashMap, + _scopes: BTreeMap +} + +impl<'a, C, A> CallBuilder for AnnotationUpdateCall<'a, C, A> {} + +impl<'a, C, A> AnnotationUpdateCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { + + + /// Perform the operation you have build so far. + pub fn doit(mut self) -> Result<(hyper::client::Response, Annotation)> { + use std::io::{Read, Seek}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; + let mut dd = DefaultDelegate; + let mut dlg: &mut Delegate = match self._delegate { + Some(d) => d, + None => &mut dd + }; + dlg.begin(MethodInfo { id: "genomics.annotations.update", + http_method: hyper::method::Method::Put }); + let mut params: Vec<(&str, String)> = Vec::with_capacity((5 + self._additional_params.len())); + params.push(("annotationId", self._annotation_id.to_string())); + if let Some(value) = self._update_mask { + params.push(("updateMask", value.to_string())); + } + for &field in ["alt", "annotationId", "updateMask"].iter() { + if self._additional_params.contains_key(field) { + dlg.finished(false); + return Err(Error::FieldClash(field)); + } + } + for (name, value) in self._additional_params.iter() { + params.push((&name, value.clone())); + } + + params.push(("alt", "json".to_string())); + + let mut url = "https://genomics.googleapis.com/v1/annotations/{annotationId}".to_string(); + if self._scopes.len() == 0 { + self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); + } + + for &(find_this, param_name) in [("{annotationId}", "annotationId")].iter() { + let mut replace_with: Option<&str> = None; + for &(name, ref value) in params.iter() { + if name == param_name { + replace_with = Some(value); + break; + } + } + url = url.replace(find_this, replace_with.expect("to find substitution value in params")); + } + { + let mut indices_for_removal: Vec = Vec::with_capacity(1); + for param_name in ["annotationId"].iter() { + if let Some(index) = params.iter().position(|t| &t.0 == param_name) { + indices_for_removal.push(index); + } + } + for &index in indices_for_removal.iter() { + params.remove(index); + } + } + + if params.len() > 0 { + url.push('?'); + url.push_str(&url::form_urlencoded::serialize(params)); + } + + let mut json_mime_type = mime::Mime(mime::TopLevel::Application, mime::SubLevel::Json, Default::default()); + let mut request_value_reader = + { + let mut value = json::value::to_value(&self._request); + remove_json_null_values(&mut value); + let mut dst = io::Cursor::new(Vec::with_capacity(128)); + json::to_writer(&mut dst, &value).unwrap(); + dst + }; + let request_size = request_value_reader.seek(io::SeekFrom::End(0)).unwrap(); + request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); + + + loop { + let token = match self.hub.auth.borrow_mut().token(self._scopes.keys()) { + Ok(token) => token, + Err(err) => { + match dlg.token(&*err) { + Some(token) => token, + None => { + dlg.finished(false); + return Err(Error::MissingToken(err)) + } + } + } + }; + let auth_header = Authorization(Bearer { token: token.access_token }); + request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); + let mut req_result = { + let mut client = &mut *self.hub.client.borrow_mut(); + let mut req = client.borrow_mut().request(hyper::method::Method::Put, &url) + .header(UserAgent(self.hub._user_agent.clone())) + .header(auth_header.clone()) + .header(ContentType(json_mime_type.clone())) + .header(ContentLength(request_size as u64)) + .body(&mut request_value_reader); + + dlg.pre_request(); + req.send() + }; + + match req_result { + Err(err) => { + if let oauth2::Retry::After(d) = dlg.http_error(&err) { + sleep(d); + continue; + } + dlg.finished(false); + return Err(Error::HttpError(err)) + } + Ok(mut res) => { + if !res.status.is_success() { + let mut json_err = String::new(); + res.read_to_string(&mut json_err).unwrap(); + if let oauth2::Retry::After(d) = dlg.http_failure(&res, + json::from_str(&json_err).ok(), + json::from_str(&json_err).ok()) { + sleep(d); + continue; + } + dlg.finished(false); + return match json::from_str::(&json_err){ + Err(_) => Err(Error::Failure(res)), + Ok(serr) => Err(Error::BadRequest(serr)) + } + } + let result_value = { + let mut json_response = String::new(); + res.read_to_string(&mut json_response).unwrap(); + match json::from_str(&json_response) { + Ok(decoded) => (res, decoded), + Err(err) => { + dlg.response_json_decode_error(&json_response, &err); + return Err(Error::JsonDecodeError(json_response, err)); + } + } + }; + + dlg.finished(true); + return Ok(result_value) + } + } + } + } + + + /// + /// Sets the *request* property to the given value. + /// + /// Even though the property as already been set when instantiating this call, + /// we provide this method for API completeness. + pub fn request(mut self, new_value: Annotation) -> AnnotationUpdateCall<'a, C, A> { + self._request = new_value; + self + } + /// The ID of the annotation to be updated. + /// + /// Sets the *annotation id* path property to the given value. + /// + /// Even though the property as already been set when instantiating this call, + /// we provide this method for API completeness. + pub fn annotation_id(mut self, new_value: &str) -> AnnotationUpdateCall<'a, C, A> { + self._annotation_id = new_value.to_string(); + self + } + /// An optional mask specifying which fields to update. Mutable fields are name, variant, transcript, and info. If unspecified, all mutable fields will be updated. + /// + /// Sets the *update mask* query property to the given value. + pub fn update_mask(mut self, new_value: &str) -> AnnotationUpdateCall<'a, C, A> { + self._update_mask = Some(new_value.to_string()); + self + } + /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong + /// while executing the actual API request. + /// + /// It should be used to handle progress information, and to implement a certain level of resilience. + /// + /// Sets the *delegate* property to the given value. + pub fn delegate(mut self, new_value: &'a mut Delegate) -> AnnotationUpdateCall<'a, C, A> { + self._delegate = Some(new_value); + self + } + + /// Set any additional parameter of the query string used in the request. + /// It should be used to set parameters which are not yet available through their own + /// setters. + /// + /// Please note that this method must not be used to set any of the known paramters + /// which have their own setter method. If done anyway, the request will fail. + /// + /// # Additional Parameters + /// + /// * *bearer_token* (query-string) - OAuth bearer token. + /// * *pp* (query-boolean) - Pretty-print response. + /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. + /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). + /// * *access_token* (query-string) - OAuth access token. + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *quotaUser* (query-string) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + /// * *callback* (query-string) - JSONP + /// * *oauth_token* (query-string) - OAuth 2.0 token for the current user. + /// * *key* (query-string) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. + /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). + /// * *alt* (query-string) - Data format for response. + /// * *$.xgafv* (query-string) - V1 error format. + pub fn param(mut self, name: T, value: T) -> AnnotationUpdateCall<'a, C, A> + where T: AsRef { + self._additional_params.insert(name.as_ref().to_string(), value.as_ref().to_string()); + self + } + + /// Identifies the authorization scope for the method you are building. + /// + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::CloudPlatform`. + /// + /// The `scope` will be added to a set of scopes. This is important as one can maintain access + /// tokens for more than one scope. + /// + /// Usually there is more than one suitable scope to authorize an operation, some of which may + /// encompass more rights than others. For example, for listing resources, a *read-only* scope will be + /// sufficient, a read-write scope will do as well. + pub fn add_scope(mut self, scope: T) -> AnnotationUpdateCall<'a, C, A> + where T: AsRef { + self._scopes.insert(scope.as_ref().to_string(), ()); + self + } +} + + +/// Gets an annotation. Caller must have READ permission for the associated annotation set. +/// +/// A builder for the *get* method supported by a *annotation* resource. +/// It is not used directly, but through a `AnnotationMethods` instance. +/// +/// # Example +/// +/// Instantiate a resource method builder +/// +/// ```test_harness,no_run +/// # extern crate hyper; +/// # extern crate yup_oauth2 as oauth2; +/// # extern crate google_genomics1 as genomics1; +/// # #[test] fn egal() { +/// # use std::default::Default; +/// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; +/// # use genomics1::Genomics; +/// +/// # let secret: ApplicationSecret = Default::default(); +/// # let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, +/// # hyper::Client::new(), +/// # ::default(), None); +/// # let mut hub = Genomics::new(hyper::Client::new(), auth); +/// // You can configure optional parameters by calling the respective setters at will, and +/// // execute the final call using `doit()`. +/// // Values shown here are possibly random and not representative ! +/// let result = hub.annotations().get("annotationId") +/// .doit(); +/// # } +/// ``` +pub struct AnnotationGetCall<'a, C, A> + where C: 'a, A: 'a { + + hub: &'a Genomics, + _annotation_id: String, + _delegate: Option<&'a mut Delegate>, + _additional_params: HashMap, + _scopes: BTreeMap +} + +impl<'a, C, A> CallBuilder for AnnotationGetCall<'a, C, A> {} + +impl<'a, C, A> AnnotationGetCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { + + + /// Perform the operation you have build so far. + pub fn doit(mut self) -> Result<(hyper::client::Response, Annotation)> { + use std::io::{Read, Seek}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; + let mut dd = DefaultDelegate; + let mut dlg: &mut Delegate = match self._delegate { + Some(d) => d, + None => &mut dd + }; + dlg.begin(MethodInfo { id: "genomics.annotations.get", + http_method: hyper::method::Method::Get }); + let mut params: Vec<(&str, String)> = Vec::with_capacity((3 + self._additional_params.len())); + params.push(("annotationId", self._annotation_id.to_string())); + for &field in ["alt", "annotationId"].iter() { + if self._additional_params.contains_key(field) { + dlg.finished(false); + return Err(Error::FieldClash(field)); + } + } + for (name, value) in self._additional_params.iter() { + params.push((&name, value.clone())); + } + + params.push(("alt", "json".to_string())); + + let mut url = "https://genomics.googleapis.com/v1/annotations/{annotationId}".to_string(); + if self._scopes.len() == 0 { + self._scopes.insert(Scope::Readonly.as_ref().to_string(), ()); + } + + for &(find_this, param_name) in [("{annotationId}", "annotationId")].iter() { + let mut replace_with: Option<&str> = None; + for &(name, ref value) in params.iter() { + if name == param_name { + replace_with = Some(value); + break; + } + } + url = url.replace(find_this, replace_with.expect("to find substitution value in params")); + } + { + let mut indices_for_removal: Vec = Vec::with_capacity(1); + for param_name in ["annotationId"].iter() { + if let Some(index) = params.iter().position(|t| &t.0 == param_name) { + indices_for_removal.push(index); + } + } + for &index in indices_for_removal.iter() { + params.remove(index); + } + } + + if params.len() > 0 { + url.push('?'); + url.push_str(&url::form_urlencoded::serialize(params)); + } + + + + loop { + let token = match self.hub.auth.borrow_mut().token(self._scopes.keys()) { + Ok(token) => token, + Err(err) => { + match dlg.token(&*err) { + Some(token) => token, + None => { + dlg.finished(false); + return Err(Error::MissingToken(err)) + } + } + } + }; + let auth_header = Authorization(Bearer { token: token.access_token }); + let mut req_result = { + let mut client = &mut *self.hub.client.borrow_mut(); + let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) + .header(UserAgent(self.hub._user_agent.clone())) + .header(auth_header.clone()); + + dlg.pre_request(); + req.send() + }; + + match req_result { + Err(err) => { + if let oauth2::Retry::After(d) = dlg.http_error(&err) { + sleep(d); + continue; + } + dlg.finished(false); + return Err(Error::HttpError(err)) + } + Ok(mut res) => { + if !res.status.is_success() { + let mut json_err = String::new(); + res.read_to_string(&mut json_err).unwrap(); + if let oauth2::Retry::After(d) = dlg.http_failure(&res, + json::from_str(&json_err).ok(), + json::from_str(&json_err).ok()) { + sleep(d); + continue; + } + dlg.finished(false); + return match json::from_str::(&json_err){ + Err(_) => Err(Error::Failure(res)), + Ok(serr) => Err(Error::BadRequest(serr)) + } + } + let result_value = { + let mut json_response = String::new(); + res.read_to_string(&mut json_response).unwrap(); + match json::from_str(&json_response) { + Ok(decoded) => (res, decoded), + Err(err) => { + dlg.response_json_decode_error(&json_response, &err); + return Err(Error::JsonDecodeError(json_response, err)); + } + } + }; + + dlg.finished(true); + return Ok(result_value) + } + } + } + } + + + /// The ID of the annotation to be retrieved. + /// + /// Sets the *annotation id* path property to the given value. + /// + /// Even though the property as already been set when instantiating this call, + /// we provide this method for API completeness. + pub fn annotation_id(mut self, new_value: &str) -> AnnotationGetCall<'a, C, A> { + self._annotation_id = new_value.to_string(); + self + } + /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong + /// while executing the actual API request. + /// + /// It should be used to handle progress information, and to implement a certain level of resilience. + /// + /// Sets the *delegate* property to the given value. + pub fn delegate(mut self, new_value: &'a mut Delegate) -> AnnotationGetCall<'a, C, A> { + self._delegate = Some(new_value); + self + } + + /// Set any additional parameter of the query string used in the request. + /// It should be used to set parameters which are not yet available through their own + /// setters. + /// + /// Please note that this method must not be used to set any of the known paramters + /// which have their own setter method. If done anyway, the request will fail. + /// + /// # Additional Parameters + /// + /// * *bearer_token* (query-string) - OAuth bearer token. + /// * *pp* (query-boolean) - Pretty-print response. + /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. + /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). + /// * *access_token* (query-string) - OAuth access token. + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *quotaUser* (query-string) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + /// * *callback* (query-string) - JSONP + /// * *oauth_token* (query-string) - OAuth 2.0 token for the current user. + /// * *key* (query-string) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. + /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). + /// * *alt* (query-string) - Data format for response. + /// * *$.xgafv* (query-string) - V1 error format. + pub fn param(mut self, name: T, value: T) -> AnnotationGetCall<'a, C, A> + where T: AsRef { + self._additional_params.insert(name.as_ref().to_string(), value.as_ref().to_string()); + self + } + + /// Identifies the authorization scope for the method you are building. + /// + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Readonly`. + /// + /// The `scope` will be added to a set of scopes. This is important as one can maintain access + /// tokens for more than one scope. + /// + /// Usually there is more than one suitable scope to authorize an operation, some of which may + /// encompass more rights than others. For example, for listing resources, a *read-only* scope will be + /// sufficient, a read-write scope will do as well. + pub fn add_scope(mut self, scope: T) -> AnnotationGetCall<'a, C, A> + where T: AsRef { + self._scopes.insert(scope.as_ref().to_string(), ()); + self + } +} + + +/// Searches for annotations that match the given criteria. Results are ordered by genomic coordinate (by reference sequence, then position). Annotations with equivalent genomic coordinates are returned in an unspecified order. This order is consistent, such that two queries for the same content (regardless of page size) yield annotations in the same order across their respective streams of paginated responses. Caller must have READ permission for the queried annotation sets. +/// +/// A builder for the *search* method supported by a *annotation* resource. +/// It is not used directly, but through a `AnnotationMethods` instance. +/// +/// # Example +/// +/// Instantiate a resource method builder +/// +/// ```test_harness,no_run +/// # extern crate hyper; +/// # extern crate yup_oauth2 as oauth2; +/// # extern crate google_genomics1 as genomics1; +/// use genomics1::SearchAnnotationsRequest; +/// # #[test] fn egal() { +/// # use std::default::Default; +/// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; +/// # use genomics1::Genomics; +/// +/// # let secret: ApplicationSecret = Default::default(); +/// # let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, +/// # hyper::Client::new(), +/// # ::default(), None); +/// # let mut hub = Genomics::new(hyper::Client::new(), auth); +/// // As the method needs a request, you would usually fill it with the desired information +/// // into the respective structure. Some of the parts shown here might not be applicable ! +/// // Values shown here are possibly random and not representative ! +/// let mut req = SearchAnnotationsRequest::default(); +/// +/// // You can configure optional parameters by calling the respective setters at will, and +/// // execute the final call using `doit()`. +/// // Values shown here are possibly random and not representative ! +/// let result = hub.annotations().search(req) +/// .doit(); +/// # } +/// ``` +pub struct AnnotationSearchCall<'a, C, A> + where C: 'a, A: 'a { + + hub: &'a Genomics, + _request: SearchAnnotationsRequest, + _delegate: Option<&'a mut Delegate>, + _additional_params: HashMap, + _scopes: BTreeMap +} + +impl<'a, C, A> CallBuilder for AnnotationSearchCall<'a, C, A> {} + +impl<'a, C, A> AnnotationSearchCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { + + + /// Perform the operation you have build so far. + pub fn doit(mut self) -> Result<(hyper::client::Response, SearchAnnotationsResponse)> { + use std::io::{Read, Seek}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; + let mut dd = DefaultDelegate; + let mut dlg: &mut Delegate = match self._delegate { + Some(d) => d, + None => &mut dd + }; + dlg.begin(MethodInfo { id: "genomics.annotations.search", + http_method: hyper::method::Method::Post }); + let mut params: Vec<(&str, String)> = Vec::with_capacity((3 + self._additional_params.len())); + for &field in ["alt"].iter() { + if self._additional_params.contains_key(field) { + dlg.finished(false); + return Err(Error::FieldClash(field)); + } + } + for (name, value) in self._additional_params.iter() { + params.push((&name, value.clone())); + } + + params.push(("alt", "json".to_string())); + + let mut url = "https://genomics.googleapis.com/v1/annotations/search".to_string(); + if self._scopes.len() == 0 { + self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); + } + + + if params.len() > 0 { + url.push('?'); + url.push_str(&url::form_urlencoded::serialize(params)); + } + + let mut json_mime_type = mime::Mime(mime::TopLevel::Application, mime::SubLevel::Json, Default::default()); + let mut request_value_reader = + { + let mut value = json::value::to_value(&self._request); + remove_json_null_values(&mut value); + let mut dst = io::Cursor::new(Vec::with_capacity(128)); + json::to_writer(&mut dst, &value).unwrap(); + dst + }; + let request_size = request_value_reader.seek(io::SeekFrom::End(0)).unwrap(); + request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); + + + loop { + let token = match self.hub.auth.borrow_mut().token(self._scopes.keys()) { + Ok(token) => token, + Err(err) => { + match dlg.token(&*err) { + Some(token) => token, + None => { + dlg.finished(false); + return Err(Error::MissingToken(err)) + } + } + } + }; + let auth_header = Authorization(Bearer { token: token.access_token }); + request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); + let mut req_result = { + let mut client = &mut *self.hub.client.borrow_mut(); + let mut req = client.borrow_mut().request(hyper::method::Method::Post, &url) + .header(UserAgent(self.hub._user_agent.clone())) + .header(auth_header.clone()) + .header(ContentType(json_mime_type.clone())) + .header(ContentLength(request_size as u64)) + .body(&mut request_value_reader); + + dlg.pre_request(); + req.send() + }; + + match req_result { + Err(err) => { + if let oauth2::Retry::After(d) = dlg.http_error(&err) { + sleep(d); + continue; + } + dlg.finished(false); + return Err(Error::HttpError(err)) + } + Ok(mut res) => { + if !res.status.is_success() { + let mut json_err = String::new(); + res.read_to_string(&mut json_err).unwrap(); + if let oauth2::Retry::After(d) = dlg.http_failure(&res, + json::from_str(&json_err).ok(), + json::from_str(&json_err).ok()) { + sleep(d); + continue; + } + dlg.finished(false); + return match json::from_str::(&json_err){ + Err(_) => Err(Error::Failure(res)), + Ok(serr) => Err(Error::BadRequest(serr)) + } + } + let result_value = { + let mut json_response = String::new(); + res.read_to_string(&mut json_response).unwrap(); + match json::from_str(&json_response) { + Ok(decoded) => (res, decoded), + Err(err) => { + dlg.response_json_decode_error(&json_response, &err); + return Err(Error::JsonDecodeError(json_response, err)); + } + } + }; + + dlg.finished(true); + return Ok(result_value) + } + } + } + } + + + /// + /// Sets the *request* property to the given value. + /// + /// Even though the property as already been set when instantiating this call, + /// we provide this method for API completeness. + pub fn request(mut self, new_value: SearchAnnotationsRequest) -> AnnotationSearchCall<'a, C, A> { + self._request = new_value; + self + } + /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong + /// while executing the actual API request. + /// + /// It should be used to handle progress information, and to implement a certain level of resilience. + /// + /// Sets the *delegate* property to the given value. + pub fn delegate(mut self, new_value: &'a mut Delegate) -> AnnotationSearchCall<'a, C, A> { + self._delegate = Some(new_value); + self + } + + /// Set any additional parameter of the query string used in the request. + /// It should be used to set parameters which are not yet available through their own + /// setters. + /// + /// Please note that this method must not be used to set any of the known paramters + /// which have their own setter method. If done anyway, the request will fail. + /// + /// # Additional Parameters + /// + /// * *bearer_token* (query-string) - OAuth bearer token. + /// * *pp* (query-boolean) - Pretty-print response. + /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. + /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). + /// * *access_token* (query-string) - OAuth access token. + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *quotaUser* (query-string) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + /// * *callback* (query-string) - JSONP + /// * *oauth_token* (query-string) - OAuth 2.0 token for the current user. + /// * *key* (query-string) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. + /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). + /// * *alt* (query-string) - Data format for response. + /// * *$.xgafv* (query-string) - V1 error format. + pub fn param(mut self, name: T, value: T) -> AnnotationSearchCall<'a, C, A> + where T: AsRef { + self._additional_params.insert(name.as_ref().to_string(), value.as_ref().to_string()); + self + } + + /// Identifies the authorization scope for the method you are building. + /// + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::CloudPlatform`. + /// + /// The `scope` will be added to a set of scopes. This is important as one can maintain access + /// tokens for more than one scope. + /// + /// Usually there is more than one suitable scope to authorize an operation, some of which may + /// encompass more rights than others. For example, for listing resources, a *read-only* scope will be + /// sufficient, a read-write scope will do as well. + pub fn add_scope(mut self, scope: T) -> AnnotationSearchCall<'a, C, A> + where T: AsRef { + self._scopes.insert(scope.as_ref().to_string(), ()); + self + } +} + + +/// Deletes an annotation. Caller must have WRITE permission for the associated annotation set. +/// +/// A builder for the *delete* method supported by a *annotation* resource. +/// It is not used directly, but through a `AnnotationMethods` instance. +/// +/// # Example +/// +/// Instantiate a resource method builder +/// +/// ```test_harness,no_run +/// # extern crate hyper; +/// # extern crate yup_oauth2 as oauth2; +/// # extern crate google_genomics1 as genomics1; +/// # #[test] fn egal() { +/// # use std::default::Default; +/// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; +/// # use genomics1::Genomics; +/// +/// # let secret: ApplicationSecret = Default::default(); +/// # let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, +/// # hyper::Client::new(), +/// # ::default(), None); +/// # let mut hub = Genomics::new(hyper::Client::new(), auth); +/// // You can configure optional parameters by calling the respective setters at will, and +/// // execute the final call using `doit()`. +/// // Values shown here are possibly random and not representative ! +/// let result = hub.annotations().delete("annotationId") +/// .doit(); +/// # } +/// ``` +pub struct AnnotationDeleteCall<'a, C, A> + where C: 'a, A: 'a { + + hub: &'a Genomics, + _annotation_id: String, + _delegate: Option<&'a mut Delegate>, + _additional_params: HashMap, + _scopes: BTreeMap +} + +impl<'a, C, A> CallBuilder for AnnotationDeleteCall<'a, C, A> {} + +impl<'a, C, A> AnnotationDeleteCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { + + + /// Perform the operation you have build so far. + pub fn doit(mut self) -> Result<(hyper::client::Response, Empty)> { + use std::io::{Read, Seek}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; + let mut dd = DefaultDelegate; + let mut dlg: &mut Delegate = match self._delegate { + Some(d) => d, + None => &mut dd + }; + dlg.begin(MethodInfo { id: "genomics.annotations.delete", + http_method: hyper::method::Method::Delete }); + let mut params: Vec<(&str, String)> = Vec::with_capacity((3 + self._additional_params.len())); + params.push(("annotationId", self._annotation_id.to_string())); + for &field in ["alt", "annotationId"].iter() { + if self._additional_params.contains_key(field) { + dlg.finished(false); + return Err(Error::FieldClash(field)); + } + } + for (name, value) in self._additional_params.iter() { + params.push((&name, value.clone())); + } + + params.push(("alt", "json".to_string())); + + let mut url = "https://genomics.googleapis.com/v1/annotations/{annotationId}".to_string(); + if self._scopes.len() == 0 { + self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); + } + + for &(find_this, param_name) in [("{annotationId}", "annotationId")].iter() { + let mut replace_with: Option<&str> = None; + for &(name, ref value) in params.iter() { + if name == param_name { + replace_with = Some(value); + break; + } + } + url = url.replace(find_this, replace_with.expect("to find substitution value in params")); + } + { + let mut indices_for_removal: Vec = Vec::with_capacity(1); + for param_name in ["annotationId"].iter() { + if let Some(index) = params.iter().position(|t| &t.0 == param_name) { + indices_for_removal.push(index); + } + } + for &index in indices_for_removal.iter() { + params.remove(index); + } + } + + if params.len() > 0 { + url.push('?'); + url.push_str(&url::form_urlencoded::serialize(params)); + } + + + + loop { + let token = match self.hub.auth.borrow_mut().token(self._scopes.keys()) { + Ok(token) => token, + Err(err) => { + match dlg.token(&*err) { + Some(token) => token, + None => { + dlg.finished(false); + return Err(Error::MissingToken(err)) + } + } + } + }; + let auth_header = Authorization(Bearer { token: token.access_token }); + let mut req_result = { + let mut client = &mut *self.hub.client.borrow_mut(); + let mut req = client.borrow_mut().request(hyper::method::Method::Delete, &url) + .header(UserAgent(self.hub._user_agent.clone())) + .header(auth_header.clone()); + + dlg.pre_request(); + req.send() + }; + + match req_result { + Err(err) => { + if let oauth2::Retry::After(d) = dlg.http_error(&err) { + sleep(d); + continue; + } + dlg.finished(false); + return Err(Error::HttpError(err)) + } + Ok(mut res) => { + if !res.status.is_success() { + let mut json_err = String::new(); + res.read_to_string(&mut json_err).unwrap(); + if let oauth2::Retry::After(d) = dlg.http_failure(&res, + json::from_str(&json_err).ok(), + json::from_str(&json_err).ok()) { + sleep(d); + continue; + } + dlg.finished(false); + return match json::from_str::(&json_err){ + Err(_) => Err(Error::Failure(res)), + Ok(serr) => Err(Error::BadRequest(serr)) + } + } + let result_value = { + let mut json_response = String::new(); + res.read_to_string(&mut json_response).unwrap(); + match json::from_str(&json_response) { + Ok(decoded) => (res, decoded), + Err(err) => { + dlg.response_json_decode_error(&json_response, &err); + return Err(Error::JsonDecodeError(json_response, err)); + } + } + }; + + dlg.finished(true); + return Ok(result_value) + } + } + } + } + + + /// The ID of the annotation to be deleted. + /// + /// Sets the *annotation id* path property to the given value. + /// + /// Even though the property as already been set when instantiating this call, + /// we provide this method for API completeness. + pub fn annotation_id(mut self, new_value: &str) -> AnnotationDeleteCall<'a, C, A> { + self._annotation_id = new_value.to_string(); + self + } + /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong + /// while executing the actual API request. + /// + /// It should be used to handle progress information, and to implement a certain level of resilience. + /// + /// Sets the *delegate* property to the given value. + pub fn delegate(mut self, new_value: &'a mut Delegate) -> AnnotationDeleteCall<'a, C, A> { + self._delegate = Some(new_value); + self + } + + /// Set any additional parameter of the query string used in the request. + /// It should be used to set parameters which are not yet available through their own + /// setters. + /// + /// Please note that this method must not be used to set any of the known paramters + /// which have their own setter method. If done anyway, the request will fail. + /// + /// # Additional Parameters + /// + /// * *bearer_token* (query-string) - OAuth bearer token. + /// * *pp* (query-boolean) - Pretty-print response. + /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. + /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). + /// * *access_token* (query-string) - OAuth access token. + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *quotaUser* (query-string) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + /// * *callback* (query-string) - JSONP + /// * *oauth_token* (query-string) - OAuth 2.0 token for the current user. + /// * *key* (query-string) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. + /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). + /// * *alt* (query-string) - Data format for response. + /// * *$.xgafv* (query-string) - V1 error format. + pub fn param(mut self, name: T, value: T) -> AnnotationDeleteCall<'a, C, A> + where T: AsRef { + self._additional_params.insert(name.as_ref().to_string(), value.as_ref().to_string()); + self + } + + /// Identifies the authorization scope for the method you are building. + /// + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::CloudPlatform`. + /// + /// The `scope` will be added to a set of scopes. This is important as one can maintain access + /// tokens for more than one scope. + /// + /// Usually there is more than one suitable scope to authorize an operation, some of which may + /// encompass more rights than others. For example, for listing resources, a *read-only* scope will be + /// sufficient, a read-write scope will do as well. + pub fn add_scope(mut self, scope: T) -> AnnotationDeleteCall<'a, C, A> + where T: AsRef { + self._scopes.insert(scope.as_ref().to_string(), ()); + self + } +} + + +/// Creates a new annotation. Caller must have WRITE permission for the associated annotation set. The following fields are required: * annotationSetId * referenceName or referenceId ### Transcripts For annotations of type TRANSCRIPT, the following fields of transcript must be provided: * `exons.start` * `exons.end` All other fields may be optionally specified, unless documented as being server-generated (for example, the `id` field). The annotated range must be no longer than 100Mbp (mega base pairs). See the Annotation resource for additional restrictions on each field. +/// +/// A builder for the *create* method supported by a *annotation* resource. +/// It is not used directly, but through a `AnnotationMethods` instance. +/// +/// # Example +/// +/// Instantiate a resource method builder +/// +/// ```test_harness,no_run +/// # extern crate hyper; +/// # extern crate yup_oauth2 as oauth2; +/// # extern crate google_genomics1 as genomics1; +/// use genomics1::Annotation; +/// # #[test] fn egal() { +/// # use std::default::Default; +/// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; +/// # use genomics1::Genomics; +/// +/// # let secret: ApplicationSecret = Default::default(); +/// # let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, +/// # hyper::Client::new(), +/// # ::default(), None); +/// # let mut hub = Genomics::new(hyper::Client::new(), auth); +/// // As the method needs a request, you would usually fill it with the desired information +/// // into the respective structure. Some of the parts shown here might not be applicable ! +/// // Values shown here are possibly random and not representative ! +/// let mut req = Annotation::default(); +/// +/// // You can configure optional parameters by calling the respective setters at will, and +/// // execute the final call using `doit()`. +/// // Values shown here are possibly random and not representative ! +/// let result = hub.annotations().create(req) +/// .doit(); +/// # } +/// ``` +pub struct AnnotationCreateCall<'a, C, A> + where C: 'a, A: 'a { + + hub: &'a Genomics, + _request: Annotation, + _delegate: Option<&'a mut Delegate>, + _additional_params: HashMap, + _scopes: BTreeMap +} + +impl<'a, C, A> CallBuilder for AnnotationCreateCall<'a, C, A> {} + +impl<'a, C, A> AnnotationCreateCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { + + + /// Perform the operation you have build so far. + pub fn doit(mut self) -> Result<(hyper::client::Response, Annotation)> { + use std::io::{Read, Seek}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; + let mut dd = DefaultDelegate; + let mut dlg: &mut Delegate = match self._delegate { + Some(d) => d, + None => &mut dd + }; + dlg.begin(MethodInfo { id: "genomics.annotations.create", + http_method: hyper::method::Method::Post }); + let mut params: Vec<(&str, String)> = Vec::with_capacity((3 + self._additional_params.len())); + for &field in ["alt"].iter() { + if self._additional_params.contains_key(field) { + dlg.finished(false); + return Err(Error::FieldClash(field)); + } + } + for (name, value) in self._additional_params.iter() { + params.push((&name, value.clone())); + } + + params.push(("alt", "json".to_string())); + + let mut url = "https://genomics.googleapis.com/v1/annotations".to_string(); + if self._scopes.len() == 0 { + self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); + } + + + if params.len() > 0 { + url.push('?'); + url.push_str(&url::form_urlencoded::serialize(params)); + } + + let mut json_mime_type = mime::Mime(mime::TopLevel::Application, mime::SubLevel::Json, Default::default()); + let mut request_value_reader = + { + let mut value = json::value::to_value(&self._request); + remove_json_null_values(&mut value); + let mut dst = io::Cursor::new(Vec::with_capacity(128)); + json::to_writer(&mut dst, &value).unwrap(); + dst + }; + let request_size = request_value_reader.seek(io::SeekFrom::End(0)).unwrap(); + request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); + + + loop { + let token = match self.hub.auth.borrow_mut().token(self._scopes.keys()) { + Ok(token) => token, + Err(err) => { + match dlg.token(&*err) { + Some(token) => token, + None => { + dlg.finished(false); + return Err(Error::MissingToken(err)) + } + } + } + }; + let auth_header = Authorization(Bearer { token: token.access_token }); + request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); + let mut req_result = { + let mut client = &mut *self.hub.client.borrow_mut(); + let mut req = client.borrow_mut().request(hyper::method::Method::Post, &url) + .header(UserAgent(self.hub._user_agent.clone())) + .header(auth_header.clone()) + .header(ContentType(json_mime_type.clone())) + .header(ContentLength(request_size as u64)) + .body(&mut request_value_reader); + + dlg.pre_request(); + req.send() + }; + + match req_result { + Err(err) => { + if let oauth2::Retry::After(d) = dlg.http_error(&err) { + sleep(d); + continue; + } + dlg.finished(false); + return Err(Error::HttpError(err)) + } + Ok(mut res) => { + if !res.status.is_success() { + let mut json_err = String::new(); + res.read_to_string(&mut json_err).unwrap(); + if let oauth2::Retry::After(d) = dlg.http_failure(&res, + json::from_str(&json_err).ok(), + json::from_str(&json_err).ok()) { + sleep(d); + continue; + } + dlg.finished(false); + return match json::from_str::(&json_err){ + Err(_) => Err(Error::Failure(res)), + Ok(serr) => Err(Error::BadRequest(serr)) + } + } + let result_value = { + let mut json_response = String::new(); + res.read_to_string(&mut json_response).unwrap(); + match json::from_str(&json_response) { + Ok(decoded) => (res, decoded), + Err(err) => { + dlg.response_json_decode_error(&json_response, &err); + return Err(Error::JsonDecodeError(json_response, err)); + } + } + }; + + dlg.finished(true); + return Ok(result_value) + } + } + } + } + + + /// + /// Sets the *request* property to the given value. + /// + /// Even though the property as already been set when instantiating this call, + /// we provide this method for API completeness. + pub fn request(mut self, new_value: Annotation) -> AnnotationCreateCall<'a, C, A> { + self._request = new_value; + self + } + /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong + /// while executing the actual API request. + /// + /// It should be used to handle progress information, and to implement a certain level of resilience. + /// + /// Sets the *delegate* property to the given value. + pub fn delegate(mut self, new_value: &'a mut Delegate) -> AnnotationCreateCall<'a, C, A> { + self._delegate = Some(new_value); + self + } + + /// Set any additional parameter of the query string used in the request. + /// It should be used to set parameters which are not yet available through their own + /// setters. + /// + /// Please note that this method must not be used to set any of the known paramters + /// which have their own setter method. If done anyway, the request will fail. + /// + /// # Additional Parameters + /// + /// * *bearer_token* (query-string) - OAuth bearer token. + /// * *pp* (query-boolean) - Pretty-print response. + /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. + /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). + /// * *access_token* (query-string) - OAuth access token. + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *quotaUser* (query-string) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + /// * *callback* (query-string) - JSONP + /// * *oauth_token* (query-string) - OAuth 2.0 token for the current user. + /// * *key* (query-string) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. + /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). + /// * *alt* (query-string) - Data format for response. + /// * *$.xgafv* (query-string) - V1 error format. + pub fn param(mut self, name: T, value: T) -> AnnotationCreateCall<'a, C, A> + where T: AsRef { + self._additional_params.insert(name.as_ref().to_string(), value.as_ref().to_string()); + self + } + + /// Identifies the authorization scope for the method you are building. + /// + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::CloudPlatform`. + /// + /// The `scope` will be added to a set of scopes. This is important as one can maintain access + /// tokens for more than one scope. + /// + /// Usually there is more than one suitable scope to authorize an operation, some of which may + /// encompass more rights than others. For example, for listing resources, a *read-only* scope will be + /// sufficient, a read-write scope will do as well. + pub fn add_scope(mut self, scope: T) -> AnnotationCreateCall<'a, C, A> + where T: AsRef { + self._scopes.insert(scope.as_ref().to_string(), ()); + self + } +} + + +/// Creates one or more new annotations atomically. All annotations must belong to the same annotation set. Caller must have WRITE permission for this annotation set. For optimal performance, batch positionally adjacent annotations together. If the request has a systemic issue, such as an attempt to write to an inaccessible annotation set, the entire RPC will fail accordingly. For lesser data issues, when possible an error will be isolated to the corresponding batch entry in the response; the remaining well formed annotations will be created normally. For details on the requirements for each individual annotation resource, see CreateAnnotation. +/// +/// A builder for the *batchCreate* method supported by a *annotation* resource. +/// It is not used directly, but through a `AnnotationMethods` instance. +/// +/// # Example +/// +/// Instantiate a resource method builder +/// +/// ```test_harness,no_run +/// # extern crate hyper; +/// # extern crate yup_oauth2 as oauth2; +/// # extern crate google_genomics1 as genomics1; +/// use genomics1::BatchCreateAnnotationsRequest; +/// # #[test] fn egal() { +/// # use std::default::Default; +/// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; +/// # use genomics1::Genomics; +/// +/// # let secret: ApplicationSecret = Default::default(); +/// # let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, +/// # hyper::Client::new(), +/// # ::default(), None); +/// # let mut hub = Genomics::new(hyper::Client::new(), auth); +/// // As the method needs a request, you would usually fill it with the desired information +/// // into the respective structure. Some of the parts shown here might not be applicable ! +/// // Values shown here are possibly random and not representative ! +/// let mut req = BatchCreateAnnotationsRequest::default(); +/// +/// // You can configure optional parameters by calling the respective setters at will, and +/// // execute the final call using `doit()`. +/// // Values shown here are possibly random and not representative ! +/// let result = hub.annotations().batch_create(req) +/// .doit(); +/// # } +/// ``` +pub struct AnnotationBatchCreateCall<'a, C, A> + where C: 'a, A: 'a { + + hub: &'a Genomics, + _request: BatchCreateAnnotationsRequest, + _delegate: Option<&'a mut Delegate>, + _additional_params: HashMap, + _scopes: BTreeMap +} + +impl<'a, C, A> CallBuilder for AnnotationBatchCreateCall<'a, C, A> {} + +impl<'a, C, A> AnnotationBatchCreateCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { + + + /// Perform the operation you have build so far. + pub fn doit(mut self) -> Result<(hyper::client::Response, BatchCreateAnnotationsResponse)> { + use std::io::{Read, Seek}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; + let mut dd = DefaultDelegate; + let mut dlg: &mut Delegate = match self._delegate { + Some(d) => d, + None => &mut dd + }; + dlg.begin(MethodInfo { id: "genomics.annotations.batchCreate", + http_method: hyper::method::Method::Post }); + let mut params: Vec<(&str, String)> = Vec::with_capacity((3 + self._additional_params.len())); + for &field in ["alt"].iter() { + if self._additional_params.contains_key(field) { + dlg.finished(false); + return Err(Error::FieldClash(field)); + } + } + for (name, value) in self._additional_params.iter() { + params.push((&name, value.clone())); + } + + params.push(("alt", "json".to_string())); + + let mut url = "https://genomics.googleapis.com/v1/annotations:batchCreate".to_string(); + if self._scopes.len() == 0 { + self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); + } + + + if params.len() > 0 { + url.push('?'); + url.push_str(&url::form_urlencoded::serialize(params)); + } + + let mut json_mime_type = mime::Mime(mime::TopLevel::Application, mime::SubLevel::Json, Default::default()); + let mut request_value_reader = + { + let mut value = json::value::to_value(&self._request); + remove_json_null_values(&mut value); + let mut dst = io::Cursor::new(Vec::with_capacity(128)); + json::to_writer(&mut dst, &value).unwrap(); + dst + }; + let request_size = request_value_reader.seek(io::SeekFrom::End(0)).unwrap(); + request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); + + + loop { + let token = match self.hub.auth.borrow_mut().token(self._scopes.keys()) { + Ok(token) => token, + Err(err) => { + match dlg.token(&*err) { + Some(token) => token, + None => { + dlg.finished(false); + return Err(Error::MissingToken(err)) + } + } + } + }; + let auth_header = Authorization(Bearer { token: token.access_token }); + request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); + let mut req_result = { + let mut client = &mut *self.hub.client.borrow_mut(); + let mut req = client.borrow_mut().request(hyper::method::Method::Post, &url) + .header(UserAgent(self.hub._user_agent.clone())) + .header(auth_header.clone()) + .header(ContentType(json_mime_type.clone())) + .header(ContentLength(request_size as u64)) + .body(&mut request_value_reader); + + dlg.pre_request(); + req.send() + }; + + match req_result { + Err(err) => { + if let oauth2::Retry::After(d) = dlg.http_error(&err) { + sleep(d); + continue; + } + dlg.finished(false); + return Err(Error::HttpError(err)) + } + Ok(mut res) => { + if !res.status.is_success() { + let mut json_err = String::new(); + res.read_to_string(&mut json_err).unwrap(); + if let oauth2::Retry::After(d) = dlg.http_failure(&res, + json::from_str(&json_err).ok(), + json::from_str(&json_err).ok()) { + sleep(d); + continue; + } + dlg.finished(false); + return match json::from_str::(&json_err){ + Err(_) => Err(Error::Failure(res)), + Ok(serr) => Err(Error::BadRequest(serr)) + } + } + let result_value = { + let mut json_response = String::new(); + res.read_to_string(&mut json_response).unwrap(); + match json::from_str(&json_response) { + Ok(decoded) => (res, decoded), + Err(err) => { + dlg.response_json_decode_error(&json_response, &err); + return Err(Error::JsonDecodeError(json_response, err)); + } + } + }; + + dlg.finished(true); + return Ok(result_value) + } + } + } + } + + + /// + /// Sets the *request* property to the given value. + /// + /// Even though the property as already been set when instantiating this call, + /// we provide this method for API completeness. + pub fn request(mut self, new_value: BatchCreateAnnotationsRequest) -> AnnotationBatchCreateCall<'a, C, A> { + self._request = new_value; + self + } + /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong + /// while executing the actual API request. + /// + /// It should be used to handle progress information, and to implement a certain level of resilience. + /// + /// Sets the *delegate* property to the given value. + pub fn delegate(mut self, new_value: &'a mut Delegate) -> AnnotationBatchCreateCall<'a, C, A> { + self._delegate = Some(new_value); + self + } + + /// Set any additional parameter of the query string used in the request. + /// It should be used to set parameters which are not yet available through their own + /// setters. + /// + /// Please note that this method must not be used to set any of the known paramters + /// which have their own setter method. If done anyway, the request will fail. + /// + /// # Additional Parameters + /// + /// * *bearer_token* (query-string) - OAuth bearer token. + /// * *pp* (query-boolean) - Pretty-print response. + /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. + /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). + /// * *access_token* (query-string) - OAuth access token. + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *quotaUser* (query-string) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + /// * *callback* (query-string) - JSONP + /// * *oauth_token* (query-string) - OAuth 2.0 token for the current user. + /// * *key* (query-string) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. + /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). + /// * *alt* (query-string) - Data format for response. + /// * *$.xgafv* (query-string) - V1 error format. + pub fn param(mut self, name: T, value: T) -> AnnotationBatchCreateCall<'a, C, A> + where T: AsRef { + self._additional_params.insert(name.as_ref().to_string(), value.as_ref().to_string()); + self + } + + /// Identifies the authorization scope for the method you are building. + /// + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::CloudPlatform`. + /// + /// The `scope` will be added to a set of scopes. This is important as one can maintain access + /// tokens for more than one scope. + /// + /// Usually there is more than one suitable scope to authorize an operation, some of which may + /// encompass more rights than others. For example, for listing resources, a *read-only* scope will be + /// sufficient, a read-write scope will do as well. + pub fn add_scope(mut self, scope: T) -> AnnotationBatchCreateCall<'a, C, A> + where T: AsRef { + self._scopes.insert(scope.as_ref().to_string(), ()); + self + } +} + + +/// Updates an annotation set. The update must respect all mutability restrictions and other invariants described on the annotation set resource. Caller must have WRITE permission for the associated dataset. +/// +/// A builder for the *update* method supported by a *annotationset* resource. +/// It is not used directly, but through a `AnnotationsetMethods` instance. +/// +/// # Example +/// +/// Instantiate a resource method builder +/// +/// ```test_harness,no_run +/// # extern crate hyper; +/// # extern crate yup_oauth2 as oauth2; +/// # extern crate google_genomics1 as genomics1; +/// use genomics1::AnnotationSet; +/// # #[test] fn egal() { +/// # use std::default::Default; +/// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; +/// # use genomics1::Genomics; +/// +/// # let secret: ApplicationSecret = Default::default(); +/// # let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, +/// # hyper::Client::new(), +/// # ::default(), None); +/// # let mut hub = Genomics::new(hyper::Client::new(), auth); +/// // As the method needs a request, you would usually fill it with the desired information +/// // into the respective structure. Some of the parts shown here might not be applicable ! +/// // Values shown here are possibly random and not representative ! +/// let mut req = AnnotationSet::default(); +/// +/// // You can configure optional parameters by calling the respective setters at will, and +/// // execute the final call using `doit()`. +/// // Values shown here are possibly random and not representative ! +/// let result = hub.annotationsets().update(req, "annotationSetId") +/// .update_mask("sanctus") +/// .doit(); +/// # } +/// ``` +pub struct AnnotationsetUpdateCall<'a, C, A> + where C: 'a, A: 'a { + + hub: &'a Genomics, + _request: AnnotationSet, + _annotation_set_id: String, + _update_mask: Option, + _delegate: Option<&'a mut Delegate>, + _additional_params: HashMap, + _scopes: BTreeMap +} + +impl<'a, C, A> CallBuilder for AnnotationsetUpdateCall<'a, C, A> {} + +impl<'a, C, A> AnnotationsetUpdateCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { + + + /// Perform the operation you have build so far. + pub fn doit(mut self) -> Result<(hyper::client::Response, AnnotationSet)> { + use std::io::{Read, Seek}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; + let mut dd = DefaultDelegate; + let mut dlg: &mut Delegate = match self._delegate { + Some(d) => d, + None => &mut dd + }; + dlg.begin(MethodInfo { id: "genomics.annotationsets.update", + http_method: hyper::method::Method::Put }); + let mut params: Vec<(&str, String)> = Vec::with_capacity((5 + self._additional_params.len())); + params.push(("annotationSetId", self._annotation_set_id.to_string())); + if let Some(value) = self._update_mask { + params.push(("updateMask", value.to_string())); + } + for &field in ["alt", "annotationSetId", "updateMask"].iter() { + if self._additional_params.contains_key(field) { + dlg.finished(false); + return Err(Error::FieldClash(field)); + } + } + for (name, value) in self._additional_params.iter() { + params.push((&name, value.clone())); + } + + params.push(("alt", "json".to_string())); + + let mut url = "https://genomics.googleapis.com/v1/annotationsets/{annotationSetId}".to_string(); + if self._scopes.len() == 0 { + self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); + } + + for &(find_this, param_name) in [("{annotationSetId}", "annotationSetId")].iter() { + let mut replace_with: Option<&str> = None; + for &(name, ref value) in params.iter() { + if name == param_name { + replace_with = Some(value); + break; + } + } + url = url.replace(find_this, replace_with.expect("to find substitution value in params")); + } + { + let mut indices_for_removal: Vec = Vec::with_capacity(1); + for param_name in ["annotationSetId"].iter() { + if let Some(index) = params.iter().position(|t| &t.0 == param_name) { + indices_for_removal.push(index); + } + } + for &index in indices_for_removal.iter() { + params.remove(index); + } + } + + if params.len() > 0 { + url.push('?'); + url.push_str(&url::form_urlencoded::serialize(params)); + } + + let mut json_mime_type = mime::Mime(mime::TopLevel::Application, mime::SubLevel::Json, Default::default()); + let mut request_value_reader = + { + let mut value = json::value::to_value(&self._request); + remove_json_null_values(&mut value); + let mut dst = io::Cursor::new(Vec::with_capacity(128)); + json::to_writer(&mut dst, &value).unwrap(); + dst + }; + let request_size = request_value_reader.seek(io::SeekFrom::End(0)).unwrap(); + request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); + + + loop { + let token = match self.hub.auth.borrow_mut().token(self._scopes.keys()) { + Ok(token) => token, + Err(err) => { + match dlg.token(&*err) { + Some(token) => token, + None => { + dlg.finished(false); + return Err(Error::MissingToken(err)) + } + } + } + }; + let auth_header = Authorization(Bearer { token: token.access_token }); + request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); + let mut req_result = { + let mut client = &mut *self.hub.client.borrow_mut(); + let mut req = client.borrow_mut().request(hyper::method::Method::Put, &url) + .header(UserAgent(self.hub._user_agent.clone())) + .header(auth_header.clone()) + .header(ContentType(json_mime_type.clone())) + .header(ContentLength(request_size as u64)) + .body(&mut request_value_reader); + + dlg.pre_request(); + req.send() + }; + + match req_result { + Err(err) => { + if let oauth2::Retry::After(d) = dlg.http_error(&err) { + sleep(d); + continue; + } + dlg.finished(false); + return Err(Error::HttpError(err)) + } + Ok(mut res) => { + if !res.status.is_success() { + let mut json_err = String::new(); + res.read_to_string(&mut json_err).unwrap(); + if let oauth2::Retry::After(d) = dlg.http_failure(&res, + json::from_str(&json_err).ok(), + json::from_str(&json_err).ok()) { + sleep(d); + continue; + } + dlg.finished(false); + return match json::from_str::(&json_err){ + Err(_) => Err(Error::Failure(res)), + Ok(serr) => Err(Error::BadRequest(serr)) + } + } + let result_value = { + let mut json_response = String::new(); + res.read_to_string(&mut json_response).unwrap(); + match json::from_str(&json_response) { + Ok(decoded) => (res, decoded), + Err(err) => { + dlg.response_json_decode_error(&json_response, &err); + return Err(Error::JsonDecodeError(json_response, err)); + } + } + }; + + dlg.finished(true); + return Ok(result_value) + } + } + } + } + + + /// + /// Sets the *request* property to the given value. + /// + /// Even though the property as already been set when instantiating this call, + /// we provide this method for API completeness. + pub fn request(mut self, new_value: AnnotationSet) -> AnnotationsetUpdateCall<'a, C, A> { + self._request = new_value; + self + } + /// The ID of the annotation set to be updated. + /// + /// Sets the *annotation set id* path property to the given value. + /// + /// Even though the property as already been set when instantiating this call, + /// we provide this method for API completeness. + pub fn annotation_set_id(mut self, new_value: &str) -> AnnotationsetUpdateCall<'a, C, A> { + self._annotation_set_id = new_value.to_string(); + self + } + /// An optional mask specifying which fields to update. Mutable fields are name, source_uri, and info. If unspecified, all mutable fields will be updated. + /// + /// Sets the *update mask* query property to the given value. + pub fn update_mask(mut self, new_value: &str) -> AnnotationsetUpdateCall<'a, C, A> { + self._update_mask = Some(new_value.to_string()); + self + } + /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong + /// while executing the actual API request. + /// + /// It should be used to handle progress information, and to implement a certain level of resilience. + /// + /// Sets the *delegate* property to the given value. + pub fn delegate(mut self, new_value: &'a mut Delegate) -> AnnotationsetUpdateCall<'a, C, A> { + self._delegate = Some(new_value); + self + } + + /// Set any additional parameter of the query string used in the request. + /// It should be used to set parameters which are not yet available through their own + /// setters. + /// + /// Please note that this method must not be used to set any of the known paramters + /// which have their own setter method. If done anyway, the request will fail. + /// + /// # Additional Parameters + /// + /// * *bearer_token* (query-string) - OAuth bearer token. + /// * *pp* (query-boolean) - Pretty-print response. + /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. + /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). + /// * *access_token* (query-string) - OAuth access token. + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *quotaUser* (query-string) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + /// * *callback* (query-string) - JSONP + /// * *oauth_token* (query-string) - OAuth 2.0 token for the current user. + /// * *key* (query-string) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. + /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). + /// * *alt* (query-string) - Data format for response. + /// * *$.xgafv* (query-string) - V1 error format. + pub fn param(mut self, name: T, value: T) -> AnnotationsetUpdateCall<'a, C, A> + where T: AsRef { + self._additional_params.insert(name.as_ref().to_string(), value.as_ref().to_string()); + self + } + + /// Identifies the authorization scope for the method you are building. + /// + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::CloudPlatform`. + /// + /// The `scope` will be added to a set of scopes. This is important as one can maintain access + /// tokens for more than one scope. + /// + /// Usually there is more than one suitable scope to authorize an operation, some of which may + /// encompass more rights than others. For example, for listing resources, a *read-only* scope will be + /// sufficient, a read-write scope will do as well. + pub fn add_scope(mut self, scope: T) -> AnnotationsetUpdateCall<'a, C, A> + where T: AsRef { + self._scopes.insert(scope.as_ref().to_string(), ()); + self + } +} + + +/// Searches for annotation sets that match the given criteria. Annotation sets are returned in an unspecified order. This order is consistent, such that two queries for the same content (regardless of page size) yield annotation sets in the same order across their respective streams of paginated responses. Caller must have READ permission for the queried datasets. +/// +/// A builder for the *search* method supported by a *annotationset* resource. +/// It is not used directly, but through a `AnnotationsetMethods` instance. +/// +/// # Example +/// +/// Instantiate a resource method builder +/// +/// ```test_harness,no_run +/// # extern crate hyper; +/// # extern crate yup_oauth2 as oauth2; +/// # extern crate google_genomics1 as genomics1; +/// use genomics1::SearchAnnotationSetsRequest; +/// # #[test] fn egal() { +/// # use std::default::Default; +/// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; +/// # use genomics1::Genomics; +/// +/// # let secret: ApplicationSecret = Default::default(); +/// # let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, +/// # hyper::Client::new(), +/// # ::default(), None); +/// # let mut hub = Genomics::new(hyper::Client::new(), auth); +/// // As the method needs a request, you would usually fill it with the desired information +/// // into the respective structure. Some of the parts shown here might not be applicable ! +/// // Values shown here are possibly random and not representative ! +/// let mut req = SearchAnnotationSetsRequest::default(); +/// +/// // You can configure optional parameters by calling the respective setters at will, and +/// // execute the final call using `doit()`. +/// // Values shown here are possibly random and not representative ! +/// let result = hub.annotationsets().search(req) +/// .doit(); +/// # } +/// ``` +pub struct AnnotationsetSearchCall<'a, C, A> + where C: 'a, A: 'a { + + hub: &'a Genomics, + _request: SearchAnnotationSetsRequest, + _delegate: Option<&'a mut Delegate>, + _additional_params: HashMap, + _scopes: BTreeMap +} + +impl<'a, C, A> CallBuilder for AnnotationsetSearchCall<'a, C, A> {} + +impl<'a, C, A> AnnotationsetSearchCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { + + + /// Perform the operation you have build so far. + pub fn doit(mut self) -> Result<(hyper::client::Response, SearchAnnotationSetsResponse)> { + use std::io::{Read, Seek}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; + let mut dd = DefaultDelegate; + let mut dlg: &mut Delegate = match self._delegate { + Some(d) => d, + None => &mut dd + }; + dlg.begin(MethodInfo { id: "genomics.annotationsets.search", + http_method: hyper::method::Method::Post }); + let mut params: Vec<(&str, String)> = Vec::with_capacity((3 + self._additional_params.len())); + for &field in ["alt"].iter() { + if self._additional_params.contains_key(field) { + dlg.finished(false); + return Err(Error::FieldClash(field)); + } + } + for (name, value) in self._additional_params.iter() { + params.push((&name, value.clone())); + } + + params.push(("alt", "json".to_string())); + + let mut url = "https://genomics.googleapis.com/v1/annotationsets/search".to_string(); + if self._scopes.len() == 0 { + self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); + } + + + if params.len() > 0 { + url.push('?'); + url.push_str(&url::form_urlencoded::serialize(params)); + } + + let mut json_mime_type = mime::Mime(mime::TopLevel::Application, mime::SubLevel::Json, Default::default()); + let mut request_value_reader = + { + let mut value = json::value::to_value(&self._request); + remove_json_null_values(&mut value); + let mut dst = io::Cursor::new(Vec::with_capacity(128)); + json::to_writer(&mut dst, &value).unwrap(); + dst + }; + let request_size = request_value_reader.seek(io::SeekFrom::End(0)).unwrap(); + request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); + + + loop { + let token = match self.hub.auth.borrow_mut().token(self._scopes.keys()) { + Ok(token) => token, + Err(err) => { + match dlg.token(&*err) { + Some(token) => token, + None => { + dlg.finished(false); + return Err(Error::MissingToken(err)) + } + } + } + }; + let auth_header = Authorization(Bearer { token: token.access_token }); + request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); + let mut req_result = { + let mut client = &mut *self.hub.client.borrow_mut(); + let mut req = client.borrow_mut().request(hyper::method::Method::Post, &url) + .header(UserAgent(self.hub._user_agent.clone())) + .header(auth_header.clone()) + .header(ContentType(json_mime_type.clone())) + .header(ContentLength(request_size as u64)) + .body(&mut request_value_reader); + + dlg.pre_request(); + req.send() + }; + + match req_result { + Err(err) => { + if let oauth2::Retry::After(d) = dlg.http_error(&err) { + sleep(d); + continue; + } + dlg.finished(false); + return Err(Error::HttpError(err)) + } + Ok(mut res) => { + if !res.status.is_success() { + let mut json_err = String::new(); + res.read_to_string(&mut json_err).unwrap(); + if let oauth2::Retry::After(d) = dlg.http_failure(&res, + json::from_str(&json_err).ok(), + json::from_str(&json_err).ok()) { + sleep(d); + continue; + } + dlg.finished(false); + return match json::from_str::(&json_err){ + Err(_) => Err(Error::Failure(res)), + Ok(serr) => Err(Error::BadRequest(serr)) + } + } + let result_value = { + let mut json_response = String::new(); + res.read_to_string(&mut json_response).unwrap(); + match json::from_str(&json_response) { + Ok(decoded) => (res, decoded), + Err(err) => { + dlg.response_json_decode_error(&json_response, &err); + return Err(Error::JsonDecodeError(json_response, err)); + } + } + }; + + dlg.finished(true); + return Ok(result_value) + } + } + } + } + + + /// + /// Sets the *request* property to the given value. + /// + /// Even though the property as already been set when instantiating this call, + /// we provide this method for API completeness. + pub fn request(mut self, new_value: SearchAnnotationSetsRequest) -> AnnotationsetSearchCall<'a, C, A> { + self._request = new_value; + self + } + /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong + /// while executing the actual API request. + /// + /// It should be used to handle progress information, and to implement a certain level of resilience. + /// + /// Sets the *delegate* property to the given value. + pub fn delegate(mut self, new_value: &'a mut Delegate) -> AnnotationsetSearchCall<'a, C, A> { + self._delegate = Some(new_value); + self + } + + /// Set any additional parameter of the query string used in the request. + /// It should be used to set parameters which are not yet available through their own + /// setters. + /// + /// Please note that this method must not be used to set any of the known paramters + /// which have their own setter method. If done anyway, the request will fail. + /// + /// # Additional Parameters + /// + /// * *bearer_token* (query-string) - OAuth bearer token. + /// * *pp* (query-boolean) - Pretty-print response. + /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. + /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). + /// * *access_token* (query-string) - OAuth access token. + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *quotaUser* (query-string) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + /// * *callback* (query-string) - JSONP + /// * *oauth_token* (query-string) - OAuth 2.0 token for the current user. + /// * *key* (query-string) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. + /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). + /// * *alt* (query-string) - Data format for response. + /// * *$.xgafv* (query-string) - V1 error format. + pub fn param(mut self, name: T, value: T) -> AnnotationsetSearchCall<'a, C, A> + where T: AsRef { + self._additional_params.insert(name.as_ref().to_string(), value.as_ref().to_string()); + self + } + + /// Identifies the authorization scope for the method you are building. + /// + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::CloudPlatform`. + /// + /// The `scope` will be added to a set of scopes. This is important as one can maintain access + /// tokens for more than one scope. + /// + /// Usually there is more than one suitable scope to authorize an operation, some of which may + /// encompass more rights than others. For example, for listing resources, a *read-only* scope will be + /// sufficient, a read-write scope will do as well. + pub fn add_scope(mut self, scope: T) -> AnnotationsetSearchCall<'a, C, A> + where T: AsRef { + self._scopes.insert(scope.as_ref().to_string(), ()); + self + } +} + + +/// Creates a new annotation set. Caller must have WRITE permission for the associated dataset. The following fields are required: * datasetId * referenceSetId All other fields may be optionally specified, unless documented as being server-generated (for example, the `id` field). +/// +/// A builder for the *create* method supported by a *annotationset* resource. +/// It is not used directly, but through a `AnnotationsetMethods` instance. +/// +/// # Example +/// +/// Instantiate a resource method builder +/// +/// ```test_harness,no_run +/// # extern crate hyper; +/// # extern crate yup_oauth2 as oauth2; +/// # extern crate google_genomics1 as genomics1; +/// use genomics1::AnnotationSet; +/// # #[test] fn egal() { +/// # use std::default::Default; +/// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; +/// # use genomics1::Genomics; +/// +/// # let secret: ApplicationSecret = Default::default(); +/// # let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, +/// # hyper::Client::new(), +/// # ::default(), None); +/// # let mut hub = Genomics::new(hyper::Client::new(), auth); +/// // As the method needs a request, you would usually fill it with the desired information +/// // into the respective structure. Some of the parts shown here might not be applicable ! +/// // Values shown here are possibly random and not representative ! +/// let mut req = AnnotationSet::default(); +/// +/// // You can configure optional parameters by calling the respective setters at will, and +/// // execute the final call using `doit()`. +/// // Values shown here are possibly random and not representative ! +/// let result = hub.annotationsets().create(req) +/// .doit(); +/// # } +/// ``` +pub struct AnnotationsetCreateCall<'a, C, A> + where C: 'a, A: 'a { + + hub: &'a Genomics, + _request: AnnotationSet, + _delegate: Option<&'a mut Delegate>, + _additional_params: HashMap, + _scopes: BTreeMap +} + +impl<'a, C, A> CallBuilder for AnnotationsetCreateCall<'a, C, A> {} + +impl<'a, C, A> AnnotationsetCreateCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { + + + /// Perform the operation you have build so far. + pub fn doit(mut self) -> Result<(hyper::client::Response, AnnotationSet)> { + use std::io::{Read, Seek}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; + let mut dd = DefaultDelegate; + let mut dlg: &mut Delegate = match self._delegate { + Some(d) => d, + None => &mut dd + }; + dlg.begin(MethodInfo { id: "genomics.annotationsets.create", + http_method: hyper::method::Method::Post }); + let mut params: Vec<(&str, String)> = Vec::with_capacity((3 + self._additional_params.len())); + for &field in ["alt"].iter() { + if self._additional_params.contains_key(field) { + dlg.finished(false); + return Err(Error::FieldClash(field)); + } + } + for (name, value) in self._additional_params.iter() { + params.push((&name, value.clone())); + } + + params.push(("alt", "json".to_string())); + + let mut url = "https://genomics.googleapis.com/v1/annotationsets".to_string(); + if self._scopes.len() == 0 { + self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); + } + + + if params.len() > 0 { + url.push('?'); + url.push_str(&url::form_urlencoded::serialize(params)); + } + + let mut json_mime_type = mime::Mime(mime::TopLevel::Application, mime::SubLevel::Json, Default::default()); + let mut request_value_reader = + { + let mut value = json::value::to_value(&self._request); + remove_json_null_values(&mut value); + let mut dst = io::Cursor::new(Vec::with_capacity(128)); + json::to_writer(&mut dst, &value).unwrap(); + dst + }; + let request_size = request_value_reader.seek(io::SeekFrom::End(0)).unwrap(); + request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); + + + loop { + let token = match self.hub.auth.borrow_mut().token(self._scopes.keys()) { + Ok(token) => token, + Err(err) => { + match dlg.token(&*err) { + Some(token) => token, + None => { + dlg.finished(false); + return Err(Error::MissingToken(err)) + } + } + } + }; + let auth_header = Authorization(Bearer { token: token.access_token }); + request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); + let mut req_result = { + let mut client = &mut *self.hub.client.borrow_mut(); + let mut req = client.borrow_mut().request(hyper::method::Method::Post, &url) + .header(UserAgent(self.hub._user_agent.clone())) + .header(auth_header.clone()) + .header(ContentType(json_mime_type.clone())) + .header(ContentLength(request_size as u64)) + .body(&mut request_value_reader); + + dlg.pre_request(); + req.send() + }; + + match req_result { + Err(err) => { + if let oauth2::Retry::After(d) = dlg.http_error(&err) { + sleep(d); + continue; + } + dlg.finished(false); + return Err(Error::HttpError(err)) + } + Ok(mut res) => { + if !res.status.is_success() { + let mut json_err = String::new(); + res.read_to_string(&mut json_err).unwrap(); + if let oauth2::Retry::After(d) = dlg.http_failure(&res, + json::from_str(&json_err).ok(), + json::from_str(&json_err).ok()) { + sleep(d); + continue; + } + dlg.finished(false); + return match json::from_str::(&json_err){ + Err(_) => Err(Error::Failure(res)), + Ok(serr) => Err(Error::BadRequest(serr)) + } + } + let result_value = { + let mut json_response = String::new(); + res.read_to_string(&mut json_response).unwrap(); + match json::from_str(&json_response) { + Ok(decoded) => (res, decoded), + Err(err) => { + dlg.response_json_decode_error(&json_response, &err); + return Err(Error::JsonDecodeError(json_response, err)); + } + } + }; + + dlg.finished(true); + return Ok(result_value) + } + } + } + } + + + /// + /// Sets the *request* property to the given value. + /// + /// Even though the property as already been set when instantiating this call, + /// we provide this method for API completeness. + pub fn request(mut self, new_value: AnnotationSet) -> AnnotationsetCreateCall<'a, C, A> { + self._request = new_value; + self + } + /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong + /// while executing the actual API request. + /// + /// It should be used to handle progress information, and to implement a certain level of resilience. + /// + /// Sets the *delegate* property to the given value. + pub fn delegate(mut self, new_value: &'a mut Delegate) -> AnnotationsetCreateCall<'a, C, A> { + self._delegate = Some(new_value); + self + } + + /// Set any additional parameter of the query string used in the request. + /// It should be used to set parameters which are not yet available through their own + /// setters. + /// + /// Please note that this method must not be used to set any of the known paramters + /// which have their own setter method. If done anyway, the request will fail. + /// + /// # Additional Parameters + /// + /// * *bearer_token* (query-string) - OAuth bearer token. + /// * *pp* (query-boolean) - Pretty-print response. + /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. + /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). + /// * *access_token* (query-string) - OAuth access token. + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *quotaUser* (query-string) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + /// * *callback* (query-string) - JSONP + /// * *oauth_token* (query-string) - OAuth 2.0 token for the current user. + /// * *key* (query-string) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. + /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). + /// * *alt* (query-string) - Data format for response. + /// * *$.xgafv* (query-string) - V1 error format. + pub fn param(mut self, name: T, value: T) -> AnnotationsetCreateCall<'a, C, A> + where T: AsRef { + self._additional_params.insert(name.as_ref().to_string(), value.as_ref().to_string()); + self + } + + /// Identifies the authorization scope for the method you are building. + /// + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::CloudPlatform`. + /// + /// The `scope` will be added to a set of scopes. This is important as one can maintain access + /// tokens for more than one scope. + /// + /// Usually there is more than one suitable scope to authorize an operation, some of which may + /// encompass more rights than others. For example, for listing resources, a *read-only* scope will be + /// sufficient, a read-write scope will do as well. + pub fn add_scope(mut self, scope: T) -> AnnotationsetCreateCall<'a, C, A> + where T: AsRef { + self._scopes.insert(scope.as_ref().to_string(), ()); + self + } +} + + +/// Deletes an annotation set. Caller must have WRITE permission for the associated annotation set. +/// +/// A builder for the *delete* method supported by a *annotationset* resource. +/// It is not used directly, but through a `AnnotationsetMethods` instance. +/// +/// # Example +/// +/// Instantiate a resource method builder +/// +/// ```test_harness,no_run +/// # extern crate hyper; +/// # extern crate yup_oauth2 as oauth2; +/// # extern crate google_genomics1 as genomics1; +/// # #[test] fn egal() { +/// # use std::default::Default; +/// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; +/// # use genomics1::Genomics; +/// +/// # let secret: ApplicationSecret = Default::default(); +/// # let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, +/// # hyper::Client::new(), +/// # ::default(), None); +/// # let mut hub = Genomics::new(hyper::Client::new(), auth); +/// // You can configure optional parameters by calling the respective setters at will, and +/// // execute the final call using `doit()`. +/// // Values shown here are possibly random and not representative ! +/// let result = hub.annotationsets().delete("annotationSetId") +/// .doit(); +/// # } +/// ``` +pub struct AnnotationsetDeleteCall<'a, C, A> + where C: 'a, A: 'a { + + hub: &'a Genomics, + _annotation_set_id: String, + _delegate: Option<&'a mut Delegate>, + _additional_params: HashMap, + _scopes: BTreeMap +} + +impl<'a, C, A> CallBuilder for AnnotationsetDeleteCall<'a, C, A> {} + +impl<'a, C, A> AnnotationsetDeleteCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { + + + /// Perform the operation you have build so far. + pub fn doit(mut self) -> Result<(hyper::client::Response, Empty)> { + use std::io::{Read, Seek}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; + let mut dd = DefaultDelegate; + let mut dlg: &mut Delegate = match self._delegate { + Some(d) => d, + None => &mut dd + }; + dlg.begin(MethodInfo { id: "genomics.annotationsets.delete", + http_method: hyper::method::Method::Delete }); + let mut params: Vec<(&str, String)> = Vec::with_capacity((3 + self._additional_params.len())); + params.push(("annotationSetId", self._annotation_set_id.to_string())); + for &field in ["alt", "annotationSetId"].iter() { + if self._additional_params.contains_key(field) { + dlg.finished(false); + return Err(Error::FieldClash(field)); + } + } + for (name, value) in self._additional_params.iter() { + params.push((&name, value.clone())); + } + + params.push(("alt", "json".to_string())); + + let mut url = "https://genomics.googleapis.com/v1/annotationsets/{annotationSetId}".to_string(); + if self._scopes.len() == 0 { + self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); + } + + for &(find_this, param_name) in [("{annotationSetId}", "annotationSetId")].iter() { + let mut replace_with: Option<&str> = None; + for &(name, ref value) in params.iter() { + if name == param_name { + replace_with = Some(value); + break; + } + } + url = url.replace(find_this, replace_with.expect("to find substitution value in params")); + } + { + let mut indices_for_removal: Vec = Vec::with_capacity(1); + for param_name in ["annotationSetId"].iter() { + if let Some(index) = params.iter().position(|t| &t.0 == param_name) { + indices_for_removal.push(index); + } + } + for &index in indices_for_removal.iter() { + params.remove(index); + } + } + + if params.len() > 0 { + url.push('?'); + url.push_str(&url::form_urlencoded::serialize(params)); + } + + + + loop { + let token = match self.hub.auth.borrow_mut().token(self._scopes.keys()) { + Ok(token) => token, + Err(err) => { + match dlg.token(&*err) { + Some(token) => token, + None => { + dlg.finished(false); + return Err(Error::MissingToken(err)) + } + } + } + }; + let auth_header = Authorization(Bearer { token: token.access_token }); + let mut req_result = { + let mut client = &mut *self.hub.client.borrow_mut(); + let mut req = client.borrow_mut().request(hyper::method::Method::Delete, &url) + .header(UserAgent(self.hub._user_agent.clone())) + .header(auth_header.clone()); + + dlg.pre_request(); + req.send() + }; + + match req_result { + Err(err) => { + if let oauth2::Retry::After(d) = dlg.http_error(&err) { + sleep(d); + continue; + } + dlg.finished(false); + return Err(Error::HttpError(err)) + } + Ok(mut res) => { + if !res.status.is_success() { + let mut json_err = String::new(); + res.read_to_string(&mut json_err).unwrap(); + if let oauth2::Retry::After(d) = dlg.http_failure(&res, + json::from_str(&json_err).ok(), + json::from_str(&json_err).ok()) { + sleep(d); + continue; + } + dlg.finished(false); + return match json::from_str::(&json_err){ + Err(_) => Err(Error::Failure(res)), + Ok(serr) => Err(Error::BadRequest(serr)) + } + } + let result_value = { + let mut json_response = String::new(); + res.read_to_string(&mut json_response).unwrap(); + match json::from_str(&json_response) { + Ok(decoded) => (res, decoded), + Err(err) => { + dlg.response_json_decode_error(&json_response, &err); + return Err(Error::JsonDecodeError(json_response, err)); + } + } + }; + + dlg.finished(true); + return Ok(result_value) + } + } + } + } + + + /// The ID of the annotation set to be deleted. + /// + /// Sets the *annotation set id* path property to the given value. + /// + /// Even though the property as already been set when instantiating this call, + /// we provide this method for API completeness. + pub fn annotation_set_id(mut self, new_value: &str) -> AnnotationsetDeleteCall<'a, C, A> { + self._annotation_set_id = new_value.to_string(); + self + } + /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong + /// while executing the actual API request. + /// + /// It should be used to handle progress information, and to implement a certain level of resilience. + /// + /// Sets the *delegate* property to the given value. + pub fn delegate(mut self, new_value: &'a mut Delegate) -> AnnotationsetDeleteCall<'a, C, A> { + self._delegate = Some(new_value); + self + } + + /// Set any additional parameter of the query string used in the request. + /// It should be used to set parameters which are not yet available through their own + /// setters. + /// + /// Please note that this method must not be used to set any of the known paramters + /// which have their own setter method. If done anyway, the request will fail. + /// + /// # Additional Parameters + /// + /// * *bearer_token* (query-string) - OAuth bearer token. + /// * *pp* (query-boolean) - Pretty-print response. + /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. + /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). + /// * *access_token* (query-string) - OAuth access token. + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *quotaUser* (query-string) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + /// * *callback* (query-string) - JSONP + /// * *oauth_token* (query-string) - OAuth 2.0 token for the current user. + /// * *key* (query-string) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. + /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). + /// * *alt* (query-string) - Data format for response. + /// * *$.xgafv* (query-string) - V1 error format. + pub fn param(mut self, name: T, value: T) -> AnnotationsetDeleteCall<'a, C, A> + where T: AsRef { + self._additional_params.insert(name.as_ref().to_string(), value.as_ref().to_string()); + self + } + + /// Identifies the authorization scope for the method you are building. + /// + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::CloudPlatform`. + /// + /// The `scope` will be added to a set of scopes. This is important as one can maintain access + /// tokens for more than one scope. + /// + /// Usually there is more than one suitable scope to authorize an operation, some of which may + /// encompass more rights than others. For example, for listing resources, a *read-only* scope will be + /// sufficient, a read-write scope will do as well. + pub fn add_scope(mut self, scope: T) -> AnnotationsetDeleteCall<'a, C, A> + where T: AsRef { + self._scopes.insert(scope.as_ref().to_string(), ()); + self + } +} + + +/// Gets an annotation set. Caller must have READ permission for the associated dataset. +/// +/// A builder for the *get* method supported by a *annotationset* resource. +/// It is not used directly, but through a `AnnotationsetMethods` instance. +/// +/// # Example +/// +/// Instantiate a resource method builder +/// +/// ```test_harness,no_run +/// # extern crate hyper; +/// # extern crate yup_oauth2 as oauth2; +/// # extern crate google_genomics1 as genomics1; +/// # #[test] fn egal() { +/// # use std::default::Default; +/// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; +/// # use genomics1::Genomics; +/// +/// # let secret: ApplicationSecret = Default::default(); +/// # let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, +/// # hyper::Client::new(), +/// # ::default(), None); +/// # let mut hub = Genomics::new(hyper::Client::new(), auth); +/// // You can configure optional parameters by calling the respective setters at will, and +/// // execute the final call using `doit()`. +/// // Values shown here are possibly random and not representative ! +/// let result = hub.annotationsets().get("annotationSetId") +/// .doit(); +/// # } +/// ``` +pub struct AnnotationsetGetCall<'a, C, A> + where C: 'a, A: 'a { + + hub: &'a Genomics, + _annotation_set_id: String, + _delegate: Option<&'a mut Delegate>, + _additional_params: HashMap, + _scopes: BTreeMap +} + +impl<'a, C, A> CallBuilder for AnnotationsetGetCall<'a, C, A> {} + +impl<'a, C, A> AnnotationsetGetCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { + + + /// Perform the operation you have build so far. + pub fn doit(mut self) -> Result<(hyper::client::Response, AnnotationSet)> { + use std::io::{Read, Seek}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; + let mut dd = DefaultDelegate; + let mut dlg: &mut Delegate = match self._delegate { + Some(d) => d, + None => &mut dd + }; + dlg.begin(MethodInfo { id: "genomics.annotationsets.get", + http_method: hyper::method::Method::Get }); + let mut params: Vec<(&str, String)> = Vec::with_capacity((3 + self._additional_params.len())); + params.push(("annotationSetId", self._annotation_set_id.to_string())); + for &field in ["alt", "annotationSetId"].iter() { + if self._additional_params.contains_key(field) { + dlg.finished(false); + return Err(Error::FieldClash(field)); + } + } + for (name, value) in self._additional_params.iter() { + params.push((&name, value.clone())); + } + + params.push(("alt", "json".to_string())); + + let mut url = "https://genomics.googleapis.com/v1/annotationsets/{annotationSetId}".to_string(); + if self._scopes.len() == 0 { + self._scopes.insert(Scope::Readonly.as_ref().to_string(), ()); + } + + for &(find_this, param_name) in [("{annotationSetId}", "annotationSetId")].iter() { + let mut replace_with: Option<&str> = None; + for &(name, ref value) in params.iter() { + if name == param_name { + replace_with = Some(value); + break; + } + } + url = url.replace(find_this, replace_with.expect("to find substitution value in params")); + } + { + let mut indices_for_removal: Vec = Vec::with_capacity(1); + for param_name in ["annotationSetId"].iter() { + if let Some(index) = params.iter().position(|t| &t.0 == param_name) { + indices_for_removal.push(index); + } + } + for &index in indices_for_removal.iter() { + params.remove(index); + } + } + + if params.len() > 0 { + url.push('?'); + url.push_str(&url::form_urlencoded::serialize(params)); + } + + + + loop { + let token = match self.hub.auth.borrow_mut().token(self._scopes.keys()) { + Ok(token) => token, + Err(err) => { + match dlg.token(&*err) { + Some(token) => token, + None => { + dlg.finished(false); + return Err(Error::MissingToken(err)) + } + } + } + }; + let auth_header = Authorization(Bearer { token: token.access_token }); + let mut req_result = { + let mut client = &mut *self.hub.client.borrow_mut(); + let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) + .header(UserAgent(self.hub._user_agent.clone())) + .header(auth_header.clone()); + + dlg.pre_request(); + req.send() + }; + + match req_result { + Err(err) => { + if let oauth2::Retry::After(d) = dlg.http_error(&err) { + sleep(d); + continue; + } + dlg.finished(false); + return Err(Error::HttpError(err)) + } + Ok(mut res) => { + if !res.status.is_success() { + let mut json_err = String::new(); + res.read_to_string(&mut json_err).unwrap(); + if let oauth2::Retry::After(d) = dlg.http_failure(&res, + json::from_str(&json_err).ok(), + json::from_str(&json_err).ok()) { + sleep(d); + continue; + } + dlg.finished(false); + return match json::from_str::(&json_err){ + Err(_) => Err(Error::Failure(res)), + Ok(serr) => Err(Error::BadRequest(serr)) + } + } + let result_value = { + let mut json_response = String::new(); + res.read_to_string(&mut json_response).unwrap(); + match json::from_str(&json_response) { + Ok(decoded) => (res, decoded), + Err(err) => { + dlg.response_json_decode_error(&json_response, &err); + return Err(Error::JsonDecodeError(json_response, err)); + } + } + }; + + dlg.finished(true); + return Ok(result_value) + } + } + } + } + + + /// The ID of the annotation set to be retrieved. + /// + /// Sets the *annotation set id* path property to the given value. + /// + /// Even though the property as already been set when instantiating this call, + /// we provide this method for API completeness. + pub fn annotation_set_id(mut self, new_value: &str) -> AnnotationsetGetCall<'a, C, A> { + self._annotation_set_id = new_value.to_string(); + self + } + /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong + /// while executing the actual API request. + /// + /// It should be used to handle progress information, and to implement a certain level of resilience. + /// + /// Sets the *delegate* property to the given value. + pub fn delegate(mut self, new_value: &'a mut Delegate) -> AnnotationsetGetCall<'a, C, A> { + self._delegate = Some(new_value); + self + } + + /// Set any additional parameter of the query string used in the request. + /// It should be used to set parameters which are not yet available through their own + /// setters. + /// + /// Please note that this method must not be used to set any of the known paramters + /// which have their own setter method. If done anyway, the request will fail. + /// + /// # Additional Parameters + /// + /// * *bearer_token* (query-string) - OAuth bearer token. + /// * *pp* (query-boolean) - Pretty-print response. + /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. + /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). + /// * *access_token* (query-string) - OAuth access token. + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *quotaUser* (query-string) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + /// * *callback* (query-string) - JSONP + /// * *oauth_token* (query-string) - OAuth 2.0 token for the current user. + /// * *key* (query-string) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. + /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). + /// * *alt* (query-string) - Data format for response. + /// * *$.xgafv* (query-string) - V1 error format. + pub fn param(mut self, name: T, value: T) -> AnnotationsetGetCall<'a, C, A> + where T: AsRef { + self._additional_params.insert(name.as_ref().to_string(), value.as_ref().to_string()); + self + } + + /// Identifies the authorization scope for the method you are building. + /// + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::Readonly`. + /// + /// The `scope` will be added to a set of scopes. This is important as one can maintain access + /// tokens for more than one scope. + /// + /// Usually there is more than one suitable scope to authorize an operation, some of which may + /// encompass more rights than others. For example, for listing resources, a *read-only* scope will be + /// sufficient, a read-write scope will do as well. + pub fn add_scope(mut self, scope: T) -> AnnotationsetGetCall<'a, C, A> + where T: AsRef { + self._scopes.insert(scope.as_ref().to_string(), ()); + self + } +} + + /// Creates a new variant set. For the definitions of variant sets and other genomics resources, see [Fundamentals of Google Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) The provided variant set must have a valid `datasetId` set - all other fields are optional. Note that the `id` field will be ignored, as this is assigned by the server. /// /// A builder for the *create* method supported by a *variantset* resource. @@ -12855,7 +16202,7 @@ impl<'a, C, A> VariantsetCreateCall<'a, C, A> where C: BorrowMut, /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, VariantSet)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -12913,8 +16260,7 @@ impl<'a, C, A> VariantsetCreateCall<'a, C, A> where C: BorrowMut, } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -13089,7 +16435,7 @@ impl<'a, C, A> VariantsetDeleteCall<'a, C, A> where C: BorrowMut, /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Empty)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -13158,8 +16504,7 @@ impl<'a, C, A> VariantsetDeleteCall<'a, C, A> where C: BorrowMut, } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Delete, &url) @@ -13338,7 +16683,7 @@ impl<'a, C, A> VariantsetExportCall<'a, C, A> where C: BorrowMut, /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Operation)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -13418,8 +16763,7 @@ impl<'a, C, A> VariantsetExportCall<'a, C, A> where C: BorrowMut, } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -13589,7 +16933,7 @@ impl<'a, C, A> VariantsetExportCall<'a, C, A> where C: BorrowMut, /// // execute the final call using `doit()`. /// // Values shown here are possibly random and not representative ! /// let result = hub.variantsets().patch(req, "variantSetId") -/// .update_mask("et") +/// .update_mask("ea") /// .doit(); /// # } /// ``` @@ -13613,7 +16957,7 @@ impl<'a, C, A> VariantsetPatchCall<'a, C, A> where C: BorrowMut, /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, VariantSet)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -13696,8 +17040,7 @@ impl<'a, C, A> VariantsetPatchCall<'a, C, A> where C: BorrowMut, } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -13895,7 +17238,7 @@ impl<'a, C, A> VariantsetSearchCall<'a, C, A> where C: BorrowMut, /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, SearchVariantSetsResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -13953,8 +17296,7 @@ impl<'a, C, A> VariantsetSearchCall<'a, C, A> where C: BorrowMut, } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -14129,7 +17471,7 @@ impl<'a, C, A> VariantsetGetCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, VariantSet)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -14198,8 +17540,7 @@ impl<'a, C, A> VariantsetGetCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) diff --git a/gen/gmail1-cli/Cargo.toml b/gen/gmail1-cli/Cargo.toml index c6501a118f..db0a5f3eb2 100644 --- a/gen/gmail1-cli/Cargo.toml +++ b/gen/gmail1-cli/Cargo.toml @@ -4,7 +4,7 @@ [package] name = "google-gmail1-cli" -version = "0.3.3+20160216" +version = "0.3.4+20160316" authors = ["Sebastian Thiel "] description = "A complete library to interact with gmail (protocol v1)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/gmail1-cli" @@ -17,18 +17,18 @@ keywords = ["gmail", "google", "cli"] name = "gmail1" [dependencies] -hyper = "0.7" -mime = "0.1.0" -serde = ">= 0.7.0" -serde_json = ">= 0.7.0" -yup-oauth2 = ">= 0.5.4" +hyper = "0.8" +mime = "0.2.0" +serde = "0.6.0" +serde_json = "0.6.0" +yup-oauth2 = ">= 0.5.6" strsim = "0.4" yup-hyper-mock = "1.0" clap = "2.0" [build-dependencies] -syntex = { version = ">= 0.23" } -serde_codegen = { version = ">= 0.6" } +syntex = { version = "= 0.28" } +serde_codegen = { version = "= 0.6.13" } [dependencies.google-gmail1] diff --git a/gen/gmail1-cli/README.md b/gen/gmail1-cli/README.md index 76488c5fa8..1f3cd2ddd2 100644 --- a/gen/gmail1-cli/README.md +++ b/gen/gmail1-cli/README.md @@ -17,14 +17,14 @@ Everything else about the *gmail* API can be found at the You can download the pre-compiled 64bit binaries for the following platforms: -* ![icon](http://megaicons.net/static/img/icons_sizes/6/140/16/ubuntu-icon.png) [ubuntu](http://dl.byronimo.de/google.rs/cli/0.3.3/ubuntu/gmail1.tar.gz) -* ![icon](http://hydra-media.cursecdn.com/wow.gamepedia.com/a/a2/Apple-icon-16x16.png?version=25ddd67ac3dd3b634478e3978b76cb74) [osx](http://dl.byronimo.de/google.rs/cli/0.3.3/osx/gmail1.tar.gz) +* ![icon](http://megaicons.net/static/img/icons_sizes/6/140/16/ubuntu-icon.png) [ubuntu](http://dl.byronimo.de/google.rs/cli/0.3.4/ubuntu/gmail1.tar.gz) +* ![icon](http://hydra-media.cursecdn.com/wow.gamepedia.com/a/a2/Apple-icon-16x16.png?version=25ddd67ac3dd3b634478e3978b76cb74) [osx](http://dl.byronimo.de/google.rs/cli/0.3.4/osx/gmail1.tar.gz) Find the source code [on github](https://github.com/Byron/google-apis-rs/tree/master/gen/gmail1-cli). # Usage -This documentation was generated from the *gmail* API at revision *20160216*. The CLI is at version *0.3.3*. +This documentation was generated from the *gmail* API at revision *20160316*. The CLI is at version *0.3.4*. ```bash gmail1 [options] diff --git a/gen/gmail1-cli/mkdocs.yml b/gen/gmail1-cli/mkdocs.yml index c2b2f7f35e..bd68ffb0ac 100644 --- a/gen/gmail1-cli/mkdocs.yml +++ b/gen/gmail1-cli/mkdocs.yml @@ -1,4 +1,4 @@ -site_name: gmail v0.3.3+20160216 +site_name: gmail v0.3.4+20160316 site_url: http://byron.github.io/google-apis-rs/google-gmail1-cli site_description: Write integrating applications with bcore diff --git a/gen/gmail1-cli/src/cmn.rs b/gen/gmail1-cli/src/cmn.rs index 188159ee80..ae86fdef65 100644 --- a/gen/gmail1-cli/src/cmn.rs +++ b/gen/gmail1-cli/src/cmn.rs @@ -414,7 +414,7 @@ impl TokenStorage for JsonTokenStorage { Err(err) => match err.kind() { io::ErrorKind::NotFound => Ok(()), - _ => Err(json::Error::Io(err)) + _ => Err(json::Error::IoError(err)) }, Ok(_) => Ok(()), } @@ -427,7 +427,7 @@ impl TokenStorage for JsonTokenStorage { Err(serde_err) => Err(serde_err), } }, - Err(io_err) => Err(json::Error::Io(io_err)) + Err(io_err) => Err(json::Error::IoError(io_err)) } } } @@ -444,7 +444,7 @@ impl TokenStorage for JsonTokenStorage { Err(io_err) => { match io_err.kind() { io::ErrorKind::NotFound => Ok(None), - _ => Err(json::Error::Io(io_err)) + _ => Err(json::Error::IoError(io_err)) } } } @@ -683,7 +683,7 @@ pub fn application_secret_from_directory(dir: &str, = json::from_str(json_console_secret).unwrap(); match json::to_writer_pretty(&mut f, &console_secret) { Err(serde_err) => match serde_err { - json::Error::Io(err) => err, + json::Error::IoError(err) => err, _ => panic!("Unexpected serde error: {:#?}", serde_err) }, Ok(_) => continue, @@ -696,7 +696,7 @@ pub fn application_secret_from_directory(dir: &str, }, Ok(f) => { match json::de::from_reader::<_, ConsoleApplicationSecret>(f) { - Err(json::Error::Io(err)) => + Err(json::Error::IoError(err)) => return secret_io_error(err), Err(json_err) => return Err(CLIError::Configuration( diff --git a/gen/gmail1-cli/src/main.rs b/gen/gmail1-cli/src/main.rs index 1f4dec1296..d7b91047e1 100644 --- a/gen/gmail1-cli/src/main.rs +++ b/gen/gmail1-cli/src/main.rs @@ -3488,8 +3488,8 @@ fn main() { let mut app = App::new("gmail1") .author("Sebastian Thiel ") - .version("0.3.3+20160216") - .about("The Gmail REST API.") + .version("0.3.4+20160316") + .about("Access Gmail mailboxes including sending user email.") .after_help("All documentation details can be found at http://byron.github.io/google-apis-rs/google_gmail1_cli") .arg(Arg::with_name("url") .long("scope") diff --git a/gen/gmail1/Cargo.toml b/gen/gmail1/Cargo.toml index b712b89d37..263616c9ac 100644 --- a/gen/gmail1/Cargo.toml +++ b/gen/gmail1/Cargo.toml @@ -4,7 +4,7 @@ [package] name = "google-gmail1" -version = "0.1.12+20160216" +version = "0.1.13+20160316" authors = ["Sebastian Thiel "] description = "A complete library to interact with gmail (protocol v1)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/gmail1" @@ -16,14 +16,14 @@ build = "src/build.rs" [dependencies] -hyper = "0.7" -mime = "0.1.0" -serde = ">= 0.7.0" -serde_json = ">= 0.7.0" -yup-oauth2 = ">= 0.5.4" +hyper = "0.8" +mime = "0.2.0" +serde = "0.6.0" +serde_json = "0.6.0" +yup-oauth2 = ">= 0.5.6" url = ">= 0.5" [build-dependencies] -syntex = { version = ">= 0.23" } -serde_codegen = { version = ">= 0.6" } +syntex = { version = "= 0.28" } +serde_codegen = { version = "= 0.6.13" } diff --git a/gen/gmail1/README.md b/gen/gmail1/README.md index 6c60a10081..34119ab7b1 100644 --- a/gen/gmail1/README.md +++ b/gen/gmail1/README.md @@ -5,7 +5,7 @@ DO NOT EDIT ! --> The `google-gmail1` library allows access to all features of the *Google gmail* service. -This documentation was generated from *gmail* crate version *0.1.12+20160216*, where *20160216* is the exact revision of the *gmail:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.12*. +This documentation was generated from *gmail* crate version *0.1.13+20160316*, where *20160316* is the exact revision of the *gmail:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.13*. Everything else about the *gmail* *v1* API can be found at the [official documentation site](https://developers.google.com/gmail/api/). diff --git a/gen/gmail1/src/cmn.rs b/gen/gmail1/src/cmn.rs index 87b91a8986..c69621da55 100644 --- a/gen/gmail1/src/cmn.rs +++ b/gen/gmail1/src/cmn.rs @@ -12,7 +12,7 @@ use mime::{Mime, TopLevel, SubLevel, Attr, Value}; use oauth2::{TokenType, Retry, self}; use hyper; use hyper::header::{ContentType, ContentLength, Headers, UserAgent, Authorization, Header, - HeaderFormat}; + HeaderFormat, Bearer}; use hyper::http::h1::LINE_ENDING; use hyper::method::Method; use hyper::status::StatusCode; @@ -634,7 +634,7 @@ pub struct ResumableUploadHelper<'a, A: 'a> { pub start_at: Option, pub auth: &'a mut A, pub user_agent: &'a str, - pub auth_header: Authorization, + pub auth_header: Authorization, pub url: &'a str, pub reader: &'a mut ReadSeek, pub media_type: Mime, diff --git a/gen/gmail1/src/lib.rs b/gen/gmail1/src/lib.rs index b7d2a63381..e6af31adb8 100644 --- a/gen/gmail1/src/lib.rs +++ b/gen/gmail1/src/lib.rs @@ -2,7 +2,7 @@ // This file was generated automatically from 'src/mako/api/lib.rs.mako' // DO NOT EDIT ! -//! This documentation was generated from *gmail* crate version *0.1.12+20160216*, where *20160216* is the exact revision of the *gmail:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.12*. +//! This documentation was generated from *gmail* crate version *0.1.13+20160316*, where *20160316* is the exact revision of the *gmail:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.13*. //! //! Everything else about the *gmail* *v1* API can be found at the //! [official documentation site](https://developers.google.com/gmail/api/). diff --git a/gen/gmail1/src/lib.rs.in b/gen/gmail1/src/lib.rs.in index ae3b54759a..2abb58c3d5 100644 --- a/gen/gmail1/src/lib.rs.in +++ b/gen/gmail1/src/lib.rs.in @@ -162,7 +162,7 @@ impl<'a, C, A> Gmail Gmail { client: RefCell::new(client), auth: RefCell::new(authenticator), - _user_agent: "google-api-rust-client/0.1.12".to_string(), + _user_agent: "google-api-rust-client/0.1.13".to_string(), } } @@ -171,7 +171,7 @@ impl<'a, C, A> Gmail } /// Set the user-agent header field to use in all requests to the server. - /// It defaults to `google-api-rust-client/0.1.12`. + /// It defaults to `google-api-rust-client/0.1.13`. /// /// Returns the previously set user-agent. pub fn user_agent(&mut self, agent_name: String) -> String { @@ -1485,7 +1485,7 @@ impl<'a, C, A> UserStopCall<'a, C, A> where C: BorrowMut, A: oaut /// Perform the operation you have build so far. pub fn doit(mut self) -> Result { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -1553,8 +1553,7 @@ impl<'a, C, A> UserStopCall<'a, C, A> where C: BorrowMut, A: oaut } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Post, &url) @@ -1727,7 +1726,7 @@ impl<'a, C, A> UserMessageImportCall<'a, C, A> where C: BorrowMut fn doit(mut self, mut reader: RS, reader_mime_type: mime::Mime, protocol: &'static str) -> Result<(hyper::client::Response, Message)> where RS: ReadSeek { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -1830,8 +1829,7 @@ impl<'a, C, A> UserMessageImportCall<'a, C, A> where C: BorrowMut } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { if should_ask_dlg_for_url && (upload_url = dlg.upload_url()) == () && upload_url.is_some() { @@ -2147,7 +2145,7 @@ impl<'a, C, A> UserHistoryListCall<'a, C, A> where C: BorrowMut, /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, ListHistoryResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -2228,8 +2226,7 @@ impl<'a, C, A> UserHistoryListCall<'a, C, A> where C: BorrowMut, } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -2432,7 +2429,7 @@ impl<'a, C, A> UserDraftCreateCall<'a, C, A> where C: BorrowMut, fn doit(mut self, mut reader: RS, reader_mime_type: mime::Mime, protocol: &'static str) -> Result<(hyper::client::Response, Draft)> where RS: ReadSeek { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -2523,8 +2520,7 @@ impl<'a, C, A> UserDraftCreateCall<'a, C, A> where C: BorrowMut, } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { if should_ask_dlg_for_url && (upload_url = dlg.upload_url()) == () && upload_url.is_some() { @@ -2811,7 +2807,7 @@ impl<'a, C, A> UserLabelCreateCall<'a, C, A> where C: BorrowMut, /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Label)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -2891,8 +2887,7 @@ impl<'a, C, A> UserLabelCreateCall<'a, C, A> where C: BorrowMut, } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -3072,7 +3067,7 @@ impl<'a, C, A> UserLabelDeleteCall<'a, C, A> where C: BorrowMut, /// Perform the operation you have build so far. pub fn doit(mut self) -> Result { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -3141,8 +3136,7 @@ impl<'a, C, A> UserLabelDeleteCall<'a, C, A> where C: BorrowMut, } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Delete, &url) @@ -3309,7 +3303,7 @@ impl<'a, C, A> UserLabelGetCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Label)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -3379,8 +3373,7 @@ impl<'a, C, A> UserLabelGetCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -3557,7 +3550,7 @@ impl<'a, C, A> UserMessageTrashCall<'a, C, A> where C: BorrowMut, /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Message)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -3627,8 +3620,7 @@ impl<'a, C, A> UserMessageTrashCall<'a, C, A> where C: BorrowMut, } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Post, &url) @@ -3813,7 +3805,7 @@ impl<'a, C, A> UserDraftSendCall<'a, C, A> where C: BorrowMut, A: fn doit(mut self, mut reader: RS, reader_mime_type: mime::Mime, protocol: &'static str) -> Result<(hyper::client::Response, Message)> where RS: ReadSeek { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -3904,8 +3896,7 @@ impl<'a, C, A> UserDraftSendCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { if should_ask_dlg_for_url && (upload_url = dlg.upload_url()) == () && upload_url.is_some() { @@ -4186,7 +4177,7 @@ impl<'a, C, A> UserMessageUntrashCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, Message)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -4256,8 +4247,7 @@ impl<'a, C, A> UserMessageUntrashCall<'a, C, A> where C: BorrowMut UserMessageBatchDeleteCall<'a, C, A> where C: BorrowMut Result { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -4519,8 +4509,7 @@ impl<'a, C, A> UserMessageBatchDeleteCall<'a, C, A> where C: BorrowMut UserMessageDeleteCall<'a, C, A> where C: BorrowMut /// Perform the operation you have build so far. pub fn doit(mut self) -> Result { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -4759,8 +4748,7 @@ impl<'a, C, A> UserMessageDeleteCall<'a, C, A> where C: BorrowMut } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Delete, &url) @@ -4936,7 +4924,7 @@ impl<'a, C, A> UserDraftUpdateCall<'a, C, A> where C: BorrowMut, fn doit(mut self, mut reader: RS, reader_mime_type: mime::Mime, protocol: &'static str) -> Result<(hyper::client::Response, Draft)> where RS: ReadSeek { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -5028,8 +5016,7 @@ impl<'a, C, A> UserDraftUpdateCall<'a, C, A> where C: BorrowMut, } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { if should_ask_dlg_for_url && (upload_url = dlg.upload_url()) == () && upload_url.is_some() { @@ -5322,7 +5309,7 @@ impl<'a, C, A> UserDraftGetCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Draft)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -5395,8 +5382,7 @@ impl<'a, C, A> UserDraftGetCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -5587,7 +5573,7 @@ impl<'a, C, A> UserLabelUpdateCall<'a, C, A> where C: BorrowMut, /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Label)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -5668,8 +5654,7 @@ impl<'a, C, A> UserLabelUpdateCall<'a, C, A> where C: BorrowMut, } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -5866,7 +5851,7 @@ impl<'a, C, A> UserMessageModifyCall<'a, C, A> where C: BorrowMut /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Message)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -5947,8 +5932,7 @@ impl<'a, C, A> UserMessageModifyCall<'a, C, A> where C: BorrowMut } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -6145,7 +6129,7 @@ impl<'a, C, A> UserLabelPatchCall<'a, C, A> where C: BorrowMut, A /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Label)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -6226,8 +6210,7 @@ impl<'a, C, A> UserLabelPatchCall<'a, C, A> where C: BorrowMut, A } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -6417,7 +6400,7 @@ impl<'a, C, A> UserDraftDeleteCall<'a, C, A> where C: BorrowMut, /// Perform the operation you have build so far. pub fn doit(mut self) -> Result { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -6486,8 +6469,7 @@ impl<'a, C, A> UserDraftDeleteCall<'a, C, A> where C: BorrowMut, } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Delete, &url) @@ -6663,7 +6645,7 @@ impl<'a, C, A> UserThreadListCall<'a, C, A> where C: BorrowMut, A /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, ListThreadsResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -6749,8 +6731,7 @@ impl<'a, C, A> UserThreadListCall<'a, C, A> where C: BorrowMut, A } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -6960,7 +6941,7 @@ impl<'a, C, A> UserThreadModifyCall<'a, C, A> where C: BorrowMut, /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Thread)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -7041,8 +7022,7 @@ impl<'a, C, A> UserThreadModifyCall<'a, C, A> where C: BorrowMut, } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -7232,7 +7212,7 @@ impl<'a, C, A> UserThreadDeleteCall<'a, C, A> where C: BorrowMut, /// Perform the operation you have build so far. pub fn doit(mut self) -> Result { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -7301,8 +7281,7 @@ impl<'a, C, A> UserThreadDeleteCall<'a, C, A> where C: BorrowMut, } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Delete, &url) @@ -7470,7 +7449,7 @@ impl<'a, C, A> UserMessageAttachmentGetCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, MessagePartBody)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -7541,8 +7520,7 @@ impl<'a, C, A> UserMessageAttachmentGetCall<'a, C, A> where C: BorrowMut UserThreadTrashCall<'a, C, A> where C: BorrowMut, /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Thread)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -7799,8 +7777,7 @@ impl<'a, C, A> UserThreadTrashCall<'a, C, A> where C: BorrowMut, } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Post, &url) @@ -7983,7 +7960,7 @@ impl<'a, C, A> UserWatchCall<'a, C, A> where C: BorrowMut, A: oau /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, WatchResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -8063,8 +8040,7 @@ impl<'a, C, A> UserWatchCall<'a, C, A> where C: BorrowMut, A: oau } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -8249,7 +8225,7 @@ impl<'a, C, A> UserDraftListCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, ListDraftsResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -8327,8 +8303,7 @@ impl<'a, C, A> UserDraftListCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -8524,7 +8499,7 @@ impl<'a, C, A> UserMessageSendCall<'a, C, A> where C: BorrowMut, fn doit(mut self, mut reader: RS, reader_mime_type: mime::Mime, protocol: &'static str) -> Result<(hyper::client::Response, Message)> where RS: ReadSeek { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -8615,8 +8590,7 @@ impl<'a, C, A> UserMessageSendCall<'a, C, A> where C: BorrowMut, } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { if should_ask_dlg_for_url && (upload_url = dlg.upload_url()) == () && upload_url.is_some() { @@ -8901,7 +8875,7 @@ impl<'a, C, A> UserMessageGetCall<'a, C, A> where C: BorrowMut, A /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Message)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -8979,8 +8953,7 @@ impl<'a, C, A> UserMessageGetCall<'a, C, A> where C: BorrowMut, A } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -9181,7 +9154,7 @@ impl<'a, C, A> UserMessageListCall<'a, C, A> where C: BorrowMut, /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, ListMessagesResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -9267,8 +9240,7 @@ impl<'a, C, A> UserMessageListCall<'a, C, A> where C: BorrowMut, } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -9471,7 +9443,7 @@ impl<'a, C, A> UserThreadUntrashCall<'a, C, A> where C: BorrowMut /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Thread)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -9541,8 +9513,7 @@ impl<'a, C, A> UserThreadUntrashCall<'a, C, A> where C: BorrowMut } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Post, &url) @@ -9718,7 +9689,7 @@ impl<'a, C, A> UserGetProfileCall<'a, C, A> where C: BorrowMut, A /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Profile)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -9787,8 +9758,7 @@ impl<'a, C, A> UserGetProfileCall<'a, C, A> where C: BorrowMut, A } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -9959,7 +9929,7 @@ impl<'a, C, A> UserThreadGetCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Thread)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -10037,8 +10007,7 @@ impl<'a, C, A> UserThreadGetCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -10242,7 +10211,7 @@ impl<'a, C, A> UserMessageInsertCall<'a, C, A> where C: BorrowMut fn doit(mut self, mut reader: RS, reader_mime_type: mime::Mime, protocol: &'static str) -> Result<(hyper::client::Response, Message)> where RS: ReadSeek { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -10339,8 +10308,7 @@ impl<'a, C, A> UserMessageInsertCall<'a, C, A> where C: BorrowMut } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { if should_ask_dlg_for_url && (upload_url = dlg.upload_url()) == () && upload_url.is_some() { @@ -10634,7 +10602,7 @@ impl<'a, C, A> UserLabelListCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, ListLabelsResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -10703,8 +10671,7 @@ impl<'a, C, A> UserLabelListCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) diff --git a/gen/groupsmigration1-cli/Cargo.toml b/gen/groupsmigration1-cli/Cargo.toml index 8b07457e57..6a9bb7df6b 100644 --- a/gen/groupsmigration1-cli/Cargo.toml +++ b/gen/groupsmigration1-cli/Cargo.toml @@ -4,7 +4,7 @@ [package] name = "google-groupsmigration1-cli" -version = "0.3.3+20140416" +version = "0.3.4+20140416" authors = ["Sebastian Thiel "] description = "A complete library to interact with Groups Migration (protocol v1)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/groupsmigration1-cli" @@ -17,18 +17,18 @@ keywords = ["groupsmigration", "google", "cli"] name = "groupsmigration1" [dependencies] -hyper = "0.7" -mime = "0.1.0" -serde = ">= 0.7.0" -serde_json = ">= 0.7.0" -yup-oauth2 = ">= 0.5.4" +hyper = "0.8" +mime = "0.2.0" +serde = "0.6.0" +serde_json = "0.6.0" +yup-oauth2 = ">= 0.5.6" strsim = "0.4" yup-hyper-mock = "1.0" clap = "2.0" [build-dependencies] -syntex = { version = ">= 0.23" } -serde_codegen = { version = ">= 0.6" } +syntex = { version = "= 0.28" } +serde_codegen = { version = "= 0.6.13" } [dependencies.google-groupsmigration1] diff --git a/gen/groupsmigration1-cli/README.md b/gen/groupsmigration1-cli/README.md index 7bebcdb1c2..daca9fb61d 100644 --- a/gen/groupsmigration1-cli/README.md +++ b/gen/groupsmigration1-cli/README.md @@ -17,14 +17,14 @@ Everything else about the *Groups Migration* API can be found at the You can download the pre-compiled 64bit binaries for the following platforms: -* ![icon](http://megaicons.net/static/img/icons_sizes/6/140/16/ubuntu-icon.png) [ubuntu](http://dl.byronimo.de/google.rs/cli/0.3.3/ubuntu/groupsmigration1.tar.gz) -* ![icon](http://hydra-media.cursecdn.com/wow.gamepedia.com/a/a2/Apple-icon-16x16.png?version=25ddd67ac3dd3b634478e3978b76cb74) [osx](http://dl.byronimo.de/google.rs/cli/0.3.3/osx/groupsmigration1.tar.gz) +* ![icon](http://megaicons.net/static/img/icons_sizes/6/140/16/ubuntu-icon.png) [ubuntu](http://dl.byronimo.de/google.rs/cli/0.3.4/ubuntu/groupsmigration1.tar.gz) +* ![icon](http://hydra-media.cursecdn.com/wow.gamepedia.com/a/a2/Apple-icon-16x16.png?version=25ddd67ac3dd3b634478e3978b76cb74) [osx](http://dl.byronimo.de/google.rs/cli/0.3.4/osx/groupsmigration1.tar.gz) Find the source code [on github](https://github.com/Byron/google-apis-rs/tree/master/gen/groupsmigration1-cli). # Usage -This documentation was generated from the *Groups Migration* API at revision *20140416*. The CLI is at version *0.3.3*. +This documentation was generated from the *Groups Migration* API at revision *20140416*. The CLI is at version *0.3.4*. ```bash groupsmigration1 [options] diff --git a/gen/groupsmigration1-cli/mkdocs.yml b/gen/groupsmigration1-cli/mkdocs.yml index d2d2e032c5..74d4d28832 100644 --- a/gen/groupsmigration1-cli/mkdocs.yml +++ b/gen/groupsmigration1-cli/mkdocs.yml @@ -1,4 +1,4 @@ -site_name: Groups Migration v0.3.3+20140416 +site_name: Groups Migration v0.3.4+20140416 site_url: http://byron.github.io/google-apis-rs/google-groupsmigration1-cli site_description: Write integrating applications with bcore diff --git a/gen/groupsmigration1-cli/src/cmn.rs b/gen/groupsmigration1-cli/src/cmn.rs index 188159ee80..ae86fdef65 100644 --- a/gen/groupsmigration1-cli/src/cmn.rs +++ b/gen/groupsmigration1-cli/src/cmn.rs @@ -414,7 +414,7 @@ impl TokenStorage for JsonTokenStorage { Err(err) => match err.kind() { io::ErrorKind::NotFound => Ok(()), - _ => Err(json::Error::Io(err)) + _ => Err(json::Error::IoError(err)) }, Ok(_) => Ok(()), } @@ -427,7 +427,7 @@ impl TokenStorage for JsonTokenStorage { Err(serde_err) => Err(serde_err), } }, - Err(io_err) => Err(json::Error::Io(io_err)) + Err(io_err) => Err(json::Error::IoError(io_err)) } } } @@ -444,7 +444,7 @@ impl TokenStorage for JsonTokenStorage { Err(io_err) => { match io_err.kind() { io::ErrorKind::NotFound => Ok(None), - _ => Err(json::Error::Io(io_err)) + _ => Err(json::Error::IoError(io_err)) } } } @@ -683,7 +683,7 @@ pub fn application_secret_from_directory(dir: &str, = json::from_str(json_console_secret).unwrap(); match json::to_writer_pretty(&mut f, &console_secret) { Err(serde_err) => match serde_err { - json::Error::Io(err) => err, + json::Error::IoError(err) => err, _ => panic!("Unexpected serde error: {:#?}", serde_err) }, Ok(_) => continue, @@ -696,7 +696,7 @@ pub fn application_secret_from_directory(dir: &str, }, Ok(f) => { match json::de::from_reader::<_, ConsoleApplicationSecret>(f) { - Err(json::Error::Io(err)) => + Err(json::Error::IoError(err)) => return secret_io_error(err), Err(json_err) => return Err(CLIError::Configuration( diff --git a/gen/groupsmigration1-cli/src/main.rs b/gen/groupsmigration1-cli/src/main.rs index f5eddc764d..307569a64b 100644 --- a/gen/groupsmigration1-cli/src/main.rs +++ b/gen/groupsmigration1-cli/src/main.rs @@ -235,7 +235,7 @@ fn main() { let mut app = App::new("groupsmigration1") .author("Sebastian Thiel ") - .version("0.3.3+20140416") + .version("0.3.4+20140416") .about("Groups Migration Api.") .after_help("All documentation details can be found at http://byron.github.io/google-apis-rs/google_groupsmigration1_cli") .arg(Arg::with_name("url") diff --git a/gen/groupsmigration1/Cargo.toml b/gen/groupsmigration1/Cargo.toml index 86e1f9aac1..f55c55a2d6 100644 --- a/gen/groupsmigration1/Cargo.toml +++ b/gen/groupsmigration1/Cargo.toml @@ -4,7 +4,7 @@ [package] name = "google-groupsmigration1" -version = "0.1.12+20140416" +version = "0.1.13+20140416" authors = ["Sebastian Thiel "] description = "A complete library to interact with Groups Migration (protocol v1)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/groupsmigration1" @@ -16,14 +16,14 @@ build = "src/build.rs" [dependencies] -hyper = "0.7" -mime = "0.1.0" -serde = ">= 0.7.0" -serde_json = ">= 0.7.0" -yup-oauth2 = ">= 0.5.4" +hyper = "0.8" +mime = "0.2.0" +serde = "0.6.0" +serde_json = "0.6.0" +yup-oauth2 = ">= 0.5.6" url = ">= 0.5" [build-dependencies] -syntex = { version = ">= 0.23" } -serde_codegen = { version = ">= 0.6" } +syntex = { version = "= 0.28" } +serde_codegen = { version = "= 0.6.13" } diff --git a/gen/groupsmigration1/README.md b/gen/groupsmigration1/README.md index e1bb9d3774..f8b2ea89d2 100644 --- a/gen/groupsmigration1/README.md +++ b/gen/groupsmigration1/README.md @@ -5,7 +5,7 @@ DO NOT EDIT ! --> The `google-groupsmigration1` library allows access to all features of the *Google Groups Migration* service. -This documentation was generated from *Groups Migration* crate version *0.1.12+20140416*, where *20140416* is the exact revision of the *groupsmigration:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.12*. +This documentation was generated from *Groups Migration* crate version *0.1.13+20140416*, where *20140416* is the exact revision of the *groupsmigration:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.13*. Everything else about the *Groups Migration* *v1* API can be found at the [official documentation site](https://developers.google.com/google-apps/groups-migration/). diff --git a/gen/groupsmigration1/src/cmn.rs b/gen/groupsmigration1/src/cmn.rs index 87b91a8986..c69621da55 100644 --- a/gen/groupsmigration1/src/cmn.rs +++ b/gen/groupsmigration1/src/cmn.rs @@ -12,7 +12,7 @@ use mime::{Mime, TopLevel, SubLevel, Attr, Value}; use oauth2::{TokenType, Retry, self}; use hyper; use hyper::header::{ContentType, ContentLength, Headers, UserAgent, Authorization, Header, - HeaderFormat}; + HeaderFormat, Bearer}; use hyper::http::h1::LINE_ENDING; use hyper::method::Method; use hyper::status::StatusCode; @@ -634,7 +634,7 @@ pub struct ResumableUploadHelper<'a, A: 'a> { pub start_at: Option, pub auth: &'a mut A, pub user_agent: &'a str, - pub auth_header: Authorization, + pub auth_header: Authorization, pub url: &'a str, pub reader: &'a mut ReadSeek, pub media_type: Mime, diff --git a/gen/groupsmigration1/src/lib.rs b/gen/groupsmigration1/src/lib.rs index dff3198614..03f5e18b92 100644 --- a/gen/groupsmigration1/src/lib.rs +++ b/gen/groupsmigration1/src/lib.rs @@ -2,7 +2,7 @@ // This file was generated automatically from 'src/mako/api/lib.rs.mako' // DO NOT EDIT ! -//! This documentation was generated from *Groups Migration* crate version *0.1.12+20140416*, where *20140416* is the exact revision of the *groupsmigration:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.12*. +//! This documentation was generated from *Groups Migration* crate version *0.1.13+20140416*, where *20140416* is the exact revision of the *groupsmigration:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.13*. //! //! Everything else about the *Groups Migration* *v1* API can be found at the //! [official documentation site](https://developers.google.com/google-apps/groups-migration/). diff --git a/gen/groupsmigration1/src/lib.rs.in b/gen/groupsmigration1/src/lib.rs.in index a375266690..24c2fe8208 100644 --- a/gen/groupsmigration1/src/lib.rs.in +++ b/gen/groupsmigration1/src/lib.rs.in @@ -128,7 +128,7 @@ impl<'a, C, A> GroupsMigration GroupsMigration { client: RefCell::new(client), auth: RefCell::new(authenticator), - _user_agent: "google-api-rust-client/0.1.12".to_string(), + _user_agent: "google-api-rust-client/0.1.13".to_string(), } } @@ -137,7 +137,7 @@ impl<'a, C, A> GroupsMigration } /// Set the user-agent header field to use in all requests to the server. - /// It defaults to `google-api-rust-client/0.1.12`. + /// It defaults to `google-api-rust-client/0.1.13`. /// /// Returns the previously set user-agent. pub fn user_agent(&mut self, agent_name: String) -> String { @@ -291,7 +291,7 @@ impl<'a, C, A> ArchiveInsertCall<'a, C, A> where C: BorrowMut, A: fn doit(mut self, mut reader: RS, reader_mime_type: mime::Mime, protocol: &'static str) -> Result<(hyper::client::Response, Groups)> where RS: ReadSeek { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -371,8 +371,7 @@ impl<'a, C, A> ArchiveInsertCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { if should_ask_dlg_for_url && (upload_url = dlg.upload_url()) == () && upload_url.is_some() { should_ask_dlg_for_url = false; diff --git a/gen/groupssettings1-cli/Cargo.toml b/gen/groupssettings1-cli/Cargo.toml index ba69e375df..d0756346ea 100644 --- a/gen/groupssettings1-cli/Cargo.toml +++ b/gen/groupssettings1-cli/Cargo.toml @@ -4,7 +4,7 @@ [package] name = "google-groupssettings1-cli" -version = "0.3.3+20140428" +version = "0.3.4+20160323" authors = ["Sebastian Thiel "] description = "A complete library to interact with groupssettings (protocol v1)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/groupssettings1-cli" @@ -17,18 +17,18 @@ keywords = ["groupssettings", "google", "cli"] name = "groupssettings1" [dependencies] -hyper = "0.7" -mime = "0.1.0" -serde = ">= 0.7.0" -serde_json = ">= 0.7.0" -yup-oauth2 = ">= 0.5.4" +hyper = "0.8" +mime = "0.2.0" +serde = "0.6.0" +serde_json = "0.6.0" +yup-oauth2 = ">= 0.5.6" strsim = "0.4" yup-hyper-mock = "1.0" clap = "2.0" [build-dependencies] -syntex = { version = ">= 0.23" } -serde_codegen = { version = ">= 0.6" } +syntex = { version = "= 0.28" } +serde_codegen = { version = "= 0.6.13" } [dependencies.google-groupssettings1] diff --git a/gen/groupssettings1-cli/README.md b/gen/groupssettings1-cli/README.md index 6e9266b830..02218e4549 100644 --- a/gen/groupssettings1-cli/README.md +++ b/gen/groupssettings1-cli/README.md @@ -17,14 +17,14 @@ Everything else about the *groupssettings* API can be found at the You can download the pre-compiled 64bit binaries for the following platforms: -* ![icon](http://megaicons.net/static/img/icons_sizes/6/140/16/ubuntu-icon.png) [ubuntu](http://dl.byronimo.de/google.rs/cli/0.3.3/ubuntu/groupssettings1.tar.gz) -* ![icon](http://hydra-media.cursecdn.com/wow.gamepedia.com/a/a2/Apple-icon-16x16.png?version=25ddd67ac3dd3b634478e3978b76cb74) [osx](http://dl.byronimo.de/google.rs/cli/0.3.3/osx/groupssettings1.tar.gz) +* ![icon](http://megaicons.net/static/img/icons_sizes/6/140/16/ubuntu-icon.png) [ubuntu](http://dl.byronimo.de/google.rs/cli/0.3.4/ubuntu/groupssettings1.tar.gz) +* ![icon](http://hydra-media.cursecdn.com/wow.gamepedia.com/a/a2/Apple-icon-16x16.png?version=25ddd67ac3dd3b634478e3978b76cb74) [osx](http://dl.byronimo.de/google.rs/cli/0.3.4/osx/groupssettings1.tar.gz) Find the source code [on github](https://github.com/Byron/google-apis-rs/tree/master/gen/groupssettings1-cli). # Usage -This documentation was generated from the *groupssettings* API at revision *20140428*. The CLI is at version *0.3.3*. +This documentation was generated from the *groupssettings* API at revision *20160323*. The CLI is at version *0.3.4*. ```bash groupssettings1 [options] diff --git a/gen/groupssettings1-cli/mkdocs.yml b/gen/groupssettings1-cli/mkdocs.yml index 25af41fb77..9a1a64740f 100644 --- a/gen/groupssettings1-cli/mkdocs.yml +++ b/gen/groupssettings1-cli/mkdocs.yml @@ -1,4 +1,4 @@ -site_name: groupssettings v0.3.3+20140428 +site_name: groupssettings v0.3.4+20160323 site_url: http://byron.github.io/google-apis-rs/google-groupssettings1-cli site_description: Write integrating applications with bcore diff --git a/gen/groupssettings1-cli/src/cmn.rs b/gen/groupssettings1-cli/src/cmn.rs index 188159ee80..ae86fdef65 100644 --- a/gen/groupssettings1-cli/src/cmn.rs +++ b/gen/groupssettings1-cli/src/cmn.rs @@ -414,7 +414,7 @@ impl TokenStorage for JsonTokenStorage { Err(err) => match err.kind() { io::ErrorKind::NotFound => Ok(()), - _ => Err(json::Error::Io(err)) + _ => Err(json::Error::IoError(err)) }, Ok(_) => Ok(()), } @@ -427,7 +427,7 @@ impl TokenStorage for JsonTokenStorage { Err(serde_err) => Err(serde_err), } }, - Err(io_err) => Err(json::Error::Io(io_err)) + Err(io_err) => Err(json::Error::IoError(io_err)) } } } @@ -444,7 +444,7 @@ impl TokenStorage for JsonTokenStorage { Err(io_err) => { match io_err.kind() { io::ErrorKind::NotFound => Ok(None), - _ => Err(json::Error::Io(io_err)) + _ => Err(json::Error::IoError(io_err)) } } } @@ -683,7 +683,7 @@ pub fn application_secret_from_directory(dir: &str, = json::from_str(json_console_secret).unwrap(); match json::to_writer_pretty(&mut f, &console_secret) { Err(serde_err) => match serde_err { - json::Error::Io(err) => err, + json::Error::IoError(err) => err, _ => panic!("Unexpected serde error: {:#?}", serde_err) }, Ok(_) => continue, @@ -696,7 +696,7 @@ pub fn application_secret_from_directory(dir: &str, }, Ok(f) => { match json::de::from_reader::<_, ConsoleApplicationSecret>(f) { - Err(json::Error::Io(err)) => + Err(json::Error::IoError(err)) => return secret_io_error(err), Err(json_err) => return Err(CLIError::Configuration( diff --git a/gen/groupssettings1-cli/src/main.rs b/gen/groupssettings1-cli/src/main.rs index ad93de142b..4621e03af3 100644 --- a/gen/groupssettings1-cli/src/main.rs +++ b/gen/groupssettings1-cli/src/main.rs @@ -139,6 +139,7 @@ impl<'n> Engine<'n> { "who-can-contact-owner" => Some(("whoCanContactOwner", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "message-display-font" => Some(("messageDisplayFont", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "who-can-leave-group" => Some(("whoCanLeaveGroup", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "who-can-add" => Some(("whoCanAdd", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "who-can-join" => Some(("whoCanJoin", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "who-can-invite" => Some(("whoCanInvite", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "kind" => Some(("kind", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), @@ -149,7 +150,7 @@ impl<'n> Engine<'n> { "max-message-bytes" => Some(("maxMessageBytes", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), "allow-google-communication" => Some(("allowGoogleCommunication", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), _ => { - let suggestion = FieldCursor::did_you_mean(key, &vec!["allow-external-members", "allow-google-communication", "allow-web-posting", "archive-only", "custom-reply-to", "default-message-deny-notification-text", "description", "email", "include-in-global-address-list", "is-archived", "kind", "max-message-bytes", "members-can-post-as-the-group", "message-display-font", "message-moderation-level", "name", "primary-language", "reply-to", "send-message-deny-notification", "show-in-group-directory", "spam-moderation-level", "who-can-contact-owner", "who-can-invite", "who-can-join", "who-can-leave-group", "who-can-post-message", "who-can-view-group", "who-can-view-membership"]); + let suggestion = FieldCursor::did_you_mean(key, &vec!["allow-external-members", "allow-google-communication", "allow-web-posting", "archive-only", "custom-reply-to", "default-message-deny-notification-text", "description", "email", "include-in-global-address-list", "is-archived", "kind", "max-message-bytes", "members-can-post-as-the-group", "message-display-font", "message-moderation-level", "name", "primary-language", "reply-to", "send-message-deny-notification", "show-in-group-directory", "spam-moderation-level", "who-can-add", "who-can-contact-owner", "who-can-invite", "who-can-join", "who-can-leave-group", "who-can-post-message", "who-can-view-group", "who-can-view-membership"]); err.issues.push(CLIError::Field(FieldError::Unknown(temp_cursor.to_string(), suggestion, value.map(|v| v.to_string())))); None } @@ -251,6 +252,7 @@ impl<'n> Engine<'n> { "who-can-contact-owner" => Some(("whoCanContactOwner", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "message-display-font" => Some(("messageDisplayFont", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "who-can-leave-group" => Some(("whoCanLeaveGroup", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "who-can-add" => Some(("whoCanAdd", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "who-can-join" => Some(("whoCanJoin", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "who-can-invite" => Some(("whoCanInvite", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "kind" => Some(("kind", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), @@ -261,7 +263,7 @@ impl<'n> Engine<'n> { "max-message-bytes" => Some(("maxMessageBytes", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), "allow-google-communication" => Some(("allowGoogleCommunication", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), _ => { - let suggestion = FieldCursor::did_you_mean(key, &vec!["allow-external-members", "allow-google-communication", "allow-web-posting", "archive-only", "custom-reply-to", "default-message-deny-notification-text", "description", "email", "include-in-global-address-list", "is-archived", "kind", "max-message-bytes", "members-can-post-as-the-group", "message-display-font", "message-moderation-level", "name", "primary-language", "reply-to", "send-message-deny-notification", "show-in-group-directory", "spam-moderation-level", "who-can-contact-owner", "who-can-invite", "who-can-join", "who-can-leave-group", "who-can-post-message", "who-can-view-group", "who-can-view-membership"]); + let suggestion = FieldCursor::did_you_mean(key, &vec!["allow-external-members", "allow-google-communication", "allow-web-posting", "archive-only", "custom-reply-to", "default-message-deny-notification-text", "description", "email", "include-in-global-address-list", "is-archived", "kind", "max-message-bytes", "members-can-post-as-the-group", "message-display-font", "message-moderation-level", "name", "primary-language", "reply-to", "send-message-deny-notification", "show-in-group-directory", "spam-moderation-level", "who-can-add", "who-can-contact-owner", "who-can-invite", "who-can-join", "who-can-leave-group", "who-can-post-message", "who-can-view-group", "who-can-view-membership"]); err.issues.push(CLIError::Field(FieldError::Unknown(temp_cursor.to_string(), suggestion, value.map(|v| v.to_string())))); None } @@ -510,7 +512,7 @@ fn main() { let mut app = App::new("groupssettings1") .author("Sebastian Thiel ") - .version("0.3.3+20140428") + .version("0.3.4+20160323") .about("Lets you manage permission levels and related settings of a group.") .after_help("All documentation details can be found at http://byron.github.io/google-apis-rs/google_groupssettings1_cli") .arg(Arg::with_name("url") diff --git a/gen/groupssettings1/Cargo.toml b/gen/groupssettings1/Cargo.toml index b0bfa8312d..77ffdabcdd 100644 --- a/gen/groupssettings1/Cargo.toml +++ b/gen/groupssettings1/Cargo.toml @@ -4,7 +4,7 @@ [package] name = "google-groupssettings1" -version = "0.1.12+20140428" +version = "0.1.13+20160323" authors = ["Sebastian Thiel "] description = "A complete library to interact with groupssettings (protocol v1)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/groupssettings1" @@ -16,14 +16,14 @@ build = "src/build.rs" [dependencies] -hyper = "0.7" -mime = "0.1.0" -serde = ">= 0.7.0" -serde_json = ">= 0.7.0" -yup-oauth2 = ">= 0.5.4" +hyper = "0.8" +mime = "0.2.0" +serde = "0.6.0" +serde_json = "0.6.0" +yup-oauth2 = ">= 0.5.6" url = ">= 0.5" [build-dependencies] -syntex = { version = ">= 0.23" } -serde_codegen = { version = ">= 0.6" } +syntex = { version = "= 0.28" } +serde_codegen = { version = "= 0.6.13" } diff --git a/gen/groupssettings1/README.md b/gen/groupssettings1/README.md index 5f104641ef..9dd5ba1557 100644 --- a/gen/groupssettings1/README.md +++ b/gen/groupssettings1/README.md @@ -5,7 +5,7 @@ DO NOT EDIT ! --> The `google-groupssettings1` library allows access to all features of the *Google groupssettings* service. -This documentation was generated from *groupssettings* crate version *0.1.12+20140428*, where *20140428* is the exact revision of the *groupssettings:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.12*. +This documentation was generated from *groupssettings* crate version *0.1.13+20160323*, where *20160323* is the exact revision of the *groupssettings:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.13*. Everything else about the *groupssettings* *v1* API can be found at the [official documentation site](https://developers.google.com/google-apps/groups-settings/get_started). diff --git a/gen/groupssettings1/src/cmn.rs b/gen/groupssettings1/src/cmn.rs index 87b91a8986..c69621da55 100644 --- a/gen/groupssettings1/src/cmn.rs +++ b/gen/groupssettings1/src/cmn.rs @@ -12,7 +12,7 @@ use mime::{Mime, TopLevel, SubLevel, Attr, Value}; use oauth2::{TokenType, Retry, self}; use hyper; use hyper::header::{ContentType, ContentLength, Headers, UserAgent, Authorization, Header, - HeaderFormat}; + HeaderFormat, Bearer}; use hyper::http::h1::LINE_ENDING; use hyper::method::Method; use hyper::status::StatusCode; @@ -634,7 +634,7 @@ pub struct ResumableUploadHelper<'a, A: 'a> { pub start_at: Option, pub auth: &'a mut A, pub user_agent: &'a str, - pub auth_header: Authorization, + pub auth_header: Authorization, pub url: &'a str, pub reader: &'a mut ReadSeek, pub media_type: Mime, diff --git a/gen/groupssettings1/src/lib.rs b/gen/groupssettings1/src/lib.rs index 8db6f85ca1..7fb4abd7a0 100644 --- a/gen/groupssettings1/src/lib.rs +++ b/gen/groupssettings1/src/lib.rs @@ -2,7 +2,7 @@ // This file was generated automatically from 'src/mako/api/lib.rs.mako' // DO NOT EDIT ! -//! This documentation was generated from *groupssettings* crate version *0.1.12+20140428*, where *20140428* is the exact revision of the *groupssettings:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.12*. +//! This documentation was generated from *groupssettings* crate version *0.1.13+20160323*, where *20160323* is the exact revision of the *groupssettings:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.13*. //! //! Everything else about the *groupssettings* *v1* API can be found at the //! [official documentation site](https://developers.google.com/google-apps/groups-settings/get_started). diff --git a/gen/groupssettings1/src/lib.rs.in b/gen/groupssettings1/src/lib.rs.in index 2cd5b0334b..d7caebb5ed 100644 --- a/gen/groupssettings1/src/lib.rs.in +++ b/gen/groupssettings1/src/lib.rs.in @@ -133,7 +133,7 @@ impl<'a, C, A> Groupssettings Groupssettings { client: RefCell::new(client), auth: RefCell::new(authenticator), - _user_agent: "google-api-rust-client/0.1.12".to_string(), + _user_agent: "google-api-rust-client/0.1.13".to_string(), } } @@ -142,7 +142,7 @@ impl<'a, C, A> Groupssettings } /// Set the user-agent header field to use in all requests to the server. - /// It defaults to `google-api-rust-client/0.1.12`. + /// It defaults to `google-api-rust-client/0.1.13`. /// /// Returns the previously set user-agent. pub fn user_agent(&mut self, agent_name: String) -> String { @@ -186,7 +186,7 @@ pub struct Groups { /// Should the member be notified if his message is denied by owner. #[serde(rename="sendMessageDenyNotification")] pub send_message_deny_notification: Option, - /// Permission to contact owner of the group via web UI. Possbile values are: ANYONE_CAN_CONTACT ALL_IN_DOMAIN_CAN_CONTACT ALL_MEMBERS_CAN_CONTACT ALL_MANAGERS_CAN_CONTACT + /// Permission to contact owner of the group via web UI. Possible values are: ANYONE_CAN_CONTACT ALL_IN_DOMAIN_CAN_CONTACT ALL_MEMBERS_CAN_CONTACT ALL_MANAGERS_CAN_CONTACT #[serde(rename="whoCanContactOwner")] pub who_can_contact_owner: Option, /// Default message display font. Possible values are: DEFAULT_FONT FIXED_WIDTH_FONT @@ -195,16 +195,19 @@ pub struct Groups { /// If the contents of the group are archived. #[serde(rename="isArchived")] pub is_archived: Option, + /// Permissions to add members. Possible values are: ALL_MANAGERS_CAN_ADD ALL_MEMBERS_CAN_ADD NONE_CAN_ADD + #[serde(rename="whoCanAdd")] + pub who_can_add: Option, /// Permissions to post messages to the group. Possible values are: NONE_CAN_POST ALL_MANAGERS_CAN_POST ALL_MEMBERS_CAN_POST ALL_IN_DOMAIN_CAN_POST ANYONE_CAN_POST #[serde(rename="whoCanPostMessage")] pub who_can_post_message: Option, /// Primary language for the group. #[serde(rename="primaryLanguage")] pub primary_language: Option, - /// Permissions to view membership. Possbile values are: ALL_IN_DOMAIN_CAN_VIEW ALL_MEMBERS_CAN_VIEW ALL_MANAGERS_CAN_VIEW + /// Permissions to view membership. Possible values are: ALL_IN_DOMAIN_CAN_VIEW ALL_MEMBERS_CAN_VIEW ALL_MANAGERS_CAN_VIEW #[serde(rename="whoCanViewMembership")] pub who_can_view_membership: Option, - /// Permissions to invite members. Possbile values are: ALL_MEMBERS_CAN_INVITE ALL_MANAGERS_CAN_INVITE + /// Permissions to invite members. Possible values are: ALL_MEMBERS_CAN_INVITE ALL_MANAGERS_CAN_INVITE NONE_CAN_INVITE #[serde(rename="whoCanInvite")] pub who_can_invite: Option, /// Permissions to join the group. Possible values are: ANYONE_CAN_JOIN ALL_IN_DOMAIN_CAN_JOIN INVITED_CAN_JOIN CAN_REQUEST_TO_JOIN @@ -220,7 +223,7 @@ pub struct Groups { /// Default message deny notification message #[serde(rename="defaultMessageDenyNotificationText")] pub default_message_deny_notification_text: Option, - /// Permissions to view group. Possbile values are: ANYONE_CAN_VIEW ALL_IN_DOMAIN_CAN_VIEW ALL_MEMBERS_CAN_VIEW ALL_MANAGERS_CAN_VIEW + /// Permissions to view group. Possible values are: ANYONE_CAN_VIEW ALL_IN_DOMAIN_CAN_VIEW ALL_MEMBERS_CAN_VIEW ALL_MANAGERS_CAN_VIEW #[serde(rename="whoCanViewGroup")] pub who_can_view_group: Option, /// If this groups should be included in global address list or not. @@ -232,7 +235,7 @@ pub struct Groups { /// Is the group listed in groups directory #[serde(rename="showInGroupDirectory")] pub show_in_group_directory: Option, - /// Permission to leave the group. Possible values are: ALL_MANAGERS_CAN_LEAVE ALL_MEMBERS_CAN_LEAVE + /// Permission to leave the group. Possible values are: ALL_MANAGERS_CAN_LEAVE ALL_MEMBERS_CAN_LEAVE NONE_CAN_LEAVE #[serde(rename="whoCanLeaveGroup")] pub who_can_leave_group: Option, /// Can members post using the group email address. @@ -417,7 +420,7 @@ impl<'a, C, A> GroupUpdateCall<'a, C, A> where C: BorrowMut, A: o /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Groups)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -497,8 +500,7 @@ impl<'a, C, A> GroupUpdateCall<'a, C, A> where C: BorrowMut, A: o } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -684,7 +686,7 @@ impl<'a, C, A> GroupPatchCall<'a, C, A> where C: BorrowMut, A: oa /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Groups)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -764,8 +766,7 @@ impl<'a, C, A> GroupPatchCall<'a, C, A> where C: BorrowMut, A: oa } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -944,7 +945,7 @@ impl<'a, C, A> GroupGetCall<'a, C, A> where C: BorrowMut, A: oaut /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Groups)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -1013,8 +1014,7 @@ impl<'a, C, A> GroupGetCall<'a, C, A> where C: BorrowMut, A: oaut } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) diff --git a/gen/iam1-cli/Cargo.toml b/gen/iam1-cli/Cargo.toml index b71c894f57..7671ee3760 100644 --- a/gen/iam1-cli/Cargo.toml +++ b/gen/iam1-cli/Cargo.toml @@ -4,7 +4,7 @@ [package] name = "google-iam1-cli" -version = "0.3.3+20160129" +version = "0.3.4+20160129" authors = ["Sebastian Thiel "] description = "A complete library to interact with iam (protocol v1)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/iam1-cli" @@ -17,18 +17,18 @@ keywords = ["iam", "google", "cli"] name = "iam1" [dependencies] -hyper = "0.7" -mime = "0.1.0" -serde = ">= 0.7.0" -serde_json = ">= 0.7.0" -yup-oauth2 = ">= 0.5.4" +hyper = "0.8" +mime = "0.2.0" +serde = "0.6.0" +serde_json = "0.6.0" +yup-oauth2 = ">= 0.5.6" strsim = "0.4" yup-hyper-mock = "1.0" clap = "2.0" [build-dependencies] -syntex = { version = ">= 0.23" } -serde_codegen = { version = ">= 0.6" } +syntex = { version = "= 0.28" } +serde_codegen = { version = "= 0.6.13" } [dependencies.google-iam1] diff --git a/gen/iam1-cli/README.md b/gen/iam1-cli/README.md index 3cf7a19e84..cc2539a77f 100644 --- a/gen/iam1-cli/README.md +++ b/gen/iam1-cli/README.md @@ -17,14 +17,14 @@ Everything else about the *iam* API can be found at the You can download the pre-compiled 64bit binaries for the following platforms: -* ![icon](http://megaicons.net/static/img/icons_sizes/6/140/16/ubuntu-icon.png) [ubuntu](http://dl.byronimo.de/google.rs/cli/0.3.3/ubuntu/iam1.tar.gz) -* ![icon](http://hydra-media.cursecdn.com/wow.gamepedia.com/a/a2/Apple-icon-16x16.png?version=25ddd67ac3dd3b634478e3978b76cb74) [osx](http://dl.byronimo.de/google.rs/cli/0.3.3/osx/iam1.tar.gz) +* ![icon](http://megaicons.net/static/img/icons_sizes/6/140/16/ubuntu-icon.png) [ubuntu](http://dl.byronimo.de/google.rs/cli/0.3.4/ubuntu/iam1.tar.gz) +* ![icon](http://hydra-media.cursecdn.com/wow.gamepedia.com/a/a2/Apple-icon-16x16.png?version=25ddd67ac3dd3b634478e3978b76cb74) [osx](http://dl.byronimo.de/google.rs/cli/0.3.4/osx/iam1.tar.gz) Find the source code [on github](https://github.com/Byron/google-apis-rs/tree/master/gen/iam1-cli). # Usage -This documentation was generated from the *iam* API at revision *20160129*. The CLI is at version *0.3.3*. +This documentation was generated from the *iam* API at revision *20160129*. The CLI is at version *0.3.4*. ```bash iam1 [options] diff --git a/gen/iam1-cli/mkdocs.yml b/gen/iam1-cli/mkdocs.yml index 55cc5b72a7..9dcb9607b4 100644 --- a/gen/iam1-cli/mkdocs.yml +++ b/gen/iam1-cli/mkdocs.yml @@ -1,4 +1,4 @@ -site_name: iam v0.3.3+20160129 +site_name: iam v0.3.4+20160129 site_url: http://byron.github.io/google-apis-rs/google-iam1-cli site_description: Write integrating applications with bcore diff --git a/gen/iam1-cli/src/cmn.rs b/gen/iam1-cli/src/cmn.rs index 188159ee80..ae86fdef65 100644 --- a/gen/iam1-cli/src/cmn.rs +++ b/gen/iam1-cli/src/cmn.rs @@ -414,7 +414,7 @@ impl TokenStorage for JsonTokenStorage { Err(err) => match err.kind() { io::ErrorKind::NotFound => Ok(()), - _ => Err(json::Error::Io(err)) + _ => Err(json::Error::IoError(err)) }, Ok(_) => Ok(()), } @@ -427,7 +427,7 @@ impl TokenStorage for JsonTokenStorage { Err(serde_err) => Err(serde_err), } }, - Err(io_err) => Err(json::Error::Io(io_err)) + Err(io_err) => Err(json::Error::IoError(io_err)) } } } @@ -444,7 +444,7 @@ impl TokenStorage for JsonTokenStorage { Err(io_err) => { match io_err.kind() { io::ErrorKind::NotFound => Ok(None), - _ => Err(json::Error::Io(io_err)) + _ => Err(json::Error::IoError(io_err)) } } } @@ -683,7 +683,7 @@ pub fn application_secret_from_directory(dir: &str, = json::from_str(json_console_secret).unwrap(); match json::to_writer_pretty(&mut f, &console_secret) { Err(serde_err) => match serde_err { - json::Error::Io(err) => err, + json::Error::IoError(err) => err, _ => panic!("Unexpected serde error: {:#?}", serde_err) }, Ok(_) => continue, @@ -696,7 +696,7 @@ pub fn application_secret_from_directory(dir: &str, }, Ok(f) => { match json::de::from_reader::<_, ConsoleApplicationSecret>(f) { - Err(json::Error::Io(err)) => + Err(json::Error::IoError(err)) => return secret_io_error(err), Err(json_err) => return Err(CLIError::Configuration( diff --git a/gen/iam1-cli/src/main.rs b/gen/iam1-cli/src/main.rs index bae752fd87..eb5ea57965 100644 --- a/gen/iam1-cli/src/main.rs +++ b/gen/iam1-cli/src/main.rs @@ -1411,7 +1411,7 @@ fn main() { let mut app = App::new("iam1") .author("Sebastian Thiel ") - .version("0.3.3+20160129") + .version("0.3.4+20160129") .about("Manages identity and access control for Google Cloud Platform resources, including the creation of service accounts, which you can use to authenticate to Google and make API calls.") .after_help("All documentation details can be found at http://byron.github.io/google-apis-rs/google_iam1_cli") .arg(Arg::with_name("url") diff --git a/gen/iam1/Cargo.toml b/gen/iam1/Cargo.toml index 760adf09ce..7153178b3e 100644 --- a/gen/iam1/Cargo.toml +++ b/gen/iam1/Cargo.toml @@ -4,7 +4,7 @@ [package] name = "google-iam1" -version = "0.1.12+20160129" +version = "0.1.13+20160129" authors = ["Sebastian Thiel "] description = "A complete library to interact with iam (protocol v1)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/iam1" @@ -16,14 +16,14 @@ build = "src/build.rs" [dependencies] -hyper = "0.7" -mime = "0.1.0" -serde = ">= 0.7.0" -serde_json = ">= 0.7.0" -yup-oauth2 = ">= 0.5.4" +hyper = "0.8" +mime = "0.2.0" +serde = "0.6.0" +serde_json = "0.6.0" +yup-oauth2 = ">= 0.5.6" url = ">= 0.5" [build-dependencies] -syntex = { version = ">= 0.23" } -serde_codegen = { version = ">= 0.6" } +syntex = { version = "= 0.28" } +serde_codegen = { version = "= 0.6.13" } diff --git a/gen/iam1/README.md b/gen/iam1/README.md index 2aa345343d..a45c204b12 100644 --- a/gen/iam1/README.md +++ b/gen/iam1/README.md @@ -5,7 +5,7 @@ DO NOT EDIT ! --> The `google-iam1` library allows access to all features of the *Google iam* service. -This documentation was generated from *iam* crate version *0.1.12+20160129*, where *20160129* is the exact revision of the *iam:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.12*. +This documentation was generated from *iam* crate version *0.1.13+20160129*, where *20160129* is the exact revision of the *iam:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.13*. Everything else about the *iam* *v1* API can be found at the [official documentation site](https://cloud.google.com/iam/). diff --git a/gen/iam1/src/cmn.rs b/gen/iam1/src/cmn.rs index 87b91a8986..c69621da55 100644 --- a/gen/iam1/src/cmn.rs +++ b/gen/iam1/src/cmn.rs @@ -12,7 +12,7 @@ use mime::{Mime, TopLevel, SubLevel, Attr, Value}; use oauth2::{TokenType, Retry, self}; use hyper; use hyper::header::{ContentType, ContentLength, Headers, UserAgent, Authorization, Header, - HeaderFormat}; + HeaderFormat, Bearer}; use hyper::http::h1::LINE_ENDING; use hyper::method::Method; use hyper::status::StatusCode; @@ -634,7 +634,7 @@ pub struct ResumableUploadHelper<'a, A: 'a> { pub start_at: Option, pub auth: &'a mut A, pub user_agent: &'a str, - pub auth_header: Authorization, + pub auth_header: Authorization, pub url: &'a str, pub reader: &'a mut ReadSeek, pub media_type: Mime, diff --git a/gen/iam1/src/lib.rs b/gen/iam1/src/lib.rs index 0b7acba276..6984290d9a 100644 --- a/gen/iam1/src/lib.rs +++ b/gen/iam1/src/lib.rs @@ -2,7 +2,7 @@ // This file was generated automatically from 'src/mako/api/lib.rs.mako' // DO NOT EDIT ! -//! This documentation was generated from *iam* crate version *0.1.12+20160129*, where *20160129* is the exact revision of the *iam:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.12*. +//! This documentation was generated from *iam* crate version *0.1.13+20160129*, where *20160129* is the exact revision of the *iam:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.13*. //! //! Everything else about the *iam* *v1* API can be found at the //! [official documentation site](https://cloud.google.com/iam/). diff --git a/gen/iam1/src/lib.rs.in b/gen/iam1/src/lib.rs.in index d1df821a59..ea67f84183 100644 --- a/gen/iam1/src/lib.rs.in +++ b/gen/iam1/src/lib.rs.in @@ -133,7 +133,7 @@ impl<'a, C, A> Iam Iam { client: RefCell::new(client), auth: RefCell::new(authenticator), - _user_agent: "google-api-rust-client/0.1.12".to_string(), + _user_agent: "google-api-rust-client/0.1.13".to_string(), } } @@ -142,7 +142,7 @@ impl<'a, C, A> Iam } /// Set the user-agent header field to use in all requests to the server. - /// It defaults to `google-api-rust-client/0.1.12`. + /// It defaults to `google-api-rust-client/0.1.13`. /// /// Returns the previously set user-agent. pub fn user_agent(&mut self, agent_name: String) -> String { @@ -898,7 +898,7 @@ impl<'a, C, A> ProjectServiceAccountKeyListCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, ListServiceAccountKeysResponse)> { use url::percent_encoding::{percent_encode, FORM_URLENCODED_ENCODE_SET}; use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -975,8 +975,7 @@ impl<'a, C, A> ProjectServiceAccountKeyListCall<'a, C, A> where C: BorrowMut ProjectServiceAccountSetIamPolicyCall<'a, C, A> where C: BorrowMu pub fn doit(mut self) -> Result<(hyper::client::Response, Policy)> { use url::percent_encoding::{percent_encode, FORM_URLENCODED_ENCODE_SET}; use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -1247,8 +1246,7 @@ impl<'a, C, A> ProjectServiceAccountSetIamPolicyCall<'a, C, A> where C: BorrowMu } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -1434,7 +1432,7 @@ impl<'a, C, A> ProjectServiceAccountKeyDeleteCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, Empty)> { use url::percent_encoding::{percent_encode, FORM_URLENCODED_ENCODE_SET}; use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -1506,8 +1504,7 @@ impl<'a, C, A> ProjectServiceAccountKeyDeleteCall<'a, C, A> where C: BorrowMut ProjectServiceAccountKeyCreateCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, ServiceAccountKey)> { use url::percent_encoding::{percent_encode, FORM_URLENCODED_ENCODE_SET}; use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -1770,8 +1767,7 @@ impl<'a, C, A> ProjectServiceAccountKeyCreateCall<'a, C, A> where C: BorrowMut ProjectServiceAccountSignBlobCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, SignBlobResponse)> { use url::percent_encoding::{percent_encode, FORM_URLENCODED_ENCODE_SET}; use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -2047,8 +2043,7 @@ impl<'a, C, A> ProjectServiceAccountSignBlobCall<'a, C, A> where C: BorrowMut ProjectServiceAccountUpdateCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, ServiceAccount)> { use url::percent_encoding::{percent_encode, FORM_URLENCODED_ENCODE_SET}; use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -2324,8 +2319,7 @@ impl<'a, C, A> ProjectServiceAccountUpdateCall<'a, C, A> where C: BorrowMut ProjectServiceAccountListCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, ListServiceAccountsResponse)> { use url::percent_encoding::{percent_encode, FORM_URLENCODED_ENCODE_SET}; use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -2593,8 +2587,7 @@ impl<'a, C, A> ProjectServiceAccountListCall<'a, C, A> where C: BorrowMut ProjectServiceAccountDeleteCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, Empty)> { use url::percent_encoding::{percent_encode, FORM_URLENCODED_ENCODE_SET}; use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -2853,8 +2846,7 @@ impl<'a, C, A> ProjectServiceAccountDeleteCall<'a, C, A> where C: BorrowMut ProjectServiceAccountKeyGetCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, ServiceAccountKey)> { use url::percent_encoding::{percent_encode, FORM_URLENCODED_ENCODE_SET}; use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -3099,8 +3091,7 @@ impl<'a, C, A> ProjectServiceAccountKeyGetCall<'a, C, A> where C: BorrowMut ProjectServiceAccountGetIamPolicyCall<'a, C, A> where C: BorrowMu pub fn doit(mut self) -> Result<(hyper::client::Response, Policy)> { use url::percent_encoding::{percent_encode, FORM_URLENCODED_ENCODE_SET}; use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -3345,8 +3336,7 @@ impl<'a, C, A> ProjectServiceAccountGetIamPolicyCall<'a, C, A> where C: BorrowMu } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Post, &url) @@ -3526,7 +3516,7 @@ impl<'a, C, A> ProjectServiceAccountTestIamPermissionCall<'a, C, A> where C: Bor pub fn doit(mut self) -> Result<(hyper::client::Response, TestIamPermissionsResponse)> { use url::percent_encoding::{percent_encode, FORM_URLENCODED_ENCODE_SET}; use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -3609,8 +3599,7 @@ impl<'a, C, A> ProjectServiceAccountTestIamPermissionCall<'a, C, A> where C: Bor } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -3803,7 +3792,7 @@ impl<'a, C, A> ProjectServiceAccountCreateCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, ServiceAccount)> { use url::percent_encoding::{percent_encode, FORM_URLENCODED_ENCODE_SET}; use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -3886,8 +3875,7 @@ impl<'a, C, A> ProjectServiceAccountCreateCall<'a, C, A> where C: BorrowMut ProjectServiceAccountGetCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, ServiceAccount)> { use url::percent_encoding::{percent_encode, FORM_URLENCODED_ENCODE_SET}; use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -4145,8 +4133,7 @@ impl<'a, C, A> ProjectServiceAccountGetCall<'a, C, A> where C: BorrowMut"] description = "A complete library to interact with Identity Toolkit (protocol v3)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/identitytoolkit3-cli" @@ -17,18 +17,18 @@ keywords = ["identitytoolkit", "google", "cli"] name = "identitytoolkit3" [dependencies] -hyper = "0.7" -mime = "0.1.0" -serde = ">= 0.7.0" -serde_json = ">= 0.7.0" -yup-oauth2 = ">= 0.5.4" +hyper = "0.8" +mime = "0.2.0" +serde = "0.6.0" +serde_json = "0.6.0" +yup-oauth2 = ">= 0.5.6" strsim = "0.4" yup-hyper-mock = "1.0" clap = "2.0" [build-dependencies] -syntex = { version = ">= 0.23" } -serde_codegen = { version = ">= 0.6" } +syntex = { version = "= 0.28" } +serde_codegen = { version = "= 0.6.13" } [dependencies.google-identitytoolkit3] diff --git a/gen/identitytoolkit3-cli/README.md b/gen/identitytoolkit3-cli/README.md index 21cad9b05c..81262e7c55 100644 --- a/gen/identitytoolkit3-cli/README.md +++ b/gen/identitytoolkit3-cli/README.md @@ -17,14 +17,14 @@ Everything else about the *Identity Toolkit* API can be found at the You can download the pre-compiled 64bit binaries for the following platforms: -* ![icon](http://megaicons.net/static/img/icons_sizes/6/140/16/ubuntu-icon.png) [ubuntu](http://dl.byronimo.de/google.rs/cli/0.3.3/ubuntu/identitytoolkit3.tar.gz) -* ![icon](http://hydra-media.cursecdn.com/wow.gamepedia.com/a/a2/Apple-icon-16x16.png?version=25ddd67ac3dd3b634478e3978b76cb74) [osx](http://dl.byronimo.de/google.rs/cli/0.3.3/osx/identitytoolkit3.tar.gz) +* ![icon](http://megaicons.net/static/img/icons_sizes/6/140/16/ubuntu-icon.png) [ubuntu](http://dl.byronimo.de/google.rs/cli/0.3.4/ubuntu/identitytoolkit3.tar.gz) +* ![icon](http://hydra-media.cursecdn.com/wow.gamepedia.com/a/a2/Apple-icon-16x16.png?version=25ddd67ac3dd3b634478e3978b76cb74) [osx](http://dl.byronimo.de/google.rs/cli/0.3.4/osx/identitytoolkit3.tar.gz) Find the source code [on github](https://github.com/Byron/google-apis-rs/tree/master/gen/identitytoolkit3-cli). # Usage -This documentation was generated from the *Identity Toolkit* API at revision *20160216*. The CLI is at version *0.3.3*. +This documentation was generated from the *Identity Toolkit* API at revision *20160324*. The CLI is at version *0.3.4*. ```bash identitytoolkit3 [options] @@ -39,6 +39,7 @@ identitytoolkit3 [options] get-recaptcha-param [-p ]... [-o ] reset-password (-r )... [-p ]... [-o ] set-account-info (-r )... [-p ]... [-o ] + set-project-config (-r )... [-p ]... [-o ] sign-out-user (-r )... [-p ]... [-o ] signup-new-user (-r )... [-p ]... [-o ] upload-account (-r )... [-p ]... [-o ] diff --git a/gen/identitytoolkit3-cli/mkdocs.yml b/gen/identitytoolkit3-cli/mkdocs.yml index 50834fc9d4..1ebe537659 100644 --- a/gen/identitytoolkit3-cli/mkdocs.yml +++ b/gen/identitytoolkit3-cli/mkdocs.yml @@ -1,4 +1,4 @@ -site_name: Identity Toolkit v0.3.3+20160216 +site_name: Identity Toolkit v0.3.4+20160324 site_url: http://byron.github.io/google-apis-rs/google-identitytoolkit3-cli site_description: Write integrating applications with bcore @@ -19,6 +19,7 @@ pages: - ['relyingparty_get-recaptcha-param.md', 'Relyingparty', 'Get Recaptcha Param'] - ['relyingparty_reset-password.md', 'Relyingparty', 'Reset Password'] - ['relyingparty_set-account-info.md', 'Relyingparty', 'Set Account Info'] +- ['relyingparty_set-project-config.md', 'Relyingparty', 'Set Project Config'] - ['relyingparty_sign-out-user.md', 'Relyingparty', 'Sign Out User'] - ['relyingparty_signup-new-user.md', 'Relyingparty', 'Signup New User'] - ['relyingparty_upload-account.md', 'Relyingparty', 'Upload Account'] diff --git a/gen/identitytoolkit3-cli/src/cmn.rs b/gen/identitytoolkit3-cli/src/cmn.rs index 188159ee80..ae86fdef65 100644 --- a/gen/identitytoolkit3-cli/src/cmn.rs +++ b/gen/identitytoolkit3-cli/src/cmn.rs @@ -414,7 +414,7 @@ impl TokenStorage for JsonTokenStorage { Err(err) => match err.kind() { io::ErrorKind::NotFound => Ok(()), - _ => Err(json::Error::Io(err)) + _ => Err(json::Error::IoError(err)) }, Ok(_) => Ok(()), } @@ -427,7 +427,7 @@ impl TokenStorage for JsonTokenStorage { Err(serde_err) => Err(serde_err), } }, - Err(io_err) => Err(json::Error::Io(io_err)) + Err(io_err) => Err(json::Error::IoError(io_err)) } } } @@ -444,7 +444,7 @@ impl TokenStorage for JsonTokenStorage { Err(io_err) => { match io_err.kind() { io::ErrorKind::NotFound => Ok(None), - _ => Err(json::Error::Io(io_err)) + _ => Err(json::Error::IoError(io_err)) } } } @@ -683,7 +683,7 @@ pub fn application_secret_from_directory(dir: &str, = json::from_str(json_console_secret).unwrap(); match json::to_writer_pretty(&mut f, &console_secret) { Err(serde_err) => match serde_err { - json::Error::Io(err) => err, + json::Error::IoError(err) => err, _ => panic!("Unexpected serde error: {:#?}", serde_err) }, Ok(_) => continue, @@ -696,7 +696,7 @@ pub fn application_secret_from_directory(dir: &str, }, Ok(f) => { match json::de::from_reader::<_, ConsoleApplicationSecret>(f) { - Err(json::Error::Io(err)) => + Err(json::Error::IoError(err)) => return secret_io_error(err), Err(json_err) => return Err(CLIError::Configuration( diff --git a/gen/identitytoolkit3-cli/src/main.rs b/gen/identitytoolkit3-cli/src/main.rs index b559031069..2a976d62b9 100644 --- a/gen/identitytoolkit3-cli/src/main.rs +++ b/gen/identitytoolkit3-cli/src/main.rs @@ -159,10 +159,11 @@ impl<'n> Engine<'n> { let type_info: Option<(&'static str, JsonTypeInfo)> = match &temp_cursor.to_string()[..] { + "id-token" => Some(("idToken", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "delegated-project-number" => Some(("delegatedProjectNumber", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "local-id" => Some(("localId", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), _ => { - let suggestion = FieldCursor::did_you_mean(key, &vec!["delegated-project-number", "local-id"]); + let suggestion = FieldCursor::did_you_mean(key, &vec!["delegated-project-number", "id-token", "local-id"]); err.issues.push(CLIError::Field(FieldError::Unknown(temp_cursor.to_string(), suggestion, value.map(|v| v.to_string())))); None } @@ -327,10 +328,11 @@ impl<'n> Engine<'n> { let type_info: Option<(&'static str, JsonTypeInfo)> = match &temp_cursor.to_string()[..] { "id-token" => Some(("idToken", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "delegated-project-number" => Some(("delegatedProjectNumber", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "email" => Some(("email", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Vec })), "local-id" => Some(("localId", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Vec })), _ => { - let suggestion = FieldCursor::did_you_mean(key, &vec!["email", "id-token", "local-id"]); + let suggestion = FieldCursor::did_you_mean(key, &vec!["delegated-project-number", "email", "id-token", "local-id"]); err.issues.push(CLIError::Field(FieldError::Unknown(temp_cursor.to_string(), suggestion, value.map(|v| v.to_string())))); None } @@ -482,6 +484,12 @@ impl<'n> Engine<'n> { for parg in opt.values_of("v").map(|i|i.collect()).unwrap_or(Vec::new()).iter() { let (key, value) = parse_kv_arg(&*parg, err, false); match key { + "project-number" => { + call = call.project_number(value.unwrap_or("")); + }, + "delegated-project-number" => { + call = call.delegated_project_number(value.unwrap_or("")); + }, _ => { let mut found = false; for param in &self.gp { @@ -495,6 +503,7 @@ impl<'n> Engine<'n> { err.issues.push(CLIError::UnknownParameter(key.to_string(), {let mut v = Vec::new(); v.extend(self.gp.iter().map(|v|*v)); + v.extend(["delegated-project-number", "project-number"].iter().map(|v|*v)); v } )); } } @@ -731,6 +740,7 @@ impl<'n> Engine<'n> { let type_info: Option<(&'static str, JsonTypeInfo)> = match &temp_cursor.to_string()[..] { + "provider" => Some(("provider", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Vec })), "delegated-project-number" => Some(("delegatedProjectNumber", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "oob-code" => Some(("oobCode", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "local-id" => Some(("localId", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), @@ -738,17 +748,19 @@ impl<'n> Engine<'n> { "photo-url" => Some(("photoUrl", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "instance-id" => Some(("instanceId", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "id-token" => Some(("idToken", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "delete-attribute" => Some(("deleteAttribute", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Vec })), "upgrade-to-federated-login" => Some(("upgradeToFederatedLogin", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), - "provider" => Some(("provider", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Vec })), "disable-user" => Some(("disableUser", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), "email" => Some(("email", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "delete-provider" => Some(("deleteProvider", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Vec })), + "captcha-challenge" => Some(("captchaChallenge", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "captcha-response" => Some(("captchaResponse", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "email-verified" => Some(("emailVerified", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), - "display-name" => Some(("displayName", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "return-secure-token" => Some(("returnSecureToken", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), "password" => Some(("password", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), - "captcha-challenge" => Some(("captchaChallenge", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "display-name" => Some(("displayName", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), _ => { - let suggestion = FieldCursor::did_you_mean(key, &vec!["captcha-challenge", "captcha-response", "delegated-project-number", "disable-user", "display-name", "email", "email-verified", "id-token", "instance-id", "local-id", "oob-code", "password", "photo-url", "provider", "upgrade-to-federated-login", "valid-since"]); + let suggestion = FieldCursor::did_you_mean(key, &vec!["captcha-challenge", "captcha-response", "delegated-project-number", "delete-attribute", "delete-provider", "disable-user", "display-name", "email", "email-verified", "id-token", "instance-id", "local-id", "oob-code", "password", "photo-url", "provider", "return-secure-token", "upgrade-to-federated-login", "valid-since"]); err.issues.push(CLIError::Field(FieldError::Unknown(temp_cursor.to_string(), suggestion, value.map(|v| v.to_string())))); None } @@ -805,6 +817,116 @@ impl<'n> Engine<'n> { } } + fn _relyingparty_set_project_config(&self, opt: &ArgMatches<'n>, dry_run: bool, err: &mut InvalidOptionsError) + -> Result<(), DoitError> { + + let mut field_cursor = FieldCursor::default(); + let mut object = json::value::Value::Object(Default::default()); + + for kvarg in opt.values_of("kv").map(|i|i.collect()).unwrap_or(Vec::new()).iter() { + let last_errc = err.issues.len(); + let (key, value) = parse_kv_arg(&*kvarg, err, false); + let mut temp_cursor = field_cursor.clone(); + if let Err(field_err) = temp_cursor.set(&*key) { + err.issues.push(field_err); + } + if value.is_none() { + field_cursor = temp_cursor.clone(); + if err.issues.len() > last_errc { + err.issues.remove(last_errc); + } + continue; + } + + let type_info: Option<(&'static str, JsonTypeInfo)> = + match &temp_cursor.to_string()[..] { + "api-key" => Some(("apiKey", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "use-email-sending" => Some(("useEmailSending", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "verify-email-template.body" => Some(("verifyEmailTemplate.body", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "verify-email-template.from-display-name" => Some(("verifyEmailTemplate.fromDisplayName", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "verify-email-template.from" => Some(("verifyEmailTemplate.from", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "verify-email-template.format" => Some(("verifyEmailTemplate.format", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "verify-email-template.reply-to" => Some(("verifyEmailTemplate.replyTo", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "verify-email-template.subject" => Some(("verifyEmailTemplate.subject", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "enable-anonymous-user" => Some(("enableAnonymousUser", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "reset-password-template.body" => Some(("resetPasswordTemplate.body", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "reset-password-template.from-display-name" => Some(("resetPasswordTemplate.fromDisplayName", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "reset-password-template.from" => Some(("resetPasswordTemplate.from", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "reset-password-template.format" => Some(("resetPasswordTemplate.format", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "reset-password-template.reply-to" => Some(("resetPasswordTemplate.replyTo", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "reset-password-template.subject" => Some(("resetPasswordTemplate.subject", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "legacy-reset-password-template.body" => Some(("legacyResetPasswordTemplate.body", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "legacy-reset-password-template.from-display-name" => Some(("legacyResetPasswordTemplate.fromDisplayName", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "legacy-reset-password-template.from" => Some(("legacyResetPasswordTemplate.from", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "legacy-reset-password-template.format" => Some(("legacyResetPasswordTemplate.format", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "legacy-reset-password-template.reply-to" => Some(("legacyResetPasswordTemplate.replyTo", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "legacy-reset-password-template.subject" => Some(("legacyResetPasswordTemplate.subject", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "delegated-project-number" => Some(("delegatedProjectNumber", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "allow-password-user" => Some(("allowPasswordUser", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "change-email-template.body" => Some(("changeEmailTemplate.body", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "change-email-template.from-display-name" => Some(("changeEmailTemplate.fromDisplayName", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "change-email-template.from" => Some(("changeEmailTemplate.from", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "change-email-template.format" => Some(("changeEmailTemplate.format", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "change-email-template.reply-to" => Some(("changeEmailTemplate.replyTo", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "change-email-template.subject" => Some(("changeEmailTemplate.subject", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + _ => { + let suggestion = FieldCursor::did_you_mean(key, &vec!["allow-password-user", "api-key", "body", "change-email-template", "delegated-project-number", "enable-anonymous-user", "format", "from", "from-display-name", "legacy-reset-password-template", "reply-to", "reset-password-template", "subject", "use-email-sending", "verify-email-template"]); + err.issues.push(CLIError::Field(FieldError::Unknown(temp_cursor.to_string(), suggestion, value.map(|v| v.to_string())))); + None + } + }; + if let Some((field_cursor_str, type_info)) = type_info { + FieldCursor::from(field_cursor_str).set_json_value(&mut object, value.unwrap(), type_info, err, &temp_cursor); + } + } + let mut request: api::IdentitytoolkitRelyingpartySetProjectConfigRequest = json::value::from_value(object).unwrap(); + let mut call = self.hub.relyingparty().set_project_config(request); + for parg in opt.values_of("v").map(|i|i.collect()).unwrap_or(Vec::new()).iter() { + let (key, value) = parse_kv_arg(&*parg, err, false); + match key { + _ => { + let mut found = false; + for param in &self.gp { + if key == *param { + found = true; + call = call.param(self.gpm.iter().find(|t| t.0 == key).unwrap_or(&("", key)).1, value.unwrap_or("unset")); + break; + } + } + if !found { + err.issues.push(CLIError::UnknownParameter(key.to_string(), + {let mut v = Vec::new(); + v.extend(self.gp.iter().map(|v|*v)); + v } )); + } + } + } + } + let protocol = CallType::Standard; + if dry_run { + Ok(()) + } else { + assert!(err.issues.len() == 0); + let mut ostream = match writer_from_opts(opt.value_of("out")) { + Ok(mut f) => f, + Err(io_err) => return Err(DoitError::IoError(opt.value_of("out").unwrap_or("-").to_string(), io_err)), + }; + match match protocol { + CallType::Standard => call.doit(), + _ => unreachable!() + } { + Err(api_err) => Err(DoitError::ApiError(api_err)), + Ok((mut response, output_schema)) => { + let mut value = json::value::to_value(&output_schema); + remove_json_null_values(&mut value); + json::to_writer_pretty(&mut ostream, &value).unwrap(); + ostream.flush().unwrap(); + Ok(()) + } + } + } + } + fn _relyingparty_sign_out_user(&self, opt: &ArgMatches<'n>, dry_run: bool, err: &mut InvalidOptionsError) -> Result<(), DoitError> { @@ -911,15 +1033,16 @@ impl<'n> Engine<'n> { let type_info: Option<(&'static str, JsonTypeInfo)> = match &temp_cursor.to_string()[..] { - "instance-id" => Some(("instanceId", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "display-name" => Some(("displayName", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), - "captcha-response" => Some(("captchaResponse", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), - "id-token" => Some(("idToken", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "captcha-challenge" => Some(("captchaChallenge", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "instance-id" => Some(("instanceId", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "id-token" => Some(("idToken", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "captcha-response" => Some(("captchaResponse", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "return-secure-token" => Some(("returnSecureToken", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), "password" => Some(("password", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "email" => Some(("email", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), _ => { - let suggestion = FieldCursor::did_you_mean(key, &vec!["captcha-challenge", "captcha-response", "display-name", "email", "id-token", "instance-id", "password"]); + let suggestion = FieldCursor::did_you_mean(key, &vec!["captcha-challenge", "captcha-response", "display-name", "email", "id-token", "instance-id", "password", "return-secure-token"]); err.issues.push(CLIError::Field(FieldError::Unknown(temp_cursor.to_string(), suggestion, value.map(|v| v.to_string())))); None } @@ -1093,9 +1216,10 @@ impl<'n> Engine<'n> { "pending-id-token" => Some(("pendingIdToken", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "session-id" => Some(("sessionId", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "request-uri" => Some(("requestUri", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "return-secure-token" => Some(("returnSecureToken", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), "return-refresh-token" => Some(("returnRefreshToken", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), _ => { - let suggestion = FieldCursor::did_you_mean(key, &vec!["delegated-project-number", "id-token", "instance-id", "pending-id-token", "post-body", "request-uri", "return-refresh-token", "session-id"]); + let suggestion = FieldCursor::did_you_mean(key, &vec!["delegated-project-number", "id-token", "instance-id", "pending-id-token", "post-body", "request-uri", "return-refresh-token", "return-secure-token", "session-id"]); err.issues.push(CLIError::Field(FieldError::Unknown(temp_cursor.to_string(), suggestion, value.map(|v| v.to_string())))); None } @@ -1176,9 +1300,10 @@ impl<'n> Engine<'n> { let type_info: Option<(&'static str, JsonTypeInfo)> = match &temp_cursor.to_string()[..] { "instance-id" => Some(("instanceId", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "return-secure-token" => Some(("returnSecureToken", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), "token" => Some(("token", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), _ => { - let suggestion = FieldCursor::did_you_mean(key, &vec!["instance-id", "token"]); + let suggestion = FieldCursor::did_you_mean(key, &vec!["instance-id", "return-secure-token", "token"]); err.issues.push(CLIError::Field(FieldError::Unknown(temp_cursor.to_string(), suggestion, value.map(|v| v.to_string())))); None } @@ -1264,10 +1389,11 @@ impl<'n> Engine<'n> { "id-token" => Some(("idToken", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "pending-id-token" => Some(("pendingIdToken", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "captcha-response" => Some(("captchaResponse", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "return-secure-token" => Some(("returnSecureToken", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), "password" => Some(("password", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "email" => Some(("email", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), _ => { - let suggestion = FieldCursor::did_you_mean(key, &vec!["captcha-challenge", "captcha-response", "delegated-project-number", "email", "id-token", "instance-id", "password", "pending-id-token"]); + let suggestion = FieldCursor::did_you_mean(key, &vec!["captcha-challenge", "captcha-response", "delegated-project-number", "email", "id-token", "instance-id", "password", "pending-id-token", "return-secure-token"]); err.issues.push(CLIError::Field(FieldError::Unknown(temp_cursor.to_string(), suggestion, value.map(|v| v.to_string())))); None } @@ -1361,6 +1487,9 @@ impl<'n> Engine<'n> { ("set-account-info", Some(opt)) => { call_result = self._relyingparty_set_account_info(opt, dry_run, &mut err); }, + ("set-project-config", Some(opt)) => { + call_result = self._relyingparty_set_project_config(opt, dry_run, &mut err); + }, ("sign-out-user", Some(opt)) => { call_result = self._relyingparty_sign_out_user(opt, dry_run, &mut err); }, @@ -1467,7 +1596,7 @@ impl<'n> Engine<'n> { fn main() { let mut exit_status = 0i32; let arg_data = [ - ("relyingparty", "methods: 'create-auth-uri', 'delete-account', 'download-account', 'get-account-info', 'get-oob-confirmation-code', 'get-project-config', 'get-public-keys', 'get-recaptcha-param', 'reset-password', 'set-account-info', 'sign-out-user', 'signup-new-user', 'upload-account', 'verify-assertion', 'verify-custom-token' and 'verify-password'", vec![ + ("relyingparty", "methods: 'create-auth-uri', 'delete-account', 'download-account', 'get-account-info', 'get-oob-confirmation-code', 'get-project-config', 'get-public-keys', 'get-recaptcha-param', 'reset-password', 'set-account-info', 'set-project-config', 'sign-out-user', 'signup-new-user', 'upload-account', 'verify-assertion', 'verify-custom-token' and 'verify-password'", vec![ ("create-auth-uri", Some(r##"Creates the URI used by the IdP to authenticate the user."##), "Details at http://byron.github.io/google-apis-rs/google_identitytoolkit3_cli/relyingparty_create-auth-uri", @@ -1664,6 +1793,28 @@ fn main() { Some(false), Some(true)), + (Some(r##"out"##), + Some(r##"o"##), + Some(r##"Specify the file into which to write the program's output"##), + Some(false), + Some(false)), + ]), + ("set-project-config", + Some(r##"Set project configuration."##), + "Details at http://byron.github.io/google-apis-rs/google_identitytoolkit3_cli/relyingparty_set-project-config", + vec![ + (Some(r##"kv"##), + Some(r##"r"##), + Some(r##"Set various fields of the request structure, matching the key=value form"##), + Some(true), + Some(true)), + + (Some(r##"v"##), + Some(r##"p"##), + Some(r##"Set various optional parameters, matching the key=value form"##), + Some(false), + Some(true)), + (Some(r##"out"##), Some(r##"o"##), Some(r##"Specify the file into which to write the program's output"##), @@ -1808,7 +1959,7 @@ fn main() { let mut app = App::new("identitytoolkit3") .author("Sebastian Thiel ") - .version("0.3.3+20160216") + .version("0.3.4+20160324") .about("Help the third party sites to implement federated login.") .after_help("All documentation details can be found at http://byron.github.io/google-apis-rs/google_identitytoolkit3_cli") .arg(Arg::with_name("folder") diff --git a/gen/identitytoolkit3/Cargo.toml b/gen/identitytoolkit3/Cargo.toml index 8bc5d7c409..fc352a2db0 100644 --- a/gen/identitytoolkit3/Cargo.toml +++ b/gen/identitytoolkit3/Cargo.toml @@ -4,7 +4,7 @@ [package] name = "google-identitytoolkit3" -version = "0.1.12+20160216" +version = "0.1.13+20160324" authors = ["Sebastian Thiel "] description = "A complete library to interact with Identity Toolkit (protocol v3)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/identitytoolkit3" @@ -16,14 +16,14 @@ build = "src/build.rs" [dependencies] -hyper = "0.7" -mime = "0.1.0" -serde = ">= 0.7.0" -serde_json = ">= 0.7.0" -yup-oauth2 = ">= 0.5.4" +hyper = "0.8" +mime = "0.2.0" +serde = "0.6.0" +serde_json = "0.6.0" +yup-oauth2 = ">= 0.5.6" url = ">= 0.5" [build-dependencies] -syntex = { version = ">= 0.23" } -serde_codegen = { version = ">= 0.6" } +syntex = { version = "= 0.28" } +serde_codegen = { version = "= 0.6.13" } diff --git a/gen/identitytoolkit3/README.md b/gen/identitytoolkit3/README.md index da824f09bd..621ceb6c78 100644 --- a/gen/identitytoolkit3/README.md +++ b/gen/identitytoolkit3/README.md @@ -5,7 +5,7 @@ DO NOT EDIT ! --> The `google-identitytoolkit3` library allows access to all features of the *Google Identity Toolkit* service. -This documentation was generated from *Identity Toolkit* crate version *0.1.12+20160216*, where *20160216* is the exact revision of the *identitytoolkit:v3* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.12*. +This documentation was generated from *Identity Toolkit* crate version *0.1.13+20160324*, where *20160324* is the exact revision of the *identitytoolkit:v3* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.13*. Everything else about the *Identity Toolkit* *v3* API can be found at the [official documentation site](https://developers.google.com/identity-toolkit/v3/). @@ -14,7 +14,7 @@ Everything else about the *Identity Toolkit* *v3* API can be found at the Handle the following *Resources* with ease from the central [hub](http://byron.github.io/google-apis-rs/google_identitytoolkit3/struct.IdentityToolkit.html) ... * [relyingparty](http://byron.github.io/google-apis-rs/google_identitytoolkit3/struct.Relyingparty.html) - * [*create auth uri*](http://byron.github.io/google-apis-rs/google_identitytoolkit3/struct.RelyingpartyCreateAuthUriCall.html), [*delete account*](http://byron.github.io/google-apis-rs/google_identitytoolkit3/struct.RelyingpartyDeleteAccountCall.html), [*download account*](http://byron.github.io/google-apis-rs/google_identitytoolkit3/struct.RelyingpartyDownloadAccountCall.html), [*get account info*](http://byron.github.io/google-apis-rs/google_identitytoolkit3/struct.RelyingpartyGetAccountInfoCall.html), [*get oob confirmation code*](http://byron.github.io/google-apis-rs/google_identitytoolkit3/struct.RelyingpartyGetOobConfirmationCodeCall.html), [*get project config*](http://byron.github.io/google-apis-rs/google_identitytoolkit3/struct.RelyingpartyGetProjectConfigCall.html), [*get public keys*](http://byron.github.io/google-apis-rs/google_identitytoolkit3/struct.RelyingpartyGetPublicKeyCall.html), [*get recaptcha param*](http://byron.github.io/google-apis-rs/google_identitytoolkit3/struct.RelyingpartyGetRecaptchaParamCall.html), [*reset password*](http://byron.github.io/google-apis-rs/google_identitytoolkit3/struct.RelyingpartyResetPasswordCall.html), [*set account info*](http://byron.github.io/google-apis-rs/google_identitytoolkit3/struct.RelyingpartySetAccountInfoCall.html), [*sign out user*](http://byron.github.io/google-apis-rs/google_identitytoolkit3/struct.RelyingpartySignOutUserCall.html), [*signup new user*](http://byron.github.io/google-apis-rs/google_identitytoolkit3/struct.RelyingpartySignupNewUserCall.html), [*upload account*](http://byron.github.io/google-apis-rs/google_identitytoolkit3/struct.RelyingpartyUploadAccountCall.html), [*verify assertion*](http://byron.github.io/google-apis-rs/google_identitytoolkit3/struct.RelyingpartyVerifyAssertionCall.html), [*verify custom token*](http://byron.github.io/google-apis-rs/google_identitytoolkit3/struct.RelyingpartyVerifyCustomTokenCall.html) and [*verify password*](http://byron.github.io/google-apis-rs/google_identitytoolkit3/struct.RelyingpartyVerifyPasswordCall.html) + * [*create auth uri*](http://byron.github.io/google-apis-rs/google_identitytoolkit3/struct.RelyingpartyCreateAuthUriCall.html), [*delete account*](http://byron.github.io/google-apis-rs/google_identitytoolkit3/struct.RelyingpartyDeleteAccountCall.html), [*download account*](http://byron.github.io/google-apis-rs/google_identitytoolkit3/struct.RelyingpartyDownloadAccountCall.html), [*get account info*](http://byron.github.io/google-apis-rs/google_identitytoolkit3/struct.RelyingpartyGetAccountInfoCall.html), [*get oob confirmation code*](http://byron.github.io/google-apis-rs/google_identitytoolkit3/struct.RelyingpartyGetOobConfirmationCodeCall.html), [*get project config*](http://byron.github.io/google-apis-rs/google_identitytoolkit3/struct.RelyingpartyGetProjectConfigCall.html), [*get public keys*](http://byron.github.io/google-apis-rs/google_identitytoolkit3/struct.RelyingpartyGetPublicKeyCall.html), [*get recaptcha param*](http://byron.github.io/google-apis-rs/google_identitytoolkit3/struct.RelyingpartyGetRecaptchaParamCall.html), [*reset password*](http://byron.github.io/google-apis-rs/google_identitytoolkit3/struct.RelyingpartyResetPasswordCall.html), [*set account info*](http://byron.github.io/google-apis-rs/google_identitytoolkit3/struct.RelyingpartySetAccountInfoCall.html), [*set project config*](http://byron.github.io/google-apis-rs/google_identitytoolkit3/struct.RelyingpartySetProjectConfigCall.html), [*sign out user*](http://byron.github.io/google-apis-rs/google_identitytoolkit3/struct.RelyingpartySignOutUserCall.html), [*signup new user*](http://byron.github.io/google-apis-rs/google_identitytoolkit3/struct.RelyingpartySignupNewUserCall.html), [*upload account*](http://byron.github.io/google-apis-rs/google_identitytoolkit3/struct.RelyingpartyUploadAccountCall.html), [*verify assertion*](http://byron.github.io/google-apis-rs/google_identitytoolkit3/struct.RelyingpartyVerifyAssertionCall.html), [*verify custom token*](http://byron.github.io/google-apis-rs/google_identitytoolkit3/struct.RelyingpartyVerifyCustomTokenCall.html) and [*verify password*](http://byron.github.io/google-apis-rs/google_identitytoolkit3/struct.RelyingpartyVerifyPasswordCall.html) diff --git a/gen/identitytoolkit3/src/cmn.rs b/gen/identitytoolkit3/src/cmn.rs index 87b91a8986..c69621da55 100644 --- a/gen/identitytoolkit3/src/cmn.rs +++ b/gen/identitytoolkit3/src/cmn.rs @@ -12,7 +12,7 @@ use mime::{Mime, TopLevel, SubLevel, Attr, Value}; use oauth2::{TokenType, Retry, self}; use hyper; use hyper::header::{ContentType, ContentLength, Headers, UserAgent, Authorization, Header, - HeaderFormat}; + HeaderFormat, Bearer}; use hyper::http::h1::LINE_ENDING; use hyper::method::Method; use hyper::status::StatusCode; @@ -634,7 +634,7 @@ pub struct ResumableUploadHelper<'a, A: 'a> { pub start_at: Option, pub auth: &'a mut A, pub user_agent: &'a str, - pub auth_header: Authorization, + pub auth_header: Authorization, pub url: &'a str, pub reader: &'a mut ReadSeek, pub media_type: Mime, diff --git a/gen/identitytoolkit3/src/lib.rs b/gen/identitytoolkit3/src/lib.rs index 33f45474ce..70ca4e64b7 100644 --- a/gen/identitytoolkit3/src/lib.rs +++ b/gen/identitytoolkit3/src/lib.rs @@ -2,7 +2,7 @@ // This file was generated automatically from 'src/mako/api/lib.rs.mako' // DO NOT EDIT ! -//! This documentation was generated from *Identity Toolkit* crate version *0.1.12+20160216*, where *20160216* is the exact revision of the *identitytoolkit:v3* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.12*. +//! This documentation was generated from *Identity Toolkit* crate version *0.1.13+20160324*, where *20160324* is the exact revision of the *identitytoolkit:v3* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.13*. //! //! Everything else about the *Identity Toolkit* *v3* API can be found at the //! [official documentation site](https://developers.google.com/identity-toolkit/v3/). @@ -12,7 +12,7 @@ //! Handle the following *Resources* with ease from the central [hub](struct.IdentityToolkit.html) ... //! //! * [relyingparty](struct.Relyingparty.html) -//! * [*create auth uri*](struct.RelyingpartyCreateAuthUriCall.html), [*delete account*](struct.RelyingpartyDeleteAccountCall.html), [*download account*](struct.RelyingpartyDownloadAccountCall.html), [*get account info*](struct.RelyingpartyGetAccountInfoCall.html), [*get oob confirmation code*](struct.RelyingpartyGetOobConfirmationCodeCall.html), [*get project config*](struct.RelyingpartyGetProjectConfigCall.html), [*get public keys*](struct.RelyingpartyGetPublicKeyCall.html), [*get recaptcha param*](struct.RelyingpartyGetRecaptchaParamCall.html), [*reset password*](struct.RelyingpartyResetPasswordCall.html), [*set account info*](struct.RelyingpartySetAccountInfoCall.html), [*sign out user*](struct.RelyingpartySignOutUserCall.html), [*signup new user*](struct.RelyingpartySignupNewUserCall.html), [*upload account*](struct.RelyingpartyUploadAccountCall.html), [*verify assertion*](struct.RelyingpartyVerifyAssertionCall.html), [*verify custom token*](struct.RelyingpartyVerifyCustomTokenCall.html) and [*verify password*](struct.RelyingpartyVerifyPasswordCall.html) +//! * [*create auth uri*](struct.RelyingpartyCreateAuthUriCall.html), [*delete account*](struct.RelyingpartyDeleteAccountCall.html), [*download account*](struct.RelyingpartyDownloadAccountCall.html), [*get account info*](struct.RelyingpartyGetAccountInfoCall.html), [*get oob confirmation code*](struct.RelyingpartyGetOobConfirmationCodeCall.html), [*get project config*](struct.RelyingpartyGetProjectConfigCall.html), [*get public keys*](struct.RelyingpartyGetPublicKeyCall.html), [*get recaptcha param*](struct.RelyingpartyGetRecaptchaParamCall.html), [*reset password*](struct.RelyingpartyResetPasswordCall.html), [*set account info*](struct.RelyingpartySetAccountInfoCall.html), [*set project config*](struct.RelyingpartySetProjectConfigCall.html), [*sign out user*](struct.RelyingpartySignOutUserCall.html), [*signup new user*](struct.RelyingpartySignupNewUserCall.html), [*upload account*](struct.RelyingpartyUploadAccountCall.html), [*verify assertion*](struct.RelyingpartyVerifyAssertionCall.html), [*verify custom token*](struct.RelyingpartyVerifyCustomTokenCall.html) and [*verify password*](struct.RelyingpartyVerifyPasswordCall.html) //! //! //! diff --git a/gen/identitytoolkit3/src/lib.rs.in b/gen/identitytoolkit3/src/lib.rs.in index 7d1ad5debc..42de844c23 100644 --- a/gen/identitytoolkit3/src/lib.rs.in +++ b/gen/identitytoolkit3/src/lib.rs.in @@ -111,7 +111,7 @@ impl<'a, C, A> IdentityToolkit IdentityToolkit { client: RefCell::new(client), auth: RefCell::new(authenticator), - _user_agent: "google-api-rust-client/0.1.12".to_string(), + _user_agent: "google-api-rust-client/0.1.13".to_string(), } } @@ -120,7 +120,7 @@ impl<'a, C, A> IdentityToolkit } /// Set the user-agent header field to use in all requests to the server. - /// It defaults to `google-api-rust-client/0.1.12`. + /// It defaults to `google-api-rust-client/0.1.13`. /// /// Returns the previously set user-agent. pub fn user_agent(&mut self, agent_name: String) -> String { @@ -134,63 +134,6 @@ impl<'a, C, A> IdentityToolkit // ############ // SCHEMAS ### // ########## -/// Respone of uploading accounts in batch. -/// -/// # Activities -/// -/// This type is used in activities, which are methods you may call on this type or where this type is involved in. -/// The list links the activity name, along with information about where it is used (one of *request* and *response*). -/// -/// * [upload account relyingparty](struct.RelyingpartyUploadAccountCall.html) (response) -/// -#[derive(Default, Clone, Debug, Serialize, Deserialize)] -pub struct UploadAccountResponse { - /// The fixed string "identitytoolkit#UploadAccountResponse". - pub kind: Option, - /// The error encountered while processing the account info. - pub error: Option>, -} - -impl ResponseResult for UploadAccountResponse {} - - -/// Request of getting a code for user confirmation (reset password, change email etc.) -/// -/// # Activities -/// -/// This type is used in activities, which are methods you may call on this type or where this type is involved in. -/// The list links the activity name, along with information about where it is used (one of *request* and *response*). -/// -/// * [get oob confirmation code relyingparty](struct.RelyingpartyGetOobConfirmationCodeCall.html) (request) -/// -#[derive(Default, Clone, Debug, Serialize, Deserialize)] -pub struct Relyingparty { - /// The fixed string "identitytoolkit#relyingparty". - pub kind: Option, - /// The request type. - #[serde(rename="requestType")] - pub request_type: Option, - /// The user's Gitkit login token for email change. - #[serde(rename="idToken")] - pub id_token: Option, - /// The recaptcha challenge presented to the user. - pub challenge: Option, - /// The new email if the code is for email change. - #[serde(rename="newEmail")] - pub new_email: Option, - /// The IP address of the user. - #[serde(rename="userIp")] - pub user_ip: Option, - /// The email of the user. - pub email: Option, - /// The recaptcha response from the user. - #[serde(rename="captchaResp")] - pub captcha_resp: Option, -} - -impl RequestValue for Relyingparty {} - - /// Response of creating the IDP authentication URL. /// /// # Activities @@ -229,46 +172,23 @@ pub struct CreateAuthUriResponse { impl ResponseResult for CreateAuthUriResponse {} -/// Response of resetting the password. +/// Response of setting the project configuration. /// /// # Activities /// /// This type is used in activities, which are methods you may call on this type or where this type is involved in. /// The list links the activity name, along with information about where it is used (one of *request* and *response*). /// -/// * [reset password relyingparty](struct.RelyingpartyResetPasswordCall.html) (response) +/// * [set project config relyingparty](struct.RelyingpartySetProjectConfigCall.html) (response) /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] -pub struct ResetPasswordResponse { - /// The fixed string "identitytoolkit#ResetPasswordResponse". - pub kind: Option, - /// The user's email. - pub email: Option, +pub struct IdentitytoolkitRelyingpartySetProjectConfigResponse { + /// Project ID of the relying party. + #[serde(rename="projectId")] + pub project_id: Option, } -impl ResponseResult for ResetPasswordResponse {} - - -/// Request to delete account. -/// -/// # Activities -/// -/// This type is used in activities, which are methods you may call on this type or where this type is involved in. -/// The list links the activity name, along with information about where it is used (one of *request* and *response*). -/// -/// * [delete account relyingparty](struct.RelyingpartyDeleteAccountCall.html) (request) -/// -#[derive(Default, Clone, Debug, Serialize, Deserialize)] -pub struct IdentitytoolkitRelyingpartyDeleteAccountRequest { - /// GCP project number of the requesting delegated app. Currently only intended for Firebase V1 migration. - #[serde(rename="delegatedProjectNumber")] - pub delegated_project_number: Option, - /// The local ID of the user. - #[serde(rename="localId")] - pub local_id: Option, -} - -impl RequestValue for IdentitytoolkitRelyingpartyDeleteAccountRequest {} +impl ResponseResult for IdentitytoolkitRelyingpartySetProjectConfigResponse {} /// Response of getting the project configuration. @@ -282,15 +202,36 @@ impl RequestValue for IdentitytoolkitRelyingpartyDeleteAccountRequest {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct IdentitytoolkitRelyingpartyGetProjectConfigResponse { - /// Project ID of the relying party. - #[serde(rename="projectId")] - pub project_id: Option, - /// Browser API key, needed when making http request to Apiary. - #[serde(rename="apiKey")] - pub api_key: Option, /// Whether to allow password user sign in or sign up. #[serde(rename="allowPasswordUser")] pub allow_password_user: Option, + /// Browser API key, needed when making http request to Apiary. + #[serde(rename="apiKey")] + pub api_key: Option, + /// Whether to use email sending provided by Firebear. + #[serde(rename="useEmailSending")] + pub use_email_sending: Option, + /// Project ID of the relying party. + #[serde(rename="projectId")] + pub project_id: Option, + /// Whether anonymous user is enabled. + #[serde(rename="enableAnonymousUser")] + pub enable_anonymous_user: Option, + /// Authorized domains. + #[serde(rename="authorizedDomains")] + pub authorized_domains: Option>, + /// Change email template. + #[serde(rename="changeEmailTemplate")] + pub change_email_template: Option, + /// Legacy reset password email template. + #[serde(rename="legacyResetPasswordTemplate")] + pub legacy_reset_password_template: Option, + /// Verify email template. + #[serde(rename="verifyEmailTemplate")] + pub verify_email_template: Option, + /// Reset password email template. + #[serde(rename="resetPasswordTemplate")] + pub reset_password_template: Option, /// OAuth2 provider configuration. #[serde(rename="idpConfig")] pub idp_config: Option>, @@ -299,29 +240,6 @@ pub struct IdentitytoolkitRelyingpartyGetProjectConfigResponse { impl ResponseResult for IdentitytoolkitRelyingpartyGetProjectConfigResponse {} -/// Response of getting a code for user confirmation (reset password, change email etc.). -/// -/// # Activities -/// -/// This type is used in activities, which are methods you may call on this type or where this type is involved in. -/// The list links the activity name, along with information about where it is used (one of *request* and *response*). -/// -/// * [get oob confirmation code relyingparty](struct.RelyingpartyGetOobConfirmationCodeCall.html) (response) -/// -#[derive(Default, Clone, Debug, Serialize, Deserialize)] -pub struct GetOobConfirmationCodeResponse { - /// The fixed string "identitytoolkit#GetOobConfirmationCodeResponse". - pub kind: Option, - /// The code to be send to the user. - #[serde(rename="oobCode")] - pub oob_code: Option, - /// The email address that the email is sent to. - pub email: Option, -} - -impl ResponseResult for GetOobConfirmationCodeResponse {} - - /// Request to get the account information. /// /// # Activities @@ -336,6 +254,9 @@ pub struct IdentitytoolkitRelyingpartyGetAccountInfoRequest { /// The GITKit token of the authenticated user. #[serde(rename="idToken")] pub id_token: Option, + /// GCP project number of the requesting delegated app. Currently only intended for Firebase V1 migration. + #[serde(rename="delegatedProjectNumber")] + pub delegated_project_number: Option, /// The list of emails of the users to inquiry. pub email: Option>, /// The list of local ID's of the users to inquiry. @@ -426,217 +347,61 @@ impl ResponseResult for GetRecaptchaParamResponse {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct VerifyCustomTokenResponse { + /// If idToken is STS id token, then this field will be expiration time of STS id token in seconds. + #[serde(rename="expiresIn")] + pub expires_in: Option, /// The GITKit token for authenticated user. #[serde(rename="idToken")] pub id_token: Option, /// The fixed string "identitytoolkit#VerifyCustomTokenResponse". pub kind: Option, + /// If idToken is STS id token, then this field will be refresh token. + #[serde(rename="refreshToken")] + pub refresh_token: Option, } impl ResponseResult for VerifyCustomTokenResponse {} -/// Response of verifying the IDP assertion. +/// Request to verify the password. /// /// # Activities /// /// This type is used in activities, which are methods you may call on this type or where this type is involved in. /// The list links the activity name, along with information about where it is used (one of *request* and *response*). /// -/// * [verify assertion relyingparty](struct.RelyingpartyVerifyAssertionCall.html) (response) +/// * [verify password relyingparty](struct.RelyingpartyVerifyPasswordCall.html) (request) /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] -pub struct VerifyAssertionResponse { - /// The unique ID identifies the IdP account. - #[serde(rename="federatedId")] - pub federated_id: Option, - /// The RP local ID if it's already been mapped to the IdP account identified by the federated ID. - #[serde(rename="localId")] - pub local_id: Option, - /// The URI of the public accessible profiel picture. - #[serde(rename="photoUrl")] - pub photo_url: Option, - /// The original email stored in the mapping storage. It's returned when the federated ID is associated to a different email. - #[serde(rename="originalEmail")] - pub original_email: Option, - /// It's the identifier param in the createAuthUri request if the identifier is an email. It can be used to check whether the user input email is different from the asserted email. - #[serde(rename="inputEmail")] - pub input_email: Option, - /// The scope for the OpenID OAuth extension. - #[serde(rename="oauthScope")] - pub oauth_scope: Option, - /// The language preference of the user. - pub language: Option, - /// Whether the assertion is from a non-trusted IDP and need account linking confirmation. - #[serde(rename="needConfirmation")] - pub need_confirmation: Option, - /// The custom scheme used by mobile app. - #[serde(rename="appScheme")] - pub app_scheme: Option, - /// The full name of the user. - #[serde(rename="fullName")] - pub full_name: Option, - /// URL for OTA app installation. - #[serde(rename="appInstallationUrl")] - pub app_installation_url: Option, - /// The fixed string "identitytoolkit#VerifyAssertionResponse". - pub kind: Option, - /// The display name of the user. - #[serde(rename="displayName")] - pub display_name: Option, - /// The OAuth2 access token. - #[serde(rename="oauthAccessToken")] - pub oauth_access_token: Option, - /// The first name of the user. - #[serde(rename="firstName")] - pub first_name: Option, - /// The OAuth2 authorization code. - #[serde(rename="oauthAuthorizationCode")] - pub oauth_authorization_code: Option, - /// The lifetime in seconds of the OAuth2 access token. - #[serde(rename="oauthExpireIn")] - pub oauth_expire_in: Option, - /// The ID token. - #[serde(rename="idToken")] - pub id_token: Option, - /// When action is 'map', contains the idps which can be used for confirmation. - #[serde(rename="verifiedProvider")] - pub verified_provider: Option>, - /// Whether need client to supply email to complete the federated login flow. - #[serde(rename="needEmail")] - pub need_email: Option, - /// The user approved request token for the OpenID OAuth extension. - #[serde(rename="oauthRequestToken")] - pub oauth_request_token: Option, - /// The birth date of the IdP account. - #[serde(rename="dateOfBirth")] - pub date_of_birth: Option, - /// The IdP ID. For white listed IdPs it's a short domain name e.g. google.com, aol.com, live.net and yahoo.com. If the "providerId" param is set to OpenID OP identifer other than the whilte listed IdPs the OP identifier is returned. If the "identifier" param is federated ID in the createAuthUri request. The domain part of the federated ID is returned. - #[serde(rename="providerId")] - pub provider_id: Option, - /// The opaque value used by the client to maintain context info between the authentication request and the IDP callback. - pub context: Option, - /// The last name of the user. - #[serde(rename="lastName")] - pub last_name: Option, - /// The action code. - pub action: Option, - /// The timezone of the user. - #[serde(rename="timeZone")] - pub time_zone: Option, - /// The value is true if the IDP is also the email provider. It means the user owns the email. - #[serde(rename="emailVerified")] - pub email_verified: Option, - /// The nick name of the user. - #[serde(rename="nickName")] - pub nick_name: Option, - /// The email returned by the IdP. NOTE: The federated login user may not own the email. - pub email: Option, - /// It's true if the email is recycled. - #[serde(rename="emailRecycled")] - pub email_recycled: Option, -} - -impl ResponseResult for VerifyAssertionResponse {} - - -/// Template for a single idp configuration. -/// -/// This type is not used in any activity, and only used as *part* of another schema. -/// -#[derive(Default, Clone, Debug, Serialize, Deserialize)] -pub struct IdpConfig { - /// Percent of users who will be prompted/redirected federated login for this IDP. - #[serde(rename="experimentPercent")] - pub experiment_percent: Option, - /// Whether this IDP is enabled. - pub enabled: Option, - /// OAuth2 client ID. - #[serde(rename="clientId")] - pub client_id: Option, - /// OAuth2 provider. - pub provider: Option, -} - -impl Part for IdpConfig {} - - -/// The error encountered while processing the account info. -/// -/// This type is not used in any activity, and only used as *part* of another schema. -/// -#[derive(Default, Clone, Debug, Serialize, Deserialize)] -pub struct UploadAccountResponseError { - /// The index of the malformed account, starting from 0. - pub index: Option, - /// Detailed error message for the account info. - pub message: Option, -} - -impl NestedType for UploadAccountResponseError {} -impl Part for UploadAccountResponseError {} - - -/// Request to reset the password. -/// -/// # Activities -/// -/// This type is used in activities, which are methods you may call on this type or where this type is involved in. -/// The list links the activity name, along with information about where it is used (one of *request* and *response*). -/// -/// * [reset password relyingparty](struct.RelyingpartyResetPasswordCall.html) (request) -/// -#[derive(Default, Clone, Debug, Serialize, Deserialize)] -pub struct IdentitytoolkitRelyingpartyResetPasswordRequest { - /// The new password inputted by the user. - #[serde(rename="newPassword")] - pub new_password: Option, - /// The old password inputted by the user. - #[serde(rename="oldPassword")] - pub old_password: Option, - /// The confirmation code. - #[serde(rename="oobCode")] - pub oob_code: Option, - /// The email address of the user. - pub email: Option, -} - -impl RequestValue for IdentitytoolkitRelyingpartyResetPasswordRequest {} - - -/// Request to upload user account in batch. -/// -/// # Activities -/// -/// This type is used in activities, which are methods you may call on this type or where this type is involved in. -/// The list links the activity name, along with information about where it is used (one of *request* and *response*). -/// -/// * [upload account relyingparty](struct.RelyingpartyUploadAccountCall.html) (request) -/// -#[derive(Default, Clone, Debug, Serialize, Deserialize)] -pub struct IdentitytoolkitRelyingpartyUploadAccountRequest { - /// The password hash algorithm. - #[serde(rename="hashAlgorithm")] - pub hash_algorithm: Option, +pub struct IdentitytoolkitRelyingpartyVerifyPasswordRequest { /// GCP project number of the requesting delegated app. Currently only intended for Firebase V1 migration. #[serde(rename="delegatedProjectNumber")] pub delegated_project_number: Option, - /// Memory cost for hash calculation. Used by scrypt similar algorithms. - #[serde(rename="memoryCost")] - pub memory_cost: Option, - /// The account info to be stored. - pub users: Option>, - /// The salt separator. - #[serde(rename="saltSeparator")] - pub salt_separator: Option, - /// The key for to hash the password. - #[serde(rename="signerKey")] - pub signer_key: Option, - /// Rounds for hash calculation. Used by scrypt and similar algorithms. - pub rounds: Option, + /// Instance id token of the app. + #[serde(rename="instanceId")] + pub instance_id: Option, + /// The GITKit token of the authenticated user. + #[serde(rename="idToken")] + pub id_token: Option, + /// The GITKit token for the non-trusted IDP, which is to be confirmed by the user. + #[serde(rename="pendingIdToken")] + pub pending_id_token: Option, + /// The captcha challenge. + #[serde(rename="captchaChallenge")] + pub captcha_challenge: Option, + /// Response to the captcha. + #[serde(rename="captchaResponse")] + pub captcha_response: Option, + /// Whether return sts id token and refresh token instead of gitkit token. + #[serde(rename="returnSecureToken")] + pub return_secure_token: Option, + /// The password inputed by the user. + pub password: Option, + /// The email of the user. + pub email: Option, } -impl RequestValue for IdentitytoolkitRelyingpartyUploadAccountRequest {} +impl RequestValue for IdentitytoolkitRelyingpartyVerifyPasswordRequest {} /// Request of verifying the password. @@ -650,6 +415,9 @@ impl RequestValue for IdentitytoolkitRelyingpartyUploadAccountRequest {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct VerifyPasswordResponse { + /// If idToken is STS id token, then this field will be expiration time of STS id token in seconds. + #[serde(rename="expiresIn")] + pub expires_in: Option, /// The fixed string "identitytoolkit#VerifyPasswordResponse". pub kind: Option, /// The name of the user. @@ -675,6 +443,9 @@ pub struct VerifyPasswordResponse { /// The OAuth2 authorization code. #[serde(rename="oauthAuthorizationCode")] pub oauth_authorization_code: Option, + /// If idToken is STS id token, then this field will be refresh token. + #[serde(rename="refreshToken")] + pub refresh_token: Option, /// The email returned by the IdP. NOTE: The federated login user may not own the email. pub email: Option, } @@ -682,83 +453,24 @@ pub struct VerifyPasswordResponse { impl ResponseResult for VerifyPasswordResponse {} -/// Request to set the account information. +/// Response of resetting the password. /// /// # Activities /// /// This type is used in activities, which are methods you may call on this type or where this type is involved in. /// The list links the activity name, along with information about where it is used (one of *request* and *response*). /// -/// * [set account info relyingparty](struct.RelyingpartySetAccountInfoCall.html) (request) +/// * [reset password relyingparty](struct.RelyingpartyResetPasswordCall.html) (response) /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] -pub struct IdentitytoolkitRelyingpartySetAccountInfoRequest { - /// GCP project number of the requesting delegated app. Currently only intended for Firebase V1 migration. - #[serde(rename="delegatedProjectNumber")] - pub delegated_project_number: Option, - /// The out-of-band code of the change email request. - #[serde(rename="oobCode")] - pub oob_code: Option, - /// The local ID of the user. - #[serde(rename="localId")] - pub local_id: Option, - /// Timestamp in seconds for valid login token. - #[serde(rename="validSince")] - pub valid_since: Option, - /// The photo url of the user. - #[serde(rename="photoUrl")] - pub photo_url: Option, - /// Instance id token of the app. - #[serde(rename="instanceId")] - pub instance_id: Option, - /// Whether to disable the user. - #[serde(rename="disableUser")] - pub disable_user: Option, - /// The new password of the user. - pub password: Option, - /// The name of the user. - #[serde(rename="displayName")] - pub display_name: Option, - /// Mark the user to upgrade to federated login. - #[serde(rename="upgradeToFederatedLogin")] - pub upgrade_to_federated_login: Option, - /// The GITKit token of the authenticated user. - #[serde(rename="idToken")] - pub id_token: Option, - /// Mark the email as verified or not. - #[serde(rename="emailVerified")] - pub email_verified: Option, - /// Response to the captcha. - #[serde(rename="captchaResponse")] - pub captcha_response: Option, - /// The associated IDPs of the user. - pub provider: Option>, - /// The captcha challenge. - #[serde(rename="captchaChallenge")] - pub captcha_challenge: Option, - /// The email of the user. +pub struct ResetPasswordResponse { + /// The fixed string "identitytoolkit#ResetPasswordResponse". + pub kind: Option, + /// The user's email. pub email: Option, } -impl RequestValue for IdentitytoolkitRelyingpartySetAccountInfoRequest {} - - -/// Respone of deleting account. -/// -/// # Activities -/// -/// This type is used in activities, which are methods you may call on this type or where this type is involved in. -/// The list links the activity name, along with information about where it is used (one of *request* and *response*). -/// -/// * [delete account relyingparty](struct.RelyingpartyDeleteAccountCall.html) (response) -/// -#[derive(Default, Clone, Debug, Serialize, Deserialize)] -pub struct DeleteAccountResponse { - /// The fixed string "identitytoolkit#DeleteAccountResponse". - pub kind: Option, -} - -impl ResponseResult for DeleteAccountResponse {} +impl ResponseResult for ResetPasswordResponse {} /// Response of signing out user. @@ -835,21 +547,24 @@ impl RequestValue for IdentitytoolkitRelyingpartyCreateAuthUriRequest {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct IdentitytoolkitRelyingpartySignupNewUserRequest { - /// Response to the captcha. - #[serde(rename="captchaResponse")] - pub captcha_response: Option, /// The name of the user. #[serde(rename="displayName")] pub display_name: Option, - /// The captcha challenge. - #[serde(rename="captchaChallenge")] - pub captcha_challenge: Option, /// Instance id token of the app. #[serde(rename="instanceId")] pub instance_id: Option, /// The GITKit token of the authenticated user. #[serde(rename="idToken")] pub id_token: Option, + /// The captcha challenge. + #[serde(rename="captchaChallenge")] + pub captcha_challenge: Option, + /// Response to the captcha. + #[serde(rename="captchaResponse")] + pub captcha_response: Option, + /// Whether return sts id token and refresh token instead of gitkit token. + #[serde(rename="returnSecureToken")] + pub return_secure_token: Option, /// The new password of the user. pub password: Option, /// The email of the user. @@ -859,75 +574,6 @@ pub struct IdentitytoolkitRelyingpartySignupNewUserRequest { impl RequestValue for IdentitytoolkitRelyingpartySignupNewUserRequest {} -/// Template for an individual account info. -/// -/// This type is not used in any activity, and only used as *part* of another schema. -/// -#[derive(Default, Clone, Debug, Serialize, Deserialize)] -pub struct UserInfo { - /// The name of the user. - #[serde(rename="displayName")] - pub display_name: Option, - /// The local ID of the user. - #[serde(rename="localId")] - pub local_id: Option, - /// Timestamp in seconds for valid login token. - #[serde(rename="validSince")] - pub valid_since: Option, - /// The URL of the user profile photo. - #[serde(rename="photoUrl")] - pub photo_url: Option, - /// Whether the email has been verified. - #[serde(rename="emailVerified")] - pub email_verified: Option, - /// The user's hashed password. - #[serde(rename="passwordHash")] - pub password_hash: Option, - /// Whether the user is disabled. - pub disabled: Option, - /// Version of the user's password. - pub version: Option, - /// The IDP of the user. - #[serde(rename="providerUserInfo")] - pub provider_user_info: Option>, - /// The timestamp when the password was last updated. - #[serde(rename="passwordUpdatedAt")] - pub password_updated_at: Option, - /// The user's password salt. - pub salt: Option, - /// The email of the user. - pub email: Option, -} - -impl Part for UserInfo {} - - -/// The IDP of the user. -/// -/// This type is not used in any activity, and only used as *part* of another schema. -/// -#[derive(Default, Clone, Debug, Serialize, Deserialize)] -pub struct UserInfoProviderUserInfo { - /// User's identifier at IDP. - #[serde(rename="federatedId")] - pub federated_id: Option, - /// The IdP ID. For white listed IdPs it's a short domain name, e.g., google.com, aol.com, live.net and yahoo.com. For other OpenID IdPs it's the OP identifier. - #[serde(rename="providerId")] - pub provider_id: Option, - /// The user's display name at the IDP. - #[serde(rename="displayName")] - pub display_name: Option, - /// User's email at IDP. - pub email: Option, - /// The user's photo url at the IDP. - #[serde(rename="photoUrl")] - pub photo_url: Option, -} - -impl NestedType for UserInfoProviderUserInfo {} -impl Part for UserInfoProviderUserInfo {} - - /// Respone of getting public keys. /// /// # Activities @@ -943,27 +589,6 @@ pub struct IdentitytoolkitRelyingpartyGetPublicKeysResponse(Option, - /// The custom token to verify - pub token: Option, -} - -impl RequestValue for IdentitytoolkitRelyingpartyVerifyCustomTokenRequest {} - - /// Request to download user account in batch. /// /// # Activities @@ -1010,6 +635,91 @@ impl NestedType for SetAccountInfoResponseProviderUserInfo {} impl Part for SetAccountInfoResponseProviderUserInfo {} +/// Request to verify a custom token +/// +/// # Activities +/// +/// This type is used in activities, which are methods you may call on this type or where this type is involved in. +/// The list links the activity name, along with information about where it is used (one of *request* and *response*). +/// +/// * [verify custom token relyingparty](struct.RelyingpartyVerifyCustomTokenCall.html) (request) +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct IdentitytoolkitRelyingpartyVerifyCustomTokenRequest { + /// Instance id token of the app. + #[serde(rename="instanceId")] + pub instance_id: Option, + /// Whether return sts id token and refresh token instead of gitkit token. + #[serde(rename="returnSecureToken")] + pub return_secure_token: Option, + /// The custom token to verify + pub token: Option, +} + +impl RequestValue for IdentitytoolkitRelyingpartyVerifyCustomTokenRequest {} + + +/// Response of getting account information. +/// +/// # Activities +/// +/// This type is used in activities, which are methods you may call on this type or where this type is involved in. +/// The list links the activity name, along with information about where it is used (one of *request* and *response*). +/// +/// * [get account info relyingparty](struct.RelyingpartyGetAccountInfoCall.html) (response) +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct GetAccountInfoResponse { + /// The fixed string "identitytoolkit#GetAccountInfoResponse". + pub kind: Option, + /// The info of the users. + pub users: Option>, +} + +impl ResponseResult for GetAccountInfoResponse {} + + +/// Respone of setting the account information. +/// +/// # Activities +/// +/// This type is used in activities, which are methods you may call on this type or where this type is involved in. +/// The list links the activity name, along with information about where it is used (one of *request* and *response*). +/// +/// * [set account info relyingparty](struct.RelyingpartySetAccountInfoCall.html) (response) +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct SetAccountInfoResponse { + /// If idToken is STS id token, then this field will be expiration time of STS id token in seconds. + #[serde(rename="expiresIn")] + pub expires_in: Option, + /// The fixed string "identitytoolkit#SetAccountInfoResponse". + pub kind: Option, + /// The name of the user. + #[serde(rename="displayName")] + pub display_name: Option, + /// The new email the user attempts to change to. + #[serde(rename="newEmail")] + pub new_email: Option, + /// The photo url of the user. + #[serde(rename="photoUrl")] + pub photo_url: Option, + /// The Gitkit id token to login the newly sign up user. + #[serde(rename="idToken")] + pub id_token: Option, + /// The user's profiles at the associated IdPs. + #[serde(rename="providerUserInfo")] + pub provider_user_info: Option>, + /// If idToken is STS id token, then this field will be refresh token. + #[serde(rename="refreshToken")] + pub refresh_token: Option, + /// The email of the user. + pub email: Option, +} + +impl ResponseResult for SetAccountInfoResponse {} + + /// Request to verify the IDP assertion. /// /// # Activities @@ -1042,6 +752,9 @@ pub struct IdentitytoolkitRelyingpartyVerifyAssertionRequest { /// The URI to which the IDP redirects the user back. It may contain federated login result params added by the IDP. #[serde(rename="requestUri")] pub request_uri: Option, + /// Whether return sts id token and refresh token instead of gitkit token. + #[serde(rename="returnSecureToken")] + pub return_secure_token: Option, /// Whether to return refresh tokens. #[serde(rename="returnRefreshToken")] pub return_refresh_token: Option, @@ -1050,24 +763,536 @@ pub struct IdentitytoolkitRelyingpartyVerifyAssertionRequest { impl RequestValue for IdentitytoolkitRelyingpartyVerifyAssertionRequest {} -/// Response of getting account information. +/// Request of getting a code for user confirmation (reset password, change email etc.) /// /// # Activities /// /// This type is used in activities, which are methods you may call on this type or where this type is involved in. /// The list links the activity name, along with information about where it is used (one of *request* and *response*). /// -/// * [get account info relyingparty](struct.RelyingpartyGetAccountInfoCall.html) (response) +/// * [get oob confirmation code relyingparty](struct.RelyingpartyGetOobConfirmationCodeCall.html) (request) /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] -pub struct GetAccountInfoResponse { - /// The fixed string "identitytoolkit#GetAccountInfoResponse". +pub struct Relyingparty { + /// The fixed string "identitytoolkit#relyingparty". pub kind: Option, - /// The info of the users. - pub users: Option>, + /// The request type. + #[serde(rename="requestType")] + pub request_type: Option, + /// The user's Gitkit login token for email change. + #[serde(rename="idToken")] + pub id_token: Option, + /// The recaptcha challenge presented to the user. + pub challenge: Option, + /// The new email if the code is for email change. + #[serde(rename="newEmail")] + pub new_email: Option, + /// The IP address of the user. + #[serde(rename="userIp")] + pub user_ip: Option, + /// The email of the user. + pub email: Option, + /// The recaptcha response from the user. + #[serde(rename="captchaResp")] + pub captcha_resp: Option, } -impl ResponseResult for GetAccountInfoResponse {} +impl RequestValue for Relyingparty {} + + +/// Request to reset the password. +/// +/// # Activities +/// +/// This type is used in activities, which are methods you may call on this type or where this type is involved in. +/// The list links the activity name, along with information about where it is used (one of *request* and *response*). +/// +/// * [reset password relyingparty](struct.RelyingpartyResetPasswordCall.html) (request) +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct IdentitytoolkitRelyingpartyResetPasswordRequest { + /// The new password inputted by the user. + #[serde(rename="newPassword")] + pub new_password: Option, + /// The old password inputted by the user. + #[serde(rename="oldPassword")] + pub old_password: Option, + /// The confirmation code. + #[serde(rename="oobCode")] + pub oob_code: Option, + /// The email address of the user. + pub email: Option, +} + +impl RequestValue for IdentitytoolkitRelyingpartyResetPasswordRequest {} + + +/// Request to set the account information. +/// +/// # Activities +/// +/// This type is used in activities, which are methods you may call on this type or where this type is involved in. +/// The list links the activity name, along with information about where it is used (one of *request* and *response*). +/// +/// * [set account info relyingparty](struct.RelyingpartySetAccountInfoCall.html) (request) +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct IdentitytoolkitRelyingpartySetAccountInfoRequest { + /// GCP project number of the requesting delegated app. Currently only intended for Firebase V1 migration. + #[serde(rename="delegatedProjectNumber")] + pub delegated_project_number: Option, + /// The out-of-band code of the change email request. + #[serde(rename="oobCode")] + pub oob_code: Option, + /// The local ID of the user. + #[serde(rename="localId")] + pub local_id: Option, + /// Timestamp in seconds for valid login token. + #[serde(rename="validSince")] + pub valid_since: Option, + /// The photo url of the user. + #[serde(rename="photoUrl")] + pub photo_url: Option, + /// Instance id token of the app. + #[serde(rename="instanceId")] + pub instance_id: Option, + /// Whether to disable the user. + #[serde(rename="disableUser")] + pub disable_user: Option, + /// Whether return sts id token and refresh token instead of gitkit token. + #[serde(rename="returnSecureToken")] + pub return_secure_token: Option, + /// The new password of the user. + pub password: Option, + /// The name of the user. + #[serde(rename="displayName")] + pub display_name: Option, + /// The attributes users request to delete. + #[serde(rename="deleteAttribute")] + pub delete_attribute: Option>, + /// Mark the user to upgrade to federated login. + #[serde(rename="upgradeToFederatedLogin")] + pub upgrade_to_federated_login: Option, + /// The GITKit token of the authenticated user. + #[serde(rename="idToken")] + pub id_token: Option, + /// Mark the email as verified or not. + #[serde(rename="emailVerified")] + pub email_verified: Option, + /// The IDPs the user request to delete. + #[serde(rename="deleteProvider")] + pub delete_provider: Option>, + /// The captcha challenge. + #[serde(rename="captchaChallenge")] + pub captcha_challenge: Option, + /// Response to the captcha. + #[serde(rename="captchaResponse")] + pub captcha_response: Option, + /// The associated IDPs of the user. + pub provider: Option>, + /// The email of the user. + pub email: Option, +} + +impl RequestValue for IdentitytoolkitRelyingpartySetAccountInfoRequest {} + + +/// Request to delete account. +/// +/// # Activities +/// +/// This type is used in activities, which are methods you may call on this type or where this type is involved in. +/// The list links the activity name, along with information about where it is used (one of *request* and *response*). +/// +/// * [delete account relyingparty](struct.RelyingpartyDeleteAccountCall.html) (request) +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct IdentitytoolkitRelyingpartyDeleteAccountRequest { + /// The GITKit token or STS id token of the authenticated user. + #[serde(rename="idToken")] + pub id_token: Option, + /// GCP project number of the requesting delegated app. Currently only intended for Firebase V1 migration. + #[serde(rename="delegatedProjectNumber")] + pub delegated_project_number: Option, + /// The local ID of the user. + #[serde(rename="localId")] + pub local_id: Option, +} + +impl RequestValue for IdentitytoolkitRelyingpartyDeleteAccountRequest {} + + +/// Template for an email template. +/// +/// This type is not used in any activity, and only used as *part* of another schema. +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct EmailTemplate { + /// Email body. + pub body: Option, + /// From display name. + #[serde(rename="fromDisplayName")] + pub from_display_name: Option, + /// From address of the email. + pub from: Option, + /// Email body format. + pub format: Option, + /// Reply-to address. + #[serde(rename="replyTo")] + pub reply_to: Option, + /// Subject of the email. + pub subject: Option, +} + +impl Part for EmailTemplate {} + + +/// The IDP of the user. +/// +/// This type is not used in any activity, and only used as *part* of another schema. +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct UserInfoProviderUserInfo { + /// User's identifier at IDP. + #[serde(rename="federatedId")] + pub federated_id: Option, + /// The IdP ID. For white listed IdPs it's a short domain name, e.g., google.com, aol.com, live.net and yahoo.com. For other OpenID IdPs it's the OP identifier. + #[serde(rename="providerId")] + pub provider_id: Option, + /// The user's display name at the IDP. + #[serde(rename="displayName")] + pub display_name: Option, + /// The user's photo url at the IDP. + #[serde(rename="photoUrl")] + pub photo_url: Option, + /// User's raw identifier directly returned from IDP. + #[serde(rename="rawId")] + pub raw_id: Option, + /// User's email at IDP. + pub email: Option, +} + +impl NestedType for UserInfoProviderUserInfo {} +impl Part for UserInfoProviderUserInfo {} + + +/// Request to set the project configuration. +/// +/// # Activities +/// +/// This type is used in activities, which are methods you may call on this type or where this type is involved in. +/// The list links the activity name, along with information about where it is used (one of *request* and *response*). +/// +/// * [set project config relyingparty](struct.RelyingpartySetProjectConfigCall.html) (request) +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct IdentitytoolkitRelyingpartySetProjectConfigRequest { + /// Browser API key, needed when making http request to Apiary. + #[serde(rename="apiKey")] + pub api_key: Option, + /// Whether to use email sending provided by Firebear. + #[serde(rename="useEmailSending")] + pub use_email_sending: Option, + /// Whether to allow password user sign in or sign up. + #[serde(rename="allowPasswordUser")] + pub allow_password_user: Option, + /// Whether to enable anonymous user. + #[serde(rename="enableAnonymousUser")] + pub enable_anonymous_user: Option, + /// Change email template. + #[serde(rename="changeEmailTemplate")] + pub change_email_template: Option, + /// Legacy reset password email template. + #[serde(rename="legacyResetPasswordTemplate")] + pub legacy_reset_password_template: Option, + /// GCP project number of the requesting delegated app. Currently only intended for Firebase V1 migration. + #[serde(rename="delegatedProjectNumber")] + pub delegated_project_number: Option, + /// Verify email template. + #[serde(rename="verifyEmailTemplate")] + pub verify_email_template: Option, + /// Reset password email template. + #[serde(rename="resetPasswordTemplate")] + pub reset_password_template: Option, + /// Oauth2 provider configuration. + #[serde(rename="idpConfig")] + pub idp_config: Option>, +} + +impl RequestValue for IdentitytoolkitRelyingpartySetProjectConfigRequest {} + + +/// Response of verifying the IDP assertion. +/// +/// # Activities +/// +/// This type is used in activities, which are methods you may call on this type or where this type is involved in. +/// The list links the activity name, along with information about where it is used (one of *request* and *response*). +/// +/// * [verify assertion relyingparty](struct.RelyingpartyVerifyAssertionCall.html) (response) +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct VerifyAssertionResponse { + /// The unique ID identifies the IdP account. + #[serde(rename="federatedId")] + pub federated_id: Option, + /// The RP local ID if it's already been mapped to the IdP account identified by the federated ID. + #[serde(rename="localId")] + pub local_id: Option, + /// The URI of the public accessible profiel picture. + #[serde(rename="photoUrl")] + pub photo_url: Option, + /// It's the identifier param in the createAuthUri request if the identifier is an email. It can be used to check whether the user input email is different from the asserted email. + #[serde(rename="inputEmail")] + pub input_email: Option, + /// The custom scheme used by mobile app. + #[serde(rename="appScheme")] + pub app_scheme: Option, + /// If idToken is STS id token, then this field will be expiration time of STS id token in seconds. + #[serde(rename="expiresIn")] + pub expires_in: Option, + /// When action is 'map', contains the idps which can be used for confirmation. + #[serde(rename="verifiedProvider")] + pub verified_provider: Option>, + /// Whether need client to supply email to complete the federated login flow. + #[serde(rename="needEmail")] + pub need_email: Option, + /// The birth date of the IdP account. + #[serde(rename="dateOfBirth")] + pub date_of_birth: Option, + /// The first name of the user. + #[serde(rename="firstName")] + pub first_name: Option, + /// The nick name of the user. + #[serde(rename="nickName")] + pub nick_name: Option, + /// The email returned by the IdP. NOTE: The federated login user may not own the email. + pub email: Option, + /// The OAuth1 access token secret. + #[serde(rename="oauthTokenSecret")] + pub oauth_token_secret: Option, + /// The language preference of the user. + pub language: Option, + /// Whether the assertion is from a non-trusted IDP and need account linking confirmation. + #[serde(rename="needConfirmation")] + pub need_confirmation: Option, + /// The display name of the user. + #[serde(rename="displayName")] + pub display_name: Option, + /// The full name of the user. + #[serde(rename="fullName")] + pub full_name: Option, + /// The fixed string "identitytoolkit#VerifyAssertionResponse". + pub kind: Option, + /// If idToken is STS id token, then this field will be refresh token. + #[serde(rename="refreshToken")] + pub refresh_token: Option, + /// URL for OTA app installation. + #[serde(rename="appInstallationUrl")] + pub app_installation_url: Option, + /// The OAuth2 access token. + #[serde(rename="oauthAccessToken")] + pub oauth_access_token: Option, + /// The lifetime in seconds of the OAuth2 access token. + #[serde(rename="oauthExpireIn")] + pub oauth_expire_in: Option, + /// The value is true if the IDP is also the email provider. It means the user owns the email. + #[serde(rename="emailVerified")] + pub email_verified: Option, + /// The last name of the user. + #[serde(rename="lastName")] + pub last_name: Option, + /// The scope for the OpenID OAuth extension. + #[serde(rename="oauthScope")] + pub oauth_scope: Option, + /// The user approved request token for the OpenID OAuth extension. + #[serde(rename="oauthRequestToken")] + pub oauth_request_token: Option, + /// The OAuth2 authorization code. + #[serde(rename="oauthAuthorizationCode")] + pub oauth_authorization_code: Option, + /// The original email stored in the mapping storage. It's returned when the federated ID is associated to a different email. + #[serde(rename="originalEmail")] + pub original_email: Option, + /// The IdP ID. For white listed IdPs it's a short domain name e.g. google.com, aol.com, live.net and yahoo.com. If the "providerId" param is set to OpenID OP identifer other than the whilte listed IdPs the OP identifier is returned. If the "identifier" param is federated ID in the createAuthUri request. The domain part of the federated ID is returned. + #[serde(rename="providerId")] + pub provider_id: Option, + /// The opaque value used by the client to maintain context info between the authentication request and the IDP callback. + pub context: Option, + /// The ID token. + #[serde(rename="idToken")] + pub id_token: Option, + /// The action code. + pub action: Option, + /// The timezone of the user. + #[serde(rename="timeZone")] + pub time_zone: Option, + /// It's true if the email is recycled. + #[serde(rename="emailRecycled")] + pub email_recycled: Option, +} + +impl ResponseResult for VerifyAssertionResponse {} + + +/// Template for a single idp configuration. +/// +/// This type is not used in any activity, and only used as *part* of another schema. +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct IdpConfig { + /// Percent of users who will be prompted/redirected federated login for this IDP. + #[serde(rename="experimentPercent")] + pub experiment_percent: Option, + /// OAuth2 client secret. + pub secret: Option, + /// Whether this IDP is enabled. + pub enabled: Option, + /// OAuth2 client ID. + #[serde(rename="clientId")] + pub client_id: Option, + /// OAuth2 provider. + pub provider: Option, +} + +impl Part for IdpConfig {} + + +/// The error encountered while processing the account info. +/// +/// This type is not used in any activity, and only used as *part* of another schema. +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct UploadAccountResponseError { + /// The index of the malformed account, starting from 0. + pub index: Option, + /// Detailed error message for the account info. + pub message: Option, +} + +impl NestedType for UploadAccountResponseError {} +impl Part for UploadAccountResponseError {} + + +/// Respone of uploading accounts in batch. +/// +/// # Activities +/// +/// This type is used in activities, which are methods you may call on this type or where this type is involved in. +/// The list links the activity name, along with information about where it is used (one of *request* and *response*). +/// +/// * [upload account relyingparty](struct.RelyingpartyUploadAccountCall.html) (response) +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct UploadAccountResponse { + /// The fixed string "identitytoolkit#UploadAccountResponse". + pub kind: Option, + /// The error encountered while processing the account info. + pub error: Option>, +} + +impl ResponseResult for UploadAccountResponse {} + + +/// Request to upload user account in batch. +/// +/// # Activities +/// +/// This type is used in activities, which are methods you may call on this type or where this type is involved in. +/// The list links the activity name, along with information about where it is used (one of *request* and *response*). +/// +/// * [upload account relyingparty](struct.RelyingpartyUploadAccountCall.html) (request) +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct IdentitytoolkitRelyingpartyUploadAccountRequest { + /// The password hash algorithm. + #[serde(rename="hashAlgorithm")] + pub hash_algorithm: Option, + /// GCP project number of the requesting delegated app. Currently only intended for Firebase V1 migration. + #[serde(rename="delegatedProjectNumber")] + pub delegated_project_number: Option, + /// Memory cost for hash calculation. Used by scrypt similar algorithms. + #[serde(rename="memoryCost")] + pub memory_cost: Option, + /// The account info to be stored. + pub users: Option>, + /// The salt separator. + #[serde(rename="saltSeparator")] + pub salt_separator: Option, + /// The key for to hash the password. + #[serde(rename="signerKey")] + pub signer_key: Option, + /// Rounds for hash calculation. Used by scrypt and similar algorithms. + pub rounds: Option, +} + +impl RequestValue for IdentitytoolkitRelyingpartyUploadAccountRequest {} + + +/// Template for an individual account info. +/// +/// This type is not used in any activity, and only used as *part* of another schema. +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct UserInfo { + /// The name of the user. + #[serde(rename="displayName")] + pub display_name: Option, + /// The local ID of the user. + #[serde(rename="localId")] + pub local_id: Option, + /// Timestamp in seconds for valid login token. + #[serde(rename="validSince")] + pub valid_since: Option, + /// The URL of the user profile photo. + #[serde(rename="photoUrl")] + pub photo_url: Option, + /// Whether the email has been verified. + #[serde(rename="emailVerified")] + pub email_verified: Option, + /// The user's hashed password. + #[serde(rename="passwordHash")] + pub password_hash: Option, + /// Whether the user is disabled. + pub disabled: Option, + /// Version of the user's password. + pub version: Option, + /// The IDP of the user. + #[serde(rename="providerUserInfo")] + pub provider_user_info: Option>, + /// The timestamp when the password was last updated. + #[serde(rename="passwordUpdatedAt")] + pub password_updated_at: Option, + /// The user's password salt. + pub salt: Option, + /// The email of the user. + pub email: Option, +} + +impl Part for UserInfo {} + + +/// Response of getting a code for user confirmation (reset password, change email etc.). +/// +/// # Activities +/// +/// This type is used in activities, which are methods you may call on this type or where this type is involved in. +/// The list links the activity name, along with information about where it is used (one of *request* and *response*). +/// +/// * [get oob confirmation code relyingparty](struct.RelyingpartyGetOobConfirmationCodeCall.html) (response) +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct GetOobConfirmationCodeResponse { + /// The fixed string "identitytoolkit#GetOobConfirmationCodeResponse". + pub kind: Option, + /// The code to be send to the user. + #[serde(rename="oobCode")] + pub oob_code: Option, + /// The email address that the email is sent to. + pub email: Option, +} + +impl ResponseResult for GetOobConfirmationCodeResponse {} /// Response of signing up new user, creating anonymous user or anonymous user reauth. @@ -1081,14 +1306,23 @@ impl ResponseResult for GetAccountInfoResponse {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct SignupNewUserResponse { - /// The Gitkit id token to login the newly sign up user. - #[serde(rename="idToken")] - pub id_token: Option, + /// If idToken is STS id token, then this field will be expiration time of STS id token in seconds. + #[serde(rename="expiresIn")] + pub expires_in: Option, /// The fixed string "identitytoolkit#SignupNewUserResponse". pub kind: Option, /// The name of the user. #[serde(rename="displayName")] pub display_name: Option, + /// The RP local ID of the user. + #[serde(rename="localId")] + pub local_id: Option, + /// The Gitkit id token to login the newly sign up user. + #[serde(rename="idToken")] + pub id_token: Option, + /// If idToken is STS id token, then this field will be refresh token. + #[serde(rename="refreshToken")] + pub refresh_token: Option, /// The email of the user. pub email: Option, } @@ -1096,77 +1330,22 @@ pub struct SignupNewUserResponse { impl ResponseResult for SignupNewUserResponse {} -/// Respone of setting the account information. +/// Respone of deleting account. /// /// # Activities /// /// This type is used in activities, which are methods you may call on this type or where this type is involved in. /// The list links the activity name, along with information about where it is used (one of *request* and *response*). /// -/// * [set account info relyingparty](struct.RelyingpartySetAccountInfoCall.html) (response) +/// * [delete account relyingparty](struct.RelyingpartyDeleteAccountCall.html) (response) /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] -pub struct SetAccountInfoResponse { - /// The fixed string "identitytoolkit#SetAccountInfoResponse". +pub struct DeleteAccountResponse { + /// The fixed string "identitytoolkit#DeleteAccountResponse". pub kind: Option, - /// The name of the user. - #[serde(rename="displayName")] - pub display_name: Option, - /// The user's profiles at the associated IdPs. - #[serde(rename="providerUserInfo")] - pub provider_user_info: Option>, - /// The new email the user attempts to change to. - #[serde(rename="newEmail")] - pub new_email: Option, - /// The photo url of the user. - #[serde(rename="photoUrl")] - pub photo_url: Option, - /// The Gitkit id token to login the newly sign up user. - #[serde(rename="idToken")] - pub id_token: Option, - /// The email of the user. - pub email: Option, } -impl ResponseResult for SetAccountInfoResponse {} - - -/// Request to verify the password. -/// -/// # Activities -/// -/// This type is used in activities, which are methods you may call on this type or where this type is involved in. -/// The list links the activity name, along with information about where it is used (one of *request* and *response*). -/// -/// * [verify password relyingparty](struct.RelyingpartyVerifyPasswordCall.html) (request) -/// -#[derive(Default, Clone, Debug, Serialize, Deserialize)] -pub struct IdentitytoolkitRelyingpartyVerifyPasswordRequest { - /// GCP project number of the requesting delegated app. Currently only intended for Firebase V1 migration. - #[serde(rename="delegatedProjectNumber")] - pub delegated_project_number: Option, - /// Instance id token of the app. - #[serde(rename="instanceId")] - pub instance_id: Option, - /// The GITKit token of the authenticated user. - #[serde(rename="idToken")] - pub id_token: Option, - /// The GITKit token for the non-trusted IDP, which is to be confirmed by the user. - #[serde(rename="pendingIdToken")] - pub pending_id_token: Option, - /// The captcha challenge. - #[serde(rename="captchaChallenge")] - pub captcha_challenge: Option, - /// Response to the captcha. - #[serde(rename="captchaResponse")] - pub captcha_response: Option, - /// The password inputed by the user. - pub password: Option, - /// The email of the user. - pub email: Option, -} - -impl RequestValue for IdentitytoolkitRelyingpartyVerifyPasswordRequest {} +impl ResponseResult for DeleteAccountResponse {} @@ -1197,7 +1376,7 @@ impl RequestValue for IdentitytoolkitRelyingpartyVerifyPasswordRequest {} /// ::default(), None); /// let mut hub = IdentityToolkit::new(hyper::Client::new(), auth); /// // Usually you wouldn't bind this to a variable, but keep calling *CallBuilders* -/// // like `create_auth_uri(...)`, `delete_account(...)`, `download_account(...)`, `get_account_info(...)`, `get_oob_confirmation_code(...)`, `get_project_config(...)`, `get_public_keys(...)`, `get_recaptcha_param(...)`, `reset_password(...)`, `set_account_info(...)`, `sign_out_user(...)`, `signup_new_user(...)`, `upload_account(...)`, `verify_assertion(...)`, `verify_custom_token(...)` and `verify_password(...)` +/// // like `create_auth_uri(...)`, `delete_account(...)`, `download_account(...)`, `get_account_info(...)`, `get_oob_confirmation_code(...)`, `get_project_config(...)`, `get_public_keys(...)`, `get_recaptcha_param(...)`, `reset_password(...)`, `set_account_info(...)`, `set_project_config(...)`, `sign_out_user(...)`, `signup_new_user(...)`, `upload_account(...)`, `verify_assertion(...)`, `verify_custom_token(...)` and `verify_password(...)` /// // to build up your call. /// let rb = hub.relyingparty(); /// # } @@ -1442,12 +1621,30 @@ impl<'a, C, A> RelyingpartyMethods<'a, C, A> { } } + /// Create a builder to help you perform the following task: + /// + /// Set project configuration. + /// + /// # Arguments + /// + /// * `request` - No description provided. + pub fn set_project_config(&self, request: IdentitytoolkitRelyingpartySetProjectConfigRequest) -> RelyingpartySetProjectConfigCall<'a, C, A> { + RelyingpartySetProjectConfigCall { + hub: self.hub, + _request: request, + _delegate: Default::default(), + _additional_params: Default::default(), + } + } + /// Create a builder to help you perform the following task: /// /// Get project configuration. pub fn get_project_config(&self) -> RelyingpartyGetProjectConfigCall<'a, C, A> { RelyingpartyGetProjectConfigCall { hub: self.hub, + _project_number: Default::default(), + _delegated_project_number: Default::default(), _delegate: Default::default(), _additional_params: Default::default(), } @@ -1515,7 +1712,7 @@ impl<'a, C, A> RelyingpartyGetOobConfirmationCodeCall<'a, C, A> where C: BorrowM /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, GetOobConfirmationCodeResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -1726,7 +1923,7 @@ impl<'a, C, A> RelyingpartySignupNewUserCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, SignupNewUserResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -1937,7 +2134,7 @@ impl<'a, C, A> RelyingpartyCreateAuthUriCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, CreateAuthUriResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -2148,7 +2345,7 @@ impl<'a, C, A> RelyingpartySignOutUserCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, IdentitytoolkitRelyingpartySignOutUserResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -2359,7 +2556,7 @@ impl<'a, C, A> RelyingpartyVerifyAssertionCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, VerifyAssertionResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -2570,7 +2767,7 @@ impl<'a, C, A> RelyingpartyUploadAccountCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, UploadAccountResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -2781,7 +2978,7 @@ impl<'a, C, A> RelyingpartyGetAccountInfoCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, GetAccountInfoResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -2992,7 +3189,7 @@ impl<'a, C, A> RelyingpartyVerifyCustomTokenCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, VerifyCustomTokenResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -3203,7 +3400,7 @@ impl<'a, C, A> RelyingpartyResetPasswordCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, ResetPasswordResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -3414,7 +3611,7 @@ impl<'a, C, A> RelyingpartyDownloadAccountCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, DownloadAccountResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -3625,7 +3822,7 @@ impl<'a, C, A> RelyingpartySetAccountInfoCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, SetAccountInfoResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -3836,7 +4033,7 @@ impl<'a, C, A> RelyingpartyDeleteAccountCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, DeleteAccountResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -4040,7 +4237,7 @@ impl<'a, C, A> RelyingpartyGetPublicKeyCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, IdentitytoolkitRelyingpartyGetPublicKeysResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -4220,7 +4417,7 @@ impl<'a, C, A> RelyingpartyGetRecaptchaParamCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, GetRecaptchaParamResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -4407,7 +4604,7 @@ impl<'a, C, A> RelyingpartyVerifyPasswordCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, VerifyPasswordResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -4565,6 +4762,217 @@ impl<'a, C, A> RelyingpartyVerifyPasswordCall<'a, C, A> where C: BorrowMut::default(), None); +/// # let mut hub = IdentityToolkit::new(hyper::Client::new(), auth); +/// // As the method needs a request, you would usually fill it with the desired information +/// // into the respective structure. Some of the parts shown here might not be applicable ! +/// // Values shown here are possibly random and not representative ! +/// let mut req = IdentitytoolkitRelyingpartySetProjectConfigRequest::default(); +/// +/// // You can configure optional parameters by calling the respective setters at will, and +/// // execute the final call using `doit()`. +/// // Values shown here are possibly random and not representative ! +/// let result = hub.relyingparty().set_project_config(req) +/// .doit(); +/// # } +/// ``` +pub struct RelyingpartySetProjectConfigCall<'a, C, A> + where C: 'a, A: 'a { + + hub: &'a IdentityToolkit, + _request: IdentitytoolkitRelyingpartySetProjectConfigRequest, + _delegate: Option<&'a mut Delegate>, + _additional_params: HashMap, +} + +impl<'a, C, A> CallBuilder for RelyingpartySetProjectConfigCall<'a, C, A> {} + +impl<'a, C, A> RelyingpartySetProjectConfigCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { + + + /// Perform the operation you have build so far. + pub fn doit(mut self) -> Result<(hyper::client::Response, IdentitytoolkitRelyingpartySetProjectConfigResponse)> { + use std::io::{Read, Seek}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; + let mut dd = DefaultDelegate; + let mut dlg: &mut Delegate = match self._delegate { + Some(d) => d, + None => &mut dd + }; + dlg.begin(MethodInfo { id: "identitytoolkit.relyingparty.setProjectConfig", + http_method: hyper::method::Method::Post }); + let mut params: Vec<(&str, String)> = Vec::with_capacity((3 + self._additional_params.len())); + for &field in ["alt"].iter() { + if self._additional_params.contains_key(field) { + dlg.finished(false); + return Err(Error::FieldClash(field)); + } + } + for (name, value) in self._additional_params.iter() { + params.push((&name, value.clone())); + } + + params.push(("alt", "json".to_string())); + + let mut url = "https://www.googleapis.com/identitytoolkit/v3/relyingparty/setProjectConfig".to_string(); + + let mut key = self.hub.auth.borrow_mut().api_key(); + if key.is_none() { + key = dlg.api_key(); + } + match key { + Some(value) => params.push(("key", value)), + None => { + dlg.finished(false); + return Err(Error::MissingAPIKey) + } + } + + + if params.len() > 0 { + url.push('?'); + url.push_str(&url::form_urlencoded::serialize(params)); + } + + let mut json_mime_type = mime::Mime(mime::TopLevel::Application, mime::SubLevel::Json, Default::default()); + let mut request_value_reader = + { + let mut value = json::value::to_value(&self._request); + remove_json_null_values(&mut value); + let mut dst = io::Cursor::new(Vec::with_capacity(128)); + json::to_writer(&mut dst, &value).unwrap(); + dst + }; + let request_size = request_value_reader.seek(io::SeekFrom::End(0)).unwrap(); + request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); + + + loop { + request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); + let mut req_result = { + let mut client = &mut *self.hub.client.borrow_mut(); + let mut req = client.borrow_mut().request(hyper::method::Method::Post, &url) + .header(UserAgent(self.hub._user_agent.clone())) + .header(ContentType(json_mime_type.clone())) + .header(ContentLength(request_size as u64)) + .body(&mut request_value_reader); + + dlg.pre_request(); + req.send() + }; + + match req_result { + Err(err) => { + if let oauth2::Retry::After(d) = dlg.http_error(&err) { + sleep(d); + continue; + } + dlg.finished(false); + return Err(Error::HttpError(err)) + } + Ok(mut res) => { + if !res.status.is_success() { + let mut json_err = String::new(); + res.read_to_string(&mut json_err).unwrap(); + if let oauth2::Retry::After(d) = dlg.http_failure(&res, + json::from_str(&json_err).ok(), + json::from_str(&json_err).ok()) { + sleep(d); + continue; + } + dlg.finished(false); + return match json::from_str::(&json_err){ + Err(_) => Err(Error::Failure(res)), + Ok(serr) => Err(Error::BadRequest(serr)) + } + } + let result_value = { + let mut json_response = String::new(); + res.read_to_string(&mut json_response).unwrap(); + match json::from_str(&json_response) { + Ok(decoded) => (res, decoded), + Err(err) => { + dlg.response_json_decode_error(&json_response, &err); + return Err(Error::JsonDecodeError(json_response, err)); + } + } + }; + + dlg.finished(true); + return Ok(result_value) + } + } + } + } + + + /// + /// Sets the *request* property to the given value. + /// + /// Even though the property as already been set when instantiating this call, + /// we provide this method for API completeness. + pub fn request(mut self, new_value: IdentitytoolkitRelyingpartySetProjectConfigRequest) -> RelyingpartySetProjectConfigCall<'a, C, A> { + self._request = new_value; + self + } + /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong + /// while executing the actual API request. + /// + /// It should be used to handle progress information, and to implement a certain level of resilience. + /// + /// Sets the *delegate* property to the given value. + pub fn delegate(mut self, new_value: &'a mut Delegate) -> RelyingpartySetProjectConfigCall<'a, C, A> { + self._delegate = Some(new_value); + self + } + + /// Set any additional parameter of the query string used in the request. + /// It should be used to set parameters which are not yet available through their own + /// setters. + /// + /// Please note that this method must not be used to set any of the known paramters + /// which have their own setter method. If done anyway, the request will fail. + /// + /// # Additional Parameters + /// + /// * *quotaUser* (query-string) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. Overrides userIp if both are provided. + /// * *oauth_token* (query-string) - OAuth 2.0 token for the current user. + /// * *key* (query-string) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. + /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. + /// * *userIp* (query-string) - IP address of the site where the request originates. Use this if you want to enforce per-user limits. + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *alt* (query-string) - Data format for the response. + pub fn param(mut self, name: T, value: T) -> RelyingpartySetProjectConfigCall<'a, C, A> + where T: AsRef { + self._additional_params.insert(name.as_ref().to_string(), value.as_ref().to_string()); + self + } + +} + + /// Get project configuration. /// /// A builder for the *getProjectConfig* method supported by a *relyingparty* resource. @@ -4592,6 +5000,8 @@ impl<'a, C, A> RelyingpartyVerifyPasswordCall<'a, C, A> where C: BorrowMut where C: 'a, A: 'a { hub: &'a IdentityToolkit, + _project_number: Option, + _delegated_project_number: Option, _delegate: Option<&'a mut Delegate>, _additional_params: HashMap, } @@ -4611,7 +5023,7 @@ impl<'a, C, A> RelyingpartyGetProjectConfigCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, IdentitytoolkitRelyingpartyGetProjectConfigResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -4619,8 +5031,14 @@ impl<'a, C, A> RelyingpartyGetProjectConfigCall<'a, C, A> where C: BorrowMut = Vec::with_capacity((2 + self._additional_params.len())); - for &field in ["alt"].iter() { + let mut params: Vec<(&str, String)> = Vec::with_capacity((4 + self._additional_params.len())); + if let Some(value) = self._project_number { + params.push(("projectNumber", value.to_string())); + } + if let Some(value) = self._delegated_project_number { + params.push(("delegatedProjectNumber", value.to_string())); + } + for &field in ["alt", "projectNumber", "delegatedProjectNumber"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); return Err(Error::FieldClash(field)); @@ -4709,6 +5127,20 @@ impl<'a, C, A> RelyingpartyGetProjectConfigCall<'a, C, A> where C: BorrowMut RelyingpartyGetProjectConfigCall<'a, C, A> { + self._project_number = Some(new_value.to_string()); + self + } + /// Delegated GCP project number of the request. + /// + /// Sets the *delegated project number* query property to the given value. + pub fn delegated_project_number(mut self, new_value: &str) -> RelyingpartyGetProjectConfigCall<'a, C, A> { + self._delegated_project_number = Some(new_value.to_string()); + self + } /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// diff --git a/gen/kgsearch1-cli/Cargo.toml b/gen/kgsearch1-cli/Cargo.toml index c52899a4d3..3d7f0e77b7 100644 --- a/gen/kgsearch1-cli/Cargo.toml +++ b/gen/kgsearch1-cli/Cargo.toml @@ -4,7 +4,7 @@ [package] name = "google-kgsearch1-cli" -version = "0.3.3+20151215" +version = "0.3.4+20151215" authors = ["Sebastian Thiel "] description = "A complete library to interact with kgsearch (protocol v1)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/kgsearch1-cli" @@ -17,18 +17,18 @@ keywords = ["kgsearch", "google", "cli"] name = "kgsearch1" [dependencies] -hyper = "0.7" -mime = "0.1.0" -serde = ">= 0.7.0" -serde_json = ">= 0.7.0" -yup-oauth2 = ">= 0.5.4" +hyper = "0.8" +mime = "0.2.0" +serde = "0.6.0" +serde_json = "0.6.0" +yup-oauth2 = ">= 0.5.6" strsim = "0.4" yup-hyper-mock = "1.0" clap = "2.0" [build-dependencies] -syntex = { version = ">= 0.23" } -serde_codegen = { version = ">= 0.6" } +syntex = { version = "= 0.28" } +serde_codegen = { version = "= 0.6.13" } [dependencies.google-kgsearch1] diff --git a/gen/kgsearch1-cli/README.md b/gen/kgsearch1-cli/README.md index 896f8a5468..27fc0cbf85 100644 --- a/gen/kgsearch1-cli/README.md +++ b/gen/kgsearch1-cli/README.md @@ -17,14 +17,14 @@ Everything else about the *kgsearch* API can be found at the You can download the pre-compiled 64bit binaries for the following platforms: -* ![icon](http://megaicons.net/static/img/icons_sizes/6/140/16/ubuntu-icon.png) [ubuntu](http://dl.byronimo.de/google.rs/cli/0.3.3/ubuntu/kgsearch1.tar.gz) -* ![icon](http://hydra-media.cursecdn.com/wow.gamepedia.com/a/a2/Apple-icon-16x16.png?version=25ddd67ac3dd3b634478e3978b76cb74) [osx](http://dl.byronimo.de/google.rs/cli/0.3.3/osx/kgsearch1.tar.gz) +* ![icon](http://megaicons.net/static/img/icons_sizes/6/140/16/ubuntu-icon.png) [ubuntu](http://dl.byronimo.de/google.rs/cli/0.3.4/ubuntu/kgsearch1.tar.gz) +* ![icon](http://hydra-media.cursecdn.com/wow.gamepedia.com/a/a2/Apple-icon-16x16.png?version=25ddd67ac3dd3b634478e3978b76cb74) [osx](http://dl.byronimo.de/google.rs/cli/0.3.4/osx/kgsearch1.tar.gz) Find the source code [on github](https://github.com/Byron/google-apis-rs/tree/master/gen/kgsearch1-cli). # Usage -This documentation was generated from the *kgsearch* API at revision *20151215*. The CLI is at version *0.3.3*. +This documentation was generated from the *kgsearch* API at revision *20151215*. The CLI is at version *0.3.4*. ```bash kgsearch1 [options] diff --git a/gen/kgsearch1-cli/mkdocs.yml b/gen/kgsearch1-cli/mkdocs.yml index a28ae00be5..a32dea7500 100644 --- a/gen/kgsearch1-cli/mkdocs.yml +++ b/gen/kgsearch1-cli/mkdocs.yml @@ -1,4 +1,4 @@ -site_name: kgsearch v0.3.3+20151215 +site_name: kgsearch v0.3.4+20151215 site_url: http://byron.github.io/google-apis-rs/google-kgsearch1-cli site_description: Write integrating applications with bcore diff --git a/gen/kgsearch1-cli/src/cmn.rs b/gen/kgsearch1-cli/src/cmn.rs index 188159ee80..ae86fdef65 100644 --- a/gen/kgsearch1-cli/src/cmn.rs +++ b/gen/kgsearch1-cli/src/cmn.rs @@ -414,7 +414,7 @@ impl TokenStorage for JsonTokenStorage { Err(err) => match err.kind() { io::ErrorKind::NotFound => Ok(()), - _ => Err(json::Error::Io(err)) + _ => Err(json::Error::IoError(err)) }, Ok(_) => Ok(()), } @@ -427,7 +427,7 @@ impl TokenStorage for JsonTokenStorage { Err(serde_err) => Err(serde_err), } }, - Err(io_err) => Err(json::Error::Io(io_err)) + Err(io_err) => Err(json::Error::IoError(io_err)) } } } @@ -444,7 +444,7 @@ impl TokenStorage for JsonTokenStorage { Err(io_err) => { match io_err.kind() { io::ErrorKind::NotFound => Ok(None), - _ => Err(json::Error::Io(io_err)) + _ => Err(json::Error::IoError(io_err)) } } } @@ -683,7 +683,7 @@ pub fn application_secret_from_directory(dir: &str, = json::from_str(json_console_secret).unwrap(); match json::to_writer_pretty(&mut f, &console_secret) { Err(serde_err) => match serde_err { - json::Error::Io(err) => err, + json::Error::IoError(err) => err, _ => panic!("Unexpected serde error: {:#?}", serde_err) }, Ok(_) => continue, @@ -696,7 +696,7 @@ pub fn application_secret_from_directory(dir: &str, }, Ok(f) => { match json::de::from_reader::<_, ConsoleApplicationSecret>(f) { - Err(json::Error::Io(err)) => + Err(json::Error::IoError(err)) => return secret_io_error(err), Err(json_err) => return Err(CLIError::Configuration( diff --git a/gen/kgsearch1-cli/src/main.rs b/gen/kgsearch1-cli/src/main.rs index 0b77a31543..b01ffa934b 100644 --- a/gen/kgsearch1-cli/src/main.rs +++ b/gen/kgsearch1-cli/src/main.rs @@ -241,7 +241,7 @@ fn main() { let mut app = App::new("kgsearch1") .author("Sebastian Thiel ") - .version("0.3.3+20151215") + .version("0.3.4+20151215") .about("Knowledge Graph Search API allows developers to search the Google Knowledge Graph for entities.") .after_help("All documentation details can be found at http://byron.github.io/google-apis-rs/google_kgsearch1_cli") .arg(Arg::with_name("folder") diff --git a/gen/kgsearch1/Cargo.toml b/gen/kgsearch1/Cargo.toml index 3c996fdf46..b81b4d56d0 100644 --- a/gen/kgsearch1/Cargo.toml +++ b/gen/kgsearch1/Cargo.toml @@ -4,7 +4,7 @@ [package] name = "google-kgsearch1" -version = "0.1.12+20151215" +version = "0.1.13+20151215" authors = ["Sebastian Thiel "] description = "A complete library to interact with kgsearch (protocol v1)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/kgsearch1" @@ -16,14 +16,14 @@ build = "src/build.rs" [dependencies] -hyper = "0.7" -mime = "0.1.0" -serde = ">= 0.7.0" -serde_json = ">= 0.7.0" -yup-oauth2 = ">= 0.5.4" +hyper = "0.8" +mime = "0.2.0" +serde = "0.6.0" +serde_json = "0.6.0" +yup-oauth2 = ">= 0.5.6" url = ">= 0.5" [build-dependencies] -syntex = { version = ">= 0.23" } -serde_codegen = { version = ">= 0.6" } +syntex = { version = "= 0.28" } +serde_codegen = { version = "= 0.6.13" } diff --git a/gen/kgsearch1/README.md b/gen/kgsearch1/README.md index fc4103fa16..14b0bf2379 100644 --- a/gen/kgsearch1/README.md +++ b/gen/kgsearch1/README.md @@ -5,7 +5,7 @@ DO NOT EDIT ! --> The `google-kgsearch1` library allows access to all features of the *Google kgsearch* service. -This documentation was generated from *kgsearch* crate version *0.1.12+20151215*, where *20151215* is the exact revision of the *kgsearch:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.12*. +This documentation was generated from *kgsearch* crate version *0.1.13+20151215*, where *20151215* is the exact revision of the *kgsearch:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.13*. Everything else about the *kgsearch* *v1* API can be found at the [official documentation site](https://developers.google.com/knowledge-graph/). diff --git a/gen/kgsearch1/src/cmn.rs b/gen/kgsearch1/src/cmn.rs index 87b91a8986..c69621da55 100644 --- a/gen/kgsearch1/src/cmn.rs +++ b/gen/kgsearch1/src/cmn.rs @@ -12,7 +12,7 @@ use mime::{Mime, TopLevel, SubLevel, Attr, Value}; use oauth2::{TokenType, Retry, self}; use hyper; use hyper::header::{ContentType, ContentLength, Headers, UserAgent, Authorization, Header, - HeaderFormat}; + HeaderFormat, Bearer}; use hyper::http::h1::LINE_ENDING; use hyper::method::Method; use hyper::status::StatusCode; @@ -634,7 +634,7 @@ pub struct ResumableUploadHelper<'a, A: 'a> { pub start_at: Option, pub auth: &'a mut A, pub user_agent: &'a str, - pub auth_header: Authorization, + pub auth_header: Authorization, pub url: &'a str, pub reader: &'a mut ReadSeek, pub media_type: Mime, diff --git a/gen/kgsearch1/src/lib.rs b/gen/kgsearch1/src/lib.rs index 8c6257f407..4d3b73387a 100644 --- a/gen/kgsearch1/src/lib.rs +++ b/gen/kgsearch1/src/lib.rs @@ -2,7 +2,7 @@ // This file was generated automatically from 'src/mako/api/lib.rs.mako' // DO NOT EDIT ! -//! This documentation was generated from *kgsearch* crate version *0.1.12+20151215*, where *20151215* is the exact revision of the *kgsearch:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.12*. +//! This documentation was generated from *kgsearch* crate version *0.1.13+20151215*, where *20151215* is the exact revision of the *kgsearch:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.13*. //! //! Everything else about the *kgsearch* *v1* API can be found at the //! [official documentation site](https://developers.google.com/knowledge-graph/). diff --git a/gen/kgsearch1/src/lib.rs.in b/gen/kgsearch1/src/lib.rs.in index 32a21ba630..6948839769 100644 --- a/gen/kgsearch1/src/lib.rs.in +++ b/gen/kgsearch1/src/lib.rs.in @@ -112,7 +112,7 @@ impl<'a, C, A> Kgsearch Kgsearch { client: RefCell::new(client), auth: RefCell::new(authenticator), - _user_agent: "google-api-rust-client/0.1.12".to_string(), + _user_agent: "google-api-rust-client/0.1.13".to_string(), } } @@ -121,7 +121,7 @@ impl<'a, C, A> Kgsearch } /// Set the user-agent header field to use in all requests to the server. - /// It defaults to `google-api-rust-client/0.1.12`. + /// It defaults to `google-api-rust-client/0.1.13`. /// /// Returns the previously set user-agent. pub fn user_agent(&mut self, agent_name: String) -> String { @@ -289,7 +289,7 @@ impl<'a, C, A> EntitySearchCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, SearchResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, diff --git a/gen/licensing1-cli/Cargo.toml b/gen/licensing1-cli/Cargo.toml index c186239b47..2d3da2e3c4 100644 --- a/gen/licensing1-cli/Cargo.toml +++ b/gen/licensing1-cli/Cargo.toml @@ -4,7 +4,7 @@ [package] name = "google-licensing1-cli" -version = "0.3.3+20150901" +version = "0.3.4+20150901" authors = ["Sebastian Thiel "] description = "A complete library to interact with licensing (protocol v1)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/licensing1-cli" @@ -17,18 +17,18 @@ keywords = ["licensing", "google", "cli"] name = "licensing1" [dependencies] -hyper = "0.7" -mime = "0.1.0" -serde = ">= 0.7.0" -serde_json = ">= 0.7.0" -yup-oauth2 = ">= 0.5.4" +hyper = "0.8" +mime = "0.2.0" +serde = "0.6.0" +serde_json = "0.6.0" +yup-oauth2 = ">= 0.5.6" strsim = "0.4" yup-hyper-mock = "1.0" clap = "2.0" [build-dependencies] -syntex = { version = ">= 0.23" } -serde_codegen = { version = ">= 0.6" } +syntex = { version = "= 0.28" } +serde_codegen = { version = "= 0.6.13" } [dependencies.google-licensing1] diff --git a/gen/licensing1-cli/README.md b/gen/licensing1-cli/README.md index 83f877c16b..eb531870a4 100644 --- a/gen/licensing1-cli/README.md +++ b/gen/licensing1-cli/README.md @@ -17,14 +17,14 @@ Everything else about the *licensing* API can be found at the You can download the pre-compiled 64bit binaries for the following platforms: -* ![icon](http://megaicons.net/static/img/icons_sizes/6/140/16/ubuntu-icon.png) [ubuntu](http://dl.byronimo.de/google.rs/cli/0.3.3/ubuntu/licensing1.tar.gz) -* ![icon](http://hydra-media.cursecdn.com/wow.gamepedia.com/a/a2/Apple-icon-16x16.png?version=25ddd67ac3dd3b634478e3978b76cb74) [osx](http://dl.byronimo.de/google.rs/cli/0.3.3/osx/licensing1.tar.gz) +* ![icon](http://megaicons.net/static/img/icons_sizes/6/140/16/ubuntu-icon.png) [ubuntu](http://dl.byronimo.de/google.rs/cli/0.3.4/ubuntu/licensing1.tar.gz) +* ![icon](http://hydra-media.cursecdn.com/wow.gamepedia.com/a/a2/Apple-icon-16x16.png?version=25ddd67ac3dd3b634478e3978b76cb74) [osx](http://dl.byronimo.de/google.rs/cli/0.3.4/osx/licensing1.tar.gz) Find the source code [on github](https://github.com/Byron/google-apis-rs/tree/master/gen/licensing1-cli). # Usage -This documentation was generated from the *licensing* API at revision *20150901*. The CLI is at version *0.3.3*. +This documentation was generated from the *licensing* API at revision *20150901*. The CLI is at version *0.3.4*. ```bash licensing1 [options] diff --git a/gen/licensing1-cli/mkdocs.yml b/gen/licensing1-cli/mkdocs.yml index 5bd0aa7788..60b0fe9c0b 100644 --- a/gen/licensing1-cli/mkdocs.yml +++ b/gen/licensing1-cli/mkdocs.yml @@ -1,4 +1,4 @@ -site_name: licensing v0.3.3+20150901 +site_name: licensing v0.3.4+20150901 site_url: http://byron.github.io/google-apis-rs/google-licensing1-cli site_description: Write integrating applications with bcore diff --git a/gen/licensing1-cli/src/cmn.rs b/gen/licensing1-cli/src/cmn.rs index 188159ee80..ae86fdef65 100644 --- a/gen/licensing1-cli/src/cmn.rs +++ b/gen/licensing1-cli/src/cmn.rs @@ -414,7 +414,7 @@ impl TokenStorage for JsonTokenStorage { Err(err) => match err.kind() { io::ErrorKind::NotFound => Ok(()), - _ => Err(json::Error::Io(err)) + _ => Err(json::Error::IoError(err)) }, Ok(_) => Ok(()), } @@ -427,7 +427,7 @@ impl TokenStorage for JsonTokenStorage { Err(serde_err) => Err(serde_err), } }, - Err(io_err) => Err(json::Error::Io(io_err)) + Err(io_err) => Err(json::Error::IoError(io_err)) } } } @@ -444,7 +444,7 @@ impl TokenStorage for JsonTokenStorage { Err(io_err) => { match io_err.kind() { io::ErrorKind::NotFound => Ok(None), - _ => Err(json::Error::Io(io_err)) + _ => Err(json::Error::IoError(io_err)) } } } @@ -683,7 +683,7 @@ pub fn application_secret_from_directory(dir: &str, = json::from_str(json_console_secret).unwrap(); match json::to_writer_pretty(&mut f, &console_secret) { Err(serde_err) => match serde_err { - json::Error::Io(err) => err, + json::Error::IoError(err) => err, _ => panic!("Unexpected serde error: {:#?}", serde_err) }, Ok(_) => continue, @@ -696,7 +696,7 @@ pub fn application_secret_from_directory(dir: &str, }, Ok(f) => { match json::de::from_reader::<_, ConsoleApplicationSecret>(f) { - Err(json::Error::Io(err)) => + Err(json::Error::IoError(err)) => return secret_io_error(err), Err(json_err) => return Err(CLIError::Configuration( diff --git a/gen/licensing1-cli/src/main.rs b/gen/licensing1-cli/src/main.rs index 71a91b52c8..fcb38d9b7c 100644 --- a/gen/licensing1-cli/src/main.rs +++ b/gen/licensing1-cli/src/main.rs @@ -885,7 +885,7 @@ fn main() { let mut app = App::new("licensing1") .author("Sebastian Thiel ") - .version("0.3.3+20150901") + .version("0.3.4+20150901") .about("Licensing API to view and manage license for your domain.") .after_help("All documentation details can be found at http://byron.github.io/google-apis-rs/google_licensing1_cli") .arg(Arg::with_name("url") diff --git a/gen/licensing1/Cargo.toml b/gen/licensing1/Cargo.toml index e916071808..b0d3660b89 100644 --- a/gen/licensing1/Cargo.toml +++ b/gen/licensing1/Cargo.toml @@ -4,7 +4,7 @@ [package] name = "google-licensing1" -version = "0.1.12+20150901" +version = "0.1.13+20150901" authors = ["Sebastian Thiel "] description = "A complete library to interact with licensing (protocol v1)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/licensing1" @@ -16,14 +16,14 @@ build = "src/build.rs" [dependencies] -hyper = "0.7" -mime = "0.1.0" -serde = ">= 0.7.0" -serde_json = ">= 0.7.0" -yup-oauth2 = ">= 0.5.4" +hyper = "0.8" +mime = "0.2.0" +serde = "0.6.0" +serde_json = "0.6.0" +yup-oauth2 = ">= 0.5.6" url = ">= 0.5" [build-dependencies] -syntex = { version = ">= 0.23" } -serde_codegen = { version = ">= 0.6" } +syntex = { version = "= 0.28" } +serde_codegen = { version = "= 0.6.13" } diff --git a/gen/licensing1/README.md b/gen/licensing1/README.md index 8eade9e725..75c7832eaf 100644 --- a/gen/licensing1/README.md +++ b/gen/licensing1/README.md @@ -5,7 +5,7 @@ DO NOT EDIT ! --> The `google-licensing1` library allows access to all features of the *Google licensing* service. -This documentation was generated from *licensing* crate version *0.1.12+20150901*, where *20150901* is the exact revision of the *licensing:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.12*. +This documentation was generated from *licensing* crate version *0.1.13+20150901*, where *20150901* is the exact revision of the *licensing:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.13*. Everything else about the *licensing* *v1* API can be found at the [official documentation site](https://developers.google.com/google-apps/licensing/). diff --git a/gen/licensing1/src/cmn.rs b/gen/licensing1/src/cmn.rs index 87b91a8986..c69621da55 100644 --- a/gen/licensing1/src/cmn.rs +++ b/gen/licensing1/src/cmn.rs @@ -12,7 +12,7 @@ use mime::{Mime, TopLevel, SubLevel, Attr, Value}; use oauth2::{TokenType, Retry, self}; use hyper; use hyper::header::{ContentType, ContentLength, Headers, UserAgent, Authorization, Header, - HeaderFormat}; + HeaderFormat, Bearer}; use hyper::http::h1::LINE_ENDING; use hyper::method::Method; use hyper::status::StatusCode; @@ -634,7 +634,7 @@ pub struct ResumableUploadHelper<'a, A: 'a> { pub start_at: Option, pub auth: &'a mut A, pub user_agent: &'a str, - pub auth_header: Authorization, + pub auth_header: Authorization, pub url: &'a str, pub reader: &'a mut ReadSeek, pub media_type: Mime, diff --git a/gen/licensing1/src/lib.rs b/gen/licensing1/src/lib.rs index e0182021f3..274a3406a9 100644 --- a/gen/licensing1/src/lib.rs +++ b/gen/licensing1/src/lib.rs @@ -2,7 +2,7 @@ // This file was generated automatically from 'src/mako/api/lib.rs.mako' // DO NOT EDIT ! -//! This documentation was generated from *licensing* crate version *0.1.12+20150901*, where *20150901* is the exact revision of the *licensing:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.12*. +//! This documentation was generated from *licensing* crate version *0.1.13+20150901*, where *20150901* is the exact revision of the *licensing:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.13*. //! //! Everything else about the *licensing* *v1* API can be found at the //! [official documentation site](https://developers.google.com/google-apps/licensing/). diff --git a/gen/licensing1/src/lib.rs.in b/gen/licensing1/src/lib.rs.in index a1e8b68bc2..c7db7b9720 100644 --- a/gen/licensing1/src/lib.rs.in +++ b/gen/licensing1/src/lib.rs.in @@ -129,7 +129,7 @@ impl<'a, C, A> Licensing Licensing { client: RefCell::new(client), auth: RefCell::new(authenticator), - _user_agent: "google-api-rust-client/0.1.12".to_string(), + _user_agent: "google-api-rust-client/0.1.13".to_string(), } } @@ -138,7 +138,7 @@ impl<'a, C, A> Licensing } /// Set the user-agent header field to use in all requests to the server. - /// It defaults to `google-api-rust-client/0.1.12`. + /// It defaults to `google-api-rust-client/0.1.13`. /// /// Returns the previously set user-agent. pub fn user_agent(&mut self, agent_name: String) -> String { @@ -492,7 +492,7 @@ impl<'a, C, A> LicenseAssignmentDeleteCall<'a, C, A> where C: BorrowMut Result { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -562,8 +562,7 @@ impl<'a, C, A> LicenseAssignmentDeleteCall<'a, C, A> where C: BorrowMut LicenseAssignmentListForProductCall<'a, C, A> where C: BorrowMut< /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, LicenseAssignmentList)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -820,8 +819,7 @@ impl<'a, C, A> LicenseAssignmentListForProductCall<'a, C, A> where C: BorrowMut< } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -1013,7 +1011,7 @@ impl<'a, C, A> LicenseAssignmentGetCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, LicenseAssignment)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -1084,8 +1082,7 @@ impl<'a, C, A> LicenseAssignmentGetCall<'a, C, A> where C: BorrowMut LicenseAssignmentListForProductAndSkuCall<'a, C, A> where C: Borr /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, LicenseAssignmentList)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -1354,8 +1351,7 @@ impl<'a, C, A> LicenseAssignmentListForProductAndSkuCall<'a, C, A> where C: Borr } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -1564,7 +1560,7 @@ impl<'a, C, A> LicenseAssignmentUpdateCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, LicenseAssignment)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -1646,8 +1642,7 @@ impl<'a, C, A> LicenseAssignmentUpdateCall<'a, C, A> where C: BorrowMut LicenseAssignmentPatchCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, LicenseAssignment)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -1937,8 +1932,7 @@ impl<'a, C, A> LicenseAssignmentPatchCall<'a, C, A> where C: BorrowMut LicenseAssignmentInsertCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, LicenseAssignment)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -2226,8 +2220,7 @@ impl<'a, C, A> LicenseAssignmentInsertCall<'a, C, A> where C: BorrowMut"] description = "A complete library to interact with logging (protocol v2beta1)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/logging2_beta1-cli" @@ -17,18 +17,18 @@ keywords = ["logging", "google", "cli"] name = "logging2-beta1" [dependencies] -hyper = "0.7" -mime = "0.1.0" -serde = ">= 0.7.0" -serde_json = ">= 0.7.0" -yup-oauth2 = ">= 0.5.4" +hyper = "0.8" +mime = "0.2.0" +serde = "0.6.0" +serde_json = "0.6.0" +yup-oauth2 = ">= 0.5.6" strsim = "0.4" yup-hyper-mock = "1.0" clap = "2.0" [build-dependencies] -syntex = { version = ">= 0.23" } -serde_codegen = { version = ">= 0.6" } +syntex = { version = "= 0.28" } +serde_codegen = { version = "= 0.6.13" } [dependencies.google-logging2_beta1] diff --git a/gen/logging2_beta1-cli/README.md b/gen/logging2_beta1-cli/README.md index bcd028566b..fa1e82d1b2 100644 --- a/gen/logging2_beta1-cli/README.md +++ b/gen/logging2_beta1-cli/README.md @@ -17,14 +17,14 @@ Everything else about the *logging* API can be found at the You can download the pre-compiled 64bit binaries for the following platforms: -* ![icon](http://megaicons.net/static/img/icons_sizes/6/140/16/ubuntu-icon.png) [ubuntu](http://dl.byronimo.de/google.rs/cli/0.3.3/ubuntu/logging2-beta1.tar.gz) -* ![icon](http://hydra-media.cursecdn.com/wow.gamepedia.com/a/a2/Apple-icon-16x16.png?version=25ddd67ac3dd3b634478e3978b76cb74) [osx](http://dl.byronimo.de/google.rs/cli/0.3.3/osx/logging2-beta1.tar.gz) +* ![icon](http://megaicons.net/static/img/icons_sizes/6/140/16/ubuntu-icon.png) [ubuntu](http://dl.byronimo.de/google.rs/cli/0.3.4/ubuntu/logging2-beta1.tar.gz) +* ![icon](http://hydra-media.cursecdn.com/wow.gamepedia.com/a/a2/Apple-icon-16x16.png?version=25ddd67ac3dd3b634478e3978b76cb74) [osx](http://dl.byronimo.de/google.rs/cli/0.3.4/osx/logging2-beta1.tar.gz) Find the source code [on github](https://github.com/Byron/google-apis-rs/tree/master/gen/logging2_beta1-cli). # Usage -This documentation was generated from the *logging* API at revision *20160104*. The CLI is at version *0.3.3*. +This documentation was generated from the *logging* API at revision *20160322*. The CLI is at version *0.3.4*. ```bash logging2-beta1 [options] diff --git a/gen/logging2_beta1-cli/mkdocs.yml b/gen/logging2_beta1-cli/mkdocs.yml index 3e6b572c82..b4a29e0cf6 100644 --- a/gen/logging2_beta1-cli/mkdocs.yml +++ b/gen/logging2_beta1-cli/mkdocs.yml @@ -1,4 +1,4 @@ -site_name: logging v0.3.3+20160104 +site_name: logging v0.3.4+20160322 site_url: http://byron.github.io/google-apis-rs/google-logging2_beta1-cli site_description: Write integrating applications with bcore diff --git a/gen/logging2_beta1-cli/src/cmn.rs b/gen/logging2_beta1-cli/src/cmn.rs index 188159ee80..ae86fdef65 100644 --- a/gen/logging2_beta1-cli/src/cmn.rs +++ b/gen/logging2_beta1-cli/src/cmn.rs @@ -414,7 +414,7 @@ impl TokenStorage for JsonTokenStorage { Err(err) => match err.kind() { io::ErrorKind::NotFound => Ok(()), - _ => Err(json::Error::Io(err)) + _ => Err(json::Error::IoError(err)) }, Ok(_) => Ok(()), } @@ -427,7 +427,7 @@ impl TokenStorage for JsonTokenStorage { Err(serde_err) => Err(serde_err), } }, - Err(io_err) => Err(json::Error::Io(io_err)) + Err(io_err) => Err(json::Error::IoError(io_err)) } } } @@ -444,7 +444,7 @@ impl TokenStorage for JsonTokenStorage { Err(io_err) => { match io_err.kind() { io::ErrorKind::NotFound => Ok(None), - _ => Err(json::Error::Io(io_err)) + _ => Err(json::Error::IoError(io_err)) } } } @@ -683,7 +683,7 @@ pub fn application_secret_from_directory(dir: &str, = json::from_str(json_console_secret).unwrap(); match json::to_writer_pretty(&mut f, &console_secret) { Err(serde_err) => match serde_err { - json::Error::Io(err) => err, + json::Error::IoError(err) => err, _ => panic!("Unexpected serde error: {:#?}", serde_err) }, Ok(_) => continue, @@ -696,7 +696,7 @@ pub fn application_secret_from_directory(dir: &str, }, Ok(f) => { match json::de::from_reader::<_, ConsoleApplicationSecret>(f) { - Err(json::Error::Io(err)) => + Err(json::Error::IoError(err)) => return secret_io_error(err), Err(json_err) => return Err(CLIError::Configuration( diff --git a/gen/logging2_beta1-cli/src/main.rs b/gen/logging2_beta1-cli/src/main.rs index 22a0c2bd82..d67ca7584c 100644 --- a/gen/logging2_beta1-cli/src/main.rs +++ b/gen/logging2_beta1-cli/src/main.rs @@ -68,13 +68,14 @@ impl<'n> Engine<'n> { let type_info: Option<(&'static str, JsonTypeInfo)> = match &temp_cursor.to_string()[..] { - "filter" => Some(("filter", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), - "project-ids" => Some(("projectIds", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Vec })), - "page-size" => Some(("pageSize", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), "order-by" => Some(("orderBy", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "page-size" => Some(("pageSize", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), + "partial-success" => Some(("partialSuccess", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "filter" => Some(("filter", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "page-token" => Some(("pageToken", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "project-ids" => Some(("projectIds", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Vec })), _ => { - let suggestion = FieldCursor::did_you_mean(key, &vec!["filter", "order-by", "page-size", "page-token", "project-ids"]); + let suggestion = FieldCursor::did_you_mean(key, &vec!["filter", "order-by", "page-size", "page-token", "partial-success", "project-ids"]); err.issues.push(CLIError::Field(FieldError::Unknown(temp_cursor.to_string(), suggestion, value.map(|v| v.to_string())))); None } @@ -159,10 +160,11 @@ impl<'n> Engine<'n> { match &temp_cursor.to_string()[..] { "resource.labels" => Some(("resource.labels", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Map })), "resource.type" => Some(("resource.type", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "partial-success" => Some(("partialSuccess", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), "labels" => Some(("labels", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Map })), "log-name" => Some(("logName", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), _ => { - let suggestion = FieldCursor::did_you_mean(key, &vec!["labels", "log-name", "resource", "type"]); + let suggestion = FieldCursor::did_you_mean(key, &vec!["labels", "log-name", "partial-success", "resource", "type"]); err.issues.push(CLIError::Field(FieldError::Unknown(temp_cursor.to_string(), suggestion, value.map(|v| v.to_string())))); None } @@ -1455,7 +1457,7 @@ fn main() { vec![ (Some(r##"project-name"##), None, - Some(r##"Required. The resource name of the project containing the sinks. Example: `"projects/my-logging-project"`, `"projects/01234567890"`."##), + Some(r##"Required. The resource name of the project containing the sinks. Example: `"projects/my-logging-project"`."##), Some(true), Some(false)), @@ -1505,8 +1507,8 @@ fn main() { let mut app = App::new("logging2-beta1") .author("Sebastian Thiel ") - .version("0.3.3+20160104") - .about("The Google Cloud Logging API lets you write log entries and manage your logs, log sinks and logs-based metrics.") + .version("0.3.4+20160322") + .about("Writes log entries and manages your logs, log sinks, and logs-based metrics.") .after_help("All documentation details can be found at http://byron.github.io/google-apis-rs/google_logging2_beta1_cli") .arg(Arg::with_name("url") .long("scope") diff --git a/gen/logging2_beta1/Cargo.toml b/gen/logging2_beta1/Cargo.toml index 61134cc1b6..8136305a04 100644 --- a/gen/logging2_beta1/Cargo.toml +++ b/gen/logging2_beta1/Cargo.toml @@ -4,7 +4,7 @@ [package] name = "google-logging2_beta1" -version = "0.1.12+20160104" +version = "0.1.13+20160322" authors = ["Sebastian Thiel "] description = "A complete library to interact with logging (protocol v2beta1)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/logging2_beta1" @@ -16,14 +16,14 @@ build = "src/build.rs" [dependencies] -hyper = "0.7" -mime = "0.1.0" -serde = ">= 0.7.0" -serde_json = ">= 0.7.0" -yup-oauth2 = ">= 0.5.4" +hyper = "0.8" +mime = "0.2.0" +serde = "0.6.0" +serde_json = "0.6.0" +yup-oauth2 = ">= 0.5.6" url = ">= 0.5" [build-dependencies] -syntex = { version = ">= 0.23" } -serde_codegen = { version = ">= 0.6" } +syntex = { version = "= 0.28" } +serde_codegen = { version = "= 0.6.13" } diff --git a/gen/logging2_beta1/README.md b/gen/logging2_beta1/README.md index a162ea6c5a..5b56d9a008 100644 --- a/gen/logging2_beta1/README.md +++ b/gen/logging2_beta1/README.md @@ -5,7 +5,7 @@ DO NOT EDIT ! --> The `google-logging2_beta1` library allows access to all features of the *Google logging* service. -This documentation was generated from *logging* crate version *0.1.12+20160104*, where *20160104* is the exact revision of the *logging:v2beta1* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.12*. +This documentation was generated from *logging* crate version *0.1.13+20160322*, where *20160322* is the exact revision of the *logging:v2beta1* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.13*. Everything else about the *logging* *v2_beta1* API can be found at the [official documentation site](https://cloud.google.com/logging/docs/). diff --git a/gen/logging2_beta1/src/cmn.rs b/gen/logging2_beta1/src/cmn.rs index 87b91a8986..c69621da55 100644 --- a/gen/logging2_beta1/src/cmn.rs +++ b/gen/logging2_beta1/src/cmn.rs @@ -12,7 +12,7 @@ use mime::{Mime, TopLevel, SubLevel, Attr, Value}; use oauth2::{TokenType, Retry, self}; use hyper; use hyper::header::{ContentType, ContentLength, Headers, UserAgent, Authorization, Header, - HeaderFormat}; + HeaderFormat, Bearer}; use hyper::http::h1::LINE_ENDING; use hyper::method::Method; use hyper::status::StatusCode; @@ -634,7 +634,7 @@ pub struct ResumableUploadHelper<'a, A: 'a> { pub start_at: Option, pub auth: &'a mut A, pub user_agent: &'a str, - pub auth_header: Authorization, + pub auth_header: Authorization, pub url: &'a str, pub reader: &'a mut ReadSeek, pub media_type: Mime, diff --git a/gen/logging2_beta1/src/lib.rs b/gen/logging2_beta1/src/lib.rs index a8a7d6c499..44bb3bf232 100644 --- a/gen/logging2_beta1/src/lib.rs +++ b/gen/logging2_beta1/src/lib.rs @@ -2,7 +2,7 @@ // This file was generated automatically from 'src/mako/api/lib.rs.mako' // DO NOT EDIT ! -//! This documentation was generated from *logging* crate version *0.1.12+20160104*, where *20160104* is the exact revision of the *logging:v2beta1* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.12*. +//! This documentation was generated from *logging* crate version *0.1.13+20160322*, where *20160322* is the exact revision of the *logging:v2beta1* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.13*. //! //! Everything else about the *logging* *v2_beta1* API can be found at the //! [official documentation site](https://cloud.google.com/logging/docs/). diff --git a/gen/logging2_beta1/src/lib.rs.in b/gen/logging2_beta1/src/lib.rs.in index 2e069acb7d..cd5628bdba 100644 --- a/gen/logging2_beta1/src/lib.rs.in +++ b/gen/logging2_beta1/src/lib.rs.in @@ -149,7 +149,7 @@ impl<'a, C, A> Logging Logging { client: RefCell::new(client), auth: RefCell::new(authenticator), - _user_agent: "google-api-rust-client/0.1.12".to_string(), + _user_agent: "google-api-rust-client/0.1.13".to_string(), } } @@ -164,7 +164,7 @@ impl<'a, C, A> Logging } /// Set the user-agent header field to use in all requests to the server. - /// It defaults to `google-api-rust-client/0.1.12`. + /// It defaults to `google-api-rust-client/0.1.13`. /// /// Returns the previously set user-agent. pub fn user_agent(&mut self, agent_name: String) -> String { @@ -189,9 +189,12 @@ impl<'a, C, A> Logging /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ListLogEntriesResponse { - /// If there are more results than were returned, then `nextPageToken` is given a value in the response. To get the next batch of results, call this method again using the value of `nextPageToken` as `pageToken`. + /// If there are more results than were returned, then `nextPageToken` is included in the response. To get the next set of results, call this method again using the value of `nextPageToken` as `pageToken`. #[serde(rename="nextPageToken")] pub next_page_token: Option, + /// If partial_success is true, contains the project ids that had errors and the associated errors. + #[serde(rename="projectIdErrors")] + pub project_id_errors: Option>, /// A list of log entries. pub entries: Option>, } @@ -212,7 +215,7 @@ impl ResponseResult for ListLogEntriesResponse {} pub struct ListLogMetricsResponse { /// A list of logs-based metrics. pub metrics: Option>, - /// If there are more results than were returned, then `nextPageToken` is given a value in the response. To get the next batch of results, call this method again using the value of `nextPageToken` as `pageToken`. + /// If there are more results than were returned, then `nextPageToken` is included in the response. To get the next set of results, call this method again using the value of `nextPageToken` as `pageToken`. #[serde(rename="nextPageToken")] pub next_page_token: Option, } @@ -220,15 +223,15 @@ pub struct ListLogMetricsResponse { impl ResponseResult for ListLogMetricsResponse {} -/// A specific monitored resource or a group of monitored resources. +/// An object representing a resource that can be used for monitoring, logging, billing, or other purposes. Examples include virtual machine instances, databases, and storage devices such as disks. The `type` field identifies a MonitoredResourceDescriptor object that describes the resource's schema. Information in the `labels` field identifies the actual resource and its attributes according to the schema. For example, a particular Compute Engine VM instance could be represented by the following object, because the MonitoredResourceDescriptor for `"gce_instance"` has labels `"instance_id"` and `"zone"`: { "type": "gce_instance", "labels": { "instance_id": "my-instance", "zone": "us-central1-a" }} /// /// This type is not used in any activity, and only used as *part* of another schema. /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct MonitoredResource { - /// Values for some or all of the labels listed in the associated monitored resource descriptor. For example, specify a specific Cloud SQL database by supplying values for both the `"database_id"` and `"zone"` labels. Specify the set of all Cloud SQL databases in a particular location by supplying a value for only the `"zone"` label. + /// Required. Values for all of the labels listed in the associated monitored resource descriptor. For example, Cloud SQL databases use the labels `"database_id"` and `"zone"`. pub labels: Option>, - /// The type of monitored resource. This field must match the value of the `type` field in a MonitoredResourceDescriptor object. For example, `"cloudsql_database"` represents Cloud SQL databases. + /// Required. The monitored resource type. This field must match the `type` field of a MonitoredResourceDescriptor object. For example, the type of a Cloud SQL database is `"cloudsql_database"`. #[serde(rename="type")] pub type_: Option, } @@ -263,12 +266,21 @@ impl Part for LogEntryOperation {} pub struct HttpRequest { /// The response code indicating the status of response. Examples: 200, 404. pub status: Option, + /// Whether or not the response was validated with the origin server before being served from cache. This field is only meaningful if `cache_hit` is True. + #[serde(rename="cacheValidatedWithOriginServer")] + pub cache_validated_with_origin_server: Option, /// The request method. Examples: `"GET"`, `"HEAD"`, `"PUT"`, `"POST"`. #[serde(rename="requestMethod")] pub request_method: Option, + /// The number of HTTP response bytes inserted into cache. Set only when a cache fill was attempted. + #[serde(rename="cacheFillBytes")] + pub cache_fill_bytes: Option, /// The scheme (http, https), the host name, the path and the query portion of the URL that was requested. Example: `"http://example.com/some/info?color=red"`. #[serde(rename="requestUrl")] pub request_url: Option, + /// Whether or not a cache lookup was attempted. + #[serde(rename="cacheLookup")] + pub cache_lookup: Option, /// Whether or not an entity was served from cache (with or without validation). #[serde(rename="cacheHit")] pub cache_hit: Option, @@ -280,9 +292,6 @@ pub struct HttpRequest { /// The user agent sent by the client. Example: `"Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Q312461; .NET CLR 1.0.3705)"`. #[serde(rename="userAgent")] pub user_agent: Option, - /// Whether or not the response was validated with the origin server before being served from cache. This field is only meaningful if `cache_hit` is True. - #[serde(rename="validatedWithOriginServer")] - pub validated_with_origin_server: Option, /// The size of the HTTP request message in bytes, including the request headers and the request body. #[serde(rename="requestSize")] pub request_size: Option, @@ -307,13 +316,13 @@ impl Part for HttpRequest {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct LogSink { - /// An [advanced logs filter](/logging/docs/view/advanced_filters) that defines the log entries to be exported. The filter must be consistent with the log entry format designed by the `outputVersionFormat` parameter, regardless of the format of the log entry that was originally written to Cloud Logging. Example: `"logName:syslog AND severity>=ERROR"`. + /// An [advanced logs filter](/logging/docs/view/advanced_filters). Only log entries matching that filter are exported. The filter must be consistent with the log entry format specified by the `outputVersionFormat` parameter, regardless of the format of the log entry that was originally written to Cloud Logging. Example (V2 format): `"logName=projects/my-projectid/logs/syslog AND severity>=ERROR"`. pub filter: Option, /// The export destination. See [Exporting Logs With Sinks](/logging/docs/api/tasks/exporting-logs). Examples: `"storage.googleapis.com/a-bucket"`, `"bigquery.googleapis.com/projects/a-project-id/datasets/a-dataset"`. pub destination: Option, /// Required. The client-assigned sink identifier. Example: `"my-severe-errors-to-pubsub"`. Sink identifiers are limited to 1000 characters and can include only the following characters: `A-Z`, `a-z`, `0-9`, and the special characters `_-.`. pub name: Option, - /// The log entry version used when exporting log entries from this sink. This version does not have to correspond to the version of the log entry when it was written to Cloud Logging. + /// The log entry version to use for this sink's exported log entries. This version does not have to correspond to the version of the log entry when it was written to Cloud Logging. #[serde(rename="outputVersionFormat")] pub output_version_format: Option, } @@ -322,6 +331,39 @@ impl RequestValue for LogSink {} impl ResponseResult for LogSink {} +/// The parameters to `ListLogEntries`. +/// +/// # Activities +/// +/// This type is used in activities, which are methods you may call on this type or where this type is involved in. +/// The list links the activity name, along with information about where it is used (one of *request* and *response*). +/// +/// * [list entries](struct.EntryListCall.html) (request) +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct ListLogEntriesRequest { + /// Optional. How the results should be sorted. Presently, the only permitted values are `"timestamp asc"` (default) and `"timestamp desc"`. The first option returns entries in order of increasing values of `LogEntry.timestamp` (oldest first), and the second option returns entries in order of decreasing timestamps (newest first). Entries with equal timestamps are returned in order of `LogEntry.insertId`. + #[serde(rename="orderBy")] + pub order_by: Option, + /// Optional. An [advanced logs filter](/logging/docs/view/advanced_filters). The filter is compared against all log entries in the projects specified by `projectIds`. Only entries that match the filter are retrieved. An empty filter matches all log entries. + pub filter: Option, + /// Optional. The maximum number of results to return from this request. You must check for presence of `nextPageToken` to determine if additional results are available, which you can retrieve by passing the `nextPageToken` value as the `pageToken` parameter in the next request. + #[serde(rename="pageSize")] + pub page_size: Option, + /// Optional. If the `pageToken` parameter is supplied, then the next page of results is retrieved. The `pageToken` parameter must be set to the value of the `nextPageToken` from the previous response. The values of `projectIds`, `filter`, and `orderBy` must be the same as in the previous request. + #[serde(rename="pageToken")] + pub page_token: Option, + /// Required. One or more project IDs or project numbers from which to retrieve log entries. Examples of a project ID: `"my-project-1A"`, `"1234567890"`. + #[serde(rename="projectIds")] + pub project_ids: Option>, + /// Optional. If true, read access to all projects is not required and results will be returned for the subset of projects for which read access is permitted (empty subset is permitted). + #[serde(rename="partialSuccess")] + pub partial_success: Option, +} + +impl RequestValue for ListLogEntriesRequest {} + + /// A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); } The JSON representation for `Empty` is empty JSON object `{}`. /// /// # Activities @@ -339,34 +381,21 @@ pub struct Empty; impl ResponseResult for Empty {} -/// The parameters to `ListLogEntries`. +/// The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). The error model is designed to be: - Simple to use and understand for most users - Flexible enough to meet unexpected needs # Overview The `Status` message contains three pieces of data: error code, error message, and error details. The error code should be an enum value of google.rpc.Code, but it may accept additional error codes if needed. The error message should be a developer-facing English message that helps developers *understand* and *resolve* the error. If a localized user-facing error message is needed, put the localized message in the error details or localize it in the client. The optional error details may contain arbitrary information about the error. There is a predefined set of error detail types in the package `google.rpc` which can be used for common error conditions. # Language mapping The `Status` message is the logical representation of the error model, but it is not necessarily the actual wire format. When the `Status` message is exposed in different client libraries and different wire protocols, it can be mapped differently. For example, it will likely be mapped to some exceptions in Java, but more likely mapped to some error codes in C. # Other uses The error model and the `Status` message can be used in a variety of environments, either with or without APIs, to provide a consistent developer experience across different environments. Example uses of this error model include: - Partial errors. If a service needs to return partial errors to the client, it may embed the `Status` in the normal response to indicate the partial errors. - Workflow errors. A typical workflow has multiple steps. Each step may have a `Status` message for error reporting purpose. - Batch operations. If a client uses batch request and batch response, the `Status` message should be used directly inside batch response, one for each error sub-response. - Asynchronous operations. If an API call embeds asynchronous operation results in its response, the status of those operations should be represented directly using the `Status` message. - Logging. If some API errors are stored in logs, the message `Status` could be used directly after any stripping needed for security/privacy reasons. /// -/// # Activities -/// -/// This type is used in activities, which are methods you may call on this type or where this type is involved in. -/// The list links the activity name, along with information about where it is used (one of *request* and *response*). -/// -/// * [list entries](struct.EntryListCall.html) (request) +/// This type is not used in any activity, and only used as *part* of another schema. /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] -pub struct ListLogEntriesRequest { - /// Optional. An [advanced logs filter](/logging/docs/view/advanced_filters). The filter is compared against all log entries in the projects specified by `projectIds`. Only entries that match the filter are retrieved. An empty filter matches all log entries. - pub filter: Option, - /// Required. One or more project IDs or project numbers from which to retrieve log entries. Examples of a project ID: `"my-project-1A"`, `"1234567890"`. - #[serde(rename="projectIds")] - pub project_ids: Option>, - /// Optional. How the results should be sorted. Presently, the only permitted values are `"timestamp"` (default) and `"timestamp desc"`. The first option returns entries in order of increasing values of `LogEntry.timestamp` (oldest first), and the second option returns entries in order of decreasing timestamps (newest first). Entries with equal timestamps are returned in order of `LogEntry.insertId`. - #[serde(rename="orderBy")] - pub order_by: Option, - /// Optional. The maximum number of results to return from this request. Fewer results might be returned. You must check for the `nextPageToken` result to determine if additional results are available, which you can retrieve by passing the `nextPageToken` value in the `pageToken` parameter to the next request. - #[serde(rename="pageSize")] - pub page_size: Option, - /// Optional. If the `pageToken` request parameter is supplied, then the next page of results in the set are retrieved. The `pageToken` parameter must be set with the value of the `nextPageToken` result parameter from the previous request. The values of `projectIds`, `filter`, and `orderBy` must be the same as in the previous request. - #[serde(rename="pageToken")] - pub page_token: Option, +pub struct Status { + /// A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client. + pub message: Option, + /// The status code, which should be an enum value of google.rpc.Code. + pub code: Option, + /// A list of messages that carry the error details. There will be a common set of message types for APIs to use. + pub details: Option>>, } -impl RequestValue for ListLogEntriesRequest {} +impl Part for Status {} /// Result returned from ListMonitoredResourceDescriptors. @@ -380,7 +409,7 @@ impl RequestValue for ListLogEntriesRequest {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ListMonitoredResourceDescriptorsResponse { - /// If there are more results than were returned, then `nextPageToken` is returned in the response. To get the next batch of results, call this method again using the value of `nextPageToken` as `pageToken`. + /// If there are more results than were returned, then `nextPageToken` is included in the response. To get the next set of results, call this method again using the value of `nextPageToken` as `pageToken`. #[serde(rename="nextPageToken")] pub next_page_token: Option, /// A list of resource descriptors. @@ -402,7 +431,7 @@ impl ResponseResult for ListMonitoredResourceDescriptorsResponse {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ListSinksResponse { - /// If there are more results than were returned, then `nextPageToken` is given a value in the response. To get the next batch of results, call this method again using the value of `nextPageToken` as `pageToken`. + /// If there are more results than were returned, then `nextPageToken` is included in the response. To get the next set of results, call this method again using the value of `nextPageToken` as `pageToken`. #[serde(rename="nextPageToken")] pub next_page_token: Option, /// A list of sinks. @@ -441,6 +470,9 @@ pub struct WriteLogEntriesRequest { /// Optional. A default log resource name for those log entries in `entries` that do not specify their own `logName`. Example: `"projects/my-project/logs/syslog"`. See LogEntry. #[serde(rename="logName")] pub log_name: Option, + /// Optional. Whether valid entries should be written even if some other entries fail due to INVALID_ARGUMENT or PERMISSION_DENIED errors. If any entry is not written, the response status will be the error associated with one of the failed entries and include error details in the form of WriteLogEntriesPartialErrors. + #[serde(rename="partialSuccess")] + pub partial_success: Option, /// Optional. User-defined `key:value` items that are added to the `labels` field of each log entry in `entries`, except when a log entry specifies its own `key:value` item with the same key. Example: `{ "size": "large", "color":"red" }` pub labels: Option>, /// Optional. A default monitored resource for those log entries in `entries` that do not specify their own `resource`. @@ -496,7 +528,8 @@ pub struct LogEntry { /// The log entry payload, represented as a structure that is expressed as a JSON object. #[serde(rename="jsonPayload")] pub json_payload: Option>, - /// Required. The resource name of the log to which this log entry belongs. The format of the name is `projects//logs/, /// Optional. A unique ID for the log entry. If you provide this field, the logging service considers other log entries in the same log with the same ID as duplicates which can be removed. If omitted, Cloud Logging will generate a unique ID for this log entry. @@ -534,7 +567,7 @@ impl RequestValue for LogMetric {} impl ResponseResult for LogMetric {} -/// A description of a type of monitored resource. +/// An object that describes the schema of a MonitoredResource object using a type name and a set of labels. For example, the monitored resource descriptor for Google Compute Engine VM instances has a type of `"gce_instance"` and specifies the use of the labels `"instance_id"` and `"zone"` to identify particular VM instances. Different APIs can support different monitored resource types. APIs generally provide a `list` method that returns the monitored resource descriptors used by the API. /// /// # Activities /// @@ -545,15 +578,17 @@ impl ResponseResult for LogMetric {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct MonitoredResourceDescriptor { - /// The monitored resource type. For example, the type `"cloudsql_database"` represents databases in Google Cloud SQL. + /// Required. The monitored resource type. For example, the type `"cloudsql_database"` represents databases in Google Cloud SQL. #[serde(rename="type")] pub type_: Option, - /// A set of labels that can be used to describe instances of this monitored resource type. For example, Cloud SQL databases can be labeled with their `"database_id"` and their `"zone"`. + /// Required. A set of labels used to describe instances of this monitored resource type. For example, an individual Google Cloud SQL database is identified by values for the labels `"database_id"` and `"zone"`. pub labels: Option>, - /// A concise name for the monitored resource type, which is displayed in user interfaces. For example, `"Cloud SQL Database"`. + /// Optional. A concise name for the monitored resource type that might be displayed in user interfaces. For example, `"Google Cloud SQL Database"`. #[serde(rename="displayName")] pub display_name: Option, - /// A detailed description of the monitored resource type, which is used in documentation. + /// Optional. The resource name of the monitored resource descriptor: `"projects/{project_id}/monitoredResourceDescriptors/{type}"` where {type} is the value of the `type` field in this object and {project_id} is a project ID that provides API-specific context for accessing the type. APIs that do not use project information can use the resource name format `"monitoredResourceDescriptors/{type}"`. + pub name: Option, + /// Optional. A detailed description of the monitored resource type that might be used in documentation. pub description: Option, } @@ -664,7 +699,7 @@ impl<'a, C, A> ProjectMethods<'a, C, A> { /// /// # Arguments /// - /// * `projectName` - Required. The resource name of the project containing the sinks. Example: `"projects/my-logging-project"`, `"projects/01234567890"`. + /// * `projectName` - Required. The resource name of the project containing the sinks. Example: `"projects/my-logging-project"`. pub fn sinks_list(&self, project_name: &str) -> ProjectSinkListCall<'a, C, A> { ProjectSinkListCall { hub: self.hub, @@ -992,7 +1027,7 @@ impl<'a, C, A> MonitoredResourceDescriptorListCall<'a, C, A> where C: BorrowMut< /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, ListMonitoredResourceDescriptorsResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -1045,8 +1080,7 @@ impl<'a, C, A> MonitoredResourceDescriptorListCall<'a, C, A> where C: BorrowMut< } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -1102,14 +1136,14 @@ impl<'a, C, A> MonitoredResourceDescriptorListCall<'a, C, A> where C: BorrowMut< } - /// Optional. If the `pageToken` request parameter is supplied, then the next page of results in the set are retrieved. The `pageToken` parameter must be set with the value of the `nextPageToken` result parameter from the previous request. + /// Optional. If the `pageToken` parameter is supplied, then the next page of results is retrieved. The `pageToken` parameter must be set to the value of the `nextPageToken` from the previous response. /// /// Sets the *page token* query property to the given value. pub fn page_token(mut self, new_value: &str) -> MonitoredResourceDescriptorListCall<'a, C, A> { self._page_token = Some(new_value.to_string()); self } - /// Optional. The maximum number of results to return from this request. Fewer results might be returned. You must check for the `nextPageToken` result to determine if additional results are available, which you can retrieve by passing the `nextPageToken` value in the `pageToken` parameter to the next request. + /// Optional. The maximum number of results to return from this request. You must check for presence of `nextPageToken` to determine if additional results are available, which you can retrieve by passing the `nextPageToken` value as the `pageToken` parameter in the next request. /// /// Sets the *page size* query property to the given value. pub fn page_size(mut self, new_value: i32) -> MonitoredResourceDescriptorListCall<'a, C, A> { @@ -1227,7 +1261,7 @@ impl<'a, C, A> ProjectSinkListCall<'a, C, A> where C: BorrowMut, pub fn doit(mut self) -> Result<(hyper::client::Response, ListSinksResponse)> { use url::percent_encoding::{percent_encode, FORM_URLENCODED_ENCODE_SET}; use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -1305,8 +1339,7 @@ impl<'a, C, A> ProjectSinkListCall<'a, C, A> where C: BorrowMut, } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -1362,7 +1395,7 @@ impl<'a, C, A> ProjectSinkListCall<'a, C, A> where C: BorrowMut, } - /// Required. The resource name of the project containing the sinks. Example: `"projects/my-logging-project"`, `"projects/01234567890"`. + /// Required. The resource name of the project containing the sinks. Example: `"projects/my-logging-project"`. /// /// Sets the *project name* path property to the given value. /// @@ -1372,14 +1405,14 @@ impl<'a, C, A> ProjectSinkListCall<'a, C, A> where C: BorrowMut, self._project_name = new_value.to_string(); self } - /// Optional. If the `pageToken` request parameter is supplied, then the next page of results in the set are retrieved. The `pageToken` parameter must be set with the value of the `nextPageToken` result parameter from the previous request. The value of `projectName` must be the same as in the previous request. + /// Optional. If the `pageToken` parameter is supplied, then the next page of results is retrieved. The `pageToken` parameter must be set to the value of the `nextPageToken` from the previous response. The value of `projectName` must be the same as in the previous request. /// /// Sets the *page token* query property to the given value. pub fn page_token(mut self, new_value: &str) -> ProjectSinkListCall<'a, C, A> { self._page_token = Some(new_value.to_string()); self } - /// Optional. The maximum number of results to return from this request. Fewer results might be returned. You must check for the `nextPageToken` result to determine if additional results are available, which you can retrieve by passing the `nextPageToken` value in the `pageToken` parameter to the next request. + /// Optional. The maximum number of results to return from this request. You must check for presence of `nextPageToken` to determine if additional results are available, which you can retrieve by passing the `nextPageToken` value as the `pageToken` parameter in the next request. /// /// Sets the *page size* query property to the given value. pub fn page_size(mut self, new_value: i32) -> ProjectSinkListCall<'a, C, A> { @@ -1493,7 +1526,7 @@ impl<'a, C, A> ProjectLogDeleteCall<'a, C, A> where C: BorrowMut, pub fn doit(mut self) -> Result<(hyper::client::Response, Empty)> { use url::percent_encoding::{percent_encode, FORM_URLENCODED_ENCODE_SET}; use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -1565,8 +1598,7 @@ impl<'a, C, A> ProjectLogDeleteCall<'a, C, A> where C: BorrowMut, } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Delete, &url) @@ -1739,7 +1771,7 @@ impl<'a, C, A> ProjectSinkGetCall<'a, C, A> where C: BorrowMut, A pub fn doit(mut self) -> Result<(hyper::client::Response, LogSink)> { use url::percent_encoding::{percent_encode, FORM_URLENCODED_ENCODE_SET}; use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -1811,8 +1843,7 @@ impl<'a, C, A> ProjectSinkGetCall<'a, C, A> where C: BorrowMut, A } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -1985,7 +2016,7 @@ impl<'a, C, A> ProjectMetricGetCall<'a, C, A> where C: BorrowMut, pub fn doit(mut self) -> Result<(hyper::client::Response, LogMetric)> { use url::percent_encoding::{percent_encode, FORM_URLENCODED_ENCODE_SET}; use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -2057,8 +2088,7 @@ impl<'a, C, A> ProjectMetricGetCall<'a, C, A> where C: BorrowMut, } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -2238,7 +2268,7 @@ impl<'a, C, A> ProjectSinkUpdateCall<'a, C, A> where C: BorrowMut pub fn doit(mut self) -> Result<(hyper::client::Response, LogSink)> { use url::percent_encoding::{percent_encode, FORM_URLENCODED_ENCODE_SET}; use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -2321,8 +2351,7 @@ impl<'a, C, A> ProjectSinkUpdateCall<'a, C, A> where C: BorrowMut } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -2508,7 +2537,7 @@ impl<'a, C, A> ProjectMetricDeleteCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, Empty)> { use url::percent_encoding::{percent_encode, FORM_URLENCODED_ENCODE_SET}; use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -2580,8 +2609,7 @@ impl<'a, C, A> ProjectMetricDeleteCall<'a, C, A> where C: BorrowMut ProjectSinkCreateCall<'a, C, A> where C: BorrowMut pub fn doit(mut self) -> Result<(hyper::client::Response, LogSink)> { use url::percent_encoding::{percent_encode, FORM_URLENCODED_ENCODE_SET}; use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -2844,8 +2872,7 @@ impl<'a, C, A> ProjectSinkCreateCall<'a, C, A> where C: BorrowMut } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -3038,7 +3065,7 @@ impl<'a, C, A> ProjectMetricCreateCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, LogMetric)> { use url::percent_encoding::{percent_encode, FORM_URLENCODED_ENCODE_SET}; use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -3121,8 +3148,7 @@ impl<'a, C, A> ProjectMetricCreateCall<'a, C, A> where C: BorrowMut ProjectSinkDeleteCall<'a, C, A> where C: BorrowMut pub fn doit(mut self) -> Result<(hyper::client::Response, Empty)> { use url::percent_encoding::{percent_encode, FORM_URLENCODED_ENCODE_SET}; use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -3380,8 +3406,7 @@ impl<'a, C, A> ProjectSinkDeleteCall<'a, C, A> where C: BorrowMut } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Delete, &url) @@ -3558,7 +3583,7 @@ impl<'a, C, A> ProjectMetricListCall<'a, C, A> where C: BorrowMut pub fn doit(mut self) -> Result<(hyper::client::Response, ListLogMetricsResponse)> { use url::percent_encoding::{percent_encode, FORM_URLENCODED_ENCODE_SET}; use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -3636,8 +3661,7 @@ impl<'a, C, A> ProjectMetricListCall<'a, C, A> where C: BorrowMut } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -3703,14 +3727,14 @@ impl<'a, C, A> ProjectMetricListCall<'a, C, A> where C: BorrowMut self._project_name = new_value.to_string(); self } - /// Optional. If the `pageToken` request parameter is supplied, then the next page of results in the set are retrieved. The `pageToken` parameter must be set with the value of the `nextPageToken` result parameter from the previous request. The value of `projectName` must be the same as in the previous request. + /// Optional. If the `pageToken` parameter is supplied, then the next page of results is retrieved. The `pageToken` parameter must be set to the value of the `nextPageToken` from the previous response. The value of `projectName` must be the same as in the previous request. /// /// Sets the *page token* query property to the given value. pub fn page_token(mut self, new_value: &str) -> ProjectMetricListCall<'a, C, A> { self._page_token = Some(new_value.to_string()); self } - /// Optional. The maximum number of results to return from this request. Fewer results might be returned. You must check for the `nextPageToken` result to determine if additional results are available, which you can retrieve by passing the `nextPageToken` value in the `pageToken` parameter to the next request. + /// Optional. The maximum number of results to return from this request. You must check for presence of `nextPageToken` to determine if additional results are available, which you can retrieve by passing the `nextPageToken` value as the `pageToken` parameter in the next request. /// /// Sets the *page size* query property to the given value. pub fn page_size(mut self, new_value: i32) -> ProjectMetricListCall<'a, C, A> { @@ -3831,7 +3855,7 @@ impl<'a, C, A> ProjectMetricUpdateCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, LogMetric)> { use url::percent_encoding::{percent_encode, FORM_URLENCODED_ENCODE_SET}; use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -3914,8 +3938,7 @@ impl<'a, C, A> ProjectMetricUpdateCall<'a, C, A> where C: BorrowMut EntryListCall<'a, C, A> where C: BorrowMut, A: oau /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, ListLogEntriesResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -4164,8 +4187,7 @@ impl<'a, C, A> EntryListCall<'a, C, A> where C: BorrowMut, A: oau } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -4346,7 +4368,7 @@ impl<'a, C, A> EntryWriteCall<'a, C, A> where C: BorrowMut, A: oa /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, WriteLogEntriesResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -4404,8 +4426,7 @@ impl<'a, C, A> EntryWriteCall<'a, C, A> where C: BorrowMut, A: oa } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); diff --git a/gen/manager1_beta2-cli/Cargo.toml b/gen/manager1_beta2-cli/Cargo.toml index 987457fac3..6142124afa 100644 --- a/gen/manager1_beta2-cli/Cargo.toml +++ b/gen/manager1_beta2-cli/Cargo.toml @@ -4,7 +4,7 @@ [package] name = "google-manager1_beta2-cli" -version = "0.3.3+20140915" +version = "0.3.4+20140915" authors = ["Sebastian Thiel "] description = "A complete library to interact with manager (protocol v1beta2)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/manager1_beta2-cli" @@ -17,18 +17,18 @@ keywords = ["manager", "google", "cli"] name = "manager1-beta2" [dependencies] -hyper = "0.7" -mime = "0.1.0" -serde = ">= 0.7.0" -serde_json = ">= 0.7.0" -yup-oauth2 = ">= 0.5.4" +hyper = "0.8" +mime = "0.2.0" +serde = "0.6.0" +serde_json = "0.6.0" +yup-oauth2 = ">= 0.5.6" strsim = "0.4" yup-hyper-mock = "1.0" clap = "2.0" [build-dependencies] -syntex = { version = ">= 0.23" } -serde_codegen = { version = ">= 0.6" } +syntex = { version = "= 0.28" } +serde_codegen = { version = "= 0.6.13" } [dependencies.google-manager1_beta2] diff --git a/gen/manager1_beta2-cli/README.md b/gen/manager1_beta2-cli/README.md index ee50ea8cfe..7f18d22d15 100644 --- a/gen/manager1_beta2-cli/README.md +++ b/gen/manager1_beta2-cli/README.md @@ -17,14 +17,14 @@ Everything else about the *manager* API can be found at the You can download the pre-compiled 64bit binaries for the following platforms: -* ![icon](http://megaicons.net/static/img/icons_sizes/6/140/16/ubuntu-icon.png) [ubuntu](http://dl.byronimo.de/google.rs/cli/0.3.3/ubuntu/manager1-beta2.tar.gz) -* ![icon](http://hydra-media.cursecdn.com/wow.gamepedia.com/a/a2/Apple-icon-16x16.png?version=25ddd67ac3dd3b634478e3978b76cb74) [osx](http://dl.byronimo.de/google.rs/cli/0.3.3/osx/manager1-beta2.tar.gz) +* ![icon](http://megaicons.net/static/img/icons_sizes/6/140/16/ubuntu-icon.png) [ubuntu](http://dl.byronimo.de/google.rs/cli/0.3.4/ubuntu/manager1-beta2.tar.gz) +* ![icon](http://hydra-media.cursecdn.com/wow.gamepedia.com/a/a2/Apple-icon-16x16.png?version=25ddd67ac3dd3b634478e3978b76cb74) [osx](http://dl.byronimo.de/google.rs/cli/0.3.4/osx/manager1-beta2.tar.gz) Find the source code [on github](https://github.com/Byron/google-apis-rs/tree/master/gen/manager1_beta2-cli). # Usage -This documentation was generated from the *manager* API at revision *20140915*. The CLI is at version *0.3.3*. +This documentation was generated from the *manager* API at revision *20140915*. The CLI is at version *0.3.4*. ```bash manager1-beta2 [options] diff --git a/gen/manager1_beta2-cli/mkdocs.yml b/gen/manager1_beta2-cli/mkdocs.yml index decbc86079..e2cf1b02b6 100644 --- a/gen/manager1_beta2-cli/mkdocs.yml +++ b/gen/manager1_beta2-cli/mkdocs.yml @@ -1,4 +1,4 @@ -site_name: manager v0.3.3+20140915 +site_name: manager v0.3.4+20140915 site_url: http://byron.github.io/google-apis-rs/google-manager1_beta2-cli site_description: Write integrating applications with bcore diff --git a/gen/manager1_beta2-cli/src/cmn.rs b/gen/manager1_beta2-cli/src/cmn.rs index 188159ee80..ae86fdef65 100644 --- a/gen/manager1_beta2-cli/src/cmn.rs +++ b/gen/manager1_beta2-cli/src/cmn.rs @@ -414,7 +414,7 @@ impl TokenStorage for JsonTokenStorage { Err(err) => match err.kind() { io::ErrorKind::NotFound => Ok(()), - _ => Err(json::Error::Io(err)) + _ => Err(json::Error::IoError(err)) }, Ok(_) => Ok(()), } @@ -427,7 +427,7 @@ impl TokenStorage for JsonTokenStorage { Err(serde_err) => Err(serde_err), } }, - Err(io_err) => Err(json::Error::Io(io_err)) + Err(io_err) => Err(json::Error::IoError(io_err)) } } } @@ -444,7 +444,7 @@ impl TokenStorage for JsonTokenStorage { Err(io_err) => { match io_err.kind() { io::ErrorKind::NotFound => Ok(None), - _ => Err(json::Error::Io(io_err)) + _ => Err(json::Error::IoError(io_err)) } } } @@ -683,7 +683,7 @@ pub fn application_secret_from_directory(dir: &str, = json::from_str(json_console_secret).unwrap(); match json::to_writer_pretty(&mut f, &console_secret) { Err(serde_err) => match serde_err { - json::Error::Io(err) => err, + json::Error::IoError(err) => err, _ => panic!("Unexpected serde error: {:#?}", serde_err) }, Ok(_) => continue, @@ -696,7 +696,7 @@ pub fn application_secret_from_directory(dir: &str, }, Ok(f) => { match json::de::from_reader::<_, ConsoleApplicationSecret>(f) { - Err(json::Error::Io(err)) => + Err(json::Error::IoError(err)) => return secret_io_error(err), Err(json_err) => return Err(CLIError::Configuration( diff --git a/gen/manager1_beta2-cli/src/main.rs b/gen/manager1_beta2-cli/src/main.rs index b82eca974f..e3431fa1fe 100644 --- a/gen/manager1_beta2-cli/src/main.rs +++ b/gen/manager1_beta2-cli/src/main.rs @@ -892,7 +892,7 @@ fn main() { let mut app = App::new("manager1-beta2") .author("Sebastian Thiel ") - .version("0.3.3+20140915") + .version("0.3.4+20140915") .about("The Deployment Manager API allows users to declaratively configure, deploy and run complex solutions on the Google Cloud Platform.") .after_help("All documentation details can be found at http://byron.github.io/google-apis-rs/google_manager1_beta2_cli") .arg(Arg::with_name("url") diff --git a/gen/manager1_beta2/Cargo.toml b/gen/manager1_beta2/Cargo.toml index fe8acf454f..738ba3b1b4 100644 --- a/gen/manager1_beta2/Cargo.toml +++ b/gen/manager1_beta2/Cargo.toml @@ -4,7 +4,7 @@ [package] name = "google-manager1_beta2" -version = "0.1.12+20140915" +version = "0.1.13+20140915" authors = ["Sebastian Thiel "] description = "A complete library to interact with manager (protocol v1beta2)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/manager1_beta2" @@ -16,14 +16,14 @@ build = "src/build.rs" [dependencies] -hyper = "0.7" -mime = "0.1.0" -serde = ">= 0.7.0" -serde_json = ">= 0.7.0" -yup-oauth2 = ">= 0.5.4" +hyper = "0.8" +mime = "0.2.0" +serde = "0.6.0" +serde_json = "0.6.0" +yup-oauth2 = ">= 0.5.6" url = ">= 0.5" [build-dependencies] -syntex = { version = ">= 0.23" } -serde_codegen = { version = ">= 0.6" } +syntex = { version = "= 0.28" } +serde_codegen = { version = "= 0.6.13" } diff --git a/gen/manager1_beta2/README.md b/gen/manager1_beta2/README.md index 6abe7ddb2c..fdc9b87f06 100644 --- a/gen/manager1_beta2/README.md +++ b/gen/manager1_beta2/README.md @@ -5,7 +5,7 @@ DO NOT EDIT ! --> The `google-manager1_beta2` library allows access to all features of the *Google manager* service. -This documentation was generated from *manager* crate version *0.1.12+20140915*, where *20140915* is the exact revision of the *manager:v1beta2* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.12*. +This documentation was generated from *manager* crate version *0.1.13+20140915*, where *20140915* is the exact revision of the *manager:v1beta2* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.13*. Everything else about the *manager* *v1_beta2* API can be found at the [official documentation site](https://developers.google.com/deployment-manager/). diff --git a/gen/manager1_beta2/src/cmn.rs b/gen/manager1_beta2/src/cmn.rs index 87b91a8986..c69621da55 100644 --- a/gen/manager1_beta2/src/cmn.rs +++ b/gen/manager1_beta2/src/cmn.rs @@ -12,7 +12,7 @@ use mime::{Mime, TopLevel, SubLevel, Attr, Value}; use oauth2::{TokenType, Retry, self}; use hyper; use hyper::header::{ContentType, ContentLength, Headers, UserAgent, Authorization, Header, - HeaderFormat}; + HeaderFormat, Bearer}; use hyper::http::h1::LINE_ENDING; use hyper::method::Method; use hyper::status::StatusCode; @@ -634,7 +634,7 @@ pub struct ResumableUploadHelper<'a, A: 'a> { pub start_at: Option, pub auth: &'a mut A, pub user_agent: &'a str, - pub auth_header: Authorization, + pub auth_header: Authorization, pub url: &'a str, pub reader: &'a mut ReadSeek, pub media_type: Mime, diff --git a/gen/manager1_beta2/src/lib.rs b/gen/manager1_beta2/src/lib.rs index fa4130ae74..37576bd28e 100644 --- a/gen/manager1_beta2/src/lib.rs +++ b/gen/manager1_beta2/src/lib.rs @@ -2,7 +2,7 @@ // This file was generated automatically from 'src/mako/api/lib.rs.mako' // DO NOT EDIT ! -//! This documentation was generated from *manager* crate version *0.1.12+20140915*, where *20140915* is the exact revision of the *manager:v1beta2* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.12*. +//! This documentation was generated from *manager* crate version *0.1.13+20140915*, where *20140915* is the exact revision of the *manager:v1beta2* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.13*. //! //! Everything else about the *manager* *v1_beta2* API can be found at the //! [official documentation site](https://developers.google.com/deployment-manager/). diff --git a/gen/manager1_beta2/src/lib.rs.in b/gen/manager1_beta2/src/lib.rs.in index d04ff6d721..e84753bd54 100644 --- a/gen/manager1_beta2/src/lib.rs.in +++ b/gen/manager1_beta2/src/lib.rs.in @@ -153,7 +153,7 @@ impl<'a, C, A> Manager Manager { client: RefCell::new(client), auth: RefCell::new(authenticator), - _user_agent: "google-api-rust-client/0.1.12".to_string(), + _user_agent: "google-api-rust-client/0.1.13".to_string(), } } @@ -165,7 +165,7 @@ impl<'a, C, A> Manager } /// Set the user-agent header field to use in all requests to the server. - /// It defaults to `google-api-rust-client/0.1.12`. + /// It defaults to `google-api-rust-client/0.1.13`. /// /// Returns the previously set user-agent. pub fn user_agent(&mut self, agent_name: String) -> String { @@ -1232,7 +1232,7 @@ impl<'a, C, A> TemplateListCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, TemplatesListResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -1307,8 +1307,7 @@ impl<'a, C, A> TemplateListCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -1488,7 +1487,7 @@ impl<'a, C, A> TemplateDeleteCall<'a, C, A> where C: BorrowMut, A /// Perform the operation you have build so far. pub fn doit(mut self) -> Result { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -1557,8 +1556,7 @@ impl<'a, C, A> TemplateDeleteCall<'a, C, A> where C: BorrowMut, A } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Delete, &url) @@ -1729,7 +1727,7 @@ impl<'a, C, A> TemplateInsertCall<'a, C, A> where C: BorrowMut, A /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Template)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -1809,8 +1807,7 @@ impl<'a, C, A> TemplateInsertCall<'a, C, A> where C: BorrowMut, A } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -1989,7 +1986,7 @@ impl<'a, C, A> TemplateGetCall<'a, C, A> where C: BorrowMut, A: o /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Template)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -2059,8 +2056,7 @@ impl<'a, C, A> TemplateGetCall<'a, C, A> where C: BorrowMut, A: o } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -2242,7 +2238,7 @@ impl<'a, C, A> DeploymentInsertCall<'a, C, A> where C: BorrowMut, /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Deployment)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -2323,8 +2319,7 @@ impl<'a, C, A> DeploymentInsertCall<'a, C, A> where C: BorrowMut, } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -2513,7 +2508,7 @@ impl<'a, C, A> DeploymentGetCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Deployment)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -2584,8 +2579,7 @@ impl<'a, C, A> DeploymentGetCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -2773,7 +2767,7 @@ impl<'a, C, A> DeploymentListCall<'a, C, A> where C: BorrowMut, A /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, DeploymentsListResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -2849,8 +2843,7 @@ impl<'a, C, A> DeploymentListCall<'a, C, A> where C: BorrowMut, A } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -3040,7 +3033,7 @@ impl<'a, C, A> DeploymentDeleteCall<'a, C, A> where C: BorrowMut, /// Perform the operation you have build so far. pub fn doit(mut self) -> Result { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -3110,8 +3103,7 @@ impl<'a, C, A> DeploymentDeleteCall<'a, C, A> where C: BorrowMut, } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Delete, &url) diff --git a/gen/mirror1-cli/Cargo.toml b/gen/mirror1-cli/Cargo.toml index cb4b2b4370..57553cded0 100644 --- a/gen/mirror1-cli/Cargo.toml +++ b/gen/mirror1-cli/Cargo.toml @@ -4,7 +4,7 @@ [package] name = "google-mirror1-cli" -version = "0.3.3+20151206" +version = "0.3.4+20151206" authors = ["Sebastian Thiel "] description = "A complete library to interact with mirror (protocol v1)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/mirror1-cli" @@ -17,18 +17,18 @@ keywords = ["mirror", "google", "cli"] name = "mirror1" [dependencies] -hyper = "0.7" -mime = "0.1.0" -serde = ">= 0.7.0" -serde_json = ">= 0.7.0" -yup-oauth2 = ">= 0.5.4" +hyper = "0.8" +mime = "0.2.0" +serde = "0.6.0" +serde_json = "0.6.0" +yup-oauth2 = ">= 0.5.6" strsim = "0.4" yup-hyper-mock = "1.0" clap = "2.0" [build-dependencies] -syntex = { version = ">= 0.23" } -serde_codegen = { version = ">= 0.6" } +syntex = { version = "= 0.28" } +serde_codegen = { version = "= 0.6.13" } [dependencies.google-mirror1] diff --git a/gen/mirror1-cli/README.md b/gen/mirror1-cli/README.md index 820b04c2a0..49459415d0 100644 --- a/gen/mirror1-cli/README.md +++ b/gen/mirror1-cli/README.md @@ -17,14 +17,14 @@ Everything else about the *mirror* API can be found at the You can download the pre-compiled 64bit binaries for the following platforms: -* ![icon](http://megaicons.net/static/img/icons_sizes/6/140/16/ubuntu-icon.png) [ubuntu](http://dl.byronimo.de/google.rs/cli/0.3.3/ubuntu/mirror1.tar.gz) -* ![icon](http://hydra-media.cursecdn.com/wow.gamepedia.com/a/a2/Apple-icon-16x16.png?version=25ddd67ac3dd3b634478e3978b76cb74) [osx](http://dl.byronimo.de/google.rs/cli/0.3.3/osx/mirror1.tar.gz) +* ![icon](http://megaicons.net/static/img/icons_sizes/6/140/16/ubuntu-icon.png) [ubuntu](http://dl.byronimo.de/google.rs/cli/0.3.4/ubuntu/mirror1.tar.gz) +* ![icon](http://hydra-media.cursecdn.com/wow.gamepedia.com/a/a2/Apple-icon-16x16.png?version=25ddd67ac3dd3b634478e3978b76cb74) [osx](http://dl.byronimo.de/google.rs/cli/0.3.4/osx/mirror1.tar.gz) Find the source code [on github](https://github.com/Byron/google-apis-rs/tree/master/gen/mirror1-cli). # Usage -This documentation was generated from the *mirror* API at revision *20151206*. The CLI is at version *0.3.3*. +This documentation was generated from the *mirror* API at revision *20151206*. The CLI is at version *0.3.4*. ```bash mirror1 [options] diff --git a/gen/mirror1-cli/mkdocs.yml b/gen/mirror1-cli/mkdocs.yml index 26eaeaf28e..37ac31af05 100644 --- a/gen/mirror1-cli/mkdocs.yml +++ b/gen/mirror1-cli/mkdocs.yml @@ -1,4 +1,4 @@ -site_name: mirror v0.3.3+20151206 +site_name: mirror v0.3.4+20151206 site_url: http://byron.github.io/google-apis-rs/google-mirror1-cli site_description: Write integrating applications with bcore diff --git a/gen/mirror1-cli/src/cmn.rs b/gen/mirror1-cli/src/cmn.rs index 188159ee80..ae86fdef65 100644 --- a/gen/mirror1-cli/src/cmn.rs +++ b/gen/mirror1-cli/src/cmn.rs @@ -414,7 +414,7 @@ impl TokenStorage for JsonTokenStorage { Err(err) => match err.kind() { io::ErrorKind::NotFound => Ok(()), - _ => Err(json::Error::Io(err)) + _ => Err(json::Error::IoError(err)) }, Ok(_) => Ok(()), } @@ -427,7 +427,7 @@ impl TokenStorage for JsonTokenStorage { Err(serde_err) => Err(serde_err), } }, - Err(io_err) => Err(json::Error::Io(io_err)) + Err(io_err) => Err(json::Error::IoError(io_err)) } } } @@ -444,7 +444,7 @@ impl TokenStorage for JsonTokenStorage { Err(io_err) => { match io_err.kind() { io::ErrorKind::NotFound => Ok(None), - _ => Err(json::Error::Io(io_err)) + _ => Err(json::Error::IoError(io_err)) } } } @@ -683,7 +683,7 @@ pub fn application_secret_from_directory(dir: &str, = json::from_str(json_console_secret).unwrap(); match json::to_writer_pretty(&mut f, &console_secret) { Err(serde_err) => match serde_err { - json::Error::Io(err) => err, + json::Error::IoError(err) => err, _ => panic!("Unexpected serde error: {:#?}", serde_err) }, Ok(_) => continue, @@ -696,7 +696,7 @@ pub fn application_secret_from_directory(dir: &str, }, Ok(f) => { match json::de::from_reader::<_, ConsoleApplicationSecret>(f) { - Err(json::Error::Io(err)) => + Err(json::Error::IoError(err)) => return secret_io_error(err), Err(json_err) => return Err(CLIError::Configuration( diff --git a/gen/mirror1-cli/src/main.rs b/gen/mirror1-cli/src/main.rs index 401b434bcf..077040a578 100644 --- a/gen/mirror1-cli/src/main.rs +++ b/gen/mirror1-cli/src/main.rs @@ -2563,7 +2563,7 @@ fn main() { let mut app = App::new("mirror1") .author("Sebastian Thiel ") - .version("0.3.3+20151206") + .version("0.3.4+20151206") .about("API for interacting with Glass users via the timeline.") .after_help("All documentation details can be found at http://byron.github.io/google-apis-rs/google_mirror1_cli") .arg(Arg::with_name("url") diff --git a/gen/mirror1/Cargo.toml b/gen/mirror1/Cargo.toml index 306008ce87..ab1ffc6ced 100644 --- a/gen/mirror1/Cargo.toml +++ b/gen/mirror1/Cargo.toml @@ -4,7 +4,7 @@ [package] name = "google-mirror1" -version = "0.1.12+20151206" +version = "0.1.13+20151206" authors = ["Sebastian Thiel "] description = "A complete library to interact with mirror (protocol v1)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/mirror1" @@ -16,14 +16,14 @@ build = "src/build.rs" [dependencies] -hyper = "0.7" -mime = "0.1.0" -serde = ">= 0.7.0" -serde_json = ">= 0.7.0" -yup-oauth2 = ">= 0.5.4" +hyper = "0.8" +mime = "0.2.0" +serde = "0.6.0" +serde_json = "0.6.0" +yup-oauth2 = ">= 0.5.6" url = ">= 0.5" [build-dependencies] -syntex = { version = ">= 0.23" } -serde_codegen = { version = ">= 0.6" } +syntex = { version = "= 0.28" } +serde_codegen = { version = "= 0.6.13" } diff --git a/gen/mirror1/README.md b/gen/mirror1/README.md index 9920f387bb..807cb00445 100644 --- a/gen/mirror1/README.md +++ b/gen/mirror1/README.md @@ -5,7 +5,7 @@ DO NOT EDIT ! --> The `google-mirror1` library allows access to all features of the *Google mirror* service. -This documentation was generated from *mirror* crate version *0.1.12+20151206*, where *20151206* is the exact revision of the *mirror:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.12*. +This documentation was generated from *mirror* crate version *0.1.13+20151206*, where *20151206* is the exact revision of the *mirror:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.13*. Everything else about the *mirror* *v1* API can be found at the [official documentation site](https://developers.google.com/glass). diff --git a/gen/mirror1/src/cmn.rs b/gen/mirror1/src/cmn.rs index 87b91a8986..c69621da55 100644 --- a/gen/mirror1/src/cmn.rs +++ b/gen/mirror1/src/cmn.rs @@ -12,7 +12,7 @@ use mime::{Mime, TopLevel, SubLevel, Attr, Value}; use oauth2::{TokenType, Retry, self}; use hyper; use hyper::header::{ContentType, ContentLength, Headers, UserAgent, Authorization, Header, - HeaderFormat}; + HeaderFormat, Bearer}; use hyper::http::h1::LINE_ENDING; use hyper::method::Method; use hyper::status::StatusCode; @@ -634,7 +634,7 @@ pub struct ResumableUploadHelper<'a, A: 'a> { pub start_at: Option, pub auth: &'a mut A, pub user_agent: &'a str, - pub auth_header: Authorization, + pub auth_header: Authorization, pub url: &'a str, pub reader: &'a mut ReadSeek, pub media_type: Mime, diff --git a/gen/mirror1/src/lib.rs b/gen/mirror1/src/lib.rs index 71e0411db1..2f375df40c 100644 --- a/gen/mirror1/src/lib.rs +++ b/gen/mirror1/src/lib.rs @@ -2,7 +2,7 @@ // This file was generated automatically from 'src/mako/api/lib.rs.mako' // DO NOT EDIT ! -//! This documentation was generated from *mirror* crate version *0.1.12+20151206*, where *20151206* is the exact revision of the *mirror:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.12*. +//! This documentation was generated from *mirror* crate version *0.1.13+20151206*, where *20151206* is the exact revision of the *mirror:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.13*. //! //! Everything else about the *mirror* *v1* API can be found at the //! [official documentation site](https://developers.google.com/glass). diff --git a/gen/mirror1/src/lib.rs.in b/gen/mirror1/src/lib.rs.in index f2ed587e37..a171c70f6a 100644 --- a/gen/mirror1/src/lib.rs.in +++ b/gen/mirror1/src/lib.rs.in @@ -137,7 +137,7 @@ impl<'a, C, A> Mirror Mirror { client: RefCell::new(client), auth: RefCell::new(authenticator), - _user_agent: "google-api-rust-client/0.1.12".to_string(), + _user_agent: "google-api-rust-client/0.1.13".to_string(), } } @@ -161,7 +161,7 @@ impl<'a, C, A> Mirror } /// Set the user-agent header field to use in all requests to the server. - /// It defaults to `google-api-rust-client/0.1.12`. + /// It defaults to `google-api-rust-client/0.1.13`. /// /// Returns the previously set user-agent. pub fn user_agent(&mut self, agent_name: String) -> String { @@ -1527,7 +1527,7 @@ impl<'a, C, A> SubscriptionInsertCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, Subscription)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -1585,8 +1585,7 @@ impl<'a, C, A> SubscriptionInsertCall<'a, C, A> where C: BorrowMut SubscriptionDeleteCall<'a, C, A> where C: BorrowMut Result { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -1823,8 +1822,7 @@ impl<'a, C, A> SubscriptionDeleteCall<'a, C, A> where C: BorrowMut SubscriptionUpdateCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, Subscription)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -2067,8 +2065,7 @@ impl<'a, C, A> SubscriptionUpdateCall<'a, C, A> where C: BorrowMut SubscriptionListCall<'a, C, A> where C: BorrowMut, /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, SubscriptionsListResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -2293,8 +2290,7 @@ impl<'a, C, A> SubscriptionListCall<'a, C, A> where C: BorrowMut, } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -2450,7 +2446,7 @@ impl<'a, C, A> TimelineAttachmentListCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, AttachmentsListResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -2519,8 +2515,7 @@ impl<'a, C, A> TimelineAttachmentListCall<'a, C, A> where C: BorrowMut TimelineInsertCall<'a, C, A> where C: BorrowMut, A fn doit(mut self, mut reader: RS, reader_mime_type: mime::Mime, protocol: &'static str) -> Result<(hyper::client::Response, TimelineItem)> where RS: ReadSeek { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -2763,8 +2758,7 @@ impl<'a, C, A> TimelineInsertCall<'a, C, A> where C: BorrowMut, A } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { if should_ask_dlg_for_url && (upload_url = dlg.upload_url()) == () && upload_url.is_some() { @@ -3041,7 +3035,7 @@ impl<'a, C, A> TimelinePatchCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, TimelineItem)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -3121,8 +3115,7 @@ impl<'a, C, A> TimelinePatchCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -3314,7 +3307,7 @@ impl<'a, C, A> TimelineListCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, TimelineListResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -3382,8 +3375,7 @@ impl<'a, C, A> TimelineListCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -3590,7 +3582,7 @@ impl<'a, C, A> TimelineAttachmentInsertCall<'a, C, A> where C: BorrowMut(mut self, mut reader: RS, reader_mime_type: mime::Mime, protocol: &'static str) -> Result<(hyper::client::Response, Attachment)> where RS: ReadSeek { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -3670,8 +3662,7 @@ impl<'a, C, A> TimelineAttachmentInsertCall<'a, C, A> where C: BorrowMut TimelineAttachmentDeleteCall<'a, C, A> where C: BorrowMut Result { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -4003,8 +3994,7 @@ impl<'a, C, A> TimelineAttachmentDeleteCall<'a, C, A> where C: BorrowMut TimelineDeleteCall<'a, C, A> where C: BorrowMut, A /// Perform the operation you have build so far. pub fn doit(mut self) -> Result { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -4238,8 +4228,7 @@ impl<'a, C, A> TimelineDeleteCall<'a, C, A> where C: BorrowMut, A } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Delete, &url) @@ -4404,7 +4393,7 @@ impl<'a, C, A> TimelineUpdateCall<'a, C, A> where C: BorrowMut, A fn doit(mut self, mut reader: RS, reader_mime_type: mime::Mime, protocol: &'static str) -> Result<(hyper::client::Response, TimelineItem)> where RS: ReadSeek { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -4495,8 +4484,7 @@ impl<'a, C, A> TimelineUpdateCall<'a, C, A> where C: BorrowMut, A } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { if should_ask_dlg_for_url && (upload_url = dlg.upload_url()) == () && upload_url.is_some() { @@ -4782,7 +4770,7 @@ impl<'a, C, A> TimelineAttachmentGetCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, Attachment)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -4868,8 +4856,7 @@ impl<'a, C, A> TimelineAttachmentGetCall<'a, C, A> where C: BorrowMut TimelineGetCall<'a, C, A> where C: BorrowMut, A: o /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, TimelineItem)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -5114,8 +5101,7 @@ impl<'a, C, A> TimelineGetCall<'a, C, A> where C: BorrowMut, A: o } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -5281,7 +5267,7 @@ impl<'a, C, A> SettingGetCall<'a, C, A> where C: BorrowMut, A: oa /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Setting)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -5350,8 +5336,7 @@ impl<'a, C, A> SettingGetCall<'a, C, A> where C: BorrowMut, A: oa } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -5519,7 +5504,7 @@ impl<'a, C, A> LocationGetCall<'a, C, A> where C: BorrowMut, A: o /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Location)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -5588,8 +5573,7 @@ impl<'a, C, A> LocationGetCall<'a, C, A> where C: BorrowMut, A: o } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -5754,7 +5738,7 @@ impl<'a, C, A> LocationListCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, LocationsListResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -5801,8 +5785,7 @@ impl<'a, C, A> LocationListCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -5966,7 +5949,7 @@ impl<'a, C, A> AccountInsertCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Account)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -6226,7 +6209,7 @@ impl<'a, C, A> ContactGetCall<'a, C, A> where C: BorrowMut, A: oa /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Contact)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -6295,8 +6278,7 @@ impl<'a, C, A> ContactGetCall<'a, C, A> where C: BorrowMut, A: oa } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -6462,7 +6444,7 @@ impl<'a, C, A> ContactDeleteCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -6530,8 +6512,7 @@ impl<'a, C, A> ContactDeleteCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Delete, &url) @@ -6693,7 +6674,7 @@ impl<'a, C, A> ContactInsertCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Contact)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -6751,8 +6732,7 @@ impl<'a, C, A> ContactInsertCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -6928,7 +6908,7 @@ impl<'a, C, A> ContactPatchCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Contact)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -7008,8 +6988,7 @@ impl<'a, C, A> ContactPatchCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -7187,7 +7166,7 @@ impl<'a, C, A> ContactListCall<'a, C, A> where C: BorrowMut, A: o /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, ContactsListResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -7234,8 +7213,7 @@ impl<'a, C, A> ContactListCall<'a, C, A> where C: BorrowMut, A: o } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -7398,7 +7376,7 @@ impl<'a, C, A> ContactUpdateCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Contact)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -7478,8 +7456,7 @@ impl<'a, C, A> ContactUpdateCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); diff --git a/gen/monitoring3-cli/Cargo.toml b/gen/monitoring3-cli/Cargo.toml new file mode 100644 index 0000000000..8fce203e59 --- /dev/null +++ b/gen/monitoring3-cli/Cargo.toml @@ -0,0 +1,35 @@ +# DO NOT EDIT ! +# This file was generated automatically from 'src/mako/Cargo.toml.mako' +# DO NOT EDIT ! +[package] + +name = "google-monitoring3-cli" +version = "0.3.4+20160321" +authors = ["Sebastian Thiel "] +description = "A complete library to interact with monitoring (protocol v3)" +repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/monitoring3-cli" +homepage = "https://cloud.google.com/monitoring/api/" +documentation = "http://byron.github.io/google-apis-rs/google_monitoring3_cli" +license = "MIT" +keywords = ["monitoring", "google", "cli"] + +[[bin]] +name = "monitoring3" + +[dependencies] +hyper = "0.8" +mime = "0.2.0" +serde = "0.6.0" +serde_json = "0.6.0" +yup-oauth2 = ">= 0.5.6" +strsim = "0.4" +yup-hyper-mock = "1.0" +clap = "2.0" + +[build-dependencies] +syntex = { version = "= 0.28" } +serde_codegen = { version = "= 0.6.13" } + + +[dependencies.google-monitoring3] +path = "../monitoring3" diff --git a/gen/monitoring3-cli/LICENSE.md b/gen/monitoring3-cli/LICENSE.md new file mode 100644 index 0000000000..ff523b4547 --- /dev/null +++ b/gen/monitoring3-cli/LICENSE.md @@ -0,0 +1,30 @@ + +The MIT License (MIT) +===================== + +Copyright © `2015-2016` `Sebastian Thiel` + +Permission is hereby granted, free of charge, to any person +obtaining a copy of this software and associated documentation +files (the “Software”), to deal in the Software without +restriction, including without limitation the rights to use, +copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following +conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. diff --git a/gen/monitoring3-cli/README.md b/gen/monitoring3-cli/README.md new file mode 100644 index 0000000000..ae46b522a9 --- /dev/null +++ b/gen/monitoring3-cli/README.md @@ -0,0 +1,127 @@ + +The `monitoring3` command-line interface *(CLI)* allows to use most features of the *Google monitoring* service from the comfort of your terminal. + +By default all output is printed to standard out, but flags can be set to direct it into a file independent of your shell's +capabilities. Errors will be printed to standard error, and cause the program's exit code to be non-zero. + +If data-structures are requested, these will be returned as pretty-printed JSON, to be useful as input to other tools. + +Everything else about the *monitoring* API can be found at the +[official documentation site](https://cloud.google.com/monitoring/api/). + +# Downloads + +You can download the pre-compiled 64bit binaries for the following platforms: + +* ![icon](http://megaicons.net/static/img/icons_sizes/6/140/16/ubuntu-icon.png) [ubuntu](http://dl.byronimo.de/google.rs/cli/0.3.4/ubuntu/monitoring3.tar.gz) +* ![icon](http://hydra-media.cursecdn.com/wow.gamepedia.com/a/a2/Apple-icon-16x16.png?version=25ddd67ac3dd3b634478e3978b76cb74) [osx](http://dl.byronimo.de/google.rs/cli/0.3.4/osx/monitoring3.tar.gz) + +Find the source code [on github](https://github.com/Byron/google-apis-rs/tree/master/gen/monitoring3-cli). + +# Usage + +This documentation was generated from the *monitoring* API at revision *20160321*. The CLI is at version *0.3.4*. + +```bash +monitoring3 [options] + projects + collectd-time-series-create (-r )... [-p ]... [-o ] + groups-create (-r )... [-p ]... [-o ] + groups-delete [-p ]... [-o ] + groups-get [-p ]... [-o ] + groups-list [-p ]... [-o ] + groups-members-list [-p ]... [-o ] + groups-update (-r )... [-p ]... [-o ] + metric-descriptors-create (-r )... [-p ]... [-o ] + metric-descriptors-delete [-p ]... [-o ] + metric-descriptors-get [-p ]... [-o ] + metric-descriptors-list [-p ]... [-o ] + monitored-resource-descriptors-get [-p ]... [-o ] + monitored-resource-descriptors-list [-p ]... [-o ] + time-series-create (-r )... [-p ]... [-o ] + time-series-list [-p ]... [-o ] + monitoring3 --help + +Configuration: + [--scope ]... + Specify the authentication a method should be executed in. Each scope + requires the user to grant this application permission to use it. + If unset, it defaults to the shortest scope url for a particular method. + --config-dir + A directory into which we will store our persistent data. Defaults to + a user-writable directory that we will create during the first invocation. + [default: ~/.google-service-cli] + --debug + Output all server communication to standard error. `tx` and `rx` are placed + into the same stream. + --debug-auth + Output all communication related to authentication to standard error. `tx` + and `rx` are placed into the same stream. + +``` + +# Configuration + +The program will store all persistent data in the `~/.google-service-cli` directory in *JSON* files prefixed with `monitoring3-`. You can change the directory used to store configuration with the `--config-dir` flag on a per-invocation basis. + +More information about the various kinds of persistent data are given in the following paragraphs. + +# Authentication + +Most APIs require a user to authenticate any request. If this is the case, the [scope][scopes] determines the +set of permissions granted. The granularity of these is usually no more than *read-only* or *full-access*. + +If not set, the system will automatically select the smallest feasible scope, e.g. when invoking a +method that is read-only, it will ask only for a read-only scope. +You may use the `--scope` flag to specify a scope directly. +All applicable scopes are documented in the respective method's CLI documentation. + +The first time a scope is used, the user is asked for permission. Follow the instructions given +by the CLI to grant permissions, or to decline. + +If a scope was authenticated by the user, the respective information will be stored as *JSON* in the configuration +directory, e.g. `~/.google-service-cli/monitoring3-token-.json`. No manual management of these tokens +is necessary. + +To revoke granted authentication, please refer to the [official documentation][revoke-access]. + +# Application Secrets + +In order to allow any application to use Google services, it will need to be registered using the +[Google Developer Console][google-dev-console]. APIs the application may use are then enabled for it +one by one. Most APIs can be used for free and have a daily quota. + +To allow more comfortable usage of the CLI without forcing anyone to register an own application, the CLI +comes with a default application secret that is configured accordingly. This also means that heavy usage +all around the world may deplete the daily quota. + +You can workaround this limitation by putting your own secrets file at this location: +`~/.google-service-cli/monitoring3-secret.json`, assuming that the required *monitoring* API +was enabled for it. Such a secret file can be downloaded in the *Google Developer Console* at +*APIs & auth -> Credentials -> Download JSON* and used as is. + +Learn more about how to setup Google projects and enable APIs using the [official documentation][google-project-new]. + + +# Debugging + +Even though the CLI does its best to provide usable error messages, sometimes it might be desirable to know +what exactly led to a particular issue. This is done by allowing all client-server communication to be +output to standard error *as-is*. + +The `--debug` flag will print all client-server communication to standard error, whereas the `--debug-auth` flag +will cause all communication related to authentication to standard error. +If the `--debug` flag is set, error-results will be debug-printed, possibly yielding more information about the +issue at hand. + +You may consider redirecting standard error into a file for ease of use, e.g. `monitoring3 --debug [options] 2>debug.txt`. + + +[scopes]: https://developers.google.com/+/api/oauth#scopes +[revoke-access]: http://webapps.stackexchange.com/a/30849 +[google-dev-console]: https://console.developers.google.com/ +[google-project-new]: https://developers.google.com/console/help/new/ \ No newline at end of file diff --git a/gen/monitoring3-cli/mkdocs.yml b/gen/monitoring3-cli/mkdocs.yml new file mode 100644 index 0000000000..2741e3ecc2 --- /dev/null +++ b/gen/monitoring3-cli/mkdocs.yml @@ -0,0 +1,31 @@ +site_name: monitoring v0.3.4+20160321 +site_url: http://byron.github.io/google-apis-rs/google-monitoring3-cli +site_description: Write integrating applications with bcore + +repo_url: https://github.com/Byron/google-apis-rs/tree/master/gen/monitoring3-cli + +docs_dir: docs +site_dir: build_html + +pages: +- ['index.md', 'Home'] +- ['projects_collectd-time-series-create.md', 'Projects', 'Collectd Time Series Create'] +- ['projects_groups-create.md', 'Projects', 'Groups Create'] +- ['projects_groups-delete.md', 'Projects', 'Groups Delete'] +- ['projects_groups-get.md', 'Projects', 'Groups Get'] +- ['projects_groups-list.md', 'Projects', 'Groups List'] +- ['projects_groups-members-list.md', 'Projects', 'Groups Members List'] +- ['projects_groups-update.md', 'Projects', 'Groups Update'] +- ['projects_metric-descriptors-create.md', 'Projects', 'Metric Descriptors Create'] +- ['projects_metric-descriptors-delete.md', 'Projects', 'Metric Descriptors Delete'] +- ['projects_metric-descriptors-get.md', 'Projects', 'Metric Descriptors Get'] +- ['projects_metric-descriptors-list.md', 'Projects', 'Metric Descriptors List'] +- ['projects_monitored-resource-descriptors-get.md', 'Projects', 'Monitored Resource Descriptors Get'] +- ['projects_monitored-resource-descriptors-list.md', 'Projects', 'Monitored Resource Descriptors List'] +- ['projects_time-series-create.md', 'Projects', 'Time Series Create'] +- ['projects_time-series-list.md', 'Projects', 'Time Series List'] + +theme: readthedocs + +copyright: Copyright © 2015-2016, `Sebastian Thiel` + diff --git a/gen/monitoring3-cli/src/cmn.rs b/gen/monitoring3-cli/src/cmn.rs new file mode 100644 index 0000000000..ae86fdef65 --- /dev/null +++ b/gen/monitoring3-cli/src/cmn.rs @@ -0,0 +1,721 @@ +// COPY OF 'src/rust/cli/cmn.rs' +// DO NOT EDIT +use oauth2::{ApplicationSecret, ConsoleApplicationSecret, TokenStorage, Token}; +use serde_json as json; +use serde_json::value::Value; +use mime::Mime; +use clap::{App, SubCommand}; +use strsim; + +use std::fs; +use std::env; +use std::io; +use std::fmt; +use std::path::{Path, PathBuf}; +use std::str::FromStr; +use std::string::ToString; +use std::io::{Write, Read, stdout}; + +use std::default::Default; + +const FIELD_SEP: char = '.'; + + +pub enum ComplexType { + Pod, + Vec, + Map, +} + + // Null, + // Bool(bool), + // I64(i64), + // U64(u64), + // F64(f64), + // String(String), + +pub enum JsonType { + Boolean, + Int, + Uint, + Float, + String, +} + +pub struct JsonTypeInfo { + pub jtype: JsonType, + pub ctype: ComplexType, +} + +// Based on @erickt user comment. Thanks for the idea ! +// Remove all keys whose values are null from given value (changed in place) +pub fn remove_json_null_values(value: &mut Value) { + match *value { + Value::Object(ref mut map) => { + let mut for_removal = Vec::new(); + + for (key, mut value) in map.iter_mut() { + if value.is_null() { + for_removal.push(key.clone()); + } else { + remove_json_null_values(&mut value); + } + } + + for key in &for_removal { + map.remove(key); + } + } + _ => {} + } +} + +fn did_you_mean<'a>(v: &str, possible_values: &[&'a str]) -> Option<&'a str> { + + let mut candidate: Option<(f64, &str)> = None; + for pv in possible_values { + let confidence = strsim::jaro_winkler(v, pv); + if confidence > 0.8 && (candidate.is_none() || (candidate.as_ref().unwrap().0 < confidence)) { + candidate = Some((confidence, pv)); + } + } + match candidate { + None => None, + Some((_, candidate)) => Some(candidate), + } +} + +pub enum CallType { + Upload(UploadProtocol), + Standard, +} + +arg_enum!{ + pub enum UploadProtocol { + Simple, + Resumable + } +} + +impl AsRef for UploadProtocol { + fn as_ref(&self) -> &str { + match *self { + UploadProtocol::Simple => "simple", + UploadProtocol::Resumable => "resumable" + } + } +} + +impl AsRef for CallType { + fn as_ref(&self) -> &str { + match *self { + CallType::Upload(ref proto) => proto.as_ref(), + CallType::Standard => "standard-request" + } + } +} + +#[derive(Clone, Default)] +pub struct FieldCursor(Vec); + +impl ToString for FieldCursor { + fn to_string(&self) -> String { + self.0.join(".") + } +} + +impl From<&'static str> for FieldCursor { + fn from(value: &'static str) -> FieldCursor { + let mut res = FieldCursor::default(); + res.set(value).unwrap(); + res + } +} + +impl FieldCursor { + pub fn set(&mut self, value: &str) -> Result<(), CLIError> { + if value.len() == 0 { + return Err(CLIError::Field(FieldError::Empty)) + } + + let mut first_is_field_sep = false; + let mut char_count: usize = 0; + let mut last_c = FIELD_SEP; + let mut num_conscutive_field_seps = 0; + + let mut field = String::new(); + let mut fields = self.0.clone(); + + let push_field = |fs: &mut Vec, f: &mut String| { + if f.len() > 0 { + fs.push(f.clone()); + f.truncate(0); + } + }; + + for (cid, c) in value.chars().enumerate() { + char_count += 1; + + if c == FIELD_SEP { + if cid == 0 { + first_is_field_sep = true; + } + num_conscutive_field_seps += 1; + if cid > 0 && last_c == FIELD_SEP { + if fields.pop().is_none() { + return Err(CLIError::Field(FieldError::PopOnEmpty(value.to_string()))) + } + } else { + push_field(&mut fields, &mut field); + } + } else { + num_conscutive_field_seps = 0; + if cid == 1 { + if first_is_field_sep { + fields.truncate(0); + } + } + field.push(c); + } + + last_c = c; + } + + push_field(&mut fields, &mut field); + + if char_count == 1 && first_is_field_sep { + fields.truncate(0); + } + if char_count > 1 && num_conscutive_field_seps == 1 { + return Err(CLIError::Field(FieldError::TrailingFieldSep(value.to_string()))) + } + + self.0 = fields; + Ok(()) + } + + pub fn did_you_mean(value: &str, possible_values: &[&str]) -> Option { + if value.len() == 0 { + return None + } + + let mut last_c = FIELD_SEP; + + let mut field = String::new(); + let mut output = String::new(); + + let push_field = |fs: &mut String, f: &mut String| { + if f.len() > 0 { + fs.push_str( + match did_you_mean(&f, possible_values) { + Some(candidate) => candidate, + None => &f, + }); + f.truncate(0); + } + }; + + for (cid, c) in value.chars().enumerate() { + if c == FIELD_SEP { + if last_c != FIELD_SEP { + push_field(&mut output, &mut field); + } + output.push(c); + } else { + field.push(c); + } + + last_c = c; + } + + push_field(&mut output, &mut field); + + if &output == value { + None + } else { + Some(output) + } + } + + pub fn set_json_value(&self, mut object: &mut Value, + value: &str, type_info: JsonTypeInfo, + err: &mut InvalidOptionsError, + orig_cursor: &FieldCursor) { + assert!(self.0.len() > 0); + + for field in &self.0[..self.0.len()-1] { + let tmp = object; + object = + match *tmp { + Value::Object(ref mut mapping) => { + mapping.entry(field.to_owned()).or_insert( + Value::Object(Default::default()) + ) + }, + _ => panic!("We don't expect non-object Values here ...") + }; + } + + match *object { + Value::Object(ref mut mapping) => { + let field = &self.0[self.0.len()-1]; + let to_jval = + |value: &str, jtype: JsonType, err: &mut InvalidOptionsError| + -> Value { + match jtype { + JsonType::Boolean => + Value::Bool(arg_from_str(value, err, &field, "boolean")), + JsonType::Int => + Value::I64(arg_from_str(value, err, &field, "int")), + JsonType::Uint => + Value::U64(arg_from_str(value, err, &field, "uint")), + JsonType::Float => + Value::F64(arg_from_str(value, err, &field, "float")), + JsonType::String => + Value::String(value.to_owned()), + } + }; + + match type_info.ctype { + ComplexType::Pod => { + if mapping.insert(field.to_owned(), to_jval(value, type_info.jtype, err)).is_some() { + err.issues.push(CLIError::Field(FieldError::Duplicate(orig_cursor.to_string()))); + } + }, + ComplexType::Vec => { + match *mapping.entry(field.to_owned()) + .or_insert(Value::Array(Default::default())) { + Value::Array(ref mut values) => values.push(to_jval(value, type_info.jtype, err)), + _ => unreachable!() + } + }, + ComplexType::Map => { + let (key, value) = parse_kv_arg(value, err, true); + let jval = to_jval(value.unwrap_or(""), type_info.jtype, err); + + match *mapping.entry(field.to_owned()) + .or_insert(Value::Object(Default::default())) { + Value::Object(ref mut value_map) => { + if value_map.insert(key.to_owned(), jval).is_some() { + err.issues.push(CLIError::Field(FieldError::Duplicate(orig_cursor.to_string()))); + } + } + _ => unreachable!() + } + } + } + }, + _ => unreachable!() + } + } + + pub fn num_fields(&self) -> usize { + self.0.len() + } +} + +pub fn parse_kv_arg<'a>(kv: &'a str, err: &mut InvalidOptionsError, for_hashmap: bool) + -> (&'a str, Option<&'a str>) { + let mut add_err = || err.issues.push(CLIError::InvalidKeyValueSyntax(kv.to_string(),for_hashmap)); + match kv.find('=') { + None => { + add_err(); + return (kv, None) + }, + Some(pos) => { + let key = &kv[..pos]; + if kv.len() <= pos + 1 { + add_err(); + return (key, Some("")) + } + (key, Some(&kv[pos+1..])) + } + } +} + +pub fn calltype_from_str(name: &str, valid_protocols: Vec, err: &mut InvalidOptionsError) -> CallType { + CallType::Upload( + match UploadProtocol::from_str(name) { + Ok(up) => up, + Err(msg) => { + err.issues.push(CLIError::InvalidUploadProtocol(name.to_string(), valid_protocols)); + UploadProtocol::Simple + } + }) +} + +pub fn input_file_from_opts(file_path: &str, err: &mut InvalidOptionsError) -> Option { + match fs::File::open(file_path) { + Ok(f) => Some(f), + Err(io_err) => { + err.issues.push(CLIError::Input(InputError::IOError((file_path.to_string(), io_err)))); + None + } + } +} + +pub fn input_mime_from_opts(mime: &str, err: &mut InvalidOptionsError) -> Option { + match mime.parse() { + Ok(m) => Some(m), + Err(_) => { + err.issues.push(CLIError::Input(InputError::Mime(mime.to_string()))); + None + } + } +} + +pub fn writer_from_opts(arg: Option<&str>) -> Result, io::Error> { + let f = arg.unwrap_or("-"); + match f { + "-" => Ok(Box::new(stdout())), + _ => match fs::OpenOptions::new().create(true).write(true).open(f) { + Ok(f) => Ok(Box::new(f)), + Err(io_err) => Err(io_err), + } + } +} + + +pub fn arg_from_str<'a, T>(arg: &str, err: &mut InvalidOptionsError, + arg_name: &'a str, + arg_type: &'a str) -> T + where T: FromStr + Default, + ::Err: fmt::Display { + match FromStr::from_str(arg) { + Err(perr) => { + err.issues.push( + CLIError::ParseError(arg_name.to_owned(), arg_type.to_owned(), arg.to_string(), format!("{}", perr)) + ); + Default::default() + }, + Ok(v) => v, + } +} + +pub struct JsonTokenStorage { + pub program_name: &'static str, + pub db_dir: String, +} + +impl JsonTokenStorage { + fn path(&self, scope_hash: u64) -> PathBuf { + Path::new(&self.db_dir).join(&format!("{}-token-{}.json", self.program_name, scope_hash)) + } +} + +impl TokenStorage for JsonTokenStorage { + type Error = json::Error; + + // NOTE: logging might be interesting, currently we swallow all errors + fn set(&mut self, scope_hash: u64, _: &Vec<&str>, token: Option) -> Result<(), json::Error> { + match token { + None => { + match fs::remove_file(self.path(scope_hash)) { + Err(err) => + match err.kind() { + io::ErrorKind::NotFound => Ok(()), + _ => Err(json::Error::IoError(err)) + }, + Ok(_) => Ok(()), + } + } + Some(token) => { + match fs::OpenOptions::new().create(true).write(true).open(&self.path(scope_hash)) { + Ok(mut f) => { + match json::to_writer_pretty(&mut f, &token) { + Ok(_) => Ok(()), + Err(serde_err) => Err(serde_err), + } + }, + Err(io_err) => Err(json::Error::IoError(io_err)) + } + } + } + } + + fn get(&self, scope_hash: u64, _: &Vec<&str>) -> Result, json::Error> { + match fs::File::open(&self.path(scope_hash)) { + Ok(f) => { + match json::de::from_reader(f) { + Ok(token) => Ok(Some(token)), + Err(err) => Err(err), + } + }, + Err(io_err) => { + match io_err.kind() { + io::ErrorKind::NotFound => Ok(None), + _ => Err(json::Error::IoError(io_err)) + } + } + } + } +} + + +#[derive(Debug)] +pub enum ApplicationSecretError { + DecoderError((String, json::Error)), + FormatError(String), +} + +impl fmt::Display for ApplicationSecretError { + fn fmt(&self, f: &mut fmt::Formatter) -> Result<(), fmt::Error> { + match *self { + ApplicationSecretError::DecoderError((ref path, ref err)) + => writeln!(f, "Could not decode file at '{}' with error: {}.", + path, err), + ApplicationSecretError::FormatError(ref path) + => writeln!(f, "'installed' field is unset in secret file at '{}'.", + path), + } + } +} + +#[derive(Debug)] +pub enum ConfigurationError { + DirectoryCreationFailed((String, io::Error)), + DirectoryUnset, + HomeExpansionFailed(String), + Secret(ApplicationSecretError), + IOError((String, io::Error)), +} + +impl fmt::Display for ConfigurationError { + fn fmt(&self, f: &mut fmt::Formatter) -> Result<(), fmt::Error> { + match *self { + ConfigurationError::DirectoryCreationFailed((ref dir, ref err)) + => writeln!(f, "Directory '{}' could not be created with error: {}.", dir, err), + ConfigurationError::DirectoryUnset + => writeln!(f, "--config-dir was unset or empty."), + ConfigurationError::HomeExpansionFailed(ref dir) + => writeln!(f, "Couldn't find HOME directory of current user, failed to expand '{}'.", dir), + ConfigurationError::Secret(ref err) + => writeln!(f, "Secret -> {}", err), + ConfigurationError::IOError((ref path, ref err)) + => writeln!(f, "IO operation failed on path '{}' with error: {}.", path, err), + } + } +} + +#[derive(Debug)] +pub enum InputError { + IOError((String, io::Error)), + Mime(String), +} + +impl fmt::Display for InputError { + fn fmt(&self, f: &mut fmt::Formatter) -> Result<(), fmt::Error> { + match *self { + InputError::IOError((ref file_path, ref io_err)) + => writeln!(f, "Failed to open '{}' for reading with error: {}.", file_path, io_err), + InputError::Mime(ref mime) + => writeln!(f, "'{}' is not a known mime-type.", mime), + } + } +} + +#[derive(Debug)] +pub enum FieldError { + PopOnEmpty(String), + TrailingFieldSep(String), + Unknown(String, Option, Option), + Duplicate(String), + Empty, +} + + +impl fmt::Display for FieldError { + fn fmt(&self, f: &mut fmt::Formatter) -> Result<(), fmt::Error> { + match *self { + FieldError::PopOnEmpty(ref field) + => writeln!(f, "'{}': Cannot move up on empty field cursor.", field), + FieldError::TrailingFieldSep(ref field) + => writeln!(f, "'{}': Single field separator may not be last character.", field), + FieldError::Unknown(ref field, ref suggestion, ref value) => { + let suffix = + match *suggestion { + Some(ref s) => { + let kv = + match *value { + Some(ref v) => format!("{}={}", s, v), + None => s.clone(), + }; + format!(" Did you mean '{}' ?", kv) + }, + None => String::new(), + }; + writeln!(f, "Field '{}' does not exist.{}", field, suffix) + }, + FieldError::Duplicate(ref cursor) + => writeln!(f, "Value at '{}' was already set", cursor), + FieldError::Empty + => writeln!(f, "Field names must not be empty."), + } + } +} + + +#[derive(Debug)] +pub enum CLIError { + Configuration(ConfigurationError), + ParseError(String, String, String, String), + UnknownParameter(String, Vec<&'static str>), + InvalidUploadProtocol(String, Vec), + InvalidKeyValueSyntax(String, bool), + Input(InputError), + Field(FieldError), + MissingCommandError, + MissingMethodError(String), +} + +impl fmt::Display for CLIError { + fn fmt(&self, f: &mut fmt::Formatter) -> Result<(), fmt::Error> { + match *self { + CLIError::Configuration(ref err) => write!(f, "Configuration -> {}", err), + CLIError::Input(ref err) => write!(f, "Input -> {}", err), + CLIError::Field(ref err) => write!(f, "Field -> {}", err), + CLIError::InvalidUploadProtocol(ref proto_name, ref valid_names) + => writeln!(f, "'{}' is not a valid upload protocol. Choose from one of {}.", proto_name, valid_names.join(", ")), + CLIError::ParseError(ref arg_name, ref type_name, ref value, ref err_desc) + => writeln!(f, "Failed to parse argument '{}' with value '{}' as {} with error: {}.", + arg_name, value, type_name, err_desc), + CLIError::UnknownParameter(ref param_name, ref possible_values) => { + let suffix = + match did_you_mean(param_name, &possible_values) { + Some(v) => format!(" Did you mean '{}' ?", v), + None => String::new(), + }; + write!(f, "Parameter '{}' is unknown.{}\n", param_name, suffix) + }, + CLIError::InvalidKeyValueSyntax(ref kv, is_hashmap) => { + let hashmap_info = if is_hashmap { "hashmap " } else { "" }; + writeln!(f, "'{}' does not match {}pattern =.", kv, hashmap_info) + }, + CLIError::MissingCommandError => writeln!(f, "Please specify the main sub-command."), + CLIError::MissingMethodError(ref cmd) => writeln!(f, "Please specify the method to call on the '{}' command.", cmd), + } + } +} + +#[derive(Debug)] +pub struct InvalidOptionsError { + pub issues: Vec, + pub exit_code: i32, +} + +impl fmt::Display for InvalidOptionsError { + fn fmt(&self, f: &mut fmt::Formatter) -> Result<(), fmt::Error> { + for issue in &self.issues { + try!(issue.fmt(f)); + } + Ok(()) + } +} + +impl InvalidOptionsError { + pub fn single(err: CLIError, exit_code: i32) -> InvalidOptionsError { + InvalidOptionsError { + issues: vec![err], + exit_code: exit_code, + } + } + + pub fn new() -> InvalidOptionsError { + InvalidOptionsError { + issues: Vec::new(), + exit_code: 1, + } + } +} + +pub fn assure_config_dir_exists(dir: &str) -> Result { + let trdir = dir.trim(); + if trdir.len() == 0 { + return Err(CLIError::Configuration(ConfigurationError::DirectoryUnset)) + } + + let expanded_config_dir = + if trdir.as_bytes()[0] == b'~' { + match env::var("HOME").ok().or(env::var("UserProfile").ok()) { + None => return Err(CLIError::Configuration(ConfigurationError::HomeExpansionFailed(trdir.to_string()))), + Some(mut user) => { + user.push_str(&trdir[1..]); + user + } + } + } else { + trdir.to_string() + }; + + if let Err(err) = fs::create_dir(&expanded_config_dir) { + if err.kind() != io::ErrorKind::AlreadyExists { + return Err(CLIError::Configuration( + ConfigurationError::DirectoryCreationFailed((expanded_config_dir, err)))) + } + } + + Ok(expanded_config_dir) +} + +pub fn application_secret_from_directory(dir: &str, + secret_basename: &str, + json_console_secret: &str) + -> Result { + let secret_path = Path::new(dir).join(secret_basename); + let secret_str = || secret_path.as_path().to_str().unwrap().to_string(); + let secret_io_error = |io_err: io::Error| { + Err(CLIError::Configuration(ConfigurationError::IOError( + (secret_str(), io_err) + ))) + }; + + for _ in 0..2 { + match fs::File::open(&secret_path) { + Err(mut err) => { + if err.kind() == io::ErrorKind::NotFound { + // Write our built-in one - user may adjust the written file at will + + err = match fs::OpenOptions::new().create(true).write(true).open(&secret_path) { + Err(cfe) => cfe, + Ok(mut f) => { + // Assure we convert 'ugly' json string into pretty one + let console_secret: ConsoleApplicationSecret + = json::from_str(json_console_secret).unwrap(); + match json::to_writer_pretty(&mut f, &console_secret) { + Err(serde_err) => match serde_err { + json::Error::IoError(err) => err, + _ => panic!("Unexpected serde error: {:#?}", serde_err) + }, + Ok(_) => continue, + } + } + }; + // fall through to IO error handling + } + return secret_io_error(err) + }, + Ok(f) => { + match json::de::from_reader::<_, ConsoleApplicationSecret>(f) { + Err(json::Error::IoError(err)) => + return secret_io_error(err), + Err(json_err) => + return Err(CLIError::Configuration( + ConfigurationError::Secret( + ApplicationSecretError::DecoderError( + (secret_str(), json_err) + )))), + Ok(console_secret) => + match console_secret.installed { + Some(secret) => return Ok(secret), + None => return Err( + CLIError::Configuration( + ConfigurationError::Secret( + ApplicationSecretError::FormatError(secret_str()) + ))) + }, + } + } + } + } + unreachable!(); +} diff --git a/gen/monitoring3-cli/src/main.rs b/gen/monitoring3-cli/src/main.rs new file mode 100644 index 0000000000..f6f0a768eb --- /dev/null +++ b/gen/monitoring3-cli/src/main.rs @@ -0,0 +1,1706 @@ +// DO NOT EDIT ! +// This file was generated automatically from 'src/mako/cli/main.rs.mako' +// DO NOT EDIT ! +#![allow(unused_variables, unused_imports, dead_code, unused_mut)] + +#[macro_use] +extern crate clap; +extern crate yup_oauth2 as oauth2; +extern crate yup_hyper_mock as mock; +extern crate serde; +extern crate serde_json; +extern crate hyper; +extern crate mime; +extern crate strsim; +extern crate google_monitoring3 as api; + +use std::env; +use std::io::{self, Write}; +use clap::{App, SubCommand, Arg}; + +mod cmn; + +use cmn::{InvalidOptionsError, CLIError, JsonTokenStorage, arg_from_str, writer_from_opts, parse_kv_arg, + input_file_from_opts, input_mime_from_opts, FieldCursor, FieldError, CallType, UploadProtocol, + calltype_from_str, remove_json_null_values, ComplexType, JsonType, JsonTypeInfo}; + +use std::default::Default; +use std::str::FromStr; + +use oauth2::{Authenticator, DefaultAuthenticatorDelegate}; +use serde_json as json; +use clap::ArgMatches; + +enum DoitError { + IoError(String, io::Error), + ApiError(api::Error), +} + +struct Engine<'n> { + opt: ArgMatches<'n>, + hub: api::Monitoring>, + gp: Vec<&'static str>, + gpm: Vec<(&'static str, &'static str)>, +} + + +impl<'n> Engine<'n> { + fn _projects_collectd_time_series_create(&self, opt: &ArgMatches<'n>, dry_run: bool, err: &mut InvalidOptionsError) + -> Result<(), DoitError> { + + let mut field_cursor = FieldCursor::default(); + let mut object = json::value::Value::Object(Default::default()); + + for kvarg in opt.values_of("kv").map(|i|i.collect()).unwrap_or(Vec::new()).iter() { + let last_errc = err.issues.len(); + let (key, value) = parse_kv_arg(&*kvarg, err, false); + let mut temp_cursor = field_cursor.clone(); + if let Err(field_err) = temp_cursor.set(&*key) { + err.issues.push(field_err); + } + if value.is_none() { + field_cursor = temp_cursor.clone(); + if err.issues.len() > last_errc { + err.issues.remove(last_errc); + } + continue; + } + + let type_info: Option<(&'static str, JsonTypeInfo)> = + match &temp_cursor.to_string()[..] { + "resource.labels" => Some(("resource.labels", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Map })), + "resource.type" => Some(("resource.type", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "collectd-version" => Some(("collectdVersion", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + _ => { + let suggestion = FieldCursor::did_you_mean(key, &vec!["collectd-version", "labels", "resource", "type"]); + err.issues.push(CLIError::Field(FieldError::Unknown(temp_cursor.to_string(), suggestion, value.map(|v| v.to_string())))); + None + } + }; + if let Some((field_cursor_str, type_info)) = type_info { + FieldCursor::from(field_cursor_str).set_json_value(&mut object, value.unwrap(), type_info, err, &temp_cursor); + } + } + let mut request: api::CreateCollectdTimeSeriesRequest = json::value::from_value(object).unwrap(); + let mut call = self.hub.projects().collectd_time_series_create(request, opt.value_of("name").unwrap_or("")); + for parg in opt.values_of("v").map(|i|i.collect()).unwrap_or(Vec::new()).iter() { + let (key, value) = parse_kv_arg(&*parg, err, false); + match key { + _ => { + let mut found = false; + for param in &self.gp { + if key == *param { + found = true; + call = call.param(self.gpm.iter().find(|t| t.0 == key).unwrap_or(&("", key)).1, value.unwrap_or("unset")); + break; + } + } + if !found { + err.issues.push(CLIError::UnknownParameter(key.to_string(), + {let mut v = Vec::new(); + v.extend(self.gp.iter().map(|v|*v)); + v } )); + } + } + } + } + let protocol = CallType::Standard; + if dry_run { + Ok(()) + } else { + assert!(err.issues.len() == 0); + for scope in self.opt.values_of("url").map(|i|i.collect()).unwrap_or(Vec::new()).iter() { + call = call.add_scope(scope); + } + let mut ostream = match writer_from_opts(opt.value_of("out")) { + Ok(mut f) => f, + Err(io_err) => return Err(DoitError::IoError(opt.value_of("out").unwrap_or("-").to_string(), io_err)), + }; + match match protocol { + CallType::Standard => call.doit(), + _ => unreachable!() + } { + Err(api_err) => Err(DoitError::ApiError(api_err)), + Ok((mut response, output_schema)) => { + let mut value = json::value::to_value(&output_schema); + remove_json_null_values(&mut value); + json::to_writer_pretty(&mut ostream, &value).unwrap(); + ostream.flush().unwrap(); + Ok(()) + } + } + } + } + + fn _projects_groups_create(&self, opt: &ArgMatches<'n>, dry_run: bool, err: &mut InvalidOptionsError) + -> Result<(), DoitError> { + + let mut field_cursor = FieldCursor::default(); + let mut object = json::value::Value::Object(Default::default()); + + for kvarg in opt.values_of("kv").map(|i|i.collect()).unwrap_or(Vec::new()).iter() { + let last_errc = err.issues.len(); + let (key, value) = parse_kv_arg(&*kvarg, err, false); + let mut temp_cursor = field_cursor.clone(); + if let Err(field_err) = temp_cursor.set(&*key) { + err.issues.push(field_err); + } + if value.is_none() { + field_cursor = temp_cursor.clone(); + if err.issues.len() > last_errc { + err.issues.remove(last_errc); + } + continue; + } + + let type_info: Option<(&'static str, JsonTypeInfo)> = + match &temp_cursor.to_string()[..] { + "filter" => Some(("filter", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "parent-name" => Some(("parentName", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "display-name" => Some(("displayName", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "name" => Some(("name", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "is-cluster" => Some(("isCluster", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + _ => { + let suggestion = FieldCursor::did_you_mean(key, &vec!["display-name", "filter", "is-cluster", "name", "parent-name"]); + err.issues.push(CLIError::Field(FieldError::Unknown(temp_cursor.to_string(), suggestion, value.map(|v| v.to_string())))); + None + } + }; + if let Some((field_cursor_str, type_info)) = type_info { + FieldCursor::from(field_cursor_str).set_json_value(&mut object, value.unwrap(), type_info, err, &temp_cursor); + } + } + let mut request: api::Group = json::value::from_value(object).unwrap(); + let mut call = self.hub.projects().groups_create(request, opt.value_of("name").unwrap_or("")); + for parg in opt.values_of("v").map(|i|i.collect()).unwrap_or(Vec::new()).iter() { + let (key, value) = parse_kv_arg(&*parg, err, false); + match key { + "validate-only" => { + call = call.validate_only(arg_from_str(value.unwrap_or("false"), err, "validate-only", "boolean")); + }, + _ => { + let mut found = false; + for param in &self.gp { + if key == *param { + found = true; + call = call.param(self.gpm.iter().find(|t| t.0 == key).unwrap_or(&("", key)).1, value.unwrap_or("unset")); + break; + } + } + if !found { + err.issues.push(CLIError::UnknownParameter(key.to_string(), + {let mut v = Vec::new(); + v.extend(self.gp.iter().map(|v|*v)); + v.extend(["validate-only"].iter().map(|v|*v)); + v } )); + } + } + } + } + let protocol = CallType::Standard; + if dry_run { + Ok(()) + } else { + assert!(err.issues.len() == 0); + for scope in self.opt.values_of("url").map(|i|i.collect()).unwrap_or(Vec::new()).iter() { + call = call.add_scope(scope); + } + let mut ostream = match writer_from_opts(opt.value_of("out")) { + Ok(mut f) => f, + Err(io_err) => return Err(DoitError::IoError(opt.value_of("out").unwrap_or("-").to_string(), io_err)), + }; + match match protocol { + CallType::Standard => call.doit(), + _ => unreachable!() + } { + Err(api_err) => Err(DoitError::ApiError(api_err)), + Ok((mut response, output_schema)) => { + let mut value = json::value::to_value(&output_schema); + remove_json_null_values(&mut value); + json::to_writer_pretty(&mut ostream, &value).unwrap(); + ostream.flush().unwrap(); + Ok(()) + } + } + } + } + + fn _projects_groups_delete(&self, opt: &ArgMatches<'n>, dry_run: bool, err: &mut InvalidOptionsError) + -> Result<(), DoitError> { + let mut call = self.hub.projects().groups_delete(opt.value_of("name").unwrap_or("")); + for parg in opt.values_of("v").map(|i|i.collect()).unwrap_or(Vec::new()).iter() { + let (key, value) = parse_kv_arg(&*parg, err, false); + match key { + _ => { + let mut found = false; + for param in &self.gp { + if key == *param { + found = true; + call = call.param(self.gpm.iter().find(|t| t.0 == key).unwrap_or(&("", key)).1, value.unwrap_or("unset")); + break; + } + } + if !found { + err.issues.push(CLIError::UnknownParameter(key.to_string(), + {let mut v = Vec::new(); + v.extend(self.gp.iter().map(|v|*v)); + v } )); + } + } + } + } + let protocol = CallType::Standard; + if dry_run { + Ok(()) + } else { + assert!(err.issues.len() == 0); + for scope in self.opt.values_of("url").map(|i|i.collect()).unwrap_or(Vec::new()).iter() { + call = call.add_scope(scope); + } + let mut ostream = match writer_from_opts(opt.value_of("out")) { + Ok(mut f) => f, + Err(io_err) => return Err(DoitError::IoError(opt.value_of("out").unwrap_or("-").to_string(), io_err)), + }; + match match protocol { + CallType::Standard => call.doit(), + _ => unreachable!() + } { + Err(api_err) => Err(DoitError::ApiError(api_err)), + Ok((mut response, output_schema)) => { + let mut value = json::value::to_value(&output_schema); + remove_json_null_values(&mut value); + json::to_writer_pretty(&mut ostream, &value).unwrap(); + ostream.flush().unwrap(); + Ok(()) + } + } + } + } + + fn _projects_groups_get(&self, opt: &ArgMatches<'n>, dry_run: bool, err: &mut InvalidOptionsError) + -> Result<(), DoitError> { + let mut call = self.hub.projects().groups_get(opt.value_of("name").unwrap_or("")); + for parg in opt.values_of("v").map(|i|i.collect()).unwrap_or(Vec::new()).iter() { + let (key, value) = parse_kv_arg(&*parg, err, false); + match key { + _ => { + let mut found = false; + for param in &self.gp { + if key == *param { + found = true; + call = call.param(self.gpm.iter().find(|t| t.0 == key).unwrap_or(&("", key)).1, value.unwrap_or("unset")); + break; + } + } + if !found { + err.issues.push(CLIError::UnknownParameter(key.to_string(), + {let mut v = Vec::new(); + v.extend(self.gp.iter().map(|v|*v)); + v } )); + } + } + } + } + let protocol = CallType::Standard; + if dry_run { + Ok(()) + } else { + assert!(err.issues.len() == 0); + for scope in self.opt.values_of("url").map(|i|i.collect()).unwrap_or(Vec::new()).iter() { + call = call.add_scope(scope); + } + let mut ostream = match writer_from_opts(opt.value_of("out")) { + Ok(mut f) => f, + Err(io_err) => return Err(DoitError::IoError(opt.value_of("out").unwrap_or("-").to_string(), io_err)), + }; + match match protocol { + CallType::Standard => call.doit(), + _ => unreachable!() + } { + Err(api_err) => Err(DoitError::ApiError(api_err)), + Ok((mut response, output_schema)) => { + let mut value = json::value::to_value(&output_schema); + remove_json_null_values(&mut value); + json::to_writer_pretty(&mut ostream, &value).unwrap(); + ostream.flush().unwrap(); + Ok(()) + } + } + } + } + + fn _projects_groups_list(&self, opt: &ArgMatches<'n>, dry_run: bool, err: &mut InvalidOptionsError) + -> Result<(), DoitError> { + let mut call = self.hub.projects().groups_list(opt.value_of("name").unwrap_or("")); + for parg in opt.values_of("v").map(|i|i.collect()).unwrap_or(Vec::new()).iter() { + let (key, value) = parse_kv_arg(&*parg, err, false); + match key { + "page-token" => { + call = call.page_token(value.unwrap_or("")); + }, + "page-size" => { + call = call.page_size(arg_from_str(value.unwrap_or("-0"), err, "page-size", "integer")); + }, + "descendants-of-group" => { + call = call.descendants_of_group(value.unwrap_or("")); + }, + "children-of-group" => { + call = call.children_of_group(value.unwrap_or("")); + }, + "ancestors-of-group" => { + call = call.ancestors_of_group(value.unwrap_or("")); + }, + _ => { + let mut found = false; + for param in &self.gp { + if key == *param { + found = true; + call = call.param(self.gpm.iter().find(|t| t.0 == key).unwrap_or(&("", key)).1, value.unwrap_or("unset")); + break; + } + } + if !found { + err.issues.push(CLIError::UnknownParameter(key.to_string(), + {let mut v = Vec::new(); + v.extend(self.gp.iter().map(|v|*v)); + v.extend(["children-of-group", "page-token", "ancestors-of-group", "descendants-of-group", "page-size"].iter().map(|v|*v)); + v } )); + } + } + } + } + let protocol = CallType::Standard; + if dry_run { + Ok(()) + } else { + assert!(err.issues.len() == 0); + for scope in self.opt.values_of("url").map(|i|i.collect()).unwrap_or(Vec::new()).iter() { + call = call.add_scope(scope); + } + let mut ostream = match writer_from_opts(opt.value_of("out")) { + Ok(mut f) => f, + Err(io_err) => return Err(DoitError::IoError(opt.value_of("out").unwrap_or("-").to_string(), io_err)), + }; + match match protocol { + CallType::Standard => call.doit(), + _ => unreachable!() + } { + Err(api_err) => Err(DoitError::ApiError(api_err)), + Ok((mut response, output_schema)) => { + let mut value = json::value::to_value(&output_schema); + remove_json_null_values(&mut value); + json::to_writer_pretty(&mut ostream, &value).unwrap(); + ostream.flush().unwrap(); + Ok(()) + } + } + } + } + + fn _projects_groups_members_list(&self, opt: &ArgMatches<'n>, dry_run: bool, err: &mut InvalidOptionsError) + -> Result<(), DoitError> { + let mut call = self.hub.projects().groups_members_list(opt.value_of("name").unwrap_or("")); + for parg in opt.values_of("v").map(|i|i.collect()).unwrap_or(Vec::new()).iter() { + let (key, value) = parse_kv_arg(&*parg, err, false); + match key { + "page-token" => { + call = call.page_token(value.unwrap_or("")); + }, + "page-size" => { + call = call.page_size(arg_from_str(value.unwrap_or("-0"), err, "page-size", "integer")); + }, + "interval-start-time" => { + call = call.interval_start_time(value.unwrap_or("")); + }, + "interval-end-time" => { + call = call.interval_end_time(value.unwrap_or("")); + }, + "filter" => { + call = call.filter(value.unwrap_or("")); + }, + _ => { + let mut found = false; + for param in &self.gp { + if key == *param { + found = true; + call = call.param(self.gpm.iter().find(|t| t.0 == key).unwrap_or(&("", key)).1, value.unwrap_or("unset")); + break; + } + } + if !found { + err.issues.push(CLIError::UnknownParameter(key.to_string(), + {let mut v = Vec::new(); + v.extend(self.gp.iter().map(|v|*v)); + v.extend(["interval-start-time", "page-token", "filter", "page-size", "interval-end-time"].iter().map(|v|*v)); + v } )); + } + } + } + } + let protocol = CallType::Standard; + if dry_run { + Ok(()) + } else { + assert!(err.issues.len() == 0); + for scope in self.opt.values_of("url").map(|i|i.collect()).unwrap_or(Vec::new()).iter() { + call = call.add_scope(scope); + } + let mut ostream = match writer_from_opts(opt.value_of("out")) { + Ok(mut f) => f, + Err(io_err) => return Err(DoitError::IoError(opt.value_of("out").unwrap_or("-").to_string(), io_err)), + }; + match match protocol { + CallType::Standard => call.doit(), + _ => unreachable!() + } { + Err(api_err) => Err(DoitError::ApiError(api_err)), + Ok((mut response, output_schema)) => { + let mut value = json::value::to_value(&output_schema); + remove_json_null_values(&mut value); + json::to_writer_pretty(&mut ostream, &value).unwrap(); + ostream.flush().unwrap(); + Ok(()) + } + } + } + } + + fn _projects_groups_update(&self, opt: &ArgMatches<'n>, dry_run: bool, err: &mut InvalidOptionsError) + -> Result<(), DoitError> { + + let mut field_cursor = FieldCursor::default(); + let mut object = json::value::Value::Object(Default::default()); + + for kvarg in opt.values_of("kv").map(|i|i.collect()).unwrap_or(Vec::new()).iter() { + let last_errc = err.issues.len(); + let (key, value) = parse_kv_arg(&*kvarg, err, false); + let mut temp_cursor = field_cursor.clone(); + if let Err(field_err) = temp_cursor.set(&*key) { + err.issues.push(field_err); + } + if value.is_none() { + field_cursor = temp_cursor.clone(); + if err.issues.len() > last_errc { + err.issues.remove(last_errc); + } + continue; + } + + let type_info: Option<(&'static str, JsonTypeInfo)> = + match &temp_cursor.to_string()[..] { + "filter" => Some(("filter", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "parent-name" => Some(("parentName", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "display-name" => Some(("displayName", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "name" => Some(("name", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "is-cluster" => Some(("isCluster", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + _ => { + let suggestion = FieldCursor::did_you_mean(key, &vec!["display-name", "filter", "is-cluster", "name", "parent-name"]); + err.issues.push(CLIError::Field(FieldError::Unknown(temp_cursor.to_string(), suggestion, value.map(|v| v.to_string())))); + None + } + }; + if let Some((field_cursor_str, type_info)) = type_info { + FieldCursor::from(field_cursor_str).set_json_value(&mut object, value.unwrap(), type_info, err, &temp_cursor); + } + } + let mut request: api::Group = json::value::from_value(object).unwrap(); + let mut call = self.hub.projects().groups_update(request, opt.value_of("name").unwrap_or("")); + for parg in opt.values_of("v").map(|i|i.collect()).unwrap_or(Vec::new()).iter() { + let (key, value) = parse_kv_arg(&*parg, err, false); + match key { + "validate-only" => { + call = call.validate_only(arg_from_str(value.unwrap_or("false"), err, "validate-only", "boolean")); + }, + _ => { + let mut found = false; + for param in &self.gp { + if key == *param { + found = true; + call = call.param(self.gpm.iter().find(|t| t.0 == key).unwrap_or(&("", key)).1, value.unwrap_or("unset")); + break; + } + } + if !found { + err.issues.push(CLIError::UnknownParameter(key.to_string(), + {let mut v = Vec::new(); + v.extend(self.gp.iter().map(|v|*v)); + v.extend(["validate-only"].iter().map(|v|*v)); + v } )); + } + } + } + } + let protocol = CallType::Standard; + if dry_run { + Ok(()) + } else { + assert!(err.issues.len() == 0); + for scope in self.opt.values_of("url").map(|i|i.collect()).unwrap_or(Vec::new()).iter() { + call = call.add_scope(scope); + } + let mut ostream = match writer_from_opts(opt.value_of("out")) { + Ok(mut f) => f, + Err(io_err) => return Err(DoitError::IoError(opt.value_of("out").unwrap_or("-").to_string(), io_err)), + }; + match match protocol { + CallType::Standard => call.doit(), + _ => unreachable!() + } { + Err(api_err) => Err(DoitError::ApiError(api_err)), + Ok((mut response, output_schema)) => { + let mut value = json::value::to_value(&output_schema); + remove_json_null_values(&mut value); + json::to_writer_pretty(&mut ostream, &value).unwrap(); + ostream.flush().unwrap(); + Ok(()) + } + } + } + } + + fn _projects_metric_descriptors_create(&self, opt: &ArgMatches<'n>, dry_run: bool, err: &mut InvalidOptionsError) + -> Result<(), DoitError> { + + let mut field_cursor = FieldCursor::default(); + let mut object = json::value::Value::Object(Default::default()); + + for kvarg in opt.values_of("kv").map(|i|i.collect()).unwrap_or(Vec::new()).iter() { + let last_errc = err.issues.len(); + let (key, value) = parse_kv_arg(&*kvarg, err, false); + let mut temp_cursor = field_cursor.clone(); + if let Err(field_err) = temp_cursor.set(&*key) { + err.issues.push(field_err); + } + if value.is_none() { + field_cursor = temp_cursor.clone(); + if err.issues.len() > last_errc { + err.issues.remove(last_errc); + } + continue; + } + + let type_info: Option<(&'static str, JsonTypeInfo)> = + match &temp_cursor.to_string()[..] { + "display-name" => Some(("displayName", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "name" => Some(("name", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "metric-kind" => Some(("metricKind", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "value-type" => Some(("valueType", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "type" => Some(("type", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "unit" => Some(("unit", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "description" => Some(("description", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + _ => { + let suggestion = FieldCursor::did_you_mean(key, &vec!["description", "display-name", "metric-kind", "name", "type", "unit", "value-type"]); + err.issues.push(CLIError::Field(FieldError::Unknown(temp_cursor.to_string(), suggestion, value.map(|v| v.to_string())))); + None + } + }; + if let Some((field_cursor_str, type_info)) = type_info { + FieldCursor::from(field_cursor_str).set_json_value(&mut object, value.unwrap(), type_info, err, &temp_cursor); + } + } + let mut request: api::MetricDescriptor = json::value::from_value(object).unwrap(); + let mut call = self.hub.projects().metric_descriptors_create(request, opt.value_of("name").unwrap_or("")); + for parg in opt.values_of("v").map(|i|i.collect()).unwrap_or(Vec::new()).iter() { + let (key, value) = parse_kv_arg(&*parg, err, false); + match key { + _ => { + let mut found = false; + for param in &self.gp { + if key == *param { + found = true; + call = call.param(self.gpm.iter().find(|t| t.0 == key).unwrap_or(&("", key)).1, value.unwrap_or("unset")); + break; + } + } + if !found { + err.issues.push(CLIError::UnknownParameter(key.to_string(), + {let mut v = Vec::new(); + v.extend(self.gp.iter().map(|v|*v)); + v } )); + } + } + } + } + let protocol = CallType::Standard; + if dry_run { + Ok(()) + } else { + assert!(err.issues.len() == 0); + for scope in self.opt.values_of("url").map(|i|i.collect()).unwrap_or(Vec::new()).iter() { + call = call.add_scope(scope); + } + let mut ostream = match writer_from_opts(opt.value_of("out")) { + Ok(mut f) => f, + Err(io_err) => return Err(DoitError::IoError(opt.value_of("out").unwrap_or("-").to_string(), io_err)), + }; + match match protocol { + CallType::Standard => call.doit(), + _ => unreachable!() + } { + Err(api_err) => Err(DoitError::ApiError(api_err)), + Ok((mut response, output_schema)) => { + let mut value = json::value::to_value(&output_schema); + remove_json_null_values(&mut value); + json::to_writer_pretty(&mut ostream, &value).unwrap(); + ostream.flush().unwrap(); + Ok(()) + } + } + } + } + + fn _projects_metric_descriptors_delete(&self, opt: &ArgMatches<'n>, dry_run: bool, err: &mut InvalidOptionsError) + -> Result<(), DoitError> { + let mut call = self.hub.projects().metric_descriptors_delete(opt.value_of("name").unwrap_or("")); + for parg in opt.values_of("v").map(|i|i.collect()).unwrap_or(Vec::new()).iter() { + let (key, value) = parse_kv_arg(&*parg, err, false); + match key { + _ => { + let mut found = false; + for param in &self.gp { + if key == *param { + found = true; + call = call.param(self.gpm.iter().find(|t| t.0 == key).unwrap_or(&("", key)).1, value.unwrap_or("unset")); + break; + } + } + if !found { + err.issues.push(CLIError::UnknownParameter(key.to_string(), + {let mut v = Vec::new(); + v.extend(self.gp.iter().map(|v|*v)); + v } )); + } + } + } + } + let protocol = CallType::Standard; + if dry_run { + Ok(()) + } else { + assert!(err.issues.len() == 0); + for scope in self.opt.values_of("url").map(|i|i.collect()).unwrap_or(Vec::new()).iter() { + call = call.add_scope(scope); + } + let mut ostream = match writer_from_opts(opt.value_of("out")) { + Ok(mut f) => f, + Err(io_err) => return Err(DoitError::IoError(opt.value_of("out").unwrap_or("-").to_string(), io_err)), + }; + match match protocol { + CallType::Standard => call.doit(), + _ => unreachable!() + } { + Err(api_err) => Err(DoitError::ApiError(api_err)), + Ok((mut response, output_schema)) => { + let mut value = json::value::to_value(&output_schema); + remove_json_null_values(&mut value); + json::to_writer_pretty(&mut ostream, &value).unwrap(); + ostream.flush().unwrap(); + Ok(()) + } + } + } + } + + fn _projects_metric_descriptors_get(&self, opt: &ArgMatches<'n>, dry_run: bool, err: &mut InvalidOptionsError) + -> Result<(), DoitError> { + let mut call = self.hub.projects().metric_descriptors_get(opt.value_of("name").unwrap_or("")); + for parg in opt.values_of("v").map(|i|i.collect()).unwrap_or(Vec::new()).iter() { + let (key, value) = parse_kv_arg(&*parg, err, false); + match key { + _ => { + let mut found = false; + for param in &self.gp { + if key == *param { + found = true; + call = call.param(self.gpm.iter().find(|t| t.0 == key).unwrap_or(&("", key)).1, value.unwrap_or("unset")); + break; + } + } + if !found { + err.issues.push(CLIError::UnknownParameter(key.to_string(), + {let mut v = Vec::new(); + v.extend(self.gp.iter().map(|v|*v)); + v } )); + } + } + } + } + let protocol = CallType::Standard; + if dry_run { + Ok(()) + } else { + assert!(err.issues.len() == 0); + for scope in self.opt.values_of("url").map(|i|i.collect()).unwrap_or(Vec::new()).iter() { + call = call.add_scope(scope); + } + let mut ostream = match writer_from_opts(opt.value_of("out")) { + Ok(mut f) => f, + Err(io_err) => return Err(DoitError::IoError(opt.value_of("out").unwrap_or("-").to_string(), io_err)), + }; + match match protocol { + CallType::Standard => call.doit(), + _ => unreachable!() + } { + Err(api_err) => Err(DoitError::ApiError(api_err)), + Ok((mut response, output_schema)) => { + let mut value = json::value::to_value(&output_schema); + remove_json_null_values(&mut value); + json::to_writer_pretty(&mut ostream, &value).unwrap(); + ostream.flush().unwrap(); + Ok(()) + } + } + } + } + + fn _projects_metric_descriptors_list(&self, opt: &ArgMatches<'n>, dry_run: bool, err: &mut InvalidOptionsError) + -> Result<(), DoitError> { + let mut call = self.hub.projects().metric_descriptors_list(opt.value_of("name").unwrap_or("")); + for parg in opt.values_of("v").map(|i|i.collect()).unwrap_or(Vec::new()).iter() { + let (key, value) = parse_kv_arg(&*parg, err, false); + match key { + "page-token" => { + call = call.page_token(value.unwrap_or("")); + }, + "page-size" => { + call = call.page_size(arg_from_str(value.unwrap_or("-0"), err, "page-size", "integer")); + }, + "filter" => { + call = call.filter(value.unwrap_or("")); + }, + _ => { + let mut found = false; + for param in &self.gp { + if key == *param { + found = true; + call = call.param(self.gpm.iter().find(|t| t.0 == key).unwrap_or(&("", key)).1, value.unwrap_or("unset")); + break; + } + } + if !found { + err.issues.push(CLIError::UnknownParameter(key.to_string(), + {let mut v = Vec::new(); + v.extend(self.gp.iter().map(|v|*v)); + v.extend(["filter", "page-token", "page-size"].iter().map(|v|*v)); + v } )); + } + } + } + } + let protocol = CallType::Standard; + if dry_run { + Ok(()) + } else { + assert!(err.issues.len() == 0); + for scope in self.opt.values_of("url").map(|i|i.collect()).unwrap_or(Vec::new()).iter() { + call = call.add_scope(scope); + } + let mut ostream = match writer_from_opts(opt.value_of("out")) { + Ok(mut f) => f, + Err(io_err) => return Err(DoitError::IoError(opt.value_of("out").unwrap_or("-").to_string(), io_err)), + }; + match match protocol { + CallType::Standard => call.doit(), + _ => unreachable!() + } { + Err(api_err) => Err(DoitError::ApiError(api_err)), + Ok((mut response, output_schema)) => { + let mut value = json::value::to_value(&output_schema); + remove_json_null_values(&mut value); + json::to_writer_pretty(&mut ostream, &value).unwrap(); + ostream.flush().unwrap(); + Ok(()) + } + } + } + } + + fn _projects_monitored_resource_descriptors_get(&self, opt: &ArgMatches<'n>, dry_run: bool, err: &mut InvalidOptionsError) + -> Result<(), DoitError> { + let mut call = self.hub.projects().monitored_resource_descriptors_get(opt.value_of("name").unwrap_or("")); + for parg in opt.values_of("v").map(|i|i.collect()).unwrap_or(Vec::new()).iter() { + let (key, value) = parse_kv_arg(&*parg, err, false); + match key { + _ => { + let mut found = false; + for param in &self.gp { + if key == *param { + found = true; + call = call.param(self.gpm.iter().find(|t| t.0 == key).unwrap_or(&("", key)).1, value.unwrap_or("unset")); + break; + } + } + if !found { + err.issues.push(CLIError::UnknownParameter(key.to_string(), + {let mut v = Vec::new(); + v.extend(self.gp.iter().map(|v|*v)); + v } )); + } + } + } + } + let protocol = CallType::Standard; + if dry_run { + Ok(()) + } else { + assert!(err.issues.len() == 0); + for scope in self.opt.values_of("url").map(|i|i.collect()).unwrap_or(Vec::new()).iter() { + call = call.add_scope(scope); + } + let mut ostream = match writer_from_opts(opt.value_of("out")) { + Ok(mut f) => f, + Err(io_err) => return Err(DoitError::IoError(opt.value_of("out").unwrap_or("-").to_string(), io_err)), + }; + match match protocol { + CallType::Standard => call.doit(), + _ => unreachable!() + } { + Err(api_err) => Err(DoitError::ApiError(api_err)), + Ok((mut response, output_schema)) => { + let mut value = json::value::to_value(&output_schema); + remove_json_null_values(&mut value); + json::to_writer_pretty(&mut ostream, &value).unwrap(); + ostream.flush().unwrap(); + Ok(()) + } + } + } + } + + fn _projects_monitored_resource_descriptors_list(&self, opt: &ArgMatches<'n>, dry_run: bool, err: &mut InvalidOptionsError) + -> Result<(), DoitError> { + let mut call = self.hub.projects().monitored_resource_descriptors_list(opt.value_of("name").unwrap_or("")); + for parg in opt.values_of("v").map(|i|i.collect()).unwrap_or(Vec::new()).iter() { + let (key, value) = parse_kv_arg(&*parg, err, false); + match key { + "page-token" => { + call = call.page_token(value.unwrap_or("")); + }, + "page-size" => { + call = call.page_size(arg_from_str(value.unwrap_or("-0"), err, "page-size", "integer")); + }, + "filter" => { + call = call.filter(value.unwrap_or("")); + }, + _ => { + let mut found = false; + for param in &self.gp { + if key == *param { + found = true; + call = call.param(self.gpm.iter().find(|t| t.0 == key).unwrap_or(&("", key)).1, value.unwrap_or("unset")); + break; + } + } + if !found { + err.issues.push(CLIError::UnknownParameter(key.to_string(), + {let mut v = Vec::new(); + v.extend(self.gp.iter().map(|v|*v)); + v.extend(["filter", "page-token", "page-size"].iter().map(|v|*v)); + v } )); + } + } + } + } + let protocol = CallType::Standard; + if dry_run { + Ok(()) + } else { + assert!(err.issues.len() == 0); + for scope in self.opt.values_of("url").map(|i|i.collect()).unwrap_or(Vec::new()).iter() { + call = call.add_scope(scope); + } + let mut ostream = match writer_from_opts(opt.value_of("out")) { + Ok(mut f) => f, + Err(io_err) => return Err(DoitError::IoError(opt.value_of("out").unwrap_or("-").to_string(), io_err)), + }; + match match protocol { + CallType::Standard => call.doit(), + _ => unreachable!() + } { + Err(api_err) => Err(DoitError::ApiError(api_err)), + Ok((mut response, output_schema)) => { + let mut value = json::value::to_value(&output_schema); + remove_json_null_values(&mut value); + json::to_writer_pretty(&mut ostream, &value).unwrap(); + ostream.flush().unwrap(); + Ok(()) + } + } + } + } + + fn _projects_time_series_create(&self, opt: &ArgMatches<'n>, dry_run: bool, err: &mut InvalidOptionsError) + -> Result<(), DoitError> { + + let mut field_cursor = FieldCursor::default(); + let mut object = json::value::Value::Object(Default::default()); + + for kvarg in opt.values_of("kv").map(|i|i.collect()).unwrap_or(Vec::new()).iter() { + let last_errc = err.issues.len(); + let (key, value) = parse_kv_arg(&*kvarg, err, false); + let mut temp_cursor = field_cursor.clone(); + if let Err(field_err) = temp_cursor.set(&*key) { + err.issues.push(field_err); + } + if value.is_none() { + field_cursor = temp_cursor.clone(); + if err.issues.len() > last_errc { + err.issues.remove(last_errc); + } + continue; + } + + let type_info: Option<(&'static str, JsonTypeInfo)> = + match &temp_cursor.to_string()[..] { + _ => { + let suggestion = FieldCursor::did_you_mean(key, &vec![]); + err.issues.push(CLIError::Field(FieldError::Unknown(temp_cursor.to_string(), suggestion, value.map(|v| v.to_string())))); + None + } + }; + if let Some((field_cursor_str, type_info)) = type_info { + FieldCursor::from(field_cursor_str).set_json_value(&mut object, value.unwrap(), type_info, err, &temp_cursor); + } + } + let mut request: api::CreateTimeSeriesRequest = json::value::from_value(object).unwrap(); + let mut call = self.hub.projects().time_series_create(request, opt.value_of("name").unwrap_or("")); + for parg in opt.values_of("v").map(|i|i.collect()).unwrap_or(Vec::new()).iter() { + let (key, value) = parse_kv_arg(&*parg, err, false); + match key { + _ => { + let mut found = false; + for param in &self.gp { + if key == *param { + found = true; + call = call.param(self.gpm.iter().find(|t| t.0 == key).unwrap_or(&("", key)).1, value.unwrap_or("unset")); + break; + } + } + if !found { + err.issues.push(CLIError::UnknownParameter(key.to_string(), + {let mut v = Vec::new(); + v.extend(self.gp.iter().map(|v|*v)); + v } )); + } + } + } + } + let protocol = CallType::Standard; + if dry_run { + Ok(()) + } else { + assert!(err.issues.len() == 0); + for scope in self.opt.values_of("url").map(|i|i.collect()).unwrap_or(Vec::new()).iter() { + call = call.add_scope(scope); + } + let mut ostream = match writer_from_opts(opt.value_of("out")) { + Ok(mut f) => f, + Err(io_err) => return Err(DoitError::IoError(opt.value_of("out").unwrap_or("-").to_string(), io_err)), + }; + match match protocol { + CallType::Standard => call.doit(), + _ => unreachable!() + } { + Err(api_err) => Err(DoitError::ApiError(api_err)), + Ok((mut response, output_schema)) => { + let mut value = json::value::to_value(&output_schema); + remove_json_null_values(&mut value); + json::to_writer_pretty(&mut ostream, &value).unwrap(); + ostream.flush().unwrap(); + Ok(()) + } + } + } + } + + fn _projects_time_series_list(&self, opt: &ArgMatches<'n>, dry_run: bool, err: &mut InvalidOptionsError) + -> Result<(), DoitError> { + let mut call = self.hub.projects().time_series_list(opt.value_of("name").unwrap_or("")); + for parg in opt.values_of("v").map(|i|i.collect()).unwrap_or(Vec::new()).iter() { + let (key, value) = parse_kv_arg(&*parg, err, false); + match key { + "view" => { + call = call.view(value.unwrap_or("")); + }, + "page-token" => { + call = call.page_token(value.unwrap_or("")); + }, + "page-size" => { + call = call.page_size(arg_from_str(value.unwrap_or("-0"), err, "page-size", "integer")); + }, + "order-by" => { + call = call.order_by(value.unwrap_or("")); + }, + "interval-start-time" => { + call = call.interval_start_time(value.unwrap_or("")); + }, + "interval-end-time" => { + call = call.interval_end_time(value.unwrap_or("")); + }, + "filter" => { + call = call.filter(value.unwrap_or("")); + }, + "aggregation-per-series-aligner" => { + call = call.aggregation_per_series_aligner(value.unwrap_or("")); + }, + "aggregation-group-by-fields" => { + call = call.add_aggregation_group_by_fields(value.unwrap_or("")); + }, + "aggregation-cross-series-reducer" => { + call = call.aggregation_cross_series_reducer(value.unwrap_or("")); + }, + "aggregation-alignment-period" => { + call = call.aggregation_alignment_period(value.unwrap_or("")); + }, + _ => { + let mut found = false; + for param in &self.gp { + if key == *param { + found = true; + call = call.param(self.gpm.iter().find(|t| t.0 == key).unwrap_or(&("", key)).1, value.unwrap_or("unset")); + break; + } + } + if !found { + err.issues.push(CLIError::UnknownParameter(key.to_string(), + {let mut v = Vec::new(); + v.extend(self.gp.iter().map(|v|*v)); + v.extend(["order-by", "page-size", "interval-start-time", "aggregation-alignment-period", "aggregation-per-series-aligner", "filter", "page-token", "aggregation-cross-series-reducer", "interval-end-time", "aggregation-group-by-fields", "view"].iter().map(|v|*v)); + v } )); + } + } + } + } + let protocol = CallType::Standard; + if dry_run { + Ok(()) + } else { + assert!(err.issues.len() == 0); + for scope in self.opt.values_of("url").map(|i|i.collect()).unwrap_or(Vec::new()).iter() { + call = call.add_scope(scope); + } + let mut ostream = match writer_from_opts(opt.value_of("out")) { + Ok(mut f) => f, + Err(io_err) => return Err(DoitError::IoError(opt.value_of("out").unwrap_or("-").to_string(), io_err)), + }; + match match protocol { + CallType::Standard => call.doit(), + _ => unreachable!() + } { + Err(api_err) => Err(DoitError::ApiError(api_err)), + Ok((mut response, output_schema)) => { + let mut value = json::value::to_value(&output_schema); + remove_json_null_values(&mut value); + json::to_writer_pretty(&mut ostream, &value).unwrap(); + ostream.flush().unwrap(); + Ok(()) + } + } + } + } + + fn _doit(&self, dry_run: bool) -> Result, Option> { + let mut err = InvalidOptionsError::new(); + let mut call_result: Result<(), DoitError> = Ok(()); + let mut err_opt: Option = None; + match self.opt.subcommand() { + ("projects", Some(opt)) => { + match opt.subcommand() { + ("collectd-time-series-create", Some(opt)) => { + call_result = self._projects_collectd_time_series_create(opt, dry_run, &mut err); + }, + ("groups-create", Some(opt)) => { + call_result = self._projects_groups_create(opt, dry_run, &mut err); + }, + ("groups-delete", Some(opt)) => { + call_result = self._projects_groups_delete(opt, dry_run, &mut err); + }, + ("groups-get", Some(opt)) => { + call_result = self._projects_groups_get(opt, dry_run, &mut err); + }, + ("groups-list", Some(opt)) => { + call_result = self._projects_groups_list(opt, dry_run, &mut err); + }, + ("groups-members-list", Some(opt)) => { + call_result = self._projects_groups_members_list(opt, dry_run, &mut err); + }, + ("groups-update", Some(opt)) => { + call_result = self._projects_groups_update(opt, dry_run, &mut err); + }, + ("metric-descriptors-create", Some(opt)) => { + call_result = self._projects_metric_descriptors_create(opt, dry_run, &mut err); + }, + ("metric-descriptors-delete", Some(opt)) => { + call_result = self._projects_metric_descriptors_delete(opt, dry_run, &mut err); + }, + ("metric-descriptors-get", Some(opt)) => { + call_result = self._projects_metric_descriptors_get(opt, dry_run, &mut err); + }, + ("metric-descriptors-list", Some(opt)) => { + call_result = self._projects_metric_descriptors_list(opt, dry_run, &mut err); + }, + ("monitored-resource-descriptors-get", Some(opt)) => { + call_result = self._projects_monitored_resource_descriptors_get(opt, dry_run, &mut err); + }, + ("monitored-resource-descriptors-list", Some(opt)) => { + call_result = self._projects_monitored_resource_descriptors_list(opt, dry_run, &mut err); + }, + ("time-series-create", Some(opt)) => { + call_result = self._projects_time_series_create(opt, dry_run, &mut err); + }, + ("time-series-list", Some(opt)) => { + call_result = self._projects_time_series_list(opt, dry_run, &mut err); + }, + _ => { + err.issues.push(CLIError::MissingMethodError("projects".to_string())); + writeln!(io::stderr(), "{}\n", opt.usage()).ok(); + } + } + }, + _ => { + err.issues.push(CLIError::MissingCommandError); + writeln!(io::stderr(), "{}\n", self.opt.usage()).ok(); + } + } + + if dry_run { + if err.issues.len() > 0 { + err_opt = Some(err); + } + Err(err_opt) + } else { + Ok(call_result) + } + } + + // Please note that this call will fail if any part of the opt can't be handled + fn new(opt: ArgMatches<'n>) -> Result, InvalidOptionsError> { + let (config_dir, secret) = { + let config_dir = match cmn::assure_config_dir_exists(opt.value_of("folder").unwrap_or("~/.google-service-cli")) { + Err(e) => return Err(InvalidOptionsError::single(e, 3)), + Ok(p) => p, + }; + + match cmn::application_secret_from_directory(&config_dir, "monitoring3-secret.json", + "{\"installed\":{\"auth_uri\":\"https://accounts.google.com/o/oauth2/auth\",\"client_secret\":\"hCsslbCUyfehWMmbkG8vTYxG\",\"token_uri\":\"https://accounts.google.com/o/oauth2/token\",\"client_email\":\"\",\"redirect_uris\":[\"urn:ietf:wg:oauth:2.0:oob\",\"oob\"],\"client_x509_cert_url\":\"\",\"client_id\":\"620010449518-9ngf7o4dhs0dka470npqvor6dc5lqb9b.apps.googleusercontent.com\",\"auth_provider_x509_cert_url\":\"https://www.googleapis.com/oauth2/v1/certs\"}}") { + Ok(secret) => (config_dir, secret), + Err(e) => return Err(InvalidOptionsError::single(e, 4)) + } + }; + + let auth = Authenticator::new( &secret, DefaultAuthenticatorDelegate, + if opt.is_present("debug-auth") { + hyper::Client::with_connector(mock::TeeConnector { + connector: hyper::net::HttpsConnector::::default() + }) + } else { + hyper::Client::new() + }, + JsonTokenStorage { + program_name: "monitoring3", + db_dir: config_dir.clone(), + }, None); + + let client = + if opt.is_present("debug") { + hyper::Client::with_connector(mock::TeeConnector { + connector: hyper::net::HttpsConnector::::default() + }) + } else { + hyper::Client::new() + }; + let engine = Engine { + opt: opt, + hub: api::Monitoring::new(client, auth), + gp: vec!["$-xgafv", "access-token", "alt", "bearer-token", "callback", "fields", "key", "oauth-token", "pp", "pretty-print", "quota-user", "upload-type", "upload-protocol"], + gpm: vec![ + ("$-xgafv", "$.xgafv"), + ("access-token", "access_token"), + ("bearer-token", "bearer_token"), + ("oauth-token", "oauth_token"), + ("pretty-print", "prettyPrint"), + ("quota-user", "quotaUser"), + ("upload-type", "uploadType"), + ("upload-protocol", "upload_protocol"), + ] + }; + + match engine._doit(true) { + Err(Some(err)) => Err(err), + Err(None) => Ok(engine), + Ok(_) => unreachable!(), + } + } + + fn doit(&self) -> Result<(), DoitError> { + match self._doit(false) { + Ok(res) => res, + Err(_) => unreachable!(), + } + } +} + +fn main() { + let mut exit_status = 0i32; + let arg_data = [ + ("projects", "methods: 'collectd-time-series-create', 'groups-create', 'groups-delete', 'groups-get', 'groups-list', 'groups-members-list', 'groups-update', 'metric-descriptors-create', 'metric-descriptors-delete', 'metric-descriptors-get', 'metric-descriptors-list', 'monitored-resource-descriptors-get', 'monitored-resource-descriptors-list', 'time-series-create' and 'time-series-list'", vec![ + ("collectd-time-series-create", + Some(r##"Creates a new time series with the given data points. This method is only for use in `collectd`-related code, including the Google Monitoring Agent. See [google.monitoring.v3.MetricService.CreateTimeSeries] instead."##), + "Details at http://byron.github.io/google-apis-rs/google_monitoring3_cli/projects_collectd-time-series-create", + vec![ + (Some(r##"name"##), + None, + Some(r##"The project in which to create the time series. The format is `"projects/PROJECT_ID_OR_NUMBER"`."##), + Some(true), + Some(false)), + + (Some(r##"kv"##), + Some(r##"r"##), + Some(r##"Set various fields of the request structure, matching the key=value form"##), + Some(true), + Some(true)), + + (Some(r##"v"##), + Some(r##"p"##), + Some(r##"Set various optional parameters, matching the key=value form"##), + Some(false), + Some(true)), + + (Some(r##"out"##), + Some(r##"o"##), + Some(r##"Specify the file into which to write the program's output"##), + Some(false), + Some(false)), + ]), + ("groups-create", + Some(r##"Creates a new group."##), + "Details at http://byron.github.io/google-apis-rs/google_monitoring3_cli/projects_groups-create", + vec![ + (Some(r##"name"##), + None, + Some(r##"The project in which to create the group. The format is `"projects/{project_id_or_number}"`."##), + Some(true), + Some(false)), + + (Some(r##"kv"##), + Some(r##"r"##), + Some(r##"Set various fields of the request structure, matching the key=value form"##), + Some(true), + Some(true)), + + (Some(r##"v"##), + Some(r##"p"##), + Some(r##"Set various optional parameters, matching the key=value form"##), + Some(false), + Some(true)), + + (Some(r##"out"##), + Some(r##"o"##), + Some(r##"Specify the file into which to write the program's output"##), + Some(false), + Some(false)), + ]), + ("groups-delete", + Some(r##"Deletes an existing group."##), + "Details at http://byron.github.io/google-apis-rs/google_monitoring3_cli/projects_groups-delete", + vec![ + (Some(r##"name"##), + None, + Some(r##"The group to delete. The format is `"projects/{project_id_or_number}/groups/{group_id}"`."##), + Some(true), + Some(false)), + + (Some(r##"v"##), + Some(r##"p"##), + Some(r##"Set various optional parameters, matching the key=value form"##), + Some(false), + Some(true)), + + (Some(r##"out"##), + Some(r##"o"##), + Some(r##"Specify the file into which to write the program's output"##), + Some(false), + Some(false)), + ]), + ("groups-get", + Some(r##"Gets a single group."##), + "Details at http://byron.github.io/google-apis-rs/google_monitoring3_cli/projects_groups-get", + vec![ + (Some(r##"name"##), + None, + Some(r##"The group to retrieve. The format is `"projects/{project_id_or_number}/groups/{group_id}"`."##), + Some(true), + Some(false)), + + (Some(r##"v"##), + Some(r##"p"##), + Some(r##"Set various optional parameters, matching the key=value form"##), + Some(false), + Some(true)), + + (Some(r##"out"##), + Some(r##"o"##), + Some(r##"Specify the file into which to write the program's output"##), + Some(false), + Some(false)), + ]), + ("groups-list", + Some(r##"Lists the existing groups."##), + "Details at http://byron.github.io/google-apis-rs/google_monitoring3_cli/projects_groups-list", + vec![ + (Some(r##"name"##), + None, + Some(r##"The project whose groups are to be listed. The format is `"projects/{project_id_or_number}"`."##), + Some(true), + Some(false)), + + (Some(r##"v"##), + Some(r##"p"##), + Some(r##"Set various optional parameters, matching the key=value form"##), + Some(false), + Some(true)), + + (Some(r##"out"##), + Some(r##"o"##), + Some(r##"Specify the file into which to write the program's output"##), + Some(false), + Some(false)), + ]), + ("groups-members-list", + Some(r##"Lists the monitored resources that are members of a group."##), + "Details at http://byron.github.io/google-apis-rs/google_monitoring3_cli/projects_groups-members-list", + vec![ + (Some(r##"name"##), + None, + Some(r##"The group whose members are listed. The format is `"projects/{project_id_or_number}/groups/{group_id}"`."##), + Some(true), + Some(false)), + + (Some(r##"v"##), + Some(r##"p"##), + Some(r##"Set various optional parameters, matching the key=value form"##), + Some(false), + Some(true)), + + (Some(r##"out"##), + Some(r##"o"##), + Some(r##"Specify the file into which to write the program's output"##), + Some(false), + Some(false)), + ]), + ("groups-update", + Some(r##"Updates an existing group. You can change any group attributes except `name`."##), + "Details at http://byron.github.io/google-apis-rs/google_monitoring3_cli/projects_groups-update", + vec![ + (Some(r##"name"##), + None, + Some(r##"The name of this group. The format is `"projects/{project_id_or_number}/groups/{group_id}"`. When creating a group, this field is ignored and a new name is created consisting of the project specified in the call to `CreateGroup` and a unique `{group_id}` that is generated automatically. @OutputOnly"##), + Some(true), + Some(false)), + + (Some(r##"kv"##), + Some(r##"r"##), + Some(r##"Set various fields of the request structure, matching the key=value form"##), + Some(true), + Some(true)), + + (Some(r##"v"##), + Some(r##"p"##), + Some(r##"Set various optional parameters, matching the key=value form"##), + Some(false), + Some(true)), + + (Some(r##"out"##), + Some(r##"o"##), + Some(r##"Specify the file into which to write the program's output"##), + Some(false), + Some(false)), + ]), + ("metric-descriptors-create", + Some(r##"Creates a new metric descriptor. User-created metric descriptors define [custom metrics](/monitoring/custom-metrics)."##), + "Details at http://byron.github.io/google-apis-rs/google_monitoring3_cli/projects_metric-descriptors-create", + vec![ + (Some(r##"name"##), + None, + Some(r##"The project on which to execute the request. The format is `"projects/{project_id_or_number}"`."##), + Some(true), + Some(false)), + + (Some(r##"kv"##), + Some(r##"r"##), + Some(r##"Set various fields of the request structure, matching the key=value form"##), + Some(true), + Some(true)), + + (Some(r##"v"##), + Some(r##"p"##), + Some(r##"Set various optional parameters, matching the key=value form"##), + Some(false), + Some(true)), + + (Some(r##"out"##), + Some(r##"o"##), + Some(r##"Specify the file into which to write the program's output"##), + Some(false), + Some(false)), + ]), + ("metric-descriptors-delete", + Some(r##"Deletes a metric descriptor. Only user-created [custom metrics](/monitoring/custom-metrics) can be deleted."##), + "Details at http://byron.github.io/google-apis-rs/google_monitoring3_cli/projects_metric-descriptors-delete", + vec![ + (Some(r##"name"##), + None, + Some(r##"The metric descriptor on which to execute the request. The format is `"projects/{project_id_or_number}/metricDescriptors/{metric_id}"`. An example of `{metric_id}` is: `"custom.googleapis.com/my_test_metric"`."##), + Some(true), + Some(false)), + + (Some(r##"v"##), + Some(r##"p"##), + Some(r##"Set various optional parameters, matching the key=value form"##), + Some(false), + Some(true)), + + (Some(r##"out"##), + Some(r##"o"##), + Some(r##"Specify the file into which to write the program's output"##), + Some(false), + Some(false)), + ]), + ("metric-descriptors-get", + Some(r##"Gets a single metric descriptor."##), + "Details at http://byron.github.io/google-apis-rs/google_monitoring3_cli/projects_metric-descriptors-get", + vec![ + (Some(r##"name"##), + None, + Some(r##"The metric descriptor on which to execute the request. The format is `"projects/{project_id_or_number}/metricDescriptors/{metric_id}"`. An example value of `{metric_id}` is `"compute.googleapis.com/instance/disk/read_bytes_count"`."##), + Some(true), + Some(false)), + + (Some(r##"v"##), + Some(r##"p"##), + Some(r##"Set various optional parameters, matching the key=value form"##), + Some(false), + Some(true)), + + (Some(r##"out"##), + Some(r##"o"##), + Some(r##"Specify the file into which to write the program's output"##), + Some(false), + Some(false)), + ]), + ("metric-descriptors-list", + Some(r##"Lists metric descriptors that match a filter."##), + "Details at http://byron.github.io/google-apis-rs/google_monitoring3_cli/projects_metric-descriptors-list", + vec![ + (Some(r##"name"##), + None, + Some(r##"The project on which to execute the request. The format is `"projects/{project_id_or_number}"`."##), + Some(true), + Some(false)), + + (Some(r##"v"##), + Some(r##"p"##), + Some(r##"Set various optional parameters, matching the key=value form"##), + Some(false), + Some(true)), + + (Some(r##"out"##), + Some(r##"o"##), + Some(r##"Specify the file into which to write the program's output"##), + Some(false), + Some(false)), + ]), + ("monitored-resource-descriptors-get", + Some(r##"Gets a single monitored resource descriptor."##), + "Details at http://byron.github.io/google-apis-rs/google_monitoring3_cli/projects_monitored-resource-descriptors-get", + vec![ + (Some(r##"name"##), + None, + Some(r##"The monitored resource descriptor to get. The format is `"projects/{project_id_or_number}/monitoredResourceDescriptors/{resource_type}"`. The `{resource_type}` is a predefined type, such as `cloudsql_database`."##), + Some(true), + Some(false)), + + (Some(r##"v"##), + Some(r##"p"##), + Some(r##"Set various optional parameters, matching the key=value form"##), + Some(false), + Some(true)), + + (Some(r##"out"##), + Some(r##"o"##), + Some(r##"Specify the file into which to write the program's output"##), + Some(false), + Some(false)), + ]), + ("monitored-resource-descriptors-list", + Some(r##"Lists monitored resource descriptors that match a filter."##), + "Details at http://byron.github.io/google-apis-rs/google_monitoring3_cli/projects_monitored-resource-descriptors-list", + vec![ + (Some(r##"name"##), + None, + Some(r##"The project on which to execute the request. The format is `"projects/{project_id_or_number}"`."##), + Some(true), + Some(false)), + + (Some(r##"v"##), + Some(r##"p"##), + Some(r##"Set various optional parameters, matching the key=value form"##), + Some(false), + Some(true)), + + (Some(r##"out"##), + Some(r##"o"##), + Some(r##"Specify the file into which to write the program's output"##), + Some(false), + Some(false)), + ]), + ("time-series-create", + Some(r##"Creates or adds data to one or more time series. The response is empty if all time series in the request were written. If any time series could not be written, a corresponding failure message is included in the error response."##), + "Details at http://byron.github.io/google-apis-rs/google_monitoring3_cli/projects_time-series-create", + vec![ + (Some(r##"name"##), + None, + Some(r##"The project on which to execute the request. The format is `"projects/{project_id_or_number}"`."##), + Some(true), + Some(false)), + + (Some(r##"kv"##), + Some(r##"r"##), + Some(r##"Set various fields of the request structure, matching the key=value form"##), + Some(true), + Some(true)), + + (Some(r##"v"##), + Some(r##"p"##), + Some(r##"Set various optional parameters, matching the key=value form"##), + Some(false), + Some(true)), + + (Some(r##"out"##), + Some(r##"o"##), + Some(r##"Specify the file into which to write the program's output"##), + Some(false), + Some(false)), + ]), + ("time-series-list", + Some(r##"Lists time series that match a filter."##), + "Details at http://byron.github.io/google-apis-rs/google_monitoring3_cli/projects_time-series-list", + vec![ + (Some(r##"name"##), + None, + Some(r##"The project on which to execute the request. The format is "projects/{project_id_or_number}"."##), + Some(true), + Some(false)), + + (Some(r##"v"##), + Some(r##"p"##), + Some(r##"Set various optional parameters, matching the key=value form"##), + Some(false), + Some(true)), + + (Some(r##"out"##), + Some(r##"o"##), + Some(r##"Specify the file into which to write the program's output"##), + Some(false), + Some(false)), + ]), + ]), + + ]; + + let mut app = App::new("monitoring3") + .author("Sebastian Thiel ") + .version("0.3.4+20160321") + .about("The Google Monitoring API lets you manage your monitoring data and configurations.") + .after_help("All documentation details can be found at http://byron.github.io/google-apis-rs/google_monitoring3_cli") + .arg(Arg::with_name("url") + .long("scope") + .help("Specify the authentication a method should be executed in. Each scope requires the user to grant this application permission to use it.If unset, it defaults to the shortest scope url for a particular method.") + .multiple(true) + .takes_value(true)) + .arg(Arg::with_name("folder") + .long("config-dir") + .help("A directory into which we will store our persistent data. Defaults to a user-writable directory that we will create during the first invocation.[default: ~/.google-service-cli") + .multiple(false) + .takes_value(true)) + .arg(Arg::with_name("debug") + .long("debug") + .help("Output all server communication to standard error. `tx` and `rx` are placed into the same stream.") + .multiple(false) + .takes_value(false)) + .arg(Arg::with_name("debug-auth") + .long("debug-auth") + .help("Output all communication related to authentication to standard error. `tx` and `rx` are placed into the same stream.") + .multiple(false) + .takes_value(false)); + + for &(main_command_name, about, ref subcommands) in arg_data.iter() { + let mut mcmd = SubCommand::with_name(main_command_name).about(about); + + for &(sub_command_name, ref desc, url_info, ref args) in subcommands { + let mut scmd = SubCommand::with_name(sub_command_name); + if let &Some(desc) = desc { + scmd = scmd.about(desc); + } + scmd = scmd.after_help(url_info); + + for &(ref arg_name, ref flag, ref desc, ref required, ref multi) in args { + let arg_name_str = + match (arg_name, flag) { + (&Some(an), _ ) => an, + (_ , &Some(f)) => f, + _ => unreachable!(), + }; + let mut arg = Arg::with_name(arg_name_str) + .empty_values(false); + if let &Some(short_flag) = flag { + arg = arg.short(short_flag); + } + if let &Some(desc) = desc { + arg = arg.help(desc); + } + if arg_name.is_some() && flag.is_some() { + arg = arg.takes_value(true); + } + if let &Some(required) = required { + arg = arg.required(required); + } + if let &Some(multi) = multi { + arg = arg.multiple(multi); + } + scmd = scmd.arg(arg); + } + mcmd = mcmd.subcommand(scmd); + } + app = app.subcommand(mcmd); + } + + let matches = app.get_matches(); + + let debug = matches.is_present("debug"); + match Engine::new(matches) { + Err(err) => { + exit_status = err.exit_code; + writeln!(io::stderr(), "{}", err).ok(); + }, + Ok(engine) => { + if let Err(doit_err) = engine.doit() { + exit_status = 1; + match doit_err { + DoitError::IoError(path, err) => { + writeln!(io::stderr(), "Failed to open output file '{}': {}", path, err).ok(); + }, + DoitError::ApiError(err) => { + if debug { + writeln!(io::stderr(), "{:#?}", err).ok(); + } else { + writeln!(io::stderr(), "{}", err).ok(); + } + } + } + } + } + } + + std::process::exit(exit_status); +} \ No newline at end of file diff --git a/gen/monitoring3/Cargo.toml b/gen/monitoring3/Cargo.toml new file mode 100644 index 0000000000..516489372b --- /dev/null +++ b/gen/monitoring3/Cargo.toml @@ -0,0 +1,29 @@ +# DO NOT EDIT ! +# This file was generated automatically from 'src/mako/Cargo.toml.mako' +# DO NOT EDIT ! +[package] + +name = "google-monitoring3" +version = "0.1.13+20160321" +authors = ["Sebastian Thiel "] +description = "A complete library to interact with monitoring (protocol v3)" +repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/monitoring3" +homepage = "https://cloud.google.com/monitoring/api/" +documentation = "http://byron.github.io/google-apis-rs/google_monitoring3" +license = "MIT" +keywords = ["monitoring", "google", "protocol", "web", "api"] +build = "src/build.rs" + + +[dependencies] +hyper = "0.8" +mime = "0.2.0" +serde = "0.6.0" +serde_json = "0.6.0" +yup-oauth2 = ">= 0.5.6" +url = ">= 0.5" + +[build-dependencies] +syntex = { version = "= 0.28" } +serde_codegen = { version = "= 0.6.13" } + diff --git a/gen/monitoring3/LICENSE.md b/gen/monitoring3/LICENSE.md new file mode 100644 index 0000000000..ff523b4547 --- /dev/null +++ b/gen/monitoring3/LICENSE.md @@ -0,0 +1,30 @@ + +The MIT License (MIT) +===================== + +Copyright © `2015-2016` `Sebastian Thiel` + +Permission is hereby granted, free of charge, to any person +obtaining a copy of this software and associated documentation +files (the “Software”), to deal in the Software without +restriction, including without limitation the rights to use, +copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following +conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. diff --git a/gen/monitoring3/README.md b/gen/monitoring3/README.md new file mode 100644 index 0000000000..9cd1f22494 --- /dev/null +++ b/gen/monitoring3/README.md @@ -0,0 +1,182 @@ + +The `google-monitoring3` library allows access to all features of the *Google monitoring* service. + +This documentation was generated from *monitoring* crate version *0.1.13+20160321*, where *20160321* is the exact revision of the *monitoring:v3* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.13*. + +Everything else about the *monitoring* *v3* API can be found at the +[official documentation site](https://cloud.google.com/monitoring/api/). +# Features + +Handle the following *Resources* with ease from the central [hub](http://byron.github.io/google-apis-rs/google_monitoring3/struct.Monitoring.html) ... + +* projects + * [*collectd time series create*](http://byron.github.io/google-apis-rs/google_monitoring3/struct.ProjectCollectdTimeSeryCreateCall.html), [*groups create*](http://byron.github.io/google-apis-rs/google_monitoring3/struct.ProjectGroupCreateCall.html), [*groups delete*](http://byron.github.io/google-apis-rs/google_monitoring3/struct.ProjectGroupDeleteCall.html), [*groups get*](http://byron.github.io/google-apis-rs/google_monitoring3/struct.ProjectGroupGetCall.html), [*groups list*](http://byron.github.io/google-apis-rs/google_monitoring3/struct.ProjectGroupListCall.html), [*groups members list*](http://byron.github.io/google-apis-rs/google_monitoring3/struct.ProjectGroupMemberListCall.html), [*groups update*](http://byron.github.io/google-apis-rs/google_monitoring3/struct.ProjectGroupUpdateCall.html), [*metric descriptors create*](http://byron.github.io/google-apis-rs/google_monitoring3/struct.ProjectMetricDescriptorCreateCall.html), [*metric descriptors delete*](http://byron.github.io/google-apis-rs/google_monitoring3/struct.ProjectMetricDescriptorDeleteCall.html), [*metric descriptors get*](http://byron.github.io/google-apis-rs/google_monitoring3/struct.ProjectMetricDescriptorGetCall.html), [*metric descriptors list*](http://byron.github.io/google-apis-rs/google_monitoring3/struct.ProjectMetricDescriptorListCall.html), [*monitored resource descriptors get*](http://byron.github.io/google-apis-rs/google_monitoring3/struct.ProjectMonitoredResourceDescriptorGetCall.html), [*monitored resource descriptors list*](http://byron.github.io/google-apis-rs/google_monitoring3/struct.ProjectMonitoredResourceDescriptorListCall.html), [*time series create*](http://byron.github.io/google-apis-rs/google_monitoring3/struct.ProjectTimeSeryCreateCall.html) and [*time series list*](http://byron.github.io/google-apis-rs/google_monitoring3/struct.ProjectTimeSeryListCall.html) + + + + +# Structure of this Library + +The API is structured into the following primary items: + +* **[Hub](http://byron.github.io/google-apis-rs/google_monitoring3/struct.Monitoring.html)** + * a central object to maintain state and allow accessing all *Activities* + * creates [*Method Builders*](http://byron.github.io/google-apis-rs/google_monitoring3/trait.MethodsBuilder.html) which in turn + allow access to individual [*Call Builders*](http://byron.github.io/google-apis-rs/google_monitoring3/trait.CallBuilder.html) +* **[Resources](http://byron.github.io/google-apis-rs/google_monitoring3/trait.Resource.html)** + * primary types that you can apply *Activities* to + * a collection of properties and *Parts* + * **[Parts](http://byron.github.io/google-apis-rs/google_monitoring3/trait.Part.html)** + * a collection of properties + * never directly used in *Activities* +* **[Activities](http://byron.github.io/google-apis-rs/google_monitoring3/trait.CallBuilder.html)** + * operations to apply to *Resources* + +All *structures* are marked with applicable traits to further categorize them and ease browsing. + +Generally speaking, you can invoke *Activities* like this: + +```Rust,ignore +let r = hub.resource().activity(...).doit() +``` + +Or specifically ... + +```ignore +let r = hub.projects().metric_descriptors_delete(...).doit() +let r = hub.projects().time_series_create(...).doit() +let r = hub.projects().collectd_time_series_create(...).doit() +let r = hub.projects().groups_delete(...).doit() +``` + +The `resource()` and `activity(...)` calls create [builders][builder-pattern]. The second one dealing with `Activities` +supports various methods to configure the impending operation (not shown here). It is made such that all required arguments have to be +specified right away (i.e. `(...)`), whereas all optional ones can be [build up][builder-pattern] as desired. +The `doit()` method performs the actual communication with the server and returns the respective result. + +# Usage + +## Setting up your Project + +To use this library, you would put the following lines into your `Cargo.toml` file: + +```toml +[dependencies] +google-monitoring3 = "*" +``` + +## A complete example + +```Rust +extern crate hyper; +extern crate yup_oauth2 as oauth2; +extern crate google_monitoring3 as monitoring3; +use monitoring3::CreateTimeSeriesRequest; +use monitoring3::{Result, Error}; +use std::default::Default; +use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; +use monitoring3::Monitoring; + +// Get an ApplicationSecret instance by some means. It contains the `client_id` and +// `client_secret`, among other things. +let secret: ApplicationSecret = Default::default(); +// Instantiate the authenticator. It will choose a suitable authentication flow for you, +// unless you replace `None` with the desired Flow. +// Provide your own `AuthenticatorDelegate` to adjust the way it operates and get feedback about +// what's going on. You probably want to bring in your own `TokenStorage` to persist tokens and +// retrieve them from storage. +let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, + hyper::Client::new(), + ::default(), None); +let mut hub = Monitoring::new(hyper::Client::new(), auth); +// As the method needs a request, you would usually fill it with the desired information +// into the respective structure. Some of the parts shown here might not be applicable ! +// Values shown here are possibly random and not representative ! +let mut req = CreateTimeSeriesRequest::default(); + +// You can configure optional parameters by calling the respective setters at will, and +// execute the final call using `doit()`. +// Values shown here are possibly random and not representative ! +let result = hub.projects().time_series_create(req, "name") + .doit(); + +match result { + Err(e) => match e { + // The Error enum provides details about what exactly happened. + // You can also just use its `Debug`, `Display` or `Error` traits + Error::HttpError(_) + |Error::MissingAPIKey + |Error::MissingToken(_) + |Error::Cancelled + |Error::UploadSizeLimitExceeded(_, _) + |Error::Failure(_) + |Error::BadRequest(_) + |Error::FieldClash(_) + |Error::JsonDecodeError(_, _) => println!("{}", e), + }, + Ok(res) => println!("Success: {:?}", res), +} + +``` +## Handling Errors + +All errors produced by the system are provided either as [Result](http://byron.github.io/google-apis-rs/google_monitoring3/enum.Result.html) enumeration as return value of +the doit() methods, or handed as possibly intermediate results to either the +[Hub Delegate](http://byron.github.io/google-apis-rs/google_monitoring3/trait.Delegate.html), or the [Authenticator Delegate](http://byron.github.io/google-apis-rs/google_monitoring3/../yup-oauth2/trait.AuthenticatorDelegate.html). + +When delegates handle errors or intermediate values, they may have a chance to instruct the system to retry. This +makes the system potentially resilient to all kinds of errors. + +## Uploads and Downloads +If a method supports downloads, the response body, which is part of the [Result](http://byron.github.io/google-apis-rs/google_monitoring3/enum.Result.html), should be +read by you to obtain the media. +If such a method also supports a [Response Result](http://byron.github.io/google-apis-rs/google_monitoring3/trait.ResponseResult.html), it will return that by default. +You can see it as meta-data for the actual media. To trigger a media download, you will have to set up the builder by making +this call: `.param("alt", "media")`. + +Methods supporting uploads can do so using up to 2 different protocols: +*simple* and *resumable*. The distinctiveness of each is represented by customized +`doit(...)` methods, which are then named `upload(...)` and `upload_resumable(...)` respectively. + +## Customization and Callbacks + +You may alter the way an `doit()` method is called by providing a [delegate](http://byron.github.io/google-apis-rs/google_monitoring3/trait.Delegate.html) to the +[Method Builder](http://byron.github.io/google-apis-rs/google_monitoring3/trait.CallBuilder.html) before making the final `doit()` call. +Respective methods will be called to provide progress information, as well as determine whether the system should +retry on failure. + +The [delegate trait](http://byron.github.io/google-apis-rs/google_monitoring3/trait.Delegate.html) is default-implemented, allowing you to customize it with minimal effort. + +## Optional Parts in Server-Requests + +All structures provided by this library are made to be [enocodable](http://byron.github.io/google-apis-rs/google_monitoring3/trait.RequestValue.html) and +[decodable](http://byron.github.io/google-apis-rs/google_monitoring3/trait.ResponseResult.html) via *json*. Optionals are used to indicate that partial requests are responses +are valid. +Most optionals are are considered [Parts](http://byron.github.io/google-apis-rs/google_monitoring3/trait.Part.html) which are identifiable by name, which will be sent to +the server to indicate either the set parts of the request or the desired parts in the response. + +## Builder Arguments + +Using [method builders](http://byron.github.io/google-apis-rs/google_monitoring3/trait.CallBuilder.html), you are able to prepare an action call by repeatedly calling it's methods. +These will always take a single argument, for which the following statements are true. + +* [PODs][wiki-pod] are handed by copy +* strings are passed as `&str` +* [request values](http://byron.github.io/google-apis-rs/google_monitoring3/trait.RequestValue.html) are moved + +Arguments will always be copied or cloned into the builder, to make them independent of their original life times. + +[wiki-pod]: http://en.wikipedia.org/wiki/Plain_old_data_structure +[builder-pattern]: http://en.wikipedia.org/wiki/Builder_pattern +[google-go-api]: https://github.com/google/google-api-go-client + +# License +The **monitoring3** library was generated by Sebastian Thiel, and is placed +under the *MIT* license. +You can read the full text at the repository's [license file][repo-license]. + +[repo-license]: https://github.com/Byron/google-apis-rs/LICENSE.md diff --git a/gen/monitoring3/src/build.rs b/gen/monitoring3/src/build.rs new file mode 100644 index 0000000000..e9d4422e12 --- /dev/null +++ b/gen/monitoring3/src/build.rs @@ -0,0 +1,16 @@ +extern crate syntex; +extern crate serde_codegen; + +use std::env; +use std::path::Path; + +pub fn main() { + let out_dir = env::var_os("OUT_DIR").unwrap(); + + let src = Path::new("src/lib.rs.in"); + let dst = Path::new(&out_dir).join("lib.rs"); + + let mut registry = syntex::Registry::new(); + serde_codegen::register(&mut registry); + registry.expand("google-monitoring3", &src, &dst).unwrap(); +} diff --git a/gen/monitoring3/src/cmn.rs b/gen/monitoring3/src/cmn.rs new file mode 100644 index 0000000000..c69621da55 --- /dev/null +++ b/gen/monitoring3/src/cmn.rs @@ -0,0 +1,771 @@ +// COPY OF 'src/rust/api/cmn.rs' +// DO NOT EDIT +use std::io::{self, Read, Seek, Cursor, Write, SeekFrom}; +use std; +use std::fmt::{self, Display}; +use std::str::FromStr; +use std::error; +use std::thread::sleep; +use std::time::Duration; + +use mime::{Mime, TopLevel, SubLevel, Attr, Value}; +use oauth2::{TokenType, Retry, self}; +use hyper; +use hyper::header::{ContentType, ContentLength, Headers, UserAgent, Authorization, Header, + HeaderFormat, Bearer}; +use hyper::http::h1::LINE_ENDING; +use hyper::method::Method; +use hyper::status::StatusCode; + +use serde_json as json; + +/// Identifies the Hub. There is only one per library, this trait is supposed +/// to make intended use more explicit. +/// The hub allows to access all resource methods more easily. +pub trait Hub {} + +/// Identifies types for building methods of a particular resource type +pub trait MethodsBuilder {} + +/// Identifies types which represent builders for a particular resource method +pub trait CallBuilder {} + +/// Identifies types which can be inserted and deleted. +/// Types with this trait are most commonly used by clients of this API. +pub trait Resource {} + +/// Identifies types which are used in API responses. +pub trait ResponseResult {} + +/// Identifies types which are used in API requests. +pub trait RequestValue {} + +/// Identifies types which are not actually used by the API +/// This might be a bug within the google API schema. +pub trait UnusedType {} + +/// Identifies types which are only used as part of other types, which +/// usually are carrying the `Resource` trait. +pub trait Part {} + +/// Identifies types which are only used by other types internally. +/// They have no special meaning, this trait just marks them for completeness. +pub trait NestedType {} + +/// A utility to specify reader types which provide seeking capabilities too +pub trait ReadSeek: Seek + Read {} +impl ReadSeek for T {} + +/// A trait for all types that can convert themselves into a *parts* string +pub trait ToParts { + fn to_parts(&self) -> String; +} + +/// A utility type which can decode a server response that indicates error +#[derive(Deserialize)] +pub struct JsonServerError { + pub error: String, + pub error_description: Option +} + +/// A utility to represent detailed errors we might see in case there are BadRequests. +/// The latter happen if the sent parameters or request structures are unsound +#[derive(Deserialize, Serialize, Debug)] +pub struct ErrorResponse { + error: ServerError, +} + +#[derive(Deserialize, Serialize, Debug)] +pub struct ServerError { + errors: Vec, + code: u16, + message: String, +} + +#[derive(Deserialize, Serialize, Debug)] +pub struct ServerMessage { + domain: String, + reason: String, + message: String, + #[serde(rename="locationType")] + location_type: Option, + location: Option +} + +#[derive(Copy, Clone)] +pub struct DummyNetworkStream; + +impl Read for DummyNetworkStream { + fn read(&mut self, _: &mut [u8]) -> io::Result { + Ok(0) + } +} + +impl Write for DummyNetworkStream { + fn write(&mut self, _: &[u8]) -> io::Result { + Ok(0) + } + + fn flush(&mut self) -> io::Result<()> { + Ok(()) + } +} + +impl hyper::net::NetworkStream for DummyNetworkStream { + fn peer_addr(&mut self) -> io::Result { + Ok("127.0.0.1:1337".parse().unwrap()) + } + + fn set_read_timeout(&self, _dur: Option) -> io::Result<()> { + Ok(()) + } + + fn set_write_timeout(&self, _dur: Option) -> io::Result<()> { + Ok(()) + } +} + + +/// A trait specifying functionality to help controlling any request performed by the API. +/// The trait has a conservative default implementation. +/// +/// It contains methods to deal with all common issues, as well with the ones related to +/// uploading media +pub trait Delegate { + + /// Called at the beginning of any API request. The delegate should store the method + /// information if he is interesting in knowing more context when further calls to it + /// are made. + /// The matching `finished()` call will always be made, no matter whether or not the API + /// request was successful. That way, the delegate may easily maintain a clean state + /// between various API calls. + fn begin(&mut self, MethodInfo) {} + + /// Called whenever there is an [HttpError](http://hyperium.github.io/hyper/hyper/error/enum.HttpError.html), usually if there are network problems. + /// + /// If you choose to retry after a duration, the duration should be chosen using the + /// [exponential backoff algorithm](http://en.wikipedia.org/wiki/Exponential_backoff). + /// + /// Return retry information. + fn http_error(&mut self, &hyper::Error) -> Retry { + Retry::Abort + } + + /// Called whenever there is the need for your applications API key after + /// the official authenticator implementation didn't provide one, for some reason. + /// If this method returns None as well, the underlying operation will fail + fn api_key(&mut self) -> Option { + None + } + + /// Called whenever the Authenticator didn't yield a token. The delegate + /// may attempt to provide one, or just take it as a general information about the + /// impending failure. + /// The given Error provides information about why the token couldn't be acquired in the + /// first place + fn token(&mut self, err: &error::Error) -> Option { + let _ = err; + None + } + + /// Called during resumable uploads to provide a URL for the impending upload. + /// It was saved after a previous call to `store_upload_url(...)`, and if not None, + /// will be used instead of asking the server for a new upload URL. + /// This is useful in case a previous resumable upload was aborted/canceled, but should now + /// be resumed. + /// The returned URL will be used exactly once - if it fails again and the delegate allows + /// to retry, we will ask the server for a new upload URL. + fn upload_url(&mut self) -> Option { + None + } + + /// Called after we have retrieved a new upload URL for a resumable upload to store it + /// in case we fail or cancel. That way, we can attempt to resume the upload later, + /// see `upload_url()`. + /// It will also be called with None after a successful upload, which allows the delegate + /// to forget the URL. That way, we will not attempt to resume an upload that has already + /// finished. + fn store_upload_url(&mut self, url: Option<&str>) { + let _ = url; + } + + /// Called whenever a server response could not be decoded from json. + /// It's for informational purposes only, the caller will return with an error + /// accordingly. + /// + /// # Arguments + /// + /// * `json_encoded_value` - The json-encoded value which failed to decode. + /// * `json_decode_error` - The decoder error + fn response_json_decode_error(&mut self, json_encoded_value: &str, json_decode_error: &json::Error) { + let _ = json_encoded_value; + let _ = json_decode_error; + } + + /// Called whenever the http request returns with a non-success status code. + /// This can involve authentication issues, or anything else that very much + /// depends on the used API method. + /// The delegate should check the status, header and decoded json error to decide + /// whether to retry or not. In the latter case, the underlying call will fail. + /// + /// If you choose to retry after a duration, the duration should be chosen using the + /// [exponential backoff algorithm](http://en.wikipedia.org/wiki/Exponential_backoff). + fn http_failure(&mut self, _: &hyper::client::Response, Option, _: Option) -> Retry { + Retry::Abort + } + + /// Called prior to sending the main request of the given method. It can be used to time + /// the call or to print progress information. + /// It's also useful as you can be sure that a request will definitely be made. + fn pre_request(&mut self) { } + + /// Return the size of each chunk of a resumable upload. + /// Must be a power of two, with 1<<18 being the smallest allowed chunk size. + /// Will be called once before starting any resumable upload. + fn chunk_size(&mut self) -> u64 { + 1 << 23 + } + + /// Called before the given chunk is uploaded to the server. + /// If true is returned, the upload will be interrupted. + /// However, it may be resumable if you stored the upload URL in a previous call + /// to `store_upload_url()` + fn cancel_chunk_upload(&mut self, chunk: &ContentRange) -> bool { + let _ = chunk; + false + } + + /// Called before the API request method returns, in every case. It can be used to clean up + /// internal state between calls to the API. + /// This call always has a matching call to `begin(...)`. + /// + /// # Arguments + /// + /// * `is_success` - a true value indicates the operation was successful. If false, you should + /// discard all values stored during `store_upload_url`. + fn finished(&mut self, is_success: bool) { + let _ = is_success; + } +} + +/// A delegate with a conservative default implementation, which is used if no other delegate is +/// set. +#[derive(Default)] +pub struct DefaultDelegate; + +impl Delegate for DefaultDelegate {} + + +#[derive(Debug)] +pub enum Error { + /// The http connection failed + HttpError(hyper::Error), + + /// An attempt was made to upload a resource with size stored in field `.0` + /// even though the maximum upload size is what is stored in field `.1`. + UploadSizeLimitExceeded(u64, u64), + + /// Represents information about a request that was not understood by the server. + /// Details are included. + BadRequest(ErrorResponse), + + /// We needed an API key for authentication, but didn't obtain one. + /// Neither through the authenticator, nor through the Delegate. + MissingAPIKey, + + /// We required a Token, but didn't get one from the Authenticator + MissingToken(Box), + + /// The delgate instructed to cancel the operation + Cancelled, + + /// An additional, free form field clashed with one of the built-in optional ones + FieldClash(&'static str), + + /// Shows that we failed to decode the server response. + /// This can happen if the protocol changes in conjunction with strict json decoding. + JsonDecodeError(String, json::Error), + + /// Indicates an HTTP repsonse with a non-success status code + Failure(hyper::client::Response), +} + + +impl Display for Error { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + match *self { + Error::HttpError(ref err) => err.fmt(f), + Error::UploadSizeLimitExceeded(ref resource_size, ref max_size) => + writeln!(f, "The media size {} exceeds the maximum allowed upload size of {}" + , resource_size, max_size), + Error::MissingAPIKey => { + (writeln!(f, "The application's API key was not found in the configuration")).ok(); + writeln!(f, "It is used as there are no Scopes defined for this method.") + }, + Error::BadRequest(ref err) => { + try!(writeln!(f, "Bad Requst ({}): {}", err.error.code, err.error.message)); + for err in err.error.errors.iter() { + try!(writeln!(f, " {}: {}, {}{}", + err.domain, + err.message, + err.reason, + match &err.location { + &Some(ref loc) => format!("@{}", loc), + &None => String::new(), + })); + } + Ok(()) + }, + Error::MissingToken(ref err) => + writeln!(f, "Token retrieval failed with error: {}", err), + Error::Cancelled => + writeln!(f, "Operation cancelled by delegate"), + Error::FieldClash(field) => + writeln!(f, "The custom parameter '{}' is already provided natively by the CallBuilder.", field), + Error::JsonDecodeError(ref json_str, ref err) + => writeln!(f, "{}: {}", err, json_str), + Error::Failure(ref response) => + writeln!(f, "Http status indicates failure: {:?}", response), + } + } +} + +impl error::Error for Error { + fn description(&self) -> &str { + match *self { + Error::HttpError(ref err) => err.description(), + Error::JsonDecodeError(_, ref err) => err.description(), + _ => "NO DESCRIPTION POSSIBLE - use `Display.fmt()` instead" + } + } + + fn cause(&self) -> Option<&error::Error> { + match *self { + Error::HttpError(ref err) => err.cause(), + Error::JsonDecodeError(_, ref err) => err.cause(), + _ => None + } + } +} + +/// A universal result type used as return for all calls. +pub type Result = std::result::Result; + +/// Contains information about an API request. +pub struct MethodInfo { + pub id: &'static str, + pub http_method: Method, +} + +const BOUNDARY: &'static str = "MDuXWGyeE33QFXGchb2VFWc4Z7945d"; + +/// Provides a `Read` interface that converts multiple parts into the protocol +/// identified by [RFC2387](https://tools.ietf.org/html/rfc2387). +/// **Note**: This implementation is just as rich as it needs to be to perform uploads +/// to google APIs, and might not be a fully-featured implementation. +#[derive(Default)] +pub struct MultiPartReader<'a> { + raw_parts: Vec<(Headers, &'a mut Read)>, + current_part: Option<(Cursor>, &'a mut Read)>, + last_part_boundary: Option>>, +} + +impl<'a> MultiPartReader<'a> { + + /// Reserve memory for exactly the given amount of parts + pub fn reserve_exact(&mut self, cap: usize) { + self.raw_parts.reserve_exact(cap); + } + + /// Add a new part to the queue of parts to be read on the first `read` call. + /// + /// # Arguments + /// + /// `headers` - identifying the body of the part. It's similar to the header + /// in an ordinary single-part call, and should thus contain the + /// same information. + /// `reader` - a reader providing the part's body + /// `size` - the amount of bytes provided by the reader. It will be put onto the header as + /// content-size. + /// `mime` - It will be put onto the content type + pub fn add_part(&mut self, reader: &'a mut Read, size: u64, mime_type: Mime) -> &mut MultiPartReader<'a> { + let mut headers = Headers::new(); + headers.set(ContentType(mime_type)); + headers.set(ContentLength(size)); + self.raw_parts.push((headers, reader)); + self + } + + /// Returns the mime-type representing our multi-part message. + /// Use it with the ContentType header. + pub fn mime_type(&self) -> Mime { + Mime( + TopLevel::Multipart, + SubLevel::Ext("Related".to_string()), + vec![(Attr::Ext("boundary".to_string()), Value::Ext(BOUNDARY.to_string()))], + ) + } + + /// Returns true if we are totally used + fn is_depleted(&self) -> bool { + self.raw_parts.len() == 0 && self.current_part.is_none() && self.last_part_boundary.is_none() + } + + /// Returns true if we are handling our last part + fn is_last_part(&self) -> bool { + self.raw_parts.len() == 0 && self.current_part.is_some() + } +} + +impl<'a> Read for MultiPartReader<'a> { + fn read(&mut self, buf: &mut [u8]) -> io::Result { + match (self.raw_parts.len(), + self.current_part.is_none(), + self.last_part_boundary.is_none()) { + (_, _, false) => { + let br = self.last_part_boundary.as_mut().unwrap().read(buf).unwrap_or(0); + if br < buf.len() { + self.last_part_boundary = None; + } + return Ok(br) + }, + (0, true, true) => return Ok(0), + (n, true, _) if n > 0 => { + let (headers, reader) = self.raw_parts.remove(0); + let mut c = Cursor::new(Vec::::new()); + (write!(&mut c, "{}--{}{}{}{}", LINE_ENDING, BOUNDARY, LINE_ENDING, + headers, LINE_ENDING)).unwrap(); + c.seek(SeekFrom::Start(0)).unwrap(); + self.current_part = Some((c, reader)); + } + _ => {}, + } + + // read headers as long as possible + let (hb, rr) = { + let &mut (ref mut c, ref mut reader) = self.current_part.as_mut().unwrap(); + let b = c.read(buf).unwrap_or(0); + (b, reader.read(&mut buf[b..])) + }; + + match rr { + Ok(bytes_read) => { + if hb < buf.len() && bytes_read == 0 { + if self.is_last_part() { + // before clearing the last part, we will add the boundary that + // will be written last + self.last_part_boundary = Some(Cursor::new( + format!("{}--{}--", LINE_ENDING, BOUNDARY).into_bytes())) + } + // We are depleted - this can trigger the next part to come in + self.current_part = None; + } + let mut total_bytes_read = hb + bytes_read; + while total_bytes_read < buf.len() && !self.is_depleted() { + match self.read(&mut buf[total_bytes_read ..]) { + Ok(br) => total_bytes_read += br, + Err(err) => return Err(err), + } + } + Ok(total_bytes_read) + } + Err(err) => { + // fail permanently + self.current_part = None; + self.last_part_boundary = None; + self.raw_parts.clear(); + Err(err) + } + } + } +} + +// The following macro invocation needs to be expanded, as `include!` +// doens't support external macros +// header!{ +// #[doc="The `X-Upload-Content-Type` header."] +// (XUploadContentType, "X-Upload-Content-Type") => [Mime] + +// xupload_content_type { +// test_header!( +// test1, +// vec![b"text/plain"], +// Some(HeaderField( +// vec![Mime(TopLevel::Text, SubLevel::Plain, Vec::new())] +// ))); + +// } +// } + +/// The `X-Upload-Content-Type` header. +/// +/// Generated via rustc --pretty expanded -Z unstable-options, and manually +/// processed to be more readable. +#[derive(PartialEq, Debug, Clone)] +pub struct XUploadContentType(pub Mime); + +impl ::std::ops::Deref for XUploadContentType { + type Target = Mime; + fn deref<'a>(&'a self) -> &'a Mime { &self.0 } +} +impl ::std::ops::DerefMut for XUploadContentType { + fn deref_mut<'a>(&'a mut self) -> &'a mut Mime { &mut self.0 } +} +impl Header for XUploadContentType { + fn header_name() -> &'static str { "X-Upload-Content-Type" } + fn parse_header(raw: &[Vec]) -> hyper::error::Result { + hyper::header::parsing::from_one_raw_str(raw).map(XUploadContentType) + } +} +impl HeaderFormat for XUploadContentType { + fn fmt_header(&self, f: &mut fmt::Formatter) -> fmt::Result { + Display::fmt(&**self, f) + } +} +impl Display for XUploadContentType { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + fmt::Display::fmt(&**self, f) + } +} + +#[derive(Clone, PartialEq, Debug)] +pub struct Chunk { + pub first: u64, + pub last: u64 +} + +impl fmt::Display for Chunk { + fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result { + (write!(fmt, "{}-{}", self.first, self.last)).ok(); + Ok(()) + } +} + +impl FromStr for Chunk { + type Err = &'static str; + + /// NOTE: only implements `%i-%i`, not `*` + fn from_str(s: &str) -> std::result::Result { + let parts: Vec<&str> = s.split('-').collect(); + if parts.len() != 2 { + return Err("Expected two parts: %i-%i") + } + Ok( + Chunk { + first: match FromStr::from_str(parts[0]) { + Ok(d) => d, + _ => return Err("Couldn't parse 'first' as digit") + }, + last: match FromStr::from_str(parts[1]) { + Ok(d) => d, + _ => return Err("Couldn't parse 'last' as digit") + } + } + ) + } +} + +/// Implements the Content-Range header, for serialization only +#[derive(Clone, PartialEq, Debug)] +pub struct ContentRange { + pub range: Option, + pub total_length: u64, +} + +impl Header for ContentRange { + fn header_name() -> &'static str { + "Content-Range" + } + + /// We are not parsable, as parsing is done by the `Range` header + fn parse_header(_: &[Vec]) -> hyper::error::Result { + Err(hyper::error::Error::Method) + } +} + + +impl HeaderFormat for ContentRange { + fn fmt_header(&self, fmt: &mut fmt::Formatter) -> fmt::Result { + try!(fmt.write_str("bytes ")); + match self.range { + Some(ref c) => try!(c.fmt(fmt)), + None => try!(fmt.write_str("*")) + } + (write!(fmt, "/{}", self.total_length)).ok(); + Ok(()) + } +} + +#[derive(Clone, PartialEq, Debug)] +pub struct RangeResponseHeader(pub Chunk); + +impl Header for RangeResponseHeader { + fn header_name() -> &'static str { + "Range" + } + + fn parse_header(raw: &[Vec]) -> hyper::error::Result { + if raw.len() > 0 { + let v = &raw[0]; + if let Ok(s) = std::str::from_utf8(v) { + const PREFIX: &'static str = "bytes "; + if s.starts_with(PREFIX) { + if let Ok(c) = ::from_str(&s[PREFIX.len()..]) { + return Ok(RangeResponseHeader(c)) + } + } + } + } + Err(hyper::error::Error::Method) + } +} + +impl HeaderFormat for RangeResponseHeader { + /// No implmentation necessary, we just need to parse + fn fmt_header(&self, _: &mut fmt::Formatter) -> fmt::Result { + Err(fmt::Error) + } +} + +/// A utility type to perform a resumable upload from start to end. +pub struct ResumableUploadHelper<'a, A: 'a> { + pub client: &'a mut hyper::client::Client, + pub delegate: &'a mut Delegate, + pub start_at: Option, + pub auth: &'a mut A, + pub user_agent: &'a str, + pub auth_header: Authorization, + pub url: &'a str, + pub reader: &'a mut ReadSeek, + pub media_type: Mime, + pub content_length: u64 +} + +impl<'a, A> ResumableUploadHelper<'a, A> + where A: oauth2::GetToken { + + fn query_transfer_status(&mut self) -> std::result::Result> { + loop { + match self.client.post(self.url) + .header(UserAgent(self.user_agent.to_string())) + .header(ContentRange { range: None, total_length: self.content_length }) + .header(self.auth_header.clone()) + .send() { + Ok(r) => { + // 308 = resume-incomplete == PermanentRedirect + let headers = r.headers.clone(); + let h: &RangeResponseHeader = match headers.get() { + Some(hh) if r.status == StatusCode::PermanentRedirect => hh, + None|Some(_) => { + if let Retry::After(d) = self.delegate.http_failure(&r, None, None) { + sleep(d); + continue; + } + return Err(Ok(r)) + } + }; + return Ok(h.0.last) + } + Err(err) => { + if let Retry::After(d) = self.delegate.http_error(&err) { + sleep(d); + continue; + } + return Err(Err(err)) + } + } + } + } + + /// returns None if operation was cancelled by delegate, or the HttpResult. + /// It can be that we return the result just because we didn't understand the status code - + /// caller should check for status himself before assuming it's OK to use + pub fn upload(&mut self) -> Option> { + let mut start = match self.start_at { + Some(s) => s, + None => match self.query_transfer_status() { + Ok(s) => s, + Err(result) => return Some(result) + } + }; + + const MIN_CHUNK_SIZE: u64 = 1 << 18; + let chunk_size = match self.delegate.chunk_size() { + cs if cs > MIN_CHUNK_SIZE => cs, + _ => MIN_CHUNK_SIZE + }; + + self.reader.seek(SeekFrom::Start(start)).unwrap(); + loop { + let request_size = match self.content_length - start { + rs if rs > chunk_size => chunk_size, + rs => rs + }; + + let mut section_reader = self.reader.take(request_size); + let range_header = ContentRange { + range: Some(Chunk {first: start, last: start + request_size - 1}), + total_length: self.content_length + }; + start += request_size; + if self.delegate.cancel_chunk_upload(&range_header) { + return None + } + // workaround https://github.com/rust-lang/rust/issues/22252 + let res = self.client.post(self.url) + .header(range_header) + .header(ContentType(self.media_type.clone())) + .header(UserAgent(self.user_agent.to_string())) + .body(&mut section_reader) + .send(); + match res { + Ok(mut res) => { + if res.status == StatusCode::PermanentRedirect { + continue + } + if !res.status.is_success() { + let mut json_err = String::new(); + res.read_to_string(&mut json_err).unwrap(); + if let Retry::After(d) = self.delegate.http_failure(&res, + json::from_str(&json_err).ok(), + json::from_str(&json_err).ok()) { + sleep(d); + continue; + } + } + return Some(Ok(res)) + }, + Err(err) => { + if let Retry::After(d) = self.delegate.http_error(&err) { + sleep(d); + continue; + } + return Some(Err(err)) + } + } + } + } +} + +// Copy of src/rust/cli/cmn.rs +// TODO(ST): Allow sharing common code between program types +pub fn remove_json_null_values(value: &mut json::value::Value) { + match *value { + json::value::Value::Object(ref mut map) => { + let mut for_removal = Vec::new(); + + for (key, mut value) in map.iter_mut() { + if value.is_null() { + for_removal.push(key.clone()); + } else { + remove_json_null_values(&mut value); + } + } + + for key in &for_removal { + map.remove(key); + } + } + _ => {} + } +} diff --git a/gen/monitoring3/src/lib.rs b/gen/monitoring3/src/lib.rs new file mode 100644 index 0000000000..2b257a08c2 --- /dev/null +++ b/gen/monitoring3/src/lib.rs @@ -0,0 +1,186 @@ +// DO NOT EDIT ! +// This file was generated automatically from 'src/mako/api/lib.rs.mako' +// DO NOT EDIT ! + +//! This documentation was generated from *monitoring* crate version *0.1.13+20160321*, where *20160321* is the exact revision of the *monitoring:v3* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.13*. +//! +//! Everything else about the *monitoring* *v3* API can be found at the +//! [official documentation site](https://cloud.google.com/monitoring/api/). +//! The original source code is [on github](https://github.com/Byron/google-apis-rs/tree/master/gen/monitoring3). +//! # Features +//! +//! Handle the following *Resources* with ease from the central [hub](struct.Monitoring.html) ... +//! +//! * projects +//! * [*collectd time series create*](struct.ProjectCollectdTimeSeryCreateCall.html), [*groups create*](struct.ProjectGroupCreateCall.html), [*groups delete*](struct.ProjectGroupDeleteCall.html), [*groups get*](struct.ProjectGroupGetCall.html), [*groups list*](struct.ProjectGroupListCall.html), [*groups members list*](struct.ProjectGroupMemberListCall.html), [*groups update*](struct.ProjectGroupUpdateCall.html), [*metric descriptors create*](struct.ProjectMetricDescriptorCreateCall.html), [*metric descriptors delete*](struct.ProjectMetricDescriptorDeleteCall.html), [*metric descriptors get*](struct.ProjectMetricDescriptorGetCall.html), [*metric descriptors list*](struct.ProjectMetricDescriptorListCall.html), [*monitored resource descriptors get*](struct.ProjectMonitoredResourceDescriptorGetCall.html), [*monitored resource descriptors list*](struct.ProjectMonitoredResourceDescriptorListCall.html), [*time series create*](struct.ProjectTimeSeryCreateCall.html) and [*time series list*](struct.ProjectTimeSeryListCall.html) +//! +//! +//! +//! +//! Not what you are looking for ? Find all other Google APIs in their Rust [documentation index](../index.html). +//! +//! # Structure of this Library +//! +//! The API is structured into the following primary items: +//! +//! * **[Hub](struct.Monitoring.html)** +//! * a central object to maintain state and allow accessing all *Activities* +//! * creates [*Method Builders*](trait.MethodsBuilder.html) which in turn +//! allow access to individual [*Call Builders*](trait.CallBuilder.html) +//! * **[Resources](trait.Resource.html)** +//! * primary types that you can apply *Activities* to +//! * a collection of properties and *Parts* +//! * **[Parts](trait.Part.html)** +//! * a collection of properties +//! * never directly used in *Activities* +//! * **[Activities](trait.CallBuilder.html)** +//! * operations to apply to *Resources* +//! +//! All *structures* are marked with applicable traits to further categorize them and ease browsing. +//! +//! Generally speaking, you can invoke *Activities* like this: +//! +//! ```Rust,ignore +//! let r = hub.resource().activity(...).doit() +//! ``` +//! +//! Or specifically ... +//! +//! ```ignore +//! let r = hub.projects().metric_descriptors_delete(...).doit() +//! let r = hub.projects().time_series_create(...).doit() +//! let r = hub.projects().collectd_time_series_create(...).doit() +//! let r = hub.projects().groups_delete(...).doit() +//! ``` +//! +//! The `resource()` and `activity(...)` calls create [builders][builder-pattern]. The second one dealing with `Activities` +//! supports various methods to configure the impending operation (not shown here). It is made such that all required arguments have to be +//! specified right away (i.e. `(...)`), whereas all optional ones can be [build up][builder-pattern] as desired. +//! The `doit()` method performs the actual communication with the server and returns the respective result. +//! +//! # Usage +//! +//! ## Setting up your Project +//! +//! To use this library, you would put the following lines into your `Cargo.toml` file: +//! +//! ```toml +//! [dependencies] +//! google-monitoring3 = "*" +//! ``` +//! +//! ## A complete example +//! +//! ```test_harness,no_run +//! extern crate hyper; +//! extern crate yup_oauth2 as oauth2; +//! extern crate google_monitoring3 as monitoring3; +//! use monitoring3::CreateTimeSeriesRequest; +//! use monitoring3::{Result, Error}; +//! # #[test] fn egal() { +//! use std::default::Default; +//! use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; +//! use monitoring3::Monitoring; +//! +//! // Get an ApplicationSecret instance by some means. It contains the `client_id` and +//! // `client_secret`, among other things. +//! let secret: ApplicationSecret = Default::default(); +//! // Instantiate the authenticator. It will choose a suitable authentication flow for you, +//! // unless you replace `None` with the desired Flow. +//! // Provide your own `AuthenticatorDelegate` to adjust the way it operates and get feedback about +//! // what's going on. You probably want to bring in your own `TokenStorage` to persist tokens and +//! // retrieve them from storage. +//! let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, +//! hyper::Client::new(), +//! ::default(), None); +//! let mut hub = Monitoring::new(hyper::Client::new(), auth); +//! // As the method needs a request, you would usually fill it with the desired information +//! // into the respective structure. Some of the parts shown here might not be applicable ! +//! // Values shown here are possibly random and not representative ! +//! let mut req = CreateTimeSeriesRequest::default(); +//! +//! // You can configure optional parameters by calling the respective setters at will, and +//! // execute the final call using `doit()`. +//! // Values shown here are possibly random and not representative ! +//! let result = hub.projects().time_series_create(req, "name") +//! .doit(); +//! +//! match result { +//! Err(e) => match e { +//! // The Error enum provides details about what exactly happened. +//! // You can also just use its `Debug`, `Display` or `Error` traits +//! Error::HttpError(_) +//! |Error::MissingAPIKey +//! |Error::MissingToken(_) +//! |Error::Cancelled +//! |Error::UploadSizeLimitExceeded(_, _) +//! |Error::Failure(_) +//! |Error::BadRequest(_) +//! |Error::FieldClash(_) +//! |Error::JsonDecodeError(_, _) => println!("{}", e), +//! }, +//! Ok(res) => println!("Success: {:?}", res), +//! } +//! # } +//! ``` +//! ## Handling Errors +//! +//! All errors produced by the system are provided either as [Result](enum.Result.html) enumeration as return value of +//! the doit() methods, or handed as possibly intermediate results to either the +//! [Hub Delegate](trait.Delegate.html), or the [Authenticator Delegate](../yup-oauth2/trait.AuthenticatorDelegate.html). +//! +//! When delegates handle errors or intermediate values, they may have a chance to instruct the system to retry. This +//! makes the system potentially resilient to all kinds of errors. +//! +//! ## Uploads and Downloads +//! If a method supports downloads, the response body, which is part of the [Result](enum.Result.html), should be +//! read by you to obtain the media. +//! If such a method also supports a [Response Result](trait.ResponseResult.html), it will return that by default. +//! You can see it as meta-data for the actual media. To trigger a media download, you will have to set up the builder by making +//! this call: `.param("alt", "media")`. +//! +//! Methods supporting uploads can do so using up to 2 different protocols: +//! *simple* and *resumable*. The distinctiveness of each is represented by customized +//! `doit(...)` methods, which are then named `upload(...)` and `upload_resumable(...)` respectively. +//! +//! ## Customization and Callbacks +//! +//! You may alter the way an `doit()` method is called by providing a [delegate](trait.Delegate.html) to the +//! [Method Builder](trait.CallBuilder.html) before making the final `doit()` call. +//! Respective methods will be called to provide progress information, as well as determine whether the system should +//! retry on failure. +//! +//! The [delegate trait](trait.Delegate.html) is default-implemented, allowing you to customize it with minimal effort. +//! +//! ## Optional Parts in Server-Requests +//! +//! All structures provided by this library are made to be [enocodable](trait.RequestValue.html) and +//! [decodable](trait.ResponseResult.html) via *json*. Optionals are used to indicate that partial requests are responses +//! are valid. +//! Most optionals are are considered [Parts](trait.Part.html) which are identifiable by name, which will be sent to +//! the server to indicate either the set parts of the request or the desired parts in the response. +//! +//! ## Builder Arguments +//! +//! Using [method builders](trait.CallBuilder.html), you are able to prepare an action call by repeatedly calling it's methods. +//! These will always take a single argument, for which the following statements are true. +//! +//! * [PODs][wiki-pod] are handed by copy +//! * strings are passed as `&str` +//! * [request values](trait.RequestValue.html) are moved +//! +//! Arguments will always be copied or cloned into the builder, to make them independent of their original life times. +//! +//! [wiki-pod]: http://en.wikipedia.org/wiki/Plain_old_data_structure +//! [builder-pattern]: http://en.wikipedia.org/wiki/Builder_pattern +//! [google-go-api]: https://github.com/google/google-api-go-client +//! +//! + +// 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 +// unused imports in fully featured APIs. Same with unused_mut ... . +#![allow(unused_imports, unused_mut, dead_code)] + +include!(concat!(env!("OUT_DIR"), "/lib.rs")); \ No newline at end of file diff --git a/gen/monitoring3/src/lib.rs.in b/gen/monitoring3/src/lib.rs.in new file mode 100644 index 0000000000..b78fb21a1c --- /dev/null +++ b/gen/monitoring3/src/lib.rs.in @@ -0,0 +1,5260 @@ +// DO NOT EDIT ! +// This file was generated automatically from 'src/mako/api/lib.rs.in.mako' +// DO NOT EDIT ! + +extern crate hyper; +extern crate serde; +extern crate serde_json; +extern crate yup_oauth2 as oauth2; +extern crate mime; +extern crate url; + +mod cmn; + +use std::collections::HashMap; +use std::cell::RefCell; +use std::borrow::BorrowMut; +use std::default::Default; +use std::collections::BTreeMap; +use serde_json as json; +use std::io; +use std::fs; +use std::thread::sleep; +use std::time::Duration; + +pub use cmn::{MultiPartReader, ToParts, MethodInfo, Result, Error, CallBuilder, Hub, ReadSeek, Part, + ResponseResult, RequestValue, NestedType, Delegate, DefaultDelegate, MethodsBuilder, + Resource, ErrorResponse, remove_json_null_values}; + + +// ############## +// UTILITIES ### +// ############ + +/// Identifies the an OAuth2 authorization scope. +/// A scope is needed when requesting an +/// [authorization token](https://developers.google.com/youtube/v3/guides/authentication). +#[derive(PartialEq, Eq, Hash)] +pub enum Scope { + /// View monitoring data for all of your Google Cloud and third-party projects + Read, + + /// View and manage your data across Google Cloud Platform services + CloudPlatform, + + /// Publish metric data to your Google Cloud projects + Write, + + /// View and write monitoring data for all of your Google and third-party Cloud and API projects + Full, +} + +impl AsRef for Scope { + fn as_ref(&self) -> &str { + match *self { + Scope::Read => "https://www.googleapis.com/auth/monitoring.read", + Scope::CloudPlatform => "https://www.googleapis.com/auth/cloud-platform", + Scope::Write => "https://www.googleapis.com/auth/monitoring.write", + Scope::Full => "https://www.googleapis.com/auth/monitoring", + } + } +} + +impl Default for Scope { + fn default() -> Scope { + Scope::Full + } +} + + + +// ######## +// HUB ### +// ###### + +/// Central instance to access all Monitoring related resource activities +/// +/// # Examples +/// +/// Instantiate a new hub +/// +/// ```test_harness,no_run +/// extern crate hyper; +/// extern crate yup_oauth2 as oauth2; +/// extern crate google_monitoring3 as monitoring3; +/// use monitoring3::CreateTimeSeriesRequest; +/// use monitoring3::{Result, Error}; +/// # #[test] fn egal() { +/// use std::default::Default; +/// use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; +/// use monitoring3::Monitoring; +/// +/// // Get an ApplicationSecret instance by some means. It contains the `client_id` and +/// // `client_secret`, among other things. +/// let secret: ApplicationSecret = Default::default(); +/// // Instantiate the authenticator. It will choose a suitable authentication flow for you, +/// // unless you replace `None` with the desired Flow. +/// // Provide your own `AuthenticatorDelegate` to adjust the way it operates and get feedback about +/// // what's going on. You probably want to bring in your own `TokenStorage` to persist tokens and +/// // retrieve them from storage. +/// let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, +/// hyper::Client::new(), +/// ::default(), None); +/// let mut hub = Monitoring::new(hyper::Client::new(), auth); +/// // As the method needs a request, you would usually fill it with the desired information +/// // into the respective structure. Some of the parts shown here might not be applicable ! +/// // Values shown here are possibly random and not representative ! +/// let mut req = CreateTimeSeriesRequest::default(); +/// +/// // You can configure optional parameters by calling the respective setters at will, and +/// // execute the final call using `doit()`. +/// // Values shown here are possibly random and not representative ! +/// let result = hub.projects().time_series_create(req, "name") +/// .doit(); +/// +/// match result { +/// Err(e) => match e { +/// // The Error enum provides details about what exactly happened. +/// // You can also just use its `Debug`, `Display` or `Error` traits +/// Error::HttpError(_) +/// |Error::MissingAPIKey +/// |Error::MissingToken(_) +/// |Error::Cancelled +/// |Error::UploadSizeLimitExceeded(_, _) +/// |Error::Failure(_) +/// |Error::BadRequest(_) +/// |Error::FieldClash(_) +/// |Error::JsonDecodeError(_, _) => println!("{}", e), +/// }, +/// Ok(res) => println!("Success: {:?}", res), +/// } +/// # } +/// ``` +pub struct Monitoring { + client: RefCell, + auth: RefCell, + _user_agent: String, +} + +impl<'a, C, A> Hub for Monitoring {} + +impl<'a, C, A> Monitoring + where C: BorrowMut, A: oauth2::GetToken { + + pub fn new(client: C, authenticator: A) -> Monitoring { + Monitoring { + client: RefCell::new(client), + auth: RefCell::new(authenticator), + _user_agent: "google-api-rust-client/0.1.13".to_string(), + } + } + + pub fn projects(&'a self) -> ProjectMethods<'a, C, A> { + ProjectMethods { hub: &self } + } + + /// Set the user-agent header field to use in all requests to the server. + /// It defaults to `google-api-rust-client/0.1.13`. + /// + /// Returns the previously set user-agent. + pub fn user_agent(&mut self, agent_name: String) -> String { + let prev = self._user_agent.clone(); + self._user_agent = agent_name; + prev + } +} + + +// ############ +// SCHEMAS ### +// ########## +/// A time interval extending from after `startTime` through `endTime`. If `startTime` is omitted, the interval is the single point in time, `endTime`. +/// +/// This type is not used in any activity, and only used as *part* of another schema. +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct TimeInterval { + /// (required) The end of the interval. The interval includes this time. + #[serde(rename="endTime")] + pub end_time: Option, + /// (optional) If omitted, the interval is a point in time, `endTime`. If `startTime` is present, it must be earlier than (less than) `endTime`. The interval begins after `startTime`—it does not include `startTime`. + #[serde(rename="startTime")] + pub start_time: Option, +} + +impl Part for TimeInterval {} + + +/// The `ListMetricDescriptors` response. +/// +/// # Activities +/// +/// This type is used in activities, which are methods you may call on this type or where this type is involved in. +/// The list links the activity name, along with information about where it is used (one of *request* and *response*). +/// +/// * [metric descriptors list projects](struct.ProjectMetricDescriptorListCall.html) (response) +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct ListMetricDescriptorsResponse { + /// If there are more results than have been returned, then this field is set to a non-empty value. To see the additional results, use that value as `pageToken` in the next call to this method. + #[serde(rename="nextPageToken")] + pub next_page_token: Option, + /// The metric descriptors that are available to the project and that match the value of `filter`, if present. + #[serde(rename="metricDescriptors")] + pub metric_descriptors: Option>, +} + +impl ResponseResult for ListMetricDescriptorsResponse {} + + +/// The `ListGroupMembers` response. +/// +/// # Activities +/// +/// This type is used in activities, which are methods you may call on this type or where this type is involved in. +/// The list links the activity name, along with information about where it is used (one of *request* and *response*). +/// +/// * [groups members list projects](struct.ProjectGroupMemberListCall.html) (response) +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct ListGroupMembersResponse { + /// If there are more results than have been returned, then this field is set to a non-empty value. To see the additional results, use that value as `pageToken` in the next call to this method. + #[serde(rename="nextPageToken")] + pub next_page_token: Option, + /// The total number of elements matching this request. + #[serde(rename="totalSize")] + pub total_size: Option, + /// A set of monitored resources in the group. + pub members: Option>, +} + +impl ResponseResult for ListGroupMembersResponse {} + + +/// The description of a dynamic collection of monitored resources. Each group has a filter that is matched against monitored resources and their associated metadata. If a group's filter matches an available monitored resource, then that resource is a member of that group. Groups can contain any number of monitored resources, and each monitored resource can be a member of any number of groups. Groups can be nested in parent-child hierarchies. The `parentName` field identifies an optional parent for each group. If a group has a parent, then the only monitored resources available to be matched by the group's filter are the resources contained in the parent group. In other words, a group contains the monitored resources that match its filter and the filters of all the group's ancestors. A group without a parent can contain any monitored resource. For example, consider an infrastructure running a set of instances with two user-defined tags: `"environment"` and `"role"`. A parent group has a filter, `environment="production"`. A child of that parent group has a filter, `role="transcoder"`. The parent group contains all instances in the production environment, regardless of their roles. The child group contains instances that have the transcoder role *and* are in the production environment. The monitored resources contained in a group can change at any moment, depending on what resources exist and what filters are associated with the group and its ancestors. +/// +/// # Activities +/// +/// This type is used in activities, which are methods you may call on this type or where this type is involved in. +/// The list links the activity name, along with information about where it is used (one of *request* and *response*). +/// +/// * [groups update projects](struct.ProjectGroupUpdateCall.html) (request|response) +/// * [groups create projects](struct.ProjectGroupCreateCall.html) (request|response) +/// * [groups get projects](struct.ProjectGroupGetCall.html) (response) +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct Group { + /// The filter used to determine which monitored resources belong to this group. + pub filter: Option, + /// The name of the group's parent, if it has one. The format is `"projects/{project_id_or_number}/groups/{group_id}"`. For groups with no parent, `parentName` is the empty string, `""`. + #[serde(rename="parentName")] + pub parent_name: Option, + /// A user-assigned name for this group, used only for display purposes. + #[serde(rename="displayName")] + pub display_name: Option, + /// The name of this group. The format is `"projects/{project_id_or_number}/groups/{group_id}"`. When creating a group, this field is ignored and a new name is created consisting of the project specified in the call to `CreateGroup` and a unique `{group_id}` that is generated automatically. @OutputOnly + pub name: Option, + /// If true, the members of this group are considered to be a cluster. The system can perform additional analysis on groups that are clusters. + #[serde(rename="isCluster")] + pub is_cluster: Option, +} + +impl RequestValue for Group {} +impl ResponseResult for Group {} + + +/// A single strongly-typed value. +/// +/// This type is not used in any activity, and only used as *part* of another schema. +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct TypedValue { + /// A distribution value. + #[serde(rename="distributionValue")] + pub distribution_value: Option, + /// A variable-length string value. + #[serde(rename="stringValue")] + pub string_value: Option, + /// A Boolean value: `true` or `false`. + #[serde(rename="boolValue")] + pub bool_value: Option, + /// A 64-bit integer. Its range is approximately ±9.2x1018. + #[serde(rename="int64Value")] + pub int64_value: Option, + /// A 64-bit double-precision floating-point number. Its magnitude is approximately ±10±300 and it has 16 significant digits of precision. + #[serde(rename="doubleValue")] + pub double_value: Option, +} + +impl Part for TypedValue {} + + +/// Specify a sequence of buckets that have a width that is proportional to the value of the lower bound. Each bucket represents a constant relative uncertainty on a specific value in the bucket. Defines `num_finite_buckets + 2` (= N) buckets with these boundaries for bucket i: Upper bound (0 <= i < N-1): scale * (growth_factor ^ i). Lower bound (1 <= i < N): scale * (growth_factor ^ (i - 1)). +/// +/// This type is not used in any activity, and only used as *part* of another schema. +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct Exponential { + /// Must be greater than 0 + pub scale: Option, + /// Must be greater than 1 + #[serde(rename="growthFactor")] + pub growth_factor: Option, + /// must be greater than 0 + #[serde(rename="numFiniteBuckets")] + pub num_finite_buckets: Option, +} + +impl Part for Exponential {} + + +/// A collection of data points sent from a `collectd`-based plugin. See the `collectd` documentation for more information. +/// +/// This type is not used in any activity, and only used as *part* of another schema. +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct CollectdPayload { + /// The name of the plugin. Example: `"disk"`. + pub plugin: Option, + /// The measurement type instance. Example: `"used"`. + #[serde(rename="typeInstance")] + pub type_instance: Option, + /// The measured values during this time interval. Each value must have a different `dataSourceName`. + pub values: Option>, + /// The start time of the interval. + #[serde(rename="startTime")] + pub start_time: Option, + /// The end time of the interval. + #[serde(rename="endTime")] + pub end_time: Option, + /// The measurement type. Example: `"memory"`. + #[serde(rename="type")] + pub type_: Option, + /// The instance name of the plugin Example: `"hdcl"`. + #[serde(rename="pluginInstance")] + pub plugin_instance: Option, + /// The measurement metadata. Example: `"process_id" -> 12345` + pub metadata: Option>, +} + +impl Part for CollectdPayload {} + + +/// A set of buckets with arbitrary widths. Defines `size(bounds) + 1` (= N) buckets with these boundaries for bucket i: Upper bound (0 <= i < N-1): bounds[i] Lower bound (1 <= i < N); bounds[i - 1] There must be at least one element in `bounds`. If `bounds` has only one element, there are no finite buckets, and that single element is the common boundary of the overflow and underflow buckets. +/// +/// This type is not used in any activity, and only used as *part* of another schema. +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct Explicit { + /// The values must be monotonically increasing. + pub bounds: Option>, +} + +impl Part for Explicit {} + + +/// An object representing a resource that can be used for monitoring, logging, billing, or other purposes. Examples include virtual machine instances, databases, and storage devices such as disks. The `type` field identifies a MonitoredResourceDescriptor object that describes the resource's schema. Information in the `labels` field identifies the actual resource and its attributes according to the schema. For example, a particular Compute Engine VM instance could be represented by the following object, because the MonitoredResourceDescriptor for `"gce_instance"` has labels `"instance_id"` and `"zone"`: { "type": "gce_instance", "labels": { "instance_id": "my-instance", "zone": "us-central1-a" }} +/// +/// This type is not used in any activity, and only used as *part* of another schema. +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct MonitoredResource { + /// Required. Values for all of the labels listed in the associated monitored resource descriptor. For example, Cloud SQL databases use the labels `"database_id"` and `"zone"`. + pub labels: Option>, + /// Required. The monitored resource type. This field must match the `type` field of a MonitoredResourceDescriptor object. For example, the type of a Cloud SQL database is `"cloudsql_database"`. + #[serde(rename="type")] + pub type_: Option, +} + +impl Part for MonitoredResource {} + + +/// The range of the population values. +/// +/// This type is not used in any activity, and only used as *part* of another schema. +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct Range { + /// The maximum of the population values. + pub max: Option, + /// The minimum of the population values. + pub min: Option, +} + +impl Part for Range {} + + +/// A single data point from a `collectd`-based plugin. +/// +/// This type is not used in any activity, and only used as *part* of another schema. +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct CollectdValue { + /// The type of measurement. + #[serde(rename="dataSourceType")] + pub data_source_type: Option, + /// The data source for the `collectd` value. For example there are two data sources for network measurements: `"rx"` and `"tx"`. + #[serde(rename="dataSourceName")] + pub data_source_name: Option, + /// The measurement value. + pub value: Option, +} + +impl Part for CollectdValue {} + + +/// A collection of data points that describes the time-varying nature of a metric. A time series is identified by a combination of a fully-specified monitored resource and a fully-specified metric. +/// +/// This type is not used in any activity, and only used as *part* of another schema. +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct TimeSeries { + /// The metric kind of the time series. This can be different than the metric kind specified in [google.api.MetricDescriptor] because of alignment and reduction operations on the data. This field is ignored when writing data; the value specified in the descriptor is used instead. @OutputOnly + #[serde(rename="metricKind")] + pub metric_kind: Option, + /// The fully-specified metric used to identify the time series. + pub metric: Option, + /// The data points of this time series. When used as output, points will be sorted by decreasing time order. When used as input, points could be written in any orders. + pub points: Option>, + /// The fully-specified monitored resource used to identify the time series. + pub resource: Option, + /// The value type of the time series. This can be different than the value type specified in [google.api.MetricDescriptor] because of alignment and reduction operations on the data. This field is ignored when writing data; the value specified in the descriptor is used instead. @OutputOnly + #[serde(rename="valueType")] + pub value_type: Option, +} + +impl Part for TimeSeries {} + + +/// Distribution contains summary statistics for a population of values and, optionally, a histogram representing the distribution of those values across a specified set of histogram buckets. The summary statistics are the count, mean, sum of the squared deviation from the mean, the minimum, and the maximum of the set of population of values. The histogram is based on a sequence of buckets and gives a count of values that fall into each bucket. The boundaries of the buckets are given either explicitly or by specifying parameters for a method of computing them (buckets of fixed width or buckets of exponentially increasing width). Although it is not forbidden, it is generally a bad idea to include non-finite values (infinities or NaNs) in the population of values, as this will render the `mean` and `sum_of_squared_deviation` fields meaningless. +/// +/// This type is not used in any activity, and only used as *part* of another schema. +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct Distribution { + /// The number of values in the population. Must be non-negative. + pub count: Option, + /// If `bucket_options` is given, then the sum of the values in `bucket_counts` must equal the value in `count`. If `bucket_options` is not given, no `bucket_counts` fields may be given. Bucket counts are given in order under the numbering scheme described above (the underflow bucket has number 0; the finite buckets, if any, have numbers 1 through N-2; the overflow bucket has number N-1). The size of `bucket_counts` must be no greater than N as defined in `bucket_options`. Any suffix of trailing zero bucket_count fields may be omitted. + #[serde(rename="bucketCounts")] + pub bucket_counts: Option>, + /// The sum of squared deviations from the mean of the values in the population. For values x_i this is: Sum[i=1..n]((x_i - mean)^2) Knuth, "The Art of Computer Programming", Vol. 2, page 323, 3rd edition describes Welford's method for accumulating this sum in one pass. If `count` is zero then this field must be zero. + #[serde(rename="sumOfSquaredDeviation")] + pub sum_of_squared_deviation: Option, + /// If specified, contains the range of the population values. The field must not be present if the `count` is zero. + pub range: Option, + /// Defines the histogram bucket boundaries. + #[serde(rename="bucketOptions")] + pub bucket_options: Option, + /// The arithmetic mean of the values in the population. If `count` is zero then this field must be zero. + pub mean: Option, +} + +impl Part for Distribution {} + + +/// A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); } The JSON representation for `Empty` is empty JSON object `{}`. +/// +/// # Activities +/// +/// This type is used in activities, which are methods you may call on this type or where this type is involved in. +/// The list links the activity name, along with information about where it is used (one of *request* and *response*). +/// +/// * [metric descriptors delete projects](struct.ProjectMetricDescriptorDeleteCall.html) (response) +/// * [time series create projects](struct.ProjectTimeSeryCreateCall.html) (response) +/// * [collectd time series create projects](struct.ProjectCollectdTimeSeryCreateCall.html) (response) +/// * [groups delete projects](struct.ProjectGroupDeleteCall.html) (response) +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct Empty; + +impl ResponseResult for Empty {} + + +/// The `ListTimeSeries` response. +/// +/// # Activities +/// +/// This type is used in activities, which are methods you may call on this type or where this type is involved in. +/// The list links the activity name, along with information about where it is used (one of *request* and *response*). +/// +/// * [time series list projects](struct.ProjectTimeSeryListCall.html) (response) +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct ListTimeSeriesResponse { + /// If there are more results than have been returned, then this field is set to a non-empty value. To see the additional results, use that value as `pageToken` in the next call to this method. + #[serde(rename="nextPageToken")] + pub next_page_token: Option, + /// One or more time series that match the filter included in the request. + #[serde(rename="timeSeries")] + pub time_series: Option>, +} + +impl ResponseResult for ListTimeSeriesResponse {} + + +/// Specify a sequence of buckets that all have the same width (except overflow and underflow). Each bucket represents a constant absolute uncertainty on the specific value in the bucket. Defines `num_finite_buckets + 2` (= N) buckets with these boundaries for bucket `i`: Upper bound (0 <= i < N-1): offset + (width * i). Lower bound (1 <= i < N): offset + (width * (i - 1)). +/// +/// This type is not used in any activity, and only used as *part* of another schema. +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct Linear { + /// Must be greater than 0. + pub width: Option, + /// Must be greater than 0. + #[serde(rename="numFiniteBuckets")] + pub num_finite_buckets: Option, + /// Lower bound of the first bucket. + pub offset: Option, +} + +impl Part for Linear {} + + +/// Defines a metric type and its schema. +/// +/// # Activities +/// +/// This type is used in activities, which are methods you may call on this type or where this type is involved in. +/// The list links the activity name, along with information about where it is used (one of *request* and *response*). +/// +/// * [metric descriptors get projects](struct.ProjectMetricDescriptorGetCall.html) (response) +/// * [metric descriptors create projects](struct.ProjectMetricDescriptorCreateCall.html) (request|response) +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct MetricDescriptor { + /// A concise name for the metric, which can be displayed in user interfaces. Use sentence case without an ending period, for example "Request count". + #[serde(rename="displayName")] + pub display_name: Option, + /// Resource name. The format of the name may vary between different implementations. For examples: projects/{project_id}/metricDescriptors/{type=**} metricDescriptors/{type=**} + pub name: Option, + /// Whether the metric records instantaneous values, changes to a value, etc. + #[serde(rename="metricKind")] + pub metric_kind: Option, + /// Whether the measurement is an integer, a floating-point number, etc. + #[serde(rename="valueType")] + pub value_type: Option, + /// The set of labels that can be used to describe a specific instance of this metric type. For example, the `compute.googleapis.com/instance/network/received_bytes_count` metric type has a label, `loadbalanced`, that specifies whether the traffic was received through a load balanced IP address. + pub labels: Option>, + /// The metric type including a DNS name prefix, for example `"compute.googleapis.com/instance/cpu/utilization"`. Metric types should use a natural hierarchical grouping such as the following: compute.googleapis.com/instance/cpu/utilization compute.googleapis.com/instance/disk/read_ops_count compute.googleapis.com/instance/network/received_bytes_count Note that if the metric type changes, the monitoring data will be discontinued, and anything depends on it will break, such as monitoring dashboards, alerting rules and quota limits. Therefore, once a metric has been published, its type should be immutable. + #[serde(rename="type")] + pub type_: Option, + /// The unit in which the metric value is reported. It is only applicable if the `value_type` is `INT64`, `DOUBLE`, or `DISTRIBUTION`. The supported units are a subset of [The Unified Code for Units of Measure](http://unitsofmeasure.org/ucum.html) standard: **Basic units (UNIT)** * `bit` bit * `By` byte * `s` second * `min` minute * `h` hour * `d` day **Prefixes (PREFIX)** * `k` kilo (10**3) * `M` mega (10**6) * `G` giga (10**9) * `T` tera (10**12) * `P` peta (10**15) * `E` exa (10**18) * `Z` zetta (10**21) * `Y` yotta (10**24) * `m` milli (10**-3) * `u` micro (10**-6) * `n` nano (10**-9) * `p` pico (10**-12) * `f` femto (10**-15) * `a` atto (10**-18) * `z` zepto (10**-21) * `y` yocto (10**-24) * `Ki` kibi (2**10) * `Mi` mebi (2**20) * `Gi` gibi (2**30) * `Ti` tebi (2**40) **Grammar** The grammar includes the dimensionless unit `1`, such as `1/s`. The grammar also includes these connectors: * `/` division (as an infix operator, e.g. `1/s`). * `.` multiplication (as an infix operator, e.g. `GBy.d`) The grammar for a unit is as follows: Expression = Component { "." Component } { "/" Component } ; Component = [ PREFIX ] UNIT [ Annotation ] | Annotation | "1" ; Annotation = "{" NAME "}" ; Notes: * `Annotation` is just a comment if it follows a `UNIT` and is equivalent to `1` if it is used alone. For examples, `{requests}/s == 1/s`, `By{transmitted}/s == By/s`. * `NAME` is a sequence of non-blank printable ASCII characters not containing '{' or '}'. + pub unit: Option, + /// A detailed description of the metric, which can be used in documentation. + pub description: Option, +} + +impl RequestValue for MetricDescriptor {} +impl ResponseResult for MetricDescriptor {} + + +/// A specific metric identified by specifying values for all of the labels of a `MetricDescriptor`. +/// +/// This type is not used in any activity, and only used as *part* of another schema. +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct Metric { + /// The set of labels that uniquely identify a metric. To specify a metric, all labels enumerated in the `MetricDescriptor` must be assigned values. + pub labels: Option>, + /// An existing metric type, see google.api.MetricDescriptor. For example, `compute.googleapis.com/instance/cpu/usage_time`. + #[serde(rename="type")] + pub type_: Option, +} + +impl Part for Metric {} + + +/// A single data point in a time series. +/// +/// This type is not used in any activity, and only used as *part* of another schema. +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct Point { + /// The time interval to which the value applies. + pub interval: Option, + /// The value of the data point. + pub value: Option, +} + +impl Part for Point {} + + +/// A Distribution may optionally contain a histogram of the values in the population. The histogram is given in `bucket_counts` as counts of values that fall into one of a sequence of non-overlapping buckets. The sequence of buckets is described by `bucket_options`. A bucket specifies an inclusive lower bound and exclusive upper bound for the values that are counted for that bucket. The upper bound of a bucket is strictly greater than the lower bound. The sequence of N buckets for a Distribution consists of an underflow bucket (number 0), zero or more finite buckets (number 1 through N - 2) and an overflow bucket (number N - 1). The buckets are contiguous: the lower bound of bucket i (i > 0) is the same as the upper bound of bucket i - 1. The buckets span the whole range of finite values: lower bound of the underflow bucket is -infinity and the upper bound of the overflow bucket is +infinity. The finite buckets are so-called because both bounds are finite. `BucketOptions` describes bucket boundaries in one of three ways. Two describe the boundaries by giving parameters for a formula to generate boundaries and one gives the bucket boundaries explicitly. If `bucket_boundaries` is not given, then no `bucket_counts` may be given. +/// +/// This type is not used in any activity, and only used as *part* of another schema. +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct BucketOptions { + /// The exponential buckets. + #[serde(rename="exponentialBuckets")] + pub exponential_buckets: Option, + /// The linear bucket. + #[serde(rename="linearBuckets")] + pub linear_buckets: Option, + /// The explicit buckets. + #[serde(rename="explicitBuckets")] + pub explicit_buckets: Option, +} + +impl Part for BucketOptions {} + + +/// The `ListGroups` response. +/// +/// # Activities +/// +/// This type is used in activities, which are methods you may call on this type or where this type is involved in. +/// The list links the activity name, along with information about where it is used (one of *request* and *response*). +/// +/// * [groups list projects](struct.ProjectGroupListCall.html) (response) +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct ListGroupsResponse { + /// If there are more results than have been returned, then this field is set to a non-empty value. To see the additional results, use that value as `pageToken` in the next call to this method. + #[serde(rename="nextPageToken")] + pub next_page_token: Option, + /// The groups that match the specified filters. + pub group: Option>, +} + +impl ResponseResult for ListGroupsResponse {} + + +/// The `ListMonitoredResourcDescriptors` response. +/// +/// # Activities +/// +/// This type is used in activities, which are methods you may call on this type or where this type is involved in. +/// The list links the activity name, along with information about where it is used (one of *request* and *response*). +/// +/// * [monitored resource descriptors list projects](struct.ProjectMonitoredResourceDescriptorListCall.html) (response) +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct ListMonitoredResourceDescriptorsResponse { + /// If there are more results than have been returned, then this field is set to a non-empty value. To see the additional results, use that value as `pageToken` in the next call to this method. + #[serde(rename="nextPageToken")] + pub next_page_token: Option, + /// The monitored resource descriptors that are available to this project and that match `filter`, if present. + #[serde(rename="resourceDescriptors")] + pub resource_descriptors: Option>, +} + +impl ResponseResult for ListMonitoredResourceDescriptorsResponse {} + + +/// A description of a label. +/// +/// This type is not used in any activity, and only used as *part* of another schema. +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct LabelDescriptor { + /// The type of data that can be assigned to the label. + #[serde(rename="valueType")] + pub value_type: Option, + /// A human-readable description for the label. + pub description: Option, + /// The label key. + pub key: Option, +} + +impl Part for LabelDescriptor {} + + +/// The `CreateCollectdTimeSeries` request. +/// +/// # Activities +/// +/// This type is used in activities, which are methods you may call on this type or where this type is involved in. +/// The list links the activity name, along with information about where it is used (one of *request* and *response*). +/// +/// * [collectd time series create projects](struct.ProjectCollectdTimeSeryCreateCall.html) (request) +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct CreateCollectdTimeSeriesRequest { + /// The `collectd` payloads representing the time series data. You must not include more than a single point for each time series, so no two payloads can have the same values for all of the fields `plugin`, `plugin_instance`, `type`, and `type_instance`. + #[serde(rename="collectdPayloads")] + pub collectd_payloads: Option>, + /// The monitored resource associated with the time series. + pub resource: Option, + /// The version of `collectd` that collected the data. Example: `"5.3.0-192.el6"`. + #[serde(rename="collectdVersion")] + pub collectd_version: Option, +} + +impl RequestValue for CreateCollectdTimeSeriesRequest {} + + +/// The `CreateTimeSeries` request. +/// +/// # Activities +/// +/// This type is used in activities, which are methods you may call on this type or where this type is involved in. +/// The list links the activity name, along with information about where it is used (one of *request* and *response*). +/// +/// * [time series create projects](struct.ProjectTimeSeryCreateCall.html) (request) +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct CreateTimeSeriesRequest { + /// The new data to be added to a list of time series. Adds at most one data point to each of several time series. The new data point must be more recent than any other point in its time series. Each `TimeSeries` value must fully specify a unique time series by supplying all label values for the metric and the monitored resource. + #[serde(rename="timeSeries")] + pub time_series: Option>, +} + +impl RequestValue for CreateTimeSeriesRequest {} + + +/// An object that describes the schema of a MonitoredResource object using a type name and a set of labels. For example, the monitored resource descriptor for Google Compute Engine VM instances has a type of `"gce_instance"` and specifies the use of the labels `"instance_id"` and `"zone"` to identify particular VM instances. Different APIs can support different monitored resource types. APIs generally provide a `list` method that returns the monitored resource descriptors used by the API. +/// +/// # Activities +/// +/// This type is used in activities, which are methods you may call on this type or where this type is involved in. +/// The list links the activity name, along with information about where it is used (one of *request* and *response*). +/// +/// * [monitored resource descriptors get projects](struct.ProjectMonitoredResourceDescriptorGetCall.html) (response) +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct MonitoredResourceDescriptor { + /// Required. The monitored resource type. For example, the type `"cloudsql_database"` represents databases in Google Cloud SQL. + #[serde(rename="type")] + pub type_: Option, + /// Required. A set of labels used to describe instances of this monitored resource type. For example, an individual Google Cloud SQL database is identified by values for the labels `"database_id"` and `"zone"`. + pub labels: Option>, + /// Optional. A concise name for the monitored resource type that might be displayed in user interfaces. For example, `"Google Cloud SQL Database"`. + #[serde(rename="displayName")] + pub display_name: Option, + /// Optional. The resource name of the monitored resource descriptor: `"projects/{project_id}/monitoredResourceDescriptors/{type}"` where {type} is the value of the `type` field in this object and {project_id} is a project ID that provides API-specific context for accessing the type. APIs that do not use project information can use the resource name format `"monitoredResourceDescriptors/{type}"`. + pub name: Option, + /// Optional. A detailed description of the monitored resource type that might be used in documentation. + pub description: Option, +} + +impl ResponseResult for MonitoredResourceDescriptor {} + + + +// ################### +// MethodBuilders ### +// ################# + +/// A builder providing access to all methods supported on *project* resources. +/// It is not used directly, but through the `Monitoring` hub. +/// +/// # Example +/// +/// Instantiate a resource builder +/// +/// ```test_harness,no_run +/// extern crate hyper; +/// extern crate yup_oauth2 as oauth2; +/// extern crate google_monitoring3 as monitoring3; +/// +/// # #[test] fn egal() { +/// use std::default::Default; +/// use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; +/// use monitoring3::Monitoring; +/// +/// let secret: ApplicationSecret = Default::default(); +/// let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, +/// hyper::Client::new(), +/// ::default(), None); +/// let mut hub = Monitoring::new(hyper::Client::new(), auth); +/// // Usually you wouldn't bind this to a variable, but keep calling *CallBuilders* +/// // like `collectd_time_series_create(...)`, `groups_create(...)`, `groups_delete(...)`, `groups_get(...)`, `groups_list(...)`, `groups_members_list(...)`, `groups_update(...)`, `metric_descriptors_create(...)`, `metric_descriptors_delete(...)`, `metric_descriptors_get(...)`, `metric_descriptors_list(...)`, `monitored_resource_descriptors_get(...)`, `monitored_resource_descriptors_list(...)`, `time_series_create(...)` and `time_series_list(...)` +/// // to build up your call. +/// let rb = hub.projects(); +/// # } +/// ``` +pub struct ProjectMethods<'a, C, A> + where C: 'a, A: 'a { + + hub: &'a Monitoring, +} + +impl<'a, C, A> MethodsBuilder for ProjectMethods<'a, C, A> {} + +impl<'a, C, A> ProjectMethods<'a, C, A> { + + /// Create a builder to help you perform the following task: + /// + /// Gets a single metric descriptor. + /// + /// # Arguments + /// + /// * `name` - The metric descriptor on which to execute the request. The format is `"projects/{project_id_or_number}/metricDescriptors/{metric_id}"`. An example value of `{metric_id}` is `"compute.googleapis.com/instance/disk/read_bytes_count"`. + pub fn metric_descriptors_get(&self, name: &str) -> ProjectMetricDescriptorGetCall<'a, C, A> { + ProjectMetricDescriptorGetCall { + hub: self.hub, + _name: name.to_string(), + _delegate: Default::default(), + _scopes: Default::default(), + _additional_params: Default::default(), + } + } + + /// Create a builder to help you perform the following task: + /// + /// Creates a new group. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `name` - The project in which to create the group. The format is `"projects/{project_id_or_number}"`. + pub fn groups_create(&self, request: Group, name: &str) -> ProjectGroupCreateCall<'a, C, A> { + ProjectGroupCreateCall { + hub: self.hub, + _request: request, + _name: name.to_string(), + _validate_only: Default::default(), + _delegate: Default::default(), + _scopes: Default::default(), + _additional_params: Default::default(), + } + } + + /// Create a builder to help you perform the following task: + /// + /// Gets a single group. + /// + /// # Arguments + /// + /// * `name` - The group to retrieve. The format is `"projects/{project_id_or_number}/groups/{group_id}"`. + pub fn groups_get(&self, name: &str) -> ProjectGroupGetCall<'a, C, A> { + ProjectGroupGetCall { + hub: self.hub, + _name: name.to_string(), + _delegate: Default::default(), + _scopes: Default::default(), + _additional_params: Default::default(), + } + } + + /// Create a builder to help you perform the following task: + /// + /// Deletes a metric descriptor. Only user-created [custom metrics](/monitoring/custom-metrics) can be deleted. + /// + /// # Arguments + /// + /// * `name` - The metric descriptor on which to execute the request. The format is `"projects/{project_id_or_number}/metricDescriptors/{metric_id}"`. An example of `{metric_id}` is: `"custom.googleapis.com/my_test_metric"`. + pub fn metric_descriptors_delete(&self, name: &str) -> ProjectMetricDescriptorDeleteCall<'a, C, A> { + ProjectMetricDescriptorDeleteCall { + hub: self.hub, + _name: name.to_string(), + _delegate: Default::default(), + _scopes: Default::default(), + _additional_params: Default::default(), + } + } + + /// Create a builder to help you perform the following task: + /// + /// Creates a new time series with the given data points. This method is only for use in `collectd`-related code, including the Google Monitoring Agent. See [google.monitoring.v3.MetricService.CreateTimeSeries] instead. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `name` - The project in which to create the time series. The format is `"projects/PROJECT_ID_OR_NUMBER"`. + pub fn collectd_time_series_create(&self, request: CreateCollectdTimeSeriesRequest, name: &str) -> ProjectCollectdTimeSeryCreateCall<'a, C, A> { + ProjectCollectdTimeSeryCreateCall { + hub: self.hub, + _request: request, + _name: name.to_string(), + _delegate: Default::default(), + _scopes: Default::default(), + _additional_params: Default::default(), + } + } + + /// Create a builder to help you perform the following task: + /// + /// Lists the monitored resources that are members of a group. + /// + /// # Arguments + /// + /// * `name` - The group whose members are listed. The format is `"projects/{project_id_or_number}/groups/{group_id}"`. + pub fn groups_members_list(&self, name: &str) -> ProjectGroupMemberListCall<'a, C, A> { + ProjectGroupMemberListCall { + hub: self.hub, + _name: name.to_string(), + _page_token: Default::default(), + _page_size: Default::default(), + _interval_start_time: Default::default(), + _interval_end_time: Default::default(), + _filter: Default::default(), + _delegate: Default::default(), + _scopes: Default::default(), + _additional_params: Default::default(), + } + } + + /// Create a builder to help you perform the following task: + /// + /// Lists monitored resource descriptors that match a filter. + /// + /// # Arguments + /// + /// * `name` - The project on which to execute the request. The format is `"projects/{project_id_or_number}"`. + pub fn monitored_resource_descriptors_list(&self, name: &str) -> ProjectMonitoredResourceDescriptorListCall<'a, C, A> { + ProjectMonitoredResourceDescriptorListCall { + hub: self.hub, + _name: name.to_string(), + _page_token: Default::default(), + _page_size: Default::default(), + _filter: Default::default(), + _delegate: Default::default(), + _scopes: Default::default(), + _additional_params: Default::default(), + } + } + + /// Create a builder to help you perform the following task: + /// + /// Creates or adds data to one or more time series. The response is empty if all time series in the request were written. If any time series could not be written, a corresponding failure message is included in the error response. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `name` - The project on which to execute the request. The format is `"projects/{project_id_or_number}"`. + pub fn time_series_create(&self, request: CreateTimeSeriesRequest, name: &str) -> ProjectTimeSeryCreateCall<'a, C, A> { + ProjectTimeSeryCreateCall { + hub: self.hub, + _request: request, + _name: name.to_string(), + _delegate: Default::default(), + _scopes: Default::default(), + _additional_params: Default::default(), + } + } + + /// Create a builder to help you perform the following task: + /// + /// Creates a new metric descriptor. User-created metric descriptors define [custom metrics](/monitoring/custom-metrics). + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `name` - The project on which to execute the request. The format is `"projects/{project_id_or_number}"`. + pub fn metric_descriptors_create(&self, request: MetricDescriptor, name: &str) -> ProjectMetricDescriptorCreateCall<'a, C, A> { + ProjectMetricDescriptorCreateCall { + hub: self.hub, + _request: request, + _name: name.to_string(), + _delegate: Default::default(), + _scopes: Default::default(), + _additional_params: Default::default(), + } + } + + /// Create a builder to help you perform the following task: + /// + /// Lists the existing groups. + /// + /// # Arguments + /// + /// * `name` - The project whose groups are to be listed. The format is `"projects/{project_id_or_number}"`. + pub fn groups_list(&self, name: &str) -> ProjectGroupListCall<'a, C, A> { + ProjectGroupListCall { + hub: self.hub, + _name: name.to_string(), + _page_token: Default::default(), + _page_size: Default::default(), + _descendants_of_group: Default::default(), + _children_of_group: Default::default(), + _ancestors_of_group: Default::default(), + _delegate: Default::default(), + _scopes: Default::default(), + _additional_params: Default::default(), + } + } + + /// Create a builder to help you perform the following task: + /// + /// Lists metric descriptors that match a filter. + /// + /// # Arguments + /// + /// * `name` - The project on which to execute the request. The format is `"projects/{project_id_or_number}"`. + pub fn metric_descriptors_list(&self, name: &str) -> ProjectMetricDescriptorListCall<'a, C, A> { + ProjectMetricDescriptorListCall { + hub: self.hub, + _name: name.to_string(), + _page_token: Default::default(), + _page_size: Default::default(), + _filter: Default::default(), + _delegate: Default::default(), + _scopes: Default::default(), + _additional_params: Default::default(), + } + } + + /// Create a builder to help you perform the following task: + /// + /// Gets a single monitored resource descriptor. + /// + /// # Arguments + /// + /// * `name` - The monitored resource descriptor to get. The format is `"projects/{project_id_or_number}/monitoredResourceDescriptors/{resource_type}"`. The `{resource_type}` is a predefined type, such as `cloudsql_database`. + pub fn monitored_resource_descriptors_get(&self, name: &str) -> ProjectMonitoredResourceDescriptorGetCall<'a, C, A> { + ProjectMonitoredResourceDescriptorGetCall { + hub: self.hub, + _name: name.to_string(), + _delegate: Default::default(), + _scopes: Default::default(), + _additional_params: Default::default(), + } + } + + /// Create a builder to help you perform the following task: + /// + /// Updates an existing group. You can change any group attributes except `name`. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `name` - The name of this group. The format is `"projects/{project_id_or_number}/groups/{group_id}"`. When creating a group, this field is ignored and a new name is created consisting of the project specified in the call to `CreateGroup` and a unique `{group_id}` that is generated automatically. @OutputOnly + pub fn groups_update(&self, request: Group, name: &str) -> ProjectGroupUpdateCall<'a, C, A> { + ProjectGroupUpdateCall { + hub: self.hub, + _request: request, + _name: name.to_string(), + _validate_only: Default::default(), + _delegate: Default::default(), + _scopes: Default::default(), + _additional_params: Default::default(), + } + } + + /// Create a builder to help you perform the following task: + /// + /// Deletes an existing group. + /// + /// # Arguments + /// + /// * `name` - The group to delete. The format is `"projects/{project_id_or_number}/groups/{group_id}"`. + pub fn groups_delete(&self, name: &str) -> ProjectGroupDeleteCall<'a, C, A> { + ProjectGroupDeleteCall { + hub: self.hub, + _name: name.to_string(), + _delegate: Default::default(), + _scopes: Default::default(), + _additional_params: Default::default(), + } + } + + /// Create a builder to help you perform the following task: + /// + /// Lists time series that match a filter. + /// + /// # Arguments + /// + /// * `name` - The project on which to execute the request. The format is "projects/{project_id_or_number}". + pub fn time_series_list(&self, name: &str) -> ProjectTimeSeryListCall<'a, C, A> { + ProjectTimeSeryListCall { + hub: self.hub, + _name: name.to_string(), + _view: Default::default(), + _page_token: Default::default(), + _page_size: Default::default(), + _order_by: Default::default(), + _interval_start_time: Default::default(), + _interval_end_time: Default::default(), + _filter: Default::default(), + _aggregation_per_series_aligner: Default::default(), + _aggregation_group_by_fields: Default::default(), + _aggregation_cross_series_reducer: Default::default(), + _aggregation_alignment_period: Default::default(), + _delegate: Default::default(), + _scopes: Default::default(), + _additional_params: Default::default(), + } + } +} + + + + + +// ################### +// CallBuilders ### +// ################# + +/// Gets a single metric descriptor. +/// +/// A builder for the *metricDescriptors.get* method supported by a *project* resource. +/// It is not used directly, but through a `ProjectMethods` instance. +/// +/// # Example +/// +/// Instantiate a resource method builder +/// +/// ```test_harness,no_run +/// # extern crate hyper; +/// # extern crate yup_oauth2 as oauth2; +/// # extern crate google_monitoring3 as monitoring3; +/// # #[test] fn egal() { +/// # use std::default::Default; +/// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; +/// # use monitoring3::Monitoring; +/// +/// # let secret: ApplicationSecret = Default::default(); +/// # let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, +/// # hyper::Client::new(), +/// # ::default(), None); +/// # let mut hub = Monitoring::new(hyper::Client::new(), auth); +/// // You can configure optional parameters by calling the respective setters at will, and +/// // execute the final call using `doit()`. +/// // Values shown here are possibly random and not representative ! +/// let result = hub.projects().metric_descriptors_get("name") +/// .doit(); +/// # } +/// ``` +pub struct ProjectMetricDescriptorGetCall<'a, C, A> + where C: 'a, A: 'a { + + hub: &'a Monitoring, + _name: String, + _delegate: Option<&'a mut Delegate>, + _additional_params: HashMap, + _scopes: BTreeMap +} + +impl<'a, C, A> CallBuilder for ProjectMetricDescriptorGetCall<'a, C, A> {} + +impl<'a, C, A> ProjectMetricDescriptorGetCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { + + + /// Perform the operation you have build so far. + pub fn doit(mut self) -> Result<(hyper::client::Response, MetricDescriptor)> { + use url::percent_encoding::{percent_encode, FORM_URLENCODED_ENCODE_SET}; + use std::io::{Read, Seek}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; + let mut dd = DefaultDelegate; + let mut dlg: &mut Delegate = match self._delegate { + Some(d) => d, + None => &mut dd + }; + dlg.begin(MethodInfo { id: "monitoring.projects.metricDescriptors.get", + http_method: hyper::method::Method::Get }); + let mut params: Vec<(&str, String)> = Vec::with_capacity((3 + self._additional_params.len())); + params.push(("name", self._name.to_string())); + for &field in ["alt", "name"].iter() { + if self._additional_params.contains_key(field) { + dlg.finished(false); + return Err(Error::FieldClash(field)); + } + } + for (name, value) in self._additional_params.iter() { + params.push((&name, value.clone())); + } + + params.push(("alt", "json".to_string())); + + let mut url = "https://monitoring.googleapis.com/v3/{+name}".to_string(); + if self._scopes.len() == 0 { + self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); + } + + for &(find_this, param_name) in [("{+name}", "name")].iter() { + let mut replace_with = String::new(); + for &(name, ref value) in params.iter() { + if name == param_name { + replace_with = value.to_string(); + break; + } + } + if find_this.as_bytes()[1] == '+' as u8 { + replace_with = percent_encode(replace_with.as_bytes(), FORM_URLENCODED_ENCODE_SET); + } + url = url.replace(find_this, &replace_with); + } + { + let mut indices_for_removal: Vec = Vec::with_capacity(1); + for param_name in ["name"].iter() { + if let Some(index) = params.iter().position(|t| &t.0 == param_name) { + indices_for_removal.push(index); + } + } + for &index in indices_for_removal.iter() { + params.remove(index); + } + } + + if params.len() > 0 { + url.push('?'); + url.push_str(&url::form_urlencoded::serialize(params)); + } + + + + loop { + let token = match self.hub.auth.borrow_mut().token(self._scopes.keys()) { + Ok(token) => token, + Err(err) => { + match dlg.token(&*err) { + Some(token) => token, + None => { + dlg.finished(false); + return Err(Error::MissingToken(err)) + } + } + } + }; + let auth_header = Authorization(Bearer { token: token.access_token }); + let mut req_result = { + let mut client = &mut *self.hub.client.borrow_mut(); + let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) + .header(UserAgent(self.hub._user_agent.clone())) + .header(auth_header.clone()); + + dlg.pre_request(); + req.send() + }; + + match req_result { + Err(err) => { + if let oauth2::Retry::After(d) = dlg.http_error(&err) { + sleep(d); + continue; + } + dlg.finished(false); + return Err(Error::HttpError(err)) + } + Ok(mut res) => { + if !res.status.is_success() { + let mut json_err = String::new(); + res.read_to_string(&mut json_err).unwrap(); + if let oauth2::Retry::After(d) = dlg.http_failure(&res, + json::from_str(&json_err).ok(), + json::from_str(&json_err).ok()) { + sleep(d); + continue; + } + dlg.finished(false); + return match json::from_str::(&json_err){ + Err(_) => Err(Error::Failure(res)), + Ok(serr) => Err(Error::BadRequest(serr)) + } + } + let result_value = { + let mut json_response = String::new(); + res.read_to_string(&mut json_response).unwrap(); + match json::from_str(&json_response) { + Ok(decoded) => (res, decoded), + Err(err) => { + dlg.response_json_decode_error(&json_response, &err); + return Err(Error::JsonDecodeError(json_response, err)); + } + } + }; + + dlg.finished(true); + return Ok(result_value) + } + } + } + } + + + /// The metric descriptor on which to execute the request. The format is `"projects/{project_id_or_number}/metricDescriptors/{metric_id}"`. An example value of `{metric_id}` is `"compute.googleapis.com/instance/disk/read_bytes_count"`. + /// + /// Sets the *name* path property to the given value. + /// + /// Even though the property as already been set when instantiating this call, + /// we provide this method for API completeness. + pub fn name(mut self, new_value: &str) -> ProjectMetricDescriptorGetCall<'a, C, A> { + self._name = new_value.to_string(); + self + } + /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong + /// while executing the actual API request. + /// + /// It should be used to handle progress information, and to implement a certain level of resilience. + /// + /// Sets the *delegate* property to the given value. + pub fn delegate(mut self, new_value: &'a mut Delegate) -> ProjectMetricDescriptorGetCall<'a, C, A> { + self._delegate = Some(new_value); + self + } + + /// Set any additional parameter of the query string used in the request. + /// It should be used to set parameters which are not yet available through their own + /// setters. + /// + /// Please note that this method must not be used to set any of the known paramters + /// which have their own setter method. If done anyway, the request will fail. + /// + /// # Additional Parameters + /// + /// * *bearer_token* (query-string) - OAuth bearer token. + /// * *pp* (query-boolean) - Pretty-print response. + /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. + /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). + /// * *access_token* (query-string) - OAuth access token. + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *quotaUser* (query-string) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + /// * *callback* (query-string) - JSONP + /// * *oauth_token* (query-string) - OAuth 2.0 token for the current user. + /// * *key* (query-string) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. + /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). + /// * *alt* (query-string) - Data format for response. + /// * *$.xgafv* (query-string) - V1 error format. + pub fn param(mut self, name: T, value: T) -> ProjectMetricDescriptorGetCall<'a, C, A> + where T: AsRef { + self._additional_params.insert(name.as_ref().to_string(), value.as_ref().to_string()); + self + } + + /// Identifies the authorization scope for the method you are building. + /// + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::CloudPlatform`. + /// + /// The `scope` will be added to a set of scopes. This is important as one can maintain access + /// tokens for more than one scope. + /// + /// Usually there is more than one suitable scope to authorize an operation, some of which may + /// encompass more rights than others. For example, for listing resources, a *read-only* scope will be + /// sufficient, a read-write scope will do as well. + pub fn add_scope(mut self, scope: T) -> ProjectMetricDescriptorGetCall<'a, C, A> + where T: AsRef { + self._scopes.insert(scope.as_ref().to_string(), ()); + self + } +} + + +/// Creates a new group. +/// +/// A builder for the *groups.create* method supported by a *project* resource. +/// It is not used directly, but through a `ProjectMethods` instance. +/// +/// # Example +/// +/// Instantiate a resource method builder +/// +/// ```test_harness,no_run +/// # extern crate hyper; +/// # extern crate yup_oauth2 as oauth2; +/// # extern crate google_monitoring3 as monitoring3; +/// use monitoring3::Group; +/// # #[test] fn egal() { +/// # use std::default::Default; +/// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; +/// # use monitoring3::Monitoring; +/// +/// # let secret: ApplicationSecret = Default::default(); +/// # let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, +/// # hyper::Client::new(), +/// # ::default(), None); +/// # let mut hub = Monitoring::new(hyper::Client::new(), auth); +/// // As the method needs a request, you would usually fill it with the desired information +/// // into the respective structure. Some of the parts shown here might not be applicable ! +/// // Values shown here are possibly random and not representative ! +/// let mut req = Group::default(); +/// +/// // You can configure optional parameters by calling the respective setters at will, and +/// // execute the final call using `doit()`. +/// // Values shown here are possibly random and not representative ! +/// let result = hub.projects().groups_create(req, "name") +/// .validate_only(false) +/// .doit(); +/// # } +/// ``` +pub struct ProjectGroupCreateCall<'a, C, A> + where C: 'a, A: 'a { + + hub: &'a Monitoring, + _request: Group, + _name: String, + _validate_only: Option, + _delegate: Option<&'a mut Delegate>, + _additional_params: HashMap, + _scopes: BTreeMap +} + +impl<'a, C, A> CallBuilder for ProjectGroupCreateCall<'a, C, A> {} + +impl<'a, C, A> ProjectGroupCreateCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { + + + /// Perform the operation you have build so far. + pub fn doit(mut self) -> Result<(hyper::client::Response, Group)> { + use url::percent_encoding::{percent_encode, FORM_URLENCODED_ENCODE_SET}; + use std::io::{Read, Seek}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; + let mut dd = DefaultDelegate; + let mut dlg: &mut Delegate = match self._delegate { + Some(d) => d, + None => &mut dd + }; + dlg.begin(MethodInfo { id: "monitoring.projects.groups.create", + http_method: hyper::method::Method::Post }); + let mut params: Vec<(&str, String)> = Vec::with_capacity((5 + self._additional_params.len())); + params.push(("name", self._name.to_string())); + if let Some(value) = self._validate_only { + params.push(("validateOnly", value.to_string())); + } + for &field in ["alt", "name", "validateOnly"].iter() { + if self._additional_params.contains_key(field) { + dlg.finished(false); + return Err(Error::FieldClash(field)); + } + } + for (name, value) in self._additional_params.iter() { + params.push((&name, value.clone())); + } + + params.push(("alt", "json".to_string())); + + let mut url = "https://monitoring.googleapis.com/v3/{+name}/groups".to_string(); + if self._scopes.len() == 0 { + self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); + } + + for &(find_this, param_name) in [("{+name}", "name")].iter() { + let mut replace_with = String::new(); + for &(name, ref value) in params.iter() { + if name == param_name { + replace_with = value.to_string(); + break; + } + } + if find_this.as_bytes()[1] == '+' as u8 { + replace_with = percent_encode(replace_with.as_bytes(), FORM_URLENCODED_ENCODE_SET); + } + url = url.replace(find_this, &replace_with); + } + { + let mut indices_for_removal: Vec = Vec::with_capacity(1); + for param_name in ["name"].iter() { + if let Some(index) = params.iter().position(|t| &t.0 == param_name) { + indices_for_removal.push(index); + } + } + for &index in indices_for_removal.iter() { + params.remove(index); + } + } + + if params.len() > 0 { + url.push('?'); + url.push_str(&url::form_urlencoded::serialize(params)); + } + + let mut json_mime_type = mime::Mime(mime::TopLevel::Application, mime::SubLevel::Json, Default::default()); + let mut request_value_reader = + { + let mut value = json::value::to_value(&self._request); + remove_json_null_values(&mut value); + let mut dst = io::Cursor::new(Vec::with_capacity(128)); + json::to_writer(&mut dst, &value).unwrap(); + dst + }; + let request_size = request_value_reader.seek(io::SeekFrom::End(0)).unwrap(); + request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); + + + loop { + let token = match self.hub.auth.borrow_mut().token(self._scopes.keys()) { + Ok(token) => token, + Err(err) => { + match dlg.token(&*err) { + Some(token) => token, + None => { + dlg.finished(false); + return Err(Error::MissingToken(err)) + } + } + } + }; + let auth_header = Authorization(Bearer { token: token.access_token }); + request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); + let mut req_result = { + let mut client = &mut *self.hub.client.borrow_mut(); + let mut req = client.borrow_mut().request(hyper::method::Method::Post, &url) + .header(UserAgent(self.hub._user_agent.clone())) + .header(auth_header.clone()) + .header(ContentType(json_mime_type.clone())) + .header(ContentLength(request_size as u64)) + .body(&mut request_value_reader); + + dlg.pre_request(); + req.send() + }; + + match req_result { + Err(err) => { + if let oauth2::Retry::After(d) = dlg.http_error(&err) { + sleep(d); + continue; + } + dlg.finished(false); + return Err(Error::HttpError(err)) + } + Ok(mut res) => { + if !res.status.is_success() { + let mut json_err = String::new(); + res.read_to_string(&mut json_err).unwrap(); + if let oauth2::Retry::After(d) = dlg.http_failure(&res, + json::from_str(&json_err).ok(), + json::from_str(&json_err).ok()) { + sleep(d); + continue; + } + dlg.finished(false); + return match json::from_str::(&json_err){ + Err(_) => Err(Error::Failure(res)), + Ok(serr) => Err(Error::BadRequest(serr)) + } + } + let result_value = { + let mut json_response = String::new(); + res.read_to_string(&mut json_response).unwrap(); + match json::from_str(&json_response) { + Ok(decoded) => (res, decoded), + Err(err) => { + dlg.response_json_decode_error(&json_response, &err); + return Err(Error::JsonDecodeError(json_response, err)); + } + } + }; + + dlg.finished(true); + return Ok(result_value) + } + } + } + } + + + /// + /// Sets the *request* property to the given value. + /// + /// Even though the property as already been set when instantiating this call, + /// we provide this method for API completeness. + pub fn request(mut self, new_value: Group) -> ProjectGroupCreateCall<'a, C, A> { + self._request = new_value; + self + } + /// The project in which to create the group. The format is `"projects/{project_id_or_number}"`. + /// + /// Sets the *name* path property to the given value. + /// + /// Even though the property as already been set when instantiating this call, + /// we provide this method for API completeness. + pub fn name(mut self, new_value: &str) -> ProjectGroupCreateCall<'a, C, A> { + self._name = new_value.to_string(); + self + } + /// If true, validate this request but do not create the group. + /// + /// Sets the *validate only* query property to the given value. + pub fn validate_only(mut self, new_value: bool) -> ProjectGroupCreateCall<'a, C, A> { + self._validate_only = Some(new_value); + self + } + /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong + /// while executing the actual API request. + /// + /// It should be used to handle progress information, and to implement a certain level of resilience. + /// + /// Sets the *delegate* property to the given value. + pub fn delegate(mut self, new_value: &'a mut Delegate) -> ProjectGroupCreateCall<'a, C, A> { + self._delegate = Some(new_value); + self + } + + /// Set any additional parameter of the query string used in the request. + /// It should be used to set parameters which are not yet available through their own + /// setters. + /// + /// Please note that this method must not be used to set any of the known paramters + /// which have their own setter method. If done anyway, the request will fail. + /// + /// # Additional Parameters + /// + /// * *bearer_token* (query-string) - OAuth bearer token. + /// * *pp* (query-boolean) - Pretty-print response. + /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. + /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). + /// * *access_token* (query-string) - OAuth access token. + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *quotaUser* (query-string) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + /// * *callback* (query-string) - JSONP + /// * *oauth_token* (query-string) - OAuth 2.0 token for the current user. + /// * *key* (query-string) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. + /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). + /// * *alt* (query-string) - Data format for response. + /// * *$.xgafv* (query-string) - V1 error format. + pub fn param(mut self, name: T, value: T) -> ProjectGroupCreateCall<'a, C, A> + where T: AsRef { + self._additional_params.insert(name.as_ref().to_string(), value.as_ref().to_string()); + self + } + + /// Identifies the authorization scope for the method you are building. + /// + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::CloudPlatform`. + /// + /// The `scope` will be added to a set of scopes. This is important as one can maintain access + /// tokens for more than one scope. + /// + /// Usually there is more than one suitable scope to authorize an operation, some of which may + /// encompass more rights than others. For example, for listing resources, a *read-only* scope will be + /// sufficient, a read-write scope will do as well. + pub fn add_scope(mut self, scope: T) -> ProjectGroupCreateCall<'a, C, A> + where T: AsRef { + self._scopes.insert(scope.as_ref().to_string(), ()); + self + } +} + + +/// Gets a single group. +/// +/// A builder for the *groups.get* method supported by a *project* resource. +/// It is not used directly, but through a `ProjectMethods` instance. +/// +/// # Example +/// +/// Instantiate a resource method builder +/// +/// ```test_harness,no_run +/// # extern crate hyper; +/// # extern crate yup_oauth2 as oauth2; +/// # extern crate google_monitoring3 as monitoring3; +/// # #[test] fn egal() { +/// # use std::default::Default; +/// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; +/// # use monitoring3::Monitoring; +/// +/// # let secret: ApplicationSecret = Default::default(); +/// # let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, +/// # hyper::Client::new(), +/// # ::default(), None); +/// # let mut hub = Monitoring::new(hyper::Client::new(), auth); +/// // You can configure optional parameters by calling the respective setters at will, and +/// // execute the final call using `doit()`. +/// // Values shown here are possibly random and not representative ! +/// let result = hub.projects().groups_get("name") +/// .doit(); +/// # } +/// ``` +pub struct ProjectGroupGetCall<'a, C, A> + where C: 'a, A: 'a { + + hub: &'a Monitoring, + _name: String, + _delegate: Option<&'a mut Delegate>, + _additional_params: HashMap, + _scopes: BTreeMap +} + +impl<'a, C, A> CallBuilder for ProjectGroupGetCall<'a, C, A> {} + +impl<'a, C, A> ProjectGroupGetCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { + + + /// Perform the operation you have build so far. + pub fn doit(mut self) -> Result<(hyper::client::Response, Group)> { + use url::percent_encoding::{percent_encode, FORM_URLENCODED_ENCODE_SET}; + use std::io::{Read, Seek}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; + let mut dd = DefaultDelegate; + let mut dlg: &mut Delegate = match self._delegate { + Some(d) => d, + None => &mut dd + }; + dlg.begin(MethodInfo { id: "monitoring.projects.groups.get", + http_method: hyper::method::Method::Get }); + let mut params: Vec<(&str, String)> = Vec::with_capacity((3 + self._additional_params.len())); + params.push(("name", self._name.to_string())); + for &field in ["alt", "name"].iter() { + if self._additional_params.contains_key(field) { + dlg.finished(false); + return Err(Error::FieldClash(field)); + } + } + for (name, value) in self._additional_params.iter() { + params.push((&name, value.clone())); + } + + params.push(("alt", "json".to_string())); + + let mut url = "https://monitoring.googleapis.com/v3/{+name}".to_string(); + if self._scopes.len() == 0 { + self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); + } + + for &(find_this, param_name) in [("{+name}", "name")].iter() { + let mut replace_with = String::new(); + for &(name, ref value) in params.iter() { + if name == param_name { + replace_with = value.to_string(); + break; + } + } + if find_this.as_bytes()[1] == '+' as u8 { + replace_with = percent_encode(replace_with.as_bytes(), FORM_URLENCODED_ENCODE_SET); + } + url = url.replace(find_this, &replace_with); + } + { + let mut indices_for_removal: Vec = Vec::with_capacity(1); + for param_name in ["name"].iter() { + if let Some(index) = params.iter().position(|t| &t.0 == param_name) { + indices_for_removal.push(index); + } + } + for &index in indices_for_removal.iter() { + params.remove(index); + } + } + + if params.len() > 0 { + url.push('?'); + url.push_str(&url::form_urlencoded::serialize(params)); + } + + + + loop { + let token = match self.hub.auth.borrow_mut().token(self._scopes.keys()) { + Ok(token) => token, + Err(err) => { + match dlg.token(&*err) { + Some(token) => token, + None => { + dlg.finished(false); + return Err(Error::MissingToken(err)) + } + } + } + }; + let auth_header = Authorization(Bearer { token: token.access_token }); + let mut req_result = { + let mut client = &mut *self.hub.client.borrow_mut(); + let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) + .header(UserAgent(self.hub._user_agent.clone())) + .header(auth_header.clone()); + + dlg.pre_request(); + req.send() + }; + + match req_result { + Err(err) => { + if let oauth2::Retry::After(d) = dlg.http_error(&err) { + sleep(d); + continue; + } + dlg.finished(false); + return Err(Error::HttpError(err)) + } + Ok(mut res) => { + if !res.status.is_success() { + let mut json_err = String::new(); + res.read_to_string(&mut json_err).unwrap(); + if let oauth2::Retry::After(d) = dlg.http_failure(&res, + json::from_str(&json_err).ok(), + json::from_str(&json_err).ok()) { + sleep(d); + continue; + } + dlg.finished(false); + return match json::from_str::(&json_err){ + Err(_) => Err(Error::Failure(res)), + Ok(serr) => Err(Error::BadRequest(serr)) + } + } + let result_value = { + let mut json_response = String::new(); + res.read_to_string(&mut json_response).unwrap(); + match json::from_str(&json_response) { + Ok(decoded) => (res, decoded), + Err(err) => { + dlg.response_json_decode_error(&json_response, &err); + return Err(Error::JsonDecodeError(json_response, err)); + } + } + }; + + dlg.finished(true); + return Ok(result_value) + } + } + } + } + + + /// The group to retrieve. The format is `"projects/{project_id_or_number}/groups/{group_id}"`. + /// + /// Sets the *name* path property to the given value. + /// + /// Even though the property as already been set when instantiating this call, + /// we provide this method for API completeness. + pub fn name(mut self, new_value: &str) -> ProjectGroupGetCall<'a, C, A> { + self._name = new_value.to_string(); + self + } + /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong + /// while executing the actual API request. + /// + /// It should be used to handle progress information, and to implement a certain level of resilience. + /// + /// Sets the *delegate* property to the given value. + pub fn delegate(mut self, new_value: &'a mut Delegate) -> ProjectGroupGetCall<'a, C, A> { + self._delegate = Some(new_value); + self + } + + /// Set any additional parameter of the query string used in the request. + /// It should be used to set parameters which are not yet available through their own + /// setters. + /// + /// Please note that this method must not be used to set any of the known paramters + /// which have their own setter method. If done anyway, the request will fail. + /// + /// # Additional Parameters + /// + /// * *bearer_token* (query-string) - OAuth bearer token. + /// * *pp* (query-boolean) - Pretty-print response. + /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. + /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). + /// * *access_token* (query-string) - OAuth access token. + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *quotaUser* (query-string) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + /// * *callback* (query-string) - JSONP + /// * *oauth_token* (query-string) - OAuth 2.0 token for the current user. + /// * *key* (query-string) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. + /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). + /// * *alt* (query-string) - Data format for response. + /// * *$.xgafv* (query-string) - V1 error format. + pub fn param(mut self, name: T, value: T) -> ProjectGroupGetCall<'a, C, A> + where T: AsRef { + self._additional_params.insert(name.as_ref().to_string(), value.as_ref().to_string()); + self + } + + /// Identifies the authorization scope for the method you are building. + /// + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::CloudPlatform`. + /// + /// The `scope` will be added to a set of scopes. This is important as one can maintain access + /// tokens for more than one scope. + /// + /// Usually there is more than one suitable scope to authorize an operation, some of which may + /// encompass more rights than others. For example, for listing resources, a *read-only* scope will be + /// sufficient, a read-write scope will do as well. + pub fn add_scope(mut self, scope: T) -> ProjectGroupGetCall<'a, C, A> + where T: AsRef { + self._scopes.insert(scope.as_ref().to_string(), ()); + self + } +} + + +/// Deletes a metric descriptor. Only user-created [custom metrics](/monitoring/custom-metrics) can be deleted. +/// +/// A builder for the *metricDescriptors.delete* method supported by a *project* resource. +/// It is not used directly, but through a `ProjectMethods` instance. +/// +/// # Example +/// +/// Instantiate a resource method builder +/// +/// ```test_harness,no_run +/// # extern crate hyper; +/// # extern crate yup_oauth2 as oauth2; +/// # extern crate google_monitoring3 as monitoring3; +/// # #[test] fn egal() { +/// # use std::default::Default; +/// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; +/// # use monitoring3::Monitoring; +/// +/// # let secret: ApplicationSecret = Default::default(); +/// # let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, +/// # hyper::Client::new(), +/// # ::default(), None); +/// # let mut hub = Monitoring::new(hyper::Client::new(), auth); +/// // You can configure optional parameters by calling the respective setters at will, and +/// // execute the final call using `doit()`. +/// // Values shown here are possibly random and not representative ! +/// let result = hub.projects().metric_descriptors_delete("name") +/// .doit(); +/// # } +/// ``` +pub struct ProjectMetricDescriptorDeleteCall<'a, C, A> + where C: 'a, A: 'a { + + hub: &'a Monitoring, + _name: String, + _delegate: Option<&'a mut Delegate>, + _additional_params: HashMap, + _scopes: BTreeMap +} + +impl<'a, C, A> CallBuilder for ProjectMetricDescriptorDeleteCall<'a, C, A> {} + +impl<'a, C, A> ProjectMetricDescriptorDeleteCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { + + + /// Perform the operation you have build so far. + pub fn doit(mut self) -> Result<(hyper::client::Response, Empty)> { + use url::percent_encoding::{percent_encode, FORM_URLENCODED_ENCODE_SET}; + use std::io::{Read, Seek}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; + let mut dd = DefaultDelegate; + let mut dlg: &mut Delegate = match self._delegate { + Some(d) => d, + None => &mut dd + }; + dlg.begin(MethodInfo { id: "monitoring.projects.metricDescriptors.delete", + http_method: hyper::method::Method::Delete }); + let mut params: Vec<(&str, String)> = Vec::with_capacity((3 + self._additional_params.len())); + params.push(("name", self._name.to_string())); + for &field in ["alt", "name"].iter() { + if self._additional_params.contains_key(field) { + dlg.finished(false); + return Err(Error::FieldClash(field)); + } + } + for (name, value) in self._additional_params.iter() { + params.push((&name, value.clone())); + } + + params.push(("alt", "json".to_string())); + + let mut url = "https://monitoring.googleapis.com/v3/{+name}".to_string(); + if self._scopes.len() == 0 { + self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); + } + + for &(find_this, param_name) in [("{+name}", "name")].iter() { + let mut replace_with = String::new(); + for &(name, ref value) in params.iter() { + if name == param_name { + replace_with = value.to_string(); + break; + } + } + if find_this.as_bytes()[1] == '+' as u8 { + replace_with = percent_encode(replace_with.as_bytes(), FORM_URLENCODED_ENCODE_SET); + } + url = url.replace(find_this, &replace_with); + } + { + let mut indices_for_removal: Vec = Vec::with_capacity(1); + for param_name in ["name"].iter() { + if let Some(index) = params.iter().position(|t| &t.0 == param_name) { + indices_for_removal.push(index); + } + } + for &index in indices_for_removal.iter() { + params.remove(index); + } + } + + if params.len() > 0 { + url.push('?'); + url.push_str(&url::form_urlencoded::serialize(params)); + } + + + + loop { + let token = match self.hub.auth.borrow_mut().token(self._scopes.keys()) { + Ok(token) => token, + Err(err) => { + match dlg.token(&*err) { + Some(token) => token, + None => { + dlg.finished(false); + return Err(Error::MissingToken(err)) + } + } + } + }; + let auth_header = Authorization(Bearer { token: token.access_token }); + let mut req_result = { + let mut client = &mut *self.hub.client.borrow_mut(); + let mut req = client.borrow_mut().request(hyper::method::Method::Delete, &url) + .header(UserAgent(self.hub._user_agent.clone())) + .header(auth_header.clone()); + + dlg.pre_request(); + req.send() + }; + + match req_result { + Err(err) => { + if let oauth2::Retry::After(d) = dlg.http_error(&err) { + sleep(d); + continue; + } + dlg.finished(false); + return Err(Error::HttpError(err)) + } + Ok(mut res) => { + if !res.status.is_success() { + let mut json_err = String::new(); + res.read_to_string(&mut json_err).unwrap(); + if let oauth2::Retry::After(d) = dlg.http_failure(&res, + json::from_str(&json_err).ok(), + json::from_str(&json_err).ok()) { + sleep(d); + continue; + } + dlg.finished(false); + return match json::from_str::(&json_err){ + Err(_) => Err(Error::Failure(res)), + Ok(serr) => Err(Error::BadRequest(serr)) + } + } + let result_value = { + let mut json_response = String::new(); + res.read_to_string(&mut json_response).unwrap(); + match json::from_str(&json_response) { + Ok(decoded) => (res, decoded), + Err(err) => { + dlg.response_json_decode_error(&json_response, &err); + return Err(Error::JsonDecodeError(json_response, err)); + } + } + }; + + dlg.finished(true); + return Ok(result_value) + } + } + } + } + + + /// The metric descriptor on which to execute the request. The format is `"projects/{project_id_or_number}/metricDescriptors/{metric_id}"`. An example of `{metric_id}` is: `"custom.googleapis.com/my_test_metric"`. + /// + /// Sets the *name* path property to the given value. + /// + /// Even though the property as already been set when instantiating this call, + /// we provide this method for API completeness. + pub fn name(mut self, new_value: &str) -> ProjectMetricDescriptorDeleteCall<'a, C, A> { + self._name = new_value.to_string(); + self + } + /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong + /// while executing the actual API request. + /// + /// It should be used to handle progress information, and to implement a certain level of resilience. + /// + /// Sets the *delegate* property to the given value. + pub fn delegate(mut self, new_value: &'a mut Delegate) -> ProjectMetricDescriptorDeleteCall<'a, C, A> { + self._delegate = Some(new_value); + self + } + + /// Set any additional parameter of the query string used in the request. + /// It should be used to set parameters which are not yet available through their own + /// setters. + /// + /// Please note that this method must not be used to set any of the known paramters + /// which have their own setter method. If done anyway, the request will fail. + /// + /// # Additional Parameters + /// + /// * *bearer_token* (query-string) - OAuth bearer token. + /// * *pp* (query-boolean) - Pretty-print response. + /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. + /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). + /// * *access_token* (query-string) - OAuth access token. + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *quotaUser* (query-string) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + /// * *callback* (query-string) - JSONP + /// * *oauth_token* (query-string) - OAuth 2.0 token for the current user. + /// * *key* (query-string) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. + /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). + /// * *alt* (query-string) - Data format for response. + /// * *$.xgafv* (query-string) - V1 error format. + pub fn param(mut self, name: T, value: T) -> ProjectMetricDescriptorDeleteCall<'a, C, A> + where T: AsRef { + self._additional_params.insert(name.as_ref().to_string(), value.as_ref().to_string()); + self + } + + /// Identifies the authorization scope for the method you are building. + /// + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::CloudPlatform`. + /// + /// The `scope` will be added to a set of scopes. This is important as one can maintain access + /// tokens for more than one scope. + /// + /// Usually there is more than one suitable scope to authorize an operation, some of which may + /// encompass more rights than others. For example, for listing resources, a *read-only* scope will be + /// sufficient, a read-write scope will do as well. + pub fn add_scope(mut self, scope: T) -> ProjectMetricDescriptorDeleteCall<'a, C, A> + where T: AsRef { + self._scopes.insert(scope.as_ref().to_string(), ()); + self + } +} + + +/// Creates a new time series with the given data points. This method is only for use in `collectd`-related code, including the Google Monitoring Agent. See [google.monitoring.v3.MetricService.CreateTimeSeries] instead. +/// +/// A builder for the *collectdTimeSeries.create* method supported by a *project* resource. +/// It is not used directly, but through a `ProjectMethods` instance. +/// +/// # Example +/// +/// Instantiate a resource method builder +/// +/// ```test_harness,no_run +/// # extern crate hyper; +/// # extern crate yup_oauth2 as oauth2; +/// # extern crate google_monitoring3 as monitoring3; +/// use monitoring3::CreateCollectdTimeSeriesRequest; +/// # #[test] fn egal() { +/// # use std::default::Default; +/// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; +/// # use monitoring3::Monitoring; +/// +/// # let secret: ApplicationSecret = Default::default(); +/// # let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, +/// # hyper::Client::new(), +/// # ::default(), None); +/// # let mut hub = Monitoring::new(hyper::Client::new(), auth); +/// // As the method needs a request, you would usually fill it with the desired information +/// // into the respective structure. Some of the parts shown here might not be applicable ! +/// // Values shown here are possibly random and not representative ! +/// let mut req = CreateCollectdTimeSeriesRequest::default(); +/// +/// // You can configure optional parameters by calling the respective setters at will, and +/// // execute the final call using `doit()`. +/// // Values shown here are possibly random and not representative ! +/// let result = hub.projects().collectd_time_series_create(req, "name") +/// .doit(); +/// # } +/// ``` +pub struct ProjectCollectdTimeSeryCreateCall<'a, C, A> + where C: 'a, A: 'a { + + hub: &'a Monitoring, + _request: CreateCollectdTimeSeriesRequest, + _name: String, + _delegate: Option<&'a mut Delegate>, + _additional_params: HashMap, + _scopes: BTreeMap +} + +impl<'a, C, A> CallBuilder for ProjectCollectdTimeSeryCreateCall<'a, C, A> {} + +impl<'a, C, A> ProjectCollectdTimeSeryCreateCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { + + + /// Perform the operation you have build so far. + pub fn doit(mut self) -> Result<(hyper::client::Response, Empty)> { + use url::percent_encoding::{percent_encode, FORM_URLENCODED_ENCODE_SET}; + use std::io::{Read, Seek}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; + let mut dd = DefaultDelegate; + let mut dlg: &mut Delegate = match self._delegate { + Some(d) => d, + None => &mut dd + }; + dlg.begin(MethodInfo { id: "monitoring.projects.collectdTimeSeries.create", + http_method: hyper::method::Method::Post }); + let mut params: Vec<(&str, String)> = Vec::with_capacity((4 + self._additional_params.len())); + params.push(("name", self._name.to_string())); + for &field in ["alt", "name"].iter() { + if self._additional_params.contains_key(field) { + dlg.finished(false); + return Err(Error::FieldClash(field)); + } + } + for (name, value) in self._additional_params.iter() { + params.push((&name, value.clone())); + } + + params.push(("alt", "json".to_string())); + + let mut url = "https://monitoring.googleapis.com/v3/{+name}/collectdTimeSeries".to_string(); + if self._scopes.len() == 0 { + self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); + } + + for &(find_this, param_name) in [("{+name}", "name")].iter() { + let mut replace_with = String::new(); + for &(name, ref value) in params.iter() { + if name == param_name { + replace_with = value.to_string(); + break; + } + } + if find_this.as_bytes()[1] == '+' as u8 { + replace_with = percent_encode(replace_with.as_bytes(), FORM_URLENCODED_ENCODE_SET); + } + url = url.replace(find_this, &replace_with); + } + { + let mut indices_for_removal: Vec = Vec::with_capacity(1); + for param_name in ["name"].iter() { + if let Some(index) = params.iter().position(|t| &t.0 == param_name) { + indices_for_removal.push(index); + } + } + for &index in indices_for_removal.iter() { + params.remove(index); + } + } + + if params.len() > 0 { + url.push('?'); + url.push_str(&url::form_urlencoded::serialize(params)); + } + + let mut json_mime_type = mime::Mime(mime::TopLevel::Application, mime::SubLevel::Json, Default::default()); + let mut request_value_reader = + { + let mut value = json::value::to_value(&self._request); + remove_json_null_values(&mut value); + let mut dst = io::Cursor::new(Vec::with_capacity(128)); + json::to_writer(&mut dst, &value).unwrap(); + dst + }; + let request_size = request_value_reader.seek(io::SeekFrom::End(0)).unwrap(); + request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); + + + loop { + let token = match self.hub.auth.borrow_mut().token(self._scopes.keys()) { + Ok(token) => token, + Err(err) => { + match dlg.token(&*err) { + Some(token) => token, + None => { + dlg.finished(false); + return Err(Error::MissingToken(err)) + } + } + } + }; + let auth_header = Authorization(Bearer { token: token.access_token }); + request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); + let mut req_result = { + let mut client = &mut *self.hub.client.borrow_mut(); + let mut req = client.borrow_mut().request(hyper::method::Method::Post, &url) + .header(UserAgent(self.hub._user_agent.clone())) + .header(auth_header.clone()) + .header(ContentType(json_mime_type.clone())) + .header(ContentLength(request_size as u64)) + .body(&mut request_value_reader); + + dlg.pre_request(); + req.send() + }; + + match req_result { + Err(err) => { + if let oauth2::Retry::After(d) = dlg.http_error(&err) { + sleep(d); + continue; + } + dlg.finished(false); + return Err(Error::HttpError(err)) + } + Ok(mut res) => { + if !res.status.is_success() { + let mut json_err = String::new(); + res.read_to_string(&mut json_err).unwrap(); + if let oauth2::Retry::After(d) = dlg.http_failure(&res, + json::from_str(&json_err).ok(), + json::from_str(&json_err).ok()) { + sleep(d); + continue; + } + dlg.finished(false); + return match json::from_str::(&json_err){ + Err(_) => Err(Error::Failure(res)), + Ok(serr) => Err(Error::BadRequest(serr)) + } + } + let result_value = { + let mut json_response = String::new(); + res.read_to_string(&mut json_response).unwrap(); + match json::from_str(&json_response) { + Ok(decoded) => (res, decoded), + Err(err) => { + dlg.response_json_decode_error(&json_response, &err); + return Err(Error::JsonDecodeError(json_response, err)); + } + } + }; + + dlg.finished(true); + return Ok(result_value) + } + } + } + } + + + /// + /// Sets the *request* property to the given value. + /// + /// Even though the property as already been set when instantiating this call, + /// we provide this method for API completeness. + pub fn request(mut self, new_value: CreateCollectdTimeSeriesRequest) -> ProjectCollectdTimeSeryCreateCall<'a, C, A> { + self._request = new_value; + self + } + /// The project in which to create the time series. The format is `"projects/PROJECT_ID_OR_NUMBER"`. + /// + /// Sets the *name* path property to the given value. + /// + /// Even though the property as already been set when instantiating this call, + /// we provide this method for API completeness. + pub fn name(mut self, new_value: &str) -> ProjectCollectdTimeSeryCreateCall<'a, C, A> { + self._name = new_value.to_string(); + self + } + /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong + /// while executing the actual API request. + /// + /// It should be used to handle progress information, and to implement a certain level of resilience. + /// + /// Sets the *delegate* property to the given value. + pub fn delegate(mut self, new_value: &'a mut Delegate) -> ProjectCollectdTimeSeryCreateCall<'a, C, A> { + self._delegate = Some(new_value); + self + } + + /// Set any additional parameter of the query string used in the request. + /// It should be used to set parameters which are not yet available through their own + /// setters. + /// + /// Please note that this method must not be used to set any of the known paramters + /// which have their own setter method. If done anyway, the request will fail. + /// + /// # Additional Parameters + /// + /// * *bearer_token* (query-string) - OAuth bearer token. + /// * *pp* (query-boolean) - Pretty-print response. + /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. + /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). + /// * *access_token* (query-string) - OAuth access token. + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *quotaUser* (query-string) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + /// * *callback* (query-string) - JSONP + /// * *oauth_token* (query-string) - OAuth 2.0 token for the current user. + /// * *key* (query-string) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. + /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). + /// * *alt* (query-string) - Data format for response. + /// * *$.xgafv* (query-string) - V1 error format. + pub fn param(mut self, name: T, value: T) -> ProjectCollectdTimeSeryCreateCall<'a, C, A> + where T: AsRef { + self._additional_params.insert(name.as_ref().to_string(), value.as_ref().to_string()); + self + } + + /// Identifies the authorization scope for the method you are building. + /// + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::CloudPlatform`. + /// + /// The `scope` will be added to a set of scopes. This is important as one can maintain access + /// tokens for more than one scope. + /// + /// Usually there is more than one suitable scope to authorize an operation, some of which may + /// encompass more rights than others. For example, for listing resources, a *read-only* scope will be + /// sufficient, a read-write scope will do as well. + pub fn add_scope(mut self, scope: T) -> ProjectCollectdTimeSeryCreateCall<'a, C, A> + where T: AsRef { + self._scopes.insert(scope.as_ref().to_string(), ()); + self + } +} + + +/// Lists the monitored resources that are members of a group. +/// +/// A builder for the *groups.members.list* method supported by a *project* resource. +/// It is not used directly, but through a `ProjectMethods` instance. +/// +/// # Example +/// +/// Instantiate a resource method builder +/// +/// ```test_harness,no_run +/// # extern crate hyper; +/// # extern crate yup_oauth2 as oauth2; +/// # extern crate google_monitoring3 as monitoring3; +/// # #[test] fn egal() { +/// # use std::default::Default; +/// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; +/// # use monitoring3::Monitoring; +/// +/// # let secret: ApplicationSecret = Default::default(); +/// # let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, +/// # hyper::Client::new(), +/// # ::default(), None); +/// # let mut hub = Monitoring::new(hyper::Client::new(), auth); +/// // You can configure optional parameters by calling the respective setters at will, and +/// // execute the final call using `doit()`. +/// // Values shown here are possibly random and not representative ! +/// let result = hub.projects().groups_members_list("name") +/// .page_token("justo") +/// .page_size(-1) +/// .interval_start_time("erat") +/// .interval_end_time("labore") +/// .filter("sea") +/// .doit(); +/// # } +/// ``` +pub struct ProjectGroupMemberListCall<'a, C, A> + where C: 'a, A: 'a { + + hub: &'a Monitoring, + _name: String, + _page_token: Option, + _page_size: Option, + _interval_start_time: Option, + _interval_end_time: Option, + _filter: Option, + _delegate: Option<&'a mut Delegate>, + _additional_params: HashMap, + _scopes: BTreeMap +} + +impl<'a, C, A> CallBuilder for ProjectGroupMemberListCall<'a, C, A> {} + +impl<'a, C, A> ProjectGroupMemberListCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { + + + /// Perform the operation you have build so far. + pub fn doit(mut self) -> Result<(hyper::client::Response, ListGroupMembersResponse)> { + use url::percent_encoding::{percent_encode, FORM_URLENCODED_ENCODE_SET}; + use std::io::{Read, Seek}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; + let mut dd = DefaultDelegate; + let mut dlg: &mut Delegate = match self._delegate { + Some(d) => d, + None => &mut dd + }; + dlg.begin(MethodInfo { id: "monitoring.projects.groups.members.list", + http_method: hyper::method::Method::Get }); + let mut params: Vec<(&str, String)> = Vec::with_capacity((8 + self._additional_params.len())); + params.push(("name", self._name.to_string())); + if let Some(value) = self._page_token { + params.push(("pageToken", value.to_string())); + } + if let Some(value) = self._page_size { + params.push(("pageSize", value.to_string())); + } + if let Some(value) = self._interval_start_time { + params.push(("interval.startTime", value.to_string())); + } + if let Some(value) = self._interval_end_time { + params.push(("interval.endTime", value.to_string())); + } + if let Some(value) = self._filter { + params.push(("filter", value.to_string())); + } + for &field in ["alt", "name", "pageToken", "pageSize", "interval.startTime", "interval.endTime", "filter"].iter() { + if self._additional_params.contains_key(field) { + dlg.finished(false); + return Err(Error::FieldClash(field)); + } + } + for (name, value) in self._additional_params.iter() { + params.push((&name, value.clone())); + } + + params.push(("alt", "json".to_string())); + + let mut url = "https://monitoring.googleapis.com/v3/{+name}/members".to_string(); + if self._scopes.len() == 0 { + self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); + } + + for &(find_this, param_name) in [("{+name}", "name")].iter() { + let mut replace_with = String::new(); + for &(name, ref value) in params.iter() { + if name == param_name { + replace_with = value.to_string(); + break; + } + } + if find_this.as_bytes()[1] == '+' as u8 { + replace_with = percent_encode(replace_with.as_bytes(), FORM_URLENCODED_ENCODE_SET); + } + url = url.replace(find_this, &replace_with); + } + { + let mut indices_for_removal: Vec = Vec::with_capacity(1); + for param_name in ["name"].iter() { + if let Some(index) = params.iter().position(|t| &t.0 == param_name) { + indices_for_removal.push(index); + } + } + for &index in indices_for_removal.iter() { + params.remove(index); + } + } + + if params.len() > 0 { + url.push('?'); + url.push_str(&url::form_urlencoded::serialize(params)); + } + + + + loop { + let token = match self.hub.auth.borrow_mut().token(self._scopes.keys()) { + Ok(token) => token, + Err(err) => { + match dlg.token(&*err) { + Some(token) => token, + None => { + dlg.finished(false); + return Err(Error::MissingToken(err)) + } + } + } + }; + let auth_header = Authorization(Bearer { token: token.access_token }); + let mut req_result = { + let mut client = &mut *self.hub.client.borrow_mut(); + let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) + .header(UserAgent(self.hub._user_agent.clone())) + .header(auth_header.clone()); + + dlg.pre_request(); + req.send() + }; + + match req_result { + Err(err) => { + if let oauth2::Retry::After(d) = dlg.http_error(&err) { + sleep(d); + continue; + } + dlg.finished(false); + return Err(Error::HttpError(err)) + } + Ok(mut res) => { + if !res.status.is_success() { + let mut json_err = String::new(); + res.read_to_string(&mut json_err).unwrap(); + if let oauth2::Retry::After(d) = dlg.http_failure(&res, + json::from_str(&json_err).ok(), + json::from_str(&json_err).ok()) { + sleep(d); + continue; + } + dlg.finished(false); + return match json::from_str::(&json_err){ + Err(_) => Err(Error::Failure(res)), + Ok(serr) => Err(Error::BadRequest(serr)) + } + } + let result_value = { + let mut json_response = String::new(); + res.read_to_string(&mut json_response).unwrap(); + match json::from_str(&json_response) { + Ok(decoded) => (res, decoded), + Err(err) => { + dlg.response_json_decode_error(&json_response, &err); + return Err(Error::JsonDecodeError(json_response, err)); + } + } + }; + + dlg.finished(true); + return Ok(result_value) + } + } + } + } + + + /// The group whose members are listed. The format is `"projects/{project_id_or_number}/groups/{group_id}"`. + /// + /// Sets the *name* path property to the given value. + /// + /// Even though the property as already been set when instantiating this call, + /// we provide this method for API completeness. + pub fn name(mut self, new_value: &str) -> ProjectGroupMemberListCall<'a, C, A> { + self._name = new_value.to_string(); + self + } + /// If this field is not empty then it must contain the `nextPageToken` value returned by a previous call to this method. Using this field causes the method to return additional results from the previous method call. + /// + /// Sets the *page token* query property to the given value. + pub fn page_token(mut self, new_value: &str) -> ProjectGroupMemberListCall<'a, C, A> { + self._page_token = Some(new_value.to_string()); + self + } + /// A positive number that is the maximum number of results to return. + /// + /// Sets the *page size* query property to the given value. + pub fn page_size(mut self, new_value: i32) -> ProjectGroupMemberListCall<'a, C, A> { + self._page_size = Some(new_value); + self + } + /// (optional) If omitted, the interval is a point in time, `endTime`. If `startTime` is present, it must be earlier than (less than) `endTime`. The interval begins after `startTime`—it does not include `startTime`. + /// + /// Sets the *interval.start time* query property to the given value. + pub fn interval_start_time(mut self, new_value: &str) -> ProjectGroupMemberListCall<'a, C, A> { + self._interval_start_time = Some(new_value.to_string()); + self + } + /// (required) The end of the interval. The interval includes this time. + /// + /// Sets the *interval.end time* query property to the given value. + pub fn interval_end_time(mut self, new_value: &str) -> ProjectGroupMemberListCall<'a, C, A> { + self._interval_end_time = Some(new_value.to_string()); + self + } + /// An optional [list filter](/monitoring/api/learn_more#filtering) describing the members to be returned. The filter may reference the type, labels, and metadata of monitored resources that comprise the group. For example, to return only resources representing Compute Engine VM instances, use this filter: resource.type = "gce_instance" + /// + /// Sets the *filter* query property to the given value. + pub fn filter(mut self, new_value: &str) -> ProjectGroupMemberListCall<'a, C, A> { + self._filter = Some(new_value.to_string()); + self + } + /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong + /// while executing the actual API request. + /// + /// It should be used to handle progress information, and to implement a certain level of resilience. + /// + /// Sets the *delegate* property to the given value. + pub fn delegate(mut self, new_value: &'a mut Delegate) -> ProjectGroupMemberListCall<'a, C, A> { + self._delegate = Some(new_value); + self + } + + /// Set any additional parameter of the query string used in the request. + /// It should be used to set parameters which are not yet available through their own + /// setters. + /// + /// Please note that this method must not be used to set any of the known paramters + /// which have their own setter method. If done anyway, the request will fail. + /// + /// # Additional Parameters + /// + /// * *bearer_token* (query-string) - OAuth bearer token. + /// * *pp* (query-boolean) - Pretty-print response. + /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. + /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). + /// * *access_token* (query-string) - OAuth access token. + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *quotaUser* (query-string) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + /// * *callback* (query-string) - JSONP + /// * *oauth_token* (query-string) - OAuth 2.0 token for the current user. + /// * *key* (query-string) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. + /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). + /// * *alt* (query-string) - Data format for response. + /// * *$.xgafv* (query-string) - V1 error format. + pub fn param(mut self, name: T, value: T) -> ProjectGroupMemberListCall<'a, C, A> + where T: AsRef { + self._additional_params.insert(name.as_ref().to_string(), value.as_ref().to_string()); + self + } + + /// Identifies the authorization scope for the method you are building. + /// + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::CloudPlatform`. + /// + /// The `scope` will be added to a set of scopes. This is important as one can maintain access + /// tokens for more than one scope. + /// + /// Usually there is more than one suitable scope to authorize an operation, some of which may + /// encompass more rights than others. For example, for listing resources, a *read-only* scope will be + /// sufficient, a read-write scope will do as well. + pub fn add_scope(mut self, scope: T) -> ProjectGroupMemberListCall<'a, C, A> + where T: AsRef { + self._scopes.insert(scope.as_ref().to_string(), ()); + self + } +} + + +/// Lists monitored resource descriptors that match a filter. +/// +/// A builder for the *monitoredResourceDescriptors.list* method supported by a *project* resource. +/// It is not used directly, but through a `ProjectMethods` instance. +/// +/// # Example +/// +/// Instantiate a resource method builder +/// +/// ```test_harness,no_run +/// # extern crate hyper; +/// # extern crate yup_oauth2 as oauth2; +/// # extern crate google_monitoring3 as monitoring3; +/// # #[test] fn egal() { +/// # use std::default::Default; +/// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; +/// # use monitoring3::Monitoring; +/// +/// # let secret: ApplicationSecret = Default::default(); +/// # let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, +/// # hyper::Client::new(), +/// # ::default(), None); +/// # let mut hub = Monitoring::new(hyper::Client::new(), auth); +/// // You can configure optional parameters by calling the respective setters at will, and +/// // execute the final call using `doit()`. +/// // Values shown here are possibly random and not representative ! +/// let result = hub.projects().monitored_resource_descriptors_list("name") +/// .page_token("dolores") +/// .page_size(-61) +/// .filter("sadipscing") +/// .doit(); +/// # } +/// ``` +pub struct ProjectMonitoredResourceDescriptorListCall<'a, C, A> + where C: 'a, A: 'a { + + hub: &'a Monitoring, + _name: String, + _page_token: Option, + _page_size: Option, + _filter: Option, + _delegate: Option<&'a mut Delegate>, + _additional_params: HashMap, + _scopes: BTreeMap +} + +impl<'a, C, A> CallBuilder for ProjectMonitoredResourceDescriptorListCall<'a, C, A> {} + +impl<'a, C, A> ProjectMonitoredResourceDescriptorListCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { + + + /// Perform the operation you have build so far. + pub fn doit(mut self) -> Result<(hyper::client::Response, ListMonitoredResourceDescriptorsResponse)> { + use url::percent_encoding::{percent_encode, FORM_URLENCODED_ENCODE_SET}; + use std::io::{Read, Seek}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; + let mut dd = DefaultDelegate; + let mut dlg: &mut Delegate = match self._delegate { + Some(d) => d, + None => &mut dd + }; + dlg.begin(MethodInfo { id: "monitoring.projects.monitoredResourceDescriptors.list", + http_method: hyper::method::Method::Get }); + let mut params: Vec<(&str, String)> = Vec::with_capacity((6 + self._additional_params.len())); + params.push(("name", self._name.to_string())); + if let Some(value) = self._page_token { + params.push(("pageToken", value.to_string())); + } + if let Some(value) = self._page_size { + params.push(("pageSize", value.to_string())); + } + if let Some(value) = self._filter { + params.push(("filter", value.to_string())); + } + for &field in ["alt", "name", "pageToken", "pageSize", "filter"].iter() { + if self._additional_params.contains_key(field) { + dlg.finished(false); + return Err(Error::FieldClash(field)); + } + } + for (name, value) in self._additional_params.iter() { + params.push((&name, value.clone())); + } + + params.push(("alt", "json".to_string())); + + let mut url = "https://monitoring.googleapis.com/v3/{+name}/monitoredResourceDescriptors".to_string(); + if self._scopes.len() == 0 { + self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); + } + + for &(find_this, param_name) in [("{+name}", "name")].iter() { + let mut replace_with = String::new(); + for &(name, ref value) in params.iter() { + if name == param_name { + replace_with = value.to_string(); + break; + } + } + if find_this.as_bytes()[1] == '+' as u8 { + replace_with = percent_encode(replace_with.as_bytes(), FORM_URLENCODED_ENCODE_SET); + } + url = url.replace(find_this, &replace_with); + } + { + let mut indices_for_removal: Vec = Vec::with_capacity(1); + for param_name in ["name"].iter() { + if let Some(index) = params.iter().position(|t| &t.0 == param_name) { + indices_for_removal.push(index); + } + } + for &index in indices_for_removal.iter() { + params.remove(index); + } + } + + if params.len() > 0 { + url.push('?'); + url.push_str(&url::form_urlencoded::serialize(params)); + } + + + + loop { + let token = match self.hub.auth.borrow_mut().token(self._scopes.keys()) { + Ok(token) => token, + Err(err) => { + match dlg.token(&*err) { + Some(token) => token, + None => { + dlg.finished(false); + return Err(Error::MissingToken(err)) + } + } + } + }; + let auth_header = Authorization(Bearer { token: token.access_token }); + let mut req_result = { + let mut client = &mut *self.hub.client.borrow_mut(); + let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) + .header(UserAgent(self.hub._user_agent.clone())) + .header(auth_header.clone()); + + dlg.pre_request(); + req.send() + }; + + match req_result { + Err(err) => { + if let oauth2::Retry::After(d) = dlg.http_error(&err) { + sleep(d); + continue; + } + dlg.finished(false); + return Err(Error::HttpError(err)) + } + Ok(mut res) => { + if !res.status.is_success() { + let mut json_err = String::new(); + res.read_to_string(&mut json_err).unwrap(); + if let oauth2::Retry::After(d) = dlg.http_failure(&res, + json::from_str(&json_err).ok(), + json::from_str(&json_err).ok()) { + sleep(d); + continue; + } + dlg.finished(false); + return match json::from_str::(&json_err){ + Err(_) => Err(Error::Failure(res)), + Ok(serr) => Err(Error::BadRequest(serr)) + } + } + let result_value = { + let mut json_response = String::new(); + res.read_to_string(&mut json_response).unwrap(); + match json::from_str(&json_response) { + Ok(decoded) => (res, decoded), + Err(err) => { + dlg.response_json_decode_error(&json_response, &err); + return Err(Error::JsonDecodeError(json_response, err)); + } + } + }; + + dlg.finished(true); + return Ok(result_value) + } + } + } + } + + + /// The project on which to execute the request. The format is `"projects/{project_id_or_number}"`. + /// + /// Sets the *name* path property to the given value. + /// + /// Even though the property as already been set when instantiating this call, + /// we provide this method for API completeness. + pub fn name(mut self, new_value: &str) -> ProjectMonitoredResourceDescriptorListCall<'a, C, A> { + self._name = new_value.to_string(); + self + } + /// If this field is not empty then it must contain the `nextPageToken` value returned by a previous call to this method. Using this field causes the method to return additional results from the previous method call. + /// + /// Sets the *page token* query property to the given value. + pub fn page_token(mut self, new_value: &str) -> ProjectMonitoredResourceDescriptorListCall<'a, C, A> { + self._page_token = Some(new_value.to_string()); + self + } + /// A positive number that is the maximum number of results to return. + /// + /// Sets the *page size* query property to the given value. + pub fn page_size(mut self, new_value: i32) -> ProjectMonitoredResourceDescriptorListCall<'a, C, A> { + self._page_size = Some(new_value); + self + } + /// An optional [filter](/monitoring/api/v3/filters) describing the descriptors to be returned. The filter can reference the descriptor's type and labels. For example, the following filter returns only Google Compute Engine descriptors that have an `id` label: resource.type = starts_with("gce_") AND resource.label:id + /// + /// Sets the *filter* query property to the given value. + pub fn filter(mut self, new_value: &str) -> ProjectMonitoredResourceDescriptorListCall<'a, C, A> { + self._filter = Some(new_value.to_string()); + self + } + /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong + /// while executing the actual API request. + /// + /// It should be used to handle progress information, and to implement a certain level of resilience. + /// + /// Sets the *delegate* property to the given value. + pub fn delegate(mut self, new_value: &'a mut Delegate) -> ProjectMonitoredResourceDescriptorListCall<'a, C, A> { + self._delegate = Some(new_value); + self + } + + /// Set any additional parameter of the query string used in the request. + /// It should be used to set parameters which are not yet available through their own + /// setters. + /// + /// Please note that this method must not be used to set any of the known paramters + /// which have their own setter method. If done anyway, the request will fail. + /// + /// # Additional Parameters + /// + /// * *bearer_token* (query-string) - OAuth bearer token. + /// * *pp* (query-boolean) - Pretty-print response. + /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. + /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). + /// * *access_token* (query-string) - OAuth access token. + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *quotaUser* (query-string) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + /// * *callback* (query-string) - JSONP + /// * *oauth_token* (query-string) - OAuth 2.0 token for the current user. + /// * *key* (query-string) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. + /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). + /// * *alt* (query-string) - Data format for response. + /// * *$.xgafv* (query-string) - V1 error format. + pub fn param(mut self, name: T, value: T) -> ProjectMonitoredResourceDescriptorListCall<'a, C, A> + where T: AsRef { + self._additional_params.insert(name.as_ref().to_string(), value.as_ref().to_string()); + self + } + + /// Identifies the authorization scope for the method you are building. + /// + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::CloudPlatform`. + /// + /// The `scope` will be added to a set of scopes. This is important as one can maintain access + /// tokens for more than one scope. + /// + /// Usually there is more than one suitable scope to authorize an operation, some of which may + /// encompass more rights than others. For example, for listing resources, a *read-only* scope will be + /// sufficient, a read-write scope will do as well. + pub fn add_scope(mut self, scope: T) -> ProjectMonitoredResourceDescriptorListCall<'a, C, A> + where T: AsRef { + self._scopes.insert(scope.as_ref().to_string(), ()); + self + } +} + + +/// Creates or adds data to one or more time series. The response is empty if all time series in the request were written. If any time series could not be written, a corresponding failure message is included in the error response. +/// +/// A builder for the *timeSeries.create* method supported by a *project* resource. +/// It is not used directly, but through a `ProjectMethods` instance. +/// +/// # Example +/// +/// Instantiate a resource method builder +/// +/// ```test_harness,no_run +/// # extern crate hyper; +/// # extern crate yup_oauth2 as oauth2; +/// # extern crate google_monitoring3 as monitoring3; +/// use monitoring3::CreateTimeSeriesRequest; +/// # #[test] fn egal() { +/// # use std::default::Default; +/// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; +/// # use monitoring3::Monitoring; +/// +/// # let secret: ApplicationSecret = Default::default(); +/// # let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, +/// # hyper::Client::new(), +/// # ::default(), None); +/// # let mut hub = Monitoring::new(hyper::Client::new(), auth); +/// // As the method needs a request, you would usually fill it with the desired information +/// // into the respective structure. Some of the parts shown here might not be applicable ! +/// // Values shown here are possibly random and not representative ! +/// let mut req = CreateTimeSeriesRequest::default(); +/// +/// // You can configure optional parameters by calling the respective setters at will, and +/// // execute the final call using `doit()`. +/// // Values shown here are possibly random and not representative ! +/// let result = hub.projects().time_series_create(req, "name") +/// .doit(); +/// # } +/// ``` +pub struct ProjectTimeSeryCreateCall<'a, C, A> + where C: 'a, A: 'a { + + hub: &'a Monitoring, + _request: CreateTimeSeriesRequest, + _name: String, + _delegate: Option<&'a mut Delegate>, + _additional_params: HashMap, + _scopes: BTreeMap +} + +impl<'a, C, A> CallBuilder for ProjectTimeSeryCreateCall<'a, C, A> {} + +impl<'a, C, A> ProjectTimeSeryCreateCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { + + + /// Perform the operation you have build so far. + pub fn doit(mut self) -> Result<(hyper::client::Response, Empty)> { + use url::percent_encoding::{percent_encode, FORM_URLENCODED_ENCODE_SET}; + use std::io::{Read, Seek}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; + let mut dd = DefaultDelegate; + let mut dlg: &mut Delegate = match self._delegate { + Some(d) => d, + None => &mut dd + }; + dlg.begin(MethodInfo { id: "monitoring.projects.timeSeries.create", + http_method: hyper::method::Method::Post }); + let mut params: Vec<(&str, String)> = Vec::with_capacity((4 + self._additional_params.len())); + params.push(("name", self._name.to_string())); + for &field in ["alt", "name"].iter() { + if self._additional_params.contains_key(field) { + dlg.finished(false); + return Err(Error::FieldClash(field)); + } + } + for (name, value) in self._additional_params.iter() { + params.push((&name, value.clone())); + } + + params.push(("alt", "json".to_string())); + + let mut url = "https://monitoring.googleapis.com/v3/{+name}/timeSeries".to_string(); + if self._scopes.len() == 0 { + self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); + } + + for &(find_this, param_name) in [("{+name}", "name")].iter() { + let mut replace_with = String::new(); + for &(name, ref value) in params.iter() { + if name == param_name { + replace_with = value.to_string(); + break; + } + } + if find_this.as_bytes()[1] == '+' as u8 { + replace_with = percent_encode(replace_with.as_bytes(), FORM_URLENCODED_ENCODE_SET); + } + url = url.replace(find_this, &replace_with); + } + { + let mut indices_for_removal: Vec = Vec::with_capacity(1); + for param_name in ["name"].iter() { + if let Some(index) = params.iter().position(|t| &t.0 == param_name) { + indices_for_removal.push(index); + } + } + for &index in indices_for_removal.iter() { + params.remove(index); + } + } + + if params.len() > 0 { + url.push('?'); + url.push_str(&url::form_urlencoded::serialize(params)); + } + + let mut json_mime_type = mime::Mime(mime::TopLevel::Application, mime::SubLevel::Json, Default::default()); + let mut request_value_reader = + { + let mut value = json::value::to_value(&self._request); + remove_json_null_values(&mut value); + let mut dst = io::Cursor::new(Vec::with_capacity(128)); + json::to_writer(&mut dst, &value).unwrap(); + dst + }; + let request_size = request_value_reader.seek(io::SeekFrom::End(0)).unwrap(); + request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); + + + loop { + let token = match self.hub.auth.borrow_mut().token(self._scopes.keys()) { + Ok(token) => token, + Err(err) => { + match dlg.token(&*err) { + Some(token) => token, + None => { + dlg.finished(false); + return Err(Error::MissingToken(err)) + } + } + } + }; + let auth_header = Authorization(Bearer { token: token.access_token }); + request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); + let mut req_result = { + let mut client = &mut *self.hub.client.borrow_mut(); + let mut req = client.borrow_mut().request(hyper::method::Method::Post, &url) + .header(UserAgent(self.hub._user_agent.clone())) + .header(auth_header.clone()) + .header(ContentType(json_mime_type.clone())) + .header(ContentLength(request_size as u64)) + .body(&mut request_value_reader); + + dlg.pre_request(); + req.send() + }; + + match req_result { + Err(err) => { + if let oauth2::Retry::After(d) = dlg.http_error(&err) { + sleep(d); + continue; + } + dlg.finished(false); + return Err(Error::HttpError(err)) + } + Ok(mut res) => { + if !res.status.is_success() { + let mut json_err = String::new(); + res.read_to_string(&mut json_err).unwrap(); + if let oauth2::Retry::After(d) = dlg.http_failure(&res, + json::from_str(&json_err).ok(), + json::from_str(&json_err).ok()) { + sleep(d); + continue; + } + dlg.finished(false); + return match json::from_str::(&json_err){ + Err(_) => Err(Error::Failure(res)), + Ok(serr) => Err(Error::BadRequest(serr)) + } + } + let result_value = { + let mut json_response = String::new(); + res.read_to_string(&mut json_response).unwrap(); + match json::from_str(&json_response) { + Ok(decoded) => (res, decoded), + Err(err) => { + dlg.response_json_decode_error(&json_response, &err); + return Err(Error::JsonDecodeError(json_response, err)); + } + } + }; + + dlg.finished(true); + return Ok(result_value) + } + } + } + } + + + /// + /// Sets the *request* property to the given value. + /// + /// Even though the property as already been set when instantiating this call, + /// we provide this method for API completeness. + pub fn request(mut self, new_value: CreateTimeSeriesRequest) -> ProjectTimeSeryCreateCall<'a, C, A> { + self._request = new_value; + self + } + /// The project on which to execute the request. The format is `"projects/{project_id_or_number}"`. + /// + /// Sets the *name* path property to the given value. + /// + /// Even though the property as already been set when instantiating this call, + /// we provide this method for API completeness. + pub fn name(mut self, new_value: &str) -> ProjectTimeSeryCreateCall<'a, C, A> { + self._name = new_value.to_string(); + self + } + /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong + /// while executing the actual API request. + /// + /// It should be used to handle progress information, and to implement a certain level of resilience. + /// + /// Sets the *delegate* property to the given value. + pub fn delegate(mut self, new_value: &'a mut Delegate) -> ProjectTimeSeryCreateCall<'a, C, A> { + self._delegate = Some(new_value); + self + } + + /// Set any additional parameter of the query string used in the request. + /// It should be used to set parameters which are not yet available through their own + /// setters. + /// + /// Please note that this method must not be used to set any of the known paramters + /// which have their own setter method. If done anyway, the request will fail. + /// + /// # Additional Parameters + /// + /// * *bearer_token* (query-string) - OAuth bearer token. + /// * *pp* (query-boolean) - Pretty-print response. + /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. + /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). + /// * *access_token* (query-string) - OAuth access token. + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *quotaUser* (query-string) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + /// * *callback* (query-string) - JSONP + /// * *oauth_token* (query-string) - OAuth 2.0 token for the current user. + /// * *key* (query-string) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. + /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). + /// * *alt* (query-string) - Data format for response. + /// * *$.xgafv* (query-string) - V1 error format. + pub fn param(mut self, name: T, value: T) -> ProjectTimeSeryCreateCall<'a, C, A> + where T: AsRef { + self._additional_params.insert(name.as_ref().to_string(), value.as_ref().to_string()); + self + } + + /// Identifies the authorization scope for the method you are building. + /// + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::CloudPlatform`. + /// + /// The `scope` will be added to a set of scopes. This is important as one can maintain access + /// tokens for more than one scope. + /// + /// Usually there is more than one suitable scope to authorize an operation, some of which may + /// encompass more rights than others. For example, for listing resources, a *read-only* scope will be + /// sufficient, a read-write scope will do as well. + pub fn add_scope(mut self, scope: T) -> ProjectTimeSeryCreateCall<'a, C, A> + where T: AsRef { + self._scopes.insert(scope.as_ref().to_string(), ()); + self + } +} + + +/// Creates a new metric descriptor. User-created metric descriptors define [custom metrics](/monitoring/custom-metrics). +/// +/// A builder for the *metricDescriptors.create* method supported by a *project* resource. +/// It is not used directly, but through a `ProjectMethods` instance. +/// +/// # Example +/// +/// Instantiate a resource method builder +/// +/// ```test_harness,no_run +/// # extern crate hyper; +/// # extern crate yup_oauth2 as oauth2; +/// # extern crate google_monitoring3 as monitoring3; +/// use monitoring3::MetricDescriptor; +/// # #[test] fn egal() { +/// # use std::default::Default; +/// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; +/// # use monitoring3::Monitoring; +/// +/// # let secret: ApplicationSecret = Default::default(); +/// # let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, +/// # hyper::Client::new(), +/// # ::default(), None); +/// # let mut hub = Monitoring::new(hyper::Client::new(), auth); +/// // As the method needs a request, you would usually fill it with the desired information +/// // into the respective structure. Some of the parts shown here might not be applicable ! +/// // Values shown here are possibly random and not representative ! +/// let mut req = MetricDescriptor::default(); +/// +/// // You can configure optional parameters by calling the respective setters at will, and +/// // execute the final call using `doit()`. +/// // Values shown here are possibly random and not representative ! +/// let result = hub.projects().metric_descriptors_create(req, "name") +/// .doit(); +/// # } +/// ``` +pub struct ProjectMetricDescriptorCreateCall<'a, C, A> + where C: 'a, A: 'a { + + hub: &'a Monitoring, + _request: MetricDescriptor, + _name: String, + _delegate: Option<&'a mut Delegate>, + _additional_params: HashMap, + _scopes: BTreeMap +} + +impl<'a, C, A> CallBuilder for ProjectMetricDescriptorCreateCall<'a, C, A> {} + +impl<'a, C, A> ProjectMetricDescriptorCreateCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { + + + /// Perform the operation you have build so far. + pub fn doit(mut self) -> Result<(hyper::client::Response, MetricDescriptor)> { + use url::percent_encoding::{percent_encode, FORM_URLENCODED_ENCODE_SET}; + use std::io::{Read, Seek}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; + let mut dd = DefaultDelegate; + let mut dlg: &mut Delegate = match self._delegate { + Some(d) => d, + None => &mut dd + }; + dlg.begin(MethodInfo { id: "monitoring.projects.metricDescriptors.create", + http_method: hyper::method::Method::Post }); + let mut params: Vec<(&str, String)> = Vec::with_capacity((4 + self._additional_params.len())); + params.push(("name", self._name.to_string())); + for &field in ["alt", "name"].iter() { + if self._additional_params.contains_key(field) { + dlg.finished(false); + return Err(Error::FieldClash(field)); + } + } + for (name, value) in self._additional_params.iter() { + params.push((&name, value.clone())); + } + + params.push(("alt", "json".to_string())); + + let mut url = "https://monitoring.googleapis.com/v3/{+name}/metricDescriptors".to_string(); + if self._scopes.len() == 0 { + self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); + } + + for &(find_this, param_name) in [("{+name}", "name")].iter() { + let mut replace_with = String::new(); + for &(name, ref value) in params.iter() { + if name == param_name { + replace_with = value.to_string(); + break; + } + } + if find_this.as_bytes()[1] == '+' as u8 { + replace_with = percent_encode(replace_with.as_bytes(), FORM_URLENCODED_ENCODE_SET); + } + url = url.replace(find_this, &replace_with); + } + { + let mut indices_for_removal: Vec = Vec::with_capacity(1); + for param_name in ["name"].iter() { + if let Some(index) = params.iter().position(|t| &t.0 == param_name) { + indices_for_removal.push(index); + } + } + for &index in indices_for_removal.iter() { + params.remove(index); + } + } + + if params.len() > 0 { + url.push('?'); + url.push_str(&url::form_urlencoded::serialize(params)); + } + + let mut json_mime_type = mime::Mime(mime::TopLevel::Application, mime::SubLevel::Json, Default::default()); + let mut request_value_reader = + { + let mut value = json::value::to_value(&self._request); + remove_json_null_values(&mut value); + let mut dst = io::Cursor::new(Vec::with_capacity(128)); + json::to_writer(&mut dst, &value).unwrap(); + dst + }; + let request_size = request_value_reader.seek(io::SeekFrom::End(0)).unwrap(); + request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); + + + loop { + let token = match self.hub.auth.borrow_mut().token(self._scopes.keys()) { + Ok(token) => token, + Err(err) => { + match dlg.token(&*err) { + Some(token) => token, + None => { + dlg.finished(false); + return Err(Error::MissingToken(err)) + } + } + } + }; + let auth_header = Authorization(Bearer { token: token.access_token }); + request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); + let mut req_result = { + let mut client = &mut *self.hub.client.borrow_mut(); + let mut req = client.borrow_mut().request(hyper::method::Method::Post, &url) + .header(UserAgent(self.hub._user_agent.clone())) + .header(auth_header.clone()) + .header(ContentType(json_mime_type.clone())) + .header(ContentLength(request_size as u64)) + .body(&mut request_value_reader); + + dlg.pre_request(); + req.send() + }; + + match req_result { + Err(err) => { + if let oauth2::Retry::After(d) = dlg.http_error(&err) { + sleep(d); + continue; + } + dlg.finished(false); + return Err(Error::HttpError(err)) + } + Ok(mut res) => { + if !res.status.is_success() { + let mut json_err = String::new(); + res.read_to_string(&mut json_err).unwrap(); + if let oauth2::Retry::After(d) = dlg.http_failure(&res, + json::from_str(&json_err).ok(), + json::from_str(&json_err).ok()) { + sleep(d); + continue; + } + dlg.finished(false); + return match json::from_str::(&json_err){ + Err(_) => Err(Error::Failure(res)), + Ok(serr) => Err(Error::BadRequest(serr)) + } + } + let result_value = { + let mut json_response = String::new(); + res.read_to_string(&mut json_response).unwrap(); + match json::from_str(&json_response) { + Ok(decoded) => (res, decoded), + Err(err) => { + dlg.response_json_decode_error(&json_response, &err); + return Err(Error::JsonDecodeError(json_response, err)); + } + } + }; + + dlg.finished(true); + return Ok(result_value) + } + } + } + } + + + /// + /// Sets the *request* property to the given value. + /// + /// Even though the property as already been set when instantiating this call, + /// we provide this method for API completeness. + pub fn request(mut self, new_value: MetricDescriptor) -> ProjectMetricDescriptorCreateCall<'a, C, A> { + self._request = new_value; + self + } + /// The project on which to execute the request. The format is `"projects/{project_id_or_number}"`. + /// + /// Sets the *name* path property to the given value. + /// + /// Even though the property as already been set when instantiating this call, + /// we provide this method for API completeness. + pub fn name(mut self, new_value: &str) -> ProjectMetricDescriptorCreateCall<'a, C, A> { + self._name = new_value.to_string(); + self + } + /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong + /// while executing the actual API request. + /// + /// It should be used to handle progress information, and to implement a certain level of resilience. + /// + /// Sets the *delegate* property to the given value. + pub fn delegate(mut self, new_value: &'a mut Delegate) -> ProjectMetricDescriptorCreateCall<'a, C, A> { + self._delegate = Some(new_value); + self + } + + /// Set any additional parameter of the query string used in the request. + /// It should be used to set parameters which are not yet available through their own + /// setters. + /// + /// Please note that this method must not be used to set any of the known paramters + /// which have their own setter method. If done anyway, the request will fail. + /// + /// # Additional Parameters + /// + /// * *bearer_token* (query-string) - OAuth bearer token. + /// * *pp* (query-boolean) - Pretty-print response. + /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. + /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). + /// * *access_token* (query-string) - OAuth access token. + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *quotaUser* (query-string) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + /// * *callback* (query-string) - JSONP + /// * *oauth_token* (query-string) - OAuth 2.0 token for the current user. + /// * *key* (query-string) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. + /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). + /// * *alt* (query-string) - Data format for response. + /// * *$.xgafv* (query-string) - V1 error format. + pub fn param(mut self, name: T, value: T) -> ProjectMetricDescriptorCreateCall<'a, C, A> + where T: AsRef { + self._additional_params.insert(name.as_ref().to_string(), value.as_ref().to_string()); + self + } + + /// Identifies the authorization scope for the method you are building. + /// + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::CloudPlatform`. + /// + /// The `scope` will be added to a set of scopes. This is important as one can maintain access + /// tokens for more than one scope. + /// + /// Usually there is more than one suitable scope to authorize an operation, some of which may + /// encompass more rights than others. For example, for listing resources, a *read-only* scope will be + /// sufficient, a read-write scope will do as well. + pub fn add_scope(mut self, scope: T) -> ProjectMetricDescriptorCreateCall<'a, C, A> + where T: AsRef { + self._scopes.insert(scope.as_ref().to_string(), ()); + self + } +} + + +/// Lists the existing groups. +/// +/// A builder for the *groups.list* method supported by a *project* resource. +/// It is not used directly, but through a `ProjectMethods` instance. +/// +/// # Example +/// +/// Instantiate a resource method builder +/// +/// ```test_harness,no_run +/// # extern crate hyper; +/// # extern crate yup_oauth2 as oauth2; +/// # extern crate google_monitoring3 as monitoring3; +/// # #[test] fn egal() { +/// # use std::default::Default; +/// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; +/// # use monitoring3::Monitoring; +/// +/// # let secret: ApplicationSecret = Default::default(); +/// # let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, +/// # hyper::Client::new(), +/// # ::default(), None); +/// # let mut hub = Monitoring::new(hyper::Client::new(), auth); +/// // You can configure optional parameters by calling the respective setters at will, and +/// // execute the final call using `doit()`. +/// // Values shown here are possibly random and not representative ! +/// let result = hub.projects().groups_list("name") +/// .page_token("justo") +/// .page_size(-21) +/// .descendants_of_group("et") +/// .children_of_group("et") +/// .ancestors_of_group("diam") +/// .doit(); +/// # } +/// ``` +pub struct ProjectGroupListCall<'a, C, A> + where C: 'a, A: 'a { + + hub: &'a Monitoring, + _name: String, + _page_token: Option, + _page_size: Option, + _descendants_of_group: Option, + _children_of_group: Option, + _ancestors_of_group: Option, + _delegate: Option<&'a mut Delegate>, + _additional_params: HashMap, + _scopes: BTreeMap +} + +impl<'a, C, A> CallBuilder for ProjectGroupListCall<'a, C, A> {} + +impl<'a, C, A> ProjectGroupListCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { + + + /// Perform the operation you have build so far. + pub fn doit(mut self) -> Result<(hyper::client::Response, ListGroupsResponse)> { + use url::percent_encoding::{percent_encode, FORM_URLENCODED_ENCODE_SET}; + use std::io::{Read, Seek}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; + let mut dd = DefaultDelegate; + let mut dlg: &mut Delegate = match self._delegate { + Some(d) => d, + None => &mut dd + }; + dlg.begin(MethodInfo { id: "monitoring.projects.groups.list", + http_method: hyper::method::Method::Get }); + let mut params: Vec<(&str, String)> = Vec::with_capacity((8 + self._additional_params.len())); + params.push(("name", self._name.to_string())); + if let Some(value) = self._page_token { + params.push(("pageToken", value.to_string())); + } + if let Some(value) = self._page_size { + params.push(("pageSize", value.to_string())); + } + if let Some(value) = self._descendants_of_group { + params.push(("descendantsOfGroup", value.to_string())); + } + if let Some(value) = self._children_of_group { + params.push(("childrenOfGroup", value.to_string())); + } + if let Some(value) = self._ancestors_of_group { + params.push(("ancestorsOfGroup", value.to_string())); + } + for &field in ["alt", "name", "pageToken", "pageSize", "descendantsOfGroup", "childrenOfGroup", "ancestorsOfGroup"].iter() { + if self._additional_params.contains_key(field) { + dlg.finished(false); + return Err(Error::FieldClash(field)); + } + } + for (name, value) in self._additional_params.iter() { + params.push((&name, value.clone())); + } + + params.push(("alt", "json".to_string())); + + let mut url = "https://monitoring.googleapis.com/v3/{+name}/groups".to_string(); + if self._scopes.len() == 0 { + self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); + } + + for &(find_this, param_name) in [("{+name}", "name")].iter() { + let mut replace_with = String::new(); + for &(name, ref value) in params.iter() { + if name == param_name { + replace_with = value.to_string(); + break; + } + } + if find_this.as_bytes()[1] == '+' as u8 { + replace_with = percent_encode(replace_with.as_bytes(), FORM_URLENCODED_ENCODE_SET); + } + url = url.replace(find_this, &replace_with); + } + { + let mut indices_for_removal: Vec = Vec::with_capacity(1); + for param_name in ["name"].iter() { + if let Some(index) = params.iter().position(|t| &t.0 == param_name) { + indices_for_removal.push(index); + } + } + for &index in indices_for_removal.iter() { + params.remove(index); + } + } + + if params.len() > 0 { + url.push('?'); + url.push_str(&url::form_urlencoded::serialize(params)); + } + + + + loop { + let token = match self.hub.auth.borrow_mut().token(self._scopes.keys()) { + Ok(token) => token, + Err(err) => { + match dlg.token(&*err) { + Some(token) => token, + None => { + dlg.finished(false); + return Err(Error::MissingToken(err)) + } + } + } + }; + let auth_header = Authorization(Bearer { token: token.access_token }); + let mut req_result = { + let mut client = &mut *self.hub.client.borrow_mut(); + let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) + .header(UserAgent(self.hub._user_agent.clone())) + .header(auth_header.clone()); + + dlg.pre_request(); + req.send() + }; + + match req_result { + Err(err) => { + if let oauth2::Retry::After(d) = dlg.http_error(&err) { + sleep(d); + continue; + } + dlg.finished(false); + return Err(Error::HttpError(err)) + } + Ok(mut res) => { + if !res.status.is_success() { + let mut json_err = String::new(); + res.read_to_string(&mut json_err).unwrap(); + if let oauth2::Retry::After(d) = dlg.http_failure(&res, + json::from_str(&json_err).ok(), + json::from_str(&json_err).ok()) { + sleep(d); + continue; + } + dlg.finished(false); + return match json::from_str::(&json_err){ + Err(_) => Err(Error::Failure(res)), + Ok(serr) => Err(Error::BadRequest(serr)) + } + } + let result_value = { + let mut json_response = String::new(); + res.read_to_string(&mut json_response).unwrap(); + match json::from_str(&json_response) { + Ok(decoded) => (res, decoded), + Err(err) => { + dlg.response_json_decode_error(&json_response, &err); + return Err(Error::JsonDecodeError(json_response, err)); + } + } + }; + + dlg.finished(true); + return Ok(result_value) + } + } + } + } + + + /// The project whose groups are to be listed. The format is `"projects/{project_id_or_number}"`. + /// + /// Sets the *name* path property to the given value. + /// + /// Even though the property as already been set when instantiating this call, + /// we provide this method for API completeness. + pub fn name(mut self, new_value: &str) -> ProjectGroupListCall<'a, C, A> { + self._name = new_value.to_string(); + self + } + /// If this field is not empty then it must contain the `nextPageToken` value returned by a previous call to this method. Using this field causes the method to return additional results from the previous method call. + /// + /// Sets the *page token* query property to the given value. + pub fn page_token(mut self, new_value: &str) -> ProjectGroupListCall<'a, C, A> { + self._page_token = Some(new_value.to_string()); + self + } + /// A positive number that is the maximum number of results to return. + /// + /// Sets the *page size* query property to the given value. + pub fn page_size(mut self, new_value: i32) -> ProjectGroupListCall<'a, C, A> { + self._page_size = Some(new_value); + self + } + /// A group name: `"projects/{project_id_or_number}/groups/{group_id}"`. Returns the descendants of the specified group. This is a superset of the results returned by the `childrenOfGroup` filter, and includes children-of-children, and so forth. + /// + /// Sets the *descendants of group* query property to the given value. + pub fn descendants_of_group(mut self, new_value: &str) -> ProjectGroupListCall<'a, C, A> { + self._descendants_of_group = Some(new_value.to_string()); + self + } + /// A group name: `"projects/{project_id_or_number}/groups/{group_id}"`. Returns groups whose `parentName` field contains the group name. If no groups have this parent, the results are empty. + /// + /// Sets the *children of group* query property to the given value. + pub fn children_of_group(mut self, new_value: &str) -> ProjectGroupListCall<'a, C, A> { + self._children_of_group = Some(new_value.to_string()); + self + } + /// A group name: `"projects/{project_id_or_number}/groups/{group_id}"`. Returns groups that are ancestors of the specified group. The groups are returned in order, starting with the immediate parent and ending with the most distant ancestor. If the specified group has no immediate parent, the results are empty. + /// + /// Sets the *ancestors of group* query property to the given value. + pub fn ancestors_of_group(mut self, new_value: &str) -> ProjectGroupListCall<'a, C, A> { + self._ancestors_of_group = Some(new_value.to_string()); + self + } + /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong + /// while executing the actual API request. + /// + /// It should be used to handle progress information, and to implement a certain level of resilience. + /// + /// Sets the *delegate* property to the given value. + pub fn delegate(mut self, new_value: &'a mut Delegate) -> ProjectGroupListCall<'a, C, A> { + self._delegate = Some(new_value); + self + } + + /// Set any additional parameter of the query string used in the request. + /// It should be used to set parameters which are not yet available through their own + /// setters. + /// + /// Please note that this method must not be used to set any of the known paramters + /// which have their own setter method. If done anyway, the request will fail. + /// + /// # Additional Parameters + /// + /// * *bearer_token* (query-string) - OAuth bearer token. + /// * *pp* (query-boolean) - Pretty-print response. + /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. + /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). + /// * *access_token* (query-string) - OAuth access token. + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *quotaUser* (query-string) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + /// * *callback* (query-string) - JSONP + /// * *oauth_token* (query-string) - OAuth 2.0 token for the current user. + /// * *key* (query-string) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. + /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). + /// * *alt* (query-string) - Data format for response. + /// * *$.xgafv* (query-string) - V1 error format. + pub fn param(mut self, name: T, value: T) -> ProjectGroupListCall<'a, C, A> + where T: AsRef { + self._additional_params.insert(name.as_ref().to_string(), value.as_ref().to_string()); + self + } + + /// Identifies the authorization scope for the method you are building. + /// + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::CloudPlatform`. + /// + /// The `scope` will be added to a set of scopes. This is important as one can maintain access + /// tokens for more than one scope. + /// + /// Usually there is more than one suitable scope to authorize an operation, some of which may + /// encompass more rights than others. For example, for listing resources, a *read-only* scope will be + /// sufficient, a read-write scope will do as well. + pub fn add_scope(mut self, scope: T) -> ProjectGroupListCall<'a, C, A> + where T: AsRef { + self._scopes.insert(scope.as_ref().to_string(), ()); + self + } +} + + +/// Lists metric descriptors that match a filter. +/// +/// A builder for the *metricDescriptors.list* method supported by a *project* resource. +/// It is not used directly, but through a `ProjectMethods` instance. +/// +/// # Example +/// +/// Instantiate a resource method builder +/// +/// ```test_harness,no_run +/// # extern crate hyper; +/// # extern crate yup_oauth2 as oauth2; +/// # extern crate google_monitoring3 as monitoring3; +/// # #[test] fn egal() { +/// # use std::default::Default; +/// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; +/// # use monitoring3::Monitoring; +/// +/// # let secret: ApplicationSecret = Default::default(); +/// # let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, +/// # hyper::Client::new(), +/// # ::default(), None); +/// # let mut hub = Monitoring::new(hyper::Client::new(), auth); +/// // You can configure optional parameters by calling the respective setters at will, and +/// // execute the final call using `doit()`. +/// // Values shown here are possibly random and not representative ! +/// let result = hub.projects().metric_descriptors_list("name") +/// .page_token("Lorem") +/// .page_size(-21) +/// .filter("duo") +/// .doit(); +/// # } +/// ``` +pub struct ProjectMetricDescriptorListCall<'a, C, A> + where C: 'a, A: 'a { + + hub: &'a Monitoring, + _name: String, + _page_token: Option, + _page_size: Option, + _filter: Option, + _delegate: Option<&'a mut Delegate>, + _additional_params: HashMap, + _scopes: BTreeMap +} + +impl<'a, C, A> CallBuilder for ProjectMetricDescriptorListCall<'a, C, A> {} + +impl<'a, C, A> ProjectMetricDescriptorListCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { + + + /// Perform the operation you have build so far. + pub fn doit(mut self) -> Result<(hyper::client::Response, ListMetricDescriptorsResponse)> { + use url::percent_encoding::{percent_encode, FORM_URLENCODED_ENCODE_SET}; + use std::io::{Read, Seek}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; + let mut dd = DefaultDelegate; + let mut dlg: &mut Delegate = match self._delegate { + Some(d) => d, + None => &mut dd + }; + dlg.begin(MethodInfo { id: "monitoring.projects.metricDescriptors.list", + http_method: hyper::method::Method::Get }); + let mut params: Vec<(&str, String)> = Vec::with_capacity((6 + self._additional_params.len())); + params.push(("name", self._name.to_string())); + if let Some(value) = self._page_token { + params.push(("pageToken", value.to_string())); + } + if let Some(value) = self._page_size { + params.push(("pageSize", value.to_string())); + } + if let Some(value) = self._filter { + params.push(("filter", value.to_string())); + } + for &field in ["alt", "name", "pageToken", "pageSize", "filter"].iter() { + if self._additional_params.contains_key(field) { + dlg.finished(false); + return Err(Error::FieldClash(field)); + } + } + for (name, value) in self._additional_params.iter() { + params.push((&name, value.clone())); + } + + params.push(("alt", "json".to_string())); + + let mut url = "https://monitoring.googleapis.com/v3/{+name}/metricDescriptors".to_string(); + if self._scopes.len() == 0 { + self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); + } + + for &(find_this, param_name) in [("{+name}", "name")].iter() { + let mut replace_with = String::new(); + for &(name, ref value) in params.iter() { + if name == param_name { + replace_with = value.to_string(); + break; + } + } + if find_this.as_bytes()[1] == '+' as u8 { + replace_with = percent_encode(replace_with.as_bytes(), FORM_URLENCODED_ENCODE_SET); + } + url = url.replace(find_this, &replace_with); + } + { + let mut indices_for_removal: Vec = Vec::with_capacity(1); + for param_name in ["name"].iter() { + if let Some(index) = params.iter().position(|t| &t.0 == param_name) { + indices_for_removal.push(index); + } + } + for &index in indices_for_removal.iter() { + params.remove(index); + } + } + + if params.len() > 0 { + url.push('?'); + url.push_str(&url::form_urlencoded::serialize(params)); + } + + + + loop { + let token = match self.hub.auth.borrow_mut().token(self._scopes.keys()) { + Ok(token) => token, + Err(err) => { + match dlg.token(&*err) { + Some(token) => token, + None => { + dlg.finished(false); + return Err(Error::MissingToken(err)) + } + } + } + }; + let auth_header = Authorization(Bearer { token: token.access_token }); + let mut req_result = { + let mut client = &mut *self.hub.client.borrow_mut(); + let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) + .header(UserAgent(self.hub._user_agent.clone())) + .header(auth_header.clone()); + + dlg.pre_request(); + req.send() + }; + + match req_result { + Err(err) => { + if let oauth2::Retry::After(d) = dlg.http_error(&err) { + sleep(d); + continue; + } + dlg.finished(false); + return Err(Error::HttpError(err)) + } + Ok(mut res) => { + if !res.status.is_success() { + let mut json_err = String::new(); + res.read_to_string(&mut json_err).unwrap(); + if let oauth2::Retry::After(d) = dlg.http_failure(&res, + json::from_str(&json_err).ok(), + json::from_str(&json_err).ok()) { + sleep(d); + continue; + } + dlg.finished(false); + return match json::from_str::(&json_err){ + Err(_) => Err(Error::Failure(res)), + Ok(serr) => Err(Error::BadRequest(serr)) + } + } + let result_value = { + let mut json_response = String::new(); + res.read_to_string(&mut json_response).unwrap(); + match json::from_str(&json_response) { + Ok(decoded) => (res, decoded), + Err(err) => { + dlg.response_json_decode_error(&json_response, &err); + return Err(Error::JsonDecodeError(json_response, err)); + } + } + }; + + dlg.finished(true); + return Ok(result_value) + } + } + } + } + + + /// The project on which to execute the request. The format is `"projects/{project_id_or_number}"`. + /// + /// Sets the *name* path property to the given value. + /// + /// Even though the property as already been set when instantiating this call, + /// we provide this method for API completeness. + pub fn name(mut self, new_value: &str) -> ProjectMetricDescriptorListCall<'a, C, A> { + self._name = new_value.to_string(); + self + } + /// If this field is not empty then it must contain the `nextPageToken` value returned by a previous call to this method. Using this field causes the method to return additional results from the previous method call. + /// + /// Sets the *page token* query property to the given value. + pub fn page_token(mut self, new_value: &str) -> ProjectMetricDescriptorListCall<'a, C, A> { + self._page_token = Some(new_value.to_string()); + self + } + /// A positive number that is the maximum number of results to return. + /// + /// Sets the *page size* query property to the given value. + pub fn page_size(mut self, new_value: i32) -> ProjectMetricDescriptorListCall<'a, C, A> { + self._page_size = Some(new_value); + self + } + /// If this field is empty, all custom and system-defined metric descriptors are returned. Otherwise, the [filter](/monitoring/api/v3/filters) specifies which metric descriptors are to be returned. For example, the following filter matches all [custom metrics](/monitoring/custom-metrics): metric.type = starts_with("custom.googleapis.com/") + /// + /// Sets the *filter* query property to the given value. + pub fn filter(mut self, new_value: &str) -> ProjectMetricDescriptorListCall<'a, C, A> { + self._filter = Some(new_value.to_string()); + self + } + /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong + /// while executing the actual API request. + /// + /// It should be used to handle progress information, and to implement a certain level of resilience. + /// + /// Sets the *delegate* property to the given value. + pub fn delegate(mut self, new_value: &'a mut Delegate) -> ProjectMetricDescriptorListCall<'a, C, A> { + self._delegate = Some(new_value); + self + } + + /// Set any additional parameter of the query string used in the request. + /// It should be used to set parameters which are not yet available through their own + /// setters. + /// + /// Please note that this method must not be used to set any of the known paramters + /// which have their own setter method. If done anyway, the request will fail. + /// + /// # Additional Parameters + /// + /// * *bearer_token* (query-string) - OAuth bearer token. + /// * *pp* (query-boolean) - Pretty-print response. + /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. + /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). + /// * *access_token* (query-string) - OAuth access token. + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *quotaUser* (query-string) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + /// * *callback* (query-string) - JSONP + /// * *oauth_token* (query-string) - OAuth 2.0 token for the current user. + /// * *key* (query-string) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. + /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). + /// * *alt* (query-string) - Data format for response. + /// * *$.xgafv* (query-string) - V1 error format. + pub fn param(mut self, name: T, value: T) -> ProjectMetricDescriptorListCall<'a, C, A> + where T: AsRef { + self._additional_params.insert(name.as_ref().to_string(), value.as_ref().to_string()); + self + } + + /// Identifies the authorization scope for the method you are building. + /// + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::CloudPlatform`. + /// + /// The `scope` will be added to a set of scopes. This is important as one can maintain access + /// tokens for more than one scope. + /// + /// Usually there is more than one suitable scope to authorize an operation, some of which may + /// encompass more rights than others. For example, for listing resources, a *read-only* scope will be + /// sufficient, a read-write scope will do as well. + pub fn add_scope(mut self, scope: T) -> ProjectMetricDescriptorListCall<'a, C, A> + where T: AsRef { + self._scopes.insert(scope.as_ref().to_string(), ()); + self + } +} + + +/// Gets a single monitored resource descriptor. +/// +/// A builder for the *monitoredResourceDescriptors.get* method supported by a *project* resource. +/// It is not used directly, but through a `ProjectMethods` instance. +/// +/// # Example +/// +/// Instantiate a resource method builder +/// +/// ```test_harness,no_run +/// # extern crate hyper; +/// # extern crate yup_oauth2 as oauth2; +/// # extern crate google_monitoring3 as monitoring3; +/// # #[test] fn egal() { +/// # use std::default::Default; +/// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; +/// # use monitoring3::Monitoring; +/// +/// # let secret: ApplicationSecret = Default::default(); +/// # let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, +/// # hyper::Client::new(), +/// # ::default(), None); +/// # let mut hub = Monitoring::new(hyper::Client::new(), auth); +/// // You can configure optional parameters by calling the respective setters at will, and +/// // execute the final call using `doit()`. +/// // Values shown here are possibly random and not representative ! +/// let result = hub.projects().monitored_resource_descriptors_get("name") +/// .doit(); +/// # } +/// ``` +pub struct ProjectMonitoredResourceDescriptorGetCall<'a, C, A> + where C: 'a, A: 'a { + + hub: &'a Monitoring, + _name: String, + _delegate: Option<&'a mut Delegate>, + _additional_params: HashMap, + _scopes: BTreeMap +} + +impl<'a, C, A> CallBuilder for ProjectMonitoredResourceDescriptorGetCall<'a, C, A> {} + +impl<'a, C, A> ProjectMonitoredResourceDescriptorGetCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { + + + /// Perform the operation you have build so far. + pub fn doit(mut self) -> Result<(hyper::client::Response, MonitoredResourceDescriptor)> { + use url::percent_encoding::{percent_encode, FORM_URLENCODED_ENCODE_SET}; + use std::io::{Read, Seek}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; + let mut dd = DefaultDelegate; + let mut dlg: &mut Delegate = match self._delegate { + Some(d) => d, + None => &mut dd + }; + dlg.begin(MethodInfo { id: "monitoring.projects.monitoredResourceDescriptors.get", + http_method: hyper::method::Method::Get }); + let mut params: Vec<(&str, String)> = Vec::with_capacity((3 + self._additional_params.len())); + params.push(("name", self._name.to_string())); + for &field in ["alt", "name"].iter() { + if self._additional_params.contains_key(field) { + dlg.finished(false); + return Err(Error::FieldClash(field)); + } + } + for (name, value) in self._additional_params.iter() { + params.push((&name, value.clone())); + } + + params.push(("alt", "json".to_string())); + + let mut url = "https://monitoring.googleapis.com/v3/{+name}".to_string(); + if self._scopes.len() == 0 { + self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); + } + + for &(find_this, param_name) in [("{+name}", "name")].iter() { + let mut replace_with = String::new(); + for &(name, ref value) in params.iter() { + if name == param_name { + replace_with = value.to_string(); + break; + } + } + if find_this.as_bytes()[1] == '+' as u8 { + replace_with = percent_encode(replace_with.as_bytes(), FORM_URLENCODED_ENCODE_SET); + } + url = url.replace(find_this, &replace_with); + } + { + let mut indices_for_removal: Vec = Vec::with_capacity(1); + for param_name in ["name"].iter() { + if let Some(index) = params.iter().position(|t| &t.0 == param_name) { + indices_for_removal.push(index); + } + } + for &index in indices_for_removal.iter() { + params.remove(index); + } + } + + if params.len() > 0 { + url.push('?'); + url.push_str(&url::form_urlencoded::serialize(params)); + } + + + + loop { + let token = match self.hub.auth.borrow_mut().token(self._scopes.keys()) { + Ok(token) => token, + Err(err) => { + match dlg.token(&*err) { + Some(token) => token, + None => { + dlg.finished(false); + return Err(Error::MissingToken(err)) + } + } + } + }; + let auth_header = Authorization(Bearer { token: token.access_token }); + let mut req_result = { + let mut client = &mut *self.hub.client.borrow_mut(); + let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) + .header(UserAgent(self.hub._user_agent.clone())) + .header(auth_header.clone()); + + dlg.pre_request(); + req.send() + }; + + match req_result { + Err(err) => { + if let oauth2::Retry::After(d) = dlg.http_error(&err) { + sleep(d); + continue; + } + dlg.finished(false); + return Err(Error::HttpError(err)) + } + Ok(mut res) => { + if !res.status.is_success() { + let mut json_err = String::new(); + res.read_to_string(&mut json_err).unwrap(); + if let oauth2::Retry::After(d) = dlg.http_failure(&res, + json::from_str(&json_err).ok(), + json::from_str(&json_err).ok()) { + sleep(d); + continue; + } + dlg.finished(false); + return match json::from_str::(&json_err){ + Err(_) => Err(Error::Failure(res)), + Ok(serr) => Err(Error::BadRequest(serr)) + } + } + let result_value = { + let mut json_response = String::new(); + res.read_to_string(&mut json_response).unwrap(); + match json::from_str(&json_response) { + Ok(decoded) => (res, decoded), + Err(err) => { + dlg.response_json_decode_error(&json_response, &err); + return Err(Error::JsonDecodeError(json_response, err)); + } + } + }; + + dlg.finished(true); + return Ok(result_value) + } + } + } + } + + + /// The monitored resource descriptor to get. The format is `"projects/{project_id_or_number}/monitoredResourceDescriptors/{resource_type}"`. The `{resource_type}` is a predefined type, such as `cloudsql_database`. + /// + /// Sets the *name* path property to the given value. + /// + /// Even though the property as already been set when instantiating this call, + /// we provide this method for API completeness. + pub fn name(mut self, new_value: &str) -> ProjectMonitoredResourceDescriptorGetCall<'a, C, A> { + self._name = new_value.to_string(); + self + } + /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong + /// while executing the actual API request. + /// + /// It should be used to handle progress information, and to implement a certain level of resilience. + /// + /// Sets the *delegate* property to the given value. + pub fn delegate(mut self, new_value: &'a mut Delegate) -> ProjectMonitoredResourceDescriptorGetCall<'a, C, A> { + self._delegate = Some(new_value); + self + } + + /// Set any additional parameter of the query string used in the request. + /// It should be used to set parameters which are not yet available through their own + /// setters. + /// + /// Please note that this method must not be used to set any of the known paramters + /// which have their own setter method. If done anyway, the request will fail. + /// + /// # Additional Parameters + /// + /// * *bearer_token* (query-string) - OAuth bearer token. + /// * *pp* (query-boolean) - Pretty-print response. + /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. + /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). + /// * *access_token* (query-string) - OAuth access token. + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *quotaUser* (query-string) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + /// * *callback* (query-string) - JSONP + /// * *oauth_token* (query-string) - OAuth 2.0 token for the current user. + /// * *key* (query-string) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. + /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). + /// * *alt* (query-string) - Data format for response. + /// * *$.xgafv* (query-string) - V1 error format. + pub fn param(mut self, name: T, value: T) -> ProjectMonitoredResourceDescriptorGetCall<'a, C, A> + where T: AsRef { + self._additional_params.insert(name.as_ref().to_string(), value.as_ref().to_string()); + self + } + + /// Identifies the authorization scope for the method you are building. + /// + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::CloudPlatform`. + /// + /// The `scope` will be added to a set of scopes. This is important as one can maintain access + /// tokens for more than one scope. + /// + /// Usually there is more than one suitable scope to authorize an operation, some of which may + /// encompass more rights than others. For example, for listing resources, a *read-only* scope will be + /// sufficient, a read-write scope will do as well. + pub fn add_scope(mut self, scope: T) -> ProjectMonitoredResourceDescriptorGetCall<'a, C, A> + where T: AsRef { + self._scopes.insert(scope.as_ref().to_string(), ()); + self + } +} + + +/// Updates an existing group. You can change any group attributes except `name`. +/// +/// A builder for the *groups.update* method supported by a *project* resource. +/// It is not used directly, but through a `ProjectMethods` instance. +/// +/// # Example +/// +/// Instantiate a resource method builder +/// +/// ```test_harness,no_run +/// # extern crate hyper; +/// # extern crate yup_oauth2 as oauth2; +/// # extern crate google_monitoring3 as monitoring3; +/// use monitoring3::Group; +/// # #[test] fn egal() { +/// # use std::default::Default; +/// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; +/// # use monitoring3::Monitoring; +/// +/// # let secret: ApplicationSecret = Default::default(); +/// # let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, +/// # hyper::Client::new(), +/// # ::default(), None); +/// # let mut hub = Monitoring::new(hyper::Client::new(), auth); +/// // As the method needs a request, you would usually fill it with the desired information +/// // into the respective structure. Some of the parts shown here might not be applicable ! +/// // Values shown here are possibly random and not representative ! +/// let mut req = Group::default(); +/// +/// // You can configure optional parameters by calling the respective setters at will, and +/// // execute the final call using `doit()`. +/// // Values shown here are possibly random and not representative ! +/// let result = hub.projects().groups_update(req, "name") +/// .validate_only(false) +/// .doit(); +/// # } +/// ``` +pub struct ProjectGroupUpdateCall<'a, C, A> + where C: 'a, A: 'a { + + hub: &'a Monitoring, + _request: Group, + _name: String, + _validate_only: Option, + _delegate: Option<&'a mut Delegate>, + _additional_params: HashMap, + _scopes: BTreeMap +} + +impl<'a, C, A> CallBuilder for ProjectGroupUpdateCall<'a, C, A> {} + +impl<'a, C, A> ProjectGroupUpdateCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { + + + /// Perform the operation you have build so far. + pub fn doit(mut self) -> Result<(hyper::client::Response, Group)> { + use url::percent_encoding::{percent_encode, FORM_URLENCODED_ENCODE_SET}; + use std::io::{Read, Seek}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; + let mut dd = DefaultDelegate; + let mut dlg: &mut Delegate = match self._delegate { + Some(d) => d, + None => &mut dd + }; + dlg.begin(MethodInfo { id: "monitoring.projects.groups.update", + http_method: hyper::method::Method::Put }); + let mut params: Vec<(&str, String)> = Vec::with_capacity((5 + self._additional_params.len())); + params.push(("name", self._name.to_string())); + if let Some(value) = self._validate_only { + params.push(("validateOnly", value.to_string())); + } + for &field in ["alt", "name", "validateOnly"].iter() { + if self._additional_params.contains_key(field) { + dlg.finished(false); + return Err(Error::FieldClash(field)); + } + } + for (name, value) in self._additional_params.iter() { + params.push((&name, value.clone())); + } + + params.push(("alt", "json".to_string())); + + let mut url = "https://monitoring.googleapis.com/v3/{+name}".to_string(); + if self._scopes.len() == 0 { + self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); + } + + for &(find_this, param_name) in [("{+name}", "name")].iter() { + let mut replace_with = String::new(); + for &(name, ref value) in params.iter() { + if name == param_name { + replace_with = value.to_string(); + break; + } + } + if find_this.as_bytes()[1] == '+' as u8 { + replace_with = percent_encode(replace_with.as_bytes(), FORM_URLENCODED_ENCODE_SET); + } + url = url.replace(find_this, &replace_with); + } + { + let mut indices_for_removal: Vec = Vec::with_capacity(1); + for param_name in ["name"].iter() { + if let Some(index) = params.iter().position(|t| &t.0 == param_name) { + indices_for_removal.push(index); + } + } + for &index in indices_for_removal.iter() { + params.remove(index); + } + } + + if params.len() > 0 { + url.push('?'); + url.push_str(&url::form_urlencoded::serialize(params)); + } + + let mut json_mime_type = mime::Mime(mime::TopLevel::Application, mime::SubLevel::Json, Default::default()); + let mut request_value_reader = + { + let mut value = json::value::to_value(&self._request); + remove_json_null_values(&mut value); + let mut dst = io::Cursor::new(Vec::with_capacity(128)); + json::to_writer(&mut dst, &value).unwrap(); + dst + }; + let request_size = request_value_reader.seek(io::SeekFrom::End(0)).unwrap(); + request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); + + + loop { + let token = match self.hub.auth.borrow_mut().token(self._scopes.keys()) { + Ok(token) => token, + Err(err) => { + match dlg.token(&*err) { + Some(token) => token, + None => { + dlg.finished(false); + return Err(Error::MissingToken(err)) + } + } + } + }; + let auth_header = Authorization(Bearer { token: token.access_token }); + request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); + let mut req_result = { + let mut client = &mut *self.hub.client.borrow_mut(); + let mut req = client.borrow_mut().request(hyper::method::Method::Put, &url) + .header(UserAgent(self.hub._user_agent.clone())) + .header(auth_header.clone()) + .header(ContentType(json_mime_type.clone())) + .header(ContentLength(request_size as u64)) + .body(&mut request_value_reader); + + dlg.pre_request(); + req.send() + }; + + match req_result { + Err(err) => { + if let oauth2::Retry::After(d) = dlg.http_error(&err) { + sleep(d); + continue; + } + dlg.finished(false); + return Err(Error::HttpError(err)) + } + Ok(mut res) => { + if !res.status.is_success() { + let mut json_err = String::new(); + res.read_to_string(&mut json_err).unwrap(); + if let oauth2::Retry::After(d) = dlg.http_failure(&res, + json::from_str(&json_err).ok(), + json::from_str(&json_err).ok()) { + sleep(d); + continue; + } + dlg.finished(false); + return match json::from_str::(&json_err){ + Err(_) => Err(Error::Failure(res)), + Ok(serr) => Err(Error::BadRequest(serr)) + } + } + let result_value = { + let mut json_response = String::new(); + res.read_to_string(&mut json_response).unwrap(); + match json::from_str(&json_response) { + Ok(decoded) => (res, decoded), + Err(err) => { + dlg.response_json_decode_error(&json_response, &err); + return Err(Error::JsonDecodeError(json_response, err)); + } + } + }; + + dlg.finished(true); + return Ok(result_value) + } + } + } + } + + + /// + /// Sets the *request* property to the given value. + /// + /// Even though the property as already been set when instantiating this call, + /// we provide this method for API completeness. + pub fn request(mut self, new_value: Group) -> ProjectGroupUpdateCall<'a, C, A> { + self._request = new_value; + self + } + /// The name of this group. The format is `"projects/{project_id_or_number}/groups/{group_id}"`. When creating a group, this field is ignored and a new name is created consisting of the project specified in the call to `CreateGroup` and a unique `{group_id}` that is generated automatically. @OutputOnly + /// + /// Sets the *name* path property to the given value. + /// + /// Even though the property as already been set when instantiating this call, + /// we provide this method for API completeness. + pub fn name(mut self, new_value: &str) -> ProjectGroupUpdateCall<'a, C, A> { + self._name = new_value.to_string(); + self + } + /// If true, validate this request but do not update the existing group. + /// + /// Sets the *validate only* query property to the given value. + pub fn validate_only(mut self, new_value: bool) -> ProjectGroupUpdateCall<'a, C, A> { + self._validate_only = Some(new_value); + self + } + /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong + /// while executing the actual API request. + /// + /// It should be used to handle progress information, and to implement a certain level of resilience. + /// + /// Sets the *delegate* property to the given value. + pub fn delegate(mut self, new_value: &'a mut Delegate) -> ProjectGroupUpdateCall<'a, C, A> { + self._delegate = Some(new_value); + self + } + + /// Set any additional parameter of the query string used in the request. + /// It should be used to set parameters which are not yet available through their own + /// setters. + /// + /// Please note that this method must not be used to set any of the known paramters + /// which have their own setter method. If done anyway, the request will fail. + /// + /// # Additional Parameters + /// + /// * *bearer_token* (query-string) - OAuth bearer token. + /// * *pp* (query-boolean) - Pretty-print response. + /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. + /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). + /// * *access_token* (query-string) - OAuth access token. + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *quotaUser* (query-string) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + /// * *callback* (query-string) - JSONP + /// * *oauth_token* (query-string) - OAuth 2.0 token for the current user. + /// * *key* (query-string) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. + /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). + /// * *alt* (query-string) - Data format for response. + /// * *$.xgafv* (query-string) - V1 error format. + pub fn param(mut self, name: T, value: T) -> ProjectGroupUpdateCall<'a, C, A> + where T: AsRef { + self._additional_params.insert(name.as_ref().to_string(), value.as_ref().to_string()); + self + } + + /// Identifies the authorization scope for the method you are building. + /// + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::CloudPlatform`. + /// + /// The `scope` will be added to a set of scopes. This is important as one can maintain access + /// tokens for more than one scope. + /// + /// Usually there is more than one suitable scope to authorize an operation, some of which may + /// encompass more rights than others. For example, for listing resources, a *read-only* scope will be + /// sufficient, a read-write scope will do as well. + pub fn add_scope(mut self, scope: T) -> ProjectGroupUpdateCall<'a, C, A> + where T: AsRef { + self._scopes.insert(scope.as_ref().to_string(), ()); + self + } +} + + +/// Deletes an existing group. +/// +/// A builder for the *groups.delete* method supported by a *project* resource. +/// It is not used directly, but through a `ProjectMethods` instance. +/// +/// # Example +/// +/// Instantiate a resource method builder +/// +/// ```test_harness,no_run +/// # extern crate hyper; +/// # extern crate yup_oauth2 as oauth2; +/// # extern crate google_monitoring3 as monitoring3; +/// # #[test] fn egal() { +/// # use std::default::Default; +/// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; +/// # use monitoring3::Monitoring; +/// +/// # let secret: ApplicationSecret = Default::default(); +/// # let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, +/// # hyper::Client::new(), +/// # ::default(), None); +/// # let mut hub = Monitoring::new(hyper::Client::new(), auth); +/// // You can configure optional parameters by calling the respective setters at will, and +/// // execute the final call using `doit()`. +/// // Values shown here are possibly random and not representative ! +/// let result = hub.projects().groups_delete("name") +/// .doit(); +/// # } +/// ``` +pub struct ProjectGroupDeleteCall<'a, C, A> + where C: 'a, A: 'a { + + hub: &'a Monitoring, + _name: String, + _delegate: Option<&'a mut Delegate>, + _additional_params: HashMap, + _scopes: BTreeMap +} + +impl<'a, C, A> CallBuilder for ProjectGroupDeleteCall<'a, C, A> {} + +impl<'a, C, A> ProjectGroupDeleteCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { + + + /// Perform the operation you have build so far. + pub fn doit(mut self) -> Result<(hyper::client::Response, Empty)> { + use url::percent_encoding::{percent_encode, FORM_URLENCODED_ENCODE_SET}; + use std::io::{Read, Seek}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; + let mut dd = DefaultDelegate; + let mut dlg: &mut Delegate = match self._delegate { + Some(d) => d, + None => &mut dd + }; + dlg.begin(MethodInfo { id: "monitoring.projects.groups.delete", + http_method: hyper::method::Method::Delete }); + let mut params: Vec<(&str, String)> = Vec::with_capacity((3 + self._additional_params.len())); + params.push(("name", self._name.to_string())); + for &field in ["alt", "name"].iter() { + if self._additional_params.contains_key(field) { + dlg.finished(false); + return Err(Error::FieldClash(field)); + } + } + for (name, value) in self._additional_params.iter() { + params.push((&name, value.clone())); + } + + params.push(("alt", "json".to_string())); + + let mut url = "https://monitoring.googleapis.com/v3/{+name}".to_string(); + if self._scopes.len() == 0 { + self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); + } + + for &(find_this, param_name) in [("{+name}", "name")].iter() { + let mut replace_with = String::new(); + for &(name, ref value) in params.iter() { + if name == param_name { + replace_with = value.to_string(); + break; + } + } + if find_this.as_bytes()[1] == '+' as u8 { + replace_with = percent_encode(replace_with.as_bytes(), FORM_URLENCODED_ENCODE_SET); + } + url = url.replace(find_this, &replace_with); + } + { + let mut indices_for_removal: Vec = Vec::with_capacity(1); + for param_name in ["name"].iter() { + if let Some(index) = params.iter().position(|t| &t.0 == param_name) { + indices_for_removal.push(index); + } + } + for &index in indices_for_removal.iter() { + params.remove(index); + } + } + + if params.len() > 0 { + url.push('?'); + url.push_str(&url::form_urlencoded::serialize(params)); + } + + + + loop { + let token = match self.hub.auth.borrow_mut().token(self._scopes.keys()) { + Ok(token) => token, + Err(err) => { + match dlg.token(&*err) { + Some(token) => token, + None => { + dlg.finished(false); + return Err(Error::MissingToken(err)) + } + } + } + }; + let auth_header = Authorization(Bearer { token: token.access_token }); + let mut req_result = { + let mut client = &mut *self.hub.client.borrow_mut(); + let mut req = client.borrow_mut().request(hyper::method::Method::Delete, &url) + .header(UserAgent(self.hub._user_agent.clone())) + .header(auth_header.clone()); + + dlg.pre_request(); + req.send() + }; + + match req_result { + Err(err) => { + if let oauth2::Retry::After(d) = dlg.http_error(&err) { + sleep(d); + continue; + } + dlg.finished(false); + return Err(Error::HttpError(err)) + } + Ok(mut res) => { + if !res.status.is_success() { + let mut json_err = String::new(); + res.read_to_string(&mut json_err).unwrap(); + if let oauth2::Retry::After(d) = dlg.http_failure(&res, + json::from_str(&json_err).ok(), + json::from_str(&json_err).ok()) { + sleep(d); + continue; + } + dlg.finished(false); + return match json::from_str::(&json_err){ + Err(_) => Err(Error::Failure(res)), + Ok(serr) => Err(Error::BadRequest(serr)) + } + } + let result_value = { + let mut json_response = String::new(); + res.read_to_string(&mut json_response).unwrap(); + match json::from_str(&json_response) { + Ok(decoded) => (res, decoded), + Err(err) => { + dlg.response_json_decode_error(&json_response, &err); + return Err(Error::JsonDecodeError(json_response, err)); + } + } + }; + + dlg.finished(true); + return Ok(result_value) + } + } + } + } + + + /// The group to delete. The format is `"projects/{project_id_or_number}/groups/{group_id}"`. + /// + /// Sets the *name* path property to the given value. + /// + /// Even though the property as already been set when instantiating this call, + /// we provide this method for API completeness. + pub fn name(mut self, new_value: &str) -> ProjectGroupDeleteCall<'a, C, A> { + self._name = new_value.to_string(); + self + } + /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong + /// while executing the actual API request. + /// + /// It should be used to handle progress information, and to implement a certain level of resilience. + /// + /// Sets the *delegate* property to the given value. + pub fn delegate(mut self, new_value: &'a mut Delegate) -> ProjectGroupDeleteCall<'a, C, A> { + self._delegate = Some(new_value); + self + } + + /// Set any additional parameter of the query string used in the request. + /// It should be used to set parameters which are not yet available through their own + /// setters. + /// + /// Please note that this method must not be used to set any of the known paramters + /// which have their own setter method. If done anyway, the request will fail. + /// + /// # Additional Parameters + /// + /// * *bearer_token* (query-string) - OAuth bearer token. + /// * *pp* (query-boolean) - Pretty-print response. + /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. + /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). + /// * *access_token* (query-string) - OAuth access token. + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *quotaUser* (query-string) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + /// * *callback* (query-string) - JSONP + /// * *oauth_token* (query-string) - OAuth 2.0 token for the current user. + /// * *key* (query-string) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. + /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). + /// * *alt* (query-string) - Data format for response. + /// * *$.xgafv* (query-string) - V1 error format. + pub fn param(mut self, name: T, value: T) -> ProjectGroupDeleteCall<'a, C, A> + where T: AsRef { + self._additional_params.insert(name.as_ref().to_string(), value.as_ref().to_string()); + self + } + + /// Identifies the authorization scope for the method you are building. + /// + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::CloudPlatform`. + /// + /// The `scope` will be added to a set of scopes. This is important as one can maintain access + /// tokens for more than one scope. + /// + /// Usually there is more than one suitable scope to authorize an operation, some of which may + /// encompass more rights than others. For example, for listing resources, a *read-only* scope will be + /// sufficient, a read-write scope will do as well. + pub fn add_scope(mut self, scope: T) -> ProjectGroupDeleteCall<'a, C, A> + where T: AsRef { + self._scopes.insert(scope.as_ref().to_string(), ()); + self + } +} + + +/// Lists time series that match a filter. +/// +/// A builder for the *timeSeries.list* method supported by a *project* resource. +/// It is not used directly, but through a `ProjectMethods` instance. +/// +/// # Example +/// +/// Instantiate a resource method builder +/// +/// ```test_harness,no_run +/// # extern crate hyper; +/// # extern crate yup_oauth2 as oauth2; +/// # extern crate google_monitoring3 as monitoring3; +/// # #[test] fn egal() { +/// # use std::default::Default; +/// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; +/// # use monitoring3::Monitoring; +/// +/// # let secret: ApplicationSecret = Default::default(); +/// # let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, +/// # hyper::Client::new(), +/// # ::default(), None); +/// # let mut hub = Monitoring::new(hyper::Client::new(), auth); +/// // You can configure optional parameters by calling the respective setters at will, and +/// // execute the final call using `doit()`. +/// // Values shown here are possibly random and not representative ! +/// let result = hub.projects().time_series_list("name") +/// .view("sadipscing") +/// .page_token("dolor") +/// .page_size(-39) +/// .order_by("elitr") +/// .interval_start_time("amet") +/// .interval_end_time("no") +/// .filter("labore") +/// .aggregation_per_series_aligner("eirmod") +/// .add_aggregation_group_by_fields("dolore") +/// .aggregation_cross_series_reducer("invidunt") +/// .aggregation_alignment_period("aliquyam") +/// .doit(); +/// # } +/// ``` +pub struct ProjectTimeSeryListCall<'a, C, A> + where C: 'a, A: 'a { + + hub: &'a Monitoring, + _name: String, + _view: Option, + _page_token: Option, + _page_size: Option, + _order_by: Option, + _interval_start_time: Option, + _interval_end_time: Option, + _filter: Option, + _aggregation_per_series_aligner: Option, + _aggregation_group_by_fields: Vec, + _aggregation_cross_series_reducer: Option, + _aggregation_alignment_period: Option, + _delegate: Option<&'a mut Delegate>, + _additional_params: HashMap, + _scopes: BTreeMap +} + +impl<'a, C, A> CallBuilder for ProjectTimeSeryListCall<'a, C, A> {} + +impl<'a, C, A> ProjectTimeSeryListCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { + + + /// Perform the operation you have build so far. + pub fn doit(mut self) -> Result<(hyper::client::Response, ListTimeSeriesResponse)> { + use url::percent_encoding::{percent_encode, FORM_URLENCODED_ENCODE_SET}; + use std::io::{Read, Seek}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; + let mut dd = DefaultDelegate; + let mut dlg: &mut Delegate = match self._delegate { + Some(d) => d, + None => &mut dd + }; + dlg.begin(MethodInfo { id: "monitoring.projects.timeSeries.list", + http_method: hyper::method::Method::Get }); + let mut params: Vec<(&str, String)> = Vec::with_capacity((14 + self._additional_params.len())); + params.push(("name", self._name.to_string())); + if let Some(value) = self._view { + params.push(("view", value.to_string())); + } + if let Some(value) = self._page_token { + params.push(("pageToken", value.to_string())); + } + if let Some(value) = self._page_size { + params.push(("pageSize", value.to_string())); + } + if let Some(value) = self._order_by { + params.push(("orderBy", value.to_string())); + } + if let Some(value) = self._interval_start_time { + params.push(("interval.startTime", value.to_string())); + } + if let Some(value) = self._interval_end_time { + params.push(("interval.endTime", value.to_string())); + } + if let Some(value) = self._filter { + params.push(("filter", value.to_string())); + } + if let Some(value) = self._aggregation_per_series_aligner { + params.push(("aggregation.perSeriesAligner", value.to_string())); + } + if self._aggregation_group_by_fields.len() > 0 { + for f in self._aggregation_group_by_fields.iter() { + params.push(("aggregation.groupByFields", f.to_string())); + } + } + if let Some(value) = self._aggregation_cross_series_reducer { + params.push(("aggregation.crossSeriesReducer", value.to_string())); + } + if let Some(value) = self._aggregation_alignment_period { + params.push(("aggregation.alignmentPeriod", value.to_string())); + } + for &field in ["alt", "name", "view", "pageToken", "pageSize", "orderBy", "interval.startTime", "interval.endTime", "filter", "aggregation.perSeriesAligner", "aggregation.groupByFields", "aggregation.crossSeriesReducer", "aggregation.alignmentPeriod"].iter() { + if self._additional_params.contains_key(field) { + dlg.finished(false); + return Err(Error::FieldClash(field)); + } + } + for (name, value) in self._additional_params.iter() { + params.push((&name, value.clone())); + } + + params.push(("alt", "json".to_string())); + + let mut url = "https://monitoring.googleapis.com/v3/{+name}/timeSeries".to_string(); + if self._scopes.len() == 0 { + self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); + } + + for &(find_this, param_name) in [("{+name}", "name")].iter() { + let mut replace_with = String::new(); + for &(name, ref value) in params.iter() { + if name == param_name { + replace_with = value.to_string(); + break; + } + } + if find_this.as_bytes()[1] == '+' as u8 { + replace_with = percent_encode(replace_with.as_bytes(), FORM_URLENCODED_ENCODE_SET); + } + url = url.replace(find_this, &replace_with); + } + { + let mut indices_for_removal: Vec = Vec::with_capacity(1); + for param_name in ["name"].iter() { + if let Some(index) = params.iter().position(|t| &t.0 == param_name) { + indices_for_removal.push(index); + } + } + for &index in indices_for_removal.iter() { + params.remove(index); + } + } + + if params.len() > 0 { + url.push('?'); + url.push_str(&url::form_urlencoded::serialize(params)); + } + + + + loop { + let token = match self.hub.auth.borrow_mut().token(self._scopes.keys()) { + Ok(token) => token, + Err(err) => { + match dlg.token(&*err) { + Some(token) => token, + None => { + dlg.finished(false); + return Err(Error::MissingToken(err)) + } + } + } + }; + let auth_header = Authorization(Bearer { token: token.access_token }); + let mut req_result = { + let mut client = &mut *self.hub.client.borrow_mut(); + let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) + .header(UserAgent(self.hub._user_agent.clone())) + .header(auth_header.clone()); + + dlg.pre_request(); + req.send() + }; + + match req_result { + Err(err) => { + if let oauth2::Retry::After(d) = dlg.http_error(&err) { + sleep(d); + continue; + } + dlg.finished(false); + return Err(Error::HttpError(err)) + } + Ok(mut res) => { + if !res.status.is_success() { + let mut json_err = String::new(); + res.read_to_string(&mut json_err).unwrap(); + if let oauth2::Retry::After(d) = dlg.http_failure(&res, + json::from_str(&json_err).ok(), + json::from_str(&json_err).ok()) { + sleep(d); + continue; + } + dlg.finished(false); + return match json::from_str::(&json_err){ + Err(_) => Err(Error::Failure(res)), + Ok(serr) => Err(Error::BadRequest(serr)) + } + } + let result_value = { + let mut json_response = String::new(); + res.read_to_string(&mut json_response).unwrap(); + match json::from_str(&json_response) { + Ok(decoded) => (res, decoded), + Err(err) => { + dlg.response_json_decode_error(&json_response, &err); + return Err(Error::JsonDecodeError(json_response, err)); + } + } + }; + + dlg.finished(true); + return Ok(result_value) + } + } + } + } + + + /// The project on which to execute the request. The format is "projects/{project_id_or_number}". + /// + /// Sets the *name* path property to the given value. + /// + /// Even though the property as already been set when instantiating this call, + /// we provide this method for API completeness. + pub fn name(mut self, new_value: &str) -> ProjectTimeSeryListCall<'a, C, A> { + self._name = new_value.to_string(); + self + } + /// Specifies which information is returned about the time series. + /// + /// Sets the *view* query property to the given value. + pub fn view(mut self, new_value: &str) -> ProjectTimeSeryListCall<'a, C, A> { + self._view = Some(new_value.to_string()); + self + } + /// If this field is not empty then it must contain the `nextPageToken` value returned by a previous call to this method. Using this field causes the method to return additional results from the previous method call. + /// + /// Sets the *page token* query property to the given value. + pub fn page_token(mut self, new_value: &str) -> ProjectTimeSeryListCall<'a, C, A> { + self._page_token = Some(new_value.to_string()); + self + } + /// A positive number that is the maximum number of results to return. When `view` field sets to `FULL`, it limits the number of `Points` server will return; if `view` field is `HEADERS`, it limits the number of `TimeSeries` server will return. + /// + /// Sets the *page size* query property to the given value. + pub fn page_size(mut self, new_value: i32) -> ProjectTimeSeryListCall<'a, C, A> { + self._page_size = Some(new_value); + self + } + /// Specifies the order in which the points of the time series should be returned. By default, results are not ordered. Currently, this field must be left blank. + /// + /// Sets the *order by* query property to the given value. + pub fn order_by(mut self, new_value: &str) -> ProjectTimeSeryListCall<'a, C, A> { + self._order_by = Some(new_value.to_string()); + self + } + /// (optional) If omitted, the interval is a point in time, `endTime`. If `startTime` is present, it must be earlier than (less than) `endTime`. The interval begins after `startTime`—it does not include `startTime`. + /// + /// Sets the *interval.start time* query property to the given value. + pub fn interval_start_time(mut self, new_value: &str) -> ProjectTimeSeryListCall<'a, C, A> { + self._interval_start_time = Some(new_value.to_string()); + self + } + /// (required) The end of the interval. The interval includes this time. + /// + /// Sets the *interval.end time* query property to the given value. + pub fn interval_end_time(mut self, new_value: &str) -> ProjectTimeSeryListCall<'a, C, A> { + self._interval_end_time = Some(new_value.to_string()); + self + } + /// A [monitoring filter](/monitoring/api/v3/filters) that specifies which time series should be returned. The filter must specify a single metric type, and can additionally specify metric labels and other information. For example: metric.type = "compute.googleapis.com/instance/cpu/usage_time" AND metric.label.instance_name = "my-instance-name" + /// + /// Sets the *filter* query property to the given value. + pub fn filter(mut self, new_value: &str) -> ProjectTimeSeryListCall<'a, C, A> { + self._filter = Some(new_value.to_string()); + self + } + /// The approach to be used to align individual time series. Not all alignment functions may be applied to all time series, depending on the metric type and value type of the original time series. Alignment may change the metric type or the value type of the time series. Time series data must be aligned in order to perform cross-time series reduction. If `crossSeriesReducer` is specified, then `perSeriesAligner` must be specified and not equal `ALIGN_NONE` and `alignmentPeriod` must be specified; otherwise, an error is returned. + /// + /// Sets the *aggregation.per series aligner* query property to the given value. + pub fn aggregation_per_series_aligner(mut self, new_value: &str) -> ProjectTimeSeryListCall<'a, C, A> { + self._aggregation_per_series_aligner = Some(new_value.to_string()); + self + } + /// The set of fields to preserve when `crossSeriesReducer` is specified. The `groupByFields` determine how the time series are partitioned into subsets prior to applying the aggregation function. Each subset contains time series that have the same value for each of the grouping fields. Each individual time series is a member of exactly one subset. The `crossSeriesReducer` is applied to each subset of time series. Fields not specified in `groupByFields` are aggregated away. If `groupByFields` is not specified, the time series are aggregated into a single output time series. If `crossSeriesReducer` is not defined, this field is ignored. + /// + /// Append the given value to the *aggregation.group by fields* query property. + /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. + pub fn add_aggregation_group_by_fields(mut self, new_value: &str) -> ProjectTimeSeryListCall<'a, C, A> { + self._aggregation_group_by_fields.push(new_value.to_string()); + self + } + /// The approach to be used to combine time series. Not all reducer functions may be applied to all time series, depending on the metric type and the value type of the original time series. Reduction may change the metric type of value type of the time series. Time series data must be aligned in order to perform cross-time series reduction. If `crossSeriesReducer` is specified, then `perSeriesAligner` must be specified and not equal `ALIGN_NONE` and `alignmentPeriod` must be specified; otherwise, an error is returned. + /// + /// Sets the *aggregation.cross series reducer* query property to the given value. + pub fn aggregation_cross_series_reducer(mut self, new_value: &str) -> ProjectTimeSeryListCall<'a, C, A> { + self._aggregation_cross_series_reducer = Some(new_value.to_string()); + self + } + /// The alignment period for per-[time series](TimeSeries) alignment. If present, `alignmentPeriod` must be at least 60 seconds. After per-time series alignment, each time series will contain data points only on the period boundaries. If `perSeriesAligner` is not specified or equals `ALIGN_NONE`, then this field is ignored. If `perSeriesAligner` is specified and does not equal `ALIGN_NONE`, then this field must be defined; otherwise an error is returned. + /// + /// Sets the *aggregation.alignment period* query property to the given value. + pub fn aggregation_alignment_period(mut self, new_value: &str) -> ProjectTimeSeryListCall<'a, C, A> { + self._aggregation_alignment_period = Some(new_value.to_string()); + self + } + /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong + /// while executing the actual API request. + /// + /// It should be used to handle progress information, and to implement a certain level of resilience. + /// + /// Sets the *delegate* property to the given value. + pub fn delegate(mut self, new_value: &'a mut Delegate) -> ProjectTimeSeryListCall<'a, C, A> { + self._delegate = Some(new_value); + self + } + + /// Set any additional parameter of the query string used in the request. + /// It should be used to set parameters which are not yet available through their own + /// setters. + /// + /// Please note that this method must not be used to set any of the known paramters + /// which have their own setter method. If done anyway, the request will fail. + /// + /// # Additional Parameters + /// + /// * *bearer_token* (query-string) - OAuth bearer token. + /// * *pp* (query-boolean) - Pretty-print response. + /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. + /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). + /// * *access_token* (query-string) - OAuth access token. + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *quotaUser* (query-string) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + /// * *callback* (query-string) - JSONP + /// * *oauth_token* (query-string) - OAuth 2.0 token for the current user. + /// * *key* (query-string) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. + /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). + /// * *alt* (query-string) - Data format for response. + /// * *$.xgafv* (query-string) - V1 error format. + pub fn param(mut self, name: T, value: T) -> ProjectTimeSeryListCall<'a, C, A> + where T: AsRef { + self._additional_params.insert(name.as_ref().to_string(), value.as_ref().to_string()); + self + } + + /// Identifies the authorization scope for the method you are building. + /// + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::CloudPlatform`. + /// + /// The `scope` will be added to a set of scopes. This is important as one can maintain access + /// tokens for more than one scope. + /// + /// Usually there is more than one suitable scope to authorize an operation, some of which may + /// encompass more rights than others. For example, for listing resources, a *read-only* scope will be + /// sufficient, a read-write scope will do as well. + pub fn add_scope(mut self, scope: T) -> ProjectTimeSeryListCall<'a, C, A> + where T: AsRef { + self._scopes.insert(scope.as_ref().to_string(), ()); + self + } +} + + diff --git a/gen/oauth2_v2-cli/Cargo.toml b/gen/oauth2_v2-cli/Cargo.toml index c1fe511001..a2fe164080 100644 --- a/gen/oauth2_v2-cli/Cargo.toml +++ b/gen/oauth2_v2-cli/Cargo.toml @@ -4,7 +4,7 @@ [package] name = "google-oauth2_v2-cli" -version = "0.3.3+20160217" +version = "0.3.4+20160330" authors = ["Sebastian Thiel "] description = "A complete library to interact with oauth2 (protocol v2)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/oauth2_v2-cli" @@ -17,18 +17,18 @@ keywords = ["oauth2", "google", "cli"] name = "oauth2-v2" [dependencies] -hyper = "0.7" -mime = "0.1.0" -serde = ">= 0.7.0" -serde_json = ">= 0.7.0" -yup-oauth2 = ">= 0.5.4" +hyper = "0.8" +mime = "0.2.0" +serde = "0.6.0" +serde_json = "0.6.0" +yup-oauth2 = ">= 0.5.6" strsim = "0.4" yup-hyper-mock = "1.0" clap = "2.0" [build-dependencies] -syntex = { version = ">= 0.23" } -serde_codegen = { version = ">= 0.6" } +syntex = { version = "= 0.28" } +serde_codegen = { version = "= 0.6.13" } [dependencies.google-oauth2_v2] diff --git a/gen/oauth2_v2-cli/README.md b/gen/oauth2_v2-cli/README.md index 7eefefc10f..de4e544737 100644 --- a/gen/oauth2_v2-cli/README.md +++ b/gen/oauth2_v2-cli/README.md @@ -17,14 +17,14 @@ Everything else about the *oauth2* API can be found at the You can download the pre-compiled 64bit binaries for the following platforms: -* ![icon](http://megaicons.net/static/img/icons_sizes/6/140/16/ubuntu-icon.png) [ubuntu](http://dl.byronimo.de/google.rs/cli/0.3.3/ubuntu/oauth2-v2.tar.gz) -* ![icon](http://hydra-media.cursecdn.com/wow.gamepedia.com/a/a2/Apple-icon-16x16.png?version=25ddd67ac3dd3b634478e3978b76cb74) [osx](http://dl.byronimo.de/google.rs/cli/0.3.3/osx/oauth2-v2.tar.gz) +* ![icon](http://megaicons.net/static/img/icons_sizes/6/140/16/ubuntu-icon.png) [ubuntu](http://dl.byronimo.de/google.rs/cli/0.3.4/ubuntu/oauth2-v2.tar.gz) +* ![icon](http://hydra-media.cursecdn.com/wow.gamepedia.com/a/a2/Apple-icon-16x16.png?version=25ddd67ac3dd3b634478e3978b76cb74) [osx](http://dl.byronimo.de/google.rs/cli/0.3.4/osx/oauth2-v2.tar.gz) Find the source code [on github](https://github.com/Byron/google-apis-rs/tree/master/gen/oauth2_v2-cli). # Usage -This documentation was generated from the *oauth2* API at revision *20160217*. The CLI is at version *0.3.3*. +This documentation was generated from the *oauth2* API at revision *20160330*. The CLI is at version *0.3.4*. ```bash oauth2-v2 [options] diff --git a/gen/oauth2_v2-cli/mkdocs.yml b/gen/oauth2_v2-cli/mkdocs.yml index e38784d2e5..c4a7792f98 100644 --- a/gen/oauth2_v2-cli/mkdocs.yml +++ b/gen/oauth2_v2-cli/mkdocs.yml @@ -1,4 +1,4 @@ -site_name: oauth2 v0.3.3+20160217 +site_name: oauth2 v0.3.4+20160330 site_url: http://byron.github.io/google-apis-rs/google-oauth2_v2-cli site_description: Write integrating applications with bcore diff --git a/gen/oauth2_v2-cli/src/cmn.rs b/gen/oauth2_v2-cli/src/cmn.rs index 188159ee80..ae86fdef65 100644 --- a/gen/oauth2_v2-cli/src/cmn.rs +++ b/gen/oauth2_v2-cli/src/cmn.rs @@ -414,7 +414,7 @@ impl TokenStorage for JsonTokenStorage { Err(err) => match err.kind() { io::ErrorKind::NotFound => Ok(()), - _ => Err(json::Error::Io(err)) + _ => Err(json::Error::IoError(err)) }, Ok(_) => Ok(()), } @@ -427,7 +427,7 @@ impl TokenStorage for JsonTokenStorage { Err(serde_err) => Err(serde_err), } }, - Err(io_err) => Err(json::Error::Io(io_err)) + Err(io_err) => Err(json::Error::IoError(io_err)) } } } @@ -444,7 +444,7 @@ impl TokenStorage for JsonTokenStorage { Err(io_err) => { match io_err.kind() { io::ErrorKind::NotFound => Ok(None), - _ => Err(json::Error::Io(io_err)) + _ => Err(json::Error::IoError(io_err)) } } } @@ -683,7 +683,7 @@ pub fn application_secret_from_directory(dir: &str, = json::from_str(json_console_secret).unwrap(); match json::to_writer_pretty(&mut f, &console_secret) { Err(serde_err) => match serde_err { - json::Error::Io(err) => err, + json::Error::IoError(err) => err, _ => panic!("Unexpected serde error: {:#?}", serde_err) }, Ok(_) => continue, @@ -696,7 +696,7 @@ pub fn application_secret_from_directory(dir: &str, }, Ok(f) => { match json::de::from_reader::<_, ConsoleApplicationSecret>(f) { - Err(json::Error::Io(err)) => + Err(json::Error::IoError(err)) => return secret_io_error(err), Err(json_err) => return Err(CLIError::Configuration( diff --git a/gen/oauth2_v2-cli/src/main.rs b/gen/oauth2_v2-cli/src/main.rs index c99dfddf4b..b9dd7994a7 100644 --- a/gen/oauth2_v2-cli/src/main.rs +++ b/gen/oauth2_v2-cli/src/main.rs @@ -446,8 +446,8 @@ fn main() { let mut app = App::new("oauth2-v2") .author("Sebastian Thiel ") - .version("0.3.3+20160217") - .about("Lets you access OAuth2 protocol related APIs.") + .version("0.3.4+20160330") + .about("Obtains end-user authorization grants for use with other Google APIs.") .after_help("All documentation details can be found at http://byron.github.io/google-apis-rs/google_oauth2_v2_cli") .arg(Arg::with_name("url") .long("scope") diff --git a/gen/oauth2_v2/Cargo.toml b/gen/oauth2_v2/Cargo.toml index 453c449b56..be7e30a097 100644 --- a/gen/oauth2_v2/Cargo.toml +++ b/gen/oauth2_v2/Cargo.toml @@ -4,7 +4,7 @@ [package] name = "google-oauth2_v2" -version = "0.1.12+20160217" +version = "0.1.13+20160330" authors = ["Sebastian Thiel "] description = "A complete library to interact with oauth2 (protocol v2)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/oauth2_v2" @@ -16,14 +16,14 @@ build = "src/build.rs" [dependencies] -hyper = "0.7" -mime = "0.1.0" -serde = ">= 0.7.0" -serde_json = ">= 0.7.0" -yup-oauth2 = ">= 0.5.4" +hyper = "0.8" +mime = "0.2.0" +serde = "0.6.0" +serde_json = "0.6.0" +yup-oauth2 = ">= 0.5.6" url = ">= 0.5" [build-dependencies] -syntex = { version = ">= 0.23" } -serde_codegen = { version = ">= 0.6" } +syntex = { version = "= 0.28" } +serde_codegen = { version = "= 0.6.13" } diff --git a/gen/oauth2_v2/README.md b/gen/oauth2_v2/README.md index 352297a9b7..89945a4dbe 100644 --- a/gen/oauth2_v2/README.md +++ b/gen/oauth2_v2/README.md @@ -5,7 +5,7 @@ DO NOT EDIT ! --> The `google-oauth2_v2` library allows access to all features of the *Google oauth2* service. -This documentation was generated from *oauth2* crate version *0.1.12+20160217*, where *20160217* is the exact revision of the *oauth2:v2* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.12*. +This documentation was generated from *oauth2* crate version *0.1.13+20160330*, where *20160330* is the exact revision of the *oauth2:v2* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.13*. Everything else about the *oauth2* *v2* API can be found at the [official documentation site](https://developers.google.com/accounts/docs/OAuth2). diff --git a/gen/oauth2_v2/src/cmn.rs b/gen/oauth2_v2/src/cmn.rs index 87b91a8986..c69621da55 100644 --- a/gen/oauth2_v2/src/cmn.rs +++ b/gen/oauth2_v2/src/cmn.rs @@ -12,7 +12,7 @@ use mime::{Mime, TopLevel, SubLevel, Attr, Value}; use oauth2::{TokenType, Retry, self}; use hyper; use hyper::header::{ContentType, ContentLength, Headers, UserAgent, Authorization, Header, - HeaderFormat}; + HeaderFormat, Bearer}; use hyper::http::h1::LINE_ENDING; use hyper::method::Method; use hyper::status::StatusCode; @@ -634,7 +634,7 @@ pub struct ResumableUploadHelper<'a, A: 'a> { pub start_at: Option, pub auth: &'a mut A, pub user_agent: &'a str, - pub auth_header: Authorization, + pub auth_header: Authorization, pub url: &'a str, pub reader: &'a mut ReadSeek, pub media_type: Mime, diff --git a/gen/oauth2_v2/src/lib.rs b/gen/oauth2_v2/src/lib.rs index ee25db0325..eea8f91163 100644 --- a/gen/oauth2_v2/src/lib.rs +++ b/gen/oauth2_v2/src/lib.rs @@ -2,7 +2,7 @@ // This file was generated automatically from 'src/mako/api/lib.rs.mako' // DO NOT EDIT ! -//! This documentation was generated from *oauth2* crate version *0.1.12+20160217*, where *20160217* is the exact revision of the *oauth2:v2* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.12*. +//! This documentation was generated from *oauth2* crate version *0.1.13+20160330*, where *20160330* is the exact revision of the *oauth2:v2* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.13*. //! //! Everything else about the *oauth2* *v2* API can be found at the //! [official documentation site](https://developers.google.com/accounts/docs/OAuth2). diff --git a/gen/oauth2_v2/src/lib.rs.in b/gen/oauth2_v2/src/lib.rs.in index 3a35f46917..4ca6bd478a 100644 --- a/gen/oauth2_v2/src/lib.rs.in +++ b/gen/oauth2_v2/src/lib.rs.in @@ -139,7 +139,7 @@ impl<'a, C, A> Oauth2 Oauth2 { client: RefCell::new(client), auth: RefCell::new(authenticator), - _user_agent: "google-api-rust-client/0.1.12".to_string(), + _user_agent: "google-api-rust-client/0.1.13".to_string(), } } @@ -151,7 +151,7 @@ impl<'a, C, A> Oauth2 } /// Set the user-agent header field to use in all requests to the server. - /// It defaults to `google-api-rust-client/0.1.12`. + /// It defaults to `google-api-rust-client/0.1.13`. /// /// Returns the previously set user-agent. pub fn user_agent(&mut self, agent_name: String) -> String { @@ -456,7 +456,7 @@ impl<'a, C, A> UserinfoV2MeGetCall<'a, C, A> where C: BorrowMut, /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Userinfoplus)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -503,8 +503,7 @@ impl<'a, C, A> UserinfoV2MeGetCall<'a, C, A> where C: BorrowMut, } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -657,7 +656,7 @@ impl<'a, C, A> UserinfoGetCall<'a, C, A> where C: BorrowMut, A: o /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Userinfoplus)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -704,8 +703,7 @@ impl<'a, C, A> UserinfoGetCall<'a, C, A> where C: BorrowMut, A: o } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -863,7 +861,7 @@ impl<'a, C, A> MethodTokeninfoCall<'a, C, A> where C: BorrowMut, /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Tokeninfo)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -1068,7 +1066,7 @@ impl<'a, C, A> MethodGetCertForOpenIdConnectCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, Jwk)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, diff --git a/gen/pagespeedonline2-cli/Cargo.toml b/gen/pagespeedonline2-cli/Cargo.toml index 1f47247494..3ba9cf18f2 100644 --- a/gen/pagespeedonline2-cli/Cargo.toml +++ b/gen/pagespeedonline2-cli/Cargo.toml @@ -4,7 +4,7 @@ [package] name = "google-pagespeedonline2-cli" -version = "0.3.3+20150317" +version = "0.3.4+20160306" authors = ["Sebastian Thiel "] description = "A complete library to interact with pagespeedonline (protocol v2)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/pagespeedonline2-cli" @@ -17,18 +17,18 @@ keywords = ["pagespeedonline", "google", "cli"] name = "pagespeedonline2" [dependencies] -hyper = "0.7" -mime = "0.1.0" -serde = ">= 0.7.0" -serde_json = ">= 0.7.0" -yup-oauth2 = ">= 0.5.4" +hyper = "0.8" +mime = "0.2.0" +serde = "0.6.0" +serde_json = "0.6.0" +yup-oauth2 = ">= 0.5.6" strsim = "0.4" yup-hyper-mock = "1.0" clap = "2.0" [build-dependencies] -syntex = { version = ">= 0.23" } -serde_codegen = { version = ">= 0.6" } +syntex = { version = "= 0.28" } +serde_codegen = { version = "= 0.6.13" } [dependencies.google-pagespeedonline2] diff --git a/gen/pagespeedonline2-cli/README.md b/gen/pagespeedonline2-cli/README.md index cd60adc4fe..ac834e87bb 100644 --- a/gen/pagespeedonline2-cli/README.md +++ b/gen/pagespeedonline2-cli/README.md @@ -17,14 +17,14 @@ Everything else about the *pagespeedonline* API can be found at the You can download the pre-compiled 64bit binaries for the following platforms: -* ![icon](http://megaicons.net/static/img/icons_sizes/6/140/16/ubuntu-icon.png) [ubuntu](http://dl.byronimo.de/google.rs/cli/0.3.3/ubuntu/pagespeedonline2.tar.gz) -* ![icon](http://hydra-media.cursecdn.com/wow.gamepedia.com/a/a2/Apple-icon-16x16.png?version=25ddd67ac3dd3b634478e3978b76cb74) [osx](http://dl.byronimo.de/google.rs/cli/0.3.3/osx/pagespeedonline2.tar.gz) +* ![icon](http://megaicons.net/static/img/icons_sizes/6/140/16/ubuntu-icon.png) [ubuntu](http://dl.byronimo.de/google.rs/cli/0.3.4/ubuntu/pagespeedonline2.tar.gz) +* ![icon](http://hydra-media.cursecdn.com/wow.gamepedia.com/a/a2/Apple-icon-16x16.png?version=25ddd67ac3dd3b634478e3978b76cb74) [osx](http://dl.byronimo.de/google.rs/cli/0.3.4/osx/pagespeedonline2.tar.gz) Find the source code [on github](https://github.com/Byron/google-apis-rs/tree/master/gen/pagespeedonline2-cli). # Usage -This documentation was generated from the *pagespeedonline* API at revision *20150317*. The CLI is at version *0.3.3*. +This documentation was generated from the *pagespeedonline* API at revision *20160306*. The CLI is at version *0.3.4*. ```bash pagespeedonline2 [options] diff --git a/gen/pagespeedonline2-cli/mkdocs.yml b/gen/pagespeedonline2-cli/mkdocs.yml index 589dbb47fa..b525fad486 100644 --- a/gen/pagespeedonline2-cli/mkdocs.yml +++ b/gen/pagespeedonline2-cli/mkdocs.yml @@ -1,4 +1,4 @@ -site_name: pagespeedonline v0.3.3+20150317 +site_name: pagespeedonline v0.3.4+20160306 site_url: http://byron.github.io/google-apis-rs/google-pagespeedonline2-cli site_description: Write integrating applications with bcore diff --git a/gen/pagespeedonline2-cli/src/cmn.rs b/gen/pagespeedonline2-cli/src/cmn.rs index 188159ee80..ae86fdef65 100644 --- a/gen/pagespeedonline2-cli/src/cmn.rs +++ b/gen/pagespeedonline2-cli/src/cmn.rs @@ -414,7 +414,7 @@ impl TokenStorage for JsonTokenStorage { Err(err) => match err.kind() { io::ErrorKind::NotFound => Ok(()), - _ => Err(json::Error::Io(err)) + _ => Err(json::Error::IoError(err)) }, Ok(_) => Ok(()), } @@ -427,7 +427,7 @@ impl TokenStorage for JsonTokenStorage { Err(serde_err) => Err(serde_err), } }, - Err(io_err) => Err(json::Error::Io(io_err)) + Err(io_err) => Err(json::Error::IoError(io_err)) } } } @@ -444,7 +444,7 @@ impl TokenStorage for JsonTokenStorage { Err(io_err) => { match io_err.kind() { io::ErrorKind::NotFound => Ok(None), - _ => Err(json::Error::Io(io_err)) + _ => Err(json::Error::IoError(io_err)) } } } @@ -683,7 +683,7 @@ pub fn application_secret_from_directory(dir: &str, = json::from_str(json_console_secret).unwrap(); match json::to_writer_pretty(&mut f, &console_secret) { Err(serde_err) => match serde_err { - json::Error::Io(err) => err, + json::Error::IoError(err) => err, _ => panic!("Unexpected serde error: {:#?}", serde_err) }, Ok(_) => continue, @@ -696,7 +696,7 @@ pub fn application_secret_from_directory(dir: &str, }, Ok(f) => { match json::de::from_reader::<_, ConsoleApplicationSecret>(f) { - Err(json::Error::Io(err)) => + Err(json::Error::IoError(err)) => return secret_io_error(err), Err(json_err) => return Err(CLIError::Configuration( diff --git a/gen/pagespeedonline2-cli/src/main.rs b/gen/pagespeedonline2-cli/src/main.rs index cedf316ab3..7402d2e525 100644 --- a/gen/pagespeedonline2-cli/src/main.rs +++ b/gen/pagespeedonline2-cli/src/main.rs @@ -237,8 +237,8 @@ fn main() { let mut app = App::new("pagespeedonline2") .author("Sebastian Thiel ") - .version("0.3.3+20150317") - .about("Lets you analyze the performance of a web page and get tailored suggestions to make that page faster.") + .version("0.3.4+20160306") + .about("Analyzes the performance of a web page and provides tailored suggestions to make that page faster.") .after_help("All documentation details can be found at http://byron.github.io/google-apis-rs/google_pagespeedonline2_cli") .arg(Arg::with_name("folder") .long("config-dir") diff --git a/gen/pagespeedonline2/Cargo.toml b/gen/pagespeedonline2/Cargo.toml index fae0c409d4..8d3ed5a61f 100644 --- a/gen/pagespeedonline2/Cargo.toml +++ b/gen/pagespeedonline2/Cargo.toml @@ -4,7 +4,7 @@ [package] name = "google-pagespeedonline2" -version = "0.1.12+20150317" +version = "0.1.13+20160306" authors = ["Sebastian Thiel "] description = "A complete library to interact with pagespeedonline (protocol v2)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/pagespeedonline2" @@ -16,14 +16,14 @@ build = "src/build.rs" [dependencies] -hyper = "0.7" -mime = "0.1.0" -serde = ">= 0.7.0" -serde_json = ">= 0.7.0" -yup-oauth2 = ">= 0.5.4" +hyper = "0.8" +mime = "0.2.0" +serde = "0.6.0" +serde_json = "0.6.0" +yup-oauth2 = ">= 0.5.6" url = ">= 0.5" [build-dependencies] -syntex = { version = ">= 0.23" } -serde_codegen = { version = ">= 0.6" } +syntex = { version = "= 0.28" } +serde_codegen = { version = "= 0.6.13" } diff --git a/gen/pagespeedonline2/README.md b/gen/pagespeedonline2/README.md index 9f66f31e55..f03dd38316 100644 --- a/gen/pagespeedonline2/README.md +++ b/gen/pagespeedonline2/README.md @@ -5,7 +5,7 @@ DO NOT EDIT ! --> The `google-pagespeedonline2` library allows access to all features of the *Google pagespeedonline* service. -This documentation was generated from *pagespeedonline* crate version *0.1.12+20150317*, where *20150317* is the exact revision of the *pagespeedonline:v2* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.12*. +This documentation was generated from *pagespeedonline* crate version *0.1.13+20160306*, where *20160306* is the exact revision of the *pagespeedonline:v2* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.13*. Everything else about the *pagespeedonline* *v2* API can be found at the [official documentation site](https://developers.google.com/speed/docs/insights/v2/getting-started). diff --git a/gen/pagespeedonline2/src/cmn.rs b/gen/pagespeedonline2/src/cmn.rs index 87b91a8986..c69621da55 100644 --- a/gen/pagespeedonline2/src/cmn.rs +++ b/gen/pagespeedonline2/src/cmn.rs @@ -12,7 +12,7 @@ use mime::{Mime, TopLevel, SubLevel, Attr, Value}; use oauth2::{TokenType, Retry, self}; use hyper; use hyper::header::{ContentType, ContentLength, Headers, UserAgent, Authorization, Header, - HeaderFormat}; + HeaderFormat, Bearer}; use hyper::http::h1::LINE_ENDING; use hyper::method::Method; use hyper::status::StatusCode; @@ -634,7 +634,7 @@ pub struct ResumableUploadHelper<'a, A: 'a> { pub start_at: Option, pub auth: &'a mut A, pub user_agent: &'a str, - pub auth_header: Authorization, + pub auth_header: Authorization, pub url: &'a str, pub reader: &'a mut ReadSeek, pub media_type: Mime, diff --git a/gen/pagespeedonline2/src/lib.rs b/gen/pagespeedonline2/src/lib.rs index 179dc2b8e1..12e15f6606 100644 --- a/gen/pagespeedonline2/src/lib.rs +++ b/gen/pagespeedonline2/src/lib.rs @@ -2,7 +2,7 @@ // This file was generated automatically from 'src/mako/api/lib.rs.mako' // DO NOT EDIT ! -//! This documentation was generated from *pagespeedonline* crate version *0.1.12+20150317*, where *20150317* is the exact revision of the *pagespeedonline:v2* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.12*. +//! This documentation was generated from *pagespeedonline* crate version *0.1.13+20160306*, where *20160306* is the exact revision of the *pagespeedonline:v2* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.13*. //! //! Everything else about the *pagespeedonline* *v2* API can be found at the //! [official documentation site](https://developers.google.com/speed/docs/insights/v2/getting-started). diff --git a/gen/pagespeedonline2/src/lib.rs.in b/gen/pagespeedonline2/src/lib.rs.in index 771ffaf309..c024e87c3d 100644 --- a/gen/pagespeedonline2/src/lib.rs.in +++ b/gen/pagespeedonline2/src/lib.rs.in @@ -110,7 +110,7 @@ impl<'a, C, A> Pagespeedonline Pagespeedonline { client: RefCell::new(client), auth: RefCell::new(authenticator), - _user_agent: "google-api-rust-client/0.1.12".to_string(), + _user_agent: "google-api-rust-client/0.1.13".to_string(), } } @@ -119,7 +119,7 @@ impl<'a, C, A> Pagespeedonline } /// Set the user-agent header field to use in all requests to the server. - /// It defaults to `google-api-rust-client/0.1.12`. + /// It defaults to `google-api-rust-client/0.1.13`. /// /// Returns the previously set user-agent. pub fn user_agent(&mut self, agent_name: String) -> String { @@ -580,7 +580,7 @@ impl<'a, C, A> PagespeedapiRunpagespeedCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, ResultType)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, diff --git a/gen/partners2-cli/Cargo.toml b/gen/partners2-cli/Cargo.toml index bf28812475..05d1044d35 100644 --- a/gen/partners2-cli/Cargo.toml +++ b/gen/partners2-cli/Cargo.toml @@ -4,7 +4,7 @@ [package] name = "google-partners2-cli" -version = "0.3.3+20151009" +version = "0.3.4+20151009" authors = ["Sebastian Thiel "] description = "A complete library to interact with partners (protocol v2)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/partners2-cli" @@ -17,18 +17,18 @@ keywords = ["partners", "google", "cli"] name = "partners2" [dependencies] -hyper = "0.7" -mime = "0.1.0" -serde = ">= 0.7.0" -serde_json = ">= 0.7.0" -yup-oauth2 = ">= 0.5.4" +hyper = "0.8" +mime = "0.2.0" +serde = "0.6.0" +serde_json = "0.6.0" +yup-oauth2 = ">= 0.5.6" strsim = "0.4" yup-hyper-mock = "1.0" clap = "2.0" [build-dependencies] -syntex = { version = ">= 0.23" } -serde_codegen = { version = ">= 0.6" } +syntex = { version = "= 0.28" } +serde_codegen = { version = "= 0.6.13" } [dependencies.google-partners2] diff --git a/gen/partners2-cli/README.md b/gen/partners2-cli/README.md index c4913c69b5..64bef34fad 100644 --- a/gen/partners2-cli/README.md +++ b/gen/partners2-cli/README.md @@ -17,14 +17,14 @@ Everything else about the *partners* API can be found at the You can download the pre-compiled 64bit binaries for the following platforms: -* ![icon](http://megaicons.net/static/img/icons_sizes/6/140/16/ubuntu-icon.png) [ubuntu](http://dl.byronimo.de/google.rs/cli/0.3.3/ubuntu/partners2.tar.gz) -* ![icon](http://hydra-media.cursecdn.com/wow.gamepedia.com/a/a2/Apple-icon-16x16.png?version=25ddd67ac3dd3b634478e3978b76cb74) [osx](http://dl.byronimo.de/google.rs/cli/0.3.3/osx/partners2.tar.gz) +* ![icon](http://megaicons.net/static/img/icons_sizes/6/140/16/ubuntu-icon.png) [ubuntu](http://dl.byronimo.de/google.rs/cli/0.3.4/ubuntu/partners2.tar.gz) +* ![icon](http://hydra-media.cursecdn.com/wow.gamepedia.com/a/a2/Apple-icon-16x16.png?version=25ddd67ac3dd3b634478e3978b76cb74) [osx](http://dl.byronimo.de/google.rs/cli/0.3.4/osx/partners2.tar.gz) Find the source code [on github](https://github.com/Byron/google-apis-rs/tree/master/gen/partners2-cli). # Usage -This documentation was generated from the *partners* API at revision *20151009*. The CLI is at version *0.3.3*. +This documentation was generated from the *partners* API at revision *20151009*. The CLI is at version *0.3.4*. ```bash partners2 [options] diff --git a/gen/partners2-cli/mkdocs.yml b/gen/partners2-cli/mkdocs.yml index ad6230a299..a13fa36169 100644 --- a/gen/partners2-cli/mkdocs.yml +++ b/gen/partners2-cli/mkdocs.yml @@ -1,4 +1,4 @@ -site_name: partners v0.3.3+20151009 +site_name: partners v0.3.4+20151009 site_url: http://byron.github.io/google-apis-rs/google-partners2-cli site_description: Write integrating applications with bcore diff --git a/gen/partners2-cli/src/cmn.rs b/gen/partners2-cli/src/cmn.rs index 188159ee80..ae86fdef65 100644 --- a/gen/partners2-cli/src/cmn.rs +++ b/gen/partners2-cli/src/cmn.rs @@ -414,7 +414,7 @@ impl TokenStorage for JsonTokenStorage { Err(err) => match err.kind() { io::ErrorKind::NotFound => Ok(()), - _ => Err(json::Error::Io(err)) + _ => Err(json::Error::IoError(err)) }, Ok(_) => Ok(()), } @@ -427,7 +427,7 @@ impl TokenStorage for JsonTokenStorage { Err(serde_err) => Err(serde_err), } }, - Err(io_err) => Err(json::Error::Io(io_err)) + Err(io_err) => Err(json::Error::IoError(io_err)) } } } @@ -444,7 +444,7 @@ impl TokenStorage for JsonTokenStorage { Err(io_err) => { match io_err.kind() { io::ErrorKind::NotFound => Ok(None), - _ => Err(json::Error::Io(io_err)) + _ => Err(json::Error::IoError(io_err)) } } } @@ -683,7 +683,7 @@ pub fn application_secret_from_directory(dir: &str, = json::from_str(json_console_secret).unwrap(); match json::to_writer_pretty(&mut f, &console_secret) { Err(serde_err) => match serde_err { - json::Error::Io(err) => err, + json::Error::IoError(err) => err, _ => panic!("Unexpected serde error: {:#?}", serde_err) }, Ok(_) => continue, @@ -696,7 +696,7 @@ pub fn application_secret_from_directory(dir: &str, }, Ok(f) => { match json::de::from_reader::<_, ConsoleApplicationSecret>(f) { - Err(json::Error::Io(err)) => + Err(json::Error::IoError(err)) => return secret_io_error(err), Err(json_err) => return Err(CLIError::Configuration( diff --git a/gen/partners2-cli/src/main.rs b/gen/partners2-cli/src/main.rs index 9f47fa5dad..76fb1997f7 100644 --- a/gen/partners2-cli/src/main.rs +++ b/gen/partners2-cli/src/main.rs @@ -901,7 +901,7 @@ fn main() { let mut app = App::new("partners2") .author("Sebastian Thiel ") - .version("0.3.3+20151009") + .version("0.3.4+20151009") .about("Lets advertisers search certified companies and create contact leads with them, and also audits the usage of clients.") .after_help("All documentation details can be found at http://byron.github.io/google-apis-rs/google_partners2_cli") .arg(Arg::with_name("folder") diff --git a/gen/partners2/Cargo.toml b/gen/partners2/Cargo.toml index d99ec1bfa6..e0d622671c 100644 --- a/gen/partners2/Cargo.toml +++ b/gen/partners2/Cargo.toml @@ -4,7 +4,7 @@ [package] name = "google-partners2" -version = "0.1.12+20151009" +version = "0.1.13+20151009" authors = ["Sebastian Thiel "] description = "A complete library to interact with partners (protocol v2)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/partners2" @@ -16,14 +16,14 @@ build = "src/build.rs" [dependencies] -hyper = "0.7" -mime = "0.1.0" -serde = ">= 0.7.0" -serde_json = ">= 0.7.0" -yup-oauth2 = ">= 0.5.4" +hyper = "0.8" +mime = "0.2.0" +serde = "0.6.0" +serde_json = "0.6.0" +yup-oauth2 = ">= 0.5.6" url = ">= 0.5" [build-dependencies] -syntex = { version = ">= 0.23" } -serde_codegen = { version = ">= 0.6" } +syntex = { version = "= 0.28" } +serde_codegen = { version = "= 0.6.13" } diff --git a/gen/partners2/README.md b/gen/partners2/README.md index 8eb3cff888..4d02d72f53 100644 --- a/gen/partners2/README.md +++ b/gen/partners2/README.md @@ -5,7 +5,7 @@ DO NOT EDIT ! --> The `google-partners2` library allows access to all features of the *Google partners* service. -This documentation was generated from *partners* crate version *0.1.12+20151009*, where *20151009* is the exact revision of the *partners:v2* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.12*. +This documentation was generated from *partners* crate version *0.1.13+20151009*, where *20151009* is the exact revision of the *partners:v2* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.13*. Everything else about the *partners* *v2* API can be found at the [official documentation site](https://developers.google.com/partners/). diff --git a/gen/partners2/src/cmn.rs b/gen/partners2/src/cmn.rs index 87b91a8986..c69621da55 100644 --- a/gen/partners2/src/cmn.rs +++ b/gen/partners2/src/cmn.rs @@ -12,7 +12,7 @@ use mime::{Mime, TopLevel, SubLevel, Attr, Value}; use oauth2::{TokenType, Retry, self}; use hyper; use hyper::header::{ContentType, ContentLength, Headers, UserAgent, Authorization, Header, - HeaderFormat}; + HeaderFormat, Bearer}; use hyper::http::h1::LINE_ENDING; use hyper::method::Method; use hyper::status::StatusCode; @@ -634,7 +634,7 @@ pub struct ResumableUploadHelper<'a, A: 'a> { pub start_at: Option, pub auth: &'a mut A, pub user_agent: &'a str, - pub auth_header: Authorization, + pub auth_header: Authorization, pub url: &'a str, pub reader: &'a mut ReadSeek, pub media_type: Mime, diff --git a/gen/partners2/src/lib.rs b/gen/partners2/src/lib.rs index a8cf362b46..11cdf199e7 100644 --- a/gen/partners2/src/lib.rs +++ b/gen/partners2/src/lib.rs @@ -2,7 +2,7 @@ // This file was generated automatically from 'src/mako/api/lib.rs.mako' // DO NOT EDIT ! -//! This documentation was generated from *partners* crate version *0.1.12+20151009*, where *20151009* is the exact revision of the *partners:v2* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.12*. +//! This documentation was generated from *partners* crate version *0.1.13+20151009*, where *20151009* is the exact revision of the *partners:v2* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.13*. //! //! Everything else about the *partners* *v2* API can be found at the //! [official documentation site](https://developers.google.com/partners/). diff --git a/gen/partners2/src/lib.rs.in b/gen/partners2/src/lib.rs.in index b1e299bacb..a898988d97 100644 --- a/gen/partners2/src/lib.rs.in +++ b/gen/partners2/src/lib.rs.in @@ -111,7 +111,7 @@ impl<'a, C, A> Partners Partners { client: RefCell::new(client), auth: RefCell::new(authenticator), - _user_agent: "google-api-rust-client/0.1.12".to_string(), + _user_agent: "google-api-rust-client/0.1.13".to_string(), } } @@ -129,7 +129,7 @@ impl<'a, C, A> Partners } /// Set the user-agent header field to use in all requests to the server. - /// It defaults to `google-api-rust-client/0.1.12`. + /// It defaults to `google-api-rust-client/0.1.13`. /// /// Returns the previously set user-agent. pub fn user_agent(&mut self, agent_name: String) -> String { @@ -1062,7 +1062,7 @@ impl<'a, C, A> UserEventLogCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, LogUserEventResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -1279,7 +1279,7 @@ impl<'a, C, A> ClientMessageLogCall<'a, C, A> where C: BorrowMut, /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, LogMessageResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -1512,7 +1512,7 @@ impl<'a, C, A> CompanyGetCall<'a, C, A> where C: BorrowMut, A: oa /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, GetCompanyResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -1851,7 +1851,7 @@ impl<'a, C, A> CompanyLeadCreateCall<'a, C, A> where C: BorrowMut /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, CreateLeadResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -2141,7 +2141,7 @@ impl<'a, C, A> CompanyListCall<'a, C, A> where C: BorrowMut, A: o /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, ListCompaniesResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -2596,7 +2596,7 @@ impl<'a, C, A> UserStateListCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, ListUserStatesResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, diff --git a/gen/people1-cli/Cargo.toml b/gen/people1-cli/Cargo.toml index c69ff0a48d..d409d27705 100644 --- a/gen/people1-cli/Cargo.toml +++ b/gen/people1-cli/Cargo.toml @@ -4,7 +4,7 @@ [package] name = "google-people1-cli" -version = "0.3.3+20160210" +version = "0.3.4+20160210" authors = ["Sebastian Thiel "] description = "A complete library to interact with people (protocol v1)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/people1-cli" @@ -17,18 +17,18 @@ keywords = ["people", "google", "cli"] name = "people1" [dependencies] -hyper = "0.7" -mime = "0.1.0" -serde = ">= 0.7.0" -serde_json = ">= 0.7.0" -yup-oauth2 = ">= 0.5.4" +hyper = "0.8" +mime = "0.2.0" +serde = "0.6.0" +serde_json = "0.6.0" +yup-oauth2 = ">= 0.5.6" strsim = "0.4" yup-hyper-mock = "1.0" clap = "2.0" [build-dependencies] -syntex = { version = ">= 0.23" } -serde_codegen = { version = ">= 0.6" } +syntex = { version = "= 0.28" } +serde_codegen = { version = "= 0.6.13" } [dependencies.google-people1] diff --git a/gen/people1-cli/README.md b/gen/people1-cli/README.md index 5e6d6a9dd6..f5c6dd10a0 100644 --- a/gen/people1-cli/README.md +++ b/gen/people1-cli/README.md @@ -17,14 +17,14 @@ Everything else about the *people* API can be found at the You can download the pre-compiled 64bit binaries for the following platforms: -* ![icon](http://megaicons.net/static/img/icons_sizes/6/140/16/ubuntu-icon.png) [ubuntu](http://dl.byronimo.de/google.rs/cli/0.3.3/ubuntu/people1.tar.gz) -* ![icon](http://hydra-media.cursecdn.com/wow.gamepedia.com/a/a2/Apple-icon-16x16.png?version=25ddd67ac3dd3b634478e3978b76cb74) [osx](http://dl.byronimo.de/google.rs/cli/0.3.3/osx/people1.tar.gz) +* ![icon](http://megaicons.net/static/img/icons_sizes/6/140/16/ubuntu-icon.png) [ubuntu](http://dl.byronimo.de/google.rs/cli/0.3.4/ubuntu/people1.tar.gz) +* ![icon](http://hydra-media.cursecdn.com/wow.gamepedia.com/a/a2/Apple-icon-16x16.png?version=25ddd67ac3dd3b634478e3978b76cb74) [osx](http://dl.byronimo.de/google.rs/cli/0.3.4/osx/people1.tar.gz) Find the source code [on github](https://github.com/Byron/google-apis-rs/tree/master/gen/people1-cli). # Usage -This documentation was generated from the *people* API at revision *20160210*. The CLI is at version *0.3.3*. +This documentation was generated from the *people* API at revision *20160210*. The CLI is at version *0.3.4*. ```bash people1 [options] diff --git a/gen/people1-cli/mkdocs.yml b/gen/people1-cli/mkdocs.yml index f20dcf3756..791ff40140 100644 --- a/gen/people1-cli/mkdocs.yml +++ b/gen/people1-cli/mkdocs.yml @@ -1,4 +1,4 @@ -site_name: people v0.3.3+20160210 +site_name: people v0.3.4+20160210 site_url: http://byron.github.io/google-apis-rs/google-people1-cli site_description: Write integrating applications with bcore diff --git a/gen/people1-cli/src/cmn.rs b/gen/people1-cli/src/cmn.rs index 188159ee80..ae86fdef65 100644 --- a/gen/people1-cli/src/cmn.rs +++ b/gen/people1-cli/src/cmn.rs @@ -414,7 +414,7 @@ impl TokenStorage for JsonTokenStorage { Err(err) => match err.kind() { io::ErrorKind::NotFound => Ok(()), - _ => Err(json::Error::Io(err)) + _ => Err(json::Error::IoError(err)) }, Ok(_) => Ok(()), } @@ -427,7 +427,7 @@ impl TokenStorage for JsonTokenStorage { Err(serde_err) => Err(serde_err), } }, - Err(io_err) => Err(json::Error::Io(io_err)) + Err(io_err) => Err(json::Error::IoError(io_err)) } } } @@ -444,7 +444,7 @@ impl TokenStorage for JsonTokenStorage { Err(io_err) => { match io_err.kind() { io::ErrorKind::NotFound => Ok(None), - _ => Err(json::Error::Io(io_err)) + _ => Err(json::Error::IoError(io_err)) } } } @@ -683,7 +683,7 @@ pub fn application_secret_from_directory(dir: &str, = json::from_str(json_console_secret).unwrap(); match json::to_writer_pretty(&mut f, &console_secret) { Err(serde_err) => match serde_err { - json::Error::Io(err) => err, + json::Error::IoError(err) => err, _ => panic!("Unexpected serde error: {:#?}", serde_err) }, Ok(_) => continue, @@ -696,7 +696,7 @@ pub fn application_secret_from_directory(dir: &str, }, Ok(f) => { match json::de::from_reader::<_, ConsoleApplicationSecret>(f) { - Err(json::Error::Io(err)) => + Err(json::Error::IoError(err)) => return secret_io_error(err), Err(json_err) => return Err(CLIError::Configuration( diff --git a/gen/people1-cli/src/main.rs b/gen/people1-cli/src/main.rs index 19034173fc..f7c7873d35 100644 --- a/gen/people1-cli/src/main.rs +++ b/gen/people1-cli/src/main.rs @@ -403,7 +403,7 @@ fn main() { let mut app = App::new("people1") .author("Sebastian Thiel ") - .version("0.3.3+20160210") + .version("0.3.4+20160210") .about("The Google People API service gives access to information about profiles and contacts.") .after_help("All documentation details can be found at http://byron.github.io/google-apis-rs/google_people1_cli") .arg(Arg::with_name("url") diff --git a/gen/people1/Cargo.toml b/gen/people1/Cargo.toml index 22f19ea0f3..9ae10beaf2 100644 --- a/gen/people1/Cargo.toml +++ b/gen/people1/Cargo.toml @@ -4,7 +4,7 @@ [package] name = "google-people1" -version = "0.1.12+20160210" +version = "0.1.13+20160210" authors = ["Sebastian Thiel "] description = "A complete library to interact with people (protocol v1)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/people1" @@ -16,14 +16,14 @@ build = "src/build.rs" [dependencies] -hyper = "0.7" -mime = "0.1.0" -serde = ">= 0.7.0" -serde_json = ">= 0.7.0" -yup-oauth2 = ">= 0.5.4" +hyper = "0.8" +mime = "0.2.0" +serde = "0.6.0" +serde_json = "0.6.0" +yup-oauth2 = ">= 0.5.6" url = ">= 0.5" [build-dependencies] -syntex = { version = ">= 0.23" } -serde_codegen = { version = ">= 0.6" } +syntex = { version = "= 0.28" } +serde_codegen = { version = "= 0.6.13" } diff --git a/gen/people1/README.md b/gen/people1/README.md index aad2805eec..531b5fe36a 100644 --- a/gen/people1/README.md +++ b/gen/people1/README.md @@ -5,7 +5,7 @@ DO NOT EDIT ! --> The `google-people1` library allows access to all features of the *Google people* service. -This documentation was generated from *people* crate version *0.1.12+20160210*, where *20160210* is the exact revision of the *people:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.12*. +This documentation was generated from *people* crate version *0.1.13+20160210*, where *20160210* is the exact revision of the *people:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.13*. Everything else about the *people* *v1* API can be found at the [official documentation site](https://developers.google.com/people/). diff --git a/gen/people1/src/cmn.rs b/gen/people1/src/cmn.rs index 87b91a8986..c69621da55 100644 --- a/gen/people1/src/cmn.rs +++ b/gen/people1/src/cmn.rs @@ -12,7 +12,7 @@ use mime::{Mime, TopLevel, SubLevel, Attr, Value}; use oauth2::{TokenType, Retry, self}; use hyper; use hyper::header::{ContentType, ContentLength, Headers, UserAgent, Authorization, Header, - HeaderFormat}; + HeaderFormat, Bearer}; use hyper::http::h1::LINE_ENDING; use hyper::method::Method; use hyper::status::StatusCode; @@ -634,7 +634,7 @@ pub struct ResumableUploadHelper<'a, A: 'a> { pub start_at: Option, pub auth: &'a mut A, pub user_agent: &'a str, - pub auth_header: Authorization, + pub auth_header: Authorization, pub url: &'a str, pub reader: &'a mut ReadSeek, pub media_type: Mime, diff --git a/gen/people1/src/lib.rs b/gen/people1/src/lib.rs index 1bffeaf6b2..f2ea1642da 100644 --- a/gen/people1/src/lib.rs +++ b/gen/people1/src/lib.rs @@ -2,7 +2,7 @@ // This file was generated automatically from 'src/mako/api/lib.rs.mako' // DO NOT EDIT ! -//! This documentation was generated from *people* crate version *0.1.12+20160210*, where *20160210* is the exact revision of the *people:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.12*. +//! This documentation was generated from *people* crate version *0.1.13+20160210*, where *20160210* is the exact revision of the *people:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.13*. //! //! Everything else about the *people* *v1* API can be found at the //! [official documentation site](https://developers.google.com/people/). diff --git a/gen/people1/src/lib.rs.in b/gen/people1/src/lib.rs.in index 10fe74f805..d15cb3a60b 100644 --- a/gen/people1/src/lib.rs.in +++ b/gen/people1/src/lib.rs.in @@ -160,7 +160,7 @@ impl<'a, C, A> People People { client: RefCell::new(client), auth: RefCell::new(authenticator), - _user_agent: "google-api-rust-client/0.1.12".to_string(), + _user_agent: "google-api-rust-client/0.1.13".to_string(), } } @@ -169,7 +169,7 @@ impl<'a, C, A> People } /// Set the user-agent header field to use in all requests to the server. - /// It defaults to `google-api-rust-client/0.1.12`. + /// It defaults to `google-api-rust-client/0.1.13`. /// /// Returns the previously set user-agent. pub fn user_agent(&mut self, agent_name: String) -> String { @@ -1113,7 +1113,7 @@ impl<'a, C, A> PeopleGetCall<'a, C, A> where C: BorrowMut, A: oau pub fn doit(mut self) -> Result<(hyper::client::Response, Person)> { use url::percent_encoding::{percent_encode, FORM_URLENCODED_ENCODE_SET}; use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -1188,8 +1188,7 @@ impl<'a, C, A> PeopleGetCall<'a, C, A> where C: BorrowMut, A: oau } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -1379,7 +1378,7 @@ impl<'a, C, A> PeopleConnectionListCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, ListConnectionsResponse)> { use url::percent_encoding::{percent_encode, FORM_URLENCODED_ENCODE_SET}; use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -1466,8 +1465,7 @@ impl<'a, C, A> PeopleConnectionListCall<'a, C, A> where C: BorrowMut PeopleGetBatchGetCall<'a, C, A> where C: BorrowMut /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, GetPeopleResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -1732,8 +1730,7 @@ impl<'a, C, A> PeopleGetBatchGetCall<'a, C, A> where C: BorrowMut } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) diff --git a/gen/playmoviespartner1-cli/Cargo.toml b/gen/playmoviespartner1-cli/Cargo.toml index 246e663cf4..564aec08d8 100644 --- a/gen/playmoviespartner1-cli/Cargo.toml +++ b/gen/playmoviespartner1-cli/Cargo.toml @@ -4,7 +4,7 @@ [package] name = "google-playmoviespartner1-cli" -version = "0.3.3+20150812" +version = "0.3.4+20150812" authors = ["Sebastian Thiel "] description = "A complete library to interact with playmoviespartner (protocol v1)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/playmoviespartner1-cli" @@ -17,18 +17,18 @@ keywords = ["playmoviespartner", "google", "cli"] name = "playmoviespartner1" [dependencies] -hyper = "0.7" -mime = "0.1.0" -serde = ">= 0.7.0" -serde_json = ">= 0.7.0" -yup-oauth2 = ">= 0.5.4" +hyper = "0.8" +mime = "0.2.0" +serde = "0.6.0" +serde_json = "0.6.0" +yup-oauth2 = ">= 0.5.6" strsim = "0.4" yup-hyper-mock = "1.0" clap = "2.0" [build-dependencies] -syntex = { version = ">= 0.23" } -serde_codegen = { version = ">= 0.6" } +syntex = { version = "= 0.28" } +serde_codegen = { version = "= 0.6.13" } [dependencies.google-playmoviespartner1] diff --git a/gen/playmoviespartner1-cli/README.md b/gen/playmoviespartner1-cli/README.md index 53d6a9336d..1d0a7c5822 100644 --- a/gen/playmoviespartner1-cli/README.md +++ b/gen/playmoviespartner1-cli/README.md @@ -17,14 +17,14 @@ Everything else about the *playmoviespartner* API can be found at the You can download the pre-compiled 64bit binaries for the following platforms: -* ![icon](http://megaicons.net/static/img/icons_sizes/6/140/16/ubuntu-icon.png) [ubuntu](http://dl.byronimo.de/google.rs/cli/0.3.3/ubuntu/playmoviespartner1.tar.gz) -* ![icon](http://hydra-media.cursecdn.com/wow.gamepedia.com/a/a2/Apple-icon-16x16.png?version=25ddd67ac3dd3b634478e3978b76cb74) [osx](http://dl.byronimo.de/google.rs/cli/0.3.3/osx/playmoviespartner1.tar.gz) +* ![icon](http://megaicons.net/static/img/icons_sizes/6/140/16/ubuntu-icon.png) [ubuntu](http://dl.byronimo.de/google.rs/cli/0.3.4/ubuntu/playmoviespartner1.tar.gz) +* ![icon](http://hydra-media.cursecdn.com/wow.gamepedia.com/a/a2/Apple-icon-16x16.png?version=25ddd67ac3dd3b634478e3978b76cb74) [osx](http://dl.byronimo.de/google.rs/cli/0.3.4/osx/playmoviespartner1.tar.gz) Find the source code [on github](https://github.com/Byron/google-apis-rs/tree/master/gen/playmoviespartner1-cli). # Usage -This documentation was generated from the *playmoviespartner* API at revision *20150812*. The CLI is at version *0.3.3*. +This documentation was generated from the *playmoviespartner* API at revision *20150812*. The CLI is at version *0.3.4*. ```bash playmoviespartner1 [options] diff --git a/gen/playmoviespartner1-cli/mkdocs.yml b/gen/playmoviespartner1-cli/mkdocs.yml index 746408d4e2..0d7c8b92a0 100644 --- a/gen/playmoviespartner1-cli/mkdocs.yml +++ b/gen/playmoviespartner1-cli/mkdocs.yml @@ -1,4 +1,4 @@ -site_name: playmoviespartner v0.3.3+20150812 +site_name: playmoviespartner v0.3.4+20150812 site_url: http://byron.github.io/google-apis-rs/google-playmoviespartner1-cli site_description: Write integrating applications with bcore diff --git a/gen/playmoviespartner1-cli/src/cmn.rs b/gen/playmoviespartner1-cli/src/cmn.rs index 188159ee80..ae86fdef65 100644 --- a/gen/playmoviespartner1-cli/src/cmn.rs +++ b/gen/playmoviespartner1-cli/src/cmn.rs @@ -414,7 +414,7 @@ impl TokenStorage for JsonTokenStorage { Err(err) => match err.kind() { io::ErrorKind::NotFound => Ok(()), - _ => Err(json::Error::Io(err)) + _ => Err(json::Error::IoError(err)) }, Ok(_) => Ok(()), } @@ -427,7 +427,7 @@ impl TokenStorage for JsonTokenStorage { Err(serde_err) => Err(serde_err), } }, - Err(io_err) => Err(json::Error::Io(io_err)) + Err(io_err) => Err(json::Error::IoError(io_err)) } } } @@ -444,7 +444,7 @@ impl TokenStorage for JsonTokenStorage { Err(io_err) => { match io_err.kind() { io::ErrorKind::NotFound => Ok(None), - _ => Err(json::Error::Io(io_err)) + _ => Err(json::Error::IoError(io_err)) } } } @@ -683,7 +683,7 @@ pub fn application_secret_from_directory(dir: &str, = json::from_str(json_console_secret).unwrap(); match json::to_writer_pretty(&mut f, &console_secret) { Err(serde_err) => match serde_err { - json::Error::Io(err) => err, + json::Error::IoError(err) => err, _ => panic!("Unexpected serde error: {:#?}", serde_err) }, Ok(_) => continue, @@ -696,7 +696,7 @@ pub fn application_secret_from_directory(dir: &str, }, Ok(f) => { match json::de::from_reader::<_, ConsoleApplicationSecret>(f) { - Err(json::Error::Io(err)) => + Err(json::Error::IoError(err)) => return secret_io_error(err), Err(json_err) => return Err(CLIError::Configuration( diff --git a/gen/playmoviespartner1-cli/src/main.rs b/gen/playmoviespartner1-cli/src/main.rs index c2fe56b7f9..ecef3c8e82 100644 --- a/gen/playmoviespartner1-cli/src/main.rs +++ b/gen/playmoviespartner1-cli/src/main.rs @@ -814,7 +814,7 @@ fn main() { let mut app = App::new("playmoviespartner1") .author("Sebastian Thiel ") - .version("0.3.3+20150812") + .version("0.3.4+20150812") .about("Lets Google Play Movies Partners get the delivery status of their titles.") .after_help("All documentation details can be found at http://byron.github.io/google-apis-rs/google_playmoviespartner1_cli") .arg(Arg::with_name("url") diff --git a/gen/playmoviespartner1/Cargo.toml b/gen/playmoviespartner1/Cargo.toml index df5ce37933..1335ac3d4d 100644 --- a/gen/playmoviespartner1/Cargo.toml +++ b/gen/playmoviespartner1/Cargo.toml @@ -4,7 +4,7 @@ [package] name = "google-playmoviespartner1" -version = "0.1.12+20150812" +version = "0.1.13+20150812" authors = ["Sebastian Thiel "] description = "A complete library to interact with playmoviespartner (protocol v1)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/playmoviespartner1" @@ -16,14 +16,14 @@ build = "src/build.rs" [dependencies] -hyper = "0.7" -mime = "0.1.0" -serde = ">= 0.7.0" -serde_json = ">= 0.7.0" -yup-oauth2 = ">= 0.5.4" +hyper = "0.8" +mime = "0.2.0" +serde = "0.6.0" +serde_json = "0.6.0" +yup-oauth2 = ">= 0.5.6" url = ">= 0.5" [build-dependencies] -syntex = { version = ">= 0.23" } -serde_codegen = { version = ">= 0.6" } +syntex = { version = "= 0.28" } +serde_codegen = { version = "= 0.6.13" } diff --git a/gen/playmoviespartner1/README.md b/gen/playmoviespartner1/README.md index 03af8ca9b6..4b5975206e 100644 --- a/gen/playmoviespartner1/README.md +++ b/gen/playmoviespartner1/README.md @@ -5,7 +5,7 @@ DO NOT EDIT ! --> The `google-playmoviespartner1` library allows access to all features of the *Google playmoviespartner* service. -This documentation was generated from *playmoviespartner* crate version *0.1.12+20150812*, where *20150812* is the exact revision of the *playmoviespartner:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.12*. +This documentation was generated from *playmoviespartner* crate version *0.1.13+20150812*, where *20150812* is the exact revision of the *playmoviespartner:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.13*. Everything else about the *playmoviespartner* *v1* API can be found at the [official documentation site](https://developers.google.com/playmoviespartner/). diff --git a/gen/playmoviespartner1/src/cmn.rs b/gen/playmoviespartner1/src/cmn.rs index 87b91a8986..c69621da55 100644 --- a/gen/playmoviespartner1/src/cmn.rs +++ b/gen/playmoviespartner1/src/cmn.rs @@ -12,7 +12,7 @@ use mime::{Mime, TopLevel, SubLevel, Attr, Value}; use oauth2::{TokenType, Retry, self}; use hyper; use hyper::header::{ContentType, ContentLength, Headers, UserAgent, Authorization, Header, - HeaderFormat}; + HeaderFormat, Bearer}; use hyper::http::h1::LINE_ENDING; use hyper::method::Method; use hyper::status::StatusCode; @@ -634,7 +634,7 @@ pub struct ResumableUploadHelper<'a, A: 'a> { pub start_at: Option, pub auth: &'a mut A, pub user_agent: &'a str, - pub auth_header: Authorization, + pub auth_header: Authorization, pub url: &'a str, pub reader: &'a mut ReadSeek, pub media_type: Mime, diff --git a/gen/playmoviespartner1/src/lib.rs b/gen/playmoviespartner1/src/lib.rs index 02453b2b93..bf8f4df95e 100644 --- a/gen/playmoviespartner1/src/lib.rs +++ b/gen/playmoviespartner1/src/lib.rs @@ -2,7 +2,7 @@ // This file was generated automatically from 'src/mako/api/lib.rs.mako' // DO NOT EDIT ! -//! This documentation was generated from *playmoviespartner* crate version *0.1.12+20150812*, where *20150812* is the exact revision of the *playmoviespartner:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.12*. +//! This documentation was generated from *playmoviespartner* crate version *0.1.13+20150812*, where *20150812* is the exact revision of the *playmoviespartner:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.13*. //! //! Everything else about the *playmoviespartner* *v1* API can be found at the //! [official documentation site](https://developers.google.com/playmoviespartner/). diff --git a/gen/playmoviespartner1/src/lib.rs.in b/gen/playmoviespartner1/src/lib.rs.in index 6fc4824aa1..72da412d2d 100644 --- a/gen/playmoviespartner1/src/lib.rs.in +++ b/gen/playmoviespartner1/src/lib.rs.in @@ -127,7 +127,7 @@ impl<'a, C, A> Playmoviespartner Playmoviespartner { client: RefCell::new(client), auth: RefCell::new(authenticator), - _user_agent: "google-api-rust-client/0.1.12".to_string(), + _user_agent: "google-api-rust-client/0.1.13".to_string(), } } @@ -136,7 +136,7 @@ impl<'a, C, A> Playmoviespartner } /// Set the user-agent header field to use in all requests to the server. - /// It defaults to `google-api-rust-client/0.1.12`. + /// It defaults to `google-api-rust-client/0.1.13`. /// /// Returns the previously set user-agent. pub fn user_agent(&mut self, agent_name: String) -> String { @@ -861,7 +861,7 @@ impl<'a, C, A> AccountOrderListCall<'a, C, A> where C: BorrowMut, /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, ListOrdersResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -957,8 +957,7 @@ impl<'a, C, A> AccountOrderListCall<'a, C, A> where C: BorrowMut, } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -1184,7 +1183,7 @@ impl<'a, C, A> AccountStoreInfoCountryGetCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, StoreInfo)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -1255,8 +1254,7 @@ impl<'a, C, A> AccountStoreInfoCountryGetCall<'a, C, A> where C: BorrowMut AccountOrderGetCall<'a, C, A> where C: BorrowMut, /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Order)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -1519,8 +1517,7 @@ impl<'a, C, A> AccountOrderGetCall<'a, C, A> where C: BorrowMut, } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -1718,7 +1715,7 @@ impl<'a, C, A> AccountAvailListCall<'a, C, A> where C: BorrowMut, /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, ListAvailsResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -1819,8 +1816,7 @@ impl<'a, C, A> AccountAvailListCall<'a, C, A> where C: BorrowMut, } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -2053,7 +2049,7 @@ impl<'a, C, A> AccountExperienceLocaleGetCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, ExperienceLocale)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -2123,8 +2119,7 @@ impl<'a, C, A> AccountExperienceLocaleGetCall<'a, C, A> where C: BorrowMut AccountStoreInfoListCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, ListStoreInfosResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -2423,8 +2418,7 @@ impl<'a, C, A> AccountStoreInfoListCall<'a, C, A> where C: BorrowMut AccountExperienceLocaleListCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, ListExperienceLocalesResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -2776,8 +2770,7 @@ impl<'a, C, A> AccountExperienceLocaleListCall<'a, C, A> where C: BorrowMut"] description = "A complete library to interact with plus (protocol v1)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/plus1-cli" @@ -17,18 +17,18 @@ keywords = ["plus", "google", "cli"] name = "plus1" [dependencies] -hyper = "0.7" -mime = "0.1.0" -serde = ">= 0.7.0" -serde_json = ">= 0.7.0" -yup-oauth2 = ">= 0.5.4" +hyper = "0.8" +mime = "0.2.0" +serde = "0.6.0" +serde_json = "0.6.0" +yup-oauth2 = ">= 0.5.6" strsim = "0.4" yup-hyper-mock = "1.0" clap = "2.0" [build-dependencies] -syntex = { version = ">= 0.23" } -serde_codegen = { version = ">= 0.6" } +syntex = { version = "= 0.28" } +serde_codegen = { version = "= 0.6.13" } [dependencies.google-plus1] diff --git a/gen/plus1-cli/README.md b/gen/plus1-cli/README.md index 3ab1011f43..932b9e66b5 100644 --- a/gen/plus1-cli/README.md +++ b/gen/plus1-cli/README.md @@ -17,14 +17,14 @@ Everything else about the *plus* API can be found at the You can download the pre-compiled 64bit binaries for the following platforms: -* ![icon](http://megaicons.net/static/img/icons_sizes/6/140/16/ubuntu-icon.png) [ubuntu](http://dl.byronimo.de/google.rs/cli/0.3.3/ubuntu/plus1.tar.gz) -* ![icon](http://hydra-media.cursecdn.com/wow.gamepedia.com/a/a2/Apple-icon-16x16.png?version=25ddd67ac3dd3b634478e3978b76cb74) [osx](http://dl.byronimo.de/google.rs/cli/0.3.3/osx/plus1.tar.gz) +* ![icon](http://megaicons.net/static/img/icons_sizes/6/140/16/ubuntu-icon.png) [ubuntu](http://dl.byronimo.de/google.rs/cli/0.3.4/ubuntu/plus1.tar.gz) +* ![icon](http://hydra-media.cursecdn.com/wow.gamepedia.com/a/a2/Apple-icon-16x16.png?version=25ddd67ac3dd3b634478e3978b76cb74) [osx](http://dl.byronimo.de/google.rs/cli/0.3.4/osx/plus1.tar.gz) Find the source code [on github](https://github.com/Byron/google-apis-rs/tree/master/gen/plus1-cli). # Usage -This documentation was generated from the *plus* API at revision *20160223*. The CLI is at version *0.3.3*. +This documentation was generated from the *plus* API at revision *20160406*. The CLI is at version *0.3.4*. ```bash plus1 [options] diff --git a/gen/plus1-cli/mkdocs.yml b/gen/plus1-cli/mkdocs.yml index 5f155e3d1e..510987cbb5 100644 --- a/gen/plus1-cli/mkdocs.yml +++ b/gen/plus1-cli/mkdocs.yml @@ -1,4 +1,4 @@ -site_name: plus v0.3.3+20160223 +site_name: plus v0.3.4+20160406 site_url: http://byron.github.io/google-apis-rs/google-plus1-cli site_description: Write integrating applications with bcore diff --git a/gen/plus1-cli/src/cmn.rs b/gen/plus1-cli/src/cmn.rs index 188159ee80..ae86fdef65 100644 --- a/gen/plus1-cli/src/cmn.rs +++ b/gen/plus1-cli/src/cmn.rs @@ -414,7 +414,7 @@ impl TokenStorage for JsonTokenStorage { Err(err) => match err.kind() { io::ErrorKind::NotFound => Ok(()), - _ => Err(json::Error::Io(err)) + _ => Err(json::Error::IoError(err)) }, Ok(_) => Ok(()), } @@ -427,7 +427,7 @@ impl TokenStorage for JsonTokenStorage { Err(serde_err) => Err(serde_err), } }, - Err(io_err) => Err(json::Error::Io(io_err)) + Err(io_err) => Err(json::Error::IoError(io_err)) } } } @@ -444,7 +444,7 @@ impl TokenStorage for JsonTokenStorage { Err(io_err) => { match io_err.kind() { io::ErrorKind::NotFound => Ok(None), - _ => Err(json::Error::Io(io_err)) + _ => Err(json::Error::IoError(io_err)) } } } @@ -683,7 +683,7 @@ pub fn application_secret_from_directory(dir: &str, = json::from_str(json_console_secret).unwrap(); match json::to_writer_pretty(&mut f, &console_secret) { Err(serde_err) => match serde_err { - json::Error::Io(err) => err, + json::Error::IoError(err) => err, _ => panic!("Unexpected serde error: {:#?}", serde_err) }, Ok(_) => continue, @@ -696,7 +696,7 @@ pub fn application_secret_from_directory(dir: &str, }, Ok(f) => { match json::de::from_reader::<_, ConsoleApplicationSecret>(f) { - Err(json::Error::Io(err)) => + Err(json::Error::IoError(err)) => return secret_io_error(err), Err(json_err) => return Err(CLIError::Configuration( diff --git a/gen/plus1-cli/src/main.rs b/gen/plus1-cli/src/main.rs index 9904671687..28811993b3 100644 --- a/gen/plus1-cli/src/main.rs +++ b/gen/plus1-cli/src/main.rs @@ -937,7 +937,7 @@ fn main() { let mut app = App::new("plus1") .author("Sebastian Thiel ") - .version("0.3.3+20160223") + .version("0.3.4+20160406") .about("The Google+ API enables developers to build on top of the Google+ platform.") .after_help("All documentation details can be found at http://byron.github.io/google-apis-rs/google_plus1_cli") .arg(Arg::with_name("url") diff --git a/gen/plus1/Cargo.toml b/gen/plus1/Cargo.toml index 0ce6a6fb4a..4abd9d70b5 100644 --- a/gen/plus1/Cargo.toml +++ b/gen/plus1/Cargo.toml @@ -4,7 +4,7 @@ [package] name = "google-plus1" -version = "0.1.12+20160223" +version = "0.1.13+20160406" authors = ["Sebastian Thiel "] description = "A complete library to interact with plus (protocol v1)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/plus1" @@ -16,14 +16,14 @@ build = "src/build.rs" [dependencies] -hyper = "0.7" -mime = "0.1.0" -serde = ">= 0.7.0" -serde_json = ">= 0.7.0" -yup-oauth2 = ">= 0.5.4" +hyper = "0.8" +mime = "0.2.0" +serde = "0.6.0" +serde_json = "0.6.0" +yup-oauth2 = ">= 0.5.6" url = ">= 0.5" [build-dependencies] -syntex = { version = ">= 0.23" } -serde_codegen = { version = ">= 0.6" } +syntex = { version = "= 0.28" } +serde_codegen = { version = "= 0.6.13" } diff --git a/gen/plus1/README.md b/gen/plus1/README.md index 7145b50d09..d650956bca 100644 --- a/gen/plus1/README.md +++ b/gen/plus1/README.md @@ -5,7 +5,7 @@ DO NOT EDIT ! --> The `google-plus1` library allows access to all features of the *Google plus* service. -This documentation was generated from *plus* crate version *0.1.12+20160223*, where *20160223* is the exact revision of the *plus:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.12*. +This documentation was generated from *plus* crate version *0.1.13+20160406*, where *20160406* is the exact revision of the *plus:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.13*. Everything else about the *plus* *v1* API can be found at the [official documentation site](https://developers.google.com/+/api/). diff --git a/gen/plus1/src/cmn.rs b/gen/plus1/src/cmn.rs index 87b91a8986..c69621da55 100644 --- a/gen/plus1/src/cmn.rs +++ b/gen/plus1/src/cmn.rs @@ -12,7 +12,7 @@ use mime::{Mime, TopLevel, SubLevel, Attr, Value}; use oauth2::{TokenType, Retry, self}; use hyper; use hyper::header::{ContentType, ContentLength, Headers, UserAgent, Authorization, Header, - HeaderFormat}; + HeaderFormat, Bearer}; use hyper::http::h1::LINE_ENDING; use hyper::method::Method; use hyper::status::StatusCode; @@ -634,7 +634,7 @@ pub struct ResumableUploadHelper<'a, A: 'a> { pub start_at: Option, pub auth: &'a mut A, pub user_agent: &'a str, - pub auth_header: Authorization, + pub auth_header: Authorization, pub url: &'a str, pub reader: &'a mut ReadSeek, pub media_type: Mime, diff --git a/gen/plus1/src/lib.rs b/gen/plus1/src/lib.rs index f1e52e6599..6014188002 100644 --- a/gen/plus1/src/lib.rs +++ b/gen/plus1/src/lib.rs @@ -2,7 +2,7 @@ // This file was generated automatically from 'src/mako/api/lib.rs.mako' // DO NOT EDIT ! -//! This documentation was generated from *plus* crate version *0.1.12+20160223*, where *20160223* is the exact revision of the *plus:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.12*. +//! This documentation was generated from *plus* crate version *0.1.13+20160406*, where *20160406* is the exact revision of the *plus:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.13*. //! //! Everything else about the *plus* *v1* API can be found at the //! [official documentation site](https://developers.google.com/+/api/). diff --git a/gen/plus1/src/lib.rs.in b/gen/plus1/src/lib.rs.in index 4f3856fb4b..0dd27f13fc 100644 --- a/gen/plus1/src/lib.rs.in +++ b/gen/plus1/src/lib.rs.in @@ -142,7 +142,7 @@ impl<'a, C, A> Plus Plus { client: RefCell::new(client), auth: RefCell::new(authenticator), - _user_agent: "google-api-rust-client/0.1.12".to_string(), + _user_agent: "google-api-rust-client/0.1.13".to_string(), } } @@ -157,7 +157,7 @@ impl<'a, C, A> Plus } /// Set the user-agent header field to use in all requests to the server. - /// It defaults to `google-api-rust-client/0.1.12`. + /// It defaults to `google-api-rust-client/0.1.13`. /// /// Returns the previously set user-agent. pub fn user_agent(&mut self, agent_name: String) -> String { @@ -1727,7 +1727,7 @@ impl<'a, C, A> ActivitySearchCall<'a, C, A> where C: BorrowMut, A /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, ActivityFeed)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -1787,8 +1787,7 @@ impl<'a, C, A> ActivitySearchCall<'a, C, A> where C: BorrowMut, A } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -1982,7 +1981,7 @@ impl<'a, C, A> ActivityGetCall<'a, C, A> where C: BorrowMut, A: o /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Activity)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -2051,8 +2050,7 @@ impl<'a, C, A> ActivityGetCall<'a, C, A> where C: BorrowMut, A: o } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -2223,7 +2221,7 @@ impl<'a, C, A> ActivityListCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, ActivityFeed)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -2299,8 +2297,7 @@ impl<'a, C, A> ActivityListCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -2496,7 +2493,7 @@ impl<'a, C, A> CommentListCall<'a, C, A> where C: BorrowMut, A: o /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, CommentFeed)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -2574,8 +2571,7 @@ impl<'a, C, A> CommentListCall<'a, C, A> where C: BorrowMut, A: o } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -2762,7 +2758,7 @@ impl<'a, C, A> CommentGetCall<'a, C, A> where C: BorrowMut, A: oa /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Comment)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -2831,8 +2827,7 @@ impl<'a, C, A> CommentGetCall<'a, C, A> where C: BorrowMut, A: oa } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -3004,7 +2999,7 @@ impl<'a, C, A> PeopleSearchCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, PeopleFeed)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -3061,8 +3056,7 @@ impl<'a, C, A> PeopleSearchCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -3254,7 +3248,7 @@ impl<'a, C, A> PeopleListByActivityCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, PeopleFeed)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -3330,8 +3324,7 @@ impl<'a, C, A> PeopleListByActivityCall<'a, C, A> where C: BorrowMut PeopleListCall<'a, C, A> where C: BorrowMut, A: oa /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, PeopleFeed)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -3607,8 +3600,7 @@ impl<'a, C, A> PeopleListCall<'a, C, A> where C: BorrowMut, A: oa } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -3805,7 +3797,7 @@ impl<'a, C, A> PeopleGetCall<'a, C, A> where C: BorrowMut, A: oau /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Person)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -3874,8 +3866,7 @@ impl<'a, C, A> PeopleGetCall<'a, C, A> where C: BorrowMut, A: oau } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) diff --git a/gen/plusdomains1-cli/Cargo.toml b/gen/plusdomains1-cli/Cargo.toml index 27e28b185e..d7047a5952 100644 --- a/gen/plusdomains1-cli/Cargo.toml +++ b/gen/plusdomains1-cli/Cargo.toml @@ -4,7 +4,7 @@ [package] name = "google-plusdomains1-cli" -version = "0.3.3+20160223" +version = "0.3.4+20160406" authors = ["Sebastian Thiel "] description = "A complete library to interact with plusDomains (protocol v1)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/plusdomains1-cli" @@ -17,18 +17,18 @@ keywords = ["plusDomains", "google", "cli"] name = "plusdomains1" [dependencies] -hyper = "0.7" -mime = "0.1.0" -serde = ">= 0.7.0" -serde_json = ">= 0.7.0" -yup-oauth2 = ">= 0.5.4" +hyper = "0.8" +mime = "0.2.0" +serde = "0.6.0" +serde_json = "0.6.0" +yup-oauth2 = ">= 0.5.6" strsim = "0.4" yup-hyper-mock = "1.0" clap = "2.0" [build-dependencies] -syntex = { version = ">= 0.23" } -serde_codegen = { version = ">= 0.6" } +syntex = { version = "= 0.28" } +serde_codegen = { version = "= 0.6.13" } [dependencies.google-plusdomains1] diff --git a/gen/plusdomains1-cli/README.md b/gen/plusdomains1-cli/README.md index 09902aff0c..abe6bb0a0f 100644 --- a/gen/plusdomains1-cli/README.md +++ b/gen/plusdomains1-cli/README.md @@ -17,14 +17,14 @@ Everything else about the *plusDomains* API can be found at the You can download the pre-compiled 64bit binaries for the following platforms: -* ![icon](http://megaicons.net/static/img/icons_sizes/6/140/16/ubuntu-icon.png) [ubuntu](http://dl.byronimo.de/google.rs/cli/0.3.3/ubuntu/plusdomains1.tar.gz) -* ![icon](http://hydra-media.cursecdn.com/wow.gamepedia.com/a/a2/Apple-icon-16x16.png?version=25ddd67ac3dd3b634478e3978b76cb74) [osx](http://dl.byronimo.de/google.rs/cli/0.3.3/osx/plusdomains1.tar.gz) +* ![icon](http://megaicons.net/static/img/icons_sizes/6/140/16/ubuntu-icon.png) [ubuntu](http://dl.byronimo.de/google.rs/cli/0.3.4/ubuntu/plusdomains1.tar.gz) +* ![icon](http://hydra-media.cursecdn.com/wow.gamepedia.com/a/a2/Apple-icon-16x16.png?version=25ddd67ac3dd3b634478e3978b76cb74) [osx](http://dl.byronimo.de/google.rs/cli/0.3.4/osx/plusdomains1.tar.gz) Find the source code [on github](https://github.com/Byron/google-apis-rs/tree/master/gen/plusdomains1-cli). # Usage -This documentation was generated from the *plusDomains* API at revision *20160223*. The CLI is at version *0.3.3*. +This documentation was generated from the *plusDomains* API at revision *20160406*. The CLI is at version *0.3.4*. ```bash plusdomains1 [options] diff --git a/gen/plusdomains1-cli/mkdocs.yml b/gen/plusdomains1-cli/mkdocs.yml index 6578baec55..264d11e13d 100644 --- a/gen/plusdomains1-cli/mkdocs.yml +++ b/gen/plusdomains1-cli/mkdocs.yml @@ -1,4 +1,4 @@ -site_name: plusDomains v0.3.3+20160223 +site_name: plusDomains v0.3.4+20160406 site_url: http://byron.github.io/google-apis-rs/google-plusdomains1-cli site_description: Write integrating applications with bcore diff --git a/gen/plusdomains1-cli/src/cmn.rs b/gen/plusdomains1-cli/src/cmn.rs index 188159ee80..ae86fdef65 100644 --- a/gen/plusdomains1-cli/src/cmn.rs +++ b/gen/plusdomains1-cli/src/cmn.rs @@ -414,7 +414,7 @@ impl TokenStorage for JsonTokenStorage { Err(err) => match err.kind() { io::ErrorKind::NotFound => Ok(()), - _ => Err(json::Error::Io(err)) + _ => Err(json::Error::IoError(err)) }, Ok(_) => Ok(()), } @@ -427,7 +427,7 @@ impl TokenStorage for JsonTokenStorage { Err(serde_err) => Err(serde_err), } }, - Err(io_err) => Err(json::Error::Io(io_err)) + Err(io_err) => Err(json::Error::IoError(io_err)) } } } @@ -444,7 +444,7 @@ impl TokenStorage for JsonTokenStorage { Err(io_err) => { match io_err.kind() { io::ErrorKind::NotFound => Ok(None), - _ => Err(json::Error::Io(io_err)) + _ => Err(json::Error::IoError(io_err)) } } } @@ -683,7 +683,7 @@ pub fn application_secret_from_directory(dir: &str, = json::from_str(json_console_secret).unwrap(); match json::to_writer_pretty(&mut f, &console_secret) { Err(serde_err) => match serde_err { - json::Error::Io(err) => err, + json::Error::IoError(err) => err, _ => panic!("Unexpected serde error: {:#?}", serde_err) }, Ok(_) => continue, @@ -696,7 +696,7 @@ pub fn application_secret_from_directory(dir: &str, }, Ok(f) => { match json::de::from_reader::<_, ConsoleApplicationSecret>(f) { - Err(json::Error::Io(err)) => + Err(json::Error::IoError(err)) => return secret_io_error(err), Err(json_err) => return Err(CLIError::Configuration( diff --git a/gen/plusdomains1-cli/src/main.rs b/gen/plusdomains1-cli/src/main.rs index 02abaec28d..6048b54b01 100644 --- a/gen/plusdomains1-cli/src/main.rs +++ b/gen/plusdomains1-cli/src/main.rs @@ -2163,7 +2163,7 @@ fn main() { let mut app = App::new("plusdomains1") .author("Sebastian Thiel ") - .version("0.3.3+20160223") + .version("0.3.4+20160406") .about("The Google+ API enables developers to build on top of the Google+ platform.") .after_help("All documentation details can be found at http://byron.github.io/google-apis-rs/google_plusdomains1_cli") .arg(Arg::with_name("url") diff --git a/gen/plusdomains1/Cargo.toml b/gen/plusdomains1/Cargo.toml index 935709815c..7fffd31d4b 100644 --- a/gen/plusdomains1/Cargo.toml +++ b/gen/plusdomains1/Cargo.toml @@ -4,7 +4,7 @@ [package] name = "google-plusdomains1" -version = "0.1.12+20160223" +version = "0.1.13+20160406" authors = ["Sebastian Thiel "] description = "A complete library to interact with plusDomains (protocol v1)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/plusdomains1" @@ -16,14 +16,14 @@ build = "src/build.rs" [dependencies] -hyper = "0.7" -mime = "0.1.0" -serde = ">= 0.7.0" -serde_json = ">= 0.7.0" -yup-oauth2 = ">= 0.5.4" +hyper = "0.8" +mime = "0.2.0" +serde = "0.6.0" +serde_json = "0.6.0" +yup-oauth2 = ">= 0.5.6" url = ">= 0.5" [build-dependencies] -syntex = { version = ">= 0.23" } -serde_codegen = { version = ">= 0.6" } +syntex = { version = "= 0.28" } +serde_codegen = { version = "= 0.6.13" } diff --git a/gen/plusdomains1/README.md b/gen/plusdomains1/README.md index 55588df48a..f8c9a8fb73 100644 --- a/gen/plusdomains1/README.md +++ b/gen/plusdomains1/README.md @@ -5,7 +5,7 @@ DO NOT EDIT ! --> The `google-plusdomains1` library allows access to all features of the *Google plusDomains* service. -This documentation was generated from *plusDomains* crate version *0.1.12+20160223*, where *20160223* is the exact revision of the *plusDomains:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.12*. +This documentation was generated from *plusDomains* crate version *0.1.13+20160406*, where *20160406* is the exact revision of the *plusDomains:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.13*. Everything else about the *plusDomains* *v1* API can be found at the [official documentation site](https://developers.google.com/+/domains/). diff --git a/gen/plusdomains1/src/cmn.rs b/gen/plusdomains1/src/cmn.rs index 87b91a8986..c69621da55 100644 --- a/gen/plusdomains1/src/cmn.rs +++ b/gen/plusdomains1/src/cmn.rs @@ -12,7 +12,7 @@ use mime::{Mime, TopLevel, SubLevel, Attr, Value}; use oauth2::{TokenType, Retry, self}; use hyper; use hyper::header::{ContentType, ContentLength, Headers, UserAgent, Authorization, Header, - HeaderFormat}; + HeaderFormat, Bearer}; use hyper::http::h1::LINE_ENDING; use hyper::method::Method; use hyper::status::StatusCode; @@ -634,7 +634,7 @@ pub struct ResumableUploadHelper<'a, A: 'a> { pub start_at: Option, pub auth: &'a mut A, pub user_agent: &'a str, - pub auth_header: Authorization, + pub auth_header: Authorization, pub url: &'a str, pub reader: &'a mut ReadSeek, pub media_type: Mime, diff --git a/gen/plusdomains1/src/lib.rs b/gen/plusdomains1/src/lib.rs index a454bfe341..01f8f2c1c4 100644 --- a/gen/plusdomains1/src/lib.rs +++ b/gen/plusdomains1/src/lib.rs @@ -2,7 +2,7 @@ // This file was generated automatically from 'src/mako/api/lib.rs.mako' // DO NOT EDIT ! -//! This documentation was generated from *plusDomains* crate version *0.1.12+20160223*, where *20160223* is the exact revision of the *plusDomains:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.12*. +//! This documentation was generated from *plusDomains* crate version *0.1.13+20160406*, where *20160406* is the exact revision of the *plusDomains:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.13*. //! //! Everything else about the *plusDomains* *v1* API can be found at the //! [official documentation site](https://developers.google.com/+/domains/). diff --git a/gen/plusdomains1/src/lib.rs.in b/gen/plusdomains1/src/lib.rs.in index 48a5d3953b..76bba5f7a3 100644 --- a/gen/plusdomains1/src/lib.rs.in +++ b/gen/plusdomains1/src/lib.rs.in @@ -165,7 +165,7 @@ impl<'a, C, A> PlusDomains PlusDomains { client: RefCell::new(client), auth: RefCell::new(authenticator), - _user_agent: "google-api-rust-client/0.1.12".to_string(), + _user_agent: "google-api-rust-client/0.1.13".to_string(), } } @@ -189,7 +189,7 @@ impl<'a, C, A> PlusDomains } /// Set the user-agent header field to use in all requests to the server. - /// It defaults to `google-api-rust-client/0.1.12`. + /// It defaults to `google-api-rust-client/0.1.13`. /// /// Returns the previously set user-agent. pub fn user_agent(&mut self, agent_name: String) -> String { @@ -2394,7 +2394,7 @@ impl<'a, C, A> CircleRemovePeopleCall<'a, C, A> where C: BorrowMut Result { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -2472,8 +2472,7 @@ impl<'a, C, A> CircleRemovePeopleCall<'a, C, A> where C: BorrowMut CircleInsertCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Circle)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -2732,8 +2731,7 @@ impl<'a, C, A> CircleInsertCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -2916,7 +2914,7 @@ impl<'a, C, A> CircleAddPeopleCall<'a, C, A> where C: BorrowMut, /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Circle)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -2995,8 +2993,7 @@ impl<'a, C, A> CircleAddPeopleCall<'a, C, A> where C: BorrowMut, } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Put, &url) @@ -3178,7 +3175,7 @@ impl<'a, C, A> CircleGetCall<'a, C, A> where C: BorrowMut, A: oau /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Circle)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -3247,8 +3244,7 @@ impl<'a, C, A> CircleGetCall<'a, C, A> where C: BorrowMut, A: oau } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -3418,7 +3414,7 @@ impl<'a, C, A> CircleListCall<'a, C, A> where C: BorrowMut, A: oa /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, CircleFeed)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -3493,8 +3489,7 @@ impl<'a, C, A> CircleListCall<'a, C, A> where C: BorrowMut, A: oa } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -3681,7 +3676,7 @@ impl<'a, C, A> CircleUpdateCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Circle)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -3761,8 +3756,7 @@ impl<'a, C, A> CircleUpdateCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -3948,7 +3942,7 @@ impl<'a, C, A> CirclePatchCall<'a, C, A> where C: BorrowMut, A: o /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Circle)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -4028,8 +4022,7 @@ impl<'a, C, A> CirclePatchCall<'a, C, A> where C: BorrowMut, A: o } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -4208,7 +4201,7 @@ impl<'a, C, A> CircleRemoveCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -4276,8 +4269,7 @@ impl<'a, C, A> CircleRemoveCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Delete, &url) @@ -4442,7 +4434,7 @@ impl<'a, C, A> ActivityInsertCall<'a, C, A> where C: BorrowMut, A /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Activity)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -4525,8 +4517,7 @@ impl<'a, C, A> ActivityInsertCall<'a, C, A> where C: BorrowMut, A } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -4712,7 +4703,7 @@ impl<'a, C, A> ActivityGetCall<'a, C, A> where C: BorrowMut, A: o /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Activity)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -4781,8 +4772,7 @@ impl<'a, C, A> ActivityGetCall<'a, C, A> where C: BorrowMut, A: o } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -4953,7 +4943,7 @@ impl<'a, C, A> ActivityListCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, ActivityFeed)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -5029,8 +5019,7 @@ impl<'a, C, A> ActivityListCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -5224,7 +5213,7 @@ impl<'a, C, A> PeopleListByCircleCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, PeopleFeed)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -5299,8 +5288,7 @@ impl<'a, C, A> PeopleListByCircleCall<'a, C, A> where C: BorrowMut PeopleListCall<'a, C, A> where C: BorrowMut, A: oa /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, PeopleFeed)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -5566,8 +5554,7 @@ impl<'a, C, A> PeopleListCall<'a, C, A> where C: BorrowMut, A: oa } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -5764,7 +5751,7 @@ impl<'a, C, A> PeopleGetCall<'a, C, A> where C: BorrowMut, A: oau /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Person)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -5833,8 +5820,7 @@ impl<'a, C, A> PeopleGetCall<'a, C, A> where C: BorrowMut, A: oau } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -6005,7 +5991,7 @@ impl<'a, C, A> PeopleListByActivityCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, PeopleFeed)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -6081,8 +6067,7 @@ impl<'a, C, A> PeopleListByActivityCall<'a, C, A> where C: BorrowMut MediaInsertCall<'a, C, A> where C: BorrowMut, A: o fn doit(mut self, mut reader: RS, reader_mime_type: mime::Mime, protocol: &'static str) -> Result<(hyper::client::Response, Media)> where RS: ReadSeek { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -6374,8 +6359,7 @@ impl<'a, C, A> MediaInsertCall<'a, C, A> where C: BorrowMut, A: o } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { if should_ask_dlg_for_url && (upload_url = dlg.upload_url()) == () && upload_url.is_some() { @@ -6667,7 +6651,7 @@ impl<'a, C, A> CommentInsertCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Comment)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -6747,8 +6731,7 @@ impl<'a, C, A> CommentInsertCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -6933,7 +6916,7 @@ impl<'a, C, A> CommentListCall<'a, C, A> where C: BorrowMut, A: o /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, CommentFeed)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -7011,8 +6994,7 @@ impl<'a, C, A> CommentListCall<'a, C, A> where C: BorrowMut, A: o } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -7199,7 +7181,7 @@ impl<'a, C, A> CommentGetCall<'a, C, A> where C: BorrowMut, A: oa /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Comment)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -7268,8 +7250,7 @@ impl<'a, C, A> CommentGetCall<'a, C, A> where C: BorrowMut, A: oa } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -7439,7 +7420,7 @@ impl<'a, C, A> AudienceListCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, AudiencesFeed)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -7514,8 +7495,7 @@ impl<'a, C, A> AudienceListCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) diff --git a/gen/prediction1d6-cli/Cargo.toml b/gen/prediction1d6-cli/Cargo.toml index 1c8e2decd5..8ef834bdfc 100644 --- a/gen/prediction1d6-cli/Cargo.toml +++ b/gen/prediction1d6-cli/Cargo.toml @@ -4,7 +4,7 @@ [package] name = "google-prediction1d6-cli" -version = "0.3.3+20151102" +version = "0.3.4+20160304" authors = ["Sebastian Thiel "] description = "A complete library to interact with prediction (protocol v1.6)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/prediction1d6-cli" @@ -17,18 +17,18 @@ keywords = ["prediction", "google", "cli"] name = "prediction1d6" [dependencies] -hyper = "0.7" -mime = "0.1.0" -serde = ">= 0.7.0" -serde_json = ">= 0.7.0" -yup-oauth2 = ">= 0.5.4" +hyper = "0.8" +mime = "0.2.0" +serde = "0.6.0" +serde_json = "0.6.0" +yup-oauth2 = ">= 0.5.6" strsim = "0.4" yup-hyper-mock = "1.0" clap = "2.0" [build-dependencies] -syntex = { version = ">= 0.23" } -serde_codegen = { version = ">= 0.6" } +syntex = { version = "= 0.28" } +serde_codegen = { version = "= 0.6.13" } [dependencies.google-prediction1d6] diff --git a/gen/prediction1d6-cli/README.md b/gen/prediction1d6-cli/README.md index 72996442ff..d1220ddc0b 100644 --- a/gen/prediction1d6-cli/README.md +++ b/gen/prediction1d6-cli/README.md @@ -17,14 +17,14 @@ Everything else about the *prediction* API can be found at the You can download the pre-compiled 64bit binaries for the following platforms: -* ![icon](http://megaicons.net/static/img/icons_sizes/6/140/16/ubuntu-icon.png) [ubuntu](http://dl.byronimo.de/google.rs/cli/0.3.3/ubuntu/prediction1d6.tar.gz) -* ![icon](http://hydra-media.cursecdn.com/wow.gamepedia.com/a/a2/Apple-icon-16x16.png?version=25ddd67ac3dd3b634478e3978b76cb74) [osx](http://dl.byronimo.de/google.rs/cli/0.3.3/osx/prediction1d6.tar.gz) +* ![icon](http://megaicons.net/static/img/icons_sizes/6/140/16/ubuntu-icon.png) [ubuntu](http://dl.byronimo.de/google.rs/cli/0.3.4/ubuntu/prediction1d6.tar.gz) +* ![icon](http://hydra-media.cursecdn.com/wow.gamepedia.com/a/a2/Apple-icon-16x16.png?version=25ddd67ac3dd3b634478e3978b76cb74) [osx](http://dl.byronimo.de/google.rs/cli/0.3.4/osx/prediction1d6.tar.gz) Find the source code [on github](https://github.com/Byron/google-apis-rs/tree/master/gen/prediction1d6-cli). # Usage -This documentation was generated from the *prediction* API at revision *20151102*. The CLI is at version *0.3.3*. +This documentation was generated from the *prediction* API at revision *20160304*. The CLI is at version *0.3.4*. ```bash prediction1d6 [options] diff --git a/gen/prediction1d6-cli/mkdocs.yml b/gen/prediction1d6-cli/mkdocs.yml index 44bbf491be..6ef2d2d463 100644 --- a/gen/prediction1d6-cli/mkdocs.yml +++ b/gen/prediction1d6-cli/mkdocs.yml @@ -1,4 +1,4 @@ -site_name: prediction v0.3.3+20151102 +site_name: prediction v0.3.4+20160304 site_url: http://byron.github.io/google-apis-rs/google-prediction1d6-cli site_description: Write integrating applications with bcore diff --git a/gen/prediction1d6-cli/src/cmn.rs b/gen/prediction1d6-cli/src/cmn.rs index 188159ee80..ae86fdef65 100644 --- a/gen/prediction1d6-cli/src/cmn.rs +++ b/gen/prediction1d6-cli/src/cmn.rs @@ -414,7 +414,7 @@ impl TokenStorage for JsonTokenStorage { Err(err) => match err.kind() { io::ErrorKind::NotFound => Ok(()), - _ => Err(json::Error::Io(err)) + _ => Err(json::Error::IoError(err)) }, Ok(_) => Ok(()), } @@ -427,7 +427,7 @@ impl TokenStorage for JsonTokenStorage { Err(serde_err) => Err(serde_err), } }, - Err(io_err) => Err(json::Error::Io(io_err)) + Err(io_err) => Err(json::Error::IoError(io_err)) } } } @@ -444,7 +444,7 @@ impl TokenStorage for JsonTokenStorage { Err(io_err) => { match io_err.kind() { io::ErrorKind::NotFound => Ok(None), - _ => Err(json::Error::Io(io_err)) + _ => Err(json::Error::IoError(io_err)) } } } @@ -683,7 +683,7 @@ pub fn application_secret_from_directory(dir: &str, = json::from_str(json_console_secret).unwrap(); match json::to_writer_pretty(&mut f, &console_secret) { Err(serde_err) => match serde_err { - json::Error::Io(err) => err, + json::Error::IoError(err) => err, _ => panic!("Unexpected serde error: {:#?}", serde_err) }, Ok(_) => continue, @@ -696,7 +696,7 @@ pub fn application_secret_from_directory(dir: &str, }, Ok(f) => { match json::de::from_reader::<_, ConsoleApplicationSecret>(f) { - Err(json::Error::Io(err)) => + Err(json::Error::IoError(err)) => return secret_io_error(err), Err(json_err) => return Err(CLIError::Configuration( diff --git a/gen/prediction1d6-cli/src/main.rs b/gen/prediction1d6-cli/src/main.rs index 269b58a7ad..5c19bb2a6f 100644 --- a/gen/prediction1d6-cli/src/main.rs +++ b/gen/prediction1d6-cli/src/main.rs @@ -962,7 +962,7 @@ fn main() { let mut app = App::new("prediction1d6") .author("Sebastian Thiel ") - .version("0.3.3+20151102") + .version("0.3.4+20160304") .about("Lets you access a cloud hosted machine learning service that makes it easy to build smart apps") .after_help("All documentation details can be found at http://byron.github.io/google-apis-rs/google_prediction1d6_cli") .arg(Arg::with_name("url") diff --git a/gen/prediction1d6/Cargo.toml b/gen/prediction1d6/Cargo.toml index 67fed5c209..af428e85fb 100644 --- a/gen/prediction1d6/Cargo.toml +++ b/gen/prediction1d6/Cargo.toml @@ -4,7 +4,7 @@ [package] name = "google-prediction1d6" -version = "0.1.12+20151102" +version = "0.1.13+20160304" authors = ["Sebastian Thiel "] description = "A complete library to interact with prediction (protocol v1.6)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/prediction1d6" @@ -16,14 +16,14 @@ build = "src/build.rs" [dependencies] -hyper = "0.7" -mime = "0.1.0" -serde = ">= 0.7.0" -serde_json = ">= 0.7.0" -yup-oauth2 = ">= 0.5.4" +hyper = "0.8" +mime = "0.2.0" +serde = "0.6.0" +serde_json = "0.6.0" +yup-oauth2 = ">= 0.5.6" url = ">= 0.5" [build-dependencies] -syntex = { version = ">= 0.23" } -serde_codegen = { version = ">= 0.6" } +syntex = { version = "= 0.28" } +serde_codegen = { version = "= 0.6.13" } diff --git a/gen/prediction1d6/README.md b/gen/prediction1d6/README.md index f07aa42a2c..0852c625f5 100644 --- a/gen/prediction1d6/README.md +++ b/gen/prediction1d6/README.md @@ -5,7 +5,7 @@ DO NOT EDIT ! --> The `google-prediction1d6` library allows access to all features of the *Google prediction* service. -This documentation was generated from *prediction* crate version *0.1.12+20151102*, where *20151102* is the exact revision of the *prediction:v1.6* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.12*. +This documentation was generated from *prediction* crate version *0.1.13+20160304*, where *20160304* is the exact revision of the *prediction:v1.6* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.13*. Everything else about the *prediction* *v1d6* API can be found at the [official documentation site](https://developers.google.com/prediction/docs/developer-guide). diff --git a/gen/prediction1d6/src/cmn.rs b/gen/prediction1d6/src/cmn.rs index 87b91a8986..c69621da55 100644 --- a/gen/prediction1d6/src/cmn.rs +++ b/gen/prediction1d6/src/cmn.rs @@ -12,7 +12,7 @@ use mime::{Mime, TopLevel, SubLevel, Attr, Value}; use oauth2::{TokenType, Retry, self}; use hyper; use hyper::header::{ContentType, ContentLength, Headers, UserAgent, Authorization, Header, - HeaderFormat}; + HeaderFormat, Bearer}; use hyper::http::h1::LINE_ENDING; use hyper::method::Method; use hyper::status::StatusCode; @@ -634,7 +634,7 @@ pub struct ResumableUploadHelper<'a, A: 'a> { pub start_at: Option, pub auth: &'a mut A, pub user_agent: &'a str, - pub auth_header: Authorization, + pub auth_header: Authorization, pub url: &'a str, pub reader: &'a mut ReadSeek, pub media_type: Mime, diff --git a/gen/prediction1d6/src/lib.rs b/gen/prediction1d6/src/lib.rs index 92944f0b22..602ab62538 100644 --- a/gen/prediction1d6/src/lib.rs +++ b/gen/prediction1d6/src/lib.rs @@ -2,7 +2,7 @@ // This file was generated automatically from 'src/mako/api/lib.rs.mako' // DO NOT EDIT ! -//! This documentation was generated from *prediction* crate version *0.1.12+20151102*, where *20151102* is the exact revision of the *prediction:v1.6* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.12*. +//! This documentation was generated from *prediction* crate version *0.1.13+20160304*, where *20160304* is the exact revision of the *prediction:v1.6* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.13*. //! //! Everything else about the *prediction* *v1d6* API can be found at the //! [official documentation site](https://developers.google.com/prediction/docs/developer-guide). diff --git a/gen/prediction1d6/src/lib.rs.in b/gen/prediction1d6/src/lib.rs.in index 289262c095..680fb03790 100644 --- a/gen/prediction1d6/src/lib.rs.in +++ b/gen/prediction1d6/src/lib.rs.in @@ -145,7 +145,7 @@ impl<'a, C, A> Prediction Prediction { client: RefCell::new(client), auth: RefCell::new(authenticator), - _user_agent: "google-api-rust-client/0.1.12".to_string(), + _user_agent: "google-api-rust-client/0.1.13".to_string(), } } @@ -157,7 +157,7 @@ impl<'a, C, A> Prediction } /// Set the user-agent header field to use in all requests to the server. - /// It defaults to `google-api-rust-client/0.1.12`. + /// It defaults to `google-api-rust-client/0.1.13`. /// /// Returns the previously set user-agent. pub fn user_agent(&mut self, agent_name: String) -> String { @@ -936,7 +936,7 @@ impl<'a, C, A> TrainedmodelGetCall<'a, C, A> where C: BorrowMut, /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Insert2)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -1006,8 +1006,7 @@ impl<'a, C, A> TrainedmodelGetCall<'a, C, A> where C: BorrowMut, } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -1191,7 +1190,7 @@ impl<'a, C, A> TrainedmodelUpdateCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, Insert2)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -1272,8 +1271,7 @@ impl<'a, C, A> TrainedmodelUpdateCall<'a, C, A> where C: BorrowMut TrainedmodelListCall<'a, C, A> where C: BorrowMut, /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, List)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -1541,8 +1539,7 @@ impl<'a, C, A> TrainedmodelListCall<'a, C, A> where C: BorrowMut, } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -1723,7 +1720,7 @@ impl<'a, C, A> TrainedmodelDeleteCall<'a, C, A> where C: BorrowMut Result { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -1792,8 +1789,7 @@ impl<'a, C, A> TrainedmodelDeleteCall<'a, C, A> where C: BorrowMut TrainedmodelInsertCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, Insert2)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -2046,8 +2042,7 @@ impl<'a, C, A> TrainedmodelInsertCall<'a, C, A> where C: BorrowMut TrainedmodelAnalyzeCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, Analyze)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -2297,8 +2292,7 @@ impl<'a, C, A> TrainedmodelAnalyzeCall<'a, C, A> where C: BorrowMut TrainedmodelPredictCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, Output)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -2563,8 +2557,7 @@ impl<'a, C, A> TrainedmodelPredictCall<'a, C, A> where C: BorrowMut HostedmodelPredictCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, Output)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -2842,8 +2835,7 @@ impl<'a, C, A> HostedmodelPredictCall<'a, C, A> where C: BorrowMut"] description = "A complete library to interact with proximitybeacon (protocol v1beta1)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/proximitybeacon1_beta1-cli" @@ -17,18 +17,18 @@ keywords = ["proximitybeacon", "google", "cli"] name = "proximitybeacon1-beta1" [dependencies] -hyper = "0.7" -mime = "0.1.0" -serde = ">= 0.7.0" -serde_json = ">= 0.7.0" -yup-oauth2 = ">= 0.5.4" +hyper = "0.8" +mime = "0.2.0" +serde = "0.6.0" +serde_json = "0.6.0" +yup-oauth2 = ">= 0.5.6" strsim = "0.4" yup-hyper-mock = "1.0" clap = "2.0" [build-dependencies] -syntex = { version = ">= 0.23" } -serde_codegen = { version = ">= 0.6" } +syntex = { version = "= 0.28" } +serde_codegen = { version = "= 0.6.13" } [dependencies.google-proximitybeacon1_beta1] diff --git a/gen/proximitybeacon1_beta1-cli/README.md b/gen/proximitybeacon1_beta1-cli/README.md index 69b7057e81..c22dff57f1 100644 --- a/gen/proximitybeacon1_beta1-cli/README.md +++ b/gen/proximitybeacon1_beta1-cli/README.md @@ -17,14 +17,14 @@ Everything else about the *proximitybeacon* API can be found at the You can download the pre-compiled 64bit binaries for the following platforms: -* ![icon](http://megaicons.net/static/img/icons_sizes/6/140/16/ubuntu-icon.png) [ubuntu](http://dl.byronimo.de/google.rs/cli/0.3.3/ubuntu/proximitybeacon1-beta1.tar.gz) -* ![icon](http://hydra-media.cursecdn.com/wow.gamepedia.com/a/a2/Apple-icon-16x16.png?version=25ddd67ac3dd3b634478e3978b76cb74) [osx](http://dl.byronimo.de/google.rs/cli/0.3.3/osx/proximitybeacon1-beta1.tar.gz) +* ![icon](http://megaicons.net/static/img/icons_sizes/6/140/16/ubuntu-icon.png) [ubuntu](http://dl.byronimo.de/google.rs/cli/0.3.4/ubuntu/proximitybeacon1-beta1.tar.gz) +* ![icon](http://hydra-media.cursecdn.com/wow.gamepedia.com/a/a2/Apple-icon-16x16.png?version=25ddd67ac3dd3b634478e3978b76cb74) [osx](http://dl.byronimo.de/google.rs/cli/0.3.4/osx/proximitybeacon1-beta1.tar.gz) Find the source code [on github](https://github.com/Byron/google-apis-rs/tree/master/gen/proximitybeacon1_beta1-cli). # Usage -This documentation was generated from the *proximitybeacon* API at revision *20150729*. The CLI is at version *0.3.3*. +This documentation was generated from the *proximitybeacon* API at revision *20150729*. The CLI is at version *0.3.4*. ```bash proximitybeacon1-beta1 [options] diff --git a/gen/proximitybeacon1_beta1-cli/mkdocs.yml b/gen/proximitybeacon1_beta1-cli/mkdocs.yml index c2d5bde321..c614e82e4e 100644 --- a/gen/proximitybeacon1_beta1-cli/mkdocs.yml +++ b/gen/proximitybeacon1_beta1-cli/mkdocs.yml @@ -1,4 +1,4 @@ -site_name: proximitybeacon v0.3.3+20150729 +site_name: proximitybeacon v0.3.4+20150729 site_url: http://byron.github.io/google-apis-rs/google-proximitybeacon1_beta1-cli site_description: Write integrating applications with bcore diff --git a/gen/proximitybeacon1_beta1-cli/src/cmn.rs b/gen/proximitybeacon1_beta1-cli/src/cmn.rs index 188159ee80..ae86fdef65 100644 --- a/gen/proximitybeacon1_beta1-cli/src/cmn.rs +++ b/gen/proximitybeacon1_beta1-cli/src/cmn.rs @@ -414,7 +414,7 @@ impl TokenStorage for JsonTokenStorage { Err(err) => match err.kind() { io::ErrorKind::NotFound => Ok(()), - _ => Err(json::Error::Io(err)) + _ => Err(json::Error::IoError(err)) }, Ok(_) => Ok(()), } @@ -427,7 +427,7 @@ impl TokenStorage for JsonTokenStorage { Err(serde_err) => Err(serde_err), } }, - Err(io_err) => Err(json::Error::Io(io_err)) + Err(io_err) => Err(json::Error::IoError(io_err)) } } } @@ -444,7 +444,7 @@ impl TokenStorage for JsonTokenStorage { Err(io_err) => { match io_err.kind() { io::ErrorKind::NotFound => Ok(None), - _ => Err(json::Error::Io(io_err)) + _ => Err(json::Error::IoError(io_err)) } } } @@ -683,7 +683,7 @@ pub fn application_secret_from_directory(dir: &str, = json::from_str(json_console_secret).unwrap(); match json::to_writer_pretty(&mut f, &console_secret) { Err(serde_err) => match serde_err { - json::Error::Io(err) => err, + json::Error::IoError(err) => err, _ => panic!("Unexpected serde error: {:#?}", serde_err) }, Ok(_) => continue, @@ -696,7 +696,7 @@ pub fn application_secret_from_directory(dir: &str, }, Ok(f) => { match json::de::from_reader::<_, ConsoleApplicationSecret>(f) { - Err(json::Error::Io(err)) => + Err(json::Error::IoError(err)) => return secret_io_error(err), Err(json_err) => return Err(CLIError::Configuration( diff --git a/gen/proximitybeacon1_beta1-cli/src/main.rs b/gen/proximitybeacon1_beta1-cli/src/main.rs index 26e81eb331..8a6367d9d9 100644 --- a/gen/proximitybeacon1_beta1-cli/src/main.rs +++ b/gen/proximitybeacon1_beta1-cli/src/main.rs @@ -1393,7 +1393,7 @@ fn main() { let mut app = App::new("proximitybeacon1-beta1") .author("Sebastian Thiel ") - .version("0.3.3+20150729") + .version("0.3.4+20150729") .about("This API provides services to register, manage, index, and search beacons.") .after_help("All documentation details can be found at http://byron.github.io/google-apis-rs/google_proximitybeacon1_beta1_cli") .arg(Arg::with_name("folder") diff --git a/gen/proximitybeacon1_beta1/Cargo.toml b/gen/proximitybeacon1_beta1/Cargo.toml index 12fc5964f9..af291b10e8 100644 --- a/gen/proximitybeacon1_beta1/Cargo.toml +++ b/gen/proximitybeacon1_beta1/Cargo.toml @@ -4,7 +4,7 @@ [package] name = "google-proximitybeacon1_beta1" -version = "0.1.12+20150729" +version = "0.1.13+20150729" authors = ["Sebastian Thiel "] description = "A complete library to interact with proximitybeacon (protocol v1beta1)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/proximitybeacon1_beta1" @@ -16,14 +16,14 @@ build = "src/build.rs" [dependencies] -hyper = "0.7" -mime = "0.1.0" -serde = ">= 0.7.0" -serde_json = ">= 0.7.0" -yup-oauth2 = ">= 0.5.4" +hyper = "0.8" +mime = "0.2.0" +serde = "0.6.0" +serde_json = "0.6.0" +yup-oauth2 = ">= 0.5.6" url = ">= 0.5" [build-dependencies] -syntex = { version = ">= 0.23" } -serde_codegen = { version = ">= 0.6" } +syntex = { version = "= 0.28" } +serde_codegen = { version = "= 0.6.13" } diff --git a/gen/proximitybeacon1_beta1/README.md b/gen/proximitybeacon1_beta1/README.md index e10822e7a4..40d04496d5 100644 --- a/gen/proximitybeacon1_beta1/README.md +++ b/gen/proximitybeacon1_beta1/README.md @@ -5,7 +5,7 @@ DO NOT EDIT ! --> The `google-proximitybeacon1_beta1` library allows access to all features of the *Google proximitybeacon* service. -This documentation was generated from *proximitybeacon* crate version *0.1.12+20150729*, where *20150729* is the exact revision of the *proximitybeacon:v1beta1* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.12*. +This documentation was generated from *proximitybeacon* crate version *0.1.13+20150729*, where *20150729* is the exact revision of the *proximitybeacon:v1beta1* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.13*. Everything else about the *proximitybeacon* *v1_beta1* API can be found at the [official documentation site](https://developers.google.com/beacons/proximity/). diff --git a/gen/proximitybeacon1_beta1/src/cmn.rs b/gen/proximitybeacon1_beta1/src/cmn.rs index 87b91a8986..c69621da55 100644 --- a/gen/proximitybeacon1_beta1/src/cmn.rs +++ b/gen/proximitybeacon1_beta1/src/cmn.rs @@ -12,7 +12,7 @@ use mime::{Mime, TopLevel, SubLevel, Attr, Value}; use oauth2::{TokenType, Retry, self}; use hyper; use hyper::header::{ContentType, ContentLength, Headers, UserAgent, Authorization, Header, - HeaderFormat}; + HeaderFormat, Bearer}; use hyper::http::h1::LINE_ENDING; use hyper::method::Method; use hyper::status::StatusCode; @@ -634,7 +634,7 @@ pub struct ResumableUploadHelper<'a, A: 'a> { pub start_at: Option, pub auth: &'a mut A, pub user_agent: &'a str, - pub auth_header: Authorization, + pub auth_header: Authorization, pub url: &'a str, pub reader: &'a mut ReadSeek, pub media_type: Mime, diff --git a/gen/proximitybeacon1_beta1/src/lib.rs b/gen/proximitybeacon1_beta1/src/lib.rs index d26ae0b856..51ca09a6d4 100644 --- a/gen/proximitybeacon1_beta1/src/lib.rs +++ b/gen/proximitybeacon1_beta1/src/lib.rs @@ -2,7 +2,7 @@ // This file was generated automatically from 'src/mako/api/lib.rs.mako' // DO NOT EDIT ! -//! This documentation was generated from *proximitybeacon* crate version *0.1.12+20150729*, where *20150729* is the exact revision of the *proximitybeacon:v1beta1* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.12*. +//! This documentation was generated from *proximitybeacon* crate version *0.1.13+20150729*, where *20150729* is the exact revision of the *proximitybeacon:v1beta1* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.13*. //! //! Everything else about the *proximitybeacon* *v1_beta1* API can be found at the //! [official documentation site](https://developers.google.com/beacons/proximity/). diff --git a/gen/proximitybeacon1_beta1/src/lib.rs.in b/gen/proximitybeacon1_beta1/src/lib.rs.in index db3d2bf7ec..0a0405760b 100644 --- a/gen/proximitybeacon1_beta1/src/lib.rs.in +++ b/gen/proximitybeacon1_beta1/src/lib.rs.in @@ -108,7 +108,7 @@ impl<'a, C, A> Proximitybeacon Proximitybeacon { client: RefCell::new(client), auth: RefCell::new(authenticator), - _user_agent: "google-api-rust-client/0.1.12".to_string(), + _user_agent: "google-api-rust-client/0.1.13".to_string(), } } @@ -123,7 +123,7 @@ impl<'a, C, A> Proximitybeacon } /// Set the user-agent header field to use in all requests to the server. - /// It defaults to `google-api-rust-client/0.1.12`. + /// It defaults to `google-api-rust-client/0.1.13`. /// /// Returns the previously set user-agent. pub fn user_agent(&mut self, agent_name: String) -> String { @@ -942,7 +942,7 @@ impl<'a, C, A> BeaconAttachmentListCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, ListBeaconAttachmentsResponse)> { use url::percent_encoding::{percent_encode, FORM_URLENCODED_ENCODE_SET}; use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -1175,7 +1175,7 @@ impl<'a, C, A> BeaconGetCall<'a, C, A> where C: BorrowMut, A: oau pub fn doit(mut self) -> Result<(hyper::client::Response, Beacon)> { use url::percent_encoding::{percent_encode, FORM_URLENCODED_ENCODE_SET}; use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -1407,7 +1407,7 @@ impl<'a, C, A> BeaconAttachmentCreateCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, BeaconAttachment)> { use url::percent_encoding::{percent_encode, FORM_URLENCODED_ENCODE_SET}; use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -1654,7 +1654,7 @@ impl<'a, C, A> BeaconDecommissionCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, Empty)> { use url::percent_encoding::{percent_encode, FORM_URLENCODED_ENCODE_SET}; use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -1877,7 +1877,7 @@ impl<'a, C, A> BeaconActivateCall<'a, C, A> where C: BorrowMut, A pub fn doit(mut self) -> Result<(hyper::client::Response, Empty)> { use url::percent_encoding::{percent_encode, FORM_URLENCODED_ENCODE_SET}; use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -2104,7 +2104,7 @@ impl<'a, C, A> BeaconListCall<'a, C, A> where C: BorrowMut, A: oa /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, ListBeaconsResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -2329,7 +2329,7 @@ impl<'a, C, A> BeaconUpdateCall<'a, C, A> where C: BorrowMut, A: pub fn doit(mut self) -> Result<(hyper::client::Response, Beacon)> { use url::percent_encoding::{percent_encode, FORM_URLENCODED_ENCODE_SET}; use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -2576,7 +2576,7 @@ impl<'a, C, A> BeaconAttachmentDeleteCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, Empty)> { use url::percent_encoding::{percent_encode, FORM_URLENCODED_ENCODE_SET}; use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -2799,7 +2799,7 @@ impl<'a, C, A> BeaconDeactivateCall<'a, C, A> where C: BorrowMut, pub fn doit(mut self) -> Result<(hyper::client::Response, Empty)> { use url::percent_encoding::{percent_encode, FORM_URLENCODED_ENCODE_SET}; use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -3027,7 +3027,7 @@ impl<'a, C, A> BeaconRegisterCall<'a, C, A> where C: BorrowMut, A /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Beacon)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -3245,7 +3245,7 @@ impl<'a, C, A> BeaconDiagnosticListCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, ListDiagnosticsResponse)> { use url::percent_encoding::{percent_encode, FORM_URLENCODED_ENCODE_SET}; use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -3500,7 +3500,7 @@ impl<'a, C, A> BeaconAttachmentBatchDeleteCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, DeleteAttachmentsResponse)> { use url::percent_encoding::{percent_encode, FORM_URLENCODED_ENCODE_SET}; use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -3738,7 +3738,7 @@ impl<'a, C, A> BeaconinfoGetforobservedCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, GetInfoForObservedBeaconsResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -3948,7 +3948,7 @@ impl<'a, C, A> NamespaceListCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, ListNamespacesResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, diff --git a/gen/pubsub1-cli/Cargo.toml b/gen/pubsub1-cli/Cargo.toml index 5f47f09f74..51e49e6edb 100644 --- a/gen/pubsub1-cli/Cargo.toml +++ b/gen/pubsub1-cli/Cargo.toml @@ -4,7 +4,7 @@ [package] name = "google-pubsub1-cli" -version = "0.3.3+20151103" +version = "0.3.4+20160317" authors = ["Sebastian Thiel "] description = "A complete library to interact with pubsub (protocol v1)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/pubsub1-cli" @@ -17,18 +17,18 @@ keywords = ["pubsub", "google", "cli"] name = "pubsub1" [dependencies] -hyper = "0.7" -mime = "0.1.0" -serde = ">= 0.7.0" -serde_json = ">= 0.7.0" -yup-oauth2 = ">= 0.5.4" +hyper = "0.8" +mime = "0.2.0" +serde = "0.6.0" +serde_json = "0.6.0" +yup-oauth2 = ">= 0.5.6" strsim = "0.4" yup-hyper-mock = "1.0" clap = "2.0" [build-dependencies] -syntex = { version = ">= 0.23" } -serde_codegen = { version = ">= 0.6" } +syntex = { version = "= 0.28" } +serde_codegen = { version = "= 0.6.13" } [dependencies.google-pubsub1] diff --git a/gen/pubsub1-cli/README.md b/gen/pubsub1-cli/README.md index 76a1e55764..63a42df3a4 100644 --- a/gen/pubsub1-cli/README.md +++ b/gen/pubsub1-cli/README.md @@ -17,14 +17,14 @@ Everything else about the *pubsub* API can be found at the You can download the pre-compiled 64bit binaries for the following platforms: -* ![icon](http://megaicons.net/static/img/icons_sizes/6/140/16/ubuntu-icon.png) [ubuntu](http://dl.byronimo.de/google.rs/cli/0.3.3/ubuntu/pubsub1.tar.gz) -* ![icon](http://hydra-media.cursecdn.com/wow.gamepedia.com/a/a2/Apple-icon-16x16.png?version=25ddd67ac3dd3b634478e3978b76cb74) [osx](http://dl.byronimo.de/google.rs/cli/0.3.3/osx/pubsub1.tar.gz) +* ![icon](http://megaicons.net/static/img/icons_sizes/6/140/16/ubuntu-icon.png) [ubuntu](http://dl.byronimo.de/google.rs/cli/0.3.4/ubuntu/pubsub1.tar.gz) +* ![icon](http://hydra-media.cursecdn.com/wow.gamepedia.com/a/a2/Apple-icon-16x16.png?version=25ddd67ac3dd3b634478e3978b76cb74) [osx](http://dl.byronimo.de/google.rs/cli/0.3.4/osx/pubsub1.tar.gz) Find the source code [on github](https://github.com/Byron/google-apis-rs/tree/master/gen/pubsub1-cli). # Usage -This documentation was generated from the *pubsub* API at revision *20151103*. The CLI is at version *0.3.3*. +This documentation was generated from the *pubsub* API at revision *20160317*. The CLI is at version *0.3.4*. ```bash pubsub1 [options] diff --git a/gen/pubsub1-cli/mkdocs.yml b/gen/pubsub1-cli/mkdocs.yml index 8a2e4438c0..9fe890e542 100644 --- a/gen/pubsub1-cli/mkdocs.yml +++ b/gen/pubsub1-cli/mkdocs.yml @@ -1,4 +1,4 @@ -site_name: pubsub v0.3.3+20151103 +site_name: pubsub v0.3.4+20160317 site_url: http://byron.github.io/google-apis-rs/google-pubsub1-cli site_description: Write integrating applications with bcore diff --git a/gen/pubsub1-cli/src/cmn.rs b/gen/pubsub1-cli/src/cmn.rs index 188159ee80..ae86fdef65 100644 --- a/gen/pubsub1-cli/src/cmn.rs +++ b/gen/pubsub1-cli/src/cmn.rs @@ -414,7 +414,7 @@ impl TokenStorage for JsonTokenStorage { Err(err) => match err.kind() { io::ErrorKind::NotFound => Ok(()), - _ => Err(json::Error::Io(err)) + _ => Err(json::Error::IoError(err)) }, Ok(_) => Ok(()), } @@ -427,7 +427,7 @@ impl TokenStorage for JsonTokenStorage { Err(serde_err) => Err(serde_err), } }, - Err(io_err) => Err(json::Error::Io(io_err)) + Err(io_err) => Err(json::Error::IoError(io_err)) } } } @@ -444,7 +444,7 @@ impl TokenStorage for JsonTokenStorage { Err(io_err) => { match io_err.kind() { io::ErrorKind::NotFound => Ok(None), - _ => Err(json::Error::Io(io_err)) + _ => Err(json::Error::IoError(io_err)) } } } @@ -683,7 +683,7 @@ pub fn application_secret_from_directory(dir: &str, = json::from_str(json_console_secret).unwrap(); match json::to_writer_pretty(&mut f, &console_secret) { Err(serde_err) => match serde_err { - json::Error::Io(err) => err, + json::Error::IoError(err) => err, _ => panic!("Unexpected serde error: {:#?}", serde_err) }, Ok(_) => continue, @@ -696,7 +696,7 @@ pub fn application_secret_from_directory(dir: &str, }, Ok(f) => { match json::de::from_reader::<_, ConsoleApplicationSecret>(f) { - Err(json::Error::Io(err)) => + Err(json::Error::IoError(err)) => return secret_io_error(err), Err(json_err) => return Err(CLIError::Configuration( diff --git a/gen/pubsub1-cli/src/main.rs b/gen/pubsub1-cli/src/main.rs index 28de02aa69..2b447006a1 100644 --- a/gen/pubsub1-cli/src/main.rs +++ b/gen/pubsub1-cli/src/main.rs @@ -1666,7 +1666,7 @@ fn main() { Some(false)), ]), ("subscriptions-create", - Some(r##"Creates a subscription to a given topic for a given subscriber. If the subscription already exists, returns `ALREADY_EXISTS`. If the corresponding topic doesn't exist, returns `NOT_FOUND`. If the name is not provided in the request, the server will assign a random name for this subscription on the same project as the topic."##), + Some(r##"Creates a subscription to a given topic. If the subscription already exists, returns `ALREADY_EXISTS`. If the corresponding topic doesn't exist, returns `NOT_FOUND`. If the name is not provided in the request, the server will assign a random name for this subscription on the same project as the topic."##), "Details at http://byron.github.io/google-apis-rs/google_pubsub1_cli/projects_subscriptions-create", vec![ (Some(r##"name"##), @@ -1738,12 +1738,12 @@ fn main() { Some(false)), ]), ("subscriptions-get-iam-policy", - Some(r##"Gets the access control policy for a `resource`. Is empty if the policy or the resource does not exist."##), + Some(r##"Gets the access control policy for a `resource`. Returns an empty policy if the resource exists and does not have a policy set."##), "Details at http://byron.github.io/google-apis-rs/google_pubsub1_cli/projects_subscriptions-get-iam-policy", vec![ (Some(r##"resource"##), None, - Some(r##"REQUIRED: The resource for which policy is being requested. `resource` is usually specified as a path, such as, `projects/{project}/zones/{zone}/disks/{disk}`. The format for the path specified in this value is resource specific and is specified in the documentation for the respective GetIamPolicy rpc."##), + Some(r##"REQUIRED: The resource for which the policy is being requested. `resource` is usually specified as a path, such as `projects/*project*/zones/*zone*/disks/*disk*`. The format for the path specified in this value is resource specific and is specified in the `getIamPolicy` documentation."##), Some(true), Some(false)), @@ -1871,7 +1871,7 @@ fn main() { vec![ (Some(r##"resource"##), None, - Some(r##"REQUIRED: The resource for which policy is being specified. `resource` is usually specified as a path, such as, `projects/{project}/zones/{zone}/disks/{disk}`. The format for the path specified in this value is resource specific and is specified in the documentation for the respective SetIamPolicy rpc."##), + Some(r##"REQUIRED: The resource for which the policy is being specified. `resource` is usually specified as a path, such as `projects/*project*/zones/*zone*/disks/*disk*`. The format for the path specified in this value is resource specific and is specified in the `setIamPolicy` documentation."##), Some(true), Some(false)), @@ -1899,7 +1899,7 @@ fn main() { vec![ (Some(r##"resource"##), None, - Some(r##"REQUIRED: The resource for which policy detail is being requested. `resource` is usually specified as a path, such as, `projects/{project}/zones/{zone}/disks/{disk}`. The format for the path specified in this value is resource specific and is specified in the documentation for the respective TestIamPermissions rpc."##), + Some(r##"REQUIRED: The resource for which the policy detail is being requested. `resource` is usually specified as a path, such as `projects/*project*/zones/*zone*/disks/*disk*`. The format for the path specified in this value is resource specific and is specified in the `testIamPermissions` documentation."##), Some(true), Some(false)), @@ -1994,12 +1994,12 @@ fn main() { Some(false)), ]), ("topics-get-iam-policy", - Some(r##"Gets the access control policy for a `resource`. Is empty if the policy or the resource does not exist."##), + Some(r##"Gets the access control policy for a `resource`. Returns an empty policy if the resource exists and does not have a policy set."##), "Details at http://byron.github.io/google-apis-rs/google_pubsub1_cli/projects_topics-get-iam-policy", vec![ (Some(r##"resource"##), None, - Some(r##"REQUIRED: The resource for which policy is being requested. `resource` is usually specified as a path, such as, `projects/{project}/zones/{zone}/disks/{disk}`. The format for the path specified in this value is resource specific and is specified in the documentation for the respective GetIamPolicy rpc."##), + Some(r##"REQUIRED: The resource for which the policy is being requested. `resource` is usually specified as a path, such as `projects/*project*/zones/*zone*/disks/*disk*`. The format for the path specified in this value is resource specific and is specified in the `getIamPolicy` documentation."##), Some(true), Some(false)), @@ -2071,7 +2071,7 @@ fn main() { vec![ (Some(r##"resource"##), None, - Some(r##"REQUIRED: The resource for which policy is being specified. `resource` is usually specified as a path, such as, `projects/{project}/zones/{zone}/disks/{disk}`. The format for the path specified in this value is resource specific and is specified in the documentation for the respective SetIamPolicy rpc."##), + Some(r##"REQUIRED: The resource for which the policy is being specified. `resource` is usually specified as a path, such as `projects/*project*/zones/*zone*/disks/*disk*`. The format for the path specified in this value is resource specific and is specified in the `setIamPolicy` documentation."##), Some(true), Some(false)), @@ -2121,7 +2121,7 @@ fn main() { vec![ (Some(r##"resource"##), None, - Some(r##"REQUIRED: The resource for which policy detail is being requested. `resource` is usually specified as a path, such as, `projects/{project}/zones/{zone}/disks/{disk}`. The format for the path specified in this value is resource specific and is specified in the documentation for the respective TestIamPermissions rpc."##), + Some(r##"REQUIRED: The resource for which the policy detail is being requested. `resource` is usually specified as a path, such as `projects/*project*/zones/*zone*/disks/*disk*`. The format for the path specified in this value is resource specific and is specified in the `testIamPermissions` documentation."##), Some(true), Some(false)), @@ -2149,7 +2149,7 @@ fn main() { let mut app = App::new("pubsub1") .author("Sebastian Thiel ") - .version("0.3.3+20151103") + .version("0.3.4+20160317") .about("Provides reliable, many-to-many, asynchronous messaging between applications.") .after_help("All documentation details can be found at http://byron.github.io/google-apis-rs/google_pubsub1_cli") .arg(Arg::with_name("url") diff --git a/gen/pubsub1/Cargo.toml b/gen/pubsub1/Cargo.toml index 3ab73cf626..d3caeb3eba 100644 --- a/gen/pubsub1/Cargo.toml +++ b/gen/pubsub1/Cargo.toml @@ -4,7 +4,7 @@ [package] name = "google-pubsub1" -version = "0.1.12+20151103" +version = "0.1.13+20160317" authors = ["Sebastian Thiel "] description = "A complete library to interact with pubsub (protocol v1)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/pubsub1" @@ -16,14 +16,14 @@ build = "src/build.rs" [dependencies] -hyper = "0.7" -mime = "0.1.0" -serde = ">= 0.7.0" -serde_json = ">= 0.7.0" -yup-oauth2 = ">= 0.5.4" +hyper = "0.8" +mime = "0.2.0" +serde = "0.6.0" +serde_json = "0.6.0" +yup-oauth2 = ">= 0.5.6" url = ">= 0.5" [build-dependencies] -syntex = { version = ">= 0.23" } -serde_codegen = { version = ">= 0.6" } +syntex = { version = "= 0.28" } +serde_codegen = { version = "= 0.6.13" } diff --git a/gen/pubsub1/README.md b/gen/pubsub1/README.md index 9856696820..571fe26a67 100644 --- a/gen/pubsub1/README.md +++ b/gen/pubsub1/README.md @@ -5,7 +5,7 @@ DO NOT EDIT ! --> The `google-pubsub1` library allows access to all features of the *Google pubsub* service. -This documentation was generated from *pubsub* crate version *0.1.12+20151103*, where *20151103* is the exact revision of the *pubsub:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.12*. +This documentation was generated from *pubsub* crate version *0.1.13+20160317*, where *20160317* is the exact revision of the *pubsub:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.13*. Everything else about the *pubsub* *v1* API can be found at the [official documentation site](https://cloud.google.com/pubsub/docs). diff --git a/gen/pubsub1/src/cmn.rs b/gen/pubsub1/src/cmn.rs index 87b91a8986..c69621da55 100644 --- a/gen/pubsub1/src/cmn.rs +++ b/gen/pubsub1/src/cmn.rs @@ -12,7 +12,7 @@ use mime::{Mime, TopLevel, SubLevel, Attr, Value}; use oauth2::{TokenType, Retry, self}; use hyper; use hyper::header::{ContentType, ContentLength, Headers, UserAgent, Authorization, Header, - HeaderFormat}; + HeaderFormat, Bearer}; use hyper::http::h1::LINE_ENDING; use hyper::method::Method; use hyper::status::StatusCode; @@ -634,7 +634,7 @@ pub struct ResumableUploadHelper<'a, A: 'a> { pub start_at: Option, pub auth: &'a mut A, pub user_agent: &'a str, - pub auth_header: Authorization, + pub auth_header: Authorization, pub url: &'a str, pub reader: &'a mut ReadSeek, pub media_type: Mime, diff --git a/gen/pubsub1/src/lib.rs b/gen/pubsub1/src/lib.rs index fa52024062..81e17b8603 100644 --- a/gen/pubsub1/src/lib.rs +++ b/gen/pubsub1/src/lib.rs @@ -2,7 +2,7 @@ // This file was generated automatically from 'src/mako/api/lib.rs.mako' // DO NOT EDIT ! -//! This documentation was generated from *pubsub* crate version *0.1.12+20151103*, where *20151103* is the exact revision of the *pubsub:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.12*. +//! This documentation was generated from *pubsub* crate version *0.1.13+20160317*, where *20160317* is the exact revision of the *pubsub:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.13*. //! //! Everything else about the *pubsub* *v1* API can be found at the //! [official documentation site](https://cloud.google.com/pubsub/docs). diff --git a/gen/pubsub1/src/lib.rs.in b/gen/pubsub1/src/lib.rs.in index 05bad72de7..37f7bef0b1 100644 --- a/gen/pubsub1/src/lib.rs.in +++ b/gen/pubsub1/src/lib.rs.in @@ -137,7 +137,7 @@ impl<'a, C, A> Pubsub Pubsub { client: RefCell::new(client), auth: RefCell::new(authenticator), - _user_agent: "google-api-rust-client/0.1.12".to_string(), + _user_agent: "google-api-rust-client/0.1.13".to_string(), } } @@ -146,7 +146,7 @@ impl<'a, C, A> Pubsub } /// Set the user-agent header field to use in all requests to the server. - /// It defaults to `google-api-rust-client/0.1.12`. + /// It defaults to `google-api-rust-client/0.1.13`. /// /// Returns the previously set user-agent. pub fn user_agent(&mut self, agent_name: String) -> String { @@ -172,7 +172,7 @@ impl<'a, C, A> Pubsub /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct TestIamPermissionsRequest { - /// The set of permissions to check for the `resource`. Permissions with wildcards (such as '*' or 'storage.*') are not allowed. + /// The set of permissions to check for the `resource`. Permissions with wildcards (such as '*' or 'storage.*') are not allowed. For more information see IAM Overview. pub permissions: Option>, } @@ -294,7 +294,7 @@ pub struct PublishRequest { impl RequestValue for PublishRequest {} -/// Defines an Identity and Access Management (IAM) policy. It is used to specify access control policies for Cloud Platform resources. A `Policy` consists of a list of `bindings`. A `Binding` binds a list of `members` to a `role`, where the members can be user accounts, Google groups, Google domains, and service accounts. A `role` is a named list of permissions defined by IAM. **Example** { "bindings": [ { "role": "roles/owner", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-other-app@appspot.gserviceaccount.com"] }, { "role": "roles/viewer", "members": ["user:sean@example.com"] } ] } For a description of IAM and its features, see the [IAM developer's guide](https://cloud.google.com/iam). +/// Defines an Identity and Access Management (IAM) policy. It is used to specify access control policies for Cloud Platform resources. A `Policy` consists of a list of `bindings`. A `Binding` binds a list of `members` to a `role`, where the members can be user accounts, Google groups, Google domains, and service accounts. A `role` is a named list of permissions defined by IAM. **Example** { "bindings": [ { "role": "roles/owner", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-other-app@appspot.gserviceaccount.com", ] }, { "role": "roles/viewer", "members": ["user:sean@example.com"] } ] } For a description of IAM and its features, see the [IAM developer's guide](https://cloud.google.com/iam). /// /// # Activities /// @@ -312,7 +312,7 @@ pub struct Policy { pub bindings: Option>, /// Version of the `Policy`. The default version is 0. pub version: Option, - /// Can be used to perform a read-modify-write. + /// `etag` is used for optimistic concurrency control as a way to help prevent simultaneous updates of a policy from overwriting each other. It is strongly suggested that systems make use of the `etag` in the read-modify-write cycle to perform policy updates in order to avoid race conditions: An `etag` is returned in the response to `getIamPolicy`, and systems are expected to put that etag in the request to `setIamPolicy` to ensure that their change will be applied to the same version of the policy. If no `etag` is provided in the call to `setIamPolicy`, then the existing policy is overwritten blindly. pub etag: Option, } @@ -448,7 +448,7 @@ impl RequestValue for PullRequest {} pub struct Binding { /// Role that is assigned to `members`. For example, `roles/viewer`, `roles/editor`, or `roles/owner`. Required pub role: Option, - /// Specifies the identities requesting access for a Cloud Platform resource. `members` can have the following formats: * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account. * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account. * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@gmail.com` or `joe@example.com`. * `serviceAccount:{emailid}`: An email address that represents a service account. For example, `my-other-app@appspot.gserviceaccount.com`. * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`. * `domain:{domain}`: A Google Apps domain name that represents all the users of that domain. For example, `google.com` or `example.com`. + /// Specifies the identities requesting access for a Cloud Platform resource. `members` can have the following values: * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account. * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account. * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@gmail.com` or `joe@example.com`. * `serviceAccount:{emailid}`: An email address that represents a service account. For example, `my-other-app@appspot.gserviceaccount.com`. * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`. * `domain:{domain}`: A Google Apps domain name that represents all the users of that domain. For example, `google.com` or `example.com`. pub members: Option>, } @@ -564,7 +564,7 @@ impl Part for PushConfig {} pub struct Subscription { /// The name of the topic from which this subscription is receiving messages. The value of this field will be `_deleted-topic_` if the topic has been deleted. pub topic: Option, - /// This value is the maximum time after a subscriber receives a message before the subscriber should acknowledge the message. After message delivery but before the ack deadline expires and before the message is acknowledged, it is an outstanding message and will not be delivered again during that time (on a best-effort basis). For pull delivery this value is used as the initial value for the ack deadline. To override this value for a given message, call `ModifyAckDeadline` with the corresponding `ack_id`. For push delivery, this value is also used to set the request timeout for the call to the push endpoint. If the subscriber never acknowledges the message, the Pub/Sub system will eventually redeliver the message. If this parameter is not set, the default value of 10 seconds is used. + /// This value is the maximum time after a subscriber receives a message before the subscriber should acknowledge the message. After message delivery but before the ack deadline expires and before the message is acknowledged, it is an outstanding message and will not be delivered again during that time (on a best-effort basis). For pull subscriptions, this value is used as the initial value for the ack deadline. To override this value for a given message, call `ModifyAckDeadline` with the corresponding `ack_id` if using pull. For push delivery, this value is also used to set the request timeout for the call to the push endpoint. If the subscriber never acknowledges the message, the Pub/Sub system will eventually redeliver the message. If this parameter is not set, the default value of 10 seconds is used. #[serde(rename="ackDeadlineSeconds")] pub ack_deadline_seconds: Option, /// If push delivery is used with this subscription, this field is used to configure it. An empty `pushConfig` signifies that the subscriber will pull and ack messages using API methods. @@ -685,7 +685,7 @@ impl<'a, C, A> ProjectMethods<'a, C, A> { /// # Arguments /// /// * `request` - No description provided. - /// * `resource` - REQUIRED: The resource for which policy detail is being requested. `resource` is usually specified as a path, such as, `projects/{project}/zones/{zone}/disks/{disk}`. The format for the path specified in this value is resource specific and is specified in the documentation for the respective TestIamPermissions rpc. + /// * `resource` - REQUIRED: The resource for which the policy detail is being requested. `resource` is usually specified as a path, such as `projects/*project*/zones/*zone*/disks/*disk*`. The format for the path specified in this value is resource specific and is specified in the `testIamPermissions` documentation. pub fn topics_test_iam_permissions(&self, request: TestIamPermissionsRequest, resource: &str) -> ProjectTopicTestIamPermissionCall<'a, C, A> { ProjectTopicTestIamPermissionCall { hub: self.hub, @@ -754,11 +754,11 @@ impl<'a, C, A> ProjectMethods<'a, C, A> { /// Create a builder to help you perform the following task: /// - /// Gets the access control policy for a `resource`. Is empty if the policy or the resource does not exist. + /// Gets the access control policy for a `resource`. Returns an empty policy if the resource exists and does not have a policy set. /// /// # Arguments /// - /// * `resource` - REQUIRED: The resource for which policy is being requested. `resource` is usually specified as a path, such as, `projects/{project}/zones/{zone}/disks/{disk}`. The format for the path specified in this value is resource specific and is specified in the documentation for the respective GetIamPolicy rpc. + /// * `resource` - REQUIRED: The resource for which the policy is being requested. `resource` is usually specified as a path, such as `projects/*project*/zones/*zone*/disks/*disk*`. The format for the path specified in this value is resource specific and is specified in the `getIamPolicy` documentation. pub fn topics_get_iam_policy(&self, resource: &str) -> ProjectTopicGetIamPolicyCall<'a, C, A> { ProjectTopicGetIamPolicyCall { hub: self.hub, @@ -812,7 +812,7 @@ impl<'a, C, A> ProjectMethods<'a, C, A> { /// # Arguments /// /// * `request` - No description provided. - /// * `resource` - REQUIRED: The resource for which policy is being specified. `resource` is usually specified as a path, such as, `projects/{project}/zones/{zone}/disks/{disk}`. The format for the path specified in this value is resource specific and is specified in the documentation for the respective SetIamPolicy rpc. + /// * `resource` - REQUIRED: The resource for which the policy is being specified. `resource` is usually specified as a path, such as `projects/*project*/zones/*zone*/disks/*disk*`. The format for the path specified in this value is resource specific and is specified in the `setIamPolicy` documentation. pub fn topics_set_iam_policy(&self, request: SetIamPolicyRequest, resource: &str) -> ProjectTopicSetIamPolicyCall<'a, C, A> { ProjectTopicSetIamPolicyCall { hub: self.hub, @@ -826,7 +826,7 @@ impl<'a, C, A> ProjectMethods<'a, C, A> { /// Create a builder to help you perform the following task: /// - /// Creates a subscription to a given topic for a given subscriber. If the subscription already exists, returns `ALREADY_EXISTS`. If the corresponding topic doesn't exist, returns `NOT_FOUND`. If the name is not provided in the request, the server will assign a random name for this subscription on the same project as the topic. + /// Creates a subscription to a given topic. If the subscription already exists, returns `ALREADY_EXISTS`. If the corresponding topic doesn't exist, returns `NOT_FOUND`. If the name is not provided in the request, the server will assign a random name for this subscription on the same project as the topic. /// /// # Arguments /// @@ -864,11 +864,11 @@ impl<'a, C, A> ProjectMethods<'a, C, A> { /// Create a builder to help you perform the following task: /// - /// Gets the access control policy for a `resource`. Is empty if the policy or the resource does not exist. + /// Gets the access control policy for a `resource`. Returns an empty policy if the resource exists and does not have a policy set. /// /// # Arguments /// - /// * `resource` - REQUIRED: The resource for which policy is being requested. `resource` is usually specified as a path, such as, `projects/{project}/zones/{zone}/disks/{disk}`. The format for the path specified in this value is resource specific and is specified in the documentation for the respective GetIamPolicy rpc. + /// * `resource` - REQUIRED: The resource for which the policy is being requested. `resource` is usually specified as a path, such as `projects/*project*/zones/*zone*/disks/*disk*`. The format for the path specified in this value is resource specific and is specified in the `getIamPolicy` documentation. pub fn subscriptions_get_iam_policy(&self, resource: &str) -> ProjectSubscriptionGetIamPolicyCall<'a, C, A> { ProjectSubscriptionGetIamPolicyCall { hub: self.hub, @@ -886,7 +886,7 @@ impl<'a, C, A> ProjectMethods<'a, C, A> { /// # Arguments /// /// * `request` - No description provided. - /// * `resource` - REQUIRED: The resource for which policy detail is being requested. `resource` is usually specified as a path, such as, `projects/{project}/zones/{zone}/disks/{disk}`. The format for the path specified in this value is resource specific and is specified in the documentation for the respective TestIamPermissions rpc. + /// * `resource` - REQUIRED: The resource for which the policy detail is being requested. `resource` is usually specified as a path, such as `projects/*project*/zones/*zone*/disks/*disk*`. The format for the path specified in this value is resource specific and is specified in the `testIamPermissions` documentation. pub fn subscriptions_test_iam_permissions(&self, request: TestIamPermissionsRequest, resource: &str) -> ProjectSubscriptionTestIamPermissionCall<'a, C, A> { ProjectSubscriptionTestIamPermissionCall { hub: self.hub, @@ -977,7 +977,7 @@ impl<'a, C, A> ProjectMethods<'a, C, A> { /// # Arguments /// /// * `request` - No description provided. - /// * `resource` - REQUIRED: The resource for which policy is being specified. `resource` is usually specified as a path, such as, `projects/{project}/zones/{zone}/disks/{disk}`. The format for the path specified in this value is resource specific and is specified in the documentation for the respective SetIamPolicy rpc. + /// * `resource` - REQUIRED: The resource for which the policy is being specified. `resource` is usually specified as a path, such as `projects/*project*/zones/*zone*/disks/*disk*`. The format for the path specified in this value is resource specific and is specified in the `setIamPolicy` documentation. pub fn subscriptions_set_iam_policy(&self, request: SetIamPolicyRequest, resource: &str) -> ProjectSubscriptionSetIamPolicyCall<'a, C, A> { ProjectSubscriptionSetIamPolicyCall { hub: self.hub, @@ -1051,7 +1051,7 @@ impl<'a, C, A> ProjectTopicListCall<'a, C, A> where C: BorrowMut, pub fn doit(mut self) -> Result<(hyper::client::Response, ListTopicsResponse)> { use url::percent_encoding::{percent_encode, FORM_URLENCODED_ENCODE_SET}; use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -1129,8 +1129,7 @@ impl<'a, C, A> ProjectTopicListCall<'a, C, A> where C: BorrowMut, } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -1324,7 +1323,7 @@ impl<'a, C, A> ProjectSubscriptionPullCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, PullResponse)> { use url::percent_encoding::{percent_encode, FORM_URLENCODED_ENCODE_SET}; use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -1407,8 +1406,7 @@ impl<'a, C, A> ProjectSubscriptionPullCall<'a, C, A> where C: BorrowMut ProjectTopicCreateCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, Topic)> { use url::percent_encoding::{percent_encode, FORM_URLENCODED_ENCODE_SET}; use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -1684,8 +1682,7 @@ impl<'a, C, A> ProjectTopicCreateCall<'a, C, A> where C: BorrowMut ProjectTopicTestIamPermissionCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, TestIamPermissionsResponse)> { use url::percent_encoding::{percent_encode, FORM_URLENCODED_ENCODE_SET}; use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -1961,8 +1958,7 @@ impl<'a, C, A> ProjectTopicTestIamPermissionCall<'a, C, A> where C: BorrowMut ProjectTopicTestIamPermissionCall<'a, C, A> where C: BorrowMut ProjectSubscriptionModifyPushConfigCall<'a, C, A> where C: Borrow pub fn doit(mut self) -> Result<(hyper::client::Response, Empty)> { use url::percent_encoding::{percent_encode, FORM_URLENCODED_ENCODE_SET}; use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -2238,8 +2234,7 @@ impl<'a, C, A> ProjectSubscriptionModifyPushConfigCall<'a, C, A> where C: Borrow } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -2432,7 +2427,7 @@ impl<'a, C, A> ProjectTopicPublishCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, PublishResponse)> { use url::percent_encoding::{percent_encode, FORM_URLENCODED_ENCODE_SET}; use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -2515,8 +2510,7 @@ impl<'a, C, A> ProjectTopicPublishCall<'a, C, A> where C: BorrowMut ProjectTopicGetCall<'a, C, A> where C: BorrowMut, pub fn doit(mut self) -> Result<(hyper::client::Response, Topic)> { use url::percent_encoding::{percent_encode, FORM_URLENCODED_ENCODE_SET}; use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -2774,8 +2768,7 @@ impl<'a, C, A> ProjectTopicGetCall<'a, C, A> where C: BorrowMut, } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -2899,7 +2892,7 @@ impl<'a, C, A> ProjectTopicGetCall<'a, C, A> where C: BorrowMut, } -/// Gets the access control policy for a `resource`. Is empty if the policy or the resource does not exist. +/// Gets the access control policy for a `resource`. Returns an empty policy if the resource exists and does not have a policy set. /// /// A builder for the *topics.getIamPolicy* method supported by a *project* resource. /// It is not used directly, but through a `ProjectMethods` instance. @@ -2948,7 +2941,7 @@ impl<'a, C, A> ProjectTopicGetIamPolicyCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, Policy)> { use url::percent_encoding::{percent_encode, FORM_URLENCODED_ENCODE_SET}; use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -3020,8 +3013,7 @@ impl<'a, C, A> ProjectTopicGetIamPolicyCall<'a, C, A> where C: BorrowMut ProjectTopicGetIamPolicyCall<'a, C, A> where C: BorrowMut ProjectSubscriptionModifyAckDeadlineCall<'a, C, A> where C: Borro pub fn doit(mut self) -> Result<(hyper::client::Response, Empty)> { use url::percent_encoding::{percent_encode, FORM_URLENCODED_ENCODE_SET}; use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -3284,8 +3276,7 @@ impl<'a, C, A> ProjectSubscriptionModifyAckDeadlineCall<'a, C, A> where C: Borro } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -3471,7 +3462,7 @@ impl<'a, C, A> ProjectSubscriptionDeleteCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, Empty)> { use url::percent_encoding::{percent_encode, FORM_URLENCODED_ENCODE_SET}; use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -3543,8 +3534,7 @@ impl<'a, C, A> ProjectSubscriptionDeleteCall<'a, C, A> where C: BorrowMut ProjectTopicSetIamPolicyCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, Policy)> { use url::percent_encoding::{percent_encode, FORM_URLENCODED_ENCODE_SET}; use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -3807,8 +3797,7 @@ impl<'a, C, A> ProjectTopicSetIamPolicyCall<'a, C, A> where C: BorrowMut ProjectTopicSetIamPolicyCall<'a, C, A> where C: BorrowMut ProjectTopicSetIamPolicyCall<'a, C, A> where C: BorrowMut ProjectSubscriptionCreateCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, Subscription)> { use url::percent_encoding::{percent_encode, FORM_URLENCODED_ENCODE_SET}; use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -4084,8 +4073,7 @@ impl<'a, C, A> ProjectSubscriptionCreateCall<'a, C, A> where C: BorrowMut ProjectSubscriptionAcknowledgeCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, Empty)> { use url::percent_encoding::{percent_encode, FORM_URLENCODED_ENCODE_SET}; use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -4361,8 +4349,7 @@ impl<'a, C, A> ProjectSubscriptionAcknowledgeCall<'a, C, A> where C: BorrowMut ProjectSubscriptionAcknowledgeCall<'a, C, A> where C: BorrowMut ProjectSubscriptionGetIamPolicyCall<'a, C, A> where C: BorrowMut< pub fn doit(mut self) -> Result<(hyper::client::Response, Policy)> { use url::percent_encoding::{percent_encode, FORM_URLENCODED_ENCODE_SET}; use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -4620,8 +4607,7 @@ impl<'a, C, A> ProjectSubscriptionGetIamPolicyCall<'a, C, A> where C: BorrowMut< } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -4677,7 +4663,7 @@ impl<'a, C, A> ProjectSubscriptionGetIamPolicyCall<'a, C, A> where C: BorrowMut< } - /// REQUIRED: The resource for which policy is being requested. `resource` is usually specified as a path, such as, `projects/{project}/zones/{zone}/disks/{disk}`. The format for the path specified in this value is resource specific and is specified in the documentation for the respective GetIamPolicy rpc. + /// REQUIRED: The resource for which the policy is being requested. `resource` is usually specified as a path, such as `projects/*project*/zones/*zone*/disks/*disk*`. The format for the path specified in this value is resource specific and is specified in the `getIamPolicy` documentation. /// /// Sets the *resource* path property to the given value. /// @@ -4801,7 +4787,7 @@ impl<'a, C, A> ProjectSubscriptionTestIamPermissionCall<'a, C, A> where C: Borro pub fn doit(mut self) -> Result<(hyper::client::Response, TestIamPermissionsResponse)> { use url::percent_encoding::{percent_encode, FORM_URLENCODED_ENCODE_SET}; use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -4884,8 +4870,7 @@ impl<'a, C, A> ProjectSubscriptionTestIamPermissionCall<'a, C, A> where C: Borro } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -4954,7 +4939,7 @@ impl<'a, C, A> ProjectSubscriptionTestIamPermissionCall<'a, C, A> where C: Borro self._request = new_value; self } - /// REQUIRED: The resource for which policy detail is being requested. `resource` is usually specified as a path, such as, `projects/{project}/zones/{zone}/disks/{disk}`. The format for the path specified in this value is resource specific and is specified in the documentation for the respective TestIamPermissions rpc. + /// REQUIRED: The resource for which the policy detail is being requested. `resource` is usually specified as a path, such as `projects/*project*/zones/*zone*/disks/*disk*`. The format for the path specified in this value is resource specific and is specified in the `testIamPermissions` documentation. /// /// Sets the *resource* path property to the given value. /// @@ -5071,7 +5056,7 @@ impl<'a, C, A> ProjectTopicDeleteCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, Empty)> { use url::percent_encoding::{percent_encode, FORM_URLENCODED_ENCODE_SET}; use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -5143,8 +5128,7 @@ impl<'a, C, A> ProjectTopicDeleteCall<'a, C, A> where C: BorrowMut ProjectSubscriptionGetCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, Subscription)> { use url::percent_encoding::{percent_encode, FORM_URLENCODED_ENCODE_SET}; use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -5389,8 +5373,7 @@ impl<'a, C, A> ProjectSubscriptionGetCall<'a, C, A> where C: BorrowMut ProjectTopicSubscriptionListCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, ListTopicSubscriptionsResponse)> { use url::percent_encoding::{percent_encode, FORM_URLENCODED_ENCODE_SET}; use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -5645,8 +5628,7 @@ impl<'a, C, A> ProjectTopicSubscriptionListCall<'a, C, A> where C: BorrowMut ProjectSubscriptionListCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, ListSubscriptionsResponse)> { use url::percent_encoding::{percent_encode, FORM_URLENCODED_ENCODE_SET}; use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -5915,8 +5897,7 @@ impl<'a, C, A> ProjectSubscriptionListCall<'a, C, A> where C: BorrowMut ProjectSubscriptionSetIamPolicyCall<'a, C, A> where C: BorrowMut< pub fn doit(mut self) -> Result<(hyper::client::Response, Policy)> { use url::percent_encoding::{percent_encode, FORM_URLENCODED_ENCODE_SET}; use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -6193,8 +6174,7 @@ impl<'a, C, A> ProjectSubscriptionSetIamPolicyCall<'a, C, A> where C: BorrowMut< } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -6263,7 +6243,7 @@ impl<'a, C, A> ProjectSubscriptionSetIamPolicyCall<'a, C, A> where C: BorrowMut< self._request = new_value; self } - /// REQUIRED: The resource for which policy is being specified. `resource` is usually specified as a path, such as, `projects/{project}/zones/{zone}/disks/{disk}`. The format for the path specified in this value is resource specific and is specified in the documentation for the respective SetIamPolicy rpc. + /// REQUIRED: The resource for which the policy is being specified. `resource` is usually specified as a path, such as `projects/*project*/zones/*zone*/disks/*disk*`. The format for the path specified in this value is resource specific and is specified in the `setIamPolicy` documentation. /// /// Sets the *resource* path property to the given value. /// diff --git a/gen/pubsub1_beta2-cli/Cargo.toml b/gen/pubsub1_beta2-cli/Cargo.toml index 60c34857e4..2c77db37e2 100644 --- a/gen/pubsub1_beta2-cli/Cargo.toml +++ b/gen/pubsub1_beta2-cli/Cargo.toml @@ -4,7 +4,7 @@ [package] name = "google-pubsub1_beta2-cli" -version = "0.3.3+20151103" +version = "0.3.4+20160317" authors = ["Sebastian Thiel "] description = "A complete library to interact with pubsub (protocol v1beta2)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/pubsub1_beta2-cli" @@ -17,18 +17,18 @@ keywords = ["pubsub", "google", "cli"] name = "pubsub1-beta2" [dependencies] -hyper = "0.7" -mime = "0.1.0" -serde = ">= 0.7.0" -serde_json = ">= 0.7.0" -yup-oauth2 = ">= 0.5.4" +hyper = "0.8" +mime = "0.2.0" +serde = "0.6.0" +serde_json = "0.6.0" +yup-oauth2 = ">= 0.5.6" strsim = "0.4" yup-hyper-mock = "1.0" clap = "2.0" [build-dependencies] -syntex = { version = ">= 0.23" } -serde_codegen = { version = ">= 0.6" } +syntex = { version = "= 0.28" } +serde_codegen = { version = "= 0.6.13" } [dependencies.google-pubsub1_beta2] diff --git a/gen/pubsub1_beta2-cli/README.md b/gen/pubsub1_beta2-cli/README.md index ad04024979..271a086503 100644 --- a/gen/pubsub1_beta2-cli/README.md +++ b/gen/pubsub1_beta2-cli/README.md @@ -17,14 +17,14 @@ Everything else about the *pubsub* API can be found at the You can download the pre-compiled 64bit binaries for the following platforms: -* ![icon](http://megaicons.net/static/img/icons_sizes/6/140/16/ubuntu-icon.png) [ubuntu](http://dl.byronimo.de/google.rs/cli/0.3.3/ubuntu/pubsub1-beta2.tar.gz) -* ![icon](http://hydra-media.cursecdn.com/wow.gamepedia.com/a/a2/Apple-icon-16x16.png?version=25ddd67ac3dd3b634478e3978b76cb74) [osx](http://dl.byronimo.de/google.rs/cli/0.3.3/osx/pubsub1-beta2.tar.gz) +* ![icon](http://megaicons.net/static/img/icons_sizes/6/140/16/ubuntu-icon.png) [ubuntu](http://dl.byronimo.de/google.rs/cli/0.3.4/ubuntu/pubsub1-beta2.tar.gz) +* ![icon](http://hydra-media.cursecdn.com/wow.gamepedia.com/a/a2/Apple-icon-16x16.png?version=25ddd67ac3dd3b634478e3978b76cb74) [osx](http://dl.byronimo.de/google.rs/cli/0.3.4/osx/pubsub1-beta2.tar.gz) Find the source code [on github](https://github.com/Byron/google-apis-rs/tree/master/gen/pubsub1_beta2-cli). # Usage -This documentation was generated from the *pubsub* API at revision *20151103*. The CLI is at version *0.3.3*. +This documentation was generated from the *pubsub* API at revision *20160317*. The CLI is at version *0.3.4*. ```bash pubsub1-beta2 [options] diff --git a/gen/pubsub1_beta2-cli/mkdocs.yml b/gen/pubsub1_beta2-cli/mkdocs.yml index 2bab2e6a82..ece52cb635 100644 --- a/gen/pubsub1_beta2-cli/mkdocs.yml +++ b/gen/pubsub1_beta2-cli/mkdocs.yml @@ -1,4 +1,4 @@ -site_name: pubsub v0.3.3+20151103 +site_name: pubsub v0.3.4+20160317 site_url: http://byron.github.io/google-apis-rs/google-pubsub1_beta2-cli site_description: Write integrating applications with bcore diff --git a/gen/pubsub1_beta2-cli/src/cmn.rs b/gen/pubsub1_beta2-cli/src/cmn.rs index 188159ee80..ae86fdef65 100644 --- a/gen/pubsub1_beta2-cli/src/cmn.rs +++ b/gen/pubsub1_beta2-cli/src/cmn.rs @@ -414,7 +414,7 @@ impl TokenStorage for JsonTokenStorage { Err(err) => match err.kind() { io::ErrorKind::NotFound => Ok(()), - _ => Err(json::Error::Io(err)) + _ => Err(json::Error::IoError(err)) }, Ok(_) => Ok(()), } @@ -427,7 +427,7 @@ impl TokenStorage for JsonTokenStorage { Err(serde_err) => Err(serde_err), } }, - Err(io_err) => Err(json::Error::Io(io_err)) + Err(io_err) => Err(json::Error::IoError(io_err)) } } } @@ -444,7 +444,7 @@ impl TokenStorage for JsonTokenStorage { Err(io_err) => { match io_err.kind() { io::ErrorKind::NotFound => Ok(None), - _ => Err(json::Error::Io(io_err)) + _ => Err(json::Error::IoError(io_err)) } } } @@ -683,7 +683,7 @@ pub fn application_secret_from_directory(dir: &str, = json::from_str(json_console_secret).unwrap(); match json::to_writer_pretty(&mut f, &console_secret) { Err(serde_err) => match serde_err { - json::Error::Io(err) => err, + json::Error::IoError(err) => err, _ => panic!("Unexpected serde error: {:#?}", serde_err) }, Ok(_) => continue, @@ -696,7 +696,7 @@ pub fn application_secret_from_directory(dir: &str, }, Ok(f) => { match json::de::from_reader::<_, ConsoleApplicationSecret>(f) { - Err(json::Error::Io(err)) => + Err(json::Error::IoError(err)) => return secret_io_error(err), Err(json_err) => return Err(CLIError::Configuration( diff --git a/gen/pubsub1_beta2-cli/src/main.rs b/gen/pubsub1_beta2-cli/src/main.rs index dd2def3729..9f6e91e69c 100644 --- a/gen/pubsub1_beta2-cli/src/main.rs +++ b/gen/pubsub1_beta2-cli/src/main.rs @@ -1667,7 +1667,7 @@ fn main() { Some(false)), ]), ("subscriptions-create", - Some(r##"Creates a subscription to a given topic for a given subscriber. If the subscription already exists, returns `ALREADY_EXISTS`. If the corresponding topic doesn't exist, returns `NOT_FOUND`. If the name is not provided in the request, the server will assign a random name for this subscription on the same project as the topic."##), + Some(r##"Creates a subscription to a given topic. If the subscription already exists, returns `ALREADY_EXISTS`. If the corresponding topic doesn't exist, returns `NOT_FOUND`. If the name is not provided in the request, the server will assign a random name for this subscription on the same project as the topic."##), "Details at http://byron.github.io/google-apis-rs/google_pubsub1_beta2_cli/projects_subscriptions-create", vec![ (Some(r##"name"##), @@ -1739,12 +1739,12 @@ fn main() { Some(false)), ]), ("subscriptions-get-iam-policy", - Some(r##"Gets the access control policy for a `resource`. Is empty if the policy or the resource does not exist."##), + Some(r##"Gets the access control policy for a `resource`. Returns an empty policy if the resource exists and does not have a policy set."##), "Details at http://byron.github.io/google-apis-rs/google_pubsub1_beta2_cli/projects_subscriptions-get-iam-policy", vec![ (Some(r##"resource"##), None, - Some(r##"REQUIRED: The resource for which policy is being requested. `resource` is usually specified as a path, such as, `projects/{project}/zones/{zone}/disks/{disk}`. The format for the path specified in this value is resource specific and is specified in the documentation for the respective GetIamPolicy rpc."##), + Some(r##"REQUIRED: The resource for which the policy is being requested. `resource` is usually specified as a path, such as `projects/*project*/zones/*zone*/disks/*disk*`. The format for the path specified in this value is resource specific and is specified in the `getIamPolicy` documentation."##), Some(true), Some(false)), @@ -1872,7 +1872,7 @@ fn main() { vec![ (Some(r##"resource"##), None, - Some(r##"REQUIRED: The resource for which policy is being specified. `resource` is usually specified as a path, such as, `projects/{project}/zones/{zone}/disks/{disk}`. The format for the path specified in this value is resource specific and is specified in the documentation for the respective SetIamPolicy rpc."##), + Some(r##"REQUIRED: The resource for which the policy is being specified. `resource` is usually specified as a path, such as `projects/*project*/zones/*zone*/disks/*disk*`. The format for the path specified in this value is resource specific and is specified in the `setIamPolicy` documentation."##), Some(true), Some(false)), @@ -1900,7 +1900,7 @@ fn main() { vec![ (Some(r##"resource"##), None, - Some(r##"REQUIRED: The resource for which policy detail is being requested. `resource` is usually specified as a path, such as, `projects/{project}/zones/{zone}/disks/{disk}`. The format for the path specified in this value is resource specific and is specified in the documentation for the respective TestIamPermissions rpc."##), + Some(r##"REQUIRED: The resource for which the policy detail is being requested. `resource` is usually specified as a path, such as `projects/*project*/zones/*zone*/disks/*disk*`. The format for the path specified in this value is resource specific and is specified in the `testIamPermissions` documentation."##), Some(true), Some(false)), @@ -1995,12 +1995,12 @@ fn main() { Some(false)), ]), ("topics-get-iam-policy", - Some(r##"Gets the access control policy for a `resource`. Is empty if the policy or the resource does not exist."##), + Some(r##"Gets the access control policy for a `resource`. Returns an empty policy if the resource exists and does not have a policy set."##), "Details at http://byron.github.io/google-apis-rs/google_pubsub1_beta2_cli/projects_topics-get-iam-policy", vec![ (Some(r##"resource"##), None, - Some(r##"REQUIRED: The resource for which policy is being requested. `resource` is usually specified as a path, such as, `projects/{project}/zones/{zone}/disks/{disk}`. The format for the path specified in this value is resource specific and is specified in the documentation for the respective GetIamPolicy rpc."##), + Some(r##"REQUIRED: The resource for which the policy is being requested. `resource` is usually specified as a path, such as `projects/*project*/zones/*zone*/disks/*disk*`. The format for the path specified in this value is resource specific and is specified in the `getIamPolicy` documentation."##), Some(true), Some(false)), @@ -2072,7 +2072,7 @@ fn main() { vec![ (Some(r##"resource"##), None, - Some(r##"REQUIRED: The resource for which policy is being specified. `resource` is usually specified as a path, such as, `projects/{project}/zones/{zone}/disks/{disk}`. The format for the path specified in this value is resource specific and is specified in the documentation for the respective SetIamPolicy rpc."##), + Some(r##"REQUIRED: The resource for which the policy is being specified. `resource` is usually specified as a path, such as `projects/*project*/zones/*zone*/disks/*disk*`. The format for the path specified in this value is resource specific and is specified in the `setIamPolicy` documentation."##), Some(true), Some(false)), @@ -2122,7 +2122,7 @@ fn main() { vec![ (Some(r##"resource"##), None, - Some(r##"REQUIRED: The resource for which policy detail is being requested. `resource` is usually specified as a path, such as, `projects/{project}/zones/{zone}/disks/{disk}`. The format for the path specified in this value is resource specific and is specified in the documentation for the respective TestIamPermissions rpc."##), + Some(r##"REQUIRED: The resource for which the policy detail is being requested. `resource` is usually specified as a path, such as `projects/*project*/zones/*zone*/disks/*disk*`. The format for the path specified in this value is resource specific and is specified in the `testIamPermissions` documentation."##), Some(true), Some(false)), @@ -2150,7 +2150,7 @@ fn main() { let mut app = App::new("pubsub1-beta2") .author("Sebastian Thiel ") - .version("0.3.3+20151103") + .version("0.3.4+20160317") .about("Provides reliable, many-to-many, asynchronous messaging between applications.") .after_help("All documentation details can be found at http://byron.github.io/google-apis-rs/google_pubsub1_beta2_cli") .arg(Arg::with_name("url") diff --git a/gen/pubsub1_beta2/Cargo.toml b/gen/pubsub1_beta2/Cargo.toml index c506c725c5..4d5b01dfb7 100644 --- a/gen/pubsub1_beta2/Cargo.toml +++ b/gen/pubsub1_beta2/Cargo.toml @@ -4,7 +4,7 @@ [package] name = "google-pubsub1_beta2" -version = "0.1.12+20151103" +version = "0.1.13+20160317" authors = ["Sebastian Thiel "] description = "A complete library to interact with pubsub (protocol v1beta2)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/pubsub1_beta2" @@ -16,14 +16,14 @@ build = "src/build.rs" [dependencies] -hyper = "0.7" -mime = "0.1.0" -serde = ">= 0.7.0" -serde_json = ">= 0.7.0" -yup-oauth2 = ">= 0.5.4" +hyper = "0.8" +mime = "0.2.0" +serde = "0.6.0" +serde_json = "0.6.0" +yup-oauth2 = ">= 0.5.6" url = ">= 0.5" [build-dependencies] -syntex = { version = ">= 0.23" } -serde_codegen = { version = ">= 0.6" } +syntex = { version = "= 0.28" } +serde_codegen = { version = "= 0.6.13" } diff --git a/gen/pubsub1_beta2/README.md b/gen/pubsub1_beta2/README.md index ae2936997f..90e6ad1e2f 100644 --- a/gen/pubsub1_beta2/README.md +++ b/gen/pubsub1_beta2/README.md @@ -5,7 +5,7 @@ DO NOT EDIT ! --> The `google-pubsub1_beta2` library allows access to all features of the *Google pubsub* service. -This documentation was generated from *pubsub* crate version *0.1.12+20151103*, where *20151103* is the exact revision of the *pubsub:v1beta2* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.12*. +This documentation was generated from *pubsub* crate version *0.1.13+20160317*, where *20160317* is the exact revision of the *pubsub:v1beta2* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.13*. Everything else about the *pubsub* *v1_beta2* API can be found at the [official documentation site](https://cloud.google.com/pubsub/docs). diff --git a/gen/pubsub1_beta2/src/cmn.rs b/gen/pubsub1_beta2/src/cmn.rs index 87b91a8986..c69621da55 100644 --- a/gen/pubsub1_beta2/src/cmn.rs +++ b/gen/pubsub1_beta2/src/cmn.rs @@ -12,7 +12,7 @@ use mime::{Mime, TopLevel, SubLevel, Attr, Value}; use oauth2::{TokenType, Retry, self}; use hyper; use hyper::header::{ContentType, ContentLength, Headers, UserAgent, Authorization, Header, - HeaderFormat}; + HeaderFormat, Bearer}; use hyper::http::h1::LINE_ENDING; use hyper::method::Method; use hyper::status::StatusCode; @@ -634,7 +634,7 @@ pub struct ResumableUploadHelper<'a, A: 'a> { pub start_at: Option, pub auth: &'a mut A, pub user_agent: &'a str, - pub auth_header: Authorization, + pub auth_header: Authorization, pub url: &'a str, pub reader: &'a mut ReadSeek, pub media_type: Mime, diff --git a/gen/pubsub1_beta2/src/lib.rs b/gen/pubsub1_beta2/src/lib.rs index f4d72afda5..9f024727e3 100644 --- a/gen/pubsub1_beta2/src/lib.rs +++ b/gen/pubsub1_beta2/src/lib.rs @@ -2,7 +2,7 @@ // This file was generated automatically from 'src/mako/api/lib.rs.mako' // DO NOT EDIT ! -//! This documentation was generated from *pubsub* crate version *0.1.12+20151103*, where *20151103* is the exact revision of the *pubsub:v1beta2* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.12*. +//! This documentation was generated from *pubsub* crate version *0.1.13+20160317*, where *20160317* is the exact revision of the *pubsub:v1beta2* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.13*. //! //! Everything else about the *pubsub* *v1_beta2* API can be found at the //! [official documentation site](https://cloud.google.com/pubsub/docs). diff --git a/gen/pubsub1_beta2/src/lib.rs.in b/gen/pubsub1_beta2/src/lib.rs.in index ea5925c4d1..5fe681466e 100644 --- a/gen/pubsub1_beta2/src/lib.rs.in +++ b/gen/pubsub1_beta2/src/lib.rs.in @@ -137,7 +137,7 @@ impl<'a, C, A> Pubsub Pubsub { client: RefCell::new(client), auth: RefCell::new(authenticator), - _user_agent: "google-api-rust-client/0.1.12".to_string(), + _user_agent: "google-api-rust-client/0.1.13".to_string(), } } @@ -146,7 +146,7 @@ impl<'a, C, A> Pubsub } /// Set the user-agent header field to use in all requests to the server. - /// It defaults to `google-api-rust-client/0.1.12`. + /// It defaults to `google-api-rust-client/0.1.13`. /// /// Returns the previously set user-agent. pub fn user_agent(&mut self, agent_name: String) -> String { @@ -172,7 +172,7 @@ impl<'a, C, A> Pubsub /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct TestIamPermissionsRequest { - /// The set of permissions to check for the `resource`. Permissions with wildcards (such as '*' or 'storage.*') are not allowed. + /// The set of permissions to check for the `resource`. Permissions with wildcards (such as '*' or 'storage.*') are not allowed. For more information see IAM Overview. pub permissions: Option>, } @@ -297,7 +297,7 @@ pub struct PublishRequest { impl RequestValue for PublishRequest {} -/// Defines an Identity and Access Management (IAM) policy. It is used to specify access control policies for Cloud Platform resources. A `Policy` consists of a list of `bindings`. A `Binding` binds a list of `members` to a `role`, where the members can be user accounts, Google groups, Google domains, and service accounts. A `role` is a named list of permissions defined by IAM. **Example** { "bindings": [ { "role": "roles/owner", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-other-app@appspot.gserviceaccount.com"] }, { "role": "roles/viewer", "members": ["user:sean@example.com"] } ] } For a description of IAM and its features, see the [IAM developer's guide](https://cloud.google.com/iam). +/// Defines an Identity and Access Management (IAM) policy. It is used to specify access control policies for Cloud Platform resources. A `Policy` consists of a list of `bindings`. A `Binding` binds a list of `members` to a `role`, where the members can be user accounts, Google groups, Google domains, and service accounts. A `role` is a named list of permissions defined by IAM. **Example** { "bindings": [ { "role": "roles/owner", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-other-app@appspot.gserviceaccount.com", ] }, { "role": "roles/viewer", "members": ["user:sean@example.com"] } ] } For a description of IAM and its features, see the [IAM developer's guide](https://cloud.google.com/iam). /// /// # Activities /// @@ -315,7 +315,7 @@ pub struct Policy { pub bindings: Option>, /// Version of the `Policy`. The default version is 0. pub version: Option, - /// Can be used to perform a read-modify-write. + /// `etag` is used for optimistic concurrency control as a way to help prevent simultaneous updates of a policy from overwriting each other. It is strongly suggested that systems make use of the `etag` in the read-modify-write cycle to perform policy updates in order to avoid race conditions: An `etag` is returned in the response to `getIamPolicy`, and systems are expected to put that etag in the request to `setIamPolicy` to ensure that their change will be applied to the same version of the policy. If no `etag` is provided in the call to `setIamPolicy`, then the existing policy is overwritten blindly. pub etag: Option, } @@ -451,7 +451,7 @@ impl RequestValue for PullRequest {} pub struct Binding { /// Role that is assigned to `members`. For example, `roles/viewer`, `roles/editor`, or `roles/owner`. Required pub role: Option, - /// Specifies the identities requesting access for a Cloud Platform resource. `members` can have the following formats: * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account. * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account. * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@gmail.com` or `joe@example.com`. * `serviceAccount:{emailid}`: An email address that represents a service account. For example, `my-other-app@appspot.gserviceaccount.com`. * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`. * `domain:{domain}`: A Google Apps domain name that represents all the users of that domain. For example, `google.com` or `example.com`. + /// Specifies the identities requesting access for a Cloud Platform resource. `members` can have the following values: * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account. * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account. * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@gmail.com` or `joe@example.com`. * `serviceAccount:{emailid}`: An email address that represents a service account. For example, `my-other-app@appspot.gserviceaccount.com`. * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`. * `domain:{domain}`: A Google Apps domain name that represents all the users of that domain. For example, `google.com` or `example.com`. pub members: Option>, } @@ -567,7 +567,7 @@ impl Part for PushConfig {} pub struct Subscription { /// The name of the topic from which this subscription is receiving messages. The value of this field will be `_deleted-topic_` if the topic has been deleted. pub topic: Option, - /// This value is the maximum time after a subscriber receives a message before the subscriber should acknowledge the message. After message delivery but before the ack deadline expires and before the message is acknowledged, it is an outstanding message and will not be delivered again during that time (on a best-effort basis). For pull delivery this value is used as the initial value for the ack deadline. To override this value for a given message, call `ModifyAckDeadline` with the corresponding `ack_id`. For push delivery, this value is also used to set the request timeout for the call to the push endpoint. If the subscriber never acknowledges the message, the Pub/Sub system will eventually redeliver the message. If this parameter is not set, the default value of 10 seconds is used. + /// This value is the maximum time after a subscriber receives a message before the subscriber should acknowledge the message. After message delivery but before the ack deadline expires and before the message is acknowledged, it is an outstanding message and will not be delivered again during that time (on a best-effort basis). For pull subscriptions, this value is used as the initial value for the ack deadline. To override this value for a given message, call `ModifyAckDeadline` with the corresponding `ack_id` if using pull. For push delivery, this value is also used to set the request timeout for the call to the push endpoint. If the subscriber never acknowledges the message, the Pub/Sub system will eventually redeliver the message. If this parameter is not set, the default value of 10 seconds is used. #[serde(rename="ackDeadlineSeconds")] pub ack_deadline_seconds: Option, /// If push delivery is used with this subscription, this field is used to configure it. An empty `pushConfig` signifies that the subscriber will pull and ack messages using API methods. @@ -688,7 +688,7 @@ impl<'a, C, A> ProjectMethods<'a, C, A> { /// # Arguments /// /// * `request` - No description provided. - /// * `resource` - REQUIRED: The resource for which policy detail is being requested. `resource` is usually specified as a path, such as, `projects/{project}/zones/{zone}/disks/{disk}`. The format for the path specified in this value is resource specific and is specified in the documentation for the respective TestIamPermissions rpc. + /// * `resource` - REQUIRED: The resource for which the policy detail is being requested. `resource` is usually specified as a path, such as `projects/*project*/zones/*zone*/disks/*disk*`. The format for the path specified in this value is resource specific and is specified in the `testIamPermissions` documentation. pub fn topics_test_iam_permissions(&self, request: TestIamPermissionsRequest, resource: &str) -> ProjectTopicTestIamPermissionCall<'a, C, A> { ProjectTopicTestIamPermissionCall { hub: self.hub, @@ -757,11 +757,11 @@ impl<'a, C, A> ProjectMethods<'a, C, A> { /// Create a builder to help you perform the following task: /// - /// Gets the access control policy for a `resource`. Is empty if the policy or the resource does not exist. + /// Gets the access control policy for a `resource`. Returns an empty policy if the resource exists and does not have a policy set. /// /// # Arguments /// - /// * `resource` - REQUIRED: The resource for which policy is being requested. `resource` is usually specified as a path, such as, `projects/{project}/zones/{zone}/disks/{disk}`. The format for the path specified in this value is resource specific and is specified in the documentation for the respective GetIamPolicy rpc. + /// * `resource` - REQUIRED: The resource for which the policy is being requested. `resource` is usually specified as a path, such as `projects/*project*/zones/*zone*/disks/*disk*`. The format for the path specified in this value is resource specific and is specified in the `getIamPolicy` documentation. pub fn topics_get_iam_policy(&self, resource: &str) -> ProjectTopicGetIamPolicyCall<'a, C, A> { ProjectTopicGetIamPolicyCall { hub: self.hub, @@ -815,7 +815,7 @@ impl<'a, C, A> ProjectMethods<'a, C, A> { /// # Arguments /// /// * `request` - No description provided. - /// * `resource` - REQUIRED: The resource for which policy is being specified. `resource` is usually specified as a path, such as, `projects/{project}/zones/{zone}/disks/{disk}`. The format for the path specified in this value is resource specific and is specified in the documentation for the respective SetIamPolicy rpc. + /// * `resource` - REQUIRED: The resource for which the policy is being specified. `resource` is usually specified as a path, such as `projects/*project*/zones/*zone*/disks/*disk*`. The format for the path specified in this value is resource specific and is specified in the `setIamPolicy` documentation. pub fn topics_set_iam_policy(&self, request: SetIamPolicyRequest, resource: &str) -> ProjectTopicSetIamPolicyCall<'a, C, A> { ProjectTopicSetIamPolicyCall { hub: self.hub, @@ -829,7 +829,7 @@ impl<'a, C, A> ProjectMethods<'a, C, A> { /// Create a builder to help you perform the following task: /// - /// Creates a subscription to a given topic for a given subscriber. If the subscription already exists, returns `ALREADY_EXISTS`. If the corresponding topic doesn't exist, returns `NOT_FOUND`. If the name is not provided in the request, the server will assign a random name for this subscription on the same project as the topic. + /// Creates a subscription to a given topic. If the subscription already exists, returns `ALREADY_EXISTS`. If the corresponding topic doesn't exist, returns `NOT_FOUND`. If the name is not provided in the request, the server will assign a random name for this subscription on the same project as the topic. /// /// # Arguments /// @@ -867,11 +867,11 @@ impl<'a, C, A> ProjectMethods<'a, C, A> { /// Create a builder to help you perform the following task: /// - /// Gets the access control policy for a `resource`. Is empty if the policy or the resource does not exist. + /// Gets the access control policy for a `resource`. Returns an empty policy if the resource exists and does not have a policy set. /// /// # Arguments /// - /// * `resource` - REQUIRED: The resource for which policy is being requested. `resource` is usually specified as a path, such as, `projects/{project}/zones/{zone}/disks/{disk}`. The format for the path specified in this value is resource specific and is specified in the documentation for the respective GetIamPolicy rpc. + /// * `resource` - REQUIRED: The resource for which the policy is being requested. `resource` is usually specified as a path, such as `projects/*project*/zones/*zone*/disks/*disk*`. The format for the path specified in this value is resource specific and is specified in the `getIamPolicy` documentation. pub fn subscriptions_get_iam_policy(&self, resource: &str) -> ProjectSubscriptionGetIamPolicyCall<'a, C, A> { ProjectSubscriptionGetIamPolicyCall { hub: self.hub, @@ -889,7 +889,7 @@ impl<'a, C, A> ProjectMethods<'a, C, A> { /// # Arguments /// /// * `request` - No description provided. - /// * `resource` - REQUIRED: The resource for which policy detail is being requested. `resource` is usually specified as a path, such as, `projects/{project}/zones/{zone}/disks/{disk}`. The format for the path specified in this value is resource specific and is specified in the documentation for the respective TestIamPermissions rpc. + /// * `resource` - REQUIRED: The resource for which the policy detail is being requested. `resource` is usually specified as a path, such as `projects/*project*/zones/*zone*/disks/*disk*`. The format for the path specified in this value is resource specific and is specified in the `testIamPermissions` documentation. pub fn subscriptions_test_iam_permissions(&self, request: TestIamPermissionsRequest, resource: &str) -> ProjectSubscriptionTestIamPermissionCall<'a, C, A> { ProjectSubscriptionTestIamPermissionCall { hub: self.hub, @@ -980,7 +980,7 @@ impl<'a, C, A> ProjectMethods<'a, C, A> { /// # Arguments /// /// * `request` - No description provided. - /// * `resource` - REQUIRED: The resource for which policy is being specified. `resource` is usually specified as a path, such as, `projects/{project}/zones/{zone}/disks/{disk}`. The format for the path specified in this value is resource specific and is specified in the documentation for the respective SetIamPolicy rpc. + /// * `resource` - REQUIRED: The resource for which the policy is being specified. `resource` is usually specified as a path, such as `projects/*project*/zones/*zone*/disks/*disk*`. The format for the path specified in this value is resource specific and is specified in the `setIamPolicy` documentation. pub fn subscriptions_set_iam_policy(&self, request: SetIamPolicyRequest, resource: &str) -> ProjectSubscriptionSetIamPolicyCall<'a, C, A> { ProjectSubscriptionSetIamPolicyCall { hub: self.hub, @@ -1054,7 +1054,7 @@ impl<'a, C, A> ProjectTopicListCall<'a, C, A> where C: BorrowMut, pub fn doit(mut self) -> Result<(hyper::client::Response, ListTopicsResponse)> { use url::percent_encoding::{percent_encode, FORM_URLENCODED_ENCODE_SET}; use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -1132,8 +1132,7 @@ impl<'a, C, A> ProjectTopicListCall<'a, C, A> where C: BorrowMut, } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -1327,7 +1326,7 @@ impl<'a, C, A> ProjectSubscriptionPullCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, PullResponse)> { use url::percent_encoding::{percent_encode, FORM_URLENCODED_ENCODE_SET}; use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -1410,8 +1409,7 @@ impl<'a, C, A> ProjectSubscriptionPullCall<'a, C, A> where C: BorrowMut ProjectTopicCreateCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, Topic)> { use url::percent_encoding::{percent_encode, FORM_URLENCODED_ENCODE_SET}; use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -1687,8 +1685,7 @@ impl<'a, C, A> ProjectTopicCreateCall<'a, C, A> where C: BorrowMut ProjectTopicTestIamPermissionCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, TestIamPermissionsResponse)> { use url::percent_encoding::{percent_encode, FORM_URLENCODED_ENCODE_SET}; use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -1964,8 +1961,7 @@ impl<'a, C, A> ProjectTopicTestIamPermissionCall<'a, C, A> where C: BorrowMut ProjectTopicTestIamPermissionCall<'a, C, A> where C: BorrowMut ProjectSubscriptionModifyPushConfigCall<'a, C, A> where C: Borrow pub fn doit(mut self) -> Result<(hyper::client::Response, Empty)> { use url::percent_encoding::{percent_encode, FORM_URLENCODED_ENCODE_SET}; use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -2241,8 +2237,7 @@ impl<'a, C, A> ProjectSubscriptionModifyPushConfigCall<'a, C, A> where C: Borrow } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -2435,7 +2430,7 @@ impl<'a, C, A> ProjectTopicPublishCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, PublishResponse)> { use url::percent_encoding::{percent_encode, FORM_URLENCODED_ENCODE_SET}; use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -2518,8 +2513,7 @@ impl<'a, C, A> ProjectTopicPublishCall<'a, C, A> where C: BorrowMut ProjectTopicGetCall<'a, C, A> where C: BorrowMut, pub fn doit(mut self) -> Result<(hyper::client::Response, Topic)> { use url::percent_encoding::{percent_encode, FORM_URLENCODED_ENCODE_SET}; use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -2777,8 +2771,7 @@ impl<'a, C, A> ProjectTopicGetCall<'a, C, A> where C: BorrowMut, } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -2902,7 +2895,7 @@ impl<'a, C, A> ProjectTopicGetCall<'a, C, A> where C: BorrowMut, } -/// Gets the access control policy for a `resource`. Is empty if the policy or the resource does not exist. +/// Gets the access control policy for a `resource`. Returns an empty policy if the resource exists and does not have a policy set. /// /// A builder for the *topics.getIamPolicy* method supported by a *project* resource. /// It is not used directly, but through a `ProjectMethods` instance. @@ -2951,7 +2944,7 @@ impl<'a, C, A> ProjectTopicGetIamPolicyCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, Policy)> { use url::percent_encoding::{percent_encode, FORM_URLENCODED_ENCODE_SET}; use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -3023,8 +3016,7 @@ impl<'a, C, A> ProjectTopicGetIamPolicyCall<'a, C, A> where C: BorrowMut ProjectTopicGetIamPolicyCall<'a, C, A> where C: BorrowMut ProjectSubscriptionModifyAckDeadlineCall<'a, C, A> where C: Borro pub fn doit(mut self) -> Result<(hyper::client::Response, Empty)> { use url::percent_encoding::{percent_encode, FORM_URLENCODED_ENCODE_SET}; use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -3287,8 +3279,7 @@ impl<'a, C, A> ProjectSubscriptionModifyAckDeadlineCall<'a, C, A> where C: Borro } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -3474,7 +3465,7 @@ impl<'a, C, A> ProjectSubscriptionDeleteCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, Empty)> { use url::percent_encoding::{percent_encode, FORM_URLENCODED_ENCODE_SET}; use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -3546,8 +3537,7 @@ impl<'a, C, A> ProjectSubscriptionDeleteCall<'a, C, A> where C: BorrowMut ProjectTopicSetIamPolicyCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, Policy)> { use url::percent_encoding::{percent_encode, FORM_URLENCODED_ENCODE_SET}; use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -3810,8 +3800,7 @@ impl<'a, C, A> ProjectTopicSetIamPolicyCall<'a, C, A> where C: BorrowMut ProjectTopicSetIamPolicyCall<'a, C, A> where C: BorrowMut ProjectTopicSetIamPolicyCall<'a, C, A> where C: BorrowMut ProjectSubscriptionCreateCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, Subscription)> { use url::percent_encoding::{percent_encode, FORM_URLENCODED_ENCODE_SET}; use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -4087,8 +4076,7 @@ impl<'a, C, A> ProjectSubscriptionCreateCall<'a, C, A> where C: BorrowMut ProjectSubscriptionAcknowledgeCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, Empty)> { use url::percent_encoding::{percent_encode, FORM_URLENCODED_ENCODE_SET}; use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -4364,8 +4352,7 @@ impl<'a, C, A> ProjectSubscriptionAcknowledgeCall<'a, C, A> where C: BorrowMut ProjectSubscriptionAcknowledgeCall<'a, C, A> where C: BorrowMut ProjectSubscriptionGetIamPolicyCall<'a, C, A> where C: BorrowMut< pub fn doit(mut self) -> Result<(hyper::client::Response, Policy)> { use url::percent_encoding::{percent_encode, FORM_URLENCODED_ENCODE_SET}; use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -4623,8 +4610,7 @@ impl<'a, C, A> ProjectSubscriptionGetIamPolicyCall<'a, C, A> where C: BorrowMut< } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -4680,7 +4666,7 @@ impl<'a, C, A> ProjectSubscriptionGetIamPolicyCall<'a, C, A> where C: BorrowMut< } - /// REQUIRED: The resource for which policy is being requested. `resource` is usually specified as a path, such as, `projects/{project}/zones/{zone}/disks/{disk}`. The format for the path specified in this value is resource specific and is specified in the documentation for the respective GetIamPolicy rpc. + /// REQUIRED: The resource for which the policy is being requested. `resource` is usually specified as a path, such as `projects/*project*/zones/*zone*/disks/*disk*`. The format for the path specified in this value is resource specific and is specified in the `getIamPolicy` documentation. /// /// Sets the *resource* path property to the given value. /// @@ -4804,7 +4790,7 @@ impl<'a, C, A> ProjectSubscriptionTestIamPermissionCall<'a, C, A> where C: Borro pub fn doit(mut self) -> Result<(hyper::client::Response, TestIamPermissionsResponse)> { use url::percent_encoding::{percent_encode, FORM_URLENCODED_ENCODE_SET}; use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -4887,8 +4873,7 @@ impl<'a, C, A> ProjectSubscriptionTestIamPermissionCall<'a, C, A> where C: Borro } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -4957,7 +4942,7 @@ impl<'a, C, A> ProjectSubscriptionTestIamPermissionCall<'a, C, A> where C: Borro self._request = new_value; self } - /// REQUIRED: The resource for which policy detail is being requested. `resource` is usually specified as a path, such as, `projects/{project}/zones/{zone}/disks/{disk}`. The format for the path specified in this value is resource specific and is specified in the documentation for the respective TestIamPermissions rpc. + /// REQUIRED: The resource for which the policy detail is being requested. `resource` is usually specified as a path, such as `projects/*project*/zones/*zone*/disks/*disk*`. The format for the path specified in this value is resource specific and is specified in the `testIamPermissions` documentation. /// /// Sets the *resource* path property to the given value. /// @@ -5074,7 +5059,7 @@ impl<'a, C, A> ProjectTopicDeleteCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, Empty)> { use url::percent_encoding::{percent_encode, FORM_URLENCODED_ENCODE_SET}; use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -5146,8 +5131,7 @@ impl<'a, C, A> ProjectTopicDeleteCall<'a, C, A> where C: BorrowMut ProjectSubscriptionGetCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, Subscription)> { use url::percent_encoding::{percent_encode, FORM_URLENCODED_ENCODE_SET}; use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -5392,8 +5376,7 @@ impl<'a, C, A> ProjectSubscriptionGetCall<'a, C, A> where C: BorrowMut ProjectTopicSubscriptionListCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, ListTopicSubscriptionsResponse)> { use url::percent_encoding::{percent_encode, FORM_URLENCODED_ENCODE_SET}; use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -5648,8 +5631,7 @@ impl<'a, C, A> ProjectTopicSubscriptionListCall<'a, C, A> where C: BorrowMut ProjectSubscriptionListCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, ListSubscriptionsResponse)> { use url::percent_encoding::{percent_encode, FORM_URLENCODED_ENCODE_SET}; use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -5918,8 +5900,7 @@ impl<'a, C, A> ProjectSubscriptionListCall<'a, C, A> where C: BorrowMut ProjectSubscriptionSetIamPolicyCall<'a, C, A> where C: BorrowMut< pub fn doit(mut self) -> Result<(hyper::client::Response, Policy)> { use url::percent_encoding::{percent_encode, FORM_URLENCODED_ENCODE_SET}; use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -6196,8 +6177,7 @@ impl<'a, C, A> ProjectSubscriptionSetIamPolicyCall<'a, C, A> where C: BorrowMut< } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -6266,7 +6246,7 @@ impl<'a, C, A> ProjectSubscriptionSetIamPolicyCall<'a, C, A> where C: BorrowMut< self._request = new_value; self } - /// REQUIRED: The resource for which policy is being specified. `resource` is usually specified as a path, such as, `projects/{project}/zones/{zone}/disks/{disk}`. The format for the path specified in this value is resource specific and is specified in the documentation for the respective SetIamPolicy rpc. + /// REQUIRED: The resource for which the policy is being specified. `resource` is usually specified as a path, such as `projects/*project*/zones/*zone*/disks/*disk*`. The format for the path specified in this value is resource specific and is specified in the `setIamPolicy` documentation. /// /// Sets the *resource* path property to the given value. /// diff --git a/gen/qpxexpress1-cli/Cargo.toml b/gen/qpxexpress1-cli/Cargo.toml index 9389a288ad..d5ba2c4af6 100644 --- a/gen/qpxexpress1-cli/Cargo.toml +++ b/gen/qpxexpress1-cli/Cargo.toml @@ -4,7 +4,7 @@ [package] name = "google-qpxexpress1-cli" -version = "0.3.3+20140321" +version = "0.3.4+20160307" authors = ["Sebastian Thiel "] description = "A complete library to interact with QPX Express (protocol v1)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/qpxexpress1-cli" @@ -17,18 +17,18 @@ keywords = ["qpxExpress", "google", "cli"] name = "qpxexpress1" [dependencies] -hyper = "0.7" -mime = "0.1.0" -serde = ">= 0.7.0" -serde_json = ">= 0.7.0" -yup-oauth2 = ">= 0.5.4" +hyper = "0.8" +mime = "0.2.0" +serde = "0.6.0" +serde_json = "0.6.0" +yup-oauth2 = ">= 0.5.6" strsim = "0.4" yup-hyper-mock = "1.0" clap = "2.0" [build-dependencies] -syntex = { version = ">= 0.23" } -serde_codegen = { version = ">= 0.6" } +syntex = { version = "= 0.28" } +serde_codegen = { version = "= 0.6.13" } [dependencies.google-qpxexpress1] diff --git a/gen/qpxexpress1-cli/README.md b/gen/qpxexpress1-cli/README.md index 127c766dbd..5b43c6f7b3 100644 --- a/gen/qpxexpress1-cli/README.md +++ b/gen/qpxexpress1-cli/README.md @@ -17,14 +17,14 @@ Everything else about the *QPX Express* API can be found at the You can download the pre-compiled 64bit binaries for the following platforms: -* ![icon](http://megaicons.net/static/img/icons_sizes/6/140/16/ubuntu-icon.png) [ubuntu](http://dl.byronimo.de/google.rs/cli/0.3.3/ubuntu/qpxexpress1.tar.gz) -* ![icon](http://hydra-media.cursecdn.com/wow.gamepedia.com/a/a2/Apple-icon-16x16.png?version=25ddd67ac3dd3b634478e3978b76cb74) [osx](http://dl.byronimo.de/google.rs/cli/0.3.3/osx/qpxexpress1.tar.gz) +* ![icon](http://megaicons.net/static/img/icons_sizes/6/140/16/ubuntu-icon.png) [ubuntu](http://dl.byronimo.de/google.rs/cli/0.3.4/ubuntu/qpxexpress1.tar.gz) +* ![icon](http://hydra-media.cursecdn.com/wow.gamepedia.com/a/a2/Apple-icon-16x16.png?version=25ddd67ac3dd3b634478e3978b76cb74) [osx](http://dl.byronimo.de/google.rs/cli/0.3.4/osx/qpxexpress1.tar.gz) Find the source code [on github](https://github.com/Byron/google-apis-rs/tree/master/gen/qpxexpress1-cli). # Usage -This documentation was generated from the *QPX Express* API at revision *20140321*. The CLI is at version *0.3.3*. +This documentation was generated from the *QPX Express* API at revision *20160307*. The CLI is at version *0.3.4*. ```bash qpxexpress1 [options] diff --git a/gen/qpxexpress1-cli/mkdocs.yml b/gen/qpxexpress1-cli/mkdocs.yml index a7006174dd..2e0874699d 100644 --- a/gen/qpxexpress1-cli/mkdocs.yml +++ b/gen/qpxexpress1-cli/mkdocs.yml @@ -1,4 +1,4 @@ -site_name: QPX Express v0.3.3+20140321 +site_name: QPX Express v0.3.4+20160307 site_url: http://byron.github.io/google-apis-rs/google-qpxexpress1-cli site_description: Write integrating applications with bcore diff --git a/gen/qpxexpress1-cli/src/cmn.rs b/gen/qpxexpress1-cli/src/cmn.rs index 188159ee80..ae86fdef65 100644 --- a/gen/qpxexpress1-cli/src/cmn.rs +++ b/gen/qpxexpress1-cli/src/cmn.rs @@ -414,7 +414,7 @@ impl TokenStorage for JsonTokenStorage { Err(err) => match err.kind() { io::ErrorKind::NotFound => Ok(()), - _ => Err(json::Error::Io(err)) + _ => Err(json::Error::IoError(err)) }, Ok(_) => Ok(()), } @@ -427,7 +427,7 @@ impl TokenStorage for JsonTokenStorage { Err(serde_err) => Err(serde_err), } }, - Err(io_err) => Err(json::Error::Io(io_err)) + Err(io_err) => Err(json::Error::IoError(io_err)) } } } @@ -444,7 +444,7 @@ impl TokenStorage for JsonTokenStorage { Err(io_err) => { match io_err.kind() { io::ErrorKind::NotFound => Ok(None), - _ => Err(json::Error::Io(io_err)) + _ => Err(json::Error::IoError(io_err)) } } } @@ -683,7 +683,7 @@ pub fn application_secret_from_directory(dir: &str, = json::from_str(json_console_secret).unwrap(); match json::to_writer_pretty(&mut f, &console_secret) { Err(serde_err) => match serde_err { - json::Error::Io(err) => err, + json::Error::IoError(err) => err, _ => panic!("Unexpected serde error: {:#?}", serde_err) }, Ok(_) => continue, @@ -696,7 +696,7 @@ pub fn application_secret_from_directory(dir: &str, }, Ok(f) => { match json::de::from_reader::<_, ConsoleApplicationSecret>(f) { - Err(json::Error::Io(err)) => + Err(json::Error::IoError(err)) => return secret_io_error(err), Err(json_err) => return Err(CLIError::Configuration( diff --git a/gen/qpxexpress1-cli/src/main.rs b/gen/qpxexpress1-cli/src/main.rs index 1d962e6602..ce070d6a37 100644 --- a/gen/qpxexpress1-cli/src/main.rs +++ b/gen/qpxexpress1-cli/src/main.rs @@ -263,8 +263,8 @@ fn main() { let mut app = App::new("qpxexpress1") .author("Sebastian Thiel ") - .version("0.3.3+20140321") - .about("Lets you find the least expensive flights between an origin and a destination.") + .version("0.3.4+20160307") + .about("Finds the least expensive flights between an origin and a destination.") .after_help("All documentation details can be found at http://byron.github.io/google-apis-rs/google_qpxexpress1_cli") .arg(Arg::with_name("folder") .long("config-dir") diff --git a/gen/qpxexpress1/Cargo.toml b/gen/qpxexpress1/Cargo.toml index 3adf374c17..2f4128f432 100644 --- a/gen/qpxexpress1/Cargo.toml +++ b/gen/qpxexpress1/Cargo.toml @@ -4,7 +4,7 @@ [package] name = "google-qpxexpress1" -version = "0.1.12+20140321" +version = "0.1.13+20160307" authors = ["Sebastian Thiel "] description = "A complete library to interact with QPX Express (protocol v1)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/qpxexpress1" @@ -16,14 +16,14 @@ build = "src/build.rs" [dependencies] -hyper = "0.7" -mime = "0.1.0" -serde = ">= 0.7.0" -serde_json = ">= 0.7.0" -yup-oauth2 = ">= 0.5.4" +hyper = "0.8" +mime = "0.2.0" +serde = "0.6.0" +serde_json = "0.6.0" +yup-oauth2 = ">= 0.5.6" url = ">= 0.5" [build-dependencies] -syntex = { version = ">= 0.23" } -serde_codegen = { version = ">= 0.6" } +syntex = { version = "= 0.28" } +serde_codegen = { version = "= 0.6.13" } diff --git a/gen/qpxexpress1/README.md b/gen/qpxexpress1/README.md index 471770fbe4..c811c34caf 100644 --- a/gen/qpxexpress1/README.md +++ b/gen/qpxexpress1/README.md @@ -5,7 +5,7 @@ DO NOT EDIT ! --> The `google-qpxexpress1` library allows access to all features of the *Google QPX Express* service. -This documentation was generated from *QPX Express* crate version *0.1.12+20140321*, where *20140321* is the exact revision of the *qpxExpress:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.12*. +This documentation was generated from *QPX Express* crate version *0.1.13+20160307*, where *20160307* is the exact revision of the *qpxExpress:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.13*. Everything else about the *QPX Express* *v1* API can be found at the [official documentation site](http://developers.google.com/qpx-express). diff --git a/gen/qpxexpress1/src/cmn.rs b/gen/qpxexpress1/src/cmn.rs index 87b91a8986..c69621da55 100644 --- a/gen/qpxexpress1/src/cmn.rs +++ b/gen/qpxexpress1/src/cmn.rs @@ -12,7 +12,7 @@ use mime::{Mime, TopLevel, SubLevel, Attr, Value}; use oauth2::{TokenType, Retry, self}; use hyper; use hyper::header::{ContentType, ContentLength, Headers, UserAgent, Authorization, Header, - HeaderFormat}; + HeaderFormat, Bearer}; use hyper::http::h1::LINE_ENDING; use hyper::method::Method; use hyper::status::StatusCode; @@ -634,7 +634,7 @@ pub struct ResumableUploadHelper<'a, A: 'a> { pub start_at: Option, pub auth: &'a mut A, pub user_agent: &'a str, - pub auth_header: Authorization, + pub auth_header: Authorization, pub url: &'a str, pub reader: &'a mut ReadSeek, pub media_type: Mime, diff --git a/gen/qpxexpress1/src/lib.rs b/gen/qpxexpress1/src/lib.rs index 2c4d4bd74b..6bd543accc 100644 --- a/gen/qpxexpress1/src/lib.rs +++ b/gen/qpxexpress1/src/lib.rs @@ -2,7 +2,7 @@ // This file was generated automatically from 'src/mako/api/lib.rs.mako' // DO NOT EDIT ! -//! This documentation was generated from *QPX Express* crate version *0.1.12+20140321*, where *20140321* is the exact revision of the *qpxExpress:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.12*. +//! This documentation was generated from *QPX Express* crate version *0.1.13+20160307*, where *20160307* is the exact revision of the *qpxExpress:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.13*. //! //! Everything else about the *QPX Express* *v1* API can be found at the //! [official documentation site](http://developers.google.com/qpx-express). diff --git a/gen/qpxexpress1/src/lib.rs.in b/gen/qpxexpress1/src/lib.rs.in index 8f58d8fc4c..57e4ce3692 100644 --- a/gen/qpxexpress1/src/lib.rs.in +++ b/gen/qpxexpress1/src/lib.rs.in @@ -111,7 +111,7 @@ impl<'a, C, A> QPXExpress QPXExpress { client: RefCell::new(client), auth: RefCell::new(authenticator), - _user_agent: "google-api-rust-client/0.1.12".to_string(), + _user_agent: "google-api-rust-client/0.1.13".to_string(), } } @@ -120,7 +120,7 @@ impl<'a, C, A> QPXExpress } /// Set the user-agent header field to use in all requests to the server. - /// It defaults to `google-api-rust-client/0.1.12`. + /// It defaults to `google-api-rust-client/0.1.13`. /// /// Returns the previously set user-agent. pub fn user_agent(&mut self, agent_name: String) -> String { @@ -848,7 +848,7 @@ impl<'a, C, A> TripSearchCall<'a, C, A> where C: BorrowMut, A: oa /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, TripsSearchResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, diff --git a/gen/replicapool1_beta2-cli/Cargo.toml b/gen/replicapool1_beta2-cli/Cargo.toml index c655a5d261..6b1c189104 100644 --- a/gen/replicapool1_beta2-cli/Cargo.toml +++ b/gen/replicapool1_beta2-cli/Cargo.toml @@ -4,7 +4,7 @@ [package] name = "google-replicapool1_beta2-cli" -version = "0.3.3+20150708" +version = "0.3.4+20150708" authors = ["Sebastian Thiel "] description = "A complete library to interact with replicapool (protocol v1beta2)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/replicapool1_beta2-cli" @@ -17,18 +17,18 @@ keywords = ["replicapool", "google", "cli"] name = "replicapool1-beta2" [dependencies] -hyper = "0.7" -mime = "0.1.0" -serde = ">= 0.7.0" -serde_json = ">= 0.7.0" -yup-oauth2 = ">= 0.5.4" +hyper = "0.8" +mime = "0.2.0" +serde = "0.6.0" +serde_json = "0.6.0" +yup-oauth2 = ">= 0.5.6" strsim = "0.4" yup-hyper-mock = "1.0" clap = "2.0" [build-dependencies] -syntex = { version = ">= 0.23" } -serde_codegen = { version = ">= 0.6" } +syntex = { version = "= 0.28" } +serde_codegen = { version = "= 0.6.13" } [dependencies.google-replicapool1_beta2] diff --git a/gen/replicapool1_beta2-cli/README.md b/gen/replicapool1_beta2-cli/README.md index d52915b8eb..6926ae6835 100644 --- a/gen/replicapool1_beta2-cli/README.md +++ b/gen/replicapool1_beta2-cli/README.md @@ -17,14 +17,14 @@ Everything else about the *replicapool* API can be found at the You can download the pre-compiled 64bit binaries for the following platforms: -* ![icon](http://megaicons.net/static/img/icons_sizes/6/140/16/ubuntu-icon.png) [ubuntu](http://dl.byronimo.de/google.rs/cli/0.3.3/ubuntu/replicapool1-beta2.tar.gz) -* ![icon](http://hydra-media.cursecdn.com/wow.gamepedia.com/a/a2/Apple-icon-16x16.png?version=25ddd67ac3dd3b634478e3978b76cb74) [osx](http://dl.byronimo.de/google.rs/cli/0.3.3/osx/replicapool1-beta2.tar.gz) +* ![icon](http://megaicons.net/static/img/icons_sizes/6/140/16/ubuntu-icon.png) [ubuntu](http://dl.byronimo.de/google.rs/cli/0.3.4/ubuntu/replicapool1-beta2.tar.gz) +* ![icon](http://hydra-media.cursecdn.com/wow.gamepedia.com/a/a2/Apple-icon-16x16.png?version=25ddd67ac3dd3b634478e3978b76cb74) [osx](http://dl.byronimo.de/google.rs/cli/0.3.4/osx/replicapool1-beta2.tar.gz) Find the source code [on github](https://github.com/Byron/google-apis-rs/tree/master/gen/replicapool1_beta2-cli). # Usage -This documentation was generated from the *replicapool* API at revision *20150708*. The CLI is at version *0.3.3*. +This documentation was generated from the *replicapool* API at revision *20150708*. The CLI is at version *0.3.4*. ```bash replicapool1-beta2 [options] diff --git a/gen/replicapool1_beta2-cli/mkdocs.yml b/gen/replicapool1_beta2-cli/mkdocs.yml index 74fb08ad8e..4963b1b1f0 100644 --- a/gen/replicapool1_beta2-cli/mkdocs.yml +++ b/gen/replicapool1_beta2-cli/mkdocs.yml @@ -1,4 +1,4 @@ -site_name: replicapool v0.3.3+20150708 +site_name: replicapool v0.3.4+20150708 site_url: http://byron.github.io/google-apis-rs/google-replicapool1_beta2-cli site_description: Write integrating applications with bcore diff --git a/gen/replicapool1_beta2-cli/src/cmn.rs b/gen/replicapool1_beta2-cli/src/cmn.rs index 188159ee80..ae86fdef65 100644 --- a/gen/replicapool1_beta2-cli/src/cmn.rs +++ b/gen/replicapool1_beta2-cli/src/cmn.rs @@ -414,7 +414,7 @@ impl TokenStorage for JsonTokenStorage { Err(err) => match err.kind() { io::ErrorKind::NotFound => Ok(()), - _ => Err(json::Error::Io(err)) + _ => Err(json::Error::IoError(err)) }, Ok(_) => Ok(()), } @@ -427,7 +427,7 @@ impl TokenStorage for JsonTokenStorage { Err(serde_err) => Err(serde_err), } }, - Err(io_err) => Err(json::Error::Io(io_err)) + Err(io_err) => Err(json::Error::IoError(io_err)) } } } @@ -444,7 +444,7 @@ impl TokenStorage for JsonTokenStorage { Err(io_err) => { match io_err.kind() { io::ErrorKind::NotFound => Ok(None), - _ => Err(json::Error::Io(io_err)) + _ => Err(json::Error::IoError(io_err)) } } } @@ -683,7 +683,7 @@ pub fn application_secret_from_directory(dir: &str, = json::from_str(json_console_secret).unwrap(); match json::to_writer_pretty(&mut f, &console_secret) { Err(serde_err) => match serde_err { - json::Error::Io(err) => err, + json::Error::IoError(err) => err, _ => panic!("Unexpected serde error: {:#?}", serde_err) }, Ok(_) => continue, @@ -696,7 +696,7 @@ pub fn application_secret_from_directory(dir: &str, }, Ok(f) => { match json::de::from_reader::<_, ConsoleApplicationSecret>(f) { - Err(json::Error::Io(err)) => + Err(json::Error::IoError(err)) => return secret_io_error(err), Err(json_err) => return Err(CLIError::Configuration( diff --git a/gen/replicapool1_beta2-cli/src/main.rs b/gen/replicapool1_beta2-cli/src/main.rs index 73ac9a37c0..54d4c8fd03 100644 --- a/gen/replicapool1_beta2-cli/src/main.rs +++ b/gen/replicapool1_beta2-cli/src/main.rs @@ -1489,7 +1489,7 @@ fn main() { let mut app = App::new("replicapool1-beta2") .author("Sebastian Thiel ") - .version("0.3.3+20150708") + .version("0.3.4+20150708") .about("The Google Compute Engine Instance Group Manager API provides groups of homogenous Compute Engine Instances.") .after_help("All documentation details can be found at http://byron.github.io/google-apis-rs/google_replicapool1_beta2_cli") .arg(Arg::with_name("url") diff --git a/gen/replicapool1_beta2/Cargo.toml b/gen/replicapool1_beta2/Cargo.toml index 6183680c44..fca5dff7c8 100644 --- a/gen/replicapool1_beta2/Cargo.toml +++ b/gen/replicapool1_beta2/Cargo.toml @@ -4,7 +4,7 @@ [package] name = "google-replicapool1_beta2" -version = "0.1.12+20150708" +version = "0.1.13+20150708" authors = ["Sebastian Thiel "] description = "A complete library to interact with replicapool (protocol v1beta2)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/replicapool1_beta2" @@ -16,14 +16,14 @@ build = "src/build.rs" [dependencies] -hyper = "0.7" -mime = "0.1.0" -serde = ">= 0.7.0" -serde_json = ">= 0.7.0" -yup-oauth2 = ">= 0.5.4" +hyper = "0.8" +mime = "0.2.0" +serde = "0.6.0" +serde_json = "0.6.0" +yup-oauth2 = ">= 0.5.6" url = ">= 0.5" [build-dependencies] -syntex = { version = ">= 0.23" } -serde_codegen = { version = ">= 0.6" } +syntex = { version = "= 0.28" } +serde_codegen = { version = "= 0.6.13" } diff --git a/gen/replicapool1_beta2/README.md b/gen/replicapool1_beta2/README.md index a9e2d76779..a33a66351e 100644 --- a/gen/replicapool1_beta2/README.md +++ b/gen/replicapool1_beta2/README.md @@ -5,7 +5,7 @@ DO NOT EDIT ! --> The `google-replicapool1_beta2` library allows access to all features of the *Google replicapool* service. -This documentation was generated from *replicapool* crate version *0.1.12+20150708*, where *20150708* is the exact revision of the *replicapool:v1beta2* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.12*. +This documentation was generated from *replicapool* crate version *0.1.13+20150708*, where *20150708* is the exact revision of the *replicapool:v1beta2* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.13*. Everything else about the *replicapool* *v1_beta2* API can be found at the [official documentation site](https://developers.google.com/compute/docs/instance-groups/manager/v1beta2). diff --git a/gen/replicapool1_beta2/src/cmn.rs b/gen/replicapool1_beta2/src/cmn.rs index 87b91a8986..c69621da55 100644 --- a/gen/replicapool1_beta2/src/cmn.rs +++ b/gen/replicapool1_beta2/src/cmn.rs @@ -12,7 +12,7 @@ use mime::{Mime, TopLevel, SubLevel, Attr, Value}; use oauth2::{TokenType, Retry, self}; use hyper; use hyper::header::{ContentType, ContentLength, Headers, UserAgent, Authorization, Header, - HeaderFormat}; + HeaderFormat, Bearer}; use hyper::http::h1::LINE_ENDING; use hyper::method::Method; use hyper::status::StatusCode; @@ -634,7 +634,7 @@ pub struct ResumableUploadHelper<'a, A: 'a> { pub start_at: Option, pub auth: &'a mut A, pub user_agent: &'a str, - pub auth_header: Authorization, + pub auth_header: Authorization, pub url: &'a str, pub reader: &'a mut ReadSeek, pub media_type: Mime, diff --git a/gen/replicapool1_beta2/src/lib.rs b/gen/replicapool1_beta2/src/lib.rs index 30d20f8546..83dbcbfdb9 100644 --- a/gen/replicapool1_beta2/src/lib.rs +++ b/gen/replicapool1_beta2/src/lib.rs @@ -2,7 +2,7 @@ // This file was generated automatically from 'src/mako/api/lib.rs.mako' // DO NOT EDIT ! -//! This documentation was generated from *replicapool* crate version *0.1.12+20150708*, where *20150708* is the exact revision of the *replicapool:v1beta2* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.12*. +//! This documentation was generated from *replicapool* crate version *0.1.13+20150708*, where *20150708* is the exact revision of the *replicapool:v1beta2* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.13*. //! //! Everything else about the *replicapool* *v1_beta2* API can be found at the //! [official documentation site](https://developers.google.com/compute/docs/instance-groups/manager/v1beta2). diff --git a/gen/replicapool1_beta2/src/lib.rs.in b/gen/replicapool1_beta2/src/lib.rs.in index f5b3db38f5..875fca2451 100644 --- a/gen/replicapool1_beta2/src/lib.rs.in +++ b/gen/replicapool1_beta2/src/lib.rs.in @@ -142,7 +142,7 @@ impl<'a, C, A> Replicapool Replicapool { client: RefCell::new(client), auth: RefCell::new(authenticator), - _user_agent: "google-api-rust-client/0.1.12".to_string(), + _user_agent: "google-api-rust-client/0.1.13".to_string(), } } @@ -154,7 +154,7 @@ impl<'a, C, A> Replicapool } /// Set the user-agent header field to use in all requests to the server. - /// It defaults to `google-api-rust-client/0.1.12`. + /// It defaults to `google-api-rust-client/0.1.13`. /// /// Returns the previously set user-agent. pub fn user_agent(&mut self, agent_name: String) -> String { @@ -964,7 +964,7 @@ impl<'a, C, A> ZoneOperationListCall<'a, C, A> where C: BorrowMut /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, OperationList)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -1043,8 +1043,7 @@ impl<'a, C, A> ZoneOperationListCall<'a, C, A> where C: BorrowMut } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -1243,7 +1242,7 @@ impl<'a, C, A> ZoneOperationGetCall<'a, C, A> where C: BorrowMut, /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Operation)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -1314,8 +1313,7 @@ impl<'a, C, A> ZoneOperationGetCall<'a, C, A> where C: BorrowMut, } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -1510,7 +1508,7 @@ impl<'a, C, A> InstanceGroupManagerSetTargetPoolCall<'a, C, A> where C: BorrowMu /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Operation)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -1592,8 +1590,7 @@ impl<'a, C, A> InstanceGroupManagerSetTargetPoolCall<'a, C, A> where C: BorrowMu } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -1799,7 +1796,7 @@ impl<'a, C, A> InstanceGroupManagerListCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, InstanceGroupManagerList)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -1878,8 +1875,7 @@ impl<'a, C, A> InstanceGroupManagerListCall<'a, C, A> where C: BorrowMut InstanceGroupManagerInsertCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, Operation)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -2167,8 +2163,7 @@ impl<'a, C, A> InstanceGroupManagerInsertCall<'a, C, A> where C: BorrowMut InstanceGroupManagerGetCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, InstanceGroupManager)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -2440,8 +2435,7 @@ impl<'a, C, A> InstanceGroupManagerGetCall<'a, C, A> where C: BorrowMut InstanceGroupManagerAbandonInstanceCall<'a, C, A> where C: Borrow /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Operation)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -2718,8 +2712,7 @@ impl<'a, C, A> InstanceGroupManagerAbandonInstanceCall<'a, C, A> where C: Borrow } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -2927,7 +2920,7 @@ impl<'a, C, A> InstanceGroupManagerRecreateInstanceCall<'a, C, A> where C: Borro /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Operation)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -3009,8 +3002,7 @@ impl<'a, C, A> InstanceGroupManagerRecreateInstanceCall<'a, C, A> where C: Borro } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -3211,7 +3203,7 @@ impl<'a, C, A> InstanceGroupManagerDeleteCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, Operation)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -3282,8 +3274,7 @@ impl<'a, C, A> InstanceGroupManagerDeleteCall<'a, C, A> where C: BorrowMut InstanceGroupManagerSetInstanceTemplateCall<'a, C, A> where C: Bo /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Operation)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -3560,8 +3551,7 @@ impl<'a, C, A> InstanceGroupManagerSetInstanceTemplateCall<'a, C, A> where C: Bo } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -3763,7 +3753,7 @@ impl<'a, C, A> InstanceGroupManagerResizeCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, Operation)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -3835,8 +3825,7 @@ impl<'a, C, A> InstanceGroupManagerResizeCall<'a, C, A> where C: BorrowMut InstanceGroupManagerDeleteInstanceCall<'a, C, A> where C: BorrowM /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Operation)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -4123,8 +4112,7 @@ impl<'a, C, A> InstanceGroupManagerDeleteInstanceCall<'a, C, A> where C: BorrowM } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); diff --git a/gen/replicapoolupdater1_beta1-cli/Cargo.toml b/gen/replicapoolupdater1_beta1-cli/Cargo.toml index fab5282bb4..90c8ab2b8f 100644 --- a/gen/replicapoolupdater1_beta1-cli/Cargo.toml +++ b/gen/replicapoolupdater1_beta1-cli/Cargo.toml @@ -4,7 +4,7 @@ [package] name = "google-replicapoolupdater1_beta1-cli" -version = "0.3.3+20160107" +version = "0.3.4+20160229" authors = ["Sebastian Thiel "] description = "A complete library to interact with replicapoolupdater (protocol v1beta1)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/replicapoolupdater1_beta1-cli" @@ -17,18 +17,18 @@ keywords = ["replicapoolupdater", "google", "cli"] name = "replicapoolupdater1-beta1" [dependencies] -hyper = "0.7" -mime = "0.1.0" -serde = ">= 0.7.0" -serde_json = ">= 0.7.0" -yup-oauth2 = ">= 0.5.4" +hyper = "0.8" +mime = "0.2.0" +serde = "0.6.0" +serde_json = "0.6.0" +yup-oauth2 = ">= 0.5.6" strsim = "0.4" yup-hyper-mock = "1.0" clap = "2.0" [build-dependencies] -syntex = { version = ">= 0.23" } -serde_codegen = { version = ">= 0.6" } +syntex = { version = "= 0.28" } +serde_codegen = { version = "= 0.6.13" } [dependencies.google-replicapoolupdater1_beta1] diff --git a/gen/replicapoolupdater1_beta1-cli/README.md b/gen/replicapoolupdater1_beta1-cli/README.md index 2d169c92a2..613b74e094 100644 --- a/gen/replicapoolupdater1_beta1-cli/README.md +++ b/gen/replicapoolupdater1_beta1-cli/README.md @@ -17,14 +17,14 @@ Everything else about the *replicapoolupdater* API can be found at the You can download the pre-compiled 64bit binaries for the following platforms: -* ![icon](http://megaicons.net/static/img/icons_sizes/6/140/16/ubuntu-icon.png) [ubuntu](http://dl.byronimo.de/google.rs/cli/0.3.3/ubuntu/replicapoolupdater1-beta1.tar.gz) -* ![icon](http://hydra-media.cursecdn.com/wow.gamepedia.com/a/a2/Apple-icon-16x16.png?version=25ddd67ac3dd3b634478e3978b76cb74) [osx](http://dl.byronimo.de/google.rs/cli/0.3.3/osx/replicapoolupdater1-beta1.tar.gz) +* ![icon](http://megaicons.net/static/img/icons_sizes/6/140/16/ubuntu-icon.png) [ubuntu](http://dl.byronimo.de/google.rs/cli/0.3.4/ubuntu/replicapoolupdater1-beta1.tar.gz) +* ![icon](http://hydra-media.cursecdn.com/wow.gamepedia.com/a/a2/Apple-icon-16x16.png?version=25ddd67ac3dd3b634478e3978b76cb74) [osx](http://dl.byronimo.de/google.rs/cli/0.3.4/osx/replicapoolupdater1-beta1.tar.gz) Find the source code [on github](https://github.com/Byron/google-apis-rs/tree/master/gen/replicapoolupdater1_beta1-cli). # Usage -This documentation was generated from the *replicapoolupdater* API at revision *20160107*. The CLI is at version *0.3.3*. +This documentation was generated from the *replicapoolupdater* API at revision *20160229*. The CLI is at version *0.3.4*. ```bash replicapoolupdater1-beta1 [options] diff --git a/gen/replicapoolupdater1_beta1-cli/mkdocs.yml b/gen/replicapoolupdater1_beta1-cli/mkdocs.yml index 8b8dc16727..d5fd146fe5 100644 --- a/gen/replicapoolupdater1_beta1-cli/mkdocs.yml +++ b/gen/replicapoolupdater1_beta1-cli/mkdocs.yml @@ -1,4 +1,4 @@ -site_name: replicapoolupdater v0.3.3+20160107 +site_name: replicapoolupdater v0.3.4+20160229 site_url: http://byron.github.io/google-apis-rs/google-replicapoolupdater1_beta1-cli site_description: Write integrating applications with bcore diff --git a/gen/replicapoolupdater1_beta1-cli/src/cmn.rs b/gen/replicapoolupdater1_beta1-cli/src/cmn.rs index 188159ee80..ae86fdef65 100644 --- a/gen/replicapoolupdater1_beta1-cli/src/cmn.rs +++ b/gen/replicapoolupdater1_beta1-cli/src/cmn.rs @@ -414,7 +414,7 @@ impl TokenStorage for JsonTokenStorage { Err(err) => match err.kind() { io::ErrorKind::NotFound => Ok(()), - _ => Err(json::Error::Io(err)) + _ => Err(json::Error::IoError(err)) }, Ok(_) => Ok(()), } @@ -427,7 +427,7 @@ impl TokenStorage for JsonTokenStorage { Err(serde_err) => Err(serde_err), } }, - Err(io_err) => Err(json::Error::Io(io_err)) + Err(io_err) => Err(json::Error::IoError(io_err)) } } } @@ -444,7 +444,7 @@ impl TokenStorage for JsonTokenStorage { Err(io_err) => { match io_err.kind() { io::ErrorKind::NotFound => Ok(None), - _ => Err(json::Error::Io(io_err)) + _ => Err(json::Error::IoError(io_err)) } } } @@ -683,7 +683,7 @@ pub fn application_secret_from_directory(dir: &str, = json::from_str(json_console_secret).unwrap(); match json::to_writer_pretty(&mut f, &console_secret) { Err(serde_err) => match serde_err { - json::Error::Io(err) => err, + json::Error::IoError(err) => err, _ => panic!("Unexpected serde error: {:#?}", serde_err) }, Ok(_) => continue, @@ -696,7 +696,7 @@ pub fn application_secret_from_directory(dir: &str, }, Ok(f) => { match json::de::from_reader::<_, ConsoleApplicationSecret>(f) { - Err(json::Error::Io(err)) => + Err(json::Error::IoError(err)) => return secret_io_error(err), Err(json_err) => return Err(CLIError::Configuration( diff --git a/gen/replicapoolupdater1_beta1-cli/src/main.rs b/gen/replicapoolupdater1_beta1-cli/src/main.rs index 92fa7f382a..3d06c9fb40 100644 --- a/gen/replicapoolupdater1_beta1-cli/src/main.rs +++ b/gen/replicapoolupdater1_beta1-cli/src/main.rs @@ -1117,8 +1117,8 @@ fn main() { let mut app = App::new("replicapoolupdater1-beta1") .author("Sebastian Thiel ") - .version("0.3.3+20160107") - .about("The Google Compute Engine Instance Group Updater API provides services for updating groups of Compute Engine Instances.") + .version("0.3.4+20160229") + .about("Updates groups of Compute Engine instances.") .after_help("All documentation details can be found at http://byron.github.io/google-apis-rs/google_replicapoolupdater1_beta1_cli") .arg(Arg::with_name("url") .long("scope") diff --git a/gen/replicapoolupdater1_beta1/Cargo.toml b/gen/replicapoolupdater1_beta1/Cargo.toml index 19bfd203e4..d773711ffc 100644 --- a/gen/replicapoolupdater1_beta1/Cargo.toml +++ b/gen/replicapoolupdater1_beta1/Cargo.toml @@ -4,7 +4,7 @@ [package] name = "google-replicapoolupdater1_beta1" -version = "0.1.12+20160107" +version = "0.1.13+20160229" authors = ["Sebastian Thiel "] description = "A complete library to interact with replicapoolupdater (protocol v1beta1)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/replicapoolupdater1_beta1" @@ -16,14 +16,14 @@ build = "src/build.rs" [dependencies] -hyper = "0.7" -mime = "0.1.0" -serde = ">= 0.7.0" -serde_json = ">= 0.7.0" -yup-oauth2 = ">= 0.5.4" +hyper = "0.8" +mime = "0.2.0" +serde = "0.6.0" +serde_json = "0.6.0" +yup-oauth2 = ">= 0.5.6" url = ">= 0.5" [build-dependencies] -syntex = { version = ">= 0.23" } -serde_codegen = { version = ">= 0.6" } +syntex = { version = "= 0.28" } +serde_codegen = { version = "= 0.6.13" } diff --git a/gen/replicapoolupdater1_beta1/README.md b/gen/replicapoolupdater1_beta1/README.md index 2ca918c678..1b8014a08f 100644 --- a/gen/replicapoolupdater1_beta1/README.md +++ b/gen/replicapoolupdater1_beta1/README.md @@ -5,7 +5,7 @@ DO NOT EDIT ! --> The `google-replicapoolupdater1_beta1` library allows access to all features of the *Google replicapoolupdater* service. -This documentation was generated from *replicapoolupdater* crate version *0.1.12+20160107*, where *20160107* is the exact revision of the *replicapoolupdater:v1beta1* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.12*. +This documentation was generated from *replicapoolupdater* crate version *0.1.13+20160229*, where *20160229* is the exact revision of the *replicapoolupdater:v1beta1* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.13*. Everything else about the *replicapoolupdater* *v1_beta1* API can be found at the [official documentation site](https://cloud.google.com/compute/docs/instance-groups/manager/#applying_rolling_updates_using_the_updater_service). diff --git a/gen/replicapoolupdater1_beta1/src/cmn.rs b/gen/replicapoolupdater1_beta1/src/cmn.rs index 87b91a8986..c69621da55 100644 --- a/gen/replicapoolupdater1_beta1/src/cmn.rs +++ b/gen/replicapoolupdater1_beta1/src/cmn.rs @@ -12,7 +12,7 @@ use mime::{Mime, TopLevel, SubLevel, Attr, Value}; use oauth2::{TokenType, Retry, self}; use hyper; use hyper::header::{ContentType, ContentLength, Headers, UserAgent, Authorization, Header, - HeaderFormat}; + HeaderFormat, Bearer}; use hyper::http::h1::LINE_ENDING; use hyper::method::Method; use hyper::status::StatusCode; @@ -634,7 +634,7 @@ pub struct ResumableUploadHelper<'a, A: 'a> { pub start_at: Option, pub auth: &'a mut A, pub user_agent: &'a str, - pub auth_header: Authorization, + pub auth_header: Authorization, pub url: &'a str, pub reader: &'a mut ReadSeek, pub media_type: Mime, diff --git a/gen/replicapoolupdater1_beta1/src/lib.rs b/gen/replicapoolupdater1_beta1/src/lib.rs index c897e04554..34d274e819 100644 --- a/gen/replicapoolupdater1_beta1/src/lib.rs +++ b/gen/replicapoolupdater1_beta1/src/lib.rs @@ -2,7 +2,7 @@ // This file was generated automatically from 'src/mako/api/lib.rs.mako' // DO NOT EDIT ! -//! This documentation was generated from *replicapoolupdater* crate version *0.1.12+20160107*, where *20160107* is the exact revision of the *replicapoolupdater:v1beta1* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.12*. +//! This documentation was generated from *replicapoolupdater* crate version *0.1.13+20160229*, where *20160229* is the exact revision of the *replicapoolupdater:v1beta1* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.13*. //! //! Everything else about the *replicapoolupdater* *v1_beta1* API can be found at the //! [official documentation site](https://cloud.google.com/compute/docs/instance-groups/manager/#applying_rolling_updates_using_the_updater_service). diff --git a/gen/replicapoolupdater1_beta1/src/lib.rs.in b/gen/replicapoolupdater1_beta1/src/lib.rs.in index 2aa66b1949..f335d807b1 100644 --- a/gen/replicapoolupdater1_beta1/src/lib.rs.in +++ b/gen/replicapoolupdater1_beta1/src/lib.rs.in @@ -142,7 +142,7 @@ impl<'a, C, A> Replicapoolupdater Replicapoolupdater { client: RefCell::new(client), auth: RefCell::new(authenticator), - _user_agent: "google-api-rust-client/0.1.12".to_string(), + _user_agent: "google-api-rust-client/0.1.13".to_string(), } } @@ -154,7 +154,7 @@ impl<'a, C, A> Replicapoolupdater } /// Set the user-agent header field to use in all requests to the server. - /// It defaults to `google-api-rust-client/0.1.12`. + /// It defaults to `google-api-rust-client/0.1.13`. /// /// Returns the previously set user-agent. pub fn user_agent(&mut self, agent_name: String) -> String { @@ -935,7 +935,7 @@ impl<'a, C, A> RollingUpdatePauseCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, Operation)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -1006,8 +1006,7 @@ impl<'a, C, A> RollingUpdatePauseCall<'a, C, A> where C: BorrowMut RollingUpdateRollbackCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, Operation)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -1266,8 +1265,7 @@ impl<'a, C, A> RollingUpdateRollbackCall<'a, C, A> where C: BorrowMut RollingUpdateGetCall<'a, C, A> where C: BorrowMut, /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, RollingUpdate)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -1526,8 +1524,7 @@ impl<'a, C, A> RollingUpdateGetCall<'a, C, A> where C: BorrowMut, } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -1715,7 +1712,7 @@ impl<'a, C, A> RollingUpdateResumeCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, Operation)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -1786,8 +1783,7 @@ impl<'a, C, A> RollingUpdateResumeCall<'a, C, A> where C: BorrowMut RollingUpdateListCall<'a, C, A> where C: BorrowMut /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, RollingUpdateList)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -2059,8 +2055,7 @@ impl<'a, C, A> RollingUpdateListCall<'a, C, A> where C: BorrowMut } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -2265,7 +2260,7 @@ impl<'a, C, A> RollingUpdateInsertCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, Operation)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -2346,8 +2341,7 @@ impl<'a, C, A> RollingUpdateInsertCall<'a, C, A> where C: BorrowMut RollingUpdateListInstanceUpdateCall<'a, C, A> where C: BorrowMut< /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, InstanceUpdateList)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -2624,8 +2618,7 @@ impl<'a, C, A> RollingUpdateListInstanceUpdateCall<'a, C, A> where C: BorrowMut< } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -2834,7 +2827,7 @@ impl<'a, C, A> RollingUpdateCancelCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, Operation)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -2905,8 +2898,7 @@ impl<'a, C, A> RollingUpdateCancelCall<'a, C, A> where C: BorrowMut ZoneOperationGetCall<'a, C, A> where C: BorrowMut, /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Operation)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -3165,8 +3157,7 @@ impl<'a, C, A> ZoneOperationGetCall<'a, C, A> where C: BorrowMut, } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -3359,7 +3350,7 @@ impl<'a, C, A> ZoneOperationListCall<'a, C, A> where C: BorrowMut /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, OperationList)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -3438,8 +3429,7 @@ impl<'a, C, A> ZoneOperationListCall<'a, C, A> where C: BorrowMut } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) diff --git a/gen/reseller1_sandbox-cli/Cargo.toml b/gen/reseller1_sandbox-cli/Cargo.toml index 6f95218516..ea9cb632fa 100644 --- a/gen/reseller1_sandbox-cli/Cargo.toml +++ b/gen/reseller1_sandbox-cli/Cargo.toml @@ -4,7 +4,7 @@ [package] name = "google-reseller1_sandbox-cli" -version = "0.3.3+20160218" +version = "0.3.4+20160329" authors = ["Sebastian Thiel "] description = "A complete library to interact with reseller (protocol v1sandbox)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/reseller1_sandbox-cli" @@ -17,18 +17,18 @@ keywords = ["reseller", "google", "cli"] name = "reseller1-sandbox" [dependencies] -hyper = "0.7" -mime = "0.1.0" -serde = ">= 0.7.0" -serde_json = ">= 0.7.0" -yup-oauth2 = ">= 0.5.4" +hyper = "0.8" +mime = "0.2.0" +serde = "0.6.0" +serde_json = "0.6.0" +yup-oauth2 = ">= 0.5.6" strsim = "0.4" yup-hyper-mock = "1.0" clap = "2.0" [build-dependencies] -syntex = { version = ">= 0.23" } -serde_codegen = { version = ">= 0.6" } +syntex = { version = "= 0.28" } +serde_codegen = { version = "= 0.6.13" } [dependencies.google-reseller1_sandbox] diff --git a/gen/reseller1_sandbox-cli/README.md b/gen/reseller1_sandbox-cli/README.md index f75f695913..c6277f40a9 100644 --- a/gen/reseller1_sandbox-cli/README.md +++ b/gen/reseller1_sandbox-cli/README.md @@ -17,14 +17,14 @@ Everything else about the *reseller* API can be found at the You can download the pre-compiled 64bit binaries for the following platforms: -* ![icon](http://megaicons.net/static/img/icons_sizes/6/140/16/ubuntu-icon.png) [ubuntu](http://dl.byronimo.de/google.rs/cli/0.3.3/ubuntu/reseller1-sandbox.tar.gz) -* ![icon](http://hydra-media.cursecdn.com/wow.gamepedia.com/a/a2/Apple-icon-16x16.png?version=25ddd67ac3dd3b634478e3978b76cb74) [osx](http://dl.byronimo.de/google.rs/cli/0.3.3/osx/reseller1-sandbox.tar.gz) +* ![icon](http://megaicons.net/static/img/icons_sizes/6/140/16/ubuntu-icon.png) [ubuntu](http://dl.byronimo.de/google.rs/cli/0.3.4/ubuntu/reseller1-sandbox.tar.gz) +* ![icon](http://hydra-media.cursecdn.com/wow.gamepedia.com/a/a2/Apple-icon-16x16.png?version=25ddd67ac3dd3b634478e3978b76cb74) [osx](http://dl.byronimo.de/google.rs/cli/0.3.4/osx/reseller1-sandbox.tar.gz) Find the source code [on github](https://github.com/Byron/google-apis-rs/tree/master/gen/reseller1_sandbox-cli). # Usage -This documentation was generated from the *reseller* API at revision *20160218*. The CLI is at version *0.3.3*. +This documentation was generated from the *reseller* API at revision *20160329*. The CLI is at version *0.3.4*. ```bash reseller1-sandbox [options] diff --git a/gen/reseller1_sandbox-cli/mkdocs.yml b/gen/reseller1_sandbox-cli/mkdocs.yml index 4e1b0823b5..a0cbf39aec 100644 --- a/gen/reseller1_sandbox-cli/mkdocs.yml +++ b/gen/reseller1_sandbox-cli/mkdocs.yml @@ -1,4 +1,4 @@ -site_name: reseller v0.3.3+20160218 +site_name: reseller v0.3.4+20160329 site_url: http://byron.github.io/google-apis-rs/google-reseller1_sandbox-cli site_description: Write integrating applications with bcore diff --git a/gen/reseller1_sandbox-cli/src/cmn.rs b/gen/reseller1_sandbox-cli/src/cmn.rs index 188159ee80..ae86fdef65 100644 --- a/gen/reseller1_sandbox-cli/src/cmn.rs +++ b/gen/reseller1_sandbox-cli/src/cmn.rs @@ -414,7 +414,7 @@ impl TokenStorage for JsonTokenStorage { Err(err) => match err.kind() { io::ErrorKind::NotFound => Ok(()), - _ => Err(json::Error::Io(err)) + _ => Err(json::Error::IoError(err)) }, Ok(_) => Ok(()), } @@ -427,7 +427,7 @@ impl TokenStorage for JsonTokenStorage { Err(serde_err) => Err(serde_err), } }, - Err(io_err) => Err(json::Error::Io(io_err)) + Err(io_err) => Err(json::Error::IoError(io_err)) } } } @@ -444,7 +444,7 @@ impl TokenStorage for JsonTokenStorage { Err(io_err) => { match io_err.kind() { io::ErrorKind::NotFound => Ok(None), - _ => Err(json::Error::Io(io_err)) + _ => Err(json::Error::IoError(io_err)) } } } @@ -683,7 +683,7 @@ pub fn application_secret_from_directory(dir: &str, = json::from_str(json_console_secret).unwrap(); match json::to_writer_pretty(&mut f, &console_secret) { Err(serde_err) => match serde_err { - json::Error::Io(err) => err, + json::Error::IoError(err) => err, _ => panic!("Unexpected serde error: {:#?}", serde_err) }, Ok(_) => continue, @@ -696,7 +696,7 @@ pub fn application_secret_from_directory(dir: &str, }, Ok(f) => { match json::de::from_reader::<_, ConsoleApplicationSecret>(f) { - Err(json::Error::Io(err)) => + Err(json::Error::IoError(err)) => return secret_io_error(err), Err(json_err) => return Err(CLIError::Configuration( diff --git a/gen/reseller1_sandbox-cli/src/main.rs b/gen/reseller1_sandbox-cli/src/main.rs index 84e67f9e6e..30954fe028 100644 --- a/gen/reseller1_sandbox-cli/src/main.rs +++ b/gen/reseller1_sandbox-cli/src/main.rs @@ -480,6 +480,7 @@ impl<'n> Engine<'n> { let type_info: Option<(&'static str, JsonTypeInfo)> = match &temp_cursor.to_string()[..] { "plan-name" => Some(("planName", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "deal-code" => Some(("dealCode", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "kind" => Some(("kind", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "seats.kind" => Some(("seats.kind", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "seats.number-of-seats" => Some(("seats.numberOfSeats", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), @@ -487,7 +488,7 @@ impl<'n> Engine<'n> { "seats.licensed-number-of-seats" => Some(("seats.licensedNumberOfSeats", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), "purchase-order-id" => Some(("purchaseOrderId", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), _ => { - let suggestion = FieldCursor::did_you_mean(key, &vec!["kind", "licensed-number-of-seats", "maximum-number-of-seats", "number-of-seats", "plan-name", "purchase-order-id", "seats"]); + let suggestion = FieldCursor::did_you_mean(key, &vec!["deal-code", "kind", "licensed-number-of-seats", "maximum-number-of-seats", "number-of-seats", "plan-name", "purchase-order-id", "seats"]); err.issues.push(CLIError::Field(FieldError::Unknown(temp_cursor.to_string(), suggestion, value.map(|v| v.to_string())))); None } @@ -843,11 +844,12 @@ impl<'n> Engine<'n> { "status" => Some(("status", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "sku-id" => Some(("skuId", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "customer-domain" => Some(("customerDomain", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "purchase-order-id" => Some(("purchaseOrderId", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "trial-settings.trial-end-time" => Some(("trialSettings.trialEndTime", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "trial-settings.is-in-trial" => Some(("trialSettings.isInTrial", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), - "suspension-reasons" => Some(("suspensionReasons", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Vec })), + "deal-code" => Some(("dealCode", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "resource-ui-url" => Some(("resourceUiUrl", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), - "purchase-order-id" => Some(("purchaseOrderId", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "suspension-reasons" => Some(("suspensionReasons", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Vec })), "creation-time" => Some(("creationTime", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "renewal-settings.kind" => Some(("renewalSettings.kind", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "renewal-settings.renewal-type" => Some(("renewalSettings.renewalType", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), @@ -866,7 +868,7 @@ impl<'n> Engine<'n> { "billing-method" => Some(("billingMethod", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "kind" => Some(("kind", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), _ => { - let suggestion = FieldCursor::did_you_mean(key, &vec!["billing-method", "commitment-interval", "creation-time", "customer-domain", "customer-id", "end-time", "is-commitment-plan", "is-in-trial", "kind", "licensed-number-of-seats", "maximum-number-of-seats", "minimum-transferable-seats", "number-of-seats", "plan", "plan-name", "purchase-order-id", "renewal-settings", "renewal-type", "resource-ui-url", "seats", "sku-id", "start-time", "status", "subscription-id", "suspension-reasons", "transfer-info", "transferability-expiration-time", "trial-end-time", "trial-settings"]); + let suggestion = FieldCursor::did_you_mean(key, &vec!["billing-method", "commitment-interval", "creation-time", "customer-domain", "customer-id", "deal-code", "end-time", "is-commitment-plan", "is-in-trial", "kind", "licensed-number-of-seats", "maximum-number-of-seats", "minimum-transferable-seats", "number-of-seats", "plan", "plan-name", "purchase-order-id", "renewal-settings", "renewal-type", "resource-ui-url", "seats", "sku-id", "start-time", "status", "subscription-id", "suspension-reasons", "transfer-info", "transferability-expiration-time", "trial-end-time", "trial-settings"]); err.issues.push(CLIError::Field(FieldError::Unknown(temp_cursor.to_string(), suggestion, value.map(|v| v.to_string())))); None } @@ -1643,8 +1645,8 @@ fn main() { let mut app = App::new("reseller1-sandbox") .author("Sebastian Thiel ") - .version("0.3.3+20160218") - .about("Lets you create and manage your customers and their subscriptions.") + .version("0.3.4+20160329") + .about("Creates and manages your customers and their subscriptions.") .after_help("All documentation details can be found at http://byron.github.io/google-apis-rs/google_reseller1_sandbox_cli") .arg(Arg::with_name("url") .long("scope") diff --git a/gen/reseller1_sandbox/Cargo.toml b/gen/reseller1_sandbox/Cargo.toml index 8c6b8a9a0f..191acf79c0 100644 --- a/gen/reseller1_sandbox/Cargo.toml +++ b/gen/reseller1_sandbox/Cargo.toml @@ -4,7 +4,7 @@ [package] name = "google-reseller1_sandbox" -version = "0.1.12+20160218" +version = "0.1.13+20160329" authors = ["Sebastian Thiel "] description = "A complete library to interact with reseller (protocol v1sandbox)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/reseller1_sandbox" @@ -16,14 +16,14 @@ build = "src/build.rs" [dependencies] -hyper = "0.7" -mime = "0.1.0" -serde = ">= 0.7.0" -serde_json = ">= 0.7.0" -yup-oauth2 = ">= 0.5.4" +hyper = "0.8" +mime = "0.2.0" +serde = "0.6.0" +serde_json = "0.6.0" +yup-oauth2 = ">= 0.5.6" url = ">= 0.5" [build-dependencies] -syntex = { version = ">= 0.23" } -serde_codegen = { version = ">= 0.6" } +syntex = { version = "= 0.28" } +serde_codegen = { version = "= 0.6.13" } diff --git a/gen/reseller1_sandbox/README.md b/gen/reseller1_sandbox/README.md index 24e84cb378..5fa89f4f48 100644 --- a/gen/reseller1_sandbox/README.md +++ b/gen/reseller1_sandbox/README.md @@ -5,7 +5,7 @@ DO NOT EDIT ! --> The `google-reseller1_sandbox` library allows access to all features of the *Google reseller* service. -This documentation was generated from *reseller* crate version *0.1.12+20160218*, where *20160218* is the exact revision of the *reseller:v1sandbox* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.12*. +This documentation was generated from *reseller* crate version *0.1.13+20160329*, where *20160329* is the exact revision of the *reseller:v1sandbox* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.13*. Everything else about the *reseller* *v1_sandbox* API can be found at the [official documentation site](https://developers.google.com/google-apps/reseller/). diff --git a/gen/reseller1_sandbox/src/cmn.rs b/gen/reseller1_sandbox/src/cmn.rs index 87b91a8986..c69621da55 100644 --- a/gen/reseller1_sandbox/src/cmn.rs +++ b/gen/reseller1_sandbox/src/cmn.rs @@ -12,7 +12,7 @@ use mime::{Mime, TopLevel, SubLevel, Attr, Value}; use oauth2::{TokenType, Retry, self}; use hyper; use hyper::header::{ContentType, ContentLength, Headers, UserAgent, Authorization, Header, - HeaderFormat}; + HeaderFormat, Bearer}; use hyper::http::h1::LINE_ENDING; use hyper::method::Method; use hyper::status::StatusCode; @@ -634,7 +634,7 @@ pub struct ResumableUploadHelper<'a, A: 'a> { pub start_at: Option, pub auth: &'a mut A, pub user_agent: &'a str, - pub auth_header: Authorization, + pub auth_header: Authorization, pub url: &'a str, pub reader: &'a mut ReadSeek, pub media_type: Mime, diff --git a/gen/reseller1_sandbox/src/lib.rs b/gen/reseller1_sandbox/src/lib.rs index d1714be791..f912a8600c 100644 --- a/gen/reseller1_sandbox/src/lib.rs +++ b/gen/reseller1_sandbox/src/lib.rs @@ -2,7 +2,7 @@ // This file was generated automatically from 'src/mako/api/lib.rs.mako' // DO NOT EDIT ! -//! This documentation was generated from *reseller* crate version *0.1.12+20160218*, where *20160218* is the exact revision of the *reseller:v1sandbox* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.12*. +//! This documentation was generated from *reseller* crate version *0.1.13+20160329*, where *20160329* is the exact revision of the *reseller:v1sandbox* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.13*. //! //! Everything else about the *reseller* *v1_sandbox* API can be found at the //! [official documentation site](https://developers.google.com/google-apps/reseller/). diff --git a/gen/reseller1_sandbox/src/lib.rs.in b/gen/reseller1_sandbox/src/lib.rs.in index eeb7a79370..b0ae5e4804 100644 --- a/gen/reseller1_sandbox/src/lib.rs.in +++ b/gen/reseller1_sandbox/src/lib.rs.in @@ -136,7 +136,7 @@ impl<'a, C, A> Reseller Reseller { client: RefCell::new(client), auth: RefCell::new(authenticator), - _user_agent: "google-api-rust-client/0.1.12".to_string(), + _user_agent: "google-api-rust-client/0.1.13".to_string(), } } @@ -148,7 +148,7 @@ impl<'a, C, A> Reseller } /// Set the user-agent header field to use in all requests to the server. - /// It defaults to `google-api-rust-client/0.1.12`. + /// It defaults to `google-api-rust-client/0.1.13`. /// /// Returns the previously set user-agent. pub fn user_agent(&mut self, agent_name: String) -> String { @@ -327,6 +327,9 @@ pub struct ChangePlanRequest { /// Name of the plan to change to. #[serde(rename="planName")] pub plan_name: Option, + /// External name of the deal code applicable for the subscription. This field is optional. If missing, the deal price plan won't be used. + #[serde(rename="dealCode")] + pub deal_code: Option, /// Identifies the resource as a subscription change plan request. pub kind: Option, /// Purchase order id for your order tracking purposes. @@ -444,14 +447,9 @@ pub struct Subscription { /// Trial Settings of the subscription. #[serde(rename="trialSettings")] pub trial_settings: Option, - /// field listing all current reasons the subscription is suspended. It is possible for a subscription to have multiple suspension reasons. A subscription's status is SUSPENDED until all pending suspensions are removed. Possible options include: - /// - PENDING_TOS_ACCEPTANCE — The customer has not logged in and accepted the Google Apps Resold Terms of Services. - /// - RENEWAL_WITH_TYPE_CANCEL — The customer's commitment ended and their service was cancelled at the end of their term. - /// - RESELLER_INITIATED — A manual suspension invoked by a Reseller. - /// - TRIAL_ENDED — The customer's trial expired without a plan selected. - /// - OTHER — The customer is suspended for an internal Google reason (e.g. abuse or otherwise). - #[serde(rename="suspensionReasons")] - pub suspension_reasons: Option>, + /// External name of the deal, if this subscription was provisioned under one. Otherwise this field will be empty. + #[serde(rename="dealCode")] + pub deal_code: Option, /// Ui url for subscription resource. #[serde(rename="resourceUiUrl")] pub resource_ui_url: Option, @@ -473,6 +471,14 @@ pub struct Subscription { pub transfer_info: Option, /// Identifies the resource as a Subscription. pub kind: Option, + /// Read-only field containing an enumerable of all the current suspension reasons for a subscription. It is possible for a subscription to have many concurrent, overlapping suspension reasons. A subscription's STATUS is SUSPENDED until all pending suspensions are removed. Possible options include: + /// - PENDING_TOS_ACCEPTANCE - The customer has not logged in and accepted the Google Apps Resold Terms of Services. + /// - RENEWAL_WITH_TYPE_CANCEL - The customer's commitment ended and their service was cancelled at the end of their term. + /// - RESELLER_INITIATED - A manual suspension invoked by a Reseller. + /// - TRIAL_ENDED - The customer's trial expired without a plan selected. + /// - OTHER - The customer is suspended for an internal Google reason (e.g. abuse or otherwise). + #[serde(rename="suspensionReasons")] + pub suspension_reasons: Option>, /// Creation time of this subscription in milliseconds since Unix epoch. #[serde(rename="creationTime")] pub creation_time: Option, @@ -910,7 +916,7 @@ impl<'a, C, A> CustomerUpdateCall<'a, C, A> where C: BorrowMut, A /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Customer)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -990,8 +996,7 @@ impl<'a, C, A> CustomerUpdateCall<'a, C, A> where C: BorrowMut, A } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -1178,7 +1183,7 @@ impl<'a, C, A> CustomerInsertCall<'a, C, A> where C: BorrowMut, A /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Customer)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -1239,8 +1244,7 @@ impl<'a, C, A> CustomerInsertCall<'a, C, A> where C: BorrowMut, A } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -1423,7 +1427,7 @@ impl<'a, C, A> CustomerPatchCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Customer)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -1503,8 +1507,7 @@ impl<'a, C, A> CustomerPatchCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -1683,7 +1686,7 @@ impl<'a, C, A> CustomerGetCall<'a, C, A> where C: BorrowMut, A: o /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Customer)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -1752,8 +1755,7 @@ impl<'a, C, A> CustomerGetCall<'a, C, A> where C: BorrowMut, A: o } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -1928,7 +1930,7 @@ impl<'a, C, A> SubscriptionInsertCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, Subscription)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -2011,8 +2013,7 @@ impl<'a, C, A> SubscriptionInsertCall<'a, C, A> where C: BorrowMut SubscriptionDeleteCall<'a, C, A> where C: BorrowMut Result { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -2270,8 +2271,7 @@ impl<'a, C, A> SubscriptionDeleteCall<'a, C, A> where C: BorrowMut SubscriptionGetCall<'a, C, A> where C: BorrowMut, /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Subscription)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -2518,8 +2518,7 @@ impl<'a, C, A> SubscriptionGetCall<'a, C, A> where C: BorrowMut, } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -2704,7 +2703,7 @@ impl<'a, C, A> SubscriptionListCall<'a, C, A> where C: BorrowMut, /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Subscriptions)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -2766,8 +2765,7 @@ impl<'a, C, A> SubscriptionListCall<'a, C, A> where C: BorrowMut, } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -2966,7 +2964,7 @@ impl<'a, C, A> SubscriptionChangeRenewalSettingCall<'a, C, A> where C: BorrowMut /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Subscription)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -3047,8 +3045,7 @@ impl<'a, C, A> SubscriptionChangeRenewalSettingCall<'a, C, A> where C: BorrowMut } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -3238,7 +3235,7 @@ impl<'a, C, A> SubscriptionStartPaidServiceCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, Subscription)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -3308,8 +3305,7 @@ impl<'a, C, A> SubscriptionStartPaidServiceCall<'a, C, A> where C: BorrowMut SubscriptionChangeSeatCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, Subscription)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -3574,8 +3570,7 @@ impl<'a, C, A> SubscriptionChangeSeatCall<'a, C, A> where C: BorrowMut SubscriptionSuspendCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, Subscription)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -3835,8 +3830,7 @@ impl<'a, C, A> SubscriptionSuspendCall<'a, C, A> where C: BorrowMut SubscriptionActivateCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, Subscription)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -4083,8 +4077,7 @@ impl<'a, C, A> SubscriptionActivateCall<'a, C, A> where C: BorrowMut SubscriptionChangePlanCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, Subscription)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -4349,8 +4342,7 @@ impl<'a, C, A> SubscriptionChangePlanCall<'a, C, A> where C: BorrowMut"] description = "A complete library to interact with resourceviews (protocol v1beta2)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/resourceviews1_beta2-cli" @@ -17,18 +17,18 @@ keywords = ["resourceviews", "google", "cli"] name = "resourceviews1-beta2" [dependencies] -hyper = "0.7" -mime = "0.1.0" -serde = ">= 0.7.0" -serde_json = ">= 0.7.0" -yup-oauth2 = ">= 0.5.4" +hyper = "0.8" +mime = "0.2.0" +serde = "0.6.0" +serde_json = "0.6.0" +yup-oauth2 = ">= 0.5.6" strsim = "0.4" yup-hyper-mock = "1.0" clap = "2.0" [build-dependencies] -syntex = { version = ">= 0.23" } -serde_codegen = { version = ">= 0.6" } +syntex = { version = "= 0.28" } +serde_codegen = { version = "= 0.6.13" } [dependencies.google-resourceviews1_beta2] diff --git a/gen/resourceviews1_beta2-cli/README.md b/gen/resourceviews1_beta2-cli/README.md index 5c0c49e63e..1863e9542f 100644 --- a/gen/resourceviews1_beta2-cli/README.md +++ b/gen/resourceviews1_beta2-cli/README.md @@ -17,14 +17,14 @@ Everything else about the *resourceviews* API can be found at the You can download the pre-compiled 64bit binaries for the following platforms: -* ![icon](http://megaicons.net/static/img/icons_sizes/6/140/16/ubuntu-icon.png) [ubuntu](http://dl.byronimo.de/google.rs/cli/0.3.3/ubuntu/resourceviews1-beta2.tar.gz) -* ![icon](http://hydra-media.cursecdn.com/wow.gamepedia.com/a/a2/Apple-icon-16x16.png?version=25ddd67ac3dd3b634478e3978b76cb74) [osx](http://dl.byronimo.de/google.rs/cli/0.3.3/osx/resourceviews1-beta2.tar.gz) +* ![icon](http://megaicons.net/static/img/icons_sizes/6/140/16/ubuntu-icon.png) [ubuntu](http://dl.byronimo.de/google.rs/cli/0.3.4/ubuntu/resourceviews1-beta2.tar.gz) +* ![icon](http://hydra-media.cursecdn.com/wow.gamepedia.com/a/a2/Apple-icon-16x16.png?version=25ddd67ac3dd3b634478e3978b76cb74) [osx](http://dl.byronimo.de/google.rs/cli/0.3.4/osx/resourceviews1-beta2.tar.gz) Find the source code [on github](https://github.com/Byron/google-apis-rs/tree/master/gen/resourceviews1_beta2-cli). # Usage -This documentation was generated from the *resourceviews* API at revision *20150708*. The CLI is at version *0.3.3*. +This documentation was generated from the *resourceviews* API at revision *20150708*. The CLI is at version *0.3.4*. ```bash resourceviews1-beta2 [options] diff --git a/gen/resourceviews1_beta2-cli/mkdocs.yml b/gen/resourceviews1_beta2-cli/mkdocs.yml index 93deaaf1eb..8da24465ed 100644 --- a/gen/resourceviews1_beta2-cli/mkdocs.yml +++ b/gen/resourceviews1_beta2-cli/mkdocs.yml @@ -1,4 +1,4 @@ -site_name: resourceviews v0.3.3+20150708 +site_name: resourceviews v0.3.4+20150708 site_url: http://byron.github.io/google-apis-rs/google-resourceviews1_beta2-cli site_description: Write integrating applications with bcore diff --git a/gen/resourceviews1_beta2-cli/src/cmn.rs b/gen/resourceviews1_beta2-cli/src/cmn.rs index 188159ee80..ae86fdef65 100644 --- a/gen/resourceviews1_beta2-cli/src/cmn.rs +++ b/gen/resourceviews1_beta2-cli/src/cmn.rs @@ -414,7 +414,7 @@ impl TokenStorage for JsonTokenStorage { Err(err) => match err.kind() { io::ErrorKind::NotFound => Ok(()), - _ => Err(json::Error::Io(err)) + _ => Err(json::Error::IoError(err)) }, Ok(_) => Ok(()), } @@ -427,7 +427,7 @@ impl TokenStorage for JsonTokenStorage { Err(serde_err) => Err(serde_err), } }, - Err(io_err) => Err(json::Error::Io(io_err)) + Err(io_err) => Err(json::Error::IoError(io_err)) } } } @@ -444,7 +444,7 @@ impl TokenStorage for JsonTokenStorage { Err(io_err) => { match io_err.kind() { io::ErrorKind::NotFound => Ok(None), - _ => Err(json::Error::Io(io_err)) + _ => Err(json::Error::IoError(io_err)) } } } @@ -683,7 +683,7 @@ pub fn application_secret_from_directory(dir: &str, = json::from_str(json_console_secret).unwrap(); match json::to_writer_pretty(&mut f, &console_secret) { Err(serde_err) => match serde_err { - json::Error::Io(err) => err, + json::Error::IoError(err) => err, _ => panic!("Unexpected serde error: {:#?}", serde_err) }, Ok(_) => continue, @@ -696,7 +696,7 @@ pub fn application_secret_from_directory(dir: &str, }, Ok(f) => { match json::de::from_reader::<_, ConsoleApplicationSecret>(f) { - Err(json::Error::Io(err)) => + Err(json::Error::IoError(err)) => return secret_io_error(err), Err(json_err) => return Err(CLIError::Configuration( diff --git a/gen/resourceviews1_beta2-cli/src/main.rs b/gen/resourceviews1_beta2-cli/src/main.rs index 0c81f23461..dfbe35e818 100644 --- a/gen/resourceviews1_beta2-cli/src/main.rs +++ b/gen/resourceviews1_beta2-cli/src/main.rs @@ -1322,7 +1322,7 @@ fn main() { let mut app = App::new("resourceviews1-beta2") .author("Sebastian Thiel ") - .version("0.3.3+20150708") + .version("0.3.4+20150708") .about("The Resource View API allows users to create and manage logical sets of Google Compute Engine instances.") .after_help("All documentation details can be found at http://byron.github.io/google-apis-rs/google_resourceviews1_beta2_cli") .arg(Arg::with_name("url") diff --git a/gen/resourceviews1_beta2/Cargo.toml b/gen/resourceviews1_beta2/Cargo.toml index a44a2f8266..776baaa96e 100644 --- a/gen/resourceviews1_beta2/Cargo.toml +++ b/gen/resourceviews1_beta2/Cargo.toml @@ -4,7 +4,7 @@ [package] name = "google-resourceviews1_beta2" -version = "0.1.12+20150708" +version = "0.1.13+20150708" authors = ["Sebastian Thiel "] description = "A complete library to interact with resourceviews (protocol v1beta2)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/resourceviews1_beta2" @@ -16,14 +16,14 @@ build = "src/build.rs" [dependencies] -hyper = "0.7" -mime = "0.1.0" -serde = ">= 0.7.0" -serde_json = ">= 0.7.0" -yup-oauth2 = ">= 0.5.4" +hyper = "0.8" +mime = "0.2.0" +serde = "0.6.0" +serde_json = "0.6.0" +yup-oauth2 = ">= 0.5.6" url = ">= 0.5" [build-dependencies] -syntex = { version = ">= 0.23" } -serde_codegen = { version = ">= 0.6" } +syntex = { version = "= 0.28" } +serde_codegen = { version = "= 0.6.13" } diff --git a/gen/resourceviews1_beta2/README.md b/gen/resourceviews1_beta2/README.md index 7feffe2316..44db4ac69e 100644 --- a/gen/resourceviews1_beta2/README.md +++ b/gen/resourceviews1_beta2/README.md @@ -5,7 +5,7 @@ DO NOT EDIT ! --> The `google-resourceviews1_beta2` library allows access to all features of the *Google resourceviews* service. -This documentation was generated from *resourceviews* crate version *0.1.12+20150708*, where *20150708* is the exact revision of the *resourceviews:v1beta2* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.12*. +This documentation was generated from *resourceviews* crate version *0.1.13+20150708*, where *20150708* is the exact revision of the *resourceviews:v1beta2* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.13*. Everything else about the *resourceviews* *v1_beta2* API can be found at the [official documentation site](https://developers.google.com/compute/). diff --git a/gen/resourceviews1_beta2/src/cmn.rs b/gen/resourceviews1_beta2/src/cmn.rs index 87b91a8986..c69621da55 100644 --- a/gen/resourceviews1_beta2/src/cmn.rs +++ b/gen/resourceviews1_beta2/src/cmn.rs @@ -12,7 +12,7 @@ use mime::{Mime, TopLevel, SubLevel, Attr, Value}; use oauth2::{TokenType, Retry, self}; use hyper; use hyper::header::{ContentType, ContentLength, Headers, UserAgent, Authorization, Header, - HeaderFormat}; + HeaderFormat, Bearer}; use hyper::http::h1::LINE_ENDING; use hyper::method::Method; use hyper::status::StatusCode; @@ -634,7 +634,7 @@ pub struct ResumableUploadHelper<'a, A: 'a> { pub start_at: Option, pub auth: &'a mut A, pub user_agent: &'a str, - pub auth_header: Authorization, + pub auth_header: Authorization, pub url: &'a str, pub reader: &'a mut ReadSeek, pub media_type: Mime, diff --git a/gen/resourceviews1_beta2/src/lib.rs b/gen/resourceviews1_beta2/src/lib.rs index 4cae78da83..6774f9f0a5 100644 --- a/gen/resourceviews1_beta2/src/lib.rs +++ b/gen/resourceviews1_beta2/src/lib.rs @@ -2,7 +2,7 @@ // This file was generated automatically from 'src/mako/api/lib.rs.mako' // DO NOT EDIT ! -//! This documentation was generated from *resourceviews* crate version *0.1.12+20150708*, where *20150708* is the exact revision of the *resourceviews:v1beta2* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.12*. +//! This documentation was generated from *resourceviews* crate version *0.1.13+20150708*, where *20150708* is the exact revision of the *resourceviews:v1beta2* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.13*. //! //! Everything else about the *resourceviews* *v1_beta2* API can be found at the //! [official documentation site](https://developers.google.com/compute/). diff --git a/gen/resourceviews1_beta2/src/lib.rs.in b/gen/resourceviews1_beta2/src/lib.rs.in index c5cbdb2dcf..d8e3e5ae71 100644 --- a/gen/resourceviews1_beta2/src/lib.rs.in +++ b/gen/resourceviews1_beta2/src/lib.rs.in @@ -153,7 +153,7 @@ impl<'a, C, A> Resourceviews Resourceviews { client: RefCell::new(client), auth: RefCell::new(authenticator), - _user_agent: "google-api-rust-client/0.1.12".to_string(), + _user_agent: "google-api-rust-client/0.1.13".to_string(), } } @@ -165,7 +165,7 @@ impl<'a, C, A> Resourceviews } /// Set the user-agent header field to use in all requests to the server. - /// It defaults to `google-api-rust-client/0.1.12`. + /// It defaults to `google-api-rust-client/0.1.13`. /// /// Returns the previously set user-agent. pub fn user_agent(&mut self, agent_name: String) -> String { @@ -961,7 +961,7 @@ impl<'a, C, A> ZoneViewRemoveResourceCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, Operation)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -1043,8 +1043,7 @@ impl<'a, C, A> ZoneViewRemoveResourceCall<'a, C, A> where C: BorrowMut ZoneViewAddResourceCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, Operation)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -1334,8 +1333,7 @@ impl<'a, C, A> ZoneViewAddResourceCall<'a, C, A> where C: BorrowMut ZoneViewListResourceCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, ZoneViewsListResourcesResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -1632,8 +1630,7 @@ impl<'a, C, A> ZoneViewListResourceCall<'a, C, A> where C: BorrowMut ZoneViewGetCall<'a, C, A> where C: BorrowMut, A: o /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, ResourceView)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -1927,8 +1924,7 @@ impl<'a, C, A> ZoneViewGetCall<'a, C, A> where C: BorrowMut, A: o } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -2119,7 +2115,7 @@ impl<'a, C, A> ZoneViewListCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, ZoneViewsList)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -2195,8 +2191,7 @@ impl<'a, C, A> ZoneViewListCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -2394,7 +2389,7 @@ impl<'a, C, A> ZoneViewInsertCall<'a, C, A> where C: BorrowMut, A /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Operation)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -2475,8 +2470,7 @@ impl<'a, C, A> ZoneViewInsertCall<'a, C, A> where C: BorrowMut, A } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -2667,7 +2661,7 @@ impl<'a, C, A> ZoneViewDeleteCall<'a, C, A> where C: BorrowMut, A /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Operation)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -2738,8 +2732,7 @@ impl<'a, C, A> ZoneViewDeleteCall<'a, C, A> where C: BorrowMut, A } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Delete, &url) @@ -2934,7 +2927,7 @@ impl<'a, C, A> ZoneViewSetServiceCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, Operation)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -3016,8 +3009,7 @@ impl<'a, C, A> ZoneViewSetServiceCall<'a, C, A> where C: BorrowMut ZoneViewGetServiceCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, ZoneViewsGetServiceResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -3294,8 +3286,7 @@ impl<'a, C, A> ZoneViewGetServiceCall<'a, C, A> where C: BorrowMut ZoneOperationGetCall<'a, C, A> where C: BorrowMut, /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Operation)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -3561,8 +3552,7 @@ impl<'a, C, A> ZoneOperationGetCall<'a, C, A> where C: BorrowMut, } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -3755,7 +3745,7 @@ impl<'a, C, A> ZoneOperationListCall<'a, C, A> where C: BorrowMut /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, OperationList)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -3834,8 +3824,7 @@ impl<'a, C, A> ZoneOperationListCall<'a, C, A> where C: BorrowMut } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) diff --git a/gen/script1-cli/Cargo.toml b/gen/script1-cli/Cargo.toml index 9889b96f60..49e6142993 100644 --- a/gen/script1-cli/Cargo.toml +++ b/gen/script1-cli/Cargo.toml @@ -4,7 +4,7 @@ [package] name = "google-script1-cli" -version = "0.3.3+20150922" +version = "0.3.4+20150922" authors = ["Sebastian Thiel "] description = "A complete library to interact with script (protocol v1)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/script1-cli" @@ -17,18 +17,18 @@ keywords = ["script", "google", "cli"] name = "script1" [dependencies] -hyper = "0.7" -mime = "0.1.0" -serde = ">= 0.7.0" -serde_json = ">= 0.7.0" -yup-oauth2 = ">= 0.5.4" +hyper = "0.8" +mime = "0.2.0" +serde = "0.6.0" +serde_json = "0.6.0" +yup-oauth2 = ">= 0.5.6" strsim = "0.4" yup-hyper-mock = "1.0" clap = "2.0" [build-dependencies] -syntex = { version = ">= 0.23" } -serde_codegen = { version = ">= 0.6" } +syntex = { version = "= 0.28" } +serde_codegen = { version = "= 0.6.13" } [dependencies.google-script1] diff --git a/gen/script1-cli/README.md b/gen/script1-cli/README.md index 4703d18e15..5be1eda268 100644 --- a/gen/script1-cli/README.md +++ b/gen/script1-cli/README.md @@ -17,14 +17,14 @@ Everything else about the *script* API can be found at the You can download the pre-compiled 64bit binaries for the following platforms: -* ![icon](http://megaicons.net/static/img/icons_sizes/6/140/16/ubuntu-icon.png) [ubuntu](http://dl.byronimo.de/google.rs/cli/0.3.3/ubuntu/script1.tar.gz) -* ![icon](http://hydra-media.cursecdn.com/wow.gamepedia.com/a/a2/Apple-icon-16x16.png?version=25ddd67ac3dd3b634478e3978b76cb74) [osx](http://dl.byronimo.de/google.rs/cli/0.3.3/osx/script1.tar.gz) +* ![icon](http://megaicons.net/static/img/icons_sizes/6/140/16/ubuntu-icon.png) [ubuntu](http://dl.byronimo.de/google.rs/cli/0.3.4/ubuntu/script1.tar.gz) +* ![icon](http://hydra-media.cursecdn.com/wow.gamepedia.com/a/a2/Apple-icon-16x16.png?version=25ddd67ac3dd3b634478e3978b76cb74) [osx](http://dl.byronimo.de/google.rs/cli/0.3.4/osx/script1.tar.gz) Find the source code [on github](https://github.com/Byron/google-apis-rs/tree/master/gen/script1-cli). # Usage -This documentation was generated from the *script* API at revision *20150922*. The CLI is at version *0.3.3*. +This documentation was generated from the *script* API at revision *20150922*. The CLI is at version *0.3.4*. ```bash script1 [options] diff --git a/gen/script1-cli/mkdocs.yml b/gen/script1-cli/mkdocs.yml index e709860681..7a58cf9376 100644 --- a/gen/script1-cli/mkdocs.yml +++ b/gen/script1-cli/mkdocs.yml @@ -1,4 +1,4 @@ -site_name: script v0.3.3+20150922 +site_name: script v0.3.4+20150922 site_url: http://byron.github.io/google-apis-rs/google-script1-cli site_description: Write integrating applications with bcore diff --git a/gen/script1-cli/src/cmn.rs b/gen/script1-cli/src/cmn.rs index 188159ee80..ae86fdef65 100644 --- a/gen/script1-cli/src/cmn.rs +++ b/gen/script1-cli/src/cmn.rs @@ -414,7 +414,7 @@ impl TokenStorage for JsonTokenStorage { Err(err) => match err.kind() { io::ErrorKind::NotFound => Ok(()), - _ => Err(json::Error::Io(err)) + _ => Err(json::Error::IoError(err)) }, Ok(_) => Ok(()), } @@ -427,7 +427,7 @@ impl TokenStorage for JsonTokenStorage { Err(serde_err) => Err(serde_err), } }, - Err(io_err) => Err(json::Error::Io(io_err)) + Err(io_err) => Err(json::Error::IoError(io_err)) } } } @@ -444,7 +444,7 @@ impl TokenStorage for JsonTokenStorage { Err(io_err) => { match io_err.kind() { io::ErrorKind::NotFound => Ok(None), - _ => Err(json::Error::Io(io_err)) + _ => Err(json::Error::IoError(io_err)) } } } @@ -683,7 +683,7 @@ pub fn application_secret_from_directory(dir: &str, = json::from_str(json_console_secret).unwrap(); match json::to_writer_pretty(&mut f, &console_secret) { Err(serde_err) => match serde_err { - json::Error::Io(err) => err, + json::Error::IoError(err) => err, _ => panic!("Unexpected serde error: {:#?}", serde_err) }, Ok(_) => continue, @@ -696,7 +696,7 @@ pub fn application_secret_from_directory(dir: &str, }, Ok(f) => { match json::de::from_reader::<_, ConsoleApplicationSecret>(f) { - Err(json::Error::Io(err)) => + Err(json::Error::IoError(err)) => return secret_io_error(err), Err(json_err) => return Err(CLIError::Configuration( diff --git a/gen/script1-cli/src/main.rs b/gen/script1-cli/src/main.rs index 258818c5ce..9ae1826f66 100644 --- a/gen/script1-cli/src/main.rs +++ b/gen/script1-cli/src/main.rs @@ -269,7 +269,7 @@ fn main() { let mut app = App::new("script1") .author("Sebastian Thiel ") - .version("0.3.3+20150922") + .version("0.3.4+20150922") .about("An API for executing Google Apps Script projects.") .after_help("All documentation details can be found at http://byron.github.io/google-apis-rs/google_script1_cli") .arg(Arg::with_name("url") diff --git a/gen/script1/Cargo.toml b/gen/script1/Cargo.toml index 15ebf03696..26bfcd76d8 100644 --- a/gen/script1/Cargo.toml +++ b/gen/script1/Cargo.toml @@ -4,7 +4,7 @@ [package] name = "google-script1" -version = "0.1.12+20150922" +version = "0.1.13+20150922" authors = ["Sebastian Thiel "] description = "A complete library to interact with script (protocol v1)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/script1" @@ -16,14 +16,14 @@ build = "src/build.rs" [dependencies] -hyper = "0.7" -mime = "0.1.0" -serde = ">= 0.7.0" -serde_json = ">= 0.7.0" -yup-oauth2 = ">= 0.5.4" +hyper = "0.8" +mime = "0.2.0" +serde = "0.6.0" +serde_json = "0.6.0" +yup-oauth2 = ">= 0.5.6" url = ">= 0.5" [build-dependencies] -syntex = { version = ">= 0.23" } -serde_codegen = { version = ">= 0.6" } +syntex = { version = "= 0.28" } +serde_codegen = { version = "= 0.6.13" } diff --git a/gen/script1/README.md b/gen/script1/README.md index 5ed97e2672..6cda5475e3 100644 --- a/gen/script1/README.md +++ b/gen/script1/README.md @@ -5,7 +5,7 @@ DO NOT EDIT ! --> The `google-script1` library allows access to all features of the *Google script* service. -This documentation was generated from *script* crate version *0.1.12+20150922*, where *20150922* is the exact revision of the *script:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.12*. +This documentation was generated from *script* crate version *0.1.13+20150922*, where *20150922* is the exact revision of the *script:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.13*. Everything else about the *script* *v1* API can be found at the [official documentation site](https://developers.google.com/apps-script/execution/rest/v1/run). diff --git a/gen/script1/src/cmn.rs b/gen/script1/src/cmn.rs index 87b91a8986..c69621da55 100644 --- a/gen/script1/src/cmn.rs +++ b/gen/script1/src/cmn.rs @@ -12,7 +12,7 @@ use mime::{Mime, TopLevel, SubLevel, Attr, Value}; use oauth2::{TokenType, Retry, self}; use hyper; use hyper::header::{ContentType, ContentLength, Headers, UserAgent, Authorization, Header, - HeaderFormat}; + HeaderFormat, Bearer}; use hyper::http::h1::LINE_ENDING; use hyper::method::Method; use hyper::status::StatusCode; @@ -634,7 +634,7 @@ pub struct ResumableUploadHelper<'a, A: 'a> { pub start_at: Option, pub auth: &'a mut A, pub user_agent: &'a str, - pub auth_header: Authorization, + pub auth_header: Authorization, pub url: &'a str, pub reader: &'a mut ReadSeek, pub media_type: Mime, diff --git a/gen/script1/src/lib.rs b/gen/script1/src/lib.rs index 7bf191ae42..9b51981279 100644 --- a/gen/script1/src/lib.rs +++ b/gen/script1/src/lib.rs @@ -2,7 +2,7 @@ // This file was generated automatically from 'src/mako/api/lib.rs.mako' // DO NOT EDIT ! -//! This documentation was generated from *script* crate version *0.1.12+20150922*, where *20150922* is the exact revision of the *script:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.12*. +//! This documentation was generated from *script* crate version *0.1.13+20150922*, where *20150922* is the exact revision of the *script:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.13*. //! //! Everything else about the *script* *v1* API can be found at the //! [official documentation site](https://developers.google.com/apps-script/execution/rest/v1/run). diff --git a/gen/script1/src/lib.rs.in b/gen/script1/src/lib.rs.in index 99d6a3c140..2592e0cd6f 100644 --- a/gen/script1/src/lib.rs.in +++ b/gen/script1/src/lib.rs.in @@ -169,7 +169,7 @@ impl<'a, C, A> Script Script { client: RefCell::new(client), auth: RefCell::new(authenticator), - _user_agent: "google-api-rust-client/0.1.12".to_string(), + _user_agent: "google-api-rust-client/0.1.13".to_string(), } } @@ -178,7 +178,7 @@ impl<'a, C, A> Script } /// Set the user-agent header field to use in all requests to the server. - /// It defaults to `google-api-rust-client/0.1.12`. + /// It defaults to `google-api-rust-client/0.1.13`. /// /// Returns the previously set user-agent. pub fn user_agent(&mut self, agent_name: String) -> String { @@ -392,7 +392,7 @@ impl<'a, C, A> ScriptRunCall<'a, C, A> where C: BorrowMut, A: oau /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Operation)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -472,8 +472,7 @@ impl<'a, C, A> ScriptRunCall<'a, C, A> where C: BorrowMut, A: oau } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); diff --git a/gen/serviceregistryalpha-cli/Cargo.toml b/gen/serviceregistryalpha-cli/Cargo.toml index cbe9f565c8..fcaf4fd05a 100644 --- a/gen/serviceregistryalpha-cli/Cargo.toml +++ b/gen/serviceregistryalpha-cli/Cargo.toml @@ -4,7 +4,7 @@ [package] name = "google-serviceregistryalpha-cli" -version = "0.3.3+20160225" +version = "0.3.4+20160401" authors = ["Sebastian Thiel "] description = "A complete library to interact with Service Registry (protocol alpha)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/serviceregistryalpha-cli" @@ -17,18 +17,18 @@ keywords = ["serviceregistry", "google", "cli"] name = "serviceregistryalpha" [dependencies] -hyper = "0.7" -mime = "0.1.0" -serde = ">= 0.7.0" -serde_json = ">= 0.7.0" -yup-oauth2 = ">= 0.5.4" +hyper = "0.8" +mime = "0.2.0" +serde = "0.6.0" +serde_json = "0.6.0" +yup-oauth2 = ">= 0.5.6" strsim = "0.4" yup-hyper-mock = "1.0" clap = "2.0" [build-dependencies] -syntex = { version = ">= 0.23" } -serde_codegen = { version = ">= 0.6" } +syntex = { version = "= 0.28" } +serde_codegen = { version = "= 0.6.13" } [dependencies.google-serviceregistryalpha] diff --git a/gen/serviceregistryalpha-cli/README.md b/gen/serviceregistryalpha-cli/README.md index 4142983e14..0ed99342b3 100644 --- a/gen/serviceregistryalpha-cli/README.md +++ b/gen/serviceregistryalpha-cli/README.md @@ -17,14 +17,14 @@ Everything else about the *Service Registry* API can be found at the You can download the pre-compiled 64bit binaries for the following platforms: -* ![icon](http://megaicons.net/static/img/icons_sizes/6/140/16/ubuntu-icon.png) [ubuntu](http://dl.byronimo.de/google.rs/cli/0.3.3/ubuntu/serviceregistryalpha.tar.gz) -* ![icon](http://hydra-media.cursecdn.com/wow.gamepedia.com/a/a2/Apple-icon-16x16.png?version=25ddd67ac3dd3b634478e3978b76cb74) [osx](http://dl.byronimo.de/google.rs/cli/0.3.3/osx/serviceregistryalpha.tar.gz) +* ![icon](http://megaicons.net/static/img/icons_sizes/6/140/16/ubuntu-icon.png) [ubuntu](http://dl.byronimo.de/google.rs/cli/0.3.4/ubuntu/serviceregistryalpha.tar.gz) +* ![icon](http://hydra-media.cursecdn.com/wow.gamepedia.com/a/a2/Apple-icon-16x16.png?version=25ddd67ac3dd3b634478e3978b76cb74) [osx](http://dl.byronimo.de/google.rs/cli/0.3.4/osx/serviceregistryalpha.tar.gz) Find the source code [on github](https://github.com/Byron/google-apis-rs/tree/master/gen/serviceregistryalpha-cli). # Usage -This documentation was generated from the *Service Registry* API at revision *20160225*. The CLI is at version *0.3.3*. +This documentation was generated from the *Service Registry* API at revision *20160401*. The CLI is at version *0.3.4*. ```bash serviceregistryalpha [options] diff --git a/gen/serviceregistryalpha-cli/mkdocs.yml b/gen/serviceregistryalpha-cli/mkdocs.yml index e0fe7a1f28..4ee1126270 100644 --- a/gen/serviceregistryalpha-cli/mkdocs.yml +++ b/gen/serviceregistryalpha-cli/mkdocs.yml @@ -1,4 +1,4 @@ -site_name: Service Registry v0.3.3+20160225 +site_name: Service Registry v0.3.4+20160401 site_url: http://byron.github.io/google-apis-rs/google-serviceregistryalpha-cli site_description: Write integrating applications with bcore diff --git a/gen/serviceregistryalpha-cli/src/cmn.rs b/gen/serviceregistryalpha-cli/src/cmn.rs index 188159ee80..ae86fdef65 100644 --- a/gen/serviceregistryalpha-cli/src/cmn.rs +++ b/gen/serviceregistryalpha-cli/src/cmn.rs @@ -414,7 +414,7 @@ impl TokenStorage for JsonTokenStorage { Err(err) => match err.kind() { io::ErrorKind::NotFound => Ok(()), - _ => Err(json::Error::Io(err)) + _ => Err(json::Error::IoError(err)) }, Ok(_) => Ok(()), } @@ -427,7 +427,7 @@ impl TokenStorage for JsonTokenStorage { Err(serde_err) => Err(serde_err), } }, - Err(io_err) => Err(json::Error::Io(io_err)) + Err(io_err) => Err(json::Error::IoError(io_err)) } } } @@ -444,7 +444,7 @@ impl TokenStorage for JsonTokenStorage { Err(io_err) => { match io_err.kind() { io::ErrorKind::NotFound => Ok(None), - _ => Err(json::Error::Io(io_err)) + _ => Err(json::Error::IoError(io_err)) } } } @@ -683,7 +683,7 @@ pub fn application_secret_from_directory(dir: &str, = json::from_str(json_console_secret).unwrap(); match json::to_writer_pretty(&mut f, &console_secret) { Err(serde_err) => match serde_err { - json::Error::Io(err) => err, + json::Error::IoError(err) => err, _ => panic!("Unexpected serde error: {:#?}", serde_err) }, Ok(_) => continue, @@ -696,7 +696,7 @@ pub fn application_secret_from_directory(dir: &str, }, Ok(f) => { match json::de::from_reader::<_, ConsoleApplicationSecret>(f) { - Err(json::Error::Io(err)) => + Err(json::Error::IoError(err)) => return secret_io_error(err), Err(json_err) => return Err(CLIError::Configuration( diff --git a/gen/serviceregistryalpha-cli/src/main.rs b/gen/serviceregistryalpha-cli/src/main.rs index 02baebe2b7..1e0c48da7e 100644 --- a/gen/serviceregistryalpha-cli/src/main.rs +++ b/gen/serviceregistryalpha-cli/src/main.rs @@ -974,8 +974,8 @@ fn main() { let mut app = App::new("serviceregistryalpha") .author("Sebastian Thiel ") - .version("0.3.3+20160225") - .about("The Service Registry API allows users to manage service endpoints in Service Registry and use DNS-based service discovery / name resolution.") + .version("0.3.4+20160401") + .about("Manages service endpoints in Service Registry and provides integration with DNS for service discovery and name resolution.") .after_help("All documentation details can be found at http://byron.github.io/google-apis-rs/google_serviceregistryalpha_cli") .arg(Arg::with_name("url") .long("scope") diff --git a/gen/serviceregistryalpha/Cargo.toml b/gen/serviceregistryalpha/Cargo.toml index 9d3d4eb05c..19a7cf277b 100644 --- a/gen/serviceregistryalpha/Cargo.toml +++ b/gen/serviceregistryalpha/Cargo.toml @@ -4,7 +4,7 @@ [package] name = "google-serviceregistryalpha" -version = "0.1.12+20160225" +version = "0.1.13+20160401" authors = ["Sebastian Thiel "] description = "A complete library to interact with Service Registry (protocol alpha)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/serviceregistryalpha" @@ -16,14 +16,14 @@ build = "src/build.rs" [dependencies] -hyper = "0.7" -mime = "0.1.0" -serde = ">= 0.7.0" -serde_json = ">= 0.7.0" -yup-oauth2 = ">= 0.5.4" +hyper = "0.8" +mime = "0.2.0" +serde = "0.6.0" +serde_json = "0.6.0" +yup-oauth2 = ">= 0.5.6" url = ">= 0.5" [build-dependencies] -syntex = { version = ">= 0.23" } -serde_codegen = { version = ">= 0.6" } +syntex = { version = "= 0.28" } +serde_codegen = { version = "= 0.6.13" } diff --git a/gen/serviceregistryalpha/README.md b/gen/serviceregistryalpha/README.md index c0eb805a46..a673c55d78 100644 --- a/gen/serviceregistryalpha/README.md +++ b/gen/serviceregistryalpha/README.md @@ -5,7 +5,7 @@ DO NOT EDIT ! --> The `google-serviceregistryalpha` library allows access to all features of the *Google Service Registry* service. -This documentation was generated from *Service Registry* crate version *0.1.12+20160225*, where *20160225* is the exact revision of the *serviceregistry:alpha* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.12*. +This documentation was generated from *Service Registry* crate version *0.1.13+20160401*, where *20160401* is the exact revision of the *serviceregistry:alpha* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.13*. Everything else about the *Service Registry* *alpha* API can be found at the [official documentation site](https://developers.google.com/cloud-serviceregistry/). diff --git a/gen/serviceregistryalpha/src/cmn.rs b/gen/serviceregistryalpha/src/cmn.rs index 87b91a8986..c69621da55 100644 --- a/gen/serviceregistryalpha/src/cmn.rs +++ b/gen/serviceregistryalpha/src/cmn.rs @@ -12,7 +12,7 @@ use mime::{Mime, TopLevel, SubLevel, Attr, Value}; use oauth2::{TokenType, Retry, self}; use hyper; use hyper::header::{ContentType, ContentLength, Headers, UserAgent, Authorization, Header, - HeaderFormat}; + HeaderFormat, Bearer}; use hyper::http::h1::LINE_ENDING; use hyper::method::Method; use hyper::status::StatusCode; @@ -634,7 +634,7 @@ pub struct ResumableUploadHelper<'a, A: 'a> { pub start_at: Option, pub auth: &'a mut A, pub user_agent: &'a str, - pub auth_header: Authorization, + pub auth_header: Authorization, pub url: &'a str, pub reader: &'a mut ReadSeek, pub media_type: Mime, diff --git a/gen/serviceregistryalpha/src/lib.rs b/gen/serviceregistryalpha/src/lib.rs index 4e84b8b78d..ad96e2140a 100644 --- a/gen/serviceregistryalpha/src/lib.rs +++ b/gen/serviceregistryalpha/src/lib.rs @@ -2,7 +2,7 @@ // This file was generated automatically from 'src/mako/api/lib.rs.mako' // DO NOT EDIT ! -//! This documentation was generated from *Service Registry* crate version *0.1.12+20160225*, where *20160225* is the exact revision of the *serviceregistry:alpha* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.12*. +//! This documentation was generated from *Service Registry* crate version *0.1.13+20160401*, where *20160401* is the exact revision of the *serviceregistry:alpha* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.13*. //! //! Everything else about the *Service Registry* *alpha* API can be found at the //! [official documentation site](https://developers.google.com/cloud-serviceregistry/). diff --git a/gen/serviceregistryalpha/src/lib.rs.in b/gen/serviceregistryalpha/src/lib.rs.in index e0a51fb6c7..bb30b1d2fd 100644 --- a/gen/serviceregistryalpha/src/lib.rs.in +++ b/gen/serviceregistryalpha/src/lib.rs.in @@ -143,7 +143,7 @@ impl<'a, C, A> ServiceRegistry ServiceRegistry { client: RefCell::new(client), auth: RefCell::new(authenticator), - _user_agent: "google-api-rust-client/0.1.12".to_string(), + _user_agent: "google-api-rust-client/0.1.13".to_string(), } } @@ -155,7 +155,7 @@ impl<'a, C, A> ServiceRegistry } /// Set the user-agent header field to use in all requests to the server. - /// It defaults to `google-api-rust-client/0.1.12`. + /// It defaults to `google-api-rust-client/0.1.13`. /// /// Returns the previously set user-agent. pub fn user_agent(&mut self, agent_name: String) -> String { @@ -210,7 +210,7 @@ pub struct Endpoint { pub description: Option, /// A user-provided address of the service represented by this endpoint. This can be an IPv4 or IPv6 address, or a hostname. pub address: Option, - /// The visibility of this endpoint. This must be a list of fully-qualified URLs to Compute Engine networks. + /// The DNS Integration configuration for this endpoint. This must be a list of fully-qualified URLs to Compute Engine networks. pub visibility: Option, /// [Output Only] Unique identifier for the resource; defined by the server. pub id: Option, @@ -377,7 +377,7 @@ pub struct Operation { pub creation_timestamp: Option, /// [Output Only] The unique identifier for the resource. This identifier is defined by the server. pub id: Option, - /// [Output Only] Type of the resource. Always compute#operation for operation resources. + /// [Output Only] Type of the resource. Always compute#operation for Operation resources. pub kind: Option, /// [Output Only] Name of the resource. pub name: Option, @@ -719,7 +719,7 @@ impl<'a, C, A> OperationGetCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Operation)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -789,8 +789,7 @@ impl<'a, C, A> OperationGetCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -974,7 +973,7 @@ impl<'a, C, A> OperationListCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, OperationsListResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -1055,8 +1054,7 @@ impl<'a, C, A> OperationListCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -1153,7 +1151,7 @@ impl<'a, C, A> OperationListCall<'a, C, A> where C: BorrowMut, A: /// /// For example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance. /// - /// Compute Engine Beta API Only: If you use filtering in the Beta API, you can also filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. In particular, use filtering on nested fields to take advantage of instance labels to organize and filter results based on label values. + /// Compute Engine Beta API Only: When filtering in the Beta API, you can also filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values. /// /// The Beta API also supports filtering on multiple expressions by providing each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters. /// @@ -1269,7 +1267,7 @@ impl<'a, C, A> EndpointInsertCall<'a, C, A> where C: BorrowMut, A /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Operation)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -1349,8 +1347,7 @@ impl<'a, C, A> EndpointInsertCall<'a, C, A> where C: BorrowMut, A } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -1530,7 +1527,7 @@ impl<'a, C, A> EndpointDeleteCall<'a, C, A> where C: BorrowMut, A /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Operation)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -1600,8 +1597,7 @@ impl<'a, C, A> EndpointDeleteCall<'a, C, A> where C: BorrowMut, A } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Delete, &url) @@ -1785,7 +1781,7 @@ impl<'a, C, A> EndpointUpdateCall<'a, C, A> where C: BorrowMut, A /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Operation)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -1866,8 +1862,7 @@ impl<'a, C, A> EndpointUpdateCall<'a, C, A> where C: BorrowMut, A } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -2064,7 +2059,7 @@ impl<'a, C, A> EndpointPatchCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Operation)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -2145,8 +2140,7 @@ impl<'a, C, A> EndpointPatchCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -2343,7 +2337,7 @@ impl<'a, C, A> EndpointListCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, EndpointsListResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -2424,8 +2418,7 @@ impl<'a, C, A> EndpointListCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -2522,7 +2515,7 @@ impl<'a, C, A> EndpointListCall<'a, C, A> where C: BorrowMut, A: /// /// For example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance. /// - /// Compute Engine Beta API Only: If you use filtering in the Beta API, you can also filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. In particular, use filtering on nested fields to take advantage of instance labels to organize and filter results based on label values. + /// Compute Engine Beta API Only: When filtering in the Beta API, you can also filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values. /// /// The Beta API also supports filtering on multiple expressions by providing each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters. /// @@ -2632,7 +2625,7 @@ impl<'a, C, A> EndpointGetCall<'a, C, A> where C: BorrowMut, A: o /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Endpoint)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -2702,8 +2695,7 @@ impl<'a, C, A> EndpointGetCall<'a, C, A> where C: BorrowMut, A: o } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) diff --git a/gen/siteverification1-cli/Cargo.toml b/gen/siteverification1-cli/Cargo.toml index 24d05ad0d8..109aa5d27b 100644 --- a/gen/siteverification1-cli/Cargo.toml +++ b/gen/siteverification1-cli/Cargo.toml @@ -4,7 +4,7 @@ [package] name = "google-siteverification1-cli" -version = "0.3.3+20151007" +version = "0.3.4+20160228" authors = ["Sebastian Thiel "] description = "A complete library to interact with siteVerification (protocol v1)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/siteverification1-cli" @@ -17,18 +17,18 @@ keywords = ["siteVerification", "google", "cli"] name = "siteverification1" [dependencies] -hyper = "0.7" -mime = "0.1.0" -serde = ">= 0.7.0" -serde_json = ">= 0.7.0" -yup-oauth2 = ">= 0.5.4" +hyper = "0.8" +mime = "0.2.0" +serde = "0.6.0" +serde_json = "0.6.0" +yup-oauth2 = ">= 0.5.6" strsim = "0.4" yup-hyper-mock = "1.0" clap = "2.0" [build-dependencies] -syntex = { version = ">= 0.23" } -serde_codegen = { version = ">= 0.6" } +syntex = { version = "= 0.28" } +serde_codegen = { version = "= 0.6.13" } [dependencies.google-siteverification1] diff --git a/gen/siteverification1-cli/README.md b/gen/siteverification1-cli/README.md index 2eb34c8839..57eb15ec45 100644 --- a/gen/siteverification1-cli/README.md +++ b/gen/siteverification1-cli/README.md @@ -17,14 +17,14 @@ Everything else about the *siteVerification* API can be found at the You can download the pre-compiled 64bit binaries for the following platforms: -* ![icon](http://megaicons.net/static/img/icons_sizes/6/140/16/ubuntu-icon.png) [ubuntu](http://dl.byronimo.de/google.rs/cli/0.3.3/ubuntu/siteverification1.tar.gz) -* ![icon](http://hydra-media.cursecdn.com/wow.gamepedia.com/a/a2/Apple-icon-16x16.png?version=25ddd67ac3dd3b634478e3978b76cb74) [osx](http://dl.byronimo.de/google.rs/cli/0.3.3/osx/siteverification1.tar.gz) +* ![icon](http://megaicons.net/static/img/icons_sizes/6/140/16/ubuntu-icon.png) [ubuntu](http://dl.byronimo.de/google.rs/cli/0.3.4/ubuntu/siteverification1.tar.gz) +* ![icon](http://hydra-media.cursecdn.com/wow.gamepedia.com/a/a2/Apple-icon-16x16.png?version=25ddd67ac3dd3b634478e3978b76cb74) [osx](http://dl.byronimo.de/google.rs/cli/0.3.4/osx/siteverification1.tar.gz) Find the source code [on github](https://github.com/Byron/google-apis-rs/tree/master/gen/siteverification1-cli). # Usage -This documentation was generated from the *siteVerification* API at revision *20151007*. The CLI is at version *0.3.3*. +This documentation was generated from the *siteVerification* API at revision *20160228*. The CLI is at version *0.3.4*. ```bash siteverification1 [options] diff --git a/gen/siteverification1-cli/mkdocs.yml b/gen/siteverification1-cli/mkdocs.yml index ff142314ba..74edcfe9d3 100644 --- a/gen/siteverification1-cli/mkdocs.yml +++ b/gen/siteverification1-cli/mkdocs.yml @@ -1,4 +1,4 @@ -site_name: siteVerification v0.3.3+20151007 +site_name: siteVerification v0.3.4+20160228 site_url: http://byron.github.io/google-apis-rs/google-siteverification1-cli site_description: Write integrating applications with bcore diff --git a/gen/siteverification1-cli/src/cmn.rs b/gen/siteverification1-cli/src/cmn.rs index 188159ee80..ae86fdef65 100644 --- a/gen/siteverification1-cli/src/cmn.rs +++ b/gen/siteverification1-cli/src/cmn.rs @@ -414,7 +414,7 @@ impl TokenStorage for JsonTokenStorage { Err(err) => match err.kind() { io::ErrorKind::NotFound => Ok(()), - _ => Err(json::Error::Io(err)) + _ => Err(json::Error::IoError(err)) }, Ok(_) => Ok(()), } @@ -427,7 +427,7 @@ impl TokenStorage for JsonTokenStorage { Err(serde_err) => Err(serde_err), } }, - Err(io_err) => Err(json::Error::Io(io_err)) + Err(io_err) => Err(json::Error::IoError(io_err)) } } } @@ -444,7 +444,7 @@ impl TokenStorage for JsonTokenStorage { Err(io_err) => { match io_err.kind() { io::ErrorKind::NotFound => Ok(None), - _ => Err(json::Error::Io(io_err)) + _ => Err(json::Error::IoError(io_err)) } } } @@ -683,7 +683,7 @@ pub fn application_secret_from_directory(dir: &str, = json::from_str(json_console_secret).unwrap(); match json::to_writer_pretty(&mut f, &console_secret) { Err(serde_err) => match serde_err { - json::Error::Io(err) => err, + json::Error::IoError(err) => err, _ => panic!("Unexpected serde error: {:#?}", serde_err) }, Ok(_) => continue, @@ -696,7 +696,7 @@ pub fn application_secret_from_directory(dir: &str, }, Ok(f) => { match json::de::from_reader::<_, ConsoleApplicationSecret>(f) { - Err(json::Error::Io(err)) => + Err(json::Error::IoError(err)) => return secret_io_error(err), Err(json_err) => return Err(CLIError::Configuration( diff --git a/gen/siteverification1-cli/src/main.rs b/gen/siteverification1-cli/src/main.rs index 73cf8b82f0..34699a183f 100644 --- a/gen/siteverification1-cli/src/main.rs +++ b/gen/siteverification1-cli/src/main.rs @@ -827,8 +827,8 @@ fn main() { let mut app = App::new("siteverification1") .author("Sebastian Thiel ") - .version("0.3.3+20151007") - .about("Lets you programatically verify ownership of websites or domains with Google.") + .version("0.3.4+20160228") + .about("Verifies ownership of websites or domains with Google.") .after_help("All documentation details can be found at http://byron.github.io/google-apis-rs/google_siteverification1_cli") .arg(Arg::with_name("url") .long("scope") diff --git a/gen/siteverification1/Cargo.toml b/gen/siteverification1/Cargo.toml index 1333fa25a4..1ad7789bf9 100644 --- a/gen/siteverification1/Cargo.toml +++ b/gen/siteverification1/Cargo.toml @@ -4,7 +4,7 @@ [package] name = "google-siteverification1" -version = "0.1.12+20151007" +version = "0.1.13+20160228" authors = ["Sebastian Thiel "] description = "A complete library to interact with siteVerification (protocol v1)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/siteverification1" @@ -16,14 +16,14 @@ build = "src/build.rs" [dependencies] -hyper = "0.7" -mime = "0.1.0" -serde = ">= 0.7.0" -serde_json = ">= 0.7.0" -yup-oauth2 = ">= 0.5.4" +hyper = "0.8" +mime = "0.2.0" +serde = "0.6.0" +serde_json = "0.6.0" +yup-oauth2 = ">= 0.5.6" url = ">= 0.5" [build-dependencies] -syntex = { version = ">= 0.23" } -serde_codegen = { version = ">= 0.6" } +syntex = { version = "= 0.28" } +serde_codegen = { version = "= 0.6.13" } diff --git a/gen/siteverification1/README.md b/gen/siteverification1/README.md index adf07c363a..7b40badef8 100644 --- a/gen/siteverification1/README.md +++ b/gen/siteverification1/README.md @@ -5,7 +5,7 @@ DO NOT EDIT ! --> The `google-siteverification1` library allows access to all features of the *Google siteVerification* service. -This documentation was generated from *siteVerification* crate version *0.1.12+20151007*, where *20151007* is the exact revision of the *siteVerification:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.12*. +This documentation was generated from *siteVerification* crate version *0.1.13+20160228*, where *20160228* is the exact revision of the *siteVerification:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.13*. Everything else about the *siteVerification* *v1* API can be found at the [official documentation site](https://developers.google.com/site-verification/). diff --git a/gen/siteverification1/src/cmn.rs b/gen/siteverification1/src/cmn.rs index 87b91a8986..c69621da55 100644 --- a/gen/siteverification1/src/cmn.rs +++ b/gen/siteverification1/src/cmn.rs @@ -12,7 +12,7 @@ use mime::{Mime, TopLevel, SubLevel, Attr, Value}; use oauth2::{TokenType, Retry, self}; use hyper; use hyper::header::{ContentType, ContentLength, Headers, UserAgent, Authorization, Header, - HeaderFormat}; + HeaderFormat, Bearer}; use hyper::http::h1::LINE_ENDING; use hyper::method::Method; use hyper::status::StatusCode; @@ -634,7 +634,7 @@ pub struct ResumableUploadHelper<'a, A: 'a> { pub start_at: Option, pub auth: &'a mut A, pub user_agent: &'a str, - pub auth_header: Authorization, + pub auth_header: Authorization, pub url: &'a str, pub reader: &'a mut ReadSeek, pub media_type: Mime, diff --git a/gen/siteverification1/src/lib.rs b/gen/siteverification1/src/lib.rs index a55c4e154d..6569e207e9 100644 --- a/gen/siteverification1/src/lib.rs +++ b/gen/siteverification1/src/lib.rs @@ -2,7 +2,7 @@ // This file was generated automatically from 'src/mako/api/lib.rs.mako' // DO NOT EDIT ! -//! This documentation was generated from *siteVerification* crate version *0.1.12+20151007*, where *20151007* is the exact revision of the *siteVerification:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.12*. +//! This documentation was generated from *siteVerification* crate version *0.1.13+20160228*, where *20160228* is the exact revision of the *siteVerification:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.13*. //! //! Everything else about the *siteVerification* *v1* API can be found at the //! [official documentation site](https://developers.google.com/site-verification/). diff --git a/gen/siteverification1/src/lib.rs.in b/gen/siteverification1/src/lib.rs.in index 54842a84e9..f0f34dfaa1 100644 --- a/gen/siteverification1/src/lib.rs.in +++ b/gen/siteverification1/src/lib.rs.in @@ -137,7 +137,7 @@ impl<'a, C, A> SiteVerification SiteVerification { client: RefCell::new(client), auth: RefCell::new(authenticator), - _user_agent: "google-api-rust-client/0.1.12".to_string(), + _user_agent: "google-api-rust-client/0.1.13".to_string(), } } @@ -146,7 +146,7 @@ impl<'a, C, A> SiteVerification } /// Set the user-agent header field to use in all requests to the server. - /// It defaults to `google-api-rust-client/0.1.12`. + /// It defaults to `google-api-rust-client/0.1.13`. /// /// Returns the previously set user-agent. pub fn user_agent(&mut self, agent_name: String) -> String { @@ -499,7 +499,7 @@ impl<'a, C, A> WebResourceGetCall<'a, C, A> where C: BorrowMut, A /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, SiteVerificationWebResourceResource)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -568,8 +568,7 @@ impl<'a, C, A> WebResourceGetCall<'a, C, A> where C: BorrowMut, A } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -742,7 +741,7 @@ impl<'a, C, A> WebResourcePatchCall<'a, C, A> where C: BorrowMut, /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, SiteVerificationWebResourceResource)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -822,8 +821,7 @@ impl<'a, C, A> WebResourcePatchCall<'a, C, A> where C: BorrowMut, } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -1001,7 +999,7 @@ impl<'a, C, A> WebResourceListCall<'a, C, A> where C: BorrowMut, /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, SiteVerificationWebResourceListResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -1048,8 +1046,7 @@ impl<'a, C, A> WebResourceListCall<'a, C, A> where C: BorrowMut, } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -1205,7 +1202,7 @@ impl<'a, C, A> WebResourceDeleteCall<'a, C, A> where C: BorrowMut /// Perform the operation you have build so far. pub fn doit(mut self) -> Result { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -1273,8 +1270,7 @@ impl<'a, C, A> WebResourceDeleteCall<'a, C, A> where C: BorrowMut } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Delete, &url) @@ -1436,7 +1432,7 @@ impl<'a, C, A> WebResourceGetTokenCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, SiteVerificationWebResourceGettokenResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -1494,8 +1490,7 @@ impl<'a, C, A> WebResourceGetTokenCall<'a, C, A> where C: BorrowMut WebResourceUpdateCall<'a, C, A> where C: BorrowMut /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, SiteVerificationWebResourceResource)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -1751,8 +1746,7 @@ impl<'a, C, A> WebResourceUpdateCall<'a, C, A> where C: BorrowMut } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -1938,7 +1932,7 @@ impl<'a, C, A> WebResourceInsertCall<'a, C, A> where C: BorrowMut /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, SiteVerificationWebResourceResource)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -1997,8 +1991,7 @@ impl<'a, C, A> WebResourceInsertCall<'a, C, A> where C: BorrowMut } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); diff --git a/gen/spectrum1_explorer-cli/Cargo.toml b/gen/spectrum1_explorer-cli/Cargo.toml index ff61aa8de0..3ce09b3999 100644 --- a/gen/spectrum1_explorer-cli/Cargo.toml +++ b/gen/spectrum1_explorer-cli/Cargo.toml @@ -4,7 +4,7 @@ [package] name = "google-spectrum1_explorer-cli" -version = "0.3.3+20160206" +version = "0.3.4+20160206" authors = ["Sebastian Thiel "] description = "A complete library to interact with spectrum (protocol v1explorer)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/spectrum1_explorer-cli" @@ -17,18 +17,18 @@ keywords = ["spectrum", "google", "cli"] name = "spectrum1-explorer" [dependencies] -hyper = "0.7" -mime = "0.1.0" -serde = ">= 0.7.0" -serde_json = ">= 0.7.0" -yup-oauth2 = ">= 0.5.4" +hyper = "0.8" +mime = "0.2.0" +serde = "0.6.0" +serde_json = "0.6.0" +yup-oauth2 = ">= 0.5.6" strsim = "0.4" yup-hyper-mock = "1.0" clap = "2.0" [build-dependencies] -syntex = { version = ">= 0.23" } -serde_codegen = { version = ">= 0.6" } +syntex = { version = "= 0.28" } +serde_codegen = { version = "= 0.6.13" } [dependencies.google-spectrum1_explorer] diff --git a/gen/spectrum1_explorer-cli/README.md b/gen/spectrum1_explorer-cli/README.md index 8dc02c306e..231629cbbd 100644 --- a/gen/spectrum1_explorer-cli/README.md +++ b/gen/spectrum1_explorer-cli/README.md @@ -17,14 +17,14 @@ Everything else about the *spectrum* API can be found at the You can download the pre-compiled 64bit binaries for the following platforms: -* ![icon](http://megaicons.net/static/img/icons_sizes/6/140/16/ubuntu-icon.png) [ubuntu](http://dl.byronimo.de/google.rs/cli/0.3.3/ubuntu/spectrum1-explorer.tar.gz) -* ![icon](http://hydra-media.cursecdn.com/wow.gamepedia.com/a/a2/Apple-icon-16x16.png?version=25ddd67ac3dd3b634478e3978b76cb74) [osx](http://dl.byronimo.de/google.rs/cli/0.3.3/osx/spectrum1-explorer.tar.gz) +* ![icon](http://megaicons.net/static/img/icons_sizes/6/140/16/ubuntu-icon.png) [ubuntu](http://dl.byronimo.de/google.rs/cli/0.3.4/ubuntu/spectrum1-explorer.tar.gz) +* ![icon](http://hydra-media.cursecdn.com/wow.gamepedia.com/a/a2/Apple-icon-16x16.png?version=25ddd67ac3dd3b634478e3978b76cb74) [osx](http://dl.byronimo.de/google.rs/cli/0.3.4/osx/spectrum1-explorer.tar.gz) Find the source code [on github](https://github.com/Byron/google-apis-rs/tree/master/gen/spectrum1_explorer-cli). # Usage -This documentation was generated from the *spectrum* API at revision *20160206*. The CLI is at version *0.3.3*. +This documentation was generated from the *spectrum* API at revision *20160206*. The CLI is at version *0.3.4*. ```bash spectrum1-explorer [options] diff --git a/gen/spectrum1_explorer-cli/mkdocs.yml b/gen/spectrum1_explorer-cli/mkdocs.yml index 8d750fba6f..34dda9fc65 100644 --- a/gen/spectrum1_explorer-cli/mkdocs.yml +++ b/gen/spectrum1_explorer-cli/mkdocs.yml @@ -1,4 +1,4 @@ -site_name: spectrum v0.3.3+20160206 +site_name: spectrum v0.3.4+20160206 site_url: http://byron.github.io/google-apis-rs/google-spectrum1_explorer-cli site_description: Write integrating applications with bcore diff --git a/gen/spectrum1_explorer-cli/src/cmn.rs b/gen/spectrum1_explorer-cli/src/cmn.rs index 188159ee80..ae86fdef65 100644 --- a/gen/spectrum1_explorer-cli/src/cmn.rs +++ b/gen/spectrum1_explorer-cli/src/cmn.rs @@ -414,7 +414,7 @@ impl TokenStorage for JsonTokenStorage { Err(err) => match err.kind() { io::ErrorKind::NotFound => Ok(()), - _ => Err(json::Error::Io(err)) + _ => Err(json::Error::IoError(err)) }, Ok(_) => Ok(()), } @@ -427,7 +427,7 @@ impl TokenStorage for JsonTokenStorage { Err(serde_err) => Err(serde_err), } }, - Err(io_err) => Err(json::Error::Io(io_err)) + Err(io_err) => Err(json::Error::IoError(io_err)) } } } @@ -444,7 +444,7 @@ impl TokenStorage for JsonTokenStorage { Err(io_err) => { match io_err.kind() { io::ErrorKind::NotFound => Ok(None), - _ => Err(json::Error::Io(io_err)) + _ => Err(json::Error::IoError(io_err)) } } } @@ -683,7 +683,7 @@ pub fn application_secret_from_directory(dir: &str, = json::from_str(json_console_secret).unwrap(); match json::to_writer_pretty(&mut f, &console_secret) { Err(serde_err) => match serde_err { - json::Error::Io(err) => err, + json::Error::IoError(err) => err, _ => panic!("Unexpected serde error: {:#?}", serde_err) }, Ok(_) => continue, @@ -696,7 +696,7 @@ pub fn application_secret_from_directory(dir: &str, }, Ok(f) => { match json::de::from_reader::<_, ConsoleApplicationSecret>(f) { - Err(json::Error::Io(err)) => + Err(json::Error::IoError(err)) => return secret_io_error(err), Err(json_err) => return Err(CLIError::Configuration( diff --git a/gen/spectrum1_explorer-cli/src/main.rs b/gen/spectrum1_explorer-cli/src/main.rs index f4a0d01149..43dbb2d629 100644 --- a/gen/spectrum1_explorer-cli/src/main.rs +++ b/gen/spectrum1_explorer-cli/src/main.rs @@ -960,7 +960,7 @@ fn main() { let mut app = App::new("spectrum1-explorer") .author("Sebastian Thiel ") - .version("0.3.3+20160206") + .version("0.3.4+20160206") .about("API for spectrum-management functions.") .after_help("All documentation details can be found at http://byron.github.io/google-apis-rs/google_spectrum1_explorer_cli") .arg(Arg::with_name("folder") diff --git a/gen/spectrum1_explorer/Cargo.toml b/gen/spectrum1_explorer/Cargo.toml index e7749349b4..4de51cdeca 100644 --- a/gen/spectrum1_explorer/Cargo.toml +++ b/gen/spectrum1_explorer/Cargo.toml @@ -4,7 +4,7 @@ [package] name = "google-spectrum1_explorer" -version = "0.1.12+20160206" +version = "0.1.13+20160206" authors = ["Sebastian Thiel "] description = "A complete library to interact with spectrum (protocol v1explorer)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/spectrum1_explorer" @@ -16,14 +16,14 @@ build = "src/build.rs" [dependencies] -hyper = "0.7" -mime = "0.1.0" -serde = ">= 0.7.0" -serde_json = ">= 0.7.0" -yup-oauth2 = ">= 0.5.4" +hyper = "0.8" +mime = "0.2.0" +serde = "0.6.0" +serde_json = "0.6.0" +yup-oauth2 = ">= 0.5.6" url = ">= 0.5" [build-dependencies] -syntex = { version = ">= 0.23" } -serde_codegen = { version = ">= 0.6" } +syntex = { version = "= 0.28" } +serde_codegen = { version = "= 0.6.13" } diff --git a/gen/spectrum1_explorer/README.md b/gen/spectrum1_explorer/README.md index 44ab3a1f24..09643c1281 100644 --- a/gen/spectrum1_explorer/README.md +++ b/gen/spectrum1_explorer/README.md @@ -5,7 +5,7 @@ DO NOT EDIT ! --> The `google-spectrum1_explorer` library allows access to all features of the *Google spectrum* service. -This documentation was generated from *spectrum* crate version *0.1.12+20160206*, where *20160206* is the exact revision of the *spectrum:v1explorer* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.12*. +This documentation was generated from *spectrum* crate version *0.1.13+20160206*, where *20160206* is the exact revision of the *spectrum:v1explorer* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.13*. Everything else about the *spectrum* *v1_explorer* API can be found at the [official documentation site](http://developers.google.com/spectrum). diff --git a/gen/spectrum1_explorer/src/cmn.rs b/gen/spectrum1_explorer/src/cmn.rs index 87b91a8986..c69621da55 100644 --- a/gen/spectrum1_explorer/src/cmn.rs +++ b/gen/spectrum1_explorer/src/cmn.rs @@ -12,7 +12,7 @@ use mime::{Mime, TopLevel, SubLevel, Attr, Value}; use oauth2::{TokenType, Retry, self}; use hyper; use hyper::header::{ContentType, ContentLength, Headers, UserAgent, Authorization, Header, - HeaderFormat}; + HeaderFormat, Bearer}; use hyper::http::h1::LINE_ENDING; use hyper::method::Method; use hyper::status::StatusCode; @@ -634,7 +634,7 @@ pub struct ResumableUploadHelper<'a, A: 'a> { pub start_at: Option, pub auth: &'a mut A, pub user_agent: &'a str, - pub auth_header: Authorization, + pub auth_header: Authorization, pub url: &'a str, pub reader: &'a mut ReadSeek, pub media_type: Mime, diff --git a/gen/spectrum1_explorer/src/lib.rs b/gen/spectrum1_explorer/src/lib.rs index 29bcd4b268..a4668f681f 100644 --- a/gen/spectrum1_explorer/src/lib.rs +++ b/gen/spectrum1_explorer/src/lib.rs @@ -2,7 +2,7 @@ // This file was generated automatically from 'src/mako/api/lib.rs.mako' // DO NOT EDIT ! -//! This documentation was generated from *spectrum* crate version *0.1.12+20160206*, where *20160206* is the exact revision of the *spectrum:v1explorer* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.12*. +//! This documentation was generated from *spectrum* crate version *0.1.13+20160206*, where *20160206* is the exact revision of the *spectrum:v1explorer* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.13*. //! //! Everything else about the *spectrum* *v1_explorer* API can be found at the //! [official documentation site](http://developers.google.com/spectrum). diff --git a/gen/spectrum1_explorer/src/lib.rs.in b/gen/spectrum1_explorer/src/lib.rs.in index 4cf8e4c649..9242166c7d 100644 --- a/gen/spectrum1_explorer/src/lib.rs.in +++ b/gen/spectrum1_explorer/src/lib.rs.in @@ -111,7 +111,7 @@ impl<'a, C, A> Spectrum Spectrum { client: RefCell::new(client), auth: RefCell::new(authenticator), - _user_agent: "google-api-rust-client/0.1.12".to_string(), + _user_agent: "google-api-rust-client/0.1.13".to_string(), } } @@ -120,7 +120,7 @@ impl<'a, C, A> Spectrum } /// Set the user-agent header field to use in all requests to the server. - /// It defaults to `google-api-rust-client/0.1.12`. + /// It defaults to `google-api-rust-client/0.1.13`. /// /// Returns the previously set user-agent. pub fn user_agent(&mut self, agent_name: String) -> String { @@ -1175,7 +1175,7 @@ impl<'a, C, A> PawNotifySpectrumUseCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, PawsNotifySpectrumUseResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -1386,7 +1386,7 @@ impl<'a, C, A> PawRegisterCall<'a, C, A> where C: BorrowMut, A: o /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, PawsRegisterResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -1597,7 +1597,7 @@ impl<'a, C, A> PawGetSpectrumCall<'a, C, A> where C: BorrowMut, A /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, PawsGetSpectrumResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -1808,7 +1808,7 @@ impl<'a, C, A> PawInitCall<'a, C, A> where C: BorrowMut, A: oauth /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, PawsInitResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -2019,7 +2019,7 @@ impl<'a, C, A> PawGetSpectrumBatchCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, PawsGetSpectrumBatchResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -2230,7 +2230,7 @@ impl<'a, C, A> PawVerifyDeviceCall<'a, C, A> where C: BorrowMut, /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, PawsVerifyDeviceResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, diff --git a/gen/sqladmin1_beta4-cli/Cargo.toml b/gen/sqladmin1_beta4-cli/Cargo.toml index 0f310e1e81..54da418642 100644 --- a/gen/sqladmin1_beta4-cli/Cargo.toml +++ b/gen/sqladmin1_beta4-cli/Cargo.toml @@ -4,7 +4,7 @@ [package] name = "google-sqladmin1_beta4-cli" -version = "0.3.3+20160222" +version = "0.3.4+20160321" authors = ["Sebastian Thiel "] description = "A complete library to interact with SQL Admin (protocol v1beta4)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/sqladmin1_beta4-cli" @@ -17,18 +17,18 @@ keywords = ["sqladmin", "google", "cli"] name = "sqladmin1-beta4" [dependencies] -hyper = "0.7" -mime = "0.1.0" -serde = ">= 0.7.0" -serde_json = ">= 0.7.0" -yup-oauth2 = ">= 0.5.4" +hyper = "0.8" +mime = "0.2.0" +serde = "0.6.0" +serde_json = "0.6.0" +yup-oauth2 = ">= 0.5.6" strsim = "0.4" yup-hyper-mock = "1.0" clap = "2.0" [build-dependencies] -syntex = { version = ">= 0.23" } -serde_codegen = { version = ">= 0.6" } +syntex = { version = "= 0.28" } +serde_codegen = { version = "= 0.6.13" } [dependencies.google-sqladmin1_beta4] diff --git a/gen/sqladmin1_beta4-cli/README.md b/gen/sqladmin1_beta4-cli/README.md index 2356a08115..2e833eae95 100644 --- a/gen/sqladmin1_beta4-cli/README.md +++ b/gen/sqladmin1_beta4-cli/README.md @@ -17,14 +17,14 @@ Everything else about the *SQL Admin* API can be found at the You can download the pre-compiled 64bit binaries for the following platforms: -* ![icon](http://megaicons.net/static/img/icons_sizes/6/140/16/ubuntu-icon.png) [ubuntu](http://dl.byronimo.de/google.rs/cli/0.3.3/ubuntu/sqladmin1-beta4.tar.gz) -* ![icon](http://hydra-media.cursecdn.com/wow.gamepedia.com/a/a2/Apple-icon-16x16.png?version=25ddd67ac3dd3b634478e3978b76cb74) [osx](http://dl.byronimo.de/google.rs/cli/0.3.3/osx/sqladmin1-beta4.tar.gz) +* ![icon](http://megaicons.net/static/img/icons_sizes/6/140/16/ubuntu-icon.png) [ubuntu](http://dl.byronimo.de/google.rs/cli/0.3.4/ubuntu/sqladmin1-beta4.tar.gz) +* ![icon](http://hydra-media.cursecdn.com/wow.gamepedia.com/a/a2/Apple-icon-16x16.png?version=25ddd67ac3dd3b634478e3978b76cb74) [osx](http://dl.byronimo.de/google.rs/cli/0.3.4/osx/sqladmin1-beta4.tar.gz) Find the source code [on github](https://github.com/Byron/google-apis-rs/tree/master/gen/sqladmin1_beta4-cli). # Usage -This documentation was generated from the *SQL Admin* API at revision *20160222*. The CLI is at version *0.3.3*. +This documentation was generated from the *SQL Admin* API at revision *20160321*. The CLI is at version *0.3.4*. ```bash sqladmin1-beta4 [options] diff --git a/gen/sqladmin1_beta4-cli/mkdocs.yml b/gen/sqladmin1_beta4-cli/mkdocs.yml index fa079ea483..6fad9d5d60 100644 --- a/gen/sqladmin1_beta4-cli/mkdocs.yml +++ b/gen/sqladmin1_beta4-cli/mkdocs.yml @@ -1,4 +1,4 @@ -site_name: SQL Admin v0.3.3+20160222 +site_name: SQL Admin v0.3.4+20160321 site_url: http://byron.github.io/google-apis-rs/google-sqladmin1_beta4-cli site_description: Write integrating applications with bcore diff --git a/gen/sqladmin1_beta4-cli/src/cmn.rs b/gen/sqladmin1_beta4-cli/src/cmn.rs index 188159ee80..ae86fdef65 100644 --- a/gen/sqladmin1_beta4-cli/src/cmn.rs +++ b/gen/sqladmin1_beta4-cli/src/cmn.rs @@ -414,7 +414,7 @@ impl TokenStorage for JsonTokenStorage { Err(err) => match err.kind() { io::ErrorKind::NotFound => Ok(()), - _ => Err(json::Error::Io(err)) + _ => Err(json::Error::IoError(err)) }, Ok(_) => Ok(()), } @@ -427,7 +427,7 @@ impl TokenStorage for JsonTokenStorage { Err(serde_err) => Err(serde_err), } }, - Err(io_err) => Err(json::Error::Io(io_err)) + Err(io_err) => Err(json::Error::IoError(io_err)) } } } @@ -444,7 +444,7 @@ impl TokenStorage for JsonTokenStorage { Err(io_err) => { match io_err.kind() { io::ErrorKind::NotFound => Ok(None), - _ => Err(json::Error::Io(io_err)) + _ => Err(json::Error::IoError(io_err)) } } } @@ -683,7 +683,7 @@ pub fn application_secret_from_directory(dir: &str, = json::from_str(json_console_secret).unwrap(); match json::to_writer_pretty(&mut f, &console_secret) { Err(serde_err) => match serde_err { - json::Error::Io(err) => err, + json::Error::IoError(err) => err, _ => panic!("Unexpected serde error: {:#?}", serde_err) }, Ok(_) => continue, @@ -696,7 +696,7 @@ pub fn application_secret_from_directory(dir: &str, }, Ok(f) => { match json::de::from_reader::<_, ConsoleApplicationSecret>(f) { - Err(json::Error::Io(err)) => + Err(json::Error::IoError(err)) => return secret_io_error(err), Err(json_err) => return Err(CLIError::Configuration( diff --git a/gen/sqladmin1_beta4-cli/src/main.rs b/gen/sqladmin1_beta4-cli/src/main.rs index 5df09b2d4b..153966f9a9 100644 --- a/gen/sqladmin1_beta4-cli/src/main.rs +++ b/gen/sqladmin1_beta4-cli/src/main.rs @@ -4275,8 +4275,8 @@ fn main() { let mut app = App::new("sqladmin1-beta4") .author("Sebastian Thiel ") - .version("0.3.3+20160222") - .about("API for Cloud SQL database instance management.") + .version("0.3.4+20160321") + .about("Creates and configures Cloud SQL instances, which provide fully-managed MySQL databases.") .after_help("All documentation details can be found at http://byron.github.io/google-apis-rs/google_sqladmin1_beta4_cli") .arg(Arg::with_name("url") .long("scope") diff --git a/gen/sqladmin1_beta4/Cargo.toml b/gen/sqladmin1_beta4/Cargo.toml index 97a5a6ab52..c52f2b83b5 100644 --- a/gen/sqladmin1_beta4/Cargo.toml +++ b/gen/sqladmin1_beta4/Cargo.toml @@ -4,7 +4,7 @@ [package] name = "google-sqladmin1_beta4" -version = "0.1.12+20160222" +version = "0.1.13+20160321" authors = ["Sebastian Thiel "] description = "A complete library to interact with SQL Admin (protocol v1beta4)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/sqladmin1_beta4" @@ -16,14 +16,14 @@ build = "src/build.rs" [dependencies] -hyper = "0.7" -mime = "0.1.0" -serde = ">= 0.7.0" -serde_json = ">= 0.7.0" -yup-oauth2 = ">= 0.5.4" +hyper = "0.8" +mime = "0.2.0" +serde = "0.6.0" +serde_json = "0.6.0" +yup-oauth2 = ">= 0.5.6" url = ">= 0.5" [build-dependencies] -syntex = { version = ">= 0.23" } -serde_codegen = { version = ">= 0.6" } +syntex = { version = "= 0.28" } +serde_codegen = { version = "= 0.6.13" } diff --git a/gen/sqladmin1_beta4/README.md b/gen/sqladmin1_beta4/README.md index 2df26a5407..2717deb10a 100644 --- a/gen/sqladmin1_beta4/README.md +++ b/gen/sqladmin1_beta4/README.md @@ -5,7 +5,7 @@ DO NOT EDIT ! --> The `google-sqladmin1_beta4` library allows access to all features of the *Google SQL Admin* service. -This documentation was generated from *SQL Admin* crate version *0.1.12+20160222*, where *20160222* is the exact revision of the *sqladmin:v1beta4* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.12*. +This documentation was generated from *SQL Admin* crate version *0.1.13+20160321*, where *20160321* is the exact revision of the *sqladmin:v1beta4* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.13*. Everything else about the *SQL Admin* *v1_beta4* API can be found at the [official documentation site](https://cloud.google.com/sql/docs/reference/latest). diff --git a/gen/sqladmin1_beta4/src/cmn.rs b/gen/sqladmin1_beta4/src/cmn.rs index 87b91a8986..c69621da55 100644 --- a/gen/sqladmin1_beta4/src/cmn.rs +++ b/gen/sqladmin1_beta4/src/cmn.rs @@ -12,7 +12,7 @@ use mime::{Mime, TopLevel, SubLevel, Attr, Value}; use oauth2::{TokenType, Retry, self}; use hyper; use hyper::header::{ContentType, ContentLength, Headers, UserAgent, Authorization, Header, - HeaderFormat}; + HeaderFormat, Bearer}; use hyper::http::h1::LINE_ENDING; use hyper::method::Method; use hyper::status::StatusCode; @@ -634,7 +634,7 @@ pub struct ResumableUploadHelper<'a, A: 'a> { pub start_at: Option, pub auth: &'a mut A, pub user_agent: &'a str, - pub auth_header: Authorization, + pub auth_header: Authorization, pub url: &'a str, pub reader: &'a mut ReadSeek, pub media_type: Mime, diff --git a/gen/sqladmin1_beta4/src/lib.rs b/gen/sqladmin1_beta4/src/lib.rs index ec65d86056..cce46d3cfc 100644 --- a/gen/sqladmin1_beta4/src/lib.rs +++ b/gen/sqladmin1_beta4/src/lib.rs @@ -2,7 +2,7 @@ // This file was generated automatically from 'src/mako/api/lib.rs.mako' // DO NOT EDIT ! -//! This documentation was generated from *SQL Admin* crate version *0.1.12+20160222*, where *20160222* is the exact revision of the *sqladmin:v1beta4* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.12*. +//! This documentation was generated from *SQL Admin* crate version *0.1.13+20160321*, where *20160321* is the exact revision of the *sqladmin:v1beta4* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.13*. //! //! Everything else about the *SQL Admin* *v1_beta4* API can be found at the //! [official documentation site](https://cloud.google.com/sql/docs/reference/latest). diff --git a/gen/sqladmin1_beta4/src/lib.rs.in b/gen/sqladmin1_beta4/src/lib.rs.in index 979fbcad63..109cbde4eb 100644 --- a/gen/sqladmin1_beta4/src/lib.rs.in +++ b/gen/sqladmin1_beta4/src/lib.rs.in @@ -137,7 +137,7 @@ impl<'a, C, A> SQLAdmin SQLAdmin { client: RefCell::new(client), auth: RefCell::new(authenticator), - _user_agent: "google-api-rust-client/0.1.12".to_string(), + _user_agent: "google-api-rust-client/0.1.13".to_string(), } } @@ -167,7 +167,7 @@ impl<'a, C, A> SQLAdmin } /// Set the user-agent header field to use in all requests to the server. - /// It defaults to `google-api-rust-client/0.1.12`. + /// It defaults to `google-api-rust-client/0.1.13`. /// /// Returns the previously set user-agent. pub fn user_agent(&mut self, agent_name: String) -> String { @@ -667,7 +667,7 @@ pub struct Flag { /// For STRING flags, a list of strings that the value can be set to. #[serde(rename="allowedStringValues")] pub allowed_string_values: Option>, - /// The database version this flag applies to. Can be MYSQL_5_5, MYSQL_5_6, or both. + /// The database version this flag applies to. Can be MYSQL_5_5, MYSQL_5_6, or MYSQL_5_7. MYSQL_5_7 is applicable only to Second Generation instances. #[serde(rename="appliesTo")] pub applies_to: Option>, /// For INTEGER flags, the maximum allowed value. @@ -1154,7 +1154,7 @@ pub struct DatabaseInstance { /// The assigned IP addresses for the instance. #[serde(rename="ipAddresses")] pub ip_addresses: Option>, - /// The database engine type and version. Can be MYSQL_5_5 or MYSQL_5_6. Defaults to MYSQL_5_6. The databaseVersion can not be changed after instance creation. + /// The database engine type and version. The databaseVersion can not be changed after instance creation. Can be MYSQL_5_5, MYSQL_5_6 or MYSQL_5_7. Defaults to MYSQL_5_6. MYSQL_5_7 is applicable only to Second Generation instances. #[serde(rename="databaseVersion")] pub database_version: Option, /// The instance type. This can be one of the following. @@ -2580,7 +2580,7 @@ impl<'a, C, A> OperationListCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, OperationsListResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -2656,8 +2656,7 @@ impl<'a, C, A> OperationListCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -2848,7 +2847,7 @@ impl<'a, C, A> OperationGetCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Operation)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -2918,8 +2917,7 @@ impl<'a, C, A> OperationGetCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -3095,7 +3093,7 @@ impl<'a, C, A> TierListCall<'a, C, A> where C: BorrowMut, A: oaut /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, TiersListResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -3164,8 +3162,7 @@ impl<'a, C, A> TierListCall<'a, C, A> where C: BorrowMut, A: oaut } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -3332,7 +3329,7 @@ impl<'a, C, A> UserListCall<'a, C, A> where C: BorrowMut, A: oaut /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, UsersListResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -3402,8 +3399,7 @@ impl<'a, C, A> UserListCall<'a, C, A> where C: BorrowMut, A: oaut } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -3582,7 +3578,7 @@ impl<'a, C, A> UserDeleteCall<'a, C, A> where C: BorrowMut, A: oa /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Operation)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -3654,8 +3650,7 @@ impl<'a, C, A> UserDeleteCall<'a, C, A> where C: BorrowMut, A: oa } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Delete, &url) @@ -3861,7 +3856,7 @@ impl<'a, C, A> UserUpdateCall<'a, C, A> where C: BorrowMut, A: oa /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Operation)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -3944,8 +3939,7 @@ impl<'a, C, A> UserUpdateCall<'a, C, A> where C: BorrowMut, A: oa } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -4162,7 +4156,7 @@ impl<'a, C, A> UserInsertCall<'a, C, A> where C: BorrowMut, A: oa /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Operation)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -4243,8 +4237,7 @@ impl<'a, C, A> UserInsertCall<'a, C, A> where C: BorrowMut, A: oa } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -4441,7 +4434,7 @@ impl<'a, C, A> InstanceFailoverCall<'a, C, A> where C: BorrowMut, /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Operation)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -4522,8 +4515,7 @@ impl<'a, C, A> InstanceFailoverCall<'a, C, A> where C: BorrowMut, } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -4713,7 +4705,7 @@ impl<'a, C, A> InstanceResetSslConfigCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, Operation)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -4783,8 +4775,7 @@ impl<'a, C, A> InstanceResetSslConfigCall<'a, C, A> where C: BorrowMut InstancePromoteReplicaCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, Operation)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -5031,8 +5022,7 @@ impl<'a, C, A> InstancePromoteReplicaCall<'a, C, A> where C: BorrowMut InstanceGetCall<'a, C, A> where C: BorrowMut, A: o /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, DatabaseInstance)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -5279,8 +5269,7 @@ impl<'a, C, A> InstanceGetCall<'a, C, A> where C: BorrowMut, A: o } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -5464,7 +5453,7 @@ impl<'a, C, A> InstancePatchCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Operation)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -5545,8 +5534,7 @@ impl<'a, C, A> InstancePatchCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -5743,7 +5731,7 @@ impl<'a, C, A> InstanceCloneCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Operation)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -5824,8 +5812,7 @@ impl<'a, C, A> InstanceCloneCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -6015,7 +6002,7 @@ impl<'a, C, A> InstanceDeleteCall<'a, C, A> where C: BorrowMut, A /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Operation)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -6085,8 +6072,7 @@ impl<'a, C, A> InstanceDeleteCall<'a, C, A> where C: BorrowMut, A } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Delete, &url) @@ -6263,7 +6249,7 @@ impl<'a, C, A> InstanceStopReplicaCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, Operation)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -6333,8 +6319,7 @@ impl<'a, C, A> InstanceStopReplicaCall<'a, C, A> where C: BorrowMut InstanceStartReplicaCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, Operation)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -6581,8 +6566,7 @@ impl<'a, C, A> InstanceStartReplicaCall<'a, C, A> where C: BorrowMut InstanceInsertCall<'a, C, A> where C: BorrowMut, A /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Operation)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -6845,8 +6829,7 @@ impl<'a, C, A> InstanceInsertCall<'a, C, A> where C: BorrowMut, A } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -7029,7 +7012,7 @@ impl<'a, C, A> InstanceListCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, InstancesListResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -7104,8 +7087,7 @@ impl<'a, C, A> InstanceListCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -7293,7 +7275,7 @@ impl<'a, C, A> InstanceImportCall<'a, C, A> where C: BorrowMut, A /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Operation)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -7374,8 +7356,7 @@ impl<'a, C, A> InstanceImportCall<'a, C, A> where C: BorrowMut, A } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -7572,7 +7553,7 @@ impl<'a, C, A> InstanceUpdateCall<'a, C, A> where C: BorrowMut, A /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Operation)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -7653,8 +7634,7 @@ impl<'a, C, A> InstanceUpdateCall<'a, C, A> where C: BorrowMut, A } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -7844,7 +7824,7 @@ impl<'a, C, A> InstanceRestartCall<'a, C, A> where C: BorrowMut, /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Operation)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -7914,8 +7894,7 @@ impl<'a, C, A> InstanceRestartCall<'a, C, A> where C: BorrowMut, } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Post, &url) @@ -8099,7 +8078,7 @@ impl<'a, C, A> InstanceExportCall<'a, C, A> where C: BorrowMut, A /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Operation)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -8180,8 +8159,7 @@ impl<'a, C, A> InstanceExportCall<'a, C, A> where C: BorrowMut, A } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -8378,7 +8356,7 @@ impl<'a, C, A> InstanceRestoreBackupCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, Operation)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -8459,8 +8437,7 @@ impl<'a, C, A> InstanceRestoreBackupCall<'a, C, A> where C: BorrowMut FlagListCall<'a, C, A> where C: BorrowMut, A: oaut /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, FlagsListResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -8695,8 +8672,7 @@ impl<'a, C, A> FlagListCall<'a, C, A> where C: BorrowMut, A: oaut } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -8854,7 +8830,7 @@ impl<'a, C, A> DatabaseDeleteCall<'a, C, A> where C: BorrowMut, A /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Operation)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -8925,8 +8901,7 @@ impl<'a, C, A> DatabaseDeleteCall<'a, C, A> where C: BorrowMut, A } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Delete, &url) @@ -9121,7 +9096,7 @@ impl<'a, C, A> DatabasePatchCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Operation)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -9203,8 +9178,7 @@ impl<'a, C, A> DatabasePatchCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -9404,7 +9378,7 @@ impl<'a, C, A> DatabaseListCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, DatabasesListResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -9474,8 +9448,7 @@ impl<'a, C, A> DatabaseListCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -9659,7 +9632,7 @@ impl<'a, C, A> DatabaseInsertCall<'a, C, A> where C: BorrowMut, A /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Operation)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -9740,8 +9713,7 @@ impl<'a, C, A> DatabaseInsertCall<'a, C, A> where C: BorrowMut, A } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -9932,7 +9904,7 @@ impl<'a, C, A> DatabaseGetCall<'a, C, A> where C: BorrowMut, A: o /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Database)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -10003,8 +9975,7 @@ impl<'a, C, A> DatabaseGetCall<'a, C, A> where C: BorrowMut, A: o } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -10199,7 +10170,7 @@ impl<'a, C, A> DatabaseUpdateCall<'a, C, A> where C: BorrowMut, A /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Operation)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -10281,8 +10252,7 @@ impl<'a, C, A> DatabaseUpdateCall<'a, C, A> where C: BorrowMut, A } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -10489,7 +10459,7 @@ impl<'a, C, A> SslCertInsertCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, SslCertsInsertResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -10570,8 +10540,7 @@ impl<'a, C, A> SslCertInsertCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -10762,7 +10731,7 @@ impl<'a, C, A> SslCertDeleteCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Operation)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -10833,8 +10802,7 @@ impl<'a, C, A> SslCertDeleteCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Delete, &url) @@ -11022,7 +10990,7 @@ impl<'a, C, A> SslCertGetCall<'a, C, A> where C: BorrowMut, A: oa /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, SslCert)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -11093,8 +11061,7 @@ impl<'a, C, A> SslCertGetCall<'a, C, A> where C: BorrowMut, A: oa } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -11288,7 +11255,7 @@ impl<'a, C, A> SslCertCreateEphemeralCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, SslCert)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -11369,8 +11336,7 @@ impl<'a, C, A> SslCertCreateEphemeralCall<'a, C, A> where C: BorrowMut SslCertListCall<'a, C, A> where C: BorrowMut, A: o /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, SslCertsListResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -11630,8 +11596,7 @@ impl<'a, C, A> SslCertListCall<'a, C, A> where C: BorrowMut, A: o } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -11812,7 +11777,7 @@ impl<'a, C, A> BackupRunListCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, BackupRunsListResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -11888,8 +11853,7 @@ impl<'a, C, A> BackupRunListCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -12081,7 +12045,7 @@ impl<'a, C, A> BackupRunGetCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, BackupRun)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -12152,8 +12116,7 @@ impl<'a, C, A> BackupRunGetCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -12341,7 +12304,7 @@ impl<'a, C, A> BackupRunDeleteCall<'a, C, A> where C: BorrowMut, /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Operation)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -12412,8 +12375,7 @@ impl<'a, C, A> BackupRunDeleteCall<'a, C, A> where C: BorrowMut, } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Delete, &url) diff --git a/gen/storage1-cli/Cargo.toml b/gen/storage1-cli/Cargo.toml index ab86bc6c1c..75a51bfba8 100644 --- a/gen/storage1-cli/Cargo.toml +++ b/gen/storage1-cli/Cargo.toml @@ -4,7 +4,7 @@ [package] name = "google-storage1-cli" -version = "0.3.3+20160210" +version = "0.3.4+20160330" authors = ["Sebastian Thiel "] description = "A complete library to interact with storage (protocol v1)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/storage1-cli" @@ -17,18 +17,18 @@ keywords = ["storage", "google", "cli"] name = "storage1" [dependencies] -hyper = "0.7" -mime = "0.1.0" -serde = ">= 0.7.0" -serde_json = ">= 0.7.0" -yup-oauth2 = ">= 0.5.4" +hyper = "0.8" +mime = "0.2.0" +serde = "0.6.0" +serde_json = "0.6.0" +yup-oauth2 = ">= 0.5.6" strsim = "0.4" yup-hyper-mock = "1.0" clap = "2.0" [build-dependencies] -syntex = { version = ">= 0.23" } -serde_codegen = { version = ">= 0.6" } +syntex = { version = "= 0.28" } +serde_codegen = { version = "= 0.6.13" } [dependencies.google-storage1] diff --git a/gen/storage1-cli/README.md b/gen/storage1-cli/README.md index ceb198bc1f..4ccbe8edf4 100644 --- a/gen/storage1-cli/README.md +++ b/gen/storage1-cli/README.md @@ -17,14 +17,14 @@ Everything else about the *storage* API can be found at the You can download the pre-compiled 64bit binaries for the following platforms: -* ![icon](http://megaicons.net/static/img/icons_sizes/6/140/16/ubuntu-icon.png) [ubuntu](http://dl.byronimo.de/google.rs/cli/0.3.3/ubuntu/storage1.tar.gz) -* ![icon](http://hydra-media.cursecdn.com/wow.gamepedia.com/a/a2/Apple-icon-16x16.png?version=25ddd67ac3dd3b634478e3978b76cb74) [osx](http://dl.byronimo.de/google.rs/cli/0.3.3/osx/storage1.tar.gz) +* ![icon](http://megaicons.net/static/img/icons_sizes/6/140/16/ubuntu-icon.png) [ubuntu](http://dl.byronimo.de/google.rs/cli/0.3.4/ubuntu/storage1.tar.gz) +* ![icon](http://hydra-media.cursecdn.com/wow.gamepedia.com/a/a2/Apple-icon-16x16.png?version=25ddd67ac3dd3b634478e3978b76cb74) [osx](http://dl.byronimo.de/google.rs/cli/0.3.4/osx/storage1.tar.gz) Find the source code [on github](https://github.com/Byron/google-apis-rs/tree/master/gen/storage1-cli). # Usage -This documentation was generated from the *storage* API at revision *20160210*. The CLI is at version *0.3.3*. +This documentation was generated from the *storage* API at revision *20160330*. The CLI is at version *0.3.4*. ```bash storage1 [options] diff --git a/gen/storage1-cli/mkdocs.yml b/gen/storage1-cli/mkdocs.yml index 2cbe758510..6dab2e51e2 100644 --- a/gen/storage1-cli/mkdocs.yml +++ b/gen/storage1-cli/mkdocs.yml @@ -1,4 +1,4 @@ -site_name: storage v0.3.3+20160210 +site_name: storage v0.3.4+20160330 site_url: http://byron.github.io/google-apis-rs/google-storage1-cli site_description: Write integrating applications with bcore diff --git a/gen/storage1-cli/src/cmn.rs b/gen/storage1-cli/src/cmn.rs index 188159ee80..ae86fdef65 100644 --- a/gen/storage1-cli/src/cmn.rs +++ b/gen/storage1-cli/src/cmn.rs @@ -414,7 +414,7 @@ impl TokenStorage for JsonTokenStorage { Err(err) => match err.kind() { io::ErrorKind::NotFound => Ok(()), - _ => Err(json::Error::Io(err)) + _ => Err(json::Error::IoError(err)) }, Ok(_) => Ok(()), } @@ -427,7 +427,7 @@ impl TokenStorage for JsonTokenStorage { Err(serde_err) => Err(serde_err), } }, - Err(io_err) => Err(json::Error::Io(io_err)) + Err(io_err) => Err(json::Error::IoError(io_err)) } } } @@ -444,7 +444,7 @@ impl TokenStorage for JsonTokenStorage { Err(io_err) => { match io_err.kind() { io::ErrorKind::NotFound => Ok(None), - _ => Err(json::Error::Io(io_err)) + _ => Err(json::Error::IoError(io_err)) } } } @@ -683,7 +683,7 @@ pub fn application_secret_from_directory(dir: &str, = json::from_str(json_console_secret).unwrap(); match json::to_writer_pretty(&mut f, &console_secret) { Err(serde_err) => match serde_err { - json::Error::Io(err) => err, + json::Error::IoError(err) => err, _ => panic!("Unexpected serde error: {:#?}", serde_err) }, Ok(_) => continue, @@ -696,7 +696,7 @@ pub fn application_secret_from_directory(dir: &str, }, Ok(f) => { match json::de::from_reader::<_, ConsoleApplicationSecret>(f) { - Err(json::Error::Io(err)) => + Err(json::Error::IoError(err)) => return secret_io_error(err), Err(json_err) => return Err(CLIError::Configuration( diff --git a/gen/storage1-cli/src/main.rs b/gen/storage1-cli/src/main.rs index 9384c31418..b732179bae 100644 --- a/gen/storage1-cli/src/main.rs +++ b/gen/storage1-cli/src/main.rs @@ -4476,8 +4476,8 @@ fn main() { let mut app = App::new("storage1") .author("Sebastian Thiel ") - .version("0.3.3+20160210") - .about("Lets you store and retrieve potentially-large, immutable data objects.") + .version("0.3.4+20160330") + .about("Stores and retrieves potentially large, immutable data objects.") .after_help("All documentation details can be found at http://byron.github.io/google-apis-rs/google_storage1_cli") .arg(Arg::with_name("url") .long("scope") diff --git a/gen/storage1/Cargo.toml b/gen/storage1/Cargo.toml index 2b74904866..4fd06b1d25 100644 --- a/gen/storage1/Cargo.toml +++ b/gen/storage1/Cargo.toml @@ -4,7 +4,7 @@ [package] name = "google-storage1" -version = "0.1.12+20160210" +version = "0.1.13+20160330" authors = ["Sebastian Thiel "] description = "A complete library to interact with storage (protocol v1)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/storage1" @@ -16,14 +16,14 @@ build = "src/build.rs" [dependencies] -hyper = "0.7" -mime = "0.1.0" -serde = ">= 0.7.0" -serde_json = ">= 0.7.0" -yup-oauth2 = ">= 0.5.4" +hyper = "0.8" +mime = "0.2.0" +serde = "0.6.0" +serde_json = "0.6.0" +yup-oauth2 = ">= 0.5.6" url = ">= 0.5" [build-dependencies] -syntex = { version = ">= 0.23" } -serde_codegen = { version = ">= 0.6" } +syntex = { version = "= 0.28" } +serde_codegen = { version = "= 0.6.13" } diff --git a/gen/storage1/README.md b/gen/storage1/README.md index f7a2c3e711..595850b414 100644 --- a/gen/storage1/README.md +++ b/gen/storage1/README.md @@ -5,7 +5,7 @@ DO NOT EDIT ! --> The `google-storage1` library allows access to all features of the *Google storage* service. -This documentation was generated from *storage* crate version *0.1.12+20160210*, where *20160210* is the exact revision of the *storage:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.12*. +This documentation was generated from *storage* crate version *0.1.13+20160330*, where *20160330* is the exact revision of the *storage:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.13*. Everything else about the *storage* *v1* API can be found at the [official documentation site](https://developers.google.com/storage/docs/json_api/). diff --git a/gen/storage1/src/cmn.rs b/gen/storage1/src/cmn.rs index 87b91a8986..c69621da55 100644 --- a/gen/storage1/src/cmn.rs +++ b/gen/storage1/src/cmn.rs @@ -12,7 +12,7 @@ use mime::{Mime, TopLevel, SubLevel, Attr, Value}; use oauth2::{TokenType, Retry, self}; use hyper; use hyper::header::{ContentType, ContentLength, Headers, UserAgent, Authorization, Header, - HeaderFormat}; + HeaderFormat, Bearer}; use hyper::http::h1::LINE_ENDING; use hyper::method::Method; use hyper::status::StatusCode; @@ -634,7 +634,7 @@ pub struct ResumableUploadHelper<'a, A: 'a> { pub start_at: Option, pub auth: &'a mut A, pub user_agent: &'a str, - pub auth_header: Authorization, + pub auth_header: Authorization, pub url: &'a str, pub reader: &'a mut ReadSeek, pub media_type: Mime, diff --git a/gen/storage1/src/lib.rs b/gen/storage1/src/lib.rs index 639f2618c9..3029d3502f 100644 --- a/gen/storage1/src/lib.rs +++ b/gen/storage1/src/lib.rs @@ -2,7 +2,7 @@ // This file was generated automatically from 'src/mako/api/lib.rs.mako' // DO NOT EDIT ! -//! This documentation was generated from *storage* crate version *0.1.12+20160210*, where *20160210* is the exact revision of the *storage:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.12*. +//! This documentation was generated from *storage* crate version *0.1.13+20160330*, where *20160330* is the exact revision of the *storage:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.13*. //! //! Everything else about the *storage* *v1* API can be found at the //! [official documentation site](https://developers.google.com/storage/docs/json_api/). diff --git a/gen/storage1/src/lib.rs.in b/gen/storage1/src/lib.rs.in index 174c269c68..0bb7cc4626 100644 --- a/gen/storage1/src/lib.rs.in +++ b/gen/storage1/src/lib.rs.in @@ -162,7 +162,7 @@ impl<'a, C, A> Storage Storage { client: RefCell::new(client), auth: RefCell::new(authenticator), - _user_agent: "google-api-rust-client/0.1.12".to_string(), + _user_agent: "google-api-rust-client/0.1.13".to_string(), } } @@ -186,7 +186,7 @@ impl<'a, C, A> Storage } /// Set the user-agent header field to use in all requests to the server. - /// It defaults to `google-api-rust-client/0.1.12`. + /// It defaults to `google-api-rust-client/0.1.13`. /// /// Returns the previously set user-agent. pub fn user_agent(&mut self, agent_name: String) -> String { @@ -2034,7 +2034,7 @@ impl<'a, C, A> DefaultObjectAccessControlInsertCall<'a, C, A> where C: BorrowMut /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, ObjectAccessControl)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -2114,8 +2114,7 @@ impl<'a, C, A> DefaultObjectAccessControlInsertCall<'a, C, A> where C: BorrowMut } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -2302,7 +2301,7 @@ impl<'a, C, A> DefaultObjectAccessControlUpdateCall<'a, C, A> where C: BorrowMut /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, ObjectAccessControl)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -2383,8 +2382,7 @@ impl<'a, C, A> DefaultObjectAccessControlUpdateCall<'a, C, A> where C: BorrowMut } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -2577,7 +2575,7 @@ impl<'a, C, A> DefaultObjectAccessControlListCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, ObjectAccessControls)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -2652,8 +2650,7 @@ impl<'a, C, A> DefaultObjectAccessControlListCall<'a, C, A> where C: BorrowMut DefaultObjectAccessControlPatchCall<'a, C, A> where C: BorrowMut< /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, ObjectAccessControl)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -2922,8 +2919,7 @@ impl<'a, C, A> DefaultObjectAccessControlPatchCall<'a, C, A> where C: BorrowMut< } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -3113,7 +3109,7 @@ impl<'a, C, A> DefaultObjectAccessControlDeleteCall<'a, C, A> where C: BorrowMut /// Perform the operation you have build so far. pub fn doit(mut self) -> Result { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -3182,8 +3178,7 @@ impl<'a, C, A> DefaultObjectAccessControlDeleteCall<'a, C, A> where C: BorrowMut } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Delete, &url) @@ -3350,7 +3345,7 @@ impl<'a, C, A> DefaultObjectAccessControlGetCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, ObjectAccessControl)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -3420,8 +3415,7 @@ impl<'a, C, A> DefaultObjectAccessControlGetCall<'a, C, A> where C: BorrowMut BucketAccessControlPatchCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, BucketAccessControl)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -3686,8 +3680,7 @@ impl<'a, C, A> BucketAccessControlPatchCall<'a, C, A> where C: BorrowMut BucketAccessControlDeleteCall<'a, C, A> where C: BorrowMut Result { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -3946,8 +3939,7 @@ impl<'a, C, A> BucketAccessControlDeleteCall<'a, C, A> where C: BorrowMut BucketAccessControlInsertCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, BucketAccessControl)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -4200,8 +4192,7 @@ impl<'a, C, A> BucketAccessControlInsertCall<'a, C, A> where C: BorrowMut BucketAccessControlGetCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, BucketAccessControl)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -4451,8 +4442,7 @@ impl<'a, C, A> BucketAccessControlGetCall<'a, C, A> where C: BorrowMut BucketAccessControlUpdateCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, BucketAccessControl)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -4717,8 +4707,7 @@ impl<'a, C, A> BucketAccessControlUpdateCall<'a, C, A> where C: BorrowMut BucketAccessControlListCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, BucketAccessControls)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -4976,8 +4965,7 @@ impl<'a, C, A> BucketAccessControlListCall<'a, C, A> where C: BorrowMut ChannelStopCall<'a, C, A> where C: BorrowMut, A: o /// Perform the operation you have build so far. pub fn doit(mut self) -> Result { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -5206,8 +5194,7 @@ impl<'a, C, A> ChannelStopCall<'a, C, A> where C: BorrowMut, A: o } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -5402,7 +5389,7 @@ impl<'a, C, A> ObjectRewriteCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, RewriteResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -5524,8 +5511,7 @@ impl<'a, C, A> ObjectRewriteCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -5843,7 +5829,7 @@ impl<'a, C, A> ObjectGetCall<'a, C, A> where C: BorrowMut, A: oau /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Object)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -5947,8 +5933,7 @@ impl<'a, C, A> ObjectGetCall<'a, C, A> where C: BorrowMut, A: oau } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -6193,7 +6178,7 @@ impl<'a, C, A> ObjectUpdateCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Object)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -6311,8 +6296,7 @@ impl<'a, C, A> ObjectUpdateCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -6569,7 +6553,7 @@ impl<'a, C, A> ObjectWatchAllCall<'a, C, A> where C: BorrowMut, A /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Channel)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -6667,8 +6651,7 @@ impl<'a, C, A> ObjectWatchAllCall<'a, C, A> where C: BorrowMut, A } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -6919,7 +6902,7 @@ impl<'a, C, A> ObjectInsertCall<'a, C, A> where C: BorrowMut, A: fn doit(mut self, mut reader: RS, reader_mime_type: mime::Mime, protocol: &'static str) -> Result<(hyper::client::Response, Object)> where RS: ReadSeek { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -7050,8 +7033,7 @@ impl<'a, C, A> ObjectInsertCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { if should_ask_dlg_for_url && (upload_url = dlg.upload_url()) == () && upload_url.is_some() { @@ -7402,7 +7384,7 @@ impl<'a, C, A> ObjectComposeCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Object)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -7508,8 +7490,7 @@ impl<'a, C, A> ObjectComposeCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -7730,7 +7711,7 @@ impl<'a, C, A> ObjectDeleteCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -7814,8 +7795,7 @@ impl<'a, C, A> ObjectDeleteCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Delete, &url) @@ -8028,7 +8008,7 @@ impl<'a, C, A> ObjectListCall<'a, C, A> where C: BorrowMut, A: oa /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Objects)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -8115,8 +8095,7 @@ impl<'a, C, A> ObjectListCall<'a, C, A> where C: BorrowMut, A: oa } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -8361,7 +8340,7 @@ impl<'a, C, A> ObjectCopyCall<'a, C, A> where C: BorrowMut, A: oa /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Object)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -8493,8 +8472,7 @@ impl<'a, C, A> ObjectCopyCall<'a, C, A> where C: BorrowMut, A: oa } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -8802,7 +8780,7 @@ impl<'a, C, A> ObjectPatchCall<'a, C, A> where C: BorrowMut, A: o /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Object)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -8904,8 +8882,7 @@ impl<'a, C, A> ObjectPatchCall<'a, C, A> where C: BorrowMut, A: o } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -9153,7 +9130,7 @@ impl<'a, C, A> ObjectAccessControlInsertCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, ObjectAccessControl)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -9237,8 +9214,7 @@ impl<'a, C, A> ObjectAccessControlInsertCall<'a, C, A> where C: BorrowMut ObjectAccessControlPatchCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, ObjectAccessControl)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -9530,8 +9506,7 @@ impl<'a, C, A> ObjectAccessControlPatchCall<'a, C, A> where C: BorrowMut ObjectAccessControlListCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, ObjectAccessControls)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -9813,8 +9788,7 @@ impl<'a, C, A> ObjectAccessControlListCall<'a, C, A> where C: BorrowMut ObjectAccessControlDeleteCall<'a, C, A> where C: BorrowMut Result { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -10074,8 +10048,7 @@ impl<'a, C, A> ObjectAccessControlDeleteCall<'a, C, A> where C: BorrowMut ObjectAccessControlGetCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, ObjectAccessControl)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -10336,8 +10309,7 @@ impl<'a, C, A> ObjectAccessControlGetCall<'a, C, A> where C: BorrowMut ObjectAccessControlUpdateCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, ObjectAccessControl)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -10626,8 +10598,7 @@ impl<'a, C, A> ObjectAccessControlUpdateCall<'a, C, A> where C: BorrowMut BucketUpdateCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Bucket)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -10945,8 +10916,7 @@ impl<'a, C, A> BucketUpdateCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -11166,7 +11136,7 @@ impl<'a, C, A> BucketGetCall<'a, C, A> where C: BorrowMut, A: oau /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Bucket)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -11244,8 +11214,7 @@ impl<'a, C, A> BucketGetCall<'a, C, A> where C: BorrowMut, A: oau } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -11436,7 +11405,7 @@ impl<'a, C, A> BucketDeleteCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -11510,8 +11479,7 @@ impl<'a, C, A> BucketDeleteCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Delete, &url) @@ -11694,7 +11662,7 @@ impl<'a, C, A> BucketInsertCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Bucket)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -11762,8 +11730,7 @@ impl<'a, C, A> BucketInsertCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -11980,7 +11947,7 @@ impl<'a, C, A> BucketPatchCall<'a, C, A> where C: BorrowMut, A: o /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Bucket)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -12075,8 +12042,7 @@ impl<'a, C, A> BucketPatchCall<'a, C, A> where C: BorrowMut, A: o } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -12298,7 +12264,7 @@ impl<'a, C, A> BucketListCall<'a, C, A> where C: BorrowMut, A: oa /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Buckets)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -12358,8 +12324,7 @@ impl<'a, C, A> BucketListCall<'a, C, A> where C: BorrowMut, A: oa } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) diff --git a/gen/storagetransfer1-cli/Cargo.toml b/gen/storagetransfer1-cli/Cargo.toml index fd838defa9..f2bb1a23f2 100644 --- a/gen/storagetransfer1-cli/Cargo.toml +++ b/gen/storagetransfer1-cli/Cargo.toml @@ -4,7 +4,7 @@ [package] name = "google-storagetransfer1-cli" -version = "0.3.3+20150811" +version = "0.3.4+20150811" authors = ["Sebastian Thiel "] description = "A complete library to interact with storagetransfer (protocol v1)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/storagetransfer1-cli" @@ -17,18 +17,18 @@ keywords = ["storagetransfer", "google", "cli"] name = "storagetransfer1" [dependencies] -hyper = "0.7" -mime = "0.1.0" -serde = ">= 0.7.0" -serde_json = ">= 0.7.0" -yup-oauth2 = ">= 0.5.4" +hyper = "0.8" +mime = "0.2.0" +serde = "0.6.0" +serde_json = "0.6.0" +yup-oauth2 = ">= 0.5.6" strsim = "0.4" yup-hyper-mock = "1.0" clap = "2.0" [build-dependencies] -syntex = { version = ">= 0.23" } -serde_codegen = { version = ">= 0.6" } +syntex = { version = "= 0.28" } +serde_codegen = { version = "= 0.6.13" } [dependencies.google-storagetransfer1] diff --git a/gen/storagetransfer1-cli/README.md b/gen/storagetransfer1-cli/README.md index 3d5b4776a4..1c8a0733e7 100644 --- a/gen/storagetransfer1-cli/README.md +++ b/gen/storagetransfer1-cli/README.md @@ -17,14 +17,14 @@ Everything else about the *storagetransfer* API can be found at the You can download the pre-compiled 64bit binaries for the following platforms: -* ![icon](http://megaicons.net/static/img/icons_sizes/6/140/16/ubuntu-icon.png) [ubuntu](http://dl.byronimo.de/google.rs/cli/0.3.3/ubuntu/storagetransfer1.tar.gz) -* ![icon](http://hydra-media.cursecdn.com/wow.gamepedia.com/a/a2/Apple-icon-16x16.png?version=25ddd67ac3dd3b634478e3978b76cb74) [osx](http://dl.byronimo.de/google.rs/cli/0.3.3/osx/storagetransfer1.tar.gz) +* ![icon](http://megaicons.net/static/img/icons_sizes/6/140/16/ubuntu-icon.png) [ubuntu](http://dl.byronimo.de/google.rs/cli/0.3.4/ubuntu/storagetransfer1.tar.gz) +* ![icon](http://hydra-media.cursecdn.com/wow.gamepedia.com/a/a2/Apple-icon-16x16.png?version=25ddd67ac3dd3b634478e3978b76cb74) [osx](http://dl.byronimo.de/google.rs/cli/0.3.4/osx/storagetransfer1.tar.gz) Find the source code [on github](https://github.com/Byron/google-apis-rs/tree/master/gen/storagetransfer1-cli). # Usage -This documentation was generated from the *storagetransfer* API at revision *20150811*. The CLI is at version *0.3.3*. +This documentation was generated from the *storagetransfer* API at revision *20150811*. The CLI is at version *0.3.4*. ```bash storagetransfer1 [options] diff --git a/gen/storagetransfer1-cli/mkdocs.yml b/gen/storagetransfer1-cli/mkdocs.yml index 68ff681c0c..d642c3ec64 100644 --- a/gen/storagetransfer1-cli/mkdocs.yml +++ b/gen/storagetransfer1-cli/mkdocs.yml @@ -1,4 +1,4 @@ -site_name: storagetransfer v0.3.3+20150811 +site_name: storagetransfer v0.3.4+20150811 site_url: http://byron.github.io/google-apis-rs/google-storagetransfer1-cli site_description: Write integrating applications with bcore diff --git a/gen/storagetransfer1-cli/src/cmn.rs b/gen/storagetransfer1-cli/src/cmn.rs index 188159ee80..ae86fdef65 100644 --- a/gen/storagetransfer1-cli/src/cmn.rs +++ b/gen/storagetransfer1-cli/src/cmn.rs @@ -414,7 +414,7 @@ impl TokenStorage for JsonTokenStorage { Err(err) => match err.kind() { io::ErrorKind::NotFound => Ok(()), - _ => Err(json::Error::Io(err)) + _ => Err(json::Error::IoError(err)) }, Ok(_) => Ok(()), } @@ -427,7 +427,7 @@ impl TokenStorage for JsonTokenStorage { Err(serde_err) => Err(serde_err), } }, - Err(io_err) => Err(json::Error::Io(io_err)) + Err(io_err) => Err(json::Error::IoError(io_err)) } } } @@ -444,7 +444,7 @@ impl TokenStorage for JsonTokenStorage { Err(io_err) => { match io_err.kind() { io::ErrorKind::NotFound => Ok(None), - _ => Err(json::Error::Io(io_err)) + _ => Err(json::Error::IoError(io_err)) } } } @@ -683,7 +683,7 @@ pub fn application_secret_from_directory(dir: &str, = json::from_str(json_console_secret).unwrap(); match json::to_writer_pretty(&mut f, &console_secret) { Err(serde_err) => match serde_err { - json::Error::Io(err) => err, + json::Error::IoError(err) => err, _ => panic!("Unexpected serde error: {:#?}", serde_err) }, Ok(_) => continue, @@ -696,7 +696,7 @@ pub fn application_secret_from_directory(dir: &str, }, Ok(f) => { match json::de::from_reader::<_, ConsoleApplicationSecret>(f) { - Err(json::Error::Io(err)) => + Err(json::Error::IoError(err)) => return secret_io_error(err), Err(json_err) => return Err(CLIError::Configuration( diff --git a/gen/storagetransfer1-cli/src/main.rs b/gen/storagetransfer1-cli/src/main.rs index f5b17f5f21..abebff6e3c 100644 --- a/gen/storagetransfer1-cli/src/main.rs +++ b/gen/storagetransfer1-cli/src/main.rs @@ -1332,7 +1332,7 @@ fn main() { let mut app = App::new("storagetransfer1") .author("Sebastian Thiel ") - .version("0.3.3+20150811") + .version("0.3.4+20150811") .about("Transfers data from external data sources to a Google Cloud Storage bucket or between Google Cloud Storage buckets.") .after_help("All documentation details can be found at http://byron.github.io/google-apis-rs/google_storagetransfer1_cli") .arg(Arg::with_name("url") diff --git a/gen/storagetransfer1/Cargo.toml b/gen/storagetransfer1/Cargo.toml index c3b0de897e..275da3cb37 100644 --- a/gen/storagetransfer1/Cargo.toml +++ b/gen/storagetransfer1/Cargo.toml @@ -4,7 +4,7 @@ [package] name = "google-storagetransfer1" -version = "0.1.12+20150811" +version = "0.1.13+20150811" authors = ["Sebastian Thiel "] description = "A complete library to interact with storagetransfer (protocol v1)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/storagetransfer1" @@ -16,14 +16,14 @@ build = "src/build.rs" [dependencies] -hyper = "0.7" -mime = "0.1.0" -serde = ">= 0.7.0" -serde_json = ">= 0.7.0" -yup-oauth2 = ">= 0.5.4" +hyper = "0.8" +mime = "0.2.0" +serde = "0.6.0" +serde_json = "0.6.0" +yup-oauth2 = ">= 0.5.6" url = ">= 0.5" [build-dependencies] -syntex = { version = ">= 0.23" } -serde_codegen = { version = ">= 0.6" } +syntex = { version = "= 0.28" } +serde_codegen = { version = "= 0.6.13" } diff --git a/gen/storagetransfer1/README.md b/gen/storagetransfer1/README.md index 460304aae8..24ade17017 100644 --- a/gen/storagetransfer1/README.md +++ b/gen/storagetransfer1/README.md @@ -5,7 +5,7 @@ DO NOT EDIT ! --> The `google-storagetransfer1` library allows access to all features of the *Google storagetransfer* service. -This documentation was generated from *storagetransfer* crate version *0.1.12+20150811*, where *20150811* is the exact revision of the *storagetransfer:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.12*. +This documentation was generated from *storagetransfer* crate version *0.1.13+20150811*, where *20150811* is the exact revision of the *storagetransfer:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.13*. Everything else about the *storagetransfer* *v1* API can be found at the [official documentation site](https://cloud.google.com/storage/transfer). diff --git a/gen/storagetransfer1/src/cmn.rs b/gen/storagetransfer1/src/cmn.rs index 87b91a8986..c69621da55 100644 --- a/gen/storagetransfer1/src/cmn.rs +++ b/gen/storagetransfer1/src/cmn.rs @@ -12,7 +12,7 @@ use mime::{Mime, TopLevel, SubLevel, Attr, Value}; use oauth2::{TokenType, Retry, self}; use hyper; use hyper::header::{ContentType, ContentLength, Headers, UserAgent, Authorization, Header, - HeaderFormat}; + HeaderFormat, Bearer}; use hyper::http::h1::LINE_ENDING; use hyper::method::Method; use hyper::status::StatusCode; @@ -634,7 +634,7 @@ pub struct ResumableUploadHelper<'a, A: 'a> { pub start_at: Option, pub auth: &'a mut A, pub user_agent: &'a str, - pub auth_header: Authorization, + pub auth_header: Authorization, pub url: &'a str, pub reader: &'a mut ReadSeek, pub media_type: Mime, diff --git a/gen/storagetransfer1/src/lib.rs b/gen/storagetransfer1/src/lib.rs index 28409bfd86..292c28c5df 100644 --- a/gen/storagetransfer1/src/lib.rs +++ b/gen/storagetransfer1/src/lib.rs @@ -2,7 +2,7 @@ // This file was generated automatically from 'src/mako/api/lib.rs.mako' // DO NOT EDIT ! -//! This documentation was generated from *storagetransfer* crate version *0.1.12+20150811*, where *20150811* is the exact revision of the *storagetransfer:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.12*. +//! This documentation was generated from *storagetransfer* crate version *0.1.13+20150811*, where *20150811* is the exact revision of the *storagetransfer:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.13*. //! //! Everything else about the *storagetransfer* *v1* API can be found at the //! [official documentation site](https://cloud.google.com/storage/transfer). diff --git a/gen/storagetransfer1/src/lib.rs.in b/gen/storagetransfer1/src/lib.rs.in index 39c9d0c67b..115cf78cca 100644 --- a/gen/storagetransfer1/src/lib.rs.in +++ b/gen/storagetransfer1/src/lib.rs.in @@ -130,7 +130,7 @@ impl<'a, C, A> Storagetransfer Storagetransfer { client: RefCell::new(client), auth: RefCell::new(authenticator), - _user_agent: "google-api-rust-client/0.1.12".to_string(), + _user_agent: "google-api-rust-client/0.1.13".to_string(), } } @@ -148,7 +148,7 @@ impl<'a, C, A> Storagetransfer } /// Set the user-agent header field to use in all requests to the server. - /// It defaults to `google-api-rust-client/0.1.12`. + /// It defaults to `google-api-rust-client/0.1.13`. /// /// Returns the previously set user-agent. pub fn user_agent(&mut self, agent_name: String) -> String { @@ -1155,7 +1155,7 @@ impl<'a, C, A> TransferOperationPauseCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, Empty)> { use url::percent_encoding::{percent_encode, FORM_URLENCODED_ENCODE_SET}; use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -1238,8 +1238,7 @@ impl<'a, C, A> TransferOperationPauseCall<'a, C, A> where C: BorrowMut TransferOperationResumeCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, Empty)> { use url::percent_encoding::{percent_encode, FORM_URLENCODED_ENCODE_SET}; use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -1515,8 +1514,7 @@ impl<'a, C, A> TransferOperationResumeCall<'a, C, A> where C: BorrowMut TransferOperationGetCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, Operation)> { use url::percent_encoding::{percent_encode, FORM_URLENCODED_ENCODE_SET}; use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -1774,8 +1772,7 @@ impl<'a, C, A> TransferOperationGetCall<'a, C, A> where C: BorrowMut TransferOperationDeleteCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, Empty)> { use url::percent_encoding::{percent_encode, FORM_URLENCODED_ENCODE_SET}; use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -2020,8 +2017,7 @@ impl<'a, C, A> TransferOperationDeleteCall<'a, C, A> where C: BorrowMut TransferOperationListCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, ListOperationsResponse)> { use url::percent_encoding::{percent_encode, FORM_URLENCODED_ENCODE_SET}; use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -2281,8 +2277,7 @@ impl<'a, C, A> TransferOperationListCall<'a, C, A> where C: BorrowMut TransferOperationCancelCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, Empty)> { use url::percent_encoding::{percent_encode, FORM_URLENCODED_ENCODE_SET}; use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -2548,8 +2543,7 @@ impl<'a, C, A> TransferOperationCancelCall<'a, C, A> where C: BorrowMut GoogleServiceAccountGetCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, GoogleServiceAccount)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -2790,8 +2784,7 @@ impl<'a, C, A> GoogleServiceAccountGetCall<'a, C, A> where C: BorrowMut TransferJobListCall<'a, C, A> where C: BorrowMut, /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, ListTransferJobsResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -3024,8 +3017,7 @@ impl<'a, C, A> TransferJobListCall<'a, C, A> where C: BorrowMut, } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -3216,7 +3208,7 @@ impl<'a, C, A> TransferJobPatchCall<'a, C, A> where C: BorrowMut, pub fn doit(mut self) -> Result<(hyper::client::Response, TransferJob)> { use url::percent_encoding::{percent_encode, FORM_URLENCODED_ENCODE_SET}; use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -3299,8 +3291,7 @@ impl<'a, C, A> TransferJobPatchCall<'a, C, A> where C: BorrowMut, } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -3491,7 +3482,7 @@ impl<'a, C, A> TransferJobCreateCall<'a, C, A> where C: BorrowMut /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, TransferJob)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -3549,8 +3540,7 @@ impl<'a, C, A> TransferJobCreateCall<'a, C, A> where C: BorrowMut } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -3728,7 +3718,7 @@ impl<'a, C, A> TransferJobGetCall<'a, C, A> where C: BorrowMut, A pub fn doit(mut self) -> Result<(hyper::client::Response, TransferJob)> { use url::percent_encoding::{percent_encode, FORM_URLENCODED_ENCODE_SET}; use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -3803,8 +3793,7 @@ impl<'a, C, A> TransferJobGetCall<'a, C, A> where C: BorrowMut, A } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -3984,7 +3973,7 @@ impl<'a, C, A> MethodGetGoogleServiceAccountCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, GoogleServiceAccount)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -4034,8 +4023,7 @@ impl<'a, C, A> MethodGetGoogleServiceAccountCall<'a, C, A> where C: BorrowMut"] description = "A complete library to interact with Tag Manager (protocol v1)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/tagmanager1-cli" @@ -17,18 +17,18 @@ keywords = ["tagmanager", "google", "cli"] name = "tagmanager1" [dependencies] -hyper = "0.7" -mime = "0.1.0" -serde = ">= 0.7.0" -serde_json = ">= 0.7.0" -yup-oauth2 = ">= 0.5.4" +hyper = "0.8" +mime = "0.2.0" +serde = "0.6.0" +serde_json = "0.6.0" +yup-oauth2 = ">= 0.5.6" strsim = "0.4" yup-hyper-mock = "1.0" clap = "2.0" [build-dependencies] -syntex = { version = ">= 0.23" } -serde_codegen = { version = ">= 0.6" } +syntex = { version = "= 0.28" } +serde_codegen = { version = "= 0.6.13" } [dependencies.google-tagmanager1] diff --git a/gen/tagmanager1-cli/README.md b/gen/tagmanager1-cli/README.md index 5015a4e3c8..53c9a5ef7d 100644 --- a/gen/tagmanager1-cli/README.md +++ b/gen/tagmanager1-cli/README.md @@ -17,14 +17,14 @@ Everything else about the *Tag Manager* API can be found at the You can download the pre-compiled 64bit binaries for the following platforms: -* ![icon](http://megaicons.net/static/img/icons_sizes/6/140/16/ubuntu-icon.png) [ubuntu](http://dl.byronimo.de/google.rs/cli/0.3.3/ubuntu/tagmanager1.tar.gz) -* ![icon](http://hydra-media.cursecdn.com/wow.gamepedia.com/a/a2/Apple-icon-16x16.png?version=25ddd67ac3dd3b634478e3978b76cb74) [osx](http://dl.byronimo.de/google.rs/cli/0.3.3/osx/tagmanager1.tar.gz) +* ![icon](http://megaicons.net/static/img/icons_sizes/6/140/16/ubuntu-icon.png) [ubuntu](http://dl.byronimo.de/google.rs/cli/0.3.4/ubuntu/tagmanager1.tar.gz) +* ![icon](http://hydra-media.cursecdn.com/wow.gamepedia.com/a/a2/Apple-icon-16x16.png?version=25ddd67ac3dd3b634478e3978b76cb74) [osx](http://dl.byronimo.de/google.rs/cli/0.3.4/osx/tagmanager1.tar.gz) Find the source code [on github](https://github.com/Byron/google-apis-rs/tree/master/gen/tagmanager1-cli). # Usage -This documentation was generated from the *Tag Manager* API at revision *20160209*. The CLI is at version *0.3.3*. +This documentation was generated from the *Tag Manager* API at revision *20160310*. The CLI is at version *0.3.4*. ```bash tagmanager1 [options] diff --git a/gen/tagmanager1-cli/mkdocs.yml b/gen/tagmanager1-cli/mkdocs.yml index 19473c32f9..f4ae2f1354 100644 --- a/gen/tagmanager1-cli/mkdocs.yml +++ b/gen/tagmanager1-cli/mkdocs.yml @@ -1,4 +1,4 @@ -site_name: Tag Manager v0.3.3+20160209 +site_name: Tag Manager v0.3.4+20160310 site_url: http://byron.github.io/google-apis-rs/google-tagmanager1-cli site_description: Write integrating applications with bcore diff --git a/gen/tagmanager1-cli/src/cmn.rs b/gen/tagmanager1-cli/src/cmn.rs index 188159ee80..ae86fdef65 100644 --- a/gen/tagmanager1-cli/src/cmn.rs +++ b/gen/tagmanager1-cli/src/cmn.rs @@ -414,7 +414,7 @@ impl TokenStorage for JsonTokenStorage { Err(err) => match err.kind() { io::ErrorKind::NotFound => Ok(()), - _ => Err(json::Error::Io(err)) + _ => Err(json::Error::IoError(err)) }, Ok(_) => Ok(()), } @@ -427,7 +427,7 @@ impl TokenStorage for JsonTokenStorage { Err(serde_err) => Err(serde_err), } }, - Err(io_err) => Err(json::Error::Io(io_err)) + Err(io_err) => Err(json::Error::IoError(io_err)) } } } @@ -444,7 +444,7 @@ impl TokenStorage for JsonTokenStorage { Err(io_err) => { match io_err.kind() { io::ErrorKind::NotFound => Ok(None), - _ => Err(json::Error::Io(io_err)) + _ => Err(json::Error::IoError(io_err)) } } } @@ -683,7 +683,7 @@ pub fn application_secret_from_directory(dir: &str, = json::from_str(json_console_secret).unwrap(); match json::to_writer_pretty(&mut f, &console_secret) { Err(serde_err) => match serde_err { - json::Error::Io(err) => err, + json::Error::IoError(err) => err, _ => panic!("Unexpected serde error: {:#?}", serde_err) }, Ok(_) => continue, @@ -696,7 +696,7 @@ pub fn application_secret_from_directory(dir: &str, }, Ok(f) => { match json::de::from_reader::<_, ConsoleApplicationSecret>(f) { - Err(json::Error::Io(err)) => + Err(json::Error::IoError(err)) => return secret_io_error(err), Err(json_err) => return Err(CLIError::Configuration( diff --git a/gen/tagmanager1-cli/src/main.rs b/gen/tagmanager1-cli/src/main.rs index 2a7fda7ae9..a021ada31d 100644 --- a/gen/tagmanager1-cli/src/main.rs +++ b/gen/tagmanager1-cli/src/main.rs @@ -5338,8 +5338,8 @@ fn main() { let mut app = App::new("tagmanager1") .author("Sebastian Thiel ") - .version("0.3.3+20160209") - .about("API for accessing Tag Manager accounts and containers.") + .version("0.3.4+20160310") + .about("Accesses Tag Manager accounts and containers.") .after_help("All documentation details can be found at http://byron.github.io/google-apis-rs/google_tagmanager1_cli") .arg(Arg::with_name("url") .long("scope") diff --git a/gen/tagmanager1/Cargo.toml b/gen/tagmanager1/Cargo.toml index 3279a0c050..fecde00349 100644 --- a/gen/tagmanager1/Cargo.toml +++ b/gen/tagmanager1/Cargo.toml @@ -4,7 +4,7 @@ [package] name = "google-tagmanager1" -version = "0.1.12+20160209" +version = "0.1.13+20160310" authors = ["Sebastian Thiel "] description = "A complete library to interact with Tag Manager (protocol v1)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/tagmanager1" @@ -16,14 +16,14 @@ build = "src/build.rs" [dependencies] -hyper = "0.7" -mime = "0.1.0" -serde = ">= 0.7.0" -serde_json = ">= 0.7.0" -yup-oauth2 = ">= 0.5.4" +hyper = "0.8" +mime = "0.2.0" +serde = "0.6.0" +serde_json = "0.6.0" +yup-oauth2 = ">= 0.5.6" url = ">= 0.5" [build-dependencies] -syntex = { version = ">= 0.23" } -serde_codegen = { version = ">= 0.6" } +syntex = { version = "= 0.28" } +serde_codegen = { version = "= 0.6.13" } diff --git a/gen/tagmanager1/README.md b/gen/tagmanager1/README.md index ff44506f86..5b7bf4141d 100644 --- a/gen/tagmanager1/README.md +++ b/gen/tagmanager1/README.md @@ -5,7 +5,7 @@ DO NOT EDIT ! --> The `google-tagmanager1` library allows access to all features of the *Google Tag Manager* service. -This documentation was generated from *Tag Manager* crate version *0.1.12+20160209*, where *20160209* is the exact revision of the *tagmanager:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.12*. +This documentation was generated from *Tag Manager* crate version *0.1.13+20160310*, where *20160310* is the exact revision of the *tagmanager:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.13*. Everything else about the *Tag Manager* *v1* API can be found at the [official documentation site](https://developers.google.com/tag-manager/api/v1/). diff --git a/gen/tagmanager1/src/cmn.rs b/gen/tagmanager1/src/cmn.rs index 87b91a8986..c69621da55 100644 --- a/gen/tagmanager1/src/cmn.rs +++ b/gen/tagmanager1/src/cmn.rs @@ -12,7 +12,7 @@ use mime::{Mime, TopLevel, SubLevel, Attr, Value}; use oauth2::{TokenType, Retry, self}; use hyper; use hyper::header::{ContentType, ContentLength, Headers, UserAgent, Authorization, Header, - HeaderFormat}; + HeaderFormat, Bearer}; use hyper::http::h1::LINE_ENDING; use hyper::method::Method; use hyper::status::StatusCode; @@ -634,7 +634,7 @@ pub struct ResumableUploadHelper<'a, A: 'a> { pub start_at: Option, pub auth: &'a mut A, pub user_agent: &'a str, - pub auth_header: Authorization, + pub auth_header: Authorization, pub url: &'a str, pub reader: &'a mut ReadSeek, pub media_type: Mime, diff --git a/gen/tagmanager1/src/lib.rs b/gen/tagmanager1/src/lib.rs index 780f196d6b..0f187f8612 100644 --- a/gen/tagmanager1/src/lib.rs +++ b/gen/tagmanager1/src/lib.rs @@ -2,7 +2,7 @@ // This file was generated automatically from 'src/mako/api/lib.rs.mako' // DO NOT EDIT ! -//! This documentation was generated from *Tag Manager* crate version *0.1.12+20160209*, where *20160209* is the exact revision of the *tagmanager:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.12*. +//! This documentation was generated from *Tag Manager* crate version *0.1.13+20160310*, where *20160310* is the exact revision of the *tagmanager:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.13*. //! //! Everything else about the *Tag Manager* *v1* API can be found at the //! [official documentation site](https://developers.google.com/tag-manager/api/v1/). diff --git a/gen/tagmanager1/src/lib.rs.in b/gen/tagmanager1/src/lib.rs.in index 6916b42046..96b48b5aa3 100644 --- a/gen/tagmanager1/src/lib.rs.in +++ b/gen/tagmanager1/src/lib.rs.in @@ -160,7 +160,7 @@ impl<'a, C, A> TagManager TagManager { client: RefCell::new(client), auth: RefCell::new(authenticator), - _user_agent: "google-api-rust-client/0.1.12".to_string(), + _user_agent: "google-api-rust-client/0.1.13".to_string(), } } @@ -169,7 +169,7 @@ impl<'a, C, A> TagManager } /// Set the user-agent header field to use in all requests to the server. - /// It defaults to `google-api-rust-client/0.1.12`. + /// It defaults to `google-api-rust-client/0.1.13`. /// /// Returns the previously set user-agent. pub fn user_agent(&mut self, agent_name: String) -> String { @@ -2295,7 +2295,7 @@ impl<'a, C, A> AccountContainerListCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, ListContainersResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -2364,8 +2364,7 @@ impl<'a, C, A> AccountContainerListCall<'a, C, A> where C: BorrowMut AccountPermissionListCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, ListAccountUsersResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -2600,8 +2599,7 @@ impl<'a, C, A> AccountPermissionListCall<'a, C, A> where C: BorrowMut AccountContainerEnvironmentCreateCall<'a, C, A> where C: BorrowMu /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Environment)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -2856,8 +2854,7 @@ impl<'a, C, A> AccountContainerEnvironmentCreateCall<'a, C, A> where C: BorrowMu } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -3053,7 +3050,7 @@ impl<'a, C, A> AccountPermissionCreateCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, UserAccess)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -3133,8 +3130,7 @@ impl<'a, C, A> AccountPermissionCreateCall<'a, C, A> where C: BorrowMut AccountContainerEnvironmentDeleteCall<'a, C, A> where C: BorrowMu /// Perform the operation you have build so far. pub fn doit(mut self) -> Result { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -3385,8 +3381,7 @@ impl<'a, C, A> AccountContainerEnvironmentDeleteCall<'a, C, A> where C: BorrowMu } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Delete, &url) @@ -3563,7 +3558,7 @@ impl<'a, C, A> AccountPermissionDeleteCall<'a, C, A> where C: BorrowMut Result { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -3632,8 +3627,7 @@ impl<'a, C, A> AccountPermissionDeleteCall<'a, C, A> where C: BorrowMut AccountContainerGetCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, Container)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -3870,8 +3864,7 @@ impl<'a, C, A> AccountContainerGetCall<'a, C, A> where C: BorrowMut AccountContainerEnvironmentPatchCall<'a, C, A> where C: BorrowMut /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Environment)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -4143,8 +4136,7 @@ impl<'a, C, A> AccountContainerEnvironmentPatchCall<'a, C, A> where C: BorrowMut } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -4355,7 +4347,7 @@ impl<'a, C, A> AccountContainerVersionListCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, ListContainerVersionsResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -4431,8 +4423,7 @@ impl<'a, C, A> AccountContainerVersionListCall<'a, C, A> where C: BorrowMut AccountContainerTriggerUpdateCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, Trigger)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -4718,8 +4709,7 @@ impl<'a, C, A> AccountContainerTriggerUpdateCall<'a, C, A> where C: BorrowMut AccountContainerTriggerGetCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, Trigger)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -4998,8 +4988,7 @@ impl<'a, C, A> AccountContainerTriggerGetCall<'a, C, A> where C: BorrowMut AccountContainerDeleteCall<'a, C, A> where C: BorrowMut Result { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -5255,8 +5244,7 @@ impl<'a, C, A> AccountContainerDeleteCall<'a, C, A> where C: BorrowMut AccountContainerFolderDeleteCall<'a, C, A> where C: BorrowMut Result { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -5494,8 +5482,7 @@ impl<'a, C, A> AccountContainerFolderDeleteCall<'a, C, A> where C: BorrowMut AccountContainerCreateCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, Container)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -5758,8 +5745,7 @@ impl<'a, C, A> AccountContainerCreateCall<'a, C, A> where C: BorrowMut AccountContainerTagDeleteCall<'a, C, A> where C: BorrowMut Result { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -6010,8 +5996,7 @@ impl<'a, C, A> AccountContainerTagDeleteCall<'a, C, A> where C: BorrowMut AccountContainerFolderEntityListCall<'a, C, A> where C: BorrowMut /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, FolderEntities)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -6260,8 +6245,7 @@ impl<'a, C, A> AccountContainerFolderEntityListCall<'a, C, A> where C: BorrowMut } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -6449,7 +6433,7 @@ impl<'a, C, A> AccountContainerVersionUndeleteCall<'a, C, A> where C: BorrowMut< /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, ContainerVersion)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -6520,8 +6504,7 @@ impl<'a, C, A> AccountContainerVersionUndeleteCall<'a, C, A> where C: BorrowMut< } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Post, &url) @@ -6708,7 +6691,7 @@ impl<'a, C, A> AccountContainerEnvironmentListCall<'a, C, A> where C: BorrowMut< /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, ListEnvironmentsResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -6778,8 +6761,7 @@ impl<'a, C, A> AccountContainerEnvironmentListCall<'a, C, A> where C: BorrowMut< } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -6956,7 +6938,7 @@ impl<'a, C, A> AccountContainerTagListCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, ListTagsResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -7026,8 +7008,7 @@ impl<'a, C, A> AccountContainerTagListCall<'a, C, A> where C: BorrowMut AccountContainerVersionPublishCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, PublishContainerVersionResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -7281,8 +7262,7 @@ impl<'a, C, A> AccountContainerVersionPublishCall<'a, C, A> where C: BorrowMut AccountContainerFolderGetCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, Folder)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -7548,8 +7528,7 @@ impl<'a, C, A> AccountContainerFolderGetCall<'a, C, A> where C: BorrowMut AccountContainerEnvironmentGetCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, Environment)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -7808,8 +7787,7 @@ impl<'a, C, A> AccountContainerEnvironmentGetCall<'a, C, A> where C: BorrowMut AccountContainerTagCreateCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, Tag)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -8084,8 +8062,7 @@ impl<'a, C, A> AccountContainerTagCreateCall<'a, C, A> where C: BorrowMut AccountContainerTriggerListCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, ListTriggersResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -8345,8 +8322,7 @@ impl<'a, C, A> AccountContainerTriggerListCall<'a, C, A> where C: BorrowMut AccountContainerVersionDeleteCall<'a, C, A> where C: BorrowMut Result { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -8594,8 +8570,7 @@ impl<'a, C, A> AccountContainerVersionDeleteCall<'a, C, A> where C: BorrowMut AccountUpdateCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Account)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -8863,8 +8838,7 @@ impl<'a, C, A> AccountUpdateCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -9058,7 +9032,7 @@ impl<'a, C, A> AccountContainerVersionCreateCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, CreateContainerVersionResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -9139,8 +9113,7 @@ impl<'a, C, A> AccountContainerVersionCreateCall<'a, C, A> where C: BorrowMut AccountPermissionGetCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, UserAccess)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -9400,8 +9373,7 @@ impl<'a, C, A> AccountPermissionGetCall<'a, C, A> where C: BorrowMut AccountContainerMoveFolderUpdateCall<'a, C, A> where C: BorrowMut /// Perform the operation you have build so far. pub fn doit(mut self) -> Result { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -9688,8 +9660,7 @@ impl<'a, C, A> AccountContainerMoveFolderUpdateCall<'a, C, A> where C: BorrowMut } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -9904,7 +9875,7 @@ impl<'a, C, A> AccountContainerVersionRestoreCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, ContainerVersion)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -9975,8 +9946,7 @@ impl<'a, C, A> AccountContainerVersionRestoreCall<'a, C, A> where C: BorrowMut AccountContainerVariableCreateCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, Variable)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -10251,8 +10221,7 @@ impl<'a, C, A> AccountContainerVariableCreateCall<'a, C, A> where C: BorrowMut AccountContainerVariableListCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, ListVariablesResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -10512,8 +10481,7 @@ impl<'a, C, A> AccountContainerVariableListCall<'a, C, A> where C: BorrowMut AccountContainerTagGetCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, Tag)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -10762,8 +10730,7 @@ impl<'a, C, A> AccountContainerTagGetCall<'a, C, A> where C: BorrowMut AccountContainerVariableGetCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, Variable)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -11022,8 +10989,7 @@ impl<'a, C, A> AccountContainerVariableGetCall<'a, C, A> where C: BorrowMut AccountContainerTriggerDeleteCall<'a, C, A> where C: BorrowMut Result { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -11281,8 +11247,7 @@ impl<'a, C, A> AccountContainerTriggerDeleteCall<'a, C, A> where C: BorrowMut AccountContainerTriggerCreateCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, Trigger)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -11547,8 +11512,7 @@ impl<'a, C, A> AccountContainerTriggerCreateCall<'a, C, A> where C: BorrowMut AccountContainerFolderUpdateCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, Folder)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -11833,8 +11797,7 @@ impl<'a, C, A> AccountContainerFolderUpdateCall<'a, C, A> where C: BorrowMut AccountListCall<'a, C, A> where C: BorrowMut, A: o /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, ListAccountsResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -12086,8 +12049,7 @@ impl<'a, C, A> AccountListCall<'a, C, A> where C: BorrowMut, A: o } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -12251,7 +12213,7 @@ impl<'a, C, A> AccountPermissionUpdateCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, UserAccess)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -12332,8 +12294,7 @@ impl<'a, C, A> AccountPermissionUpdateCall<'a, C, A> where C: BorrowMut AccountContainerVariableDeleteCall<'a, C, A> where C: BorrowMut Result { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -12594,8 +12555,7 @@ impl<'a, C, A> AccountContainerVariableDeleteCall<'a, C, A> where C: BorrowMut AccountContainerReauthorizeEnvironmentUpdateCall<'a, C, A> where /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Environment)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -12862,8 +12822,7 @@ impl<'a, C, A> AccountContainerReauthorizeEnvironmentUpdateCall<'a, C, A> where } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -13062,7 +13021,7 @@ impl<'a, C, A> AccountGetCall<'a, C, A> where C: BorrowMut, A: oa /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Account)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -13131,8 +13090,7 @@ impl<'a, C, A> AccountGetCall<'a, C, A> where C: BorrowMut, A: oa } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -13308,7 +13266,7 @@ impl<'a, C, A> AccountContainerUpdateCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, Container)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -13392,8 +13350,7 @@ impl<'a, C, A> AccountContainerUpdateCall<'a, C, A> where C: BorrowMut AccountContainerTagUpdateCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, Tag)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -13685,8 +13642,7 @@ impl<'a, C, A> AccountContainerTagUpdateCall<'a, C, A> where C: BorrowMut AccountContainerEnvironmentUpdateCall<'a, C, A> where C: BorrowMu /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Environment)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -13988,8 +13944,7 @@ impl<'a, C, A> AccountContainerEnvironmentUpdateCall<'a, C, A> where C: BorrowMu } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -14203,7 +14158,7 @@ impl<'a, C, A> AccountContainerFolderCreateCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, Folder)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -14284,8 +14239,7 @@ impl<'a, C, A> AccountContainerFolderCreateCall<'a, C, A> where C: BorrowMut AccountContainerFolderListCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, ListFoldersResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -14545,8 +14499,7 @@ impl<'a, C, A> AccountContainerFolderListCall<'a, C, A> where C: BorrowMut AccountContainerVersionUpdateCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, ContainerVersion)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -14818,8 +14771,7 @@ impl<'a, C, A> AccountContainerVersionUpdateCall<'a, C, A> where C: BorrowMut AccountContainerVariableUpdateCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, Variable)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -15121,8 +15073,7 @@ impl<'a, C, A> AccountContainerVariableUpdateCall<'a, C, A> where C: BorrowMut AccountContainerVersionGetCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, ContainerVersion)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -15401,8 +15352,7 @@ impl<'a, C, A> AccountContainerVersionGetCall<'a, C, A> where C: BorrowMut"] description = "A complete library to interact with taskqueue (protocol v1beta2)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/taskqueue1_beta2-cli" @@ -17,18 +17,18 @@ keywords = ["taskqueue", "google", "cli"] name = "taskqueue1-beta2" [dependencies] -hyper = "0.7" -mime = "0.1.0" -serde = ">= 0.7.0" -serde_json = ">= 0.7.0" -yup-oauth2 = ">= 0.5.4" +hyper = "0.8" +mime = "0.2.0" +serde = "0.6.0" +serde_json = "0.6.0" +yup-oauth2 = ">= 0.5.6" strsim = "0.4" yup-hyper-mock = "1.0" clap = "2.0" [build-dependencies] -syntex = { version = ">= 0.23" } -serde_codegen = { version = ">= 0.6" } +syntex = { version = "= 0.28" } +serde_codegen = { version = "= 0.6.13" } [dependencies.google-taskqueue1_beta2] diff --git a/gen/taskqueue1_beta2-cli/README.md b/gen/taskqueue1_beta2-cli/README.md index 380947c301..214e477400 100644 --- a/gen/taskqueue1_beta2-cli/README.md +++ b/gen/taskqueue1_beta2-cli/README.md @@ -17,14 +17,14 @@ Everything else about the *taskqueue* API can be found at the You can download the pre-compiled 64bit binaries for the following platforms: -* ![icon](http://megaicons.net/static/img/icons_sizes/6/140/16/ubuntu-icon.png) [ubuntu](http://dl.byronimo.de/google.rs/cli/0.3.3/ubuntu/taskqueue1-beta2.tar.gz) -* ![icon](http://hydra-media.cursecdn.com/wow.gamepedia.com/a/a2/Apple-icon-16x16.png?version=25ddd67ac3dd3b634478e3978b76cb74) [osx](http://dl.byronimo.de/google.rs/cli/0.3.3/osx/taskqueue1-beta2.tar.gz) +* ![icon](http://megaicons.net/static/img/icons_sizes/6/140/16/ubuntu-icon.png) [ubuntu](http://dl.byronimo.de/google.rs/cli/0.3.4/ubuntu/taskqueue1-beta2.tar.gz) +* ![icon](http://hydra-media.cursecdn.com/wow.gamepedia.com/a/a2/Apple-icon-16x16.png?version=25ddd67ac3dd3b634478e3978b76cb74) [osx](http://dl.byronimo.de/google.rs/cli/0.3.4/osx/taskqueue1-beta2.tar.gz) Find the source code [on github](https://github.com/Byron/google-apis-rs/tree/master/gen/taskqueue1_beta2-cli). # Usage -This documentation was generated from the *taskqueue* API at revision *20141111*. The CLI is at version *0.3.3*. +This documentation was generated from the *taskqueue* API at revision *20141111*. The CLI is at version *0.3.4*. ```bash taskqueue1-beta2 [options] diff --git a/gen/taskqueue1_beta2-cli/mkdocs.yml b/gen/taskqueue1_beta2-cli/mkdocs.yml index 5131e520e9..43bdafefba 100644 --- a/gen/taskqueue1_beta2-cli/mkdocs.yml +++ b/gen/taskqueue1_beta2-cli/mkdocs.yml @@ -1,4 +1,4 @@ -site_name: taskqueue v0.3.3+20141111 +site_name: taskqueue v0.3.4+20141111 site_url: http://byron.github.io/google-apis-rs/google-taskqueue1_beta2-cli site_description: Write integrating applications with bcore diff --git a/gen/taskqueue1_beta2-cli/src/cmn.rs b/gen/taskqueue1_beta2-cli/src/cmn.rs index 188159ee80..ae86fdef65 100644 --- a/gen/taskqueue1_beta2-cli/src/cmn.rs +++ b/gen/taskqueue1_beta2-cli/src/cmn.rs @@ -414,7 +414,7 @@ impl TokenStorage for JsonTokenStorage { Err(err) => match err.kind() { io::ErrorKind::NotFound => Ok(()), - _ => Err(json::Error::Io(err)) + _ => Err(json::Error::IoError(err)) }, Ok(_) => Ok(()), } @@ -427,7 +427,7 @@ impl TokenStorage for JsonTokenStorage { Err(serde_err) => Err(serde_err), } }, - Err(io_err) => Err(json::Error::Io(io_err)) + Err(io_err) => Err(json::Error::IoError(io_err)) } } } @@ -444,7 +444,7 @@ impl TokenStorage for JsonTokenStorage { Err(io_err) => { match io_err.kind() { io::ErrorKind::NotFound => Ok(None), - _ => Err(json::Error::Io(io_err)) + _ => Err(json::Error::IoError(io_err)) } } } @@ -683,7 +683,7 @@ pub fn application_secret_from_directory(dir: &str, = json::from_str(json_console_secret).unwrap(); match json::to_writer_pretty(&mut f, &console_secret) { Err(serde_err) => match serde_err { - json::Error::Io(err) => err, + json::Error::IoError(err) => err, _ => panic!("Unexpected serde error: {:#?}", serde_err) }, Ok(_) => continue, @@ -696,7 +696,7 @@ pub fn application_secret_from_directory(dir: &str, }, Ok(f) => { match json::de::from_reader::<_, ConsoleApplicationSecret>(f) { - Err(json::Error::Io(err)) => + Err(json::Error::IoError(err)) => return secret_io_error(err), Err(json_err) => return Err(CLIError::Configuration( diff --git a/gen/taskqueue1_beta2-cli/src/main.rs b/gen/taskqueue1_beta2-cli/src/main.rs index 58f685a7e3..e4e24f849b 100644 --- a/gen/taskqueue1_beta2-cli/src/main.rs +++ b/gen/taskqueue1_beta2-cli/src/main.rs @@ -1009,7 +1009,7 @@ fn main() { let mut app = App::new("taskqueue1-beta2") .author("Sebastian Thiel ") - .version("0.3.3+20141111") + .version("0.3.4+20141111") .about("Lets you access a Google App Engine Pull Task Queue over REST.") .after_help("All documentation details can be found at http://byron.github.io/google-apis-rs/google_taskqueue1_beta2_cli") .arg(Arg::with_name("url") diff --git a/gen/taskqueue1_beta2/Cargo.toml b/gen/taskqueue1_beta2/Cargo.toml index 928c4470fe..75f34bae4f 100644 --- a/gen/taskqueue1_beta2/Cargo.toml +++ b/gen/taskqueue1_beta2/Cargo.toml @@ -4,7 +4,7 @@ [package] name = "google-taskqueue1_beta2" -version = "0.1.12+20141111" +version = "0.1.13+20141111" authors = ["Sebastian Thiel "] description = "A complete library to interact with taskqueue (protocol v1beta2)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/taskqueue1_beta2" @@ -16,14 +16,14 @@ build = "src/build.rs" [dependencies] -hyper = "0.7" -mime = "0.1.0" -serde = ">= 0.7.0" -serde_json = ">= 0.7.0" -yup-oauth2 = ">= 0.5.4" +hyper = "0.8" +mime = "0.2.0" +serde = "0.6.0" +serde_json = "0.6.0" +yup-oauth2 = ">= 0.5.6" url = ">= 0.5" [build-dependencies] -syntex = { version = ">= 0.23" } -serde_codegen = { version = ">= 0.6" } +syntex = { version = "= 0.28" } +serde_codegen = { version = "= 0.6.13" } diff --git a/gen/taskqueue1_beta2/README.md b/gen/taskqueue1_beta2/README.md index 19b38fed4d..e4d0f88bd5 100644 --- a/gen/taskqueue1_beta2/README.md +++ b/gen/taskqueue1_beta2/README.md @@ -5,7 +5,7 @@ DO NOT EDIT ! --> The `google-taskqueue1_beta2` library allows access to all features of the *Google taskqueue* service. -This documentation was generated from *taskqueue* crate version *0.1.12+20141111*, where *20141111* is the exact revision of the *taskqueue:v1beta2* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.12*. +This documentation was generated from *taskqueue* crate version *0.1.13+20141111*, where *20141111* is the exact revision of the *taskqueue:v1beta2* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.13*. Everything else about the *taskqueue* *v1_beta2* API can be found at the [official documentation site](https://developers.google.com/appengine/docs/python/taskqueue/rest). diff --git a/gen/taskqueue1_beta2/src/cmn.rs b/gen/taskqueue1_beta2/src/cmn.rs index 87b91a8986..c69621da55 100644 --- a/gen/taskqueue1_beta2/src/cmn.rs +++ b/gen/taskqueue1_beta2/src/cmn.rs @@ -12,7 +12,7 @@ use mime::{Mime, TopLevel, SubLevel, Attr, Value}; use oauth2::{TokenType, Retry, self}; use hyper; use hyper::header::{ContentType, ContentLength, Headers, UserAgent, Authorization, Header, - HeaderFormat}; + HeaderFormat, Bearer}; use hyper::http::h1::LINE_ENDING; use hyper::method::Method; use hyper::status::StatusCode; @@ -634,7 +634,7 @@ pub struct ResumableUploadHelper<'a, A: 'a> { pub start_at: Option, pub auth: &'a mut A, pub user_agent: &'a str, - pub auth_header: Authorization, + pub auth_header: Authorization, pub url: &'a str, pub reader: &'a mut ReadSeek, pub media_type: Mime, diff --git a/gen/taskqueue1_beta2/src/lib.rs b/gen/taskqueue1_beta2/src/lib.rs index e1ee867872..7ee28e38bb 100644 --- a/gen/taskqueue1_beta2/src/lib.rs +++ b/gen/taskqueue1_beta2/src/lib.rs @@ -2,7 +2,7 @@ // This file was generated automatically from 'src/mako/api/lib.rs.mako' // DO NOT EDIT ! -//! This documentation was generated from *taskqueue* crate version *0.1.12+20141111*, where *20141111* is the exact revision of the *taskqueue:v1beta2* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.12*. +//! This documentation was generated from *taskqueue* crate version *0.1.13+20141111*, where *20141111* is the exact revision of the *taskqueue:v1beta2* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.13*. //! //! Everything else about the *taskqueue* *v1_beta2* API can be found at the //! [official documentation site](https://developers.google.com/appengine/docs/python/taskqueue/rest). diff --git a/gen/taskqueue1_beta2/src/lib.rs.in b/gen/taskqueue1_beta2/src/lib.rs.in index 000d67f2a5..366f492401 100644 --- a/gen/taskqueue1_beta2/src/lib.rs.in +++ b/gen/taskqueue1_beta2/src/lib.rs.in @@ -133,7 +133,7 @@ impl<'a, C, A> Taskqueue Taskqueue { client: RefCell::new(client), auth: RefCell::new(authenticator), - _user_agent: "google-api-rust-client/0.1.12".to_string(), + _user_agent: "google-api-rust-client/0.1.13".to_string(), } } @@ -145,7 +145,7 @@ impl<'a, C, A> Taskqueue } /// Set the user-agent header field to use in all requests to the server. - /// It defaults to `google-api-rust-client/0.1.12`. + /// It defaults to `google-api-rust-client/0.1.13`. /// /// Returns the previously set user-agent. pub fn user_agent(&mut self, agent_name: String) -> String { @@ -637,7 +637,7 @@ impl<'a, C, A> TaskqueueGetCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, TaskQueue)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -710,8 +710,7 @@ impl<'a, C, A> TaskqueueGetCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -901,7 +900,7 @@ impl<'a, C, A> TaskLeaseCall<'a, C, A> where C: BorrowMut, A: oau /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Tasks)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -979,8 +978,7 @@ impl<'a, C, A> TaskLeaseCall<'a, C, A> where C: BorrowMut, A: oau } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Post, &url) @@ -1198,7 +1196,7 @@ impl<'a, C, A> TaskInsertCall<'a, C, A> where C: BorrowMut, A: oa /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Task)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -1279,8 +1277,7 @@ impl<'a, C, A> TaskInsertCall<'a, C, A> where C: BorrowMut, A: oa } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -1471,7 +1468,7 @@ impl<'a, C, A> TaskDeleteCall<'a, C, A> where C: BorrowMut, A: oa /// Perform the operation you have build so far. pub fn doit(mut self) -> Result { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -1541,8 +1538,7 @@ impl<'a, C, A> TaskDeleteCall<'a, C, A> where C: BorrowMut, A: oa } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Delete, &url) @@ -1728,7 +1724,7 @@ impl<'a, C, A> TaskPatchCall<'a, C, A> where C: BorrowMut, A: oau /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Task)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -1811,8 +1807,7 @@ impl<'a, C, A> TaskPatchCall<'a, C, A> where C: BorrowMut, A: oau } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -2020,7 +2015,7 @@ impl<'a, C, A> TaskListCall<'a, C, A> where C: BorrowMut, A: oaut /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Tasks2)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -2090,8 +2085,7 @@ impl<'a, C, A> TaskListCall<'a, C, A> where C: BorrowMut, A: oaut } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -2269,7 +2263,7 @@ impl<'a, C, A> TaskGetCall<'a, C, A> where C: BorrowMut, A: oauth /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Task)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -2340,8 +2334,7 @@ impl<'a, C, A> TaskGetCall<'a, C, A> where C: BorrowMut, A: oauth } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -2537,7 +2530,7 @@ impl<'a, C, A> TaskUpdateCall<'a, C, A> where C: BorrowMut, A: oa /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Task)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -2620,8 +2613,7 @@ impl<'a, C, A> TaskUpdateCall<'a, C, A> where C: BorrowMut, A: oa } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); diff --git a/gen/tasks1-cli/Cargo.toml b/gen/tasks1-cli/Cargo.toml index 0978850eaa..b7f0f37265 100644 --- a/gen/tasks1-cli/Cargo.toml +++ b/gen/tasks1-cli/Cargo.toml @@ -4,7 +4,7 @@ [package] name = "google-tasks1-cli" -version = "0.3.3+20141121" +version = "0.3.4+20141121" authors = ["Sebastian Thiel "] description = "A complete library to interact with tasks (protocol v1)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/tasks1-cli" @@ -17,18 +17,18 @@ keywords = ["tasks", "google", "cli"] name = "tasks1" [dependencies] -hyper = "0.7" -mime = "0.1.0" -serde = ">= 0.7.0" -serde_json = ">= 0.7.0" -yup-oauth2 = ">= 0.5.4" +hyper = "0.8" +mime = "0.2.0" +serde = "0.6.0" +serde_json = "0.6.0" +yup-oauth2 = ">= 0.5.6" strsim = "0.4" yup-hyper-mock = "1.0" clap = "2.0" [build-dependencies] -syntex = { version = ">= 0.23" } -serde_codegen = { version = ">= 0.6" } +syntex = { version = "= 0.28" } +serde_codegen = { version = "= 0.6.13" } [dependencies.google-tasks1] diff --git a/gen/tasks1-cli/README.md b/gen/tasks1-cli/README.md index 096e7522ff..3f1e236957 100644 --- a/gen/tasks1-cli/README.md +++ b/gen/tasks1-cli/README.md @@ -17,14 +17,14 @@ Everything else about the *tasks* API can be found at the You can download the pre-compiled 64bit binaries for the following platforms: -* ![icon](http://megaicons.net/static/img/icons_sizes/6/140/16/ubuntu-icon.png) [ubuntu](http://dl.byronimo.de/google.rs/cli/0.3.3/ubuntu/tasks1.tar.gz) -* ![icon](http://hydra-media.cursecdn.com/wow.gamepedia.com/a/a2/Apple-icon-16x16.png?version=25ddd67ac3dd3b634478e3978b76cb74) [osx](http://dl.byronimo.de/google.rs/cli/0.3.3/osx/tasks1.tar.gz) +* ![icon](http://megaicons.net/static/img/icons_sizes/6/140/16/ubuntu-icon.png) [ubuntu](http://dl.byronimo.de/google.rs/cli/0.3.4/ubuntu/tasks1.tar.gz) +* ![icon](http://hydra-media.cursecdn.com/wow.gamepedia.com/a/a2/Apple-icon-16x16.png?version=25ddd67ac3dd3b634478e3978b76cb74) [osx](http://dl.byronimo.de/google.rs/cli/0.3.4/osx/tasks1.tar.gz) Find the source code [on github](https://github.com/Byron/google-apis-rs/tree/master/gen/tasks1-cli). # Usage -This documentation was generated from the *tasks* API at revision *20141121*. The CLI is at version *0.3.3*. +This documentation was generated from the *tasks* API at revision *20141121*. The CLI is at version *0.3.4*. ```bash tasks1 [options] diff --git a/gen/tasks1-cli/mkdocs.yml b/gen/tasks1-cli/mkdocs.yml index 45c5e9af18..9d22c81fe1 100644 --- a/gen/tasks1-cli/mkdocs.yml +++ b/gen/tasks1-cli/mkdocs.yml @@ -1,4 +1,4 @@ -site_name: tasks v0.3.3+20141121 +site_name: tasks v0.3.4+20141121 site_url: http://byron.github.io/google-apis-rs/google-tasks1-cli site_description: Write integrating applications with bcore diff --git a/gen/tasks1-cli/src/cmn.rs b/gen/tasks1-cli/src/cmn.rs index 188159ee80..ae86fdef65 100644 --- a/gen/tasks1-cli/src/cmn.rs +++ b/gen/tasks1-cli/src/cmn.rs @@ -414,7 +414,7 @@ impl TokenStorage for JsonTokenStorage { Err(err) => match err.kind() { io::ErrorKind::NotFound => Ok(()), - _ => Err(json::Error::Io(err)) + _ => Err(json::Error::IoError(err)) }, Ok(_) => Ok(()), } @@ -427,7 +427,7 @@ impl TokenStorage for JsonTokenStorage { Err(serde_err) => Err(serde_err), } }, - Err(io_err) => Err(json::Error::Io(io_err)) + Err(io_err) => Err(json::Error::IoError(io_err)) } } } @@ -444,7 +444,7 @@ impl TokenStorage for JsonTokenStorage { Err(io_err) => { match io_err.kind() { io::ErrorKind::NotFound => Ok(None), - _ => Err(json::Error::Io(io_err)) + _ => Err(json::Error::IoError(io_err)) } } } @@ -683,7 +683,7 @@ pub fn application_secret_from_directory(dir: &str, = json::from_str(json_console_secret).unwrap(); match json::to_writer_pretty(&mut f, &console_secret) { Err(serde_err) => match serde_err { - json::Error::Io(err) => err, + json::Error::IoError(err) => err, _ => panic!("Unexpected serde error: {:#?}", serde_err) }, Ok(_) => continue, @@ -696,7 +696,7 @@ pub fn application_secret_from_directory(dir: &str, }, Ok(f) => { match json::de::from_reader::<_, ConsoleApplicationSecret>(f) { - Err(json::Error::Io(err)) => + Err(json::Error::IoError(err)) => return secret_io_error(err), Err(json_err) => return Err(CLIError::Configuration( diff --git a/gen/tasks1-cli/src/main.rs b/gen/tasks1-cli/src/main.rs index 0947c7b623..2fcf76dbd2 100644 --- a/gen/tasks1-cli/src/main.rs +++ b/gen/tasks1-cli/src/main.rs @@ -1552,7 +1552,7 @@ fn main() { let mut app = App::new("tasks1") .author("Sebastian Thiel ") - .version("0.3.3+20141121") + .version("0.3.4+20141121") .about("Lets you manage your tasks and task lists.") .after_help("All documentation details can be found at http://byron.github.io/google-apis-rs/google_tasks1_cli") .arg(Arg::with_name("url") diff --git a/gen/tasks1/Cargo.toml b/gen/tasks1/Cargo.toml index 73854e1347..bcb292e8d8 100644 --- a/gen/tasks1/Cargo.toml +++ b/gen/tasks1/Cargo.toml @@ -4,7 +4,7 @@ [package] name = "google-tasks1" -version = "0.1.12+20141121" +version = "0.1.13+20141121" authors = ["Sebastian Thiel "] description = "A complete library to interact with tasks (protocol v1)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/tasks1" @@ -16,14 +16,14 @@ build = "src/build.rs" [dependencies] -hyper = "0.7" -mime = "0.1.0" -serde = ">= 0.7.0" -serde_json = ">= 0.7.0" -yup-oauth2 = ">= 0.5.4" +hyper = "0.8" +mime = "0.2.0" +serde = "0.6.0" +serde_json = "0.6.0" +yup-oauth2 = ">= 0.5.6" url = ">= 0.5" [build-dependencies] -syntex = { version = ">= 0.23" } -serde_codegen = { version = ">= 0.6" } +syntex = { version = "= 0.28" } +serde_codegen = { version = "= 0.6.13" } diff --git a/gen/tasks1/README.md b/gen/tasks1/README.md index 0036797ced..054ec632d5 100644 --- a/gen/tasks1/README.md +++ b/gen/tasks1/README.md @@ -5,7 +5,7 @@ DO NOT EDIT ! --> The `google-tasks1` library allows access to all features of the *Google tasks* service. -This documentation was generated from *tasks* crate version *0.1.12+20141121*, where *20141121* is the exact revision of the *tasks:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.12*. +This documentation was generated from *tasks* crate version *0.1.13+20141121*, where *20141121* is the exact revision of the *tasks:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.13*. Everything else about the *tasks* *v1* API can be found at the [official documentation site](https://developers.google.com/google-apps/tasks/firstapp). diff --git a/gen/tasks1/src/cmn.rs b/gen/tasks1/src/cmn.rs index 87b91a8986..c69621da55 100644 --- a/gen/tasks1/src/cmn.rs +++ b/gen/tasks1/src/cmn.rs @@ -12,7 +12,7 @@ use mime::{Mime, TopLevel, SubLevel, Attr, Value}; use oauth2::{TokenType, Retry, self}; use hyper; use hyper::header::{ContentType, ContentLength, Headers, UserAgent, Authorization, Header, - HeaderFormat}; + HeaderFormat, Bearer}; use hyper::http::h1::LINE_ENDING; use hyper::method::Method; use hyper::status::StatusCode; @@ -634,7 +634,7 @@ pub struct ResumableUploadHelper<'a, A: 'a> { pub start_at: Option, pub auth: &'a mut A, pub user_agent: &'a str, - pub auth_header: Authorization, + pub auth_header: Authorization, pub url: &'a str, pub reader: &'a mut ReadSeek, pub media_type: Mime, diff --git a/gen/tasks1/src/lib.rs b/gen/tasks1/src/lib.rs index bd15d79db0..a26b05161e 100644 --- a/gen/tasks1/src/lib.rs +++ b/gen/tasks1/src/lib.rs @@ -2,7 +2,7 @@ // This file was generated automatically from 'src/mako/api/lib.rs.mako' // DO NOT EDIT ! -//! This documentation was generated from *tasks* crate version *0.1.12+20141121*, where *20141121* is the exact revision of the *tasks:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.12*. +//! This documentation was generated from *tasks* crate version *0.1.13+20141121*, where *20141121* is the exact revision of the *tasks:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.13*. //! //! Everything else about the *tasks* *v1* API can be found at the //! [official documentation site](https://developers.google.com/google-apps/tasks/firstapp). diff --git a/gen/tasks1/src/lib.rs.in b/gen/tasks1/src/lib.rs.in index b637b1a6e3..dd27515438 100644 --- a/gen/tasks1/src/lib.rs.in +++ b/gen/tasks1/src/lib.rs.in @@ -141,7 +141,7 @@ impl<'a, C, A> TasksHub TasksHub { client: RefCell::new(client), auth: RefCell::new(authenticator), - _user_agent: "google-api-rust-client/0.1.12".to_string(), + _user_agent: "google-api-rust-client/0.1.13".to_string(), } } @@ -153,7 +153,7 @@ impl<'a, C, A> TasksHub } /// Set the user-agent header field to use in all requests to the server. - /// It defaults to `google-api-rust-client/0.1.12`. + /// It defaults to `google-api-rust-client/0.1.13`. /// /// Returns the previously set user-agent. pub fn user_agent(&mut self, agent_name: String) -> String { @@ -756,7 +756,7 @@ impl<'a, C, A> TaskListCall<'a, C, A> where C: BorrowMut, A: oaut /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Tasks)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -855,8 +855,7 @@ impl<'a, C, A> TaskListCall<'a, C, A> where C: BorrowMut, A: oaut } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -1100,7 +1099,7 @@ impl<'a, C, A> TaskUpdateCall<'a, C, A> where C: BorrowMut, A: oa /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Task)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -1181,8 +1180,7 @@ impl<'a, C, A> TaskUpdateCall<'a, C, A> where C: BorrowMut, A: oa } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -1379,7 +1377,7 @@ impl<'a, C, A> TaskPatchCall<'a, C, A> where C: BorrowMut, A: oau /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Task)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -1460,8 +1458,7 @@ impl<'a, C, A> TaskPatchCall<'a, C, A> where C: BorrowMut, A: oau } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -1650,7 +1647,7 @@ impl<'a, C, A> TaskClearCall<'a, C, A> where C: BorrowMut, A: oau /// Perform the operation you have build so far. pub fn doit(mut self) -> Result { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -1718,8 +1715,7 @@ impl<'a, C, A> TaskClearCall<'a, C, A> where C: BorrowMut, A: oau } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Post, &url) @@ -1880,7 +1876,7 @@ impl<'a, C, A> TaskMoveCall<'a, C, A> where C: BorrowMut, A: oaut /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Task)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -1956,8 +1952,7 @@ impl<'a, C, A> TaskMoveCall<'a, C, A> where C: BorrowMut, A: oaut } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Post, &url) @@ -2148,7 +2143,7 @@ impl<'a, C, A> TaskDeleteCall<'a, C, A> where C: BorrowMut, A: oa /// Perform the operation you have build so far. pub fn doit(mut self) -> Result { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -2217,8 +2212,7 @@ impl<'a, C, A> TaskDeleteCall<'a, C, A> where C: BorrowMut, A: oa } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Delete, &url) @@ -2385,7 +2379,7 @@ impl<'a, C, A> TaskGetCall<'a, C, A> where C: BorrowMut, A: oauth /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Task)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -2455,8 +2449,7 @@ impl<'a, C, A> TaskGetCall<'a, C, A> where C: BorrowMut, A: oauth } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -2643,7 +2636,7 @@ impl<'a, C, A> TaskInsertCall<'a, C, A> where C: BorrowMut, A: oa /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Task)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -2729,8 +2722,7 @@ impl<'a, C, A> TaskInsertCall<'a, C, A> where C: BorrowMut, A: oa } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -2926,7 +2918,7 @@ impl<'a, C, A> TasklistListCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, TaskLists)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -2979,8 +2971,7 @@ impl<'a, C, A> TasklistListCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -3157,7 +3148,7 @@ impl<'a, C, A> TasklistUpdateCall<'a, C, A> where C: BorrowMut, A /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, TaskList)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -3237,8 +3228,7 @@ impl<'a, C, A> TasklistUpdateCall<'a, C, A> where C: BorrowMut, A } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -3417,7 +3407,7 @@ impl<'a, C, A> TasklistDeleteCall<'a, C, A> where C: BorrowMut, A /// Perform the operation you have build so far. pub fn doit(mut self) -> Result { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -3485,8 +3475,7 @@ impl<'a, C, A> TasklistDeleteCall<'a, C, A> where C: BorrowMut, A } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Delete, &url) @@ -3649,7 +3638,7 @@ impl<'a, C, A> TasklistPatchCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, TaskList)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -3729,8 +3718,7 @@ impl<'a, C, A> TasklistPatchCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -3915,7 +3903,7 @@ impl<'a, C, A> TasklistInsertCall<'a, C, A> where C: BorrowMut, A /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, TaskList)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -3973,8 +3961,7 @@ impl<'a, C, A> TasklistInsertCall<'a, C, A> where C: BorrowMut, A } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -4143,7 +4130,7 @@ impl<'a, C, A> TasklistGetCall<'a, C, A> where C: BorrowMut, A: o /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, TaskList)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -4212,8 +4199,7 @@ impl<'a, C, A> TasklistGetCall<'a, C, A> where C: BorrowMut, A: o } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) diff --git a/gen/toolresults1_beta3-cli/Cargo.toml b/gen/toolresults1_beta3-cli/Cargo.toml new file mode 100644 index 0000000000..35d0711cc5 --- /dev/null +++ b/gen/toolresults1_beta3-cli/Cargo.toml @@ -0,0 +1,35 @@ +# DO NOT EDIT ! +# This file was generated automatically from 'src/mako/Cargo.toml.mako' +# DO NOT EDIT ! +[package] + +name = "google-toolresults1_beta3-cli" +version = "0.3.4+20160408" +authors = ["Sebastian Thiel "] +description = "A complete library to interact with Tool Results (protocol v1beta3)" +repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/toolresults1_beta3-cli" +homepage = "https://developers.google.com/cloud-test-lab/" +documentation = "http://byron.github.io/google-apis-rs/google_toolresults1_beta3_cli" +license = "MIT" +keywords = ["toolresults", "google", "cli"] + +[[bin]] +name = "toolresults1-beta3" + +[dependencies] +hyper = "0.8" +mime = "0.2.0" +serde = "0.6.0" +serde_json = "0.6.0" +yup-oauth2 = ">= 0.5.6" +strsim = "0.4" +yup-hyper-mock = "1.0" +clap = "2.0" + +[build-dependencies] +syntex = { version = "= 0.28" } +serde_codegen = { version = "= 0.6.13" } + + +[dependencies.google-toolresults1_beta3] +path = "../toolresults1_beta3" diff --git a/gen/toolresults1_beta3-cli/LICENSE.md b/gen/toolresults1_beta3-cli/LICENSE.md new file mode 100644 index 0000000000..ff523b4547 --- /dev/null +++ b/gen/toolresults1_beta3-cli/LICENSE.md @@ -0,0 +1,30 @@ + +The MIT License (MIT) +===================== + +Copyright © `2015-2016` `Sebastian Thiel` + +Permission is hereby granted, free of charge, to any person +obtaining a copy of this software and associated documentation +files (the “Software”), to deal in the Software without +restriction, including without limitation the rights to use, +copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following +conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. diff --git a/gen/toolresults1_beta3-cli/README.md b/gen/toolresults1_beta3-cli/README.md new file mode 100644 index 0000000000..7e5744d51a --- /dev/null +++ b/gen/toolresults1_beta3-cli/README.md @@ -0,0 +1,127 @@ + +The `toolresults1-beta3` command-line interface *(CLI)* allows to use most features of the *Google Tool Results* service from the comfort of your terminal. + +By default all output is printed to standard out, but flags can be set to direct it into a file independent of your shell's +capabilities. Errors will be printed to standard error, and cause the program's exit code to be non-zero. + +If data-structures are requested, these will be returned as pretty-printed JSON, to be useful as input to other tools. + +Everything else about the *Tool Results* API can be found at the +[official documentation site](https://developers.google.com/cloud-test-lab/). + +# Downloads + +You can download the pre-compiled 64bit binaries for the following platforms: + +* ![icon](http://megaicons.net/static/img/icons_sizes/6/140/16/ubuntu-icon.png) [ubuntu](http://dl.byronimo.de/google.rs/cli/0.3.4/ubuntu/toolresults1-beta3.tar.gz) +* ![icon](http://hydra-media.cursecdn.com/wow.gamepedia.com/a/a2/Apple-icon-16x16.png?version=25ddd67ac3dd3b634478e3978b76cb74) [osx](http://dl.byronimo.de/google.rs/cli/0.3.4/osx/toolresults1-beta3.tar.gz) + +Find the source code [on github](https://github.com/Byron/google-apis-rs/tree/master/gen/toolresults1_beta3-cli). + +# Usage + +This documentation was generated from the *Tool Results* API at revision *20160408*. The CLI is at version *0.3.4*. + +```bash +toolresults1-beta3 [options] + projects + get-settings [-p ]... [-o ] + histories-create (-r )... [-p ]... [-o ] + histories-executions-create (-r )... [-p ]... [-o ] + histories-executions-get [-p ]... [-o ] + histories-executions-list [-p ]... [-o ] + histories-executions-patch (-r )... [-p ]... [-o ] + histories-executions-steps-create (-r )... [-p ]... [-o ] + histories-executions-steps-get [-p ]... [-o ] + histories-executions-steps-list [-p ]... [-o ] + histories-executions-steps-patch (-r )... [-p ]... [-o ] + histories-executions-steps-publish-xunit-xml-files (-r )... [-p ]... [-o ] + histories-executions-steps-thumbnails-list [-p ]... [-o ] + histories-get [-p ]... [-o ] + histories-list [-p ]... [-o ] + initialize-settings [-p ]... [-o ] + toolresults1-beta3 --help + +Configuration: + [--scope ]... + Specify the authentication a method should be executed in. Each scope + requires the user to grant this application permission to use it. + If unset, it defaults to the shortest scope url for a particular method. + --config-dir + A directory into which we will store our persistent data. Defaults to + a user-writable directory that we will create during the first invocation. + [default: ~/.google-service-cli] + --debug + Output all server communication to standard error. `tx` and `rx` are placed + into the same stream. + --debug-auth + Output all communication related to authentication to standard error. `tx` + and `rx` are placed into the same stream. + +``` + +# Configuration + +The program will store all persistent data in the `~/.google-service-cli` directory in *JSON* files prefixed with `toolresults1-beta3-`. You can change the directory used to store configuration with the `--config-dir` flag on a per-invocation basis. + +More information about the various kinds of persistent data are given in the following paragraphs. + +# Authentication + +Most APIs require a user to authenticate any request. If this is the case, the [scope][scopes] determines the +set of permissions granted. The granularity of these is usually no more than *read-only* or *full-access*. + +If not set, the system will automatically select the smallest feasible scope, e.g. when invoking a +method that is read-only, it will ask only for a read-only scope. +You may use the `--scope` flag to specify a scope directly. +All applicable scopes are documented in the respective method's CLI documentation. + +The first time a scope is used, the user is asked for permission. Follow the instructions given +by the CLI to grant permissions, or to decline. + +If a scope was authenticated by the user, the respective information will be stored as *JSON* in the configuration +directory, e.g. `~/.google-service-cli/toolresults1-beta3-token-.json`. No manual management of these tokens +is necessary. + +To revoke granted authentication, please refer to the [official documentation][revoke-access]. + +# Application Secrets + +In order to allow any application to use Google services, it will need to be registered using the +[Google Developer Console][google-dev-console]. APIs the application may use are then enabled for it +one by one. Most APIs can be used for free and have a daily quota. + +To allow more comfortable usage of the CLI without forcing anyone to register an own application, the CLI +comes with a default application secret that is configured accordingly. This also means that heavy usage +all around the world may deplete the daily quota. + +You can workaround this limitation by putting your own secrets file at this location: +`~/.google-service-cli/toolresults1-beta3-secret.json`, assuming that the required *toolresults* API +was enabled for it. Such a secret file can be downloaded in the *Google Developer Console* at +*APIs & auth -> Credentials -> Download JSON* and used as is. + +Learn more about how to setup Google projects and enable APIs using the [official documentation][google-project-new]. + + +# Debugging + +Even though the CLI does its best to provide usable error messages, sometimes it might be desirable to know +what exactly led to a particular issue. This is done by allowing all client-server communication to be +output to standard error *as-is*. + +The `--debug` flag will print all client-server communication to standard error, whereas the `--debug-auth` flag +will cause all communication related to authentication to standard error. +If the `--debug` flag is set, error-results will be debug-printed, possibly yielding more information about the +issue at hand. + +You may consider redirecting standard error into a file for ease of use, e.g. `toolresults1-beta3 --debug [options] 2>debug.txt`. + + +[scopes]: https://developers.google.com/+/api/oauth#scopes +[revoke-access]: http://webapps.stackexchange.com/a/30849 +[google-dev-console]: https://console.developers.google.com/ +[google-project-new]: https://developers.google.com/console/help/new/ \ No newline at end of file diff --git a/gen/toolresults1_beta3-cli/mkdocs.yml b/gen/toolresults1_beta3-cli/mkdocs.yml new file mode 100644 index 0000000000..c05ba0914a --- /dev/null +++ b/gen/toolresults1_beta3-cli/mkdocs.yml @@ -0,0 +1,31 @@ +site_name: Tool Results v0.3.4+20160408 +site_url: http://byron.github.io/google-apis-rs/google-toolresults1_beta3-cli +site_description: Write integrating applications with bcore + +repo_url: https://github.com/Byron/google-apis-rs/tree/master/gen/toolresults1_beta3-cli + +docs_dir: docs +site_dir: build_html + +pages: +- ['index.md', 'Home'] +- ['projects_get-settings.md', 'Projects', 'Get Settings'] +- ['projects_histories-create.md', 'Projects', 'Histories Create'] +- ['projects_histories-executions-create.md', 'Projects', 'Histories Executions Create'] +- ['projects_histories-executions-get.md', 'Projects', 'Histories Executions Get'] +- ['projects_histories-executions-list.md', 'Projects', 'Histories Executions List'] +- ['projects_histories-executions-patch.md', 'Projects', 'Histories Executions Patch'] +- ['projects_histories-executions-steps-create.md', 'Projects', 'Histories Executions Steps Create'] +- ['projects_histories-executions-steps-get.md', 'Projects', 'Histories Executions Steps Get'] +- ['projects_histories-executions-steps-list.md', 'Projects', 'Histories Executions Steps List'] +- ['projects_histories-executions-steps-patch.md', 'Projects', 'Histories Executions Steps Patch'] +- ['projects_histories-executions-steps-publish-xunit-xml-files.md', 'Projects', 'Histories Executions Steps Publish Xunit Xml Files'] +- ['projects_histories-executions-steps-thumbnails-list.md', 'Projects', 'Histories Executions Steps Thumbnails List'] +- ['projects_histories-get.md', 'Projects', 'Histories Get'] +- ['projects_histories-list.md', 'Projects', 'Histories List'] +- ['projects_initialize-settings.md', 'Projects', 'Initialize Settings'] + +theme: readthedocs + +copyright: Copyright © 2015-2016, `Sebastian Thiel` + diff --git a/gen/toolresults1_beta3-cli/src/cmn.rs b/gen/toolresults1_beta3-cli/src/cmn.rs new file mode 100644 index 0000000000..ae86fdef65 --- /dev/null +++ b/gen/toolresults1_beta3-cli/src/cmn.rs @@ -0,0 +1,721 @@ +// COPY OF 'src/rust/cli/cmn.rs' +// DO NOT EDIT +use oauth2::{ApplicationSecret, ConsoleApplicationSecret, TokenStorage, Token}; +use serde_json as json; +use serde_json::value::Value; +use mime::Mime; +use clap::{App, SubCommand}; +use strsim; + +use std::fs; +use std::env; +use std::io; +use std::fmt; +use std::path::{Path, PathBuf}; +use std::str::FromStr; +use std::string::ToString; +use std::io::{Write, Read, stdout}; + +use std::default::Default; + +const FIELD_SEP: char = '.'; + + +pub enum ComplexType { + Pod, + Vec, + Map, +} + + // Null, + // Bool(bool), + // I64(i64), + // U64(u64), + // F64(f64), + // String(String), + +pub enum JsonType { + Boolean, + Int, + Uint, + Float, + String, +} + +pub struct JsonTypeInfo { + pub jtype: JsonType, + pub ctype: ComplexType, +} + +// Based on @erickt user comment. Thanks for the idea ! +// Remove all keys whose values are null from given value (changed in place) +pub fn remove_json_null_values(value: &mut Value) { + match *value { + Value::Object(ref mut map) => { + let mut for_removal = Vec::new(); + + for (key, mut value) in map.iter_mut() { + if value.is_null() { + for_removal.push(key.clone()); + } else { + remove_json_null_values(&mut value); + } + } + + for key in &for_removal { + map.remove(key); + } + } + _ => {} + } +} + +fn did_you_mean<'a>(v: &str, possible_values: &[&'a str]) -> Option<&'a str> { + + let mut candidate: Option<(f64, &str)> = None; + for pv in possible_values { + let confidence = strsim::jaro_winkler(v, pv); + if confidence > 0.8 && (candidate.is_none() || (candidate.as_ref().unwrap().0 < confidence)) { + candidate = Some((confidence, pv)); + } + } + match candidate { + None => None, + Some((_, candidate)) => Some(candidate), + } +} + +pub enum CallType { + Upload(UploadProtocol), + Standard, +} + +arg_enum!{ + pub enum UploadProtocol { + Simple, + Resumable + } +} + +impl AsRef for UploadProtocol { + fn as_ref(&self) -> &str { + match *self { + UploadProtocol::Simple => "simple", + UploadProtocol::Resumable => "resumable" + } + } +} + +impl AsRef for CallType { + fn as_ref(&self) -> &str { + match *self { + CallType::Upload(ref proto) => proto.as_ref(), + CallType::Standard => "standard-request" + } + } +} + +#[derive(Clone, Default)] +pub struct FieldCursor(Vec); + +impl ToString for FieldCursor { + fn to_string(&self) -> String { + self.0.join(".") + } +} + +impl From<&'static str> for FieldCursor { + fn from(value: &'static str) -> FieldCursor { + let mut res = FieldCursor::default(); + res.set(value).unwrap(); + res + } +} + +impl FieldCursor { + pub fn set(&mut self, value: &str) -> Result<(), CLIError> { + if value.len() == 0 { + return Err(CLIError::Field(FieldError::Empty)) + } + + let mut first_is_field_sep = false; + let mut char_count: usize = 0; + let mut last_c = FIELD_SEP; + let mut num_conscutive_field_seps = 0; + + let mut field = String::new(); + let mut fields = self.0.clone(); + + let push_field = |fs: &mut Vec, f: &mut String| { + if f.len() > 0 { + fs.push(f.clone()); + f.truncate(0); + } + }; + + for (cid, c) in value.chars().enumerate() { + char_count += 1; + + if c == FIELD_SEP { + if cid == 0 { + first_is_field_sep = true; + } + num_conscutive_field_seps += 1; + if cid > 0 && last_c == FIELD_SEP { + if fields.pop().is_none() { + return Err(CLIError::Field(FieldError::PopOnEmpty(value.to_string()))) + } + } else { + push_field(&mut fields, &mut field); + } + } else { + num_conscutive_field_seps = 0; + if cid == 1 { + if first_is_field_sep { + fields.truncate(0); + } + } + field.push(c); + } + + last_c = c; + } + + push_field(&mut fields, &mut field); + + if char_count == 1 && first_is_field_sep { + fields.truncate(0); + } + if char_count > 1 && num_conscutive_field_seps == 1 { + return Err(CLIError::Field(FieldError::TrailingFieldSep(value.to_string()))) + } + + self.0 = fields; + Ok(()) + } + + pub fn did_you_mean(value: &str, possible_values: &[&str]) -> Option { + if value.len() == 0 { + return None + } + + let mut last_c = FIELD_SEP; + + let mut field = String::new(); + let mut output = String::new(); + + let push_field = |fs: &mut String, f: &mut String| { + if f.len() > 0 { + fs.push_str( + match did_you_mean(&f, possible_values) { + Some(candidate) => candidate, + None => &f, + }); + f.truncate(0); + } + }; + + for (cid, c) in value.chars().enumerate() { + if c == FIELD_SEP { + if last_c != FIELD_SEP { + push_field(&mut output, &mut field); + } + output.push(c); + } else { + field.push(c); + } + + last_c = c; + } + + push_field(&mut output, &mut field); + + if &output == value { + None + } else { + Some(output) + } + } + + pub fn set_json_value(&self, mut object: &mut Value, + value: &str, type_info: JsonTypeInfo, + err: &mut InvalidOptionsError, + orig_cursor: &FieldCursor) { + assert!(self.0.len() > 0); + + for field in &self.0[..self.0.len()-1] { + let tmp = object; + object = + match *tmp { + Value::Object(ref mut mapping) => { + mapping.entry(field.to_owned()).or_insert( + Value::Object(Default::default()) + ) + }, + _ => panic!("We don't expect non-object Values here ...") + }; + } + + match *object { + Value::Object(ref mut mapping) => { + let field = &self.0[self.0.len()-1]; + let to_jval = + |value: &str, jtype: JsonType, err: &mut InvalidOptionsError| + -> Value { + match jtype { + JsonType::Boolean => + Value::Bool(arg_from_str(value, err, &field, "boolean")), + JsonType::Int => + Value::I64(arg_from_str(value, err, &field, "int")), + JsonType::Uint => + Value::U64(arg_from_str(value, err, &field, "uint")), + JsonType::Float => + Value::F64(arg_from_str(value, err, &field, "float")), + JsonType::String => + Value::String(value.to_owned()), + } + }; + + match type_info.ctype { + ComplexType::Pod => { + if mapping.insert(field.to_owned(), to_jval(value, type_info.jtype, err)).is_some() { + err.issues.push(CLIError::Field(FieldError::Duplicate(orig_cursor.to_string()))); + } + }, + ComplexType::Vec => { + match *mapping.entry(field.to_owned()) + .or_insert(Value::Array(Default::default())) { + Value::Array(ref mut values) => values.push(to_jval(value, type_info.jtype, err)), + _ => unreachable!() + } + }, + ComplexType::Map => { + let (key, value) = parse_kv_arg(value, err, true); + let jval = to_jval(value.unwrap_or(""), type_info.jtype, err); + + match *mapping.entry(field.to_owned()) + .or_insert(Value::Object(Default::default())) { + Value::Object(ref mut value_map) => { + if value_map.insert(key.to_owned(), jval).is_some() { + err.issues.push(CLIError::Field(FieldError::Duplicate(orig_cursor.to_string()))); + } + } + _ => unreachable!() + } + } + } + }, + _ => unreachable!() + } + } + + pub fn num_fields(&self) -> usize { + self.0.len() + } +} + +pub fn parse_kv_arg<'a>(kv: &'a str, err: &mut InvalidOptionsError, for_hashmap: bool) + -> (&'a str, Option<&'a str>) { + let mut add_err = || err.issues.push(CLIError::InvalidKeyValueSyntax(kv.to_string(),for_hashmap)); + match kv.find('=') { + None => { + add_err(); + return (kv, None) + }, + Some(pos) => { + let key = &kv[..pos]; + if kv.len() <= pos + 1 { + add_err(); + return (key, Some("")) + } + (key, Some(&kv[pos+1..])) + } + } +} + +pub fn calltype_from_str(name: &str, valid_protocols: Vec, err: &mut InvalidOptionsError) -> CallType { + CallType::Upload( + match UploadProtocol::from_str(name) { + Ok(up) => up, + Err(msg) => { + err.issues.push(CLIError::InvalidUploadProtocol(name.to_string(), valid_protocols)); + UploadProtocol::Simple + } + }) +} + +pub fn input_file_from_opts(file_path: &str, err: &mut InvalidOptionsError) -> Option { + match fs::File::open(file_path) { + Ok(f) => Some(f), + Err(io_err) => { + err.issues.push(CLIError::Input(InputError::IOError((file_path.to_string(), io_err)))); + None + } + } +} + +pub fn input_mime_from_opts(mime: &str, err: &mut InvalidOptionsError) -> Option { + match mime.parse() { + Ok(m) => Some(m), + Err(_) => { + err.issues.push(CLIError::Input(InputError::Mime(mime.to_string()))); + None + } + } +} + +pub fn writer_from_opts(arg: Option<&str>) -> Result, io::Error> { + let f = arg.unwrap_or("-"); + match f { + "-" => Ok(Box::new(stdout())), + _ => match fs::OpenOptions::new().create(true).write(true).open(f) { + Ok(f) => Ok(Box::new(f)), + Err(io_err) => Err(io_err), + } + } +} + + +pub fn arg_from_str<'a, T>(arg: &str, err: &mut InvalidOptionsError, + arg_name: &'a str, + arg_type: &'a str) -> T + where T: FromStr + Default, + ::Err: fmt::Display { + match FromStr::from_str(arg) { + Err(perr) => { + err.issues.push( + CLIError::ParseError(arg_name.to_owned(), arg_type.to_owned(), arg.to_string(), format!("{}", perr)) + ); + Default::default() + }, + Ok(v) => v, + } +} + +pub struct JsonTokenStorage { + pub program_name: &'static str, + pub db_dir: String, +} + +impl JsonTokenStorage { + fn path(&self, scope_hash: u64) -> PathBuf { + Path::new(&self.db_dir).join(&format!("{}-token-{}.json", self.program_name, scope_hash)) + } +} + +impl TokenStorage for JsonTokenStorage { + type Error = json::Error; + + // NOTE: logging might be interesting, currently we swallow all errors + fn set(&mut self, scope_hash: u64, _: &Vec<&str>, token: Option) -> Result<(), json::Error> { + match token { + None => { + match fs::remove_file(self.path(scope_hash)) { + Err(err) => + match err.kind() { + io::ErrorKind::NotFound => Ok(()), + _ => Err(json::Error::IoError(err)) + }, + Ok(_) => Ok(()), + } + } + Some(token) => { + match fs::OpenOptions::new().create(true).write(true).open(&self.path(scope_hash)) { + Ok(mut f) => { + match json::to_writer_pretty(&mut f, &token) { + Ok(_) => Ok(()), + Err(serde_err) => Err(serde_err), + } + }, + Err(io_err) => Err(json::Error::IoError(io_err)) + } + } + } + } + + fn get(&self, scope_hash: u64, _: &Vec<&str>) -> Result, json::Error> { + match fs::File::open(&self.path(scope_hash)) { + Ok(f) => { + match json::de::from_reader(f) { + Ok(token) => Ok(Some(token)), + Err(err) => Err(err), + } + }, + Err(io_err) => { + match io_err.kind() { + io::ErrorKind::NotFound => Ok(None), + _ => Err(json::Error::IoError(io_err)) + } + } + } + } +} + + +#[derive(Debug)] +pub enum ApplicationSecretError { + DecoderError((String, json::Error)), + FormatError(String), +} + +impl fmt::Display for ApplicationSecretError { + fn fmt(&self, f: &mut fmt::Formatter) -> Result<(), fmt::Error> { + match *self { + ApplicationSecretError::DecoderError((ref path, ref err)) + => writeln!(f, "Could not decode file at '{}' with error: {}.", + path, err), + ApplicationSecretError::FormatError(ref path) + => writeln!(f, "'installed' field is unset in secret file at '{}'.", + path), + } + } +} + +#[derive(Debug)] +pub enum ConfigurationError { + DirectoryCreationFailed((String, io::Error)), + DirectoryUnset, + HomeExpansionFailed(String), + Secret(ApplicationSecretError), + IOError((String, io::Error)), +} + +impl fmt::Display for ConfigurationError { + fn fmt(&self, f: &mut fmt::Formatter) -> Result<(), fmt::Error> { + match *self { + ConfigurationError::DirectoryCreationFailed((ref dir, ref err)) + => writeln!(f, "Directory '{}' could not be created with error: {}.", dir, err), + ConfigurationError::DirectoryUnset + => writeln!(f, "--config-dir was unset or empty."), + ConfigurationError::HomeExpansionFailed(ref dir) + => writeln!(f, "Couldn't find HOME directory of current user, failed to expand '{}'.", dir), + ConfigurationError::Secret(ref err) + => writeln!(f, "Secret -> {}", err), + ConfigurationError::IOError((ref path, ref err)) + => writeln!(f, "IO operation failed on path '{}' with error: {}.", path, err), + } + } +} + +#[derive(Debug)] +pub enum InputError { + IOError((String, io::Error)), + Mime(String), +} + +impl fmt::Display for InputError { + fn fmt(&self, f: &mut fmt::Formatter) -> Result<(), fmt::Error> { + match *self { + InputError::IOError((ref file_path, ref io_err)) + => writeln!(f, "Failed to open '{}' for reading with error: {}.", file_path, io_err), + InputError::Mime(ref mime) + => writeln!(f, "'{}' is not a known mime-type.", mime), + } + } +} + +#[derive(Debug)] +pub enum FieldError { + PopOnEmpty(String), + TrailingFieldSep(String), + Unknown(String, Option, Option), + Duplicate(String), + Empty, +} + + +impl fmt::Display for FieldError { + fn fmt(&self, f: &mut fmt::Formatter) -> Result<(), fmt::Error> { + match *self { + FieldError::PopOnEmpty(ref field) + => writeln!(f, "'{}': Cannot move up on empty field cursor.", field), + FieldError::TrailingFieldSep(ref field) + => writeln!(f, "'{}': Single field separator may not be last character.", field), + FieldError::Unknown(ref field, ref suggestion, ref value) => { + let suffix = + match *suggestion { + Some(ref s) => { + let kv = + match *value { + Some(ref v) => format!("{}={}", s, v), + None => s.clone(), + }; + format!(" Did you mean '{}' ?", kv) + }, + None => String::new(), + }; + writeln!(f, "Field '{}' does not exist.{}", field, suffix) + }, + FieldError::Duplicate(ref cursor) + => writeln!(f, "Value at '{}' was already set", cursor), + FieldError::Empty + => writeln!(f, "Field names must not be empty."), + } + } +} + + +#[derive(Debug)] +pub enum CLIError { + Configuration(ConfigurationError), + ParseError(String, String, String, String), + UnknownParameter(String, Vec<&'static str>), + InvalidUploadProtocol(String, Vec), + InvalidKeyValueSyntax(String, bool), + Input(InputError), + Field(FieldError), + MissingCommandError, + MissingMethodError(String), +} + +impl fmt::Display for CLIError { + fn fmt(&self, f: &mut fmt::Formatter) -> Result<(), fmt::Error> { + match *self { + CLIError::Configuration(ref err) => write!(f, "Configuration -> {}", err), + CLIError::Input(ref err) => write!(f, "Input -> {}", err), + CLIError::Field(ref err) => write!(f, "Field -> {}", err), + CLIError::InvalidUploadProtocol(ref proto_name, ref valid_names) + => writeln!(f, "'{}' is not a valid upload protocol. Choose from one of {}.", proto_name, valid_names.join(", ")), + CLIError::ParseError(ref arg_name, ref type_name, ref value, ref err_desc) + => writeln!(f, "Failed to parse argument '{}' with value '{}' as {} with error: {}.", + arg_name, value, type_name, err_desc), + CLIError::UnknownParameter(ref param_name, ref possible_values) => { + let suffix = + match did_you_mean(param_name, &possible_values) { + Some(v) => format!(" Did you mean '{}' ?", v), + None => String::new(), + }; + write!(f, "Parameter '{}' is unknown.{}\n", param_name, suffix) + }, + CLIError::InvalidKeyValueSyntax(ref kv, is_hashmap) => { + let hashmap_info = if is_hashmap { "hashmap " } else { "" }; + writeln!(f, "'{}' does not match {}pattern =.", kv, hashmap_info) + }, + CLIError::MissingCommandError => writeln!(f, "Please specify the main sub-command."), + CLIError::MissingMethodError(ref cmd) => writeln!(f, "Please specify the method to call on the '{}' command.", cmd), + } + } +} + +#[derive(Debug)] +pub struct InvalidOptionsError { + pub issues: Vec, + pub exit_code: i32, +} + +impl fmt::Display for InvalidOptionsError { + fn fmt(&self, f: &mut fmt::Formatter) -> Result<(), fmt::Error> { + for issue in &self.issues { + try!(issue.fmt(f)); + } + Ok(()) + } +} + +impl InvalidOptionsError { + pub fn single(err: CLIError, exit_code: i32) -> InvalidOptionsError { + InvalidOptionsError { + issues: vec![err], + exit_code: exit_code, + } + } + + pub fn new() -> InvalidOptionsError { + InvalidOptionsError { + issues: Vec::new(), + exit_code: 1, + } + } +} + +pub fn assure_config_dir_exists(dir: &str) -> Result { + let trdir = dir.trim(); + if trdir.len() == 0 { + return Err(CLIError::Configuration(ConfigurationError::DirectoryUnset)) + } + + let expanded_config_dir = + if trdir.as_bytes()[0] == b'~' { + match env::var("HOME").ok().or(env::var("UserProfile").ok()) { + None => return Err(CLIError::Configuration(ConfigurationError::HomeExpansionFailed(trdir.to_string()))), + Some(mut user) => { + user.push_str(&trdir[1..]); + user + } + } + } else { + trdir.to_string() + }; + + if let Err(err) = fs::create_dir(&expanded_config_dir) { + if err.kind() != io::ErrorKind::AlreadyExists { + return Err(CLIError::Configuration( + ConfigurationError::DirectoryCreationFailed((expanded_config_dir, err)))) + } + } + + Ok(expanded_config_dir) +} + +pub fn application_secret_from_directory(dir: &str, + secret_basename: &str, + json_console_secret: &str) + -> Result { + let secret_path = Path::new(dir).join(secret_basename); + let secret_str = || secret_path.as_path().to_str().unwrap().to_string(); + let secret_io_error = |io_err: io::Error| { + Err(CLIError::Configuration(ConfigurationError::IOError( + (secret_str(), io_err) + ))) + }; + + for _ in 0..2 { + match fs::File::open(&secret_path) { + Err(mut err) => { + if err.kind() == io::ErrorKind::NotFound { + // Write our built-in one - user may adjust the written file at will + + err = match fs::OpenOptions::new().create(true).write(true).open(&secret_path) { + Err(cfe) => cfe, + Ok(mut f) => { + // Assure we convert 'ugly' json string into pretty one + let console_secret: ConsoleApplicationSecret + = json::from_str(json_console_secret).unwrap(); + match json::to_writer_pretty(&mut f, &console_secret) { + Err(serde_err) => match serde_err { + json::Error::IoError(err) => err, + _ => panic!("Unexpected serde error: {:#?}", serde_err) + }, + Ok(_) => continue, + } + } + }; + // fall through to IO error handling + } + return secret_io_error(err) + }, + Ok(f) => { + match json::de::from_reader::<_, ConsoleApplicationSecret>(f) { + Err(json::Error::IoError(err)) => + return secret_io_error(err), + Err(json_err) => + return Err(CLIError::Configuration( + ConfigurationError::Secret( + ApplicationSecretError::DecoderError( + (secret_str(), json_err) + )))), + Ok(console_secret) => + match console_secret.installed { + Some(secret) => return Ok(secret), + None => return Err( + CLIError::Configuration( + ConfigurationError::Secret( + ApplicationSecretError::FormatError(secret_str()) + ))) + }, + } + } + } + } + unreachable!(); +} diff --git a/gen/toolresults1_beta3-cli/src/main.rs b/gen/toolresults1_beta3-cli/src/main.rs new file mode 100644 index 0000000000..37133caa56 --- /dev/null +++ b/gen/toolresults1_beta3-cli/src/main.rs @@ -0,0 +1,2064 @@ +// DO NOT EDIT ! +// This file was generated automatically from 'src/mako/cli/main.rs.mako' +// DO NOT EDIT ! +#![allow(unused_variables, unused_imports, dead_code, unused_mut)] + +#[macro_use] +extern crate clap; +extern crate yup_oauth2 as oauth2; +extern crate yup_hyper_mock as mock; +extern crate serde; +extern crate serde_json; +extern crate hyper; +extern crate mime; +extern crate strsim; +extern crate google_toolresults1_beta3 as api; + +use std::env; +use std::io::{self, Write}; +use clap::{App, SubCommand, Arg}; + +mod cmn; + +use cmn::{InvalidOptionsError, CLIError, JsonTokenStorage, arg_from_str, writer_from_opts, parse_kv_arg, + input_file_from_opts, input_mime_from_opts, FieldCursor, FieldError, CallType, UploadProtocol, + calltype_from_str, remove_json_null_values, ComplexType, JsonType, JsonTypeInfo}; + +use std::default::Default; +use std::str::FromStr; + +use oauth2::{Authenticator, DefaultAuthenticatorDelegate}; +use serde_json as json; +use clap::ArgMatches; + +enum DoitError { + IoError(String, io::Error), + ApiError(api::Error), +} + +struct Engine<'n> { + opt: ArgMatches<'n>, + hub: api::ToolResults>, + gp: Vec<&'static str>, + gpm: Vec<(&'static str, &'static str)>, +} + + +impl<'n> Engine<'n> { + fn _projects_get_settings(&self, opt: &ArgMatches<'n>, dry_run: bool, err: &mut InvalidOptionsError) + -> Result<(), DoitError> { + let mut call = self.hub.projects().get_settings(opt.value_of("project-id").unwrap_or("")); + for parg in opt.values_of("v").map(|i|i.collect()).unwrap_or(Vec::new()).iter() { + let (key, value) = parse_kv_arg(&*parg, err, false); + match key { + _ => { + let mut found = false; + for param in &self.gp { + if key == *param { + found = true; + call = call.param(self.gpm.iter().find(|t| t.0 == key).unwrap_or(&("", key)).1, value.unwrap_or("unset")); + break; + } + } + if !found { + err.issues.push(CLIError::UnknownParameter(key.to_string(), + {let mut v = Vec::new(); + v.extend(self.gp.iter().map(|v|*v)); + v } )); + } + } + } + } + let protocol = CallType::Standard; + if dry_run { + Ok(()) + } else { + assert!(err.issues.len() == 0); + for scope in self.opt.values_of("url").map(|i|i.collect()).unwrap_or(Vec::new()).iter() { + call = call.add_scope(scope); + } + let mut ostream = match writer_from_opts(opt.value_of("out")) { + Ok(mut f) => f, + Err(io_err) => return Err(DoitError::IoError(opt.value_of("out").unwrap_or("-").to_string(), io_err)), + }; + match match protocol { + CallType::Standard => call.doit(), + _ => unreachable!() + } { + Err(api_err) => Err(DoitError::ApiError(api_err)), + Ok((mut response, output_schema)) => { + let mut value = json::value::to_value(&output_schema); + remove_json_null_values(&mut value); + json::to_writer_pretty(&mut ostream, &value).unwrap(); + ostream.flush().unwrap(); + Ok(()) + } + } + } + } + + fn _projects_histories_create(&self, opt: &ArgMatches<'n>, dry_run: bool, err: &mut InvalidOptionsError) + -> Result<(), DoitError> { + + let mut field_cursor = FieldCursor::default(); + let mut object = json::value::Value::Object(Default::default()); + + for kvarg in opt.values_of("kv").map(|i|i.collect()).unwrap_or(Vec::new()).iter() { + let last_errc = err.issues.len(); + let (key, value) = parse_kv_arg(&*kvarg, err, false); + let mut temp_cursor = field_cursor.clone(); + if let Err(field_err) = temp_cursor.set(&*key) { + err.issues.push(field_err); + } + if value.is_none() { + field_cursor = temp_cursor.clone(); + if err.issues.len() > last_errc { + err.issues.remove(last_errc); + } + continue; + } + + let type_info: Option<(&'static str, JsonTypeInfo)> = + match &temp_cursor.to_string()[..] { + "display-name" => Some(("displayName", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "name" => Some(("name", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "history-id" => Some(("historyId", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + _ => { + let suggestion = FieldCursor::did_you_mean(key, &vec!["display-name", "history-id", "name"]); + err.issues.push(CLIError::Field(FieldError::Unknown(temp_cursor.to_string(), suggestion, value.map(|v| v.to_string())))); + None + } + }; + if let Some((field_cursor_str, type_info)) = type_info { + FieldCursor::from(field_cursor_str).set_json_value(&mut object, value.unwrap(), type_info, err, &temp_cursor); + } + } + let mut request: api::History = json::value::from_value(object).unwrap(); + let mut call = self.hub.projects().histories_create(request, opt.value_of("project-id").unwrap_or("")); + for parg in opt.values_of("v").map(|i|i.collect()).unwrap_or(Vec::new()).iter() { + let (key, value) = parse_kv_arg(&*parg, err, false); + match key { + "request-id" => { + call = call.request_id(value.unwrap_or("")); + }, + _ => { + let mut found = false; + for param in &self.gp { + if key == *param { + found = true; + call = call.param(self.gpm.iter().find(|t| t.0 == key).unwrap_or(&("", key)).1, value.unwrap_or("unset")); + break; + } + } + if !found { + err.issues.push(CLIError::UnknownParameter(key.to_string(), + {let mut v = Vec::new(); + v.extend(self.gp.iter().map(|v|*v)); + v.extend(["request-id"].iter().map(|v|*v)); + v } )); + } + } + } + } + let protocol = CallType::Standard; + if dry_run { + Ok(()) + } else { + assert!(err.issues.len() == 0); + for scope in self.opt.values_of("url").map(|i|i.collect()).unwrap_or(Vec::new()).iter() { + call = call.add_scope(scope); + } + let mut ostream = match writer_from_opts(opt.value_of("out")) { + Ok(mut f) => f, + Err(io_err) => return Err(DoitError::IoError(opt.value_of("out").unwrap_or("-").to_string(), io_err)), + }; + match match protocol { + CallType::Standard => call.doit(), + _ => unreachable!() + } { + Err(api_err) => Err(DoitError::ApiError(api_err)), + Ok((mut response, output_schema)) => { + let mut value = json::value::to_value(&output_schema); + remove_json_null_values(&mut value); + json::to_writer_pretty(&mut ostream, &value).unwrap(); + ostream.flush().unwrap(); + Ok(()) + } + } + } + } + + fn _projects_histories_executions_create(&self, opt: &ArgMatches<'n>, dry_run: bool, err: &mut InvalidOptionsError) + -> Result<(), DoitError> { + + let mut field_cursor = FieldCursor::default(); + let mut object = json::value::Value::Object(Default::default()); + + for kvarg in opt.values_of("kv").map(|i|i.collect()).unwrap_or(Vec::new()).iter() { + let last_errc = err.issues.len(); + let (key, value) = parse_kv_arg(&*kvarg, err, false); + let mut temp_cursor = field_cursor.clone(); + if let Err(field_err) = temp_cursor.set(&*key) { + err.issues.push(field_err); + } + if value.is_none() { + field_cursor = temp_cursor.clone(); + if err.issues.len() > last_errc { + err.issues.remove(last_errc); + } + continue; + } + + let type_info: Option<(&'static str, JsonTypeInfo)> = + match &temp_cursor.to_string()[..] { + "test-execution-matrix-id" => Some(("testExecutionMatrixId", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "creation-time.nanos" => Some(("creationTime.nanos", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), + "creation-time.seconds" => Some(("creationTime.seconds", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "state" => Some(("state", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "execution-id" => Some(("executionId", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "completion-time.nanos" => Some(("completionTime.nanos", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), + "completion-time.seconds" => Some(("completionTime.seconds", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "outcome.inconclusive-detail.infrastructure-failure" => Some(("outcome.inconclusiveDetail.infrastructureFailure", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "outcome.inconclusive-detail.native-crash" => Some(("outcome.inconclusiveDetail.nativeCrash", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "outcome.inconclusive-detail.aborted-by-user" => Some(("outcome.inconclusiveDetail.abortedByUser", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "outcome.skipped-detail.incompatible-app-version" => Some(("outcome.skippedDetail.incompatibleAppVersion", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "outcome.skipped-detail.incompatible-architecture" => Some(("outcome.skippedDetail.incompatibleArchitecture", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "outcome.skipped-detail.incompatible-device" => Some(("outcome.skippedDetail.incompatibleDevice", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "outcome.success-detail.other-native-crash" => Some(("outcome.successDetail.otherNativeCrash", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "outcome.failure-detail.other-native-crash" => Some(("outcome.failureDetail.otherNativeCrash", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "outcome.failure-detail.crashed" => Some(("outcome.failureDetail.crashed", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "outcome.failure-detail.not-installed" => Some(("outcome.failureDetail.notInstalled", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "outcome.failure-detail.timed-out" => Some(("outcome.failureDetail.timedOut", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "outcome.summary" => Some(("outcome.summary", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + _ => { + let suggestion = FieldCursor::did_you_mean(key, &vec!["aborted-by-user", "completion-time", "crashed", "creation-time", "execution-id", "failure-detail", "incompatible-app-version", "incompatible-architecture", "incompatible-device", "inconclusive-detail", "infrastructure-failure", "nanos", "native-crash", "not-installed", "other-native-crash", "outcome", "seconds", "skipped-detail", "state", "success-detail", "summary", "test-execution-matrix-id", "timed-out"]); + err.issues.push(CLIError::Field(FieldError::Unknown(temp_cursor.to_string(), suggestion, value.map(|v| v.to_string())))); + None + } + }; + if let Some((field_cursor_str, type_info)) = type_info { + FieldCursor::from(field_cursor_str).set_json_value(&mut object, value.unwrap(), type_info, err, &temp_cursor); + } + } + let mut request: api::Execution = json::value::from_value(object).unwrap(); + let mut call = self.hub.projects().histories_executions_create(request, opt.value_of("project-id").unwrap_or(""), opt.value_of("history-id").unwrap_or("")); + for parg in opt.values_of("v").map(|i|i.collect()).unwrap_or(Vec::new()).iter() { + let (key, value) = parse_kv_arg(&*parg, err, false); + match key { + "request-id" => { + call = call.request_id(value.unwrap_or("")); + }, + _ => { + let mut found = false; + for param in &self.gp { + if key == *param { + found = true; + call = call.param(self.gpm.iter().find(|t| t.0 == key).unwrap_or(&("", key)).1, value.unwrap_or("unset")); + break; + } + } + if !found { + err.issues.push(CLIError::UnknownParameter(key.to_string(), + {let mut v = Vec::new(); + v.extend(self.gp.iter().map(|v|*v)); + v.extend(["request-id"].iter().map(|v|*v)); + v } )); + } + } + } + } + let protocol = CallType::Standard; + if dry_run { + Ok(()) + } else { + assert!(err.issues.len() == 0); + for scope in self.opt.values_of("url").map(|i|i.collect()).unwrap_or(Vec::new()).iter() { + call = call.add_scope(scope); + } + let mut ostream = match writer_from_opts(opt.value_of("out")) { + Ok(mut f) => f, + Err(io_err) => return Err(DoitError::IoError(opt.value_of("out").unwrap_or("-").to_string(), io_err)), + }; + match match protocol { + CallType::Standard => call.doit(), + _ => unreachable!() + } { + Err(api_err) => Err(DoitError::ApiError(api_err)), + Ok((mut response, output_schema)) => { + let mut value = json::value::to_value(&output_schema); + remove_json_null_values(&mut value); + json::to_writer_pretty(&mut ostream, &value).unwrap(); + ostream.flush().unwrap(); + Ok(()) + } + } + } + } + + fn _projects_histories_executions_get(&self, opt: &ArgMatches<'n>, dry_run: bool, err: &mut InvalidOptionsError) + -> Result<(), DoitError> { + let mut call = self.hub.projects().histories_executions_get(opt.value_of("project-id").unwrap_or(""), opt.value_of("history-id").unwrap_or(""), opt.value_of("execution-id").unwrap_or("")); + for parg in opt.values_of("v").map(|i|i.collect()).unwrap_or(Vec::new()).iter() { + let (key, value) = parse_kv_arg(&*parg, err, false); + match key { + _ => { + let mut found = false; + for param in &self.gp { + if key == *param { + found = true; + call = call.param(self.gpm.iter().find(|t| t.0 == key).unwrap_or(&("", key)).1, value.unwrap_or("unset")); + break; + } + } + if !found { + err.issues.push(CLIError::UnknownParameter(key.to_string(), + {let mut v = Vec::new(); + v.extend(self.gp.iter().map(|v|*v)); + v } )); + } + } + } + } + let protocol = CallType::Standard; + if dry_run { + Ok(()) + } else { + assert!(err.issues.len() == 0); + for scope in self.opt.values_of("url").map(|i|i.collect()).unwrap_or(Vec::new()).iter() { + call = call.add_scope(scope); + } + let mut ostream = match writer_from_opts(opt.value_of("out")) { + Ok(mut f) => f, + Err(io_err) => return Err(DoitError::IoError(opt.value_of("out").unwrap_or("-").to_string(), io_err)), + }; + match match protocol { + CallType::Standard => call.doit(), + _ => unreachable!() + } { + Err(api_err) => Err(DoitError::ApiError(api_err)), + Ok((mut response, output_schema)) => { + let mut value = json::value::to_value(&output_schema); + remove_json_null_values(&mut value); + json::to_writer_pretty(&mut ostream, &value).unwrap(); + ostream.flush().unwrap(); + Ok(()) + } + } + } + } + + fn _projects_histories_executions_list(&self, opt: &ArgMatches<'n>, dry_run: bool, err: &mut InvalidOptionsError) + -> Result<(), DoitError> { + let mut call = self.hub.projects().histories_executions_list(opt.value_of("project-id").unwrap_or(""), opt.value_of("history-id").unwrap_or("")); + for parg in opt.values_of("v").map(|i|i.collect()).unwrap_or(Vec::new()).iter() { + let (key, value) = parse_kv_arg(&*parg, err, false); + match key { + "page-token" => { + call = call.page_token(value.unwrap_or("")); + }, + "page-size" => { + call = call.page_size(arg_from_str(value.unwrap_or("-0"), err, "page-size", "integer")); + }, + _ => { + let mut found = false; + for param in &self.gp { + if key == *param { + found = true; + call = call.param(self.gpm.iter().find(|t| t.0 == key).unwrap_or(&("", key)).1, value.unwrap_or("unset")); + break; + } + } + if !found { + err.issues.push(CLIError::UnknownParameter(key.to_string(), + {let mut v = Vec::new(); + v.extend(self.gp.iter().map(|v|*v)); + v.extend(["page-token", "page-size"].iter().map(|v|*v)); + v } )); + } + } + } + } + let protocol = CallType::Standard; + if dry_run { + Ok(()) + } else { + assert!(err.issues.len() == 0); + for scope in self.opt.values_of("url").map(|i|i.collect()).unwrap_or(Vec::new()).iter() { + call = call.add_scope(scope); + } + let mut ostream = match writer_from_opts(opt.value_of("out")) { + Ok(mut f) => f, + Err(io_err) => return Err(DoitError::IoError(opt.value_of("out").unwrap_or("-").to_string(), io_err)), + }; + match match protocol { + CallType::Standard => call.doit(), + _ => unreachable!() + } { + Err(api_err) => Err(DoitError::ApiError(api_err)), + Ok((mut response, output_schema)) => { + let mut value = json::value::to_value(&output_schema); + remove_json_null_values(&mut value); + json::to_writer_pretty(&mut ostream, &value).unwrap(); + ostream.flush().unwrap(); + Ok(()) + } + } + } + } + + fn _projects_histories_executions_patch(&self, opt: &ArgMatches<'n>, dry_run: bool, err: &mut InvalidOptionsError) + -> Result<(), DoitError> { + + let mut field_cursor = FieldCursor::default(); + let mut object = json::value::Value::Object(Default::default()); + + for kvarg in opt.values_of("kv").map(|i|i.collect()).unwrap_or(Vec::new()).iter() { + let last_errc = err.issues.len(); + let (key, value) = parse_kv_arg(&*kvarg, err, false); + let mut temp_cursor = field_cursor.clone(); + if let Err(field_err) = temp_cursor.set(&*key) { + err.issues.push(field_err); + } + if value.is_none() { + field_cursor = temp_cursor.clone(); + if err.issues.len() > last_errc { + err.issues.remove(last_errc); + } + continue; + } + + let type_info: Option<(&'static str, JsonTypeInfo)> = + match &temp_cursor.to_string()[..] { + "test-execution-matrix-id" => Some(("testExecutionMatrixId", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "creation-time.nanos" => Some(("creationTime.nanos", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), + "creation-time.seconds" => Some(("creationTime.seconds", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "state" => Some(("state", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "execution-id" => Some(("executionId", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "completion-time.nanos" => Some(("completionTime.nanos", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), + "completion-time.seconds" => Some(("completionTime.seconds", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "outcome.inconclusive-detail.infrastructure-failure" => Some(("outcome.inconclusiveDetail.infrastructureFailure", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "outcome.inconclusive-detail.native-crash" => Some(("outcome.inconclusiveDetail.nativeCrash", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "outcome.inconclusive-detail.aborted-by-user" => Some(("outcome.inconclusiveDetail.abortedByUser", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "outcome.skipped-detail.incompatible-app-version" => Some(("outcome.skippedDetail.incompatibleAppVersion", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "outcome.skipped-detail.incompatible-architecture" => Some(("outcome.skippedDetail.incompatibleArchitecture", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "outcome.skipped-detail.incompatible-device" => Some(("outcome.skippedDetail.incompatibleDevice", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "outcome.success-detail.other-native-crash" => Some(("outcome.successDetail.otherNativeCrash", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "outcome.failure-detail.other-native-crash" => Some(("outcome.failureDetail.otherNativeCrash", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "outcome.failure-detail.crashed" => Some(("outcome.failureDetail.crashed", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "outcome.failure-detail.not-installed" => Some(("outcome.failureDetail.notInstalled", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "outcome.failure-detail.timed-out" => Some(("outcome.failureDetail.timedOut", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "outcome.summary" => Some(("outcome.summary", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + _ => { + let suggestion = FieldCursor::did_you_mean(key, &vec!["aborted-by-user", "completion-time", "crashed", "creation-time", "execution-id", "failure-detail", "incompatible-app-version", "incompatible-architecture", "incompatible-device", "inconclusive-detail", "infrastructure-failure", "nanos", "native-crash", "not-installed", "other-native-crash", "outcome", "seconds", "skipped-detail", "state", "success-detail", "summary", "test-execution-matrix-id", "timed-out"]); + err.issues.push(CLIError::Field(FieldError::Unknown(temp_cursor.to_string(), suggestion, value.map(|v| v.to_string())))); + None + } + }; + if let Some((field_cursor_str, type_info)) = type_info { + FieldCursor::from(field_cursor_str).set_json_value(&mut object, value.unwrap(), type_info, err, &temp_cursor); + } + } + let mut request: api::Execution = json::value::from_value(object).unwrap(); + let mut call = self.hub.projects().histories_executions_patch(request, opt.value_of("project-id").unwrap_or(""), opt.value_of("history-id").unwrap_or(""), opt.value_of("execution-id").unwrap_or("")); + for parg in opt.values_of("v").map(|i|i.collect()).unwrap_or(Vec::new()).iter() { + let (key, value) = parse_kv_arg(&*parg, err, false); + match key { + "request-id" => { + call = call.request_id(value.unwrap_or("")); + }, + _ => { + let mut found = false; + for param in &self.gp { + if key == *param { + found = true; + call = call.param(self.gpm.iter().find(|t| t.0 == key).unwrap_or(&("", key)).1, value.unwrap_or("unset")); + break; + } + } + if !found { + err.issues.push(CLIError::UnknownParameter(key.to_string(), + {let mut v = Vec::new(); + v.extend(self.gp.iter().map(|v|*v)); + v.extend(["request-id"].iter().map(|v|*v)); + v } )); + } + } + } + } + let protocol = CallType::Standard; + if dry_run { + Ok(()) + } else { + assert!(err.issues.len() == 0); + for scope in self.opt.values_of("url").map(|i|i.collect()).unwrap_or(Vec::new()).iter() { + call = call.add_scope(scope); + } + let mut ostream = match writer_from_opts(opt.value_of("out")) { + Ok(mut f) => f, + Err(io_err) => return Err(DoitError::IoError(opt.value_of("out").unwrap_or("-").to_string(), io_err)), + }; + match match protocol { + CallType::Standard => call.doit(), + _ => unreachable!() + } { + Err(api_err) => Err(DoitError::ApiError(api_err)), + Ok((mut response, output_schema)) => { + let mut value = json::value::to_value(&output_schema); + remove_json_null_values(&mut value); + json::to_writer_pretty(&mut ostream, &value).unwrap(); + ostream.flush().unwrap(); + Ok(()) + } + } + } + } + + fn _projects_histories_executions_steps_create(&self, opt: &ArgMatches<'n>, dry_run: bool, err: &mut InvalidOptionsError) + -> Result<(), DoitError> { + + let mut field_cursor = FieldCursor::default(); + let mut object = json::value::Value::Object(Default::default()); + + for kvarg in opt.values_of("kv").map(|i|i.collect()).unwrap_or(Vec::new()).iter() { + let last_errc = err.issues.len(); + let (key, value) = parse_kv_arg(&*kvarg, err, false); + let mut temp_cursor = field_cursor.clone(); + if let Err(field_err) = temp_cursor.set(&*key) { + err.issues.push(field_err); + } + if value.is_none() { + field_cursor = temp_cursor.clone(); + if err.issues.len() > last_errc { + err.issues.remove(last_errc); + } + continue; + } + + let type_info: Option<(&'static str, JsonTypeInfo)> = + match &temp_cursor.to_string()[..] { + "test-execution-step.test-timing.test-process-duration.nanos" => Some(("testExecutionStep.testTiming.testProcessDuration.nanos", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), + "test-execution-step.test-timing.test-process-duration.seconds" => Some(("testExecutionStep.testTiming.testProcessDuration.seconds", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "test-execution-step.tool-execution.exit-code.number" => Some(("testExecutionStep.toolExecution.exitCode.number", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), + "test-execution-step.tool-execution.command-line-arguments" => Some(("testExecutionStep.toolExecution.commandLineArguments", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Vec })), + "step-id" => Some(("stepId", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "run-duration.nanos" => Some(("runDuration.nanos", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), + "run-duration.seconds" => Some(("runDuration.seconds", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "description" => Some(("description", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "name" => Some(("name", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "creation-time.nanos" => Some(("creationTime.nanos", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), + "creation-time.seconds" => Some(("creationTime.seconds", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "tool-execution-step.tool-execution.exit-code.number" => Some(("toolExecutionStep.toolExecution.exitCode.number", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), + "tool-execution-step.tool-execution.command-line-arguments" => Some(("toolExecutionStep.toolExecution.commandLineArguments", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Vec })), + "state" => Some(("state", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "completion-time.nanos" => Some(("completionTime.nanos", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), + "completion-time.seconds" => Some(("completionTime.seconds", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "outcome.inconclusive-detail.infrastructure-failure" => Some(("outcome.inconclusiveDetail.infrastructureFailure", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "outcome.inconclusive-detail.native-crash" => Some(("outcome.inconclusiveDetail.nativeCrash", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "outcome.inconclusive-detail.aborted-by-user" => Some(("outcome.inconclusiveDetail.abortedByUser", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "outcome.skipped-detail.incompatible-app-version" => Some(("outcome.skippedDetail.incompatibleAppVersion", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "outcome.skipped-detail.incompatible-architecture" => Some(("outcome.skippedDetail.incompatibleArchitecture", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "outcome.skipped-detail.incompatible-device" => Some(("outcome.skippedDetail.incompatibleDevice", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "outcome.success-detail.other-native-crash" => Some(("outcome.successDetail.otherNativeCrash", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "outcome.failure-detail.other-native-crash" => Some(("outcome.failureDetail.otherNativeCrash", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "outcome.failure-detail.crashed" => Some(("outcome.failureDetail.crashed", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "outcome.failure-detail.not-installed" => Some(("outcome.failureDetail.notInstalled", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "outcome.failure-detail.timed-out" => Some(("outcome.failureDetail.timedOut", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "outcome.summary" => Some(("outcome.summary", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "device-usage-duration.nanos" => Some(("deviceUsageDuration.nanos", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), + "device-usage-duration.seconds" => Some(("deviceUsageDuration.seconds", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "has-images" => Some(("hasImages", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + _ => { + let suggestion = FieldCursor::did_you_mean(key, &vec!["aborted-by-user", "command-line-arguments", "completion-time", "crashed", "creation-time", "description", "device-usage-duration", "exit-code", "failure-detail", "has-images", "incompatible-app-version", "incompatible-architecture", "incompatible-device", "inconclusive-detail", "infrastructure-failure", "name", "nanos", "native-crash", "not-installed", "number", "other-native-crash", "outcome", "run-duration", "seconds", "skipped-detail", "state", "step-id", "success-detail", "summary", "test-execution-step", "test-process-duration", "test-timing", "timed-out", "tool-execution", "tool-execution-step"]); + err.issues.push(CLIError::Field(FieldError::Unknown(temp_cursor.to_string(), suggestion, value.map(|v| v.to_string())))); + None + } + }; + if let Some((field_cursor_str, type_info)) = type_info { + FieldCursor::from(field_cursor_str).set_json_value(&mut object, value.unwrap(), type_info, err, &temp_cursor); + } + } + let mut request: api::Step = json::value::from_value(object).unwrap(); + let mut call = self.hub.projects().histories_executions_steps_create(request, opt.value_of("project-id").unwrap_or(""), opt.value_of("history-id").unwrap_or(""), opt.value_of("execution-id").unwrap_or("")); + for parg in opt.values_of("v").map(|i|i.collect()).unwrap_or(Vec::new()).iter() { + let (key, value) = parse_kv_arg(&*parg, err, false); + match key { + "request-id" => { + call = call.request_id(value.unwrap_or("")); + }, + _ => { + let mut found = false; + for param in &self.gp { + if key == *param { + found = true; + call = call.param(self.gpm.iter().find(|t| t.0 == key).unwrap_or(&("", key)).1, value.unwrap_or("unset")); + break; + } + } + if !found { + err.issues.push(CLIError::UnknownParameter(key.to_string(), + {let mut v = Vec::new(); + v.extend(self.gp.iter().map(|v|*v)); + v.extend(["request-id"].iter().map(|v|*v)); + v } )); + } + } + } + } + let protocol = CallType::Standard; + if dry_run { + Ok(()) + } else { + assert!(err.issues.len() == 0); + for scope in self.opt.values_of("url").map(|i|i.collect()).unwrap_or(Vec::new()).iter() { + call = call.add_scope(scope); + } + let mut ostream = match writer_from_opts(opt.value_of("out")) { + Ok(mut f) => f, + Err(io_err) => return Err(DoitError::IoError(opt.value_of("out").unwrap_or("-").to_string(), io_err)), + }; + match match protocol { + CallType::Standard => call.doit(), + _ => unreachable!() + } { + Err(api_err) => Err(DoitError::ApiError(api_err)), + Ok((mut response, output_schema)) => { + let mut value = json::value::to_value(&output_schema); + remove_json_null_values(&mut value); + json::to_writer_pretty(&mut ostream, &value).unwrap(); + ostream.flush().unwrap(); + Ok(()) + } + } + } + } + + fn _projects_histories_executions_steps_get(&self, opt: &ArgMatches<'n>, dry_run: bool, err: &mut InvalidOptionsError) + -> Result<(), DoitError> { + let mut call = self.hub.projects().histories_executions_steps_get(opt.value_of("project-id").unwrap_or(""), opt.value_of("history-id").unwrap_or(""), opt.value_of("execution-id").unwrap_or(""), opt.value_of("step-id").unwrap_or("")); + for parg in opt.values_of("v").map(|i|i.collect()).unwrap_or(Vec::new()).iter() { + let (key, value) = parse_kv_arg(&*parg, err, false); + match key { + _ => { + let mut found = false; + for param in &self.gp { + if key == *param { + found = true; + call = call.param(self.gpm.iter().find(|t| t.0 == key).unwrap_or(&("", key)).1, value.unwrap_or("unset")); + break; + } + } + if !found { + err.issues.push(CLIError::UnknownParameter(key.to_string(), + {let mut v = Vec::new(); + v.extend(self.gp.iter().map(|v|*v)); + v } )); + } + } + } + } + let protocol = CallType::Standard; + if dry_run { + Ok(()) + } else { + assert!(err.issues.len() == 0); + for scope in self.opt.values_of("url").map(|i|i.collect()).unwrap_or(Vec::new()).iter() { + call = call.add_scope(scope); + } + let mut ostream = match writer_from_opts(opt.value_of("out")) { + Ok(mut f) => f, + Err(io_err) => return Err(DoitError::IoError(opt.value_of("out").unwrap_or("-").to_string(), io_err)), + }; + match match protocol { + CallType::Standard => call.doit(), + _ => unreachable!() + } { + Err(api_err) => Err(DoitError::ApiError(api_err)), + Ok((mut response, output_schema)) => { + let mut value = json::value::to_value(&output_schema); + remove_json_null_values(&mut value); + json::to_writer_pretty(&mut ostream, &value).unwrap(); + ostream.flush().unwrap(); + Ok(()) + } + } + } + } + + fn _projects_histories_executions_steps_list(&self, opt: &ArgMatches<'n>, dry_run: bool, err: &mut InvalidOptionsError) + -> Result<(), DoitError> { + let mut call = self.hub.projects().histories_executions_steps_list(opt.value_of("project-id").unwrap_or(""), opt.value_of("history-id").unwrap_or(""), opt.value_of("execution-id").unwrap_or("")); + for parg in opt.values_of("v").map(|i|i.collect()).unwrap_or(Vec::new()).iter() { + let (key, value) = parse_kv_arg(&*parg, err, false); + match key { + "page-token" => { + call = call.page_token(value.unwrap_or("")); + }, + "page-size" => { + call = call.page_size(arg_from_str(value.unwrap_or("-0"), err, "page-size", "integer")); + }, + _ => { + let mut found = false; + for param in &self.gp { + if key == *param { + found = true; + call = call.param(self.gpm.iter().find(|t| t.0 == key).unwrap_or(&("", key)).1, value.unwrap_or("unset")); + break; + } + } + if !found { + err.issues.push(CLIError::UnknownParameter(key.to_string(), + {let mut v = Vec::new(); + v.extend(self.gp.iter().map(|v|*v)); + v.extend(["page-token", "page-size"].iter().map(|v|*v)); + v } )); + } + } + } + } + let protocol = CallType::Standard; + if dry_run { + Ok(()) + } else { + assert!(err.issues.len() == 0); + for scope in self.opt.values_of("url").map(|i|i.collect()).unwrap_or(Vec::new()).iter() { + call = call.add_scope(scope); + } + let mut ostream = match writer_from_opts(opt.value_of("out")) { + Ok(mut f) => f, + Err(io_err) => return Err(DoitError::IoError(opt.value_of("out").unwrap_or("-").to_string(), io_err)), + }; + match match protocol { + CallType::Standard => call.doit(), + _ => unreachable!() + } { + Err(api_err) => Err(DoitError::ApiError(api_err)), + Ok((mut response, output_schema)) => { + let mut value = json::value::to_value(&output_schema); + remove_json_null_values(&mut value); + json::to_writer_pretty(&mut ostream, &value).unwrap(); + ostream.flush().unwrap(); + Ok(()) + } + } + } + } + + fn _projects_histories_executions_steps_patch(&self, opt: &ArgMatches<'n>, dry_run: bool, err: &mut InvalidOptionsError) + -> Result<(), DoitError> { + + let mut field_cursor = FieldCursor::default(); + let mut object = json::value::Value::Object(Default::default()); + + for kvarg in opt.values_of("kv").map(|i|i.collect()).unwrap_or(Vec::new()).iter() { + let last_errc = err.issues.len(); + let (key, value) = parse_kv_arg(&*kvarg, err, false); + let mut temp_cursor = field_cursor.clone(); + if let Err(field_err) = temp_cursor.set(&*key) { + err.issues.push(field_err); + } + if value.is_none() { + field_cursor = temp_cursor.clone(); + if err.issues.len() > last_errc { + err.issues.remove(last_errc); + } + continue; + } + + let type_info: Option<(&'static str, JsonTypeInfo)> = + match &temp_cursor.to_string()[..] { + "test-execution-step.test-timing.test-process-duration.nanos" => Some(("testExecutionStep.testTiming.testProcessDuration.nanos", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), + "test-execution-step.test-timing.test-process-duration.seconds" => Some(("testExecutionStep.testTiming.testProcessDuration.seconds", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "test-execution-step.tool-execution.exit-code.number" => Some(("testExecutionStep.toolExecution.exitCode.number", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), + "test-execution-step.tool-execution.command-line-arguments" => Some(("testExecutionStep.toolExecution.commandLineArguments", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Vec })), + "step-id" => Some(("stepId", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "run-duration.nanos" => Some(("runDuration.nanos", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), + "run-duration.seconds" => Some(("runDuration.seconds", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "description" => Some(("description", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "name" => Some(("name", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "creation-time.nanos" => Some(("creationTime.nanos", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), + "creation-time.seconds" => Some(("creationTime.seconds", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "tool-execution-step.tool-execution.exit-code.number" => Some(("toolExecutionStep.toolExecution.exitCode.number", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), + "tool-execution-step.tool-execution.command-line-arguments" => Some(("toolExecutionStep.toolExecution.commandLineArguments", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Vec })), + "state" => Some(("state", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "completion-time.nanos" => Some(("completionTime.nanos", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), + "completion-time.seconds" => Some(("completionTime.seconds", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "outcome.inconclusive-detail.infrastructure-failure" => Some(("outcome.inconclusiveDetail.infrastructureFailure", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "outcome.inconclusive-detail.native-crash" => Some(("outcome.inconclusiveDetail.nativeCrash", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "outcome.inconclusive-detail.aborted-by-user" => Some(("outcome.inconclusiveDetail.abortedByUser", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "outcome.skipped-detail.incompatible-app-version" => Some(("outcome.skippedDetail.incompatibleAppVersion", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "outcome.skipped-detail.incompatible-architecture" => Some(("outcome.skippedDetail.incompatibleArchitecture", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "outcome.skipped-detail.incompatible-device" => Some(("outcome.skippedDetail.incompatibleDevice", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "outcome.success-detail.other-native-crash" => Some(("outcome.successDetail.otherNativeCrash", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "outcome.failure-detail.other-native-crash" => Some(("outcome.failureDetail.otherNativeCrash", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "outcome.failure-detail.crashed" => Some(("outcome.failureDetail.crashed", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "outcome.failure-detail.not-installed" => Some(("outcome.failureDetail.notInstalled", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "outcome.failure-detail.timed-out" => Some(("outcome.failureDetail.timedOut", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + "outcome.summary" => Some(("outcome.summary", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "device-usage-duration.nanos" => Some(("deviceUsageDuration.nanos", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), + "device-usage-duration.seconds" => Some(("deviceUsageDuration.seconds", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "has-images" => Some(("hasImages", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), + _ => { + let suggestion = FieldCursor::did_you_mean(key, &vec!["aborted-by-user", "command-line-arguments", "completion-time", "crashed", "creation-time", "description", "device-usage-duration", "exit-code", "failure-detail", "has-images", "incompatible-app-version", "incompatible-architecture", "incompatible-device", "inconclusive-detail", "infrastructure-failure", "name", "nanos", "native-crash", "not-installed", "number", "other-native-crash", "outcome", "run-duration", "seconds", "skipped-detail", "state", "step-id", "success-detail", "summary", "test-execution-step", "test-process-duration", "test-timing", "timed-out", "tool-execution", "tool-execution-step"]); + err.issues.push(CLIError::Field(FieldError::Unknown(temp_cursor.to_string(), suggestion, value.map(|v| v.to_string())))); + None + } + }; + if let Some((field_cursor_str, type_info)) = type_info { + FieldCursor::from(field_cursor_str).set_json_value(&mut object, value.unwrap(), type_info, err, &temp_cursor); + } + } + let mut request: api::Step = json::value::from_value(object).unwrap(); + let mut call = self.hub.projects().histories_executions_steps_patch(request, opt.value_of("project-id").unwrap_or(""), opt.value_of("history-id").unwrap_or(""), opt.value_of("execution-id").unwrap_or(""), opt.value_of("step-id").unwrap_or("")); + for parg in opt.values_of("v").map(|i|i.collect()).unwrap_or(Vec::new()).iter() { + let (key, value) = parse_kv_arg(&*parg, err, false); + match key { + "request-id" => { + call = call.request_id(value.unwrap_or("")); + }, + _ => { + let mut found = false; + for param in &self.gp { + if key == *param { + found = true; + call = call.param(self.gpm.iter().find(|t| t.0 == key).unwrap_or(&("", key)).1, value.unwrap_or("unset")); + break; + } + } + if !found { + err.issues.push(CLIError::UnknownParameter(key.to_string(), + {let mut v = Vec::new(); + v.extend(self.gp.iter().map(|v|*v)); + v.extend(["request-id"].iter().map(|v|*v)); + v } )); + } + } + } + } + let protocol = CallType::Standard; + if dry_run { + Ok(()) + } else { + assert!(err.issues.len() == 0); + for scope in self.opt.values_of("url").map(|i|i.collect()).unwrap_or(Vec::new()).iter() { + call = call.add_scope(scope); + } + let mut ostream = match writer_from_opts(opt.value_of("out")) { + Ok(mut f) => f, + Err(io_err) => return Err(DoitError::IoError(opt.value_of("out").unwrap_or("-").to_string(), io_err)), + }; + match match protocol { + CallType::Standard => call.doit(), + _ => unreachable!() + } { + Err(api_err) => Err(DoitError::ApiError(api_err)), + Ok((mut response, output_schema)) => { + let mut value = json::value::to_value(&output_schema); + remove_json_null_values(&mut value); + json::to_writer_pretty(&mut ostream, &value).unwrap(); + ostream.flush().unwrap(); + Ok(()) + } + } + } + } + + fn _projects_histories_executions_steps_publish_xunit_xml_files(&self, opt: &ArgMatches<'n>, dry_run: bool, err: &mut InvalidOptionsError) + -> Result<(), DoitError> { + + let mut field_cursor = FieldCursor::default(); + let mut object = json::value::Value::Object(Default::default()); + + for kvarg in opt.values_of("kv").map(|i|i.collect()).unwrap_or(Vec::new()).iter() { + let last_errc = err.issues.len(); + let (key, value) = parse_kv_arg(&*kvarg, err, false); + let mut temp_cursor = field_cursor.clone(); + if let Err(field_err) = temp_cursor.set(&*key) { + err.issues.push(field_err); + } + if value.is_none() { + field_cursor = temp_cursor.clone(); + if err.issues.len() > last_errc { + err.issues.remove(last_errc); + } + continue; + } + + let type_info: Option<(&'static str, JsonTypeInfo)> = + match &temp_cursor.to_string()[..] { + _ => { + let suggestion = FieldCursor::did_you_mean(key, &vec![]); + err.issues.push(CLIError::Field(FieldError::Unknown(temp_cursor.to_string(), suggestion, value.map(|v| v.to_string())))); + None + } + }; + if let Some((field_cursor_str, type_info)) = type_info { + FieldCursor::from(field_cursor_str).set_json_value(&mut object, value.unwrap(), type_info, err, &temp_cursor); + } + } + let mut request: api::PublishXunitXmlFilesRequest = json::value::from_value(object).unwrap(); + let mut call = self.hub.projects().histories_executions_steps_publish_xunit_xml_files(request, opt.value_of("project-id").unwrap_or(""), opt.value_of("history-id").unwrap_or(""), opt.value_of("execution-id").unwrap_or(""), opt.value_of("step-id").unwrap_or("")); + for parg in opt.values_of("v").map(|i|i.collect()).unwrap_or(Vec::new()).iter() { + let (key, value) = parse_kv_arg(&*parg, err, false); + match key { + _ => { + let mut found = false; + for param in &self.gp { + if key == *param { + found = true; + call = call.param(self.gpm.iter().find(|t| t.0 == key).unwrap_or(&("", key)).1, value.unwrap_or("unset")); + break; + } + } + if !found { + err.issues.push(CLIError::UnknownParameter(key.to_string(), + {let mut v = Vec::new(); + v.extend(self.gp.iter().map(|v|*v)); + v } )); + } + } + } + } + let protocol = CallType::Standard; + if dry_run { + Ok(()) + } else { + assert!(err.issues.len() == 0); + for scope in self.opt.values_of("url").map(|i|i.collect()).unwrap_or(Vec::new()).iter() { + call = call.add_scope(scope); + } + let mut ostream = match writer_from_opts(opt.value_of("out")) { + Ok(mut f) => f, + Err(io_err) => return Err(DoitError::IoError(opt.value_of("out").unwrap_or("-").to_string(), io_err)), + }; + match match protocol { + CallType::Standard => call.doit(), + _ => unreachable!() + } { + Err(api_err) => Err(DoitError::ApiError(api_err)), + Ok((mut response, output_schema)) => { + let mut value = json::value::to_value(&output_schema); + remove_json_null_values(&mut value); + json::to_writer_pretty(&mut ostream, &value).unwrap(); + ostream.flush().unwrap(); + Ok(()) + } + } + } + } + + fn _projects_histories_executions_steps_thumbnails_list(&self, opt: &ArgMatches<'n>, dry_run: bool, err: &mut InvalidOptionsError) + -> Result<(), DoitError> { + let mut call = self.hub.projects().histories_executions_steps_thumbnails_list(opt.value_of("project-id").unwrap_or(""), opt.value_of("history-id").unwrap_or(""), opt.value_of("execution-id").unwrap_or(""), opt.value_of("step-id").unwrap_or("")); + for parg in opt.values_of("v").map(|i|i.collect()).unwrap_or(Vec::new()).iter() { + let (key, value) = parse_kv_arg(&*parg, err, false); + match key { + "page-token" => { + call = call.page_token(value.unwrap_or("")); + }, + "page-size" => { + call = call.page_size(arg_from_str(value.unwrap_or("-0"), err, "page-size", "integer")); + }, + _ => { + let mut found = false; + for param in &self.gp { + if key == *param { + found = true; + call = call.param(self.gpm.iter().find(|t| t.0 == key).unwrap_or(&("", key)).1, value.unwrap_or("unset")); + break; + } + } + if !found { + err.issues.push(CLIError::UnknownParameter(key.to_string(), + {let mut v = Vec::new(); + v.extend(self.gp.iter().map(|v|*v)); + v.extend(["page-token", "page-size"].iter().map(|v|*v)); + v } )); + } + } + } + } + let protocol = CallType::Standard; + if dry_run { + Ok(()) + } else { + assert!(err.issues.len() == 0); + for scope in self.opt.values_of("url").map(|i|i.collect()).unwrap_or(Vec::new()).iter() { + call = call.add_scope(scope); + } + let mut ostream = match writer_from_opts(opt.value_of("out")) { + Ok(mut f) => f, + Err(io_err) => return Err(DoitError::IoError(opt.value_of("out").unwrap_or("-").to_string(), io_err)), + }; + match match protocol { + CallType::Standard => call.doit(), + _ => unreachable!() + } { + Err(api_err) => Err(DoitError::ApiError(api_err)), + Ok((mut response, output_schema)) => { + let mut value = json::value::to_value(&output_schema); + remove_json_null_values(&mut value); + json::to_writer_pretty(&mut ostream, &value).unwrap(); + ostream.flush().unwrap(); + Ok(()) + } + } + } + } + + fn _projects_histories_get(&self, opt: &ArgMatches<'n>, dry_run: bool, err: &mut InvalidOptionsError) + -> Result<(), DoitError> { + let mut call = self.hub.projects().histories_get(opt.value_of("project-id").unwrap_or(""), opt.value_of("history-id").unwrap_or("")); + for parg in opt.values_of("v").map(|i|i.collect()).unwrap_or(Vec::new()).iter() { + let (key, value) = parse_kv_arg(&*parg, err, false); + match key { + _ => { + let mut found = false; + for param in &self.gp { + if key == *param { + found = true; + call = call.param(self.gpm.iter().find(|t| t.0 == key).unwrap_or(&("", key)).1, value.unwrap_or("unset")); + break; + } + } + if !found { + err.issues.push(CLIError::UnknownParameter(key.to_string(), + {let mut v = Vec::new(); + v.extend(self.gp.iter().map(|v|*v)); + v } )); + } + } + } + } + let protocol = CallType::Standard; + if dry_run { + Ok(()) + } else { + assert!(err.issues.len() == 0); + for scope in self.opt.values_of("url").map(|i|i.collect()).unwrap_or(Vec::new()).iter() { + call = call.add_scope(scope); + } + let mut ostream = match writer_from_opts(opt.value_of("out")) { + Ok(mut f) => f, + Err(io_err) => return Err(DoitError::IoError(opt.value_of("out").unwrap_or("-").to_string(), io_err)), + }; + match match protocol { + CallType::Standard => call.doit(), + _ => unreachable!() + } { + Err(api_err) => Err(DoitError::ApiError(api_err)), + Ok((mut response, output_schema)) => { + let mut value = json::value::to_value(&output_schema); + remove_json_null_values(&mut value); + json::to_writer_pretty(&mut ostream, &value).unwrap(); + ostream.flush().unwrap(); + Ok(()) + } + } + } + } + + fn _projects_histories_list(&self, opt: &ArgMatches<'n>, dry_run: bool, err: &mut InvalidOptionsError) + -> Result<(), DoitError> { + let mut call = self.hub.projects().histories_list(opt.value_of("project-id").unwrap_or("")); + for parg in opt.values_of("v").map(|i|i.collect()).unwrap_or(Vec::new()).iter() { + let (key, value) = parse_kv_arg(&*parg, err, false); + match key { + "page-token" => { + call = call.page_token(value.unwrap_or("")); + }, + "page-size" => { + call = call.page_size(arg_from_str(value.unwrap_or("-0"), err, "page-size", "integer")); + }, + "filter-by-name" => { + call = call.filter_by_name(value.unwrap_or("")); + }, + _ => { + let mut found = false; + for param in &self.gp { + if key == *param { + found = true; + call = call.param(self.gpm.iter().find(|t| t.0 == key).unwrap_or(&("", key)).1, value.unwrap_or("unset")); + break; + } + } + if !found { + err.issues.push(CLIError::UnknownParameter(key.to_string(), + {let mut v = Vec::new(); + v.extend(self.gp.iter().map(|v|*v)); + v.extend(["page-token", "filter-by-name", "page-size"].iter().map(|v|*v)); + v } )); + } + } + } + } + let protocol = CallType::Standard; + if dry_run { + Ok(()) + } else { + assert!(err.issues.len() == 0); + for scope in self.opt.values_of("url").map(|i|i.collect()).unwrap_or(Vec::new()).iter() { + call = call.add_scope(scope); + } + let mut ostream = match writer_from_opts(opt.value_of("out")) { + Ok(mut f) => f, + Err(io_err) => return Err(DoitError::IoError(opt.value_of("out").unwrap_or("-").to_string(), io_err)), + }; + match match protocol { + CallType::Standard => call.doit(), + _ => unreachable!() + } { + Err(api_err) => Err(DoitError::ApiError(api_err)), + Ok((mut response, output_schema)) => { + let mut value = json::value::to_value(&output_schema); + remove_json_null_values(&mut value); + json::to_writer_pretty(&mut ostream, &value).unwrap(); + ostream.flush().unwrap(); + Ok(()) + } + } + } + } + + fn _projects_initialize_settings(&self, opt: &ArgMatches<'n>, dry_run: bool, err: &mut InvalidOptionsError) + -> Result<(), DoitError> { + let mut call = self.hub.projects().initialize_settings(opt.value_of("project-id").unwrap_or("")); + for parg in opt.values_of("v").map(|i|i.collect()).unwrap_or(Vec::new()).iter() { + let (key, value) = parse_kv_arg(&*parg, err, false); + match key { + _ => { + let mut found = false; + for param in &self.gp { + if key == *param { + found = true; + call = call.param(self.gpm.iter().find(|t| t.0 == key).unwrap_or(&("", key)).1, value.unwrap_or("unset")); + break; + } + } + if !found { + err.issues.push(CLIError::UnknownParameter(key.to_string(), + {let mut v = Vec::new(); + v.extend(self.gp.iter().map(|v|*v)); + v } )); + } + } + } + } + let protocol = CallType::Standard; + if dry_run { + Ok(()) + } else { + assert!(err.issues.len() == 0); + for scope in self.opt.values_of("url").map(|i|i.collect()).unwrap_or(Vec::new()).iter() { + call = call.add_scope(scope); + } + let mut ostream = match writer_from_opts(opt.value_of("out")) { + Ok(mut f) => f, + Err(io_err) => return Err(DoitError::IoError(opt.value_of("out").unwrap_or("-").to_string(), io_err)), + }; + match match protocol { + CallType::Standard => call.doit(), + _ => unreachable!() + } { + Err(api_err) => Err(DoitError::ApiError(api_err)), + Ok((mut response, output_schema)) => { + let mut value = json::value::to_value(&output_schema); + remove_json_null_values(&mut value); + json::to_writer_pretty(&mut ostream, &value).unwrap(); + ostream.flush().unwrap(); + Ok(()) + } + } + } + } + + fn _doit(&self, dry_run: bool) -> Result, Option> { + let mut err = InvalidOptionsError::new(); + let mut call_result: Result<(), DoitError> = Ok(()); + let mut err_opt: Option = None; + match self.opt.subcommand() { + ("projects", Some(opt)) => { + match opt.subcommand() { + ("get-settings", Some(opt)) => { + call_result = self._projects_get_settings(opt, dry_run, &mut err); + }, + ("histories-create", Some(opt)) => { + call_result = self._projects_histories_create(opt, dry_run, &mut err); + }, + ("histories-executions-create", Some(opt)) => { + call_result = self._projects_histories_executions_create(opt, dry_run, &mut err); + }, + ("histories-executions-get", Some(opt)) => { + call_result = self._projects_histories_executions_get(opt, dry_run, &mut err); + }, + ("histories-executions-list", Some(opt)) => { + call_result = self._projects_histories_executions_list(opt, dry_run, &mut err); + }, + ("histories-executions-patch", Some(opt)) => { + call_result = self._projects_histories_executions_patch(opt, dry_run, &mut err); + }, + ("histories-executions-steps-create", Some(opt)) => { + call_result = self._projects_histories_executions_steps_create(opt, dry_run, &mut err); + }, + ("histories-executions-steps-get", Some(opt)) => { + call_result = self._projects_histories_executions_steps_get(opt, dry_run, &mut err); + }, + ("histories-executions-steps-list", Some(opt)) => { + call_result = self._projects_histories_executions_steps_list(opt, dry_run, &mut err); + }, + ("histories-executions-steps-patch", Some(opt)) => { + call_result = self._projects_histories_executions_steps_patch(opt, dry_run, &mut err); + }, + ("histories-executions-steps-publish-xunit-xml-files", Some(opt)) => { + call_result = self._projects_histories_executions_steps_publish_xunit_xml_files(opt, dry_run, &mut err); + }, + ("histories-executions-steps-thumbnails-list", Some(opt)) => { + call_result = self._projects_histories_executions_steps_thumbnails_list(opt, dry_run, &mut err); + }, + ("histories-get", Some(opt)) => { + call_result = self._projects_histories_get(opt, dry_run, &mut err); + }, + ("histories-list", Some(opt)) => { + call_result = self._projects_histories_list(opt, dry_run, &mut err); + }, + ("initialize-settings", Some(opt)) => { + call_result = self._projects_initialize_settings(opt, dry_run, &mut err); + }, + _ => { + err.issues.push(CLIError::MissingMethodError("projects".to_string())); + writeln!(io::stderr(), "{}\n", opt.usage()).ok(); + } + } + }, + _ => { + err.issues.push(CLIError::MissingCommandError); + writeln!(io::stderr(), "{}\n", self.opt.usage()).ok(); + } + } + + if dry_run { + if err.issues.len() > 0 { + err_opt = Some(err); + } + Err(err_opt) + } else { + Ok(call_result) + } + } + + // Please note that this call will fail if any part of the opt can't be handled + fn new(opt: ArgMatches<'n>) -> Result, InvalidOptionsError> { + let (config_dir, secret) = { + let config_dir = match cmn::assure_config_dir_exists(opt.value_of("folder").unwrap_or("~/.google-service-cli")) { + Err(e) => return Err(InvalidOptionsError::single(e, 3)), + Ok(p) => p, + }; + + match cmn::application_secret_from_directory(&config_dir, "toolresults1-beta3-secret.json", + "{\"installed\":{\"auth_uri\":\"https://accounts.google.com/o/oauth2/auth\",\"client_secret\":\"hCsslbCUyfehWMmbkG8vTYxG\",\"token_uri\":\"https://accounts.google.com/o/oauth2/token\",\"client_email\":\"\",\"redirect_uris\":[\"urn:ietf:wg:oauth:2.0:oob\",\"oob\"],\"client_x509_cert_url\":\"\",\"client_id\":\"620010449518-9ngf7o4dhs0dka470npqvor6dc5lqb9b.apps.googleusercontent.com\",\"auth_provider_x509_cert_url\":\"https://www.googleapis.com/oauth2/v1/certs\"}}") { + Ok(secret) => (config_dir, secret), + Err(e) => return Err(InvalidOptionsError::single(e, 4)) + } + }; + + let auth = Authenticator::new( &secret, DefaultAuthenticatorDelegate, + if opt.is_present("debug-auth") { + hyper::Client::with_connector(mock::TeeConnector { + connector: hyper::net::HttpsConnector::::default() + }) + } else { + hyper::Client::new() + }, + JsonTokenStorage { + program_name: "toolresults1-beta3", + db_dir: config_dir.clone(), + }, None); + + let client = + if opt.is_present("debug") { + hyper::Client::with_connector(mock::TeeConnector { + connector: hyper::net::HttpsConnector::::default() + }) + } else { + hyper::Client::new() + }; + let engine = Engine { + opt: opt, + hub: api::ToolResults::new(client, auth), + gp: vec!["alt", "fields", "key", "oauth-token", "pretty-print", "quota-user", "user-ip"], + gpm: vec![ + ("oauth-token", "oauth_token"), + ("pretty-print", "prettyPrint"), + ("quota-user", "quotaUser"), + ("user-ip", "userIp"), + ] + }; + + match engine._doit(true) { + Err(Some(err)) => Err(err), + Err(None) => Ok(engine), + Ok(_) => unreachable!(), + } + } + + fn doit(&self) -> Result<(), DoitError> { + match self._doit(false) { + Ok(res) => res, + Err(_) => unreachable!(), + } + } +} + +fn main() { + let mut exit_status = 0i32; + let arg_data = [ + ("projects", "methods: 'get-settings', 'histories-create', 'histories-executions-create', 'histories-executions-get', 'histories-executions-list', 'histories-executions-patch', 'histories-executions-steps-create', 'histories-executions-steps-get', 'histories-executions-steps-list', 'histories-executions-steps-patch', 'histories-executions-steps-publish-xunit-xml-files', 'histories-executions-steps-thumbnails-list', 'histories-get', 'histories-list' and 'initialize-settings'", vec![ + ("get-settings", + Some(r##"Gets the Tool Results settings for a project. + + May return any of the following canonical error codes: + + - PERMISSION_DENIED - if the user is not authorized to read from project"##), + "Details at http://byron.github.io/google-apis-rs/google_toolresults1_beta3_cli/projects_get-settings", + vec![ + (Some(r##"project-id"##), + None, + Some(r##"A Project id. + + Required."##), + Some(true), + Some(false)), + + (Some(r##"v"##), + Some(r##"p"##), + Some(r##"Set various optional parameters, matching the key=value form"##), + Some(false), + Some(true)), + + (Some(r##"out"##), + Some(r##"o"##), + Some(r##"Specify the file into which to write the program's output"##), + Some(false), + Some(false)), + ]), + ("histories-create", + Some(r##"Creates a History. + + The returned History will have the id set. + + May return any of the following canonical error codes: + + - PERMISSION_DENIED - if the user is not authorized to write to project - INVALID_ARGUMENT - if the request is malformed - NOT_FOUND - if the containing project does not exist"##), + "Details at http://byron.github.io/google-apis-rs/google_toolresults1_beta3_cli/projects_histories-create", + vec![ + (Some(r##"project-id"##), + None, + Some(r##"A Project id. + + Required."##), + Some(true), + Some(false)), + + (Some(r##"kv"##), + Some(r##"r"##), + Some(r##"Set various fields of the request structure, matching the key=value form"##), + Some(true), + Some(true)), + + (Some(r##"v"##), + Some(r##"p"##), + Some(r##"Set various optional parameters, matching the key=value form"##), + Some(false), + Some(true)), + + (Some(r##"out"##), + Some(r##"o"##), + Some(r##"Specify the file into which to write the program's output"##), + Some(false), + Some(false)), + ]), + ("histories-executions-create", + Some(r##"Creates an Execution. + + The returned Execution will have the id set. + + May return any of the following canonical error codes: + + - PERMISSION_DENIED - if the user is not authorized to write to project - INVALID_ARGUMENT - if the request is malformed - NOT_FOUND - if the containing History does not exist"##), + "Details at http://byron.github.io/google-apis-rs/google_toolresults1_beta3_cli/projects_histories-executions-create", + vec![ + (Some(r##"project-id"##), + None, + Some(r##"A Project id. + + Required."##), + Some(true), + Some(false)), + + (Some(r##"history-id"##), + None, + Some(r##"A History id. + + Required."##), + Some(true), + Some(false)), + + (Some(r##"kv"##), + Some(r##"r"##), + Some(r##"Set various fields of the request structure, matching the key=value form"##), + Some(true), + Some(true)), + + (Some(r##"v"##), + Some(r##"p"##), + Some(r##"Set various optional parameters, matching the key=value form"##), + Some(false), + Some(true)), + + (Some(r##"out"##), + Some(r##"o"##), + Some(r##"Specify the file into which to write the program's output"##), + Some(false), + Some(false)), + ]), + ("histories-executions-get", + Some(r##"Gets an Execution. + + May return any of the following canonical error codes: + + - PERMISSION_DENIED - if the user is not authorized to write to project - INVALID_ARGUMENT - if the request is malformed - NOT_FOUND - if the Execution does not exist"##), + "Details at http://byron.github.io/google-apis-rs/google_toolresults1_beta3_cli/projects_histories-executions-get", + vec![ + (Some(r##"project-id"##), + None, + Some(r##"A Project id. + + Required."##), + Some(true), + Some(false)), + + (Some(r##"history-id"##), + None, + Some(r##"A History id. + + Required."##), + Some(true), + Some(false)), + + (Some(r##"execution-id"##), + None, + Some(r##"An Execution id. + + Required."##), + Some(true), + Some(false)), + + (Some(r##"v"##), + Some(r##"p"##), + Some(r##"Set various optional parameters, matching the key=value form"##), + Some(false), + Some(true)), + + (Some(r##"out"##), + Some(r##"o"##), + Some(r##"Specify the file into which to write the program's output"##), + Some(false), + Some(false)), + ]), + ("histories-executions-list", + Some(r##"Lists Histories for a given Project. + + The executions are sorted by creation_time in descending order. The execution_id key will be used to order the executions with the same creation_time. + + May return any of the following canonical error codes: + + - PERMISSION_DENIED - if the user is not authorized to read project - INVALID_ARGUMENT - if the request is malformed - NOT_FOUND - if the containing History does not exist"##), + "Details at http://byron.github.io/google-apis-rs/google_toolresults1_beta3_cli/projects_histories-executions-list", + vec![ + (Some(r##"project-id"##), + None, + Some(r##"A Project id. + + Required."##), + Some(true), + Some(false)), + + (Some(r##"history-id"##), + None, + Some(r##"A History id. + + Required."##), + Some(true), + Some(false)), + + (Some(r##"v"##), + Some(r##"p"##), + Some(r##"Set various optional parameters, matching the key=value form"##), + Some(false), + Some(true)), + + (Some(r##"out"##), + Some(r##"o"##), + Some(r##"Specify the file into which to write the program's output"##), + Some(false), + Some(false)), + ]), + ("histories-executions-patch", + Some(r##"Updates an existing Execution with the supplied partial entity. + + May return any of the following canonical error codes: + + - PERMISSION_DENIED - if the user is not authorized to write to project - INVALID_ARGUMENT - if the request is malformed - FAILED_PRECONDITION - if the requested state transition is illegal - NOT_FOUND - if the containing History does not exist"##), + "Details at http://byron.github.io/google-apis-rs/google_toolresults1_beta3_cli/projects_histories-executions-patch", + vec![ + (Some(r##"project-id"##), + None, + Some(r##"A Project id. Required."##), + Some(true), + Some(false)), + + (Some(r##"history-id"##), + None, + Some(r##"Required."##), + Some(true), + Some(false)), + + (Some(r##"execution-id"##), + None, + Some(r##"Required."##), + Some(true), + Some(false)), + + (Some(r##"kv"##), + Some(r##"r"##), + Some(r##"Set various fields of the request structure, matching the key=value form"##), + Some(true), + Some(true)), + + (Some(r##"v"##), + Some(r##"p"##), + Some(r##"Set various optional parameters, matching the key=value form"##), + Some(false), + Some(true)), + + (Some(r##"out"##), + Some(r##"o"##), + Some(r##"Specify the file into which to write the program's output"##), + Some(false), + Some(false)), + ]), + ("histories-executions-steps-create", + Some(r##"Creates a Step. + + The returned Step will have the id set. + + May return any of the following canonical error codes: + + - PERMISSION_DENIED - if the user is not authorized to write to project - INVALID_ARGUMENT - if the request is malformed - FAILED_PRECONDITION - if the step is too large (more than 10Mib) - NOT_FOUND - if the containing Execution does not exist"##), + "Details at http://byron.github.io/google-apis-rs/google_toolresults1_beta3_cli/projects_histories-executions-steps-create", + vec![ + (Some(r##"project-id"##), + None, + Some(r##"A Project id. + + Required."##), + Some(true), + Some(false)), + + (Some(r##"history-id"##), + None, + Some(r##"A History id. + + Required."##), + Some(true), + Some(false)), + + (Some(r##"execution-id"##), + None, + Some(r##"A Execution id. + + Required."##), + Some(true), + Some(false)), + + (Some(r##"kv"##), + Some(r##"r"##), + Some(r##"Set various fields of the request structure, matching the key=value form"##), + Some(true), + Some(true)), + + (Some(r##"v"##), + Some(r##"p"##), + Some(r##"Set various optional parameters, matching the key=value form"##), + Some(false), + Some(true)), + + (Some(r##"out"##), + Some(r##"o"##), + Some(r##"Specify the file into which to write the program's output"##), + Some(false), + Some(false)), + ]), + ("histories-executions-steps-get", + Some(r##"Gets a Step. + + May return any of the following canonical error codes: + + - PERMISSION_DENIED - if the user is not authorized to read project - INVALID_ARGUMENT - if the request is malformed - NOT_FOUND - if the Step does not exist"##), + "Details at http://byron.github.io/google-apis-rs/google_toolresults1_beta3_cli/projects_histories-executions-steps-get", + vec![ + (Some(r##"project-id"##), + None, + Some(r##"A Project id. + + Required."##), + Some(true), + Some(false)), + + (Some(r##"history-id"##), + None, + Some(r##"A History id. + + Required."##), + Some(true), + Some(false)), + + (Some(r##"execution-id"##), + None, + Some(r##"A Execution id. + + Required."##), + Some(true), + Some(false)), + + (Some(r##"step-id"##), + None, + Some(r##"A Step id. + + Required."##), + Some(true), + Some(false)), + + (Some(r##"v"##), + Some(r##"p"##), + Some(r##"Set various optional parameters, matching the key=value form"##), + Some(false), + Some(true)), + + (Some(r##"out"##), + Some(r##"o"##), + Some(r##"Specify the file into which to write the program's output"##), + Some(false), + Some(false)), + ]), + ("histories-executions-steps-list", + Some(r##"Lists Steps for a given Execution. + + The steps are sorted by creation_time in descending order. The step_id key will be used to order the steps with the same creation_time. + + May return any of the following canonical error codes: + + - PERMISSION_DENIED - if the user is not authorized to read project - INVALID_ARGUMENT - if the request is malformed - FAILED_PRECONDITION - if an argument in the request happens to be invalid; e.g. if an attempt is made to list the children of a nonexistent Step - NOT_FOUND - if the containing Execution does not exist"##), + "Details at http://byron.github.io/google-apis-rs/google_toolresults1_beta3_cli/projects_histories-executions-steps-list", + vec![ + (Some(r##"project-id"##), + None, + Some(r##"A Project id. + + Required."##), + Some(true), + Some(false)), + + (Some(r##"history-id"##), + None, + Some(r##"A History id. + + Required."##), + Some(true), + Some(false)), + + (Some(r##"execution-id"##), + None, + Some(r##"A Execution id. + + Required."##), + Some(true), + Some(false)), + + (Some(r##"v"##), + Some(r##"p"##), + Some(r##"Set various optional parameters, matching the key=value form"##), + Some(false), + Some(true)), + + (Some(r##"out"##), + Some(r##"o"##), + Some(r##"Specify the file into which to write the program's output"##), + Some(false), + Some(false)), + ]), + ("histories-executions-steps-patch", + Some(r##"Updates an existing Step with the supplied partial entity. + + May return any of the following canonical error codes: + + - PERMISSION_DENIED - if the user is not authorized to write project - INVALID_ARGUMENT - if the request is malformed - FAILED_PRECONDITION - if the requested state transition is illegal (e.g try to upload a duplicate xml file), if the updated step is too large (more than 10Mib) - NOT_FOUND - if the containing Execution does not exist"##), + "Details at http://byron.github.io/google-apis-rs/google_toolresults1_beta3_cli/projects_histories-executions-steps-patch", + vec![ + (Some(r##"project-id"##), + None, + Some(r##"A Project id. + + Required."##), + Some(true), + Some(false)), + + (Some(r##"history-id"##), + None, + Some(r##"A History id. + + Required."##), + Some(true), + Some(false)), + + (Some(r##"execution-id"##), + None, + Some(r##"A Execution id. + + Required."##), + Some(true), + Some(false)), + + (Some(r##"step-id"##), + None, + Some(r##"A Step id. + + Required."##), + Some(true), + Some(false)), + + (Some(r##"kv"##), + Some(r##"r"##), + Some(r##"Set various fields of the request structure, matching the key=value form"##), + Some(true), + Some(true)), + + (Some(r##"v"##), + Some(r##"p"##), + Some(r##"Set various optional parameters, matching the key=value form"##), + Some(false), + Some(true)), + + (Some(r##"out"##), + Some(r##"o"##), + Some(r##"Specify the file into which to write the program's output"##), + Some(false), + Some(false)), + ]), + ("histories-executions-steps-publish-xunit-xml-files", + Some(r##"Publish xml files to an existing Step. + + May return any of the following canonical error codes: + + - PERMISSION_DENIED - if the user is not authorized to write project - INVALID_ARGUMENT - if the request is malformed - FAILED_PRECONDITION - if the requested state transition is illegal, e.g try to upload a duplicate xml file or a file too large. - NOT_FOUND - if the containing Execution does not exist"##), + "Details at http://byron.github.io/google-apis-rs/google_toolresults1_beta3_cli/projects_histories-executions-steps-publish-xunit-xml-files", + vec![ + (Some(r##"project-id"##), + None, + Some(r##"A Project id. + + Required."##), + Some(true), + Some(false)), + + (Some(r##"history-id"##), + None, + Some(r##"A History id. + + Required."##), + Some(true), + Some(false)), + + (Some(r##"execution-id"##), + None, + Some(r##"A Execution id. + + Required."##), + Some(true), + Some(false)), + + (Some(r##"step-id"##), + None, + Some(r##"A Step id. Note: This step must include a TestExecutionStep. + + Required."##), + Some(true), + Some(false)), + + (Some(r##"kv"##), + Some(r##"r"##), + Some(r##"Set various fields of the request structure, matching the key=value form"##), + Some(true), + Some(true)), + + (Some(r##"v"##), + Some(r##"p"##), + Some(r##"Set various optional parameters, matching the key=value form"##), + Some(false), + Some(true)), + + (Some(r##"out"##), + Some(r##"o"##), + Some(r##"Specify the file into which to write the program's output"##), + Some(false), + Some(false)), + ]), + ("histories-executions-steps-thumbnails-list", + Some(r##"Lists thumbnails of images attached to a step. + + May return any of the following canonical error codes: - PERMISSION_DENIED - if the user is not authorized to read from the project, or from any of the images - INVALID_ARGUMENT - if the request is malformed - NOT_FOUND - if the step does not exist, or if any of the images do not exist"##), + "Details at http://byron.github.io/google-apis-rs/google_toolresults1_beta3_cli/projects_histories-executions-steps-thumbnails-list", + vec![ + (Some(r##"project-id"##), + None, + Some(r##"A Project id. + + Required."##), + Some(true), + Some(false)), + + (Some(r##"history-id"##), + None, + Some(r##"A History id. + + Required."##), + Some(true), + Some(false)), + + (Some(r##"execution-id"##), + None, + Some(r##"An Execution id. + + Required."##), + Some(true), + Some(false)), + + (Some(r##"step-id"##), + None, + Some(r##"A Step id. + + Required."##), + Some(true), + Some(false)), + + (Some(r##"v"##), + Some(r##"p"##), + Some(r##"Set various optional parameters, matching the key=value form"##), + Some(false), + Some(true)), + + (Some(r##"out"##), + Some(r##"o"##), + Some(r##"Specify the file into which to write the program's output"##), + Some(false), + Some(false)), + ]), + ("histories-get", + Some(r##"Gets a History. + + May return any of the following canonical error codes: + + - PERMISSION_DENIED - if the user is not authorized to read project - INVALID_ARGUMENT - if the request is malformed - NOT_FOUND - if the History does not exist"##), + "Details at http://byron.github.io/google-apis-rs/google_toolresults1_beta3_cli/projects_histories-get", + vec![ + (Some(r##"project-id"##), + None, + Some(r##"A Project id. + + Required."##), + Some(true), + Some(false)), + + (Some(r##"history-id"##), + None, + Some(r##"A History id. + + Required."##), + Some(true), + Some(false)), + + (Some(r##"v"##), + Some(r##"p"##), + Some(r##"Set various optional parameters, matching the key=value form"##), + Some(false), + Some(true)), + + (Some(r##"out"##), + Some(r##"o"##), + Some(r##"Specify the file into which to write the program's output"##), + Some(false), + Some(false)), + ]), + ("histories-list", + Some(r##"Lists Histories for a given Project. + + The histories are sorted by modification time in descending order. The history_id key will be used to order the history with the same modification time. + + May return any of the following canonical error codes: + + - PERMISSION_DENIED - if the user is not authorized to read project - INVALID_ARGUMENT - if the request is malformed - NOT_FOUND - if the History does not exist"##), + "Details at http://byron.github.io/google-apis-rs/google_toolresults1_beta3_cli/projects_histories-list", + vec![ + (Some(r##"project-id"##), + None, + Some(r##"A Project id. + + Required."##), + Some(true), + Some(false)), + + (Some(r##"v"##), + Some(r##"p"##), + Some(r##"Set various optional parameters, matching the key=value form"##), + Some(false), + Some(true)), + + (Some(r##"out"##), + Some(r##"o"##), + Some(r##"Specify the file into which to write the program's output"##), + Some(false), + Some(false)), + ]), + ("initialize-settings", + Some(r##"Creates resources for settings which have not yet been set. + + Currently, this creates a single resource: a Google Cloud Storage bucket, to be used as the default bucket for this project. The bucket is created in the name of the user calling. Except in rare cases, calling this method in parallel from multiple clients will only create a single bucket. In order to avoid unnecessary storage charges, the bucket is configured to automatically delete objects older than 90 days. + + The bucket is created with the project-private ACL: All project team members are given permissions to the bucket and objects created within it according to their roles. Project owners have owners rights, and so on. The default ACL on objects created in the bucket is project-private as well. See Google Cloud Storage documentation for more details. + + If there is already a default bucket set and the project can access the bucket, this call does nothing. However, if the project doesn't have the permission to access the bucket or the bucket is deteleted, a new bucket will be created. + + May return any canonical error codes, including the following: + + - PERMISSION_DENIED - if the user is not authorized to write to project - Any error code raised by Google Cloud Storage"##), + "Details at http://byron.github.io/google-apis-rs/google_toolresults1_beta3_cli/projects_initialize-settings", + vec![ + (Some(r##"project-id"##), + None, + Some(r##"A Project id. + + Required."##), + Some(true), + Some(false)), + + (Some(r##"v"##), + Some(r##"p"##), + Some(r##"Set various optional parameters, matching the key=value form"##), + Some(false), + Some(true)), + + (Some(r##"out"##), + Some(r##"o"##), + Some(r##"Specify the file into which to write the program's output"##), + Some(false), + Some(false)), + ]), + ]), + + ]; + + let mut app = App::new("toolresults1-beta3") + .author("Sebastian Thiel ") + .version("0.3.4+20160408") + .about("Read and publish results from Cloud Test Lab.") + .after_help("All documentation details can be found at http://byron.github.io/google-apis-rs/google_toolresults1_beta3_cli") + .arg(Arg::with_name("url") + .long("scope") + .help("Specify the authentication a method should be executed in. Each scope requires the user to grant this application permission to use it.If unset, it defaults to the shortest scope url for a particular method.") + .multiple(true) + .takes_value(true)) + .arg(Arg::with_name("folder") + .long("config-dir") + .help("A directory into which we will store our persistent data. Defaults to a user-writable directory that we will create during the first invocation.[default: ~/.google-service-cli") + .multiple(false) + .takes_value(true)) + .arg(Arg::with_name("debug") + .long("debug") + .help("Output all server communication to standard error. `tx` and `rx` are placed into the same stream.") + .multiple(false) + .takes_value(false)) + .arg(Arg::with_name("debug-auth") + .long("debug-auth") + .help("Output all communication related to authentication to standard error. `tx` and `rx` are placed into the same stream.") + .multiple(false) + .takes_value(false)); + + for &(main_command_name, about, ref subcommands) in arg_data.iter() { + let mut mcmd = SubCommand::with_name(main_command_name).about(about); + + for &(sub_command_name, ref desc, url_info, ref args) in subcommands { + let mut scmd = SubCommand::with_name(sub_command_name); + if let &Some(desc) = desc { + scmd = scmd.about(desc); + } + scmd = scmd.after_help(url_info); + + for &(ref arg_name, ref flag, ref desc, ref required, ref multi) in args { + let arg_name_str = + match (arg_name, flag) { + (&Some(an), _ ) => an, + (_ , &Some(f)) => f, + _ => unreachable!(), + }; + let mut arg = Arg::with_name(arg_name_str) + .empty_values(false); + if let &Some(short_flag) = flag { + arg = arg.short(short_flag); + } + if let &Some(desc) = desc { + arg = arg.help(desc); + } + if arg_name.is_some() && flag.is_some() { + arg = arg.takes_value(true); + } + if let &Some(required) = required { + arg = arg.required(required); + } + if let &Some(multi) = multi { + arg = arg.multiple(multi); + } + scmd = scmd.arg(arg); + } + mcmd = mcmd.subcommand(scmd); + } + app = app.subcommand(mcmd); + } + + let matches = app.get_matches(); + + let debug = matches.is_present("debug"); + match Engine::new(matches) { + Err(err) => { + exit_status = err.exit_code; + writeln!(io::stderr(), "{}", err).ok(); + }, + Ok(engine) => { + if let Err(doit_err) = engine.doit() { + exit_status = 1; + match doit_err { + DoitError::IoError(path, err) => { + writeln!(io::stderr(), "Failed to open output file '{}': {}", path, err).ok(); + }, + DoitError::ApiError(err) => { + if debug { + writeln!(io::stderr(), "{:#?}", err).ok(); + } else { + writeln!(io::stderr(), "{}", err).ok(); + } + } + } + } + } + } + + std::process::exit(exit_status); +} \ No newline at end of file diff --git a/gen/toolresults1_beta3/Cargo.toml b/gen/toolresults1_beta3/Cargo.toml new file mode 100644 index 0000000000..c5e61e05f9 --- /dev/null +++ b/gen/toolresults1_beta3/Cargo.toml @@ -0,0 +1,29 @@ +# DO NOT EDIT ! +# This file was generated automatically from 'src/mako/Cargo.toml.mako' +# DO NOT EDIT ! +[package] + +name = "google-toolresults1_beta3" +version = "0.1.13+20160408" +authors = ["Sebastian Thiel "] +description = "A complete library to interact with Tool Results (protocol v1beta3)" +repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/toolresults1_beta3" +homepage = "https://developers.google.com/cloud-test-lab/" +documentation = "http://byron.github.io/google-apis-rs/google_toolresults1_beta3" +license = "MIT" +keywords = ["toolresults", "google", "protocol", "web", "api"] +build = "src/build.rs" + + +[dependencies] +hyper = "0.8" +mime = "0.2.0" +serde = "0.6.0" +serde_json = "0.6.0" +yup-oauth2 = ">= 0.5.6" +url = ">= 0.5" + +[build-dependencies] +syntex = { version = "= 0.28" } +serde_codegen = { version = "= 0.6.13" } + diff --git a/gen/toolresults1_beta3/LICENSE.md b/gen/toolresults1_beta3/LICENSE.md new file mode 100644 index 0000000000..ff523b4547 --- /dev/null +++ b/gen/toolresults1_beta3/LICENSE.md @@ -0,0 +1,30 @@ + +The MIT License (MIT) +===================== + +Copyright © `2015-2016` `Sebastian Thiel` + +Permission is hereby granted, free of charge, to any person +obtaining a copy of this software and associated documentation +files (the “Software”), to deal in the Software without +restriction, including without limitation the rights to use, +copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following +conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. diff --git a/gen/toolresults1_beta3/README.md b/gen/toolresults1_beta3/README.md new file mode 100644 index 0000000000..4180a594db --- /dev/null +++ b/gen/toolresults1_beta3/README.md @@ -0,0 +1,183 @@ + +The `google-toolresults1_beta3` library allows access to all features of the *Google Tool Results* service. + +This documentation was generated from *Tool Results* crate version *0.1.13+20160408*, where *20160408* is the exact revision of the *toolresults:v1beta3* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.13*. + +Everything else about the *Tool Results* *v1_beta3* API can be found at the +[official documentation site](https://developers.google.com/cloud-test-lab/). +# Features + +Handle the following *Resources* with ease from the central [hub](http://byron.github.io/google-apis-rs/google_toolresults1_beta3/struct.ToolResults.html) ... + +* projects + * [*get settings*](http://byron.github.io/google-apis-rs/google_toolresults1_beta3/struct.ProjectGetSettingCall.html), [*histories create*](http://byron.github.io/google-apis-rs/google_toolresults1_beta3/struct.ProjectHistoryCreateCall.html), [*histories executions create*](http://byron.github.io/google-apis-rs/google_toolresults1_beta3/struct.ProjectHistoryExecutionCreateCall.html), [*histories executions get*](http://byron.github.io/google-apis-rs/google_toolresults1_beta3/struct.ProjectHistoryExecutionGetCall.html), [*histories executions list*](http://byron.github.io/google-apis-rs/google_toolresults1_beta3/struct.ProjectHistoryExecutionListCall.html), [*histories executions patch*](http://byron.github.io/google-apis-rs/google_toolresults1_beta3/struct.ProjectHistoryExecutionPatchCall.html), [*histories executions steps create*](http://byron.github.io/google-apis-rs/google_toolresults1_beta3/struct.ProjectHistoryExecutionStepCreateCall.html), [*histories executions steps get*](http://byron.github.io/google-apis-rs/google_toolresults1_beta3/struct.ProjectHistoryExecutionStepGetCall.html), [*histories executions steps list*](http://byron.github.io/google-apis-rs/google_toolresults1_beta3/struct.ProjectHistoryExecutionStepListCall.html), [*histories executions steps patch*](http://byron.github.io/google-apis-rs/google_toolresults1_beta3/struct.ProjectHistoryExecutionStepPatchCall.html), [*histories executions steps publish xunit xml files*](http://byron.github.io/google-apis-rs/google_toolresults1_beta3/struct.ProjectHistoryExecutionStepPublishXunitXmlFileCall.html), [*histories executions steps thumbnails list*](http://byron.github.io/google-apis-rs/google_toolresults1_beta3/struct.ProjectHistoryExecutionStepThumbnailListCall.html), [*histories get*](http://byron.github.io/google-apis-rs/google_toolresults1_beta3/struct.ProjectHistoryGetCall.html), [*histories list*](http://byron.github.io/google-apis-rs/google_toolresults1_beta3/struct.ProjectHistoryListCall.html) and [*initialize settings*](http://byron.github.io/google-apis-rs/google_toolresults1_beta3/struct.ProjectInitializeSettingCall.html) + + + + +# Structure of this Library + +The API is structured into the following primary items: + +* **[Hub](http://byron.github.io/google-apis-rs/google_toolresults1_beta3/struct.ToolResults.html)** + * a central object to maintain state and allow accessing all *Activities* + * creates [*Method Builders*](http://byron.github.io/google-apis-rs/google_toolresults1_beta3/trait.MethodsBuilder.html) which in turn + allow access to individual [*Call Builders*](http://byron.github.io/google-apis-rs/google_toolresults1_beta3/trait.CallBuilder.html) +* **[Resources](http://byron.github.io/google-apis-rs/google_toolresults1_beta3/trait.Resource.html)** + * primary types that you can apply *Activities* to + * a collection of properties and *Parts* + * **[Parts](http://byron.github.io/google-apis-rs/google_toolresults1_beta3/trait.Part.html)** + * a collection of properties + * never directly used in *Activities* +* **[Activities](http://byron.github.io/google-apis-rs/google_toolresults1_beta3/trait.CallBuilder.html)** + * operations to apply to *Resources* + +All *structures* are marked with applicable traits to further categorize them and ease browsing. + +Generally speaking, you can invoke *Activities* like this: + +```Rust,ignore +let r = hub.resource().activity(...).doit() +``` + +Or specifically ... + +```ignore +let r = hub.projects().histories_executions_steps_patch(...).doit() +let r = hub.projects().histories_executions_steps_get(...).doit() +let r = hub.projects().histories_executions_steps_publish_xunit_xml_files(...).doit() +let r = hub.projects().histories_executions_steps_create(...).doit() +``` + +The `resource()` and `activity(...)` calls create [builders][builder-pattern]. The second one dealing with `Activities` +supports various methods to configure the impending operation (not shown here). It is made such that all required arguments have to be +specified right away (i.e. `(...)`), whereas all optional ones can be [build up][builder-pattern] as desired. +The `doit()` method performs the actual communication with the server and returns the respective result. + +# Usage + +## Setting up your Project + +To use this library, you would put the following lines into your `Cargo.toml` file: + +```toml +[dependencies] +google-toolresults1_beta3 = "*" +``` + +## A complete example + +```Rust +extern crate hyper; +extern crate yup_oauth2 as oauth2; +extern crate google_toolresults1_beta3 as toolresults1_beta3; +use toolresults1_beta3::Step; +use toolresults1_beta3::{Result, Error}; +use std::default::Default; +use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; +use toolresults1_beta3::ToolResults; + +// Get an ApplicationSecret instance by some means. It contains the `client_id` and +// `client_secret`, among other things. +let secret: ApplicationSecret = Default::default(); +// Instantiate the authenticator. It will choose a suitable authentication flow for you, +// unless you replace `None` with the desired Flow. +// Provide your own `AuthenticatorDelegate` to adjust the way it operates and get feedback about +// what's going on. You probably want to bring in your own `TokenStorage` to persist tokens and +// retrieve them from storage. +let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, + hyper::Client::new(), + ::default(), None); +let mut hub = ToolResults::new(hyper::Client::new(), auth); +// As the method needs a request, you would usually fill it with the desired information +// into the respective structure. Some of the parts shown here might not be applicable ! +// Values shown here are possibly random and not representative ! +let mut req = Step::default(); + +// You can configure optional parameters by calling the respective setters at will, and +// execute the final call using `doit()`. +// Values shown here are possibly random and not representative ! +let result = hub.projects().histories_executions_steps_patch(req, "projectId", "historyId", "executionId", "stepId") + .request_id("et") + .doit(); + +match result { + Err(e) => match e { + // The Error enum provides details about what exactly happened. + // You can also just use its `Debug`, `Display` or `Error` traits + Error::HttpError(_) + |Error::MissingAPIKey + |Error::MissingToken(_) + |Error::Cancelled + |Error::UploadSizeLimitExceeded(_, _) + |Error::Failure(_) + |Error::BadRequest(_) + |Error::FieldClash(_) + |Error::JsonDecodeError(_, _) => println!("{}", e), + }, + Ok(res) => println!("Success: {:?}", res), +} + +``` +## Handling Errors + +All errors produced by the system are provided either as [Result](http://byron.github.io/google-apis-rs/google_toolresults1_beta3/enum.Result.html) enumeration as return value of +the doit() methods, or handed as possibly intermediate results to either the +[Hub Delegate](http://byron.github.io/google-apis-rs/google_toolresults1_beta3/trait.Delegate.html), or the [Authenticator Delegate](http://byron.github.io/google-apis-rs/google_toolresults1_beta3/../yup-oauth2/trait.AuthenticatorDelegate.html). + +When delegates handle errors or intermediate values, they may have a chance to instruct the system to retry. This +makes the system potentially resilient to all kinds of errors. + +## Uploads and Downloads +If a method supports downloads, the response body, which is part of the [Result](http://byron.github.io/google-apis-rs/google_toolresults1_beta3/enum.Result.html), should be +read by you to obtain the media. +If such a method also supports a [Response Result](http://byron.github.io/google-apis-rs/google_toolresults1_beta3/trait.ResponseResult.html), it will return that by default. +You can see it as meta-data for the actual media. To trigger a media download, you will have to set up the builder by making +this call: `.param("alt", "media")`. + +Methods supporting uploads can do so using up to 2 different protocols: +*simple* and *resumable*. The distinctiveness of each is represented by customized +`doit(...)` methods, which are then named `upload(...)` and `upload_resumable(...)` respectively. + +## Customization and Callbacks + +You may alter the way an `doit()` method is called by providing a [delegate](http://byron.github.io/google-apis-rs/google_toolresults1_beta3/trait.Delegate.html) to the +[Method Builder](http://byron.github.io/google-apis-rs/google_toolresults1_beta3/trait.CallBuilder.html) before making the final `doit()` call. +Respective methods will be called to provide progress information, as well as determine whether the system should +retry on failure. + +The [delegate trait](http://byron.github.io/google-apis-rs/google_toolresults1_beta3/trait.Delegate.html) is default-implemented, allowing you to customize it with minimal effort. + +## Optional Parts in Server-Requests + +All structures provided by this library are made to be [enocodable](http://byron.github.io/google-apis-rs/google_toolresults1_beta3/trait.RequestValue.html) and +[decodable](http://byron.github.io/google-apis-rs/google_toolresults1_beta3/trait.ResponseResult.html) via *json*. Optionals are used to indicate that partial requests are responses +are valid. +Most optionals are are considered [Parts](http://byron.github.io/google-apis-rs/google_toolresults1_beta3/trait.Part.html) which are identifiable by name, which will be sent to +the server to indicate either the set parts of the request or the desired parts in the response. + +## Builder Arguments + +Using [method builders](http://byron.github.io/google-apis-rs/google_toolresults1_beta3/trait.CallBuilder.html), you are able to prepare an action call by repeatedly calling it's methods. +These will always take a single argument, for which the following statements are true. + +* [PODs][wiki-pod] are handed by copy +* strings are passed as `&str` +* [request values](http://byron.github.io/google-apis-rs/google_toolresults1_beta3/trait.RequestValue.html) are moved + +Arguments will always be copied or cloned into the builder, to make them independent of their original life times. + +[wiki-pod]: http://en.wikipedia.org/wiki/Plain_old_data_structure +[builder-pattern]: http://en.wikipedia.org/wiki/Builder_pattern +[google-go-api]: https://github.com/google/google-api-go-client + +# License +The **toolresults1_beta3** library was generated by Sebastian Thiel, and is placed +under the *MIT* license. +You can read the full text at the repository's [license file][repo-license]. + +[repo-license]: https://github.com/Byron/google-apis-rs/LICENSE.md diff --git a/gen/toolresults1_beta3/src/build.rs b/gen/toolresults1_beta3/src/build.rs new file mode 100644 index 0000000000..0286b9ea56 --- /dev/null +++ b/gen/toolresults1_beta3/src/build.rs @@ -0,0 +1,16 @@ +extern crate syntex; +extern crate serde_codegen; + +use std::env; +use std::path::Path; + +pub fn main() { + let out_dir = env::var_os("OUT_DIR").unwrap(); + + let src = Path::new("src/lib.rs.in"); + let dst = Path::new(&out_dir).join("lib.rs"); + + let mut registry = syntex::Registry::new(); + serde_codegen::register(&mut registry); + registry.expand("google-toolresults1_beta3", &src, &dst).unwrap(); +} diff --git a/gen/toolresults1_beta3/src/cmn.rs b/gen/toolresults1_beta3/src/cmn.rs new file mode 100644 index 0000000000..c69621da55 --- /dev/null +++ b/gen/toolresults1_beta3/src/cmn.rs @@ -0,0 +1,771 @@ +// COPY OF 'src/rust/api/cmn.rs' +// DO NOT EDIT +use std::io::{self, Read, Seek, Cursor, Write, SeekFrom}; +use std; +use std::fmt::{self, Display}; +use std::str::FromStr; +use std::error; +use std::thread::sleep; +use std::time::Duration; + +use mime::{Mime, TopLevel, SubLevel, Attr, Value}; +use oauth2::{TokenType, Retry, self}; +use hyper; +use hyper::header::{ContentType, ContentLength, Headers, UserAgent, Authorization, Header, + HeaderFormat, Bearer}; +use hyper::http::h1::LINE_ENDING; +use hyper::method::Method; +use hyper::status::StatusCode; + +use serde_json as json; + +/// Identifies the Hub. There is only one per library, this trait is supposed +/// to make intended use more explicit. +/// The hub allows to access all resource methods more easily. +pub trait Hub {} + +/// Identifies types for building methods of a particular resource type +pub trait MethodsBuilder {} + +/// Identifies types which represent builders for a particular resource method +pub trait CallBuilder {} + +/// Identifies types which can be inserted and deleted. +/// Types with this trait are most commonly used by clients of this API. +pub trait Resource {} + +/// Identifies types which are used in API responses. +pub trait ResponseResult {} + +/// Identifies types which are used in API requests. +pub trait RequestValue {} + +/// Identifies types which are not actually used by the API +/// This might be a bug within the google API schema. +pub trait UnusedType {} + +/// Identifies types which are only used as part of other types, which +/// usually are carrying the `Resource` trait. +pub trait Part {} + +/// Identifies types which are only used by other types internally. +/// They have no special meaning, this trait just marks them for completeness. +pub trait NestedType {} + +/// A utility to specify reader types which provide seeking capabilities too +pub trait ReadSeek: Seek + Read {} +impl ReadSeek for T {} + +/// A trait for all types that can convert themselves into a *parts* string +pub trait ToParts { + fn to_parts(&self) -> String; +} + +/// A utility type which can decode a server response that indicates error +#[derive(Deserialize)] +pub struct JsonServerError { + pub error: String, + pub error_description: Option +} + +/// A utility to represent detailed errors we might see in case there are BadRequests. +/// The latter happen if the sent parameters or request structures are unsound +#[derive(Deserialize, Serialize, Debug)] +pub struct ErrorResponse { + error: ServerError, +} + +#[derive(Deserialize, Serialize, Debug)] +pub struct ServerError { + errors: Vec, + code: u16, + message: String, +} + +#[derive(Deserialize, Serialize, Debug)] +pub struct ServerMessage { + domain: String, + reason: String, + message: String, + #[serde(rename="locationType")] + location_type: Option, + location: Option +} + +#[derive(Copy, Clone)] +pub struct DummyNetworkStream; + +impl Read for DummyNetworkStream { + fn read(&mut self, _: &mut [u8]) -> io::Result { + Ok(0) + } +} + +impl Write for DummyNetworkStream { + fn write(&mut self, _: &[u8]) -> io::Result { + Ok(0) + } + + fn flush(&mut self) -> io::Result<()> { + Ok(()) + } +} + +impl hyper::net::NetworkStream for DummyNetworkStream { + fn peer_addr(&mut self) -> io::Result { + Ok("127.0.0.1:1337".parse().unwrap()) + } + + fn set_read_timeout(&self, _dur: Option) -> io::Result<()> { + Ok(()) + } + + fn set_write_timeout(&self, _dur: Option) -> io::Result<()> { + Ok(()) + } +} + + +/// A trait specifying functionality to help controlling any request performed by the API. +/// The trait has a conservative default implementation. +/// +/// It contains methods to deal with all common issues, as well with the ones related to +/// uploading media +pub trait Delegate { + + /// Called at the beginning of any API request. The delegate should store the method + /// information if he is interesting in knowing more context when further calls to it + /// are made. + /// The matching `finished()` call will always be made, no matter whether or not the API + /// request was successful. That way, the delegate may easily maintain a clean state + /// between various API calls. + fn begin(&mut self, MethodInfo) {} + + /// Called whenever there is an [HttpError](http://hyperium.github.io/hyper/hyper/error/enum.HttpError.html), usually if there are network problems. + /// + /// If you choose to retry after a duration, the duration should be chosen using the + /// [exponential backoff algorithm](http://en.wikipedia.org/wiki/Exponential_backoff). + /// + /// Return retry information. + fn http_error(&mut self, &hyper::Error) -> Retry { + Retry::Abort + } + + /// Called whenever there is the need for your applications API key after + /// the official authenticator implementation didn't provide one, for some reason. + /// If this method returns None as well, the underlying operation will fail + fn api_key(&mut self) -> Option { + None + } + + /// Called whenever the Authenticator didn't yield a token. The delegate + /// may attempt to provide one, or just take it as a general information about the + /// impending failure. + /// The given Error provides information about why the token couldn't be acquired in the + /// first place + fn token(&mut self, err: &error::Error) -> Option { + let _ = err; + None + } + + /// Called during resumable uploads to provide a URL for the impending upload. + /// It was saved after a previous call to `store_upload_url(...)`, and if not None, + /// will be used instead of asking the server for a new upload URL. + /// This is useful in case a previous resumable upload was aborted/canceled, but should now + /// be resumed. + /// The returned URL will be used exactly once - if it fails again and the delegate allows + /// to retry, we will ask the server for a new upload URL. + fn upload_url(&mut self) -> Option { + None + } + + /// Called after we have retrieved a new upload URL for a resumable upload to store it + /// in case we fail or cancel. That way, we can attempt to resume the upload later, + /// see `upload_url()`. + /// It will also be called with None after a successful upload, which allows the delegate + /// to forget the URL. That way, we will not attempt to resume an upload that has already + /// finished. + fn store_upload_url(&mut self, url: Option<&str>) { + let _ = url; + } + + /// Called whenever a server response could not be decoded from json. + /// It's for informational purposes only, the caller will return with an error + /// accordingly. + /// + /// # Arguments + /// + /// * `json_encoded_value` - The json-encoded value which failed to decode. + /// * `json_decode_error` - The decoder error + fn response_json_decode_error(&mut self, json_encoded_value: &str, json_decode_error: &json::Error) { + let _ = json_encoded_value; + let _ = json_decode_error; + } + + /// Called whenever the http request returns with a non-success status code. + /// This can involve authentication issues, or anything else that very much + /// depends on the used API method. + /// The delegate should check the status, header and decoded json error to decide + /// whether to retry or not. In the latter case, the underlying call will fail. + /// + /// If you choose to retry after a duration, the duration should be chosen using the + /// [exponential backoff algorithm](http://en.wikipedia.org/wiki/Exponential_backoff). + fn http_failure(&mut self, _: &hyper::client::Response, Option, _: Option) -> Retry { + Retry::Abort + } + + /// Called prior to sending the main request of the given method. It can be used to time + /// the call or to print progress information. + /// It's also useful as you can be sure that a request will definitely be made. + fn pre_request(&mut self) { } + + /// Return the size of each chunk of a resumable upload. + /// Must be a power of two, with 1<<18 being the smallest allowed chunk size. + /// Will be called once before starting any resumable upload. + fn chunk_size(&mut self) -> u64 { + 1 << 23 + } + + /// Called before the given chunk is uploaded to the server. + /// If true is returned, the upload will be interrupted. + /// However, it may be resumable if you stored the upload URL in a previous call + /// to `store_upload_url()` + fn cancel_chunk_upload(&mut self, chunk: &ContentRange) -> bool { + let _ = chunk; + false + } + + /// Called before the API request method returns, in every case. It can be used to clean up + /// internal state between calls to the API. + /// This call always has a matching call to `begin(...)`. + /// + /// # Arguments + /// + /// * `is_success` - a true value indicates the operation was successful. If false, you should + /// discard all values stored during `store_upload_url`. + fn finished(&mut self, is_success: bool) { + let _ = is_success; + } +} + +/// A delegate with a conservative default implementation, which is used if no other delegate is +/// set. +#[derive(Default)] +pub struct DefaultDelegate; + +impl Delegate for DefaultDelegate {} + + +#[derive(Debug)] +pub enum Error { + /// The http connection failed + HttpError(hyper::Error), + + /// An attempt was made to upload a resource with size stored in field `.0` + /// even though the maximum upload size is what is stored in field `.1`. + UploadSizeLimitExceeded(u64, u64), + + /// Represents information about a request that was not understood by the server. + /// Details are included. + BadRequest(ErrorResponse), + + /// We needed an API key for authentication, but didn't obtain one. + /// Neither through the authenticator, nor through the Delegate. + MissingAPIKey, + + /// We required a Token, but didn't get one from the Authenticator + MissingToken(Box), + + /// The delgate instructed to cancel the operation + Cancelled, + + /// An additional, free form field clashed with one of the built-in optional ones + FieldClash(&'static str), + + /// Shows that we failed to decode the server response. + /// This can happen if the protocol changes in conjunction with strict json decoding. + JsonDecodeError(String, json::Error), + + /// Indicates an HTTP repsonse with a non-success status code + Failure(hyper::client::Response), +} + + +impl Display for Error { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + match *self { + Error::HttpError(ref err) => err.fmt(f), + Error::UploadSizeLimitExceeded(ref resource_size, ref max_size) => + writeln!(f, "The media size {} exceeds the maximum allowed upload size of {}" + , resource_size, max_size), + Error::MissingAPIKey => { + (writeln!(f, "The application's API key was not found in the configuration")).ok(); + writeln!(f, "It is used as there are no Scopes defined for this method.") + }, + Error::BadRequest(ref err) => { + try!(writeln!(f, "Bad Requst ({}): {}", err.error.code, err.error.message)); + for err in err.error.errors.iter() { + try!(writeln!(f, " {}: {}, {}{}", + err.domain, + err.message, + err.reason, + match &err.location { + &Some(ref loc) => format!("@{}", loc), + &None => String::new(), + })); + } + Ok(()) + }, + Error::MissingToken(ref err) => + writeln!(f, "Token retrieval failed with error: {}", err), + Error::Cancelled => + writeln!(f, "Operation cancelled by delegate"), + Error::FieldClash(field) => + writeln!(f, "The custom parameter '{}' is already provided natively by the CallBuilder.", field), + Error::JsonDecodeError(ref json_str, ref err) + => writeln!(f, "{}: {}", err, json_str), + Error::Failure(ref response) => + writeln!(f, "Http status indicates failure: {:?}", response), + } + } +} + +impl error::Error for Error { + fn description(&self) -> &str { + match *self { + Error::HttpError(ref err) => err.description(), + Error::JsonDecodeError(_, ref err) => err.description(), + _ => "NO DESCRIPTION POSSIBLE - use `Display.fmt()` instead" + } + } + + fn cause(&self) -> Option<&error::Error> { + match *self { + Error::HttpError(ref err) => err.cause(), + Error::JsonDecodeError(_, ref err) => err.cause(), + _ => None + } + } +} + +/// A universal result type used as return for all calls. +pub type Result = std::result::Result; + +/// Contains information about an API request. +pub struct MethodInfo { + pub id: &'static str, + pub http_method: Method, +} + +const BOUNDARY: &'static str = "MDuXWGyeE33QFXGchb2VFWc4Z7945d"; + +/// Provides a `Read` interface that converts multiple parts into the protocol +/// identified by [RFC2387](https://tools.ietf.org/html/rfc2387). +/// **Note**: This implementation is just as rich as it needs to be to perform uploads +/// to google APIs, and might not be a fully-featured implementation. +#[derive(Default)] +pub struct MultiPartReader<'a> { + raw_parts: Vec<(Headers, &'a mut Read)>, + current_part: Option<(Cursor>, &'a mut Read)>, + last_part_boundary: Option>>, +} + +impl<'a> MultiPartReader<'a> { + + /// Reserve memory for exactly the given amount of parts + pub fn reserve_exact(&mut self, cap: usize) { + self.raw_parts.reserve_exact(cap); + } + + /// Add a new part to the queue of parts to be read on the first `read` call. + /// + /// # Arguments + /// + /// `headers` - identifying the body of the part. It's similar to the header + /// in an ordinary single-part call, and should thus contain the + /// same information. + /// `reader` - a reader providing the part's body + /// `size` - the amount of bytes provided by the reader. It will be put onto the header as + /// content-size. + /// `mime` - It will be put onto the content type + pub fn add_part(&mut self, reader: &'a mut Read, size: u64, mime_type: Mime) -> &mut MultiPartReader<'a> { + let mut headers = Headers::new(); + headers.set(ContentType(mime_type)); + headers.set(ContentLength(size)); + self.raw_parts.push((headers, reader)); + self + } + + /// Returns the mime-type representing our multi-part message. + /// Use it with the ContentType header. + pub fn mime_type(&self) -> Mime { + Mime( + TopLevel::Multipart, + SubLevel::Ext("Related".to_string()), + vec![(Attr::Ext("boundary".to_string()), Value::Ext(BOUNDARY.to_string()))], + ) + } + + /// Returns true if we are totally used + fn is_depleted(&self) -> bool { + self.raw_parts.len() == 0 && self.current_part.is_none() && self.last_part_boundary.is_none() + } + + /// Returns true if we are handling our last part + fn is_last_part(&self) -> bool { + self.raw_parts.len() == 0 && self.current_part.is_some() + } +} + +impl<'a> Read for MultiPartReader<'a> { + fn read(&mut self, buf: &mut [u8]) -> io::Result { + match (self.raw_parts.len(), + self.current_part.is_none(), + self.last_part_boundary.is_none()) { + (_, _, false) => { + let br = self.last_part_boundary.as_mut().unwrap().read(buf).unwrap_or(0); + if br < buf.len() { + self.last_part_boundary = None; + } + return Ok(br) + }, + (0, true, true) => return Ok(0), + (n, true, _) if n > 0 => { + let (headers, reader) = self.raw_parts.remove(0); + let mut c = Cursor::new(Vec::::new()); + (write!(&mut c, "{}--{}{}{}{}", LINE_ENDING, BOUNDARY, LINE_ENDING, + headers, LINE_ENDING)).unwrap(); + c.seek(SeekFrom::Start(0)).unwrap(); + self.current_part = Some((c, reader)); + } + _ => {}, + } + + // read headers as long as possible + let (hb, rr) = { + let &mut (ref mut c, ref mut reader) = self.current_part.as_mut().unwrap(); + let b = c.read(buf).unwrap_or(0); + (b, reader.read(&mut buf[b..])) + }; + + match rr { + Ok(bytes_read) => { + if hb < buf.len() && bytes_read == 0 { + if self.is_last_part() { + // before clearing the last part, we will add the boundary that + // will be written last + self.last_part_boundary = Some(Cursor::new( + format!("{}--{}--", LINE_ENDING, BOUNDARY).into_bytes())) + } + // We are depleted - this can trigger the next part to come in + self.current_part = None; + } + let mut total_bytes_read = hb + bytes_read; + while total_bytes_read < buf.len() && !self.is_depleted() { + match self.read(&mut buf[total_bytes_read ..]) { + Ok(br) => total_bytes_read += br, + Err(err) => return Err(err), + } + } + Ok(total_bytes_read) + } + Err(err) => { + // fail permanently + self.current_part = None; + self.last_part_boundary = None; + self.raw_parts.clear(); + Err(err) + } + } + } +} + +// The following macro invocation needs to be expanded, as `include!` +// doens't support external macros +// header!{ +// #[doc="The `X-Upload-Content-Type` header."] +// (XUploadContentType, "X-Upload-Content-Type") => [Mime] + +// xupload_content_type { +// test_header!( +// test1, +// vec![b"text/plain"], +// Some(HeaderField( +// vec![Mime(TopLevel::Text, SubLevel::Plain, Vec::new())] +// ))); + +// } +// } + +/// The `X-Upload-Content-Type` header. +/// +/// Generated via rustc --pretty expanded -Z unstable-options, and manually +/// processed to be more readable. +#[derive(PartialEq, Debug, Clone)] +pub struct XUploadContentType(pub Mime); + +impl ::std::ops::Deref for XUploadContentType { + type Target = Mime; + fn deref<'a>(&'a self) -> &'a Mime { &self.0 } +} +impl ::std::ops::DerefMut for XUploadContentType { + fn deref_mut<'a>(&'a mut self) -> &'a mut Mime { &mut self.0 } +} +impl Header for XUploadContentType { + fn header_name() -> &'static str { "X-Upload-Content-Type" } + fn parse_header(raw: &[Vec]) -> hyper::error::Result { + hyper::header::parsing::from_one_raw_str(raw).map(XUploadContentType) + } +} +impl HeaderFormat for XUploadContentType { + fn fmt_header(&self, f: &mut fmt::Formatter) -> fmt::Result { + Display::fmt(&**self, f) + } +} +impl Display for XUploadContentType { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + fmt::Display::fmt(&**self, f) + } +} + +#[derive(Clone, PartialEq, Debug)] +pub struct Chunk { + pub first: u64, + pub last: u64 +} + +impl fmt::Display for Chunk { + fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result { + (write!(fmt, "{}-{}", self.first, self.last)).ok(); + Ok(()) + } +} + +impl FromStr for Chunk { + type Err = &'static str; + + /// NOTE: only implements `%i-%i`, not `*` + fn from_str(s: &str) -> std::result::Result { + let parts: Vec<&str> = s.split('-').collect(); + if parts.len() != 2 { + return Err("Expected two parts: %i-%i") + } + Ok( + Chunk { + first: match FromStr::from_str(parts[0]) { + Ok(d) => d, + _ => return Err("Couldn't parse 'first' as digit") + }, + last: match FromStr::from_str(parts[1]) { + Ok(d) => d, + _ => return Err("Couldn't parse 'last' as digit") + } + } + ) + } +} + +/// Implements the Content-Range header, for serialization only +#[derive(Clone, PartialEq, Debug)] +pub struct ContentRange { + pub range: Option, + pub total_length: u64, +} + +impl Header for ContentRange { + fn header_name() -> &'static str { + "Content-Range" + } + + /// We are not parsable, as parsing is done by the `Range` header + fn parse_header(_: &[Vec]) -> hyper::error::Result { + Err(hyper::error::Error::Method) + } +} + + +impl HeaderFormat for ContentRange { + fn fmt_header(&self, fmt: &mut fmt::Formatter) -> fmt::Result { + try!(fmt.write_str("bytes ")); + match self.range { + Some(ref c) => try!(c.fmt(fmt)), + None => try!(fmt.write_str("*")) + } + (write!(fmt, "/{}", self.total_length)).ok(); + Ok(()) + } +} + +#[derive(Clone, PartialEq, Debug)] +pub struct RangeResponseHeader(pub Chunk); + +impl Header for RangeResponseHeader { + fn header_name() -> &'static str { + "Range" + } + + fn parse_header(raw: &[Vec]) -> hyper::error::Result { + if raw.len() > 0 { + let v = &raw[0]; + if let Ok(s) = std::str::from_utf8(v) { + const PREFIX: &'static str = "bytes "; + if s.starts_with(PREFIX) { + if let Ok(c) = ::from_str(&s[PREFIX.len()..]) { + return Ok(RangeResponseHeader(c)) + } + } + } + } + Err(hyper::error::Error::Method) + } +} + +impl HeaderFormat for RangeResponseHeader { + /// No implmentation necessary, we just need to parse + fn fmt_header(&self, _: &mut fmt::Formatter) -> fmt::Result { + Err(fmt::Error) + } +} + +/// A utility type to perform a resumable upload from start to end. +pub struct ResumableUploadHelper<'a, A: 'a> { + pub client: &'a mut hyper::client::Client, + pub delegate: &'a mut Delegate, + pub start_at: Option, + pub auth: &'a mut A, + pub user_agent: &'a str, + pub auth_header: Authorization, + pub url: &'a str, + pub reader: &'a mut ReadSeek, + pub media_type: Mime, + pub content_length: u64 +} + +impl<'a, A> ResumableUploadHelper<'a, A> + where A: oauth2::GetToken { + + fn query_transfer_status(&mut self) -> std::result::Result> { + loop { + match self.client.post(self.url) + .header(UserAgent(self.user_agent.to_string())) + .header(ContentRange { range: None, total_length: self.content_length }) + .header(self.auth_header.clone()) + .send() { + Ok(r) => { + // 308 = resume-incomplete == PermanentRedirect + let headers = r.headers.clone(); + let h: &RangeResponseHeader = match headers.get() { + Some(hh) if r.status == StatusCode::PermanentRedirect => hh, + None|Some(_) => { + if let Retry::After(d) = self.delegate.http_failure(&r, None, None) { + sleep(d); + continue; + } + return Err(Ok(r)) + } + }; + return Ok(h.0.last) + } + Err(err) => { + if let Retry::After(d) = self.delegate.http_error(&err) { + sleep(d); + continue; + } + return Err(Err(err)) + } + } + } + } + + /// returns None if operation was cancelled by delegate, or the HttpResult. + /// It can be that we return the result just because we didn't understand the status code - + /// caller should check for status himself before assuming it's OK to use + pub fn upload(&mut self) -> Option> { + let mut start = match self.start_at { + Some(s) => s, + None => match self.query_transfer_status() { + Ok(s) => s, + Err(result) => return Some(result) + } + }; + + const MIN_CHUNK_SIZE: u64 = 1 << 18; + let chunk_size = match self.delegate.chunk_size() { + cs if cs > MIN_CHUNK_SIZE => cs, + _ => MIN_CHUNK_SIZE + }; + + self.reader.seek(SeekFrom::Start(start)).unwrap(); + loop { + let request_size = match self.content_length - start { + rs if rs > chunk_size => chunk_size, + rs => rs + }; + + let mut section_reader = self.reader.take(request_size); + let range_header = ContentRange { + range: Some(Chunk {first: start, last: start + request_size - 1}), + total_length: self.content_length + }; + start += request_size; + if self.delegate.cancel_chunk_upload(&range_header) { + return None + } + // workaround https://github.com/rust-lang/rust/issues/22252 + let res = self.client.post(self.url) + .header(range_header) + .header(ContentType(self.media_type.clone())) + .header(UserAgent(self.user_agent.to_string())) + .body(&mut section_reader) + .send(); + match res { + Ok(mut res) => { + if res.status == StatusCode::PermanentRedirect { + continue + } + if !res.status.is_success() { + let mut json_err = String::new(); + res.read_to_string(&mut json_err).unwrap(); + if let Retry::After(d) = self.delegate.http_failure(&res, + json::from_str(&json_err).ok(), + json::from_str(&json_err).ok()) { + sleep(d); + continue; + } + } + return Some(Ok(res)) + }, + Err(err) => { + if let Retry::After(d) = self.delegate.http_error(&err) { + sleep(d); + continue; + } + return Some(Err(err)) + } + } + } + } +} + +// Copy of src/rust/cli/cmn.rs +// TODO(ST): Allow sharing common code between program types +pub fn remove_json_null_values(value: &mut json::value::Value) { + match *value { + json::value::Value::Object(ref mut map) => { + let mut for_removal = Vec::new(); + + for (key, mut value) in map.iter_mut() { + if value.is_null() { + for_removal.push(key.clone()); + } else { + remove_json_null_values(&mut value); + } + } + + for key in &for_removal { + map.remove(key); + } + } + _ => {} + } +} diff --git a/gen/toolresults1_beta3/src/lib.rs b/gen/toolresults1_beta3/src/lib.rs new file mode 100644 index 0000000000..8866ccb0ec --- /dev/null +++ b/gen/toolresults1_beta3/src/lib.rs @@ -0,0 +1,187 @@ +// DO NOT EDIT ! +// This file was generated automatically from 'src/mako/api/lib.rs.mako' +// DO NOT EDIT ! + +//! This documentation was generated from *Tool Results* crate version *0.1.13+20160408*, where *20160408* is the exact revision of the *toolresults:v1beta3* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.13*. +//! +//! Everything else about the *Tool Results* *v1_beta3* API can be found at the +//! [official documentation site](https://developers.google.com/cloud-test-lab/). +//! The original source code is [on github](https://github.com/Byron/google-apis-rs/tree/master/gen/toolresults1_beta3). +//! # Features +//! +//! Handle the following *Resources* with ease from the central [hub](struct.ToolResults.html) ... +//! +//! * projects +//! * [*get settings*](struct.ProjectGetSettingCall.html), [*histories create*](struct.ProjectHistoryCreateCall.html), [*histories executions create*](struct.ProjectHistoryExecutionCreateCall.html), [*histories executions get*](struct.ProjectHistoryExecutionGetCall.html), [*histories executions list*](struct.ProjectHistoryExecutionListCall.html), [*histories executions patch*](struct.ProjectHistoryExecutionPatchCall.html), [*histories executions steps create*](struct.ProjectHistoryExecutionStepCreateCall.html), [*histories executions steps get*](struct.ProjectHistoryExecutionStepGetCall.html), [*histories executions steps list*](struct.ProjectHistoryExecutionStepListCall.html), [*histories executions steps patch*](struct.ProjectHistoryExecutionStepPatchCall.html), [*histories executions steps publish xunit xml files*](struct.ProjectHistoryExecutionStepPublishXunitXmlFileCall.html), [*histories executions steps thumbnails list*](struct.ProjectHistoryExecutionStepThumbnailListCall.html), [*histories get*](struct.ProjectHistoryGetCall.html), [*histories list*](struct.ProjectHistoryListCall.html) and [*initialize settings*](struct.ProjectInitializeSettingCall.html) +//! +//! +//! +//! +//! Not what you are looking for ? Find all other Google APIs in their Rust [documentation index](../index.html). +//! +//! # Structure of this Library +//! +//! The API is structured into the following primary items: +//! +//! * **[Hub](struct.ToolResults.html)** +//! * a central object to maintain state and allow accessing all *Activities* +//! * creates [*Method Builders*](trait.MethodsBuilder.html) which in turn +//! allow access to individual [*Call Builders*](trait.CallBuilder.html) +//! * **[Resources](trait.Resource.html)** +//! * primary types that you can apply *Activities* to +//! * a collection of properties and *Parts* +//! * **[Parts](trait.Part.html)** +//! * a collection of properties +//! * never directly used in *Activities* +//! * **[Activities](trait.CallBuilder.html)** +//! * operations to apply to *Resources* +//! +//! All *structures* are marked with applicable traits to further categorize them and ease browsing. +//! +//! Generally speaking, you can invoke *Activities* like this: +//! +//! ```Rust,ignore +//! let r = hub.resource().activity(...).doit() +//! ``` +//! +//! Or specifically ... +//! +//! ```ignore +//! let r = hub.projects().histories_executions_steps_patch(...).doit() +//! let r = hub.projects().histories_executions_steps_get(...).doit() +//! let r = hub.projects().histories_executions_steps_publish_xunit_xml_files(...).doit() +//! let r = hub.projects().histories_executions_steps_create(...).doit() +//! ``` +//! +//! The `resource()` and `activity(...)` calls create [builders][builder-pattern]. The second one dealing with `Activities` +//! supports various methods to configure the impending operation (not shown here). It is made such that all required arguments have to be +//! specified right away (i.e. `(...)`), whereas all optional ones can be [build up][builder-pattern] as desired. +//! The `doit()` method performs the actual communication with the server and returns the respective result. +//! +//! # Usage +//! +//! ## Setting up your Project +//! +//! To use this library, you would put the following lines into your `Cargo.toml` file: +//! +//! ```toml +//! [dependencies] +//! google-toolresults1_beta3 = "*" +//! ``` +//! +//! ## A complete example +//! +//! ```test_harness,no_run +//! extern crate hyper; +//! extern crate yup_oauth2 as oauth2; +//! extern crate google_toolresults1_beta3 as toolresults1_beta3; +//! use toolresults1_beta3::Step; +//! use toolresults1_beta3::{Result, Error}; +//! # #[test] fn egal() { +//! use std::default::Default; +//! use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; +//! use toolresults1_beta3::ToolResults; +//! +//! // Get an ApplicationSecret instance by some means. It contains the `client_id` and +//! // `client_secret`, among other things. +//! let secret: ApplicationSecret = Default::default(); +//! // Instantiate the authenticator. It will choose a suitable authentication flow for you, +//! // unless you replace `None` with the desired Flow. +//! // Provide your own `AuthenticatorDelegate` to adjust the way it operates and get feedback about +//! // what's going on. You probably want to bring in your own `TokenStorage` to persist tokens and +//! // retrieve them from storage. +//! let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, +//! hyper::Client::new(), +//! ::default(), None); +//! let mut hub = ToolResults::new(hyper::Client::new(), auth); +//! // As the method needs a request, you would usually fill it with the desired information +//! // into the respective structure. Some of the parts shown here might not be applicable ! +//! // Values shown here are possibly random and not representative ! +//! let mut req = Step::default(); +//! +//! // You can configure optional parameters by calling the respective setters at will, and +//! // execute the final call using `doit()`. +//! // Values shown here are possibly random and not representative ! +//! let result = hub.projects().histories_executions_steps_patch(req, "projectId", "historyId", "executionId", "stepId") +//! .request_id("amet.") +//! .doit(); +//! +//! match result { +//! Err(e) => match e { +//! // The Error enum provides details about what exactly happened. +//! // You can also just use its `Debug`, `Display` or `Error` traits +//! Error::HttpError(_) +//! |Error::MissingAPIKey +//! |Error::MissingToken(_) +//! |Error::Cancelled +//! |Error::UploadSizeLimitExceeded(_, _) +//! |Error::Failure(_) +//! |Error::BadRequest(_) +//! |Error::FieldClash(_) +//! |Error::JsonDecodeError(_, _) => println!("{}", e), +//! }, +//! Ok(res) => println!("Success: {:?}", res), +//! } +//! # } +//! ``` +//! ## Handling Errors +//! +//! All errors produced by the system are provided either as [Result](enum.Result.html) enumeration as return value of +//! the doit() methods, or handed as possibly intermediate results to either the +//! [Hub Delegate](trait.Delegate.html), or the [Authenticator Delegate](../yup-oauth2/trait.AuthenticatorDelegate.html). +//! +//! When delegates handle errors or intermediate values, they may have a chance to instruct the system to retry. This +//! makes the system potentially resilient to all kinds of errors. +//! +//! ## Uploads and Downloads +//! If a method supports downloads, the response body, which is part of the [Result](enum.Result.html), should be +//! read by you to obtain the media. +//! If such a method also supports a [Response Result](trait.ResponseResult.html), it will return that by default. +//! You can see it as meta-data for the actual media. To trigger a media download, you will have to set up the builder by making +//! this call: `.param("alt", "media")`. +//! +//! Methods supporting uploads can do so using up to 2 different protocols: +//! *simple* and *resumable*. The distinctiveness of each is represented by customized +//! `doit(...)` methods, which are then named `upload(...)` and `upload_resumable(...)` respectively. +//! +//! ## Customization and Callbacks +//! +//! You may alter the way an `doit()` method is called by providing a [delegate](trait.Delegate.html) to the +//! [Method Builder](trait.CallBuilder.html) before making the final `doit()` call. +//! Respective methods will be called to provide progress information, as well as determine whether the system should +//! retry on failure. +//! +//! The [delegate trait](trait.Delegate.html) is default-implemented, allowing you to customize it with minimal effort. +//! +//! ## Optional Parts in Server-Requests +//! +//! All structures provided by this library are made to be [enocodable](trait.RequestValue.html) and +//! [decodable](trait.ResponseResult.html) via *json*. Optionals are used to indicate that partial requests are responses +//! are valid. +//! Most optionals are are considered [Parts](trait.Part.html) which are identifiable by name, which will be sent to +//! the server to indicate either the set parts of the request or the desired parts in the response. +//! +//! ## Builder Arguments +//! +//! Using [method builders](trait.CallBuilder.html), you are able to prepare an action call by repeatedly calling it's methods. +//! These will always take a single argument, for which the following statements are true. +//! +//! * [PODs][wiki-pod] are handed by copy +//! * strings are passed as `&str` +//! * [request values](trait.RequestValue.html) are moved +//! +//! Arguments will always be copied or cloned into the builder, to make them independent of their original life times. +//! +//! [wiki-pod]: http://en.wikipedia.org/wiki/Plain_old_data_structure +//! [builder-pattern]: http://en.wikipedia.org/wiki/Builder_pattern +//! [google-go-api]: https://github.com/google/google-api-go-client +//! +//! + +// 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 +// unused imports in fully featured APIs. Same with unused_mut ... . +#![allow(unused_imports, unused_mut, dead_code)] + +include!(concat!(env!("OUT_DIR"), "/lib.rs")); \ No newline at end of file diff --git a/gen/toolresults1_beta3/src/lib.rs.in b/gen/toolresults1_beta3/src/lib.rs.in new file mode 100644 index 0000000000..9f923b0e5a --- /dev/null +++ b/gen/toolresults1_beta3/src/lib.rs.in @@ -0,0 +1,6009 @@ +// DO NOT EDIT ! +// This file was generated automatically from 'src/mako/api/lib.rs.in.mako' +// DO NOT EDIT ! + +extern crate hyper; +extern crate serde; +extern crate serde_json; +extern crate yup_oauth2 as oauth2; +extern crate mime; +extern crate url; + +mod cmn; + +use std::collections::HashMap; +use std::cell::RefCell; +use std::borrow::BorrowMut; +use std::default::Default; +use std::collections::BTreeMap; +use serde_json as json; +use std::io; +use std::fs; +use std::thread::sleep; +use std::time::Duration; + +pub use cmn::{MultiPartReader, ToParts, MethodInfo, Result, Error, CallBuilder, Hub, ReadSeek, Part, + ResponseResult, RequestValue, NestedType, Delegate, DefaultDelegate, MethodsBuilder, + Resource, ErrorResponse, remove_json_null_values}; + + +// ############## +// UTILITIES ### +// ############ + +/// Identifies the an OAuth2 authorization scope. +/// A scope is needed when requesting an +/// [authorization token](https://developers.google.com/youtube/v3/guides/authentication). +#[derive(PartialEq, Eq, Hash)] +pub enum Scope { + /// View and manage your data across Google Cloud Platform services + CloudPlatform, +} + +impl AsRef for Scope { + fn as_ref(&self) -> &str { + match *self { + Scope::CloudPlatform => "https://www.googleapis.com/auth/cloud-platform", + } + } +} + +impl Default for Scope { + fn default() -> Scope { + Scope::CloudPlatform + } +} + + + +// ######## +// HUB ### +// ###### + +/// Central instance to access all ToolResults related resource activities +/// +/// # Examples +/// +/// Instantiate a new hub +/// +/// ```test_harness,no_run +/// extern crate hyper; +/// extern crate yup_oauth2 as oauth2; +/// extern crate google_toolresults1_beta3 as toolresults1_beta3; +/// use toolresults1_beta3::Step; +/// use toolresults1_beta3::{Result, Error}; +/// # #[test] fn egal() { +/// use std::default::Default; +/// use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; +/// use toolresults1_beta3::ToolResults; +/// +/// // Get an ApplicationSecret instance by some means. It contains the `client_id` and +/// // `client_secret`, among other things. +/// let secret: ApplicationSecret = Default::default(); +/// // Instantiate the authenticator. It will choose a suitable authentication flow for you, +/// // unless you replace `None` with the desired Flow. +/// // Provide your own `AuthenticatorDelegate` to adjust the way it operates and get feedback about +/// // what's going on. You probably want to bring in your own `TokenStorage` to persist tokens and +/// // retrieve them from storage. +/// let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, +/// hyper::Client::new(), +/// ::default(), None); +/// let mut hub = ToolResults::new(hyper::Client::new(), auth); +/// // As the method needs a request, you would usually fill it with the desired information +/// // into the respective structure. Some of the parts shown here might not be applicable ! +/// // Values shown here are possibly random and not representative ! +/// let mut req = Step::default(); +/// +/// // You can configure optional parameters by calling the respective setters at will, and +/// // execute the final call using `doit()`. +/// // Values shown here are possibly random and not representative ! +/// let result = hub.projects().histories_executions_steps_patch(req, "projectId", "historyId", "executionId", "stepId") +/// .request_id("justo") +/// .doit(); +/// +/// match result { +/// Err(e) => match e { +/// // The Error enum provides details about what exactly happened. +/// // You can also just use its `Debug`, `Display` or `Error` traits +/// Error::HttpError(_) +/// |Error::MissingAPIKey +/// |Error::MissingToken(_) +/// |Error::Cancelled +/// |Error::UploadSizeLimitExceeded(_, _) +/// |Error::Failure(_) +/// |Error::BadRequest(_) +/// |Error::FieldClash(_) +/// |Error::JsonDecodeError(_, _) => println!("{}", e), +/// }, +/// Ok(res) => println!("Success: {:?}", res), +/// } +/// # } +/// ``` +pub struct ToolResults { + client: RefCell, + auth: RefCell, + _user_agent: String, +} + +impl<'a, C, A> Hub for ToolResults {} + +impl<'a, C, A> ToolResults + where C: BorrowMut, A: oauth2::GetToken { + + pub fn new(client: C, authenticator: A) -> ToolResults { + ToolResults { + client: RefCell::new(client), + auth: RefCell::new(authenticator), + _user_agent: "google-api-rust-client/0.1.13".to_string(), + } + } + + pub fn projects(&'a self) -> ProjectMethods<'a, C, A> { + ProjectMethods { hub: &self } + } + + /// Set the user-agent header field to use in all requests to the server. + /// It defaults to `google-api-rust-client/0.1.13`. + /// + /// Returns the previously set user-agent. + pub fn user_agent(&mut self, agent_name: String) -> String { + let prev = self._user_agent.clone(); + self._user_agent = agent_name; + prev + } +} + + +// ############ +// SCHEMAS ### +// ########## +/// An image, with a link to the main image and a thumbnail. +/// +/// This type is not used in any activity, and only used as *part* of another schema. +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct Image { + /// An error explaining why the thumbnail could not be rendered. + pub error: Option, + /// The step to which the image is attached. + /// + /// Always set. + #[serde(rename="stepId")] + pub step_id: Option, + /// A reference to the full-size, original image. + /// + /// This is the same as the tool_outputs entry for the image under its Step. + /// + /// Always set. + #[serde(rename="sourceImage")] + pub source_image: Option, + /// The thumbnail. + pub thumbnail: Option, +} + +impl Part for Image {} + + +/// A stacktrace. +/// +/// This type is not used in any activity, and only used as *part* of another schema. +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct StackTrace { + /// The stack trace message. + /// + /// Required + pub exception: Option, +} + +impl Part for StackTrace {} + + +/// A reference to a ToolExecution output file. +/// +/// This type is not used in any activity, and only used as *part* of another schema. +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct ToolOutputReference { + /// The test case to which this output file belongs. + /// + /// - In response: present if set by create/update request - In create/update request: optional + #[serde(rename="testCase")] + pub test_case: Option, + /// A FileReference to an output file. + /// + /// - In response: always set - In create/update request: always set + pub output: Option, + /// The creation time of the file. + /// + /// - In response: present if set by create/update request - In create/update request: optional + #[serde(rename="creationTime")] + pub creation_time: Option, +} + +impl Part for ToolOutputReference {} + + +/// A step that represents running tests. +/// +/// It accepts ant-junit xml files which will be parsed into structured test results by the service. Xml file paths are updated in order to append more files, however they can't be deleted. +/// +/// Users can also add test results manually by using the test_result field. +/// +/// This type is not used in any activity, and only used as *part* of another schema. +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct TestExecutionStep { + /// The timing break down of the test execution. + /// + /// - In response: present if set by create or update - In create/update request: optional + #[serde(rename="testTiming")] + pub test_timing: Option, + /// List of test suite overview contents. This could be parsed from xUnit XML log by server, or uploaded directly by user. This references should only be called when test suites are fully parsed or uploaded. + /// + /// The maximum allowed number of test suite overviews per step is 1000. + /// + /// - In response: always set - In create request: optional - In update request: never (use publishXunitXmlFiles custom method instead) + #[serde(rename="testSuiteOverviews")] + pub test_suite_overviews: Option>, + /// Represents the execution of the test runner. + /// + /// The exit code of this tool will be used to determine if the test passed. + /// + /// - In response: always set - In create/update request: optional + #[serde(rename="toolExecution")] + pub tool_execution: Option, + /// Issues observed during the test execution. + /// + /// For example, if the mobile app under test crashed during the test, the error message and the stack trace content can be recorded here to assist debugging. + /// + /// - In response: present if set by create or update - In create/update request: optional + #[serde(rename="testIssues")] + pub test_issues: Option>, +} + +impl Part for TestExecutionStep {} + + +/// Generic tool step to be used for binaries we do not explicitly support. For example: running cp to copy artifacts from one location to another. +/// +/// This type is not used in any activity, and only used as *part* of another schema. +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct ToolExecutionStep { + /// A Tool execution. + /// + /// - In response: present if set by create/update request - In create/update request: optional + #[serde(rename="toolExecution")] + pub tool_execution: Option, +} + +impl Part for ToolExecutionStep {} + + +/// An abnormal event observed during the test execution. +/// +/// This type is not used in any activity, and only used as *part* of another schema. +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct TestIssue { + /// Optional. + #[serde(rename="stackTrace")] + pub stack_trace: Option, + /// A brief human-readable message describing the abnormal event. + /// + /// Required. + #[serde(rename="errorMessage")] + pub error_message: Option, +} + +impl Part for TestIssue {} + + +/// A single thumbnail, with its size and format. +/// +/// This type is not used in any activity, and only used as *part* of another schema. +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct Thumbnail { + /// The thumbnail's content type, i.e. "image/png". + /// + /// Always set. + #[serde(rename="contentType")] + pub content_type: Option, + /// The width of the thumbnail, in pixels. + /// + /// Always set. + #[serde(rename="widthPx")] + pub width_px: Option, + /// The thumbnail file itself. + /// + /// That is, the bytes here are precisely the bytes that make up the thumbnail file; they can be served as an image as-is (with the appropriate content type.) + /// + /// Always set. + pub data: Option, + /// The height of the thumbnail, in pixels. + /// + /// Always set. + #[serde(rename="heightPx")] + pub height_px: Option, +} + +impl Part for Thumbnail {} + + +/// The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). The error model is designed to be: +/// +/// - Simple to use and understand for most users - Flexible enough to meet unexpected needs +/// +/// # Overview +/// +/// The `Status` message contains three pieces of data: error code, error message, and error details. The error code should be an enum value of [google.rpc.Code][], but it may accept additional error codes if needed. The error message should be a developer-facing English message that helps developers *understand* and *resolve* the error. If a localized user-facing error message is needed, put the localized message in the error details or localize it in the client. The optional error details may contain arbitrary information about the error. There is a predefined set of error detail types in the package `google.rpc` which can be used for common error conditions. +/// +/// # Language mapping +/// +/// The `Status` message is the logical representation of the error model, but it is not necessarily the actual wire format. When the `Status` message is exposed in different client libraries and different wire protocols, it can be mapped differently. For example, it will likely be mapped to some exceptions in Java, but more likely mapped to some error codes in C. +/// +/// # Other uses +/// +/// The error model and the `Status` message can be used in a variety of environments, either with or without APIs, to provide a consistent developer experience across different environments. +/// +/// Example uses of this error model include: +/// +/// - Partial errors. If a service needs to return partial errors to the client, it may embed the `Status` in the normal response to indicate the partial errors. +/// +/// - Workflow errors. A typical workflow has multiple steps. Each step may have a `Status` message for error reporting purpose. +/// +/// - Batch operations. If a client uses batch request and batch response, the `Status` message should be used directly inside batch response, one for each error sub-response. +/// +/// - Asynchronous operations. If an API call embeds asynchronous operation results in its response, the status of those operations should be represented directly using the `Status` message. +/// +/// - Logging. If some API errors are stored in logs, the message `Status` could be used directly after any stripping needed for security/privacy reasons. +/// +/// This type is not used in any activity, and only used as *part* of another schema. +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct Status { + /// A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the [google.rpc.Status.details][] field, or localized by the client. + pub message: Option, + /// The status code, which should be an enum value of [google.rpc.Code][]. + pub code: Option, + /// A list of messages that carry the error details. There will be a common set of message types for APIs to use. + pub details: Option>, +} + +impl Part for Status {} + + +/// Response message for StepService.List. +/// +/// # Activities +/// +/// This type is used in activities, which are methods you may call on this type or where this type is involved in. +/// The list links the activity name, along with information about where it is used (one of *request* and *response*). +/// +/// * [histories executions steps list projects](struct.ProjectHistoryExecutionStepListCall.html) (response) +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct ListStepsResponse { + /// A continuation token to resume the query at the next item. + /// + /// If set, indicates that there are more steps to read, by calling list again with this value in the page_token field. + #[serde(rename="nextPageToken")] + pub next_page_token: Option, + /// Steps. + pub steps: Option>, +} + +impl ResponseResult for ListStepsResponse {} + + +/// A Step represents a single operation performed as part of Execution. A step can be used to represent the execution of a tool ( for example a test runner execution or an execution of a compiler). +/// +/// Steps can overlap (for instance two steps might have the same start time if some operations are done in parallel). +/// +/// Here is an example, let's consider that we have a continuous build is executing a test runner for each iteration. The workflow would look like: - user creates a Execution with id 1 - user creates an TestExecutionStep with id 100 for Execution 1 - user update TestExecutionStep with id 100 to add a raw xml log + the service parses the xml logs and returns a TestExecutionStep with updated TestResult(s). - user update the status of TestExecutionStep with id 100 to COMPLETE +/// +/// A Step can be updated until its state is set to COMPLETE at which points it becomes immutable. +/// +/// # Activities +/// +/// This type is used in activities, which are methods you may call on this type or where this type is involved in. +/// The list links the activity name, along with information about where it is used (one of *request* and *response*). +/// +/// * [histories executions steps patch projects](struct.ProjectHistoryExecutionStepPatchCall.html) (request|response) +/// * [histories executions steps get projects](struct.ProjectHistoryExecutionStepGetCall.html) (response) +/// * [histories executions steps publish xunit xml files projects](struct.ProjectHistoryExecutionStepPublishXunitXmlFileCall.html) (response) +/// * [histories executions steps create projects](struct.ProjectHistoryExecutionStepCreateCall.html) (request|response) +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct Step { + /// An execution of a test runner. + #[serde(rename="testExecutionStep")] + pub test_execution_step: Option, + /// A unique identifier within a Execution for this Step. + /// + /// Returns INVALID_ARGUMENT if this field is set or overwritten by the caller. + /// + /// - In response: always set - In create/update request: never set + #[serde(rename="stepId")] + pub step_id: Option, + /// How long it took for this step to run. + /// + /// If unset, this is set to the difference between creation_time and completion_time when the step is set to the COMPLETE state. In some cases, it is appropriate to set this value separately: For instance, if a step is created, but the operation it represents is queued for a few minutes before it executes, it would be appropriate not to include the time spent queued in its run_duration. + /// + /// PRECONDITION_FAILED will be returned if one attempts to set a run_duration on a step which already has this field set. + /// + /// - In response: present if previously set; always present on COMPLETE step - In create request: optional - In update request: optional + #[serde(rename="runDuration")] + pub run_duration: Option, + /// A description of this tool For example: mvn clean package -D skipTests=true + /// + /// - In response: present if set by create/update request - In create/update request: optional + pub description: Option, + /// Arbitrary user-supplied key/value pairs that are associated with the step. + /// + /// Users are responsible for managing the key namespace such that keys don't accidentally collide. + /// + /// An INVALID_ARGUMENT will be returned if the number of labels exceeds 100 or if the length of any of the keys or values exceeds 100 characters. + /// + /// - In response: always set - In create request: optional - In update request: optional; any new key/value pair will be added to the map, and any new value for an existing key will update that key's value + pub labels: Option>, + /// The time when the step was created. + /// + /// - In response: always set - In create/update request: never set + #[serde(rename="creationTime")] + pub creation_time: Option, + /// An execution of a tool (used for steps we don't explicitly support). + #[serde(rename="toolExecutionStep")] + pub tool_execution_step: Option, + /// The initial state is IN_PROGRESS. The only legal state transitions are * IN_PROGRESS -> COMPLETE + /// + /// A PRECONDITION_FAILED will be returned if an invalid transition is requested. + /// + /// It is valid to create Step with a state set to COMPLETE. The state can only be set to COMPLETE once. A PRECONDITION_FAILED will be returned if the state is set to COMPLETE multiple times. + /// + /// - In response: always set - In create/update request: optional + pub state: Option, + /// The time when the step status was set to complete. + /// + /// This value will be set automatically when state transitions to COMPLETE. + /// + /// - In response: set if the execution state is COMPLETE. - In create/update request: never set + #[serde(rename="completionTime")] + pub completion_time: Option, + /// Whether any of the outputs of this step are images whose thumbnails can be fetched with ListThumbnails. + /// + /// - In response: always set - In create/update request: never set + #[serde(rename="hasImages")] + pub has_images: Option, + /// If the execution containing this step has any dimension_definition set, then this field allows the child to specify the values of the dimensions. + /// + /// The keys must exactly match the dimension_definition of the execution. + /// + /// For example, if the execution has `dimension_definition = ['attempt', 'device']` then a step must define values for those dimensions, eg. `dimension_value = ['attempt': '1', 'device': 'Nexus 6']` + /// + /// If a step does not participate in one dimension of the matrix, the value for that dimension should be empty string. For example, if one of the tests is executed by a runner which does not support retries, the step could have `dimension_value = ['attempt': '', 'device': 'Nexus 6']` + /// + /// If the step does not participate in any dimensions of the matrix, it may leave dimension_value unset. + /// + /// A PRECONDITION_FAILED will be returned if any of the keys do not exist in the dimension_definition of the execution. + /// + /// A PRECONDITION_FAILED will be returned if another step in this execution already has the same name and dimension_value, but differs on other data fields, for example, step field is different. + /// + /// A PRECONDITION_FAILED will be returned if dimension_value is set, and there is a dimension_definition in the execution which is not specified as one of the keys. + /// + /// - In response: present if set by create - In create request: optional - In update request: never set + #[serde(rename="dimensionValue")] + pub dimension_value: Option>, + /// Classification of the result, for example into SUCCESS or FAILURE + /// + /// - In response: present if set by create/update request - In create/update request: optional + pub outcome: Option, + /// How much the device resource is used to perform the test. + /// + /// This is the device usage used for billing purpose, which is different from the run_duration, for example, infrastructure failure won't be charged for device usage. + /// + /// PRECONDITION_FAILED will be returned if one attempts to set a device_usage on a step which already has this field set. + /// + /// - In response: present if previously set. - In create request: optional - In update request: optional + #[serde(rename="deviceUsageDuration")] + pub device_usage_duration: Option, + /// A short human-readable name to display in the UI. Maximum of 100 characters. For example: Clean build + /// + /// A PRECONDITION_FAILED will be returned upon creating a new step if it shares its name and dimension_value with an existing step. If two steps represent a similar action, but have different dimension values, they should share the same name. For instance, if the same set of tests is run on two different platforms, the two steps should have the same name. + /// + /// - In response: always set - In create request: always set - In update request: never set + pub name: Option, +} + +impl RequestValue for Step {} +impl ResponseResult for Step {} + + +/// A reference to a test case. +/// +/// Test case references are canonically ordered lexicographically by these three factors: * First, by test_suite_name. * Second, by class_name. * Third, by name. +/// +/// This type is not used in any activity, and only used as *part* of another schema. +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct TestCaseReference { + /// The name of the class. + #[serde(rename="className")] + pub class_name: Option, + /// The name of the test suite to which this test case belongs. + #[serde(rename="testSuiteName")] + pub test_suite_name: Option, + /// The name of the test case. + /// + /// Required. + pub name: Option, +} + +impl Part for TestCaseReference {} + + +/// There is no detailed description. +/// +/// This type is not used in any activity, and only used as *part* of another schema. +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct InconclusiveDetail { + /// If the test runner could not determine success or failure because the test depends on a component other than the system under test which failed. + /// + /// For example, a mobile test requires provisioning a device where the test executes, and that provisioning can fail. + #[serde(rename="infrastructureFailure")] + pub infrastructure_failure: Option, + /// A native process crashed on the device, producing a tombstone. It is unclear whether the crash was related to the app under test. + /// + /// For example, OpenGL crashed, but it is unclear if the app is responsible. + #[serde(rename="nativeCrash")] + pub native_crash: Option, + /// If the end user aborted the test execution before a pass or fail could be determined. For example, the user pressed ctrl-c which sent a kill signal to the test runner while the test was running. + #[serde(rename="abortedByUser")] + pub aborted_by_user: Option, +} + +impl Part for InconclusiveDetail {} + + +/// There is no detailed description. +/// +/// This type is not used in any activity, and only used as *part* of another schema. +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct StepLabelsEntry { + /// no description provided + pub key: Option, + /// no description provided + pub value: Option, +} + +impl Part for StepLabelsEntry {} + + +/// An Execution represents a collection of Steps. For instance, it could represent: - a mobile test executed across a range of device configurations - a jenkins job with a build step followed by a test step +/// +/// The maximum size of an execution message is 1 MiB. +/// +/// An Execution can be updated until its state is set to COMPLETE at which point it becomes immutable. +/// +/// # Activities +/// +/// This type is used in activities, which are methods you may call on this type or where this type is involved in. +/// The list links the activity name, along with information about where it is used (one of *request* and *response*). +/// +/// * [histories executions patch projects](struct.ProjectHistoryExecutionPatchCall.html) (request|response) +/// * [histories executions create projects](struct.ProjectHistoryExecutionCreateCall.html) (request|response) +/// * [histories executions get projects](struct.ProjectHistoryExecutionGetCall.html) (response) +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct Execution { + /// The initial state is IN_PROGRESS. + /// + /// The only legal state transitions is from IN_PROGRESS to COMPLETE. + /// + /// A PRECONDITION_FAILED will be returned if an invalid transition is requested. + /// + /// The state can only be set to COMPLETE once. A FAILED_PRECONDITION will be returned if the state is set to COMPLETE multiple times. + /// + /// If the state is set to COMPLETE, all the in-progress steps within the execution will be set as COMPLETE. If the outcome of the step is not set, the outcome will be set to INCONCLUSIVE. + /// + /// - In response always set - In create/update request: optional + pub state: Option, + /// TestExecution Matrix ID that the Test Service uses. + /// + /// - In response: present if set by create - In create: optional - In update: never set + #[serde(rename="testExecutionMatrixId")] + pub test_execution_matrix_id: Option, + /// The time when the Execution status transitioned to COMPLETE. + /// + /// This value will be set automatically when state transitions to COMPLETE. + /// + /// - In response: set if the execution state is COMPLETE. - In create/update request: never set + #[serde(rename="completionTime")] + pub completion_time: Option, + /// Classify the result, for example into SUCCESS or FAILURE + /// + /// - In response: present if set by create/update request - In create/update request: optional + pub outcome: Option, + /// The time when the Execution was created. + /// + /// This value will be set automatically when CreateExecution is called. + /// + /// - In response: always set - In create/update request: never set + #[serde(rename="creationTime")] + pub creation_time: Option, + /// A unique identifier within a History for this Execution. + /// + /// Returns INVALID_ARGUMENT if this field is set or overwritten by the caller. + /// + /// - In response always set - In create/update request: never set + #[serde(rename="executionId")] + pub execution_id: Option, +} + +impl RequestValue for Execution {} +impl ResponseResult for Execution {} + + +/// Testing timing break down to know phases. +/// +/// This type is not used in any activity, and only used as *part* of another schema. +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct TestTiming { + /// How long it took to run the test process. + /// + /// - In response: present if previously set. - In create/update request: optional + #[serde(rename="testProcessDuration")] + pub test_process_duration: Option, +} + +impl Part for TestTiming {} + + +/// There is no detailed description. +/// +/// This type is not used in any activity, and only used as *part* of another schema. +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct SuccessDetail { + /// If a native process other than the app crashed. + #[serde(rename="otherNativeCrash")] + pub other_native_crash: Option, +} + +impl Part for SuccessDetail {} + + +/// There is no detailed description. +/// +/// This type is not used in any activity, and only used as *part* of another schema. +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct StepDimensionValueEntry { + /// no description provided + pub key: Option, + /// no description provided + pub value: Option, +} + +impl Part for StepDimensionValueEntry {} + + +/// Per-project settings for the Tool Results service. +/// +/// # Activities +/// +/// This type is used in activities, which are methods you may call on this type or where this type is involved in. +/// The list links the activity name, along with information about where it is used (one of *request* and *response*). +/// +/// * [initialize settings projects](struct.ProjectInitializeSettingCall.html) (response) +/// * [get settings projects](struct.ProjectGetSettingCall.html) (response) +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct ProjectSettings { + /// The name of the Google Cloud Storage bucket to which results are written. + /// + /// By default, this is unset. + /// + /// In update request: optional In response: optional + #[serde(rename="defaultBucket")] + pub default_bucket: Option, + /// The name of the project's settings. + /// + /// Always of the form: projects/{project-id}/settings + /// + /// In update request: never set In response: always set + pub name: Option, +} + +impl ResponseResult for ProjectSettings {} + + +/// A reference to a file. +/// +/// This type is not used in any activity, and only used as *part* of another schema. +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct FileReference { + /// The URI of a file stored in Google Cloud Storage. + /// + /// For example: http://storage.googleapis.com/mybucket/path/to/test.xml or in gsutil format: gs://mybucket/path/to/test.xml with version-specific info, gs://mybucket/path/to/test.xml#1360383693690000 + /// + /// An INVALID_ARGUMENT error will be returned if the URI format is not supported. + /// + /// - In response: always set - In create/update request: always set + #[serde(rename="fileUri")] + pub file_uri: Option, +} + +impl Part for FileReference {} + + +/// A response containing the thumbnails in a step. +/// +/// # Activities +/// +/// This type is used in activities, which are methods you may call on this type or where this type is involved in. +/// The list links the activity name, along with information about where it is used (one of *request* and *response*). +/// +/// * [histories executions steps thumbnails list projects](struct.ProjectHistoryExecutionStepThumbnailListCall.html) (response) +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct ListStepThumbnailsResponse { + /// A continuation token to resume the query at the next item. + /// + /// If set, indicates that there are more thumbnails to read, by calling list again with this value in the page_token field. + #[serde(rename="nextPageToken")] + pub next_page_token: Option, + /// A list of image data. + /// + /// Images are returned in a deterministic order; they are ordered by these factors, in order of importance: * First, by their associated test case. Images without a test case are considered greater than images with one. * Second, by their creation time. Images without a creation time are greater than images with one. * Third, by the order in which they were added to the step (by calls to CreateStep or UpdateStep). + pub thumbnails: Option>, +} + +impl ResponseResult for ListStepThumbnailsResponse {} + + +/// Interprets a result so that humans and machines can act on it. +/// +/// This type is not used in any activity, and only used as *part* of another schema. +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct Outcome { + /// More information about an INCONCLUSIVE outcome. + /// + /// Returns INVALID_ARGUMENT if this field is set but the summary is not INCONCLUSIVE. + /// + /// Optional + #[serde(rename="inconclusiveDetail")] + pub inconclusive_detail: Option, + /// More information about a SKIPPED outcome. + /// + /// Returns INVALID_ARGUMENT if this field is set but the summary is not SKIPPED. + /// + /// Optional + #[serde(rename="skippedDetail")] + pub skipped_detail: Option, + /// More information about a SUCCESS outcome. + /// + /// Returns INVALID_ARGUMENT if this field is set but the summary is not SUCCESS. + /// + /// Optional + #[serde(rename="successDetail")] + pub success_detail: Option, + /// More information about a FAILURE outcome. + /// + /// Returns INVALID_ARGUMENT if this field is set but the summary is not FAILURE. + /// + /// Optional + #[serde(rename="failureDetail")] + pub failure_detail: Option, + /// The simplest way to interpret a result. + /// + /// Required + pub summary: Option, +} + +impl Part for Outcome {} + + +/// There is no detailed description. +/// +/// This type is not used in any activity, and only used as *part* of another schema. +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct FailureDetail { + /// If a native process other than the app crashed. + #[serde(rename="otherNativeCrash")] + pub other_native_crash: Option, + /// If the failure was severe because the system under test crashed. + pub crashed: Option, + /// If an app is not installed and thus no test can be run with the app. This might be caused by trying to run a test on an unsupported platform. + #[serde(rename="notInstalled")] + pub not_installed: Option, + /// If the test overran some time limit, and that is why it failed. + #[serde(rename="timedOut")] + pub timed_out: Option, +} + +impl Part for FailureDetail {} + + +/// A History represents a sorted list of Executions ordered by the start_timestamp_millis field (descending). It can be used to group all the Executions of a continuous build. +/// +/// Note that the ordering only operates on one-dimension. If a repository has multiple branches, it means that multiple histories will need to be used in order to order Executions per branch. +/// +/// # Activities +/// +/// This type is used in activities, which are methods you may call on this type or where this type is involved in. +/// The list links the activity name, along with information about where it is used (one of *request* and *response*). +/// +/// * [histories get projects](struct.ProjectHistoryGetCall.html) (response) +/// * [histories create projects](struct.ProjectHistoryCreateCall.html) (request|response) +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct History { + /// A short human-readable (plain text) name to display in the UI. Maximum of 100 characters. + /// + /// - In response: present if set during create. - In create request: optional + #[serde(rename="displayName")] + pub display_name: Option, + /// A name to uniquely identify a history within a project. Maximum of 100 characters. + /// + /// - In response always set - In create request: always set + pub name: Option, + /// A unique identifier within a project for this History. + /// + /// Returns INVALID_ARGUMENT if this field is set or overwritten by the caller. + /// + /// - In response always set - In create request: never set + #[serde(rename="historyId")] + pub history_id: Option, +} + +impl RequestValue for History {} +impl ResponseResult for History {} + + +/// Request message for StepService.PublishXunitXmlFiles. +/// +/// # Activities +/// +/// This type is used in activities, which are methods you may call on this type or where this type is involved in. +/// The list links the activity name, along with information about where it is used (one of *request* and *response*). +/// +/// * [histories executions steps publish xunit xml files projects](struct.ProjectHistoryExecutionStepPublishXunitXmlFileCall.html) (request) +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct PublishXunitXmlFilesRequest { + /// URI of the Xunit XML files to publish. + /// + /// The maximum size of the file this reference is pointing to is 50MB. + /// + /// Required. + #[serde(rename="xunitXmlFiles")] + pub xunit_xml_files: Option>, +} + +impl RequestValue for PublishXunitXmlFilesRequest {} + + +/// Response message for HistoryService.List +/// +/// # Activities +/// +/// This type is used in activities, which are methods you may call on this type or where this type is involved in. +/// The list links the activity name, along with information about where it is used (one of *request* and *response*). +/// +/// * [histories list projects](struct.ProjectHistoryListCall.html) (response) +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct ListHistoriesResponse { + /// A continuation token to resume the query at the next item. + /// + /// Will only be set if there are more histories to fetch. + /// + /// Tokens are valid for up to one hour from the time of the first list request. For instance, if you make a list request at 1PM and use the token from this first request 10 minutes later, the token from this second response will only be valid for 50 minutes. + #[serde(rename="nextPageToken")] + pub next_page_token: Option, + /// Histories. + pub histories: Option>, +} + +impl ResponseResult for ListHistoriesResponse {} + + +/// An execution of an arbitrary tool. It could be a test runner or a tool copying artifacts or deploying code. +/// +/// This type is not used in any activity, and only used as *part* of another schema. +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct ToolExecution { + /// The full tokenized command line including the program name (equivalent to argv in a C program). + /// + /// - In response: present if set by create request - In create request: optional - In update request: never set + #[serde(rename="commandLineArguments")] + pub command_line_arguments: Option>, + /// References to any plain text logs output the tool execution. + /// + /// This field can be set before the tool has exited in order to be able to have access to a live view of the logs while the tool is running. + /// + /// The maximum allowed number of tool logs per step is 1000. + /// + /// - In response: present if set by create/update request - In create request: optional - In update request: optional, any value provided will be appended to the existing list + #[serde(rename="toolLogs")] + pub tool_logs: Option>, + /// References to opaque files of any format output by the tool execution. + /// + /// The maximum allowed number of tool outputs per step is 1000. + /// + /// - In response: present if set by create/update request - In create request: optional - In update request: optional, any value provided will be appended to the existing list + #[serde(rename="toolOutputs")] + pub tool_outputs: Option>, + /// Tool execution exit code. This field will be set once the tool has exited. + /// + /// - In response: present if set by create/update request - In create request: optional - In update request: optional, a FAILED_PRECONDITION error will be returned if an exit_code is already set. + #[serde(rename="exitCode")] + pub exit_code: Option, +} + +impl Part for ToolExecution {} + + +/// Exit code from a tool execution. +/// +/// This type is not used in any activity, and only used as *part* of another schema. +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct ToolExitCode { + /// Tool execution exit code. A value of 0 means that the execution was successful. + /// + /// - In response: always set - In create/update request: always set + pub number: Option, +} + +impl Part for ToolExitCode {} + + +/// There is no detailed description. +/// +/// # Activities +/// +/// This type is used in activities, which are methods you may call on this type or where this type is involved in. +/// The list links the activity name, along with information about where it is used (one of *request* and *response*). +/// +/// * [histories executions list projects](struct.ProjectHistoryExecutionListCall.html) (response) +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct ListExecutionsResponse { + /// A continuation token to resume the query at the next item. + /// + /// Will only be set if there are more Executions to fetch. + #[serde(rename="nextPageToken")] + pub next_page_token: Option, + /// Executions. + /// + /// Always set. + pub executions: Option>, +} + +impl ResponseResult for ListExecutionsResponse {} + + +/// There is no detailed description. +/// +/// This type is not used in any activity, and only used as *part* of another schema. +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct SkippedDetail { + /// If the App doesn't support the specific API level. + #[serde(rename="incompatibleAppVersion")] + pub incompatible_app_version: Option, + /// If the App doesn't run on the specific architecture, for example, x86. + #[serde(rename="incompatibleArchitecture")] + pub incompatible_architecture: Option, + /// If the requested OS version doesn't run on the specific device model. + #[serde(rename="incompatibleDevice")] + pub incompatible_device: Option, +} + +impl Part for SkippedDetail {} + + +/// A Timestamp represents a point in time independent of any time zone or calendar, represented as seconds and fractions of seconds at nanosecond resolution in UTC Epoch time. It is encoded using the Proleptic Gregorian Calendar which extends the Gregorian calendar backwards to year one. It is encoded assuming all minutes are 60 seconds long, i.e. leap seconds are "smeared" so that no leap second table is needed for interpretation. Range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from RFC 3339 date strings. See [https://www.ietf.org/rfc/rfc3339.txt](https://www.ietf.org/rfc/rfc3339.txt). +/// +/// Example 1: Compute Timestamp from POSIX `time()`. +/// +/// Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); +/// +/// Example 2: Compute Timestamp from POSIX `gettimeofday()`. +/// +/// struct timeval tv; gettimeofday(&tv, NULL); +/// +/// Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); +/// +/// Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. +/// +/// FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; +/// +/// // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); +/// +/// Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. +/// +/// long millis = System.currentTimeMillis(); +/// +/// Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); +/// +/// +/// +/// Example 5: Compute Timestamp from current time in Python. +/// +/// now = time.time() seconds = int(now) nanos = int((now - seconds) * 10**9) timestamp = Timestamp(seconds=seconds, nanos=nanos) +/// +/// This type is not used in any activity, and only used as *part* of another schema. +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct Timestamp { + /// Non-negative fractions of a second at nanosecond resolution. Negative second values with fractions must still have non-negative nanos values that count forward in time. Must be from 0 to 999,999,999 inclusive. + pub nanos: Option, + /// Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must be from from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z inclusive. + pub seconds: Option, +} + +impl Part for Timestamp {} + + +/// A Duration represents a signed, fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like "day" or "month". It is related to Timestamp in that the difference between two Timestamp values is a Duration and it can be added or subtracted from a Timestamp. Range is approximately +-10,000 years. +/// +/// Example 1: Compute Duration from two Timestamps in pseudo code. +/// +/// Timestamp start = ...; Timestamp end = ...; Duration duration = ...; +/// +/// duration.seconds = end.seconds - start.seconds; duration.nanos = end.nanos - start.nanos; +/// +/// if (duration.seconds 0) { duration.seconds += 1; duration.nanos -= 1000000000; } else if (durations.seconds > 0 && duration.nanos < 0) { duration.seconds -= 1; duration.nanos += 1000000000; } +/// +/// Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. +/// +/// Timestamp start = ...; Duration duration = ...; Timestamp end = ...; +/// +/// end.seconds = start.seconds + duration.seconds; end.nanos = start.nanos + duration.nanos; +/// +/// if (end.nanos = 1000000000) { end.seconds += 1; end.nanos -= 1000000000; } +/// +/// This type is not used in any activity, and only used as *part* of another schema. +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct Duration { + /// Signed fractions of a second at nanosecond resolution of the span of time. Durations less than one second are represented with a 0 `seconds` field and a positive or negative `nanos` field. For durations of one second or more, a non-zero value for the `nanos` field must be of the same sign as the `seconds` field. Must be from -999,999,999 to +999,999,999 inclusive. + pub nanos: Option, + /// Signed seconds of the span of time. Must be from -315,576,000,000 to +315,576,000,000 inclusive. + pub seconds: Option, +} + +impl Part for Duration {} + + +/// A summary of a test suite result either parsed from XML or uploaded directly by a user. +/// +/// Note: the API related comments are for StepService only. This message is also being used in ExecutionService in a read only mode for the corresponding step. +/// +/// This type is not used in any activity, and only used as *part* of another schema. +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct TestSuiteOverview { + /// If this test suite was parsed from XML, this is the URI where the original XML file is stored. + /// + /// Note: Multiple test suites can share the same xml_source + /// + /// Returns INVALID_ARGUMENT if the uri format is not supported. + /// + /// - In create/response: optional - In update request: never + #[serde(rename="xmlSource")] + pub xml_source: Option, + /// Number of test cases, typically set by the service by parsing the xml_source. + /// + /// - In create/response: always set - In update request: never + #[serde(rename="totalCount")] + pub total_count: Option, + /// The name of the test suite. + /// + /// - In create/response: always set - In update request: never + pub name: Option, + /// Number of test cases in error, typically set by the service by parsing the xml_source. + /// + /// - In create/response: always set - In update request: never + #[serde(rename="errorCount")] + pub error_count: Option, + /// Number of test cases not run, typically set by the service by parsing the xml_source. + /// + /// - In create/response: always set - In update request: never + #[serde(rename="skippedCount")] + pub skipped_count: Option, + /// Number of failed test cases, typically set by the service by parsing the xml_source. May also be set by the user. + /// + /// - In create/response: always set - In update request: never + #[serde(rename="failureCount")] + pub failure_count: Option, +} + +impl Part for TestSuiteOverview {} + + +/// `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. +/// +/// Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. +/// +/// Example 1: Pack and unpack a message in C++. +/// +/// Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } +/// +/// Example 2: Pack and unpack a message in Java. +/// +/// Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } +/// +/// The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". +/// +/// +/// +/// JSON ==== The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: +/// +/// package google.profile; message Person { string first_name = 1; string last_name = 2; } +/// +/// { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } +/// +/// If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): +/// +/// { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } +/// +/// This type is not used in any activity, and only used as *part* of another schema. +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct Any { + /// A URL/resource name whose content describes the type of the serialized protocol buffer message. + /// + /// For URLs which use the schema `http`, `https`, or no schema, the following restrictions and interpretations apply: + /// + /// * If no schema is provided, `https` is assumed. * The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) + /// + /// Schemas other than `http`, `https` (or the empty schema) might be used with implementation specific semantics. + #[serde(rename="typeUrl")] + pub type_url: Option, + /// Must be a valid serialized protocol buffer of the above specified type. + pub value: Option, +} + +impl Part for Any {} + + + +// ################### +// MethodBuilders ### +// ################# + +/// A builder providing access to all methods supported on *project* resources. +/// It is not used directly, but through the `ToolResults` hub. +/// +/// # Example +/// +/// Instantiate a resource builder +/// +/// ```test_harness,no_run +/// extern crate hyper; +/// extern crate yup_oauth2 as oauth2; +/// extern crate google_toolresults1_beta3 as toolresults1_beta3; +/// +/// # #[test] fn egal() { +/// use std::default::Default; +/// use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; +/// use toolresults1_beta3::ToolResults; +/// +/// let secret: ApplicationSecret = Default::default(); +/// let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, +/// hyper::Client::new(), +/// ::default(), None); +/// let mut hub = ToolResults::new(hyper::Client::new(), auth); +/// // Usually you wouldn't bind this to a variable, but keep calling *CallBuilders* +/// // like `get_settings(...)`, `histories_create(...)`, `histories_executions_create(...)`, `histories_executions_get(...)`, `histories_executions_list(...)`, `histories_executions_patch(...)`, `histories_executions_steps_create(...)`, `histories_executions_steps_get(...)`, `histories_executions_steps_list(...)`, `histories_executions_steps_patch(...)`, `histories_executions_steps_publish_xunit_xml_files(...)`, `histories_executions_steps_thumbnails_list(...)`, `histories_get(...)`, `histories_list(...)` and `initialize_settings(...)` +/// // to build up your call. +/// let rb = hub.projects(); +/// # } +/// ``` +pub struct ProjectMethods<'a, C, A> + where C: 'a, A: 'a { + + hub: &'a ToolResults, +} + +impl<'a, C, A> MethodsBuilder for ProjectMethods<'a, C, A> {} + +impl<'a, C, A> ProjectMethods<'a, C, A> { + + /// Create a builder to help you perform the following task: + /// + /// Creates resources for settings which have not yet been set. + /// + /// Currently, this creates a single resource: a Google Cloud Storage bucket, to be used as the default bucket for this project. The bucket is created in the name of the user calling. Except in rare cases, calling this method in parallel from multiple clients will only create a single bucket. In order to avoid unnecessary storage charges, the bucket is configured to automatically delete objects older than 90 days. + /// + /// The bucket is created with the project-private ACL: All project team members are given permissions to the bucket and objects created within it according to their roles. Project owners have owners rights, and so on. The default ACL on objects created in the bucket is project-private as well. See Google Cloud Storage documentation for more details. + /// + /// If there is already a default bucket set and the project can access the bucket, this call does nothing. However, if the project doesn't have the permission to access the bucket or the bucket is deteleted, a new bucket will be created. + /// + /// May return any canonical error codes, including the following: + /// + /// - PERMISSION_DENIED - if the user is not authorized to write to project - Any error code raised by Google Cloud Storage + /// + /// # Arguments + /// + /// * `projectId` - A Project id. + /// Required. + pub fn initialize_settings(&self, project_id: &str) -> ProjectInitializeSettingCall<'a, C, A> { + ProjectInitializeSettingCall { + hub: self.hub, + _project_id: project_id.to_string(), + _delegate: Default::default(), + _scopes: Default::default(), + _additional_params: Default::default(), + } + } + + /// Create a builder to help you perform the following task: + /// + /// Gets a History. + /// + /// May return any of the following canonical error codes: + /// + /// - PERMISSION_DENIED - if the user is not authorized to read project - INVALID_ARGUMENT - if the request is malformed - NOT_FOUND - if the History does not exist + /// + /// # Arguments + /// + /// * `projectId` - A Project id. + /// Required. + /// * `historyId` - A History id. + /// Required. + pub fn histories_get(&self, project_id: &str, history_id: &str) -> ProjectHistoryGetCall<'a, C, A> { + ProjectHistoryGetCall { + hub: self.hub, + _project_id: project_id.to_string(), + _history_id: history_id.to_string(), + _delegate: Default::default(), + _scopes: Default::default(), + _additional_params: Default::default(), + } + } + + /// Create a builder to help you perform the following task: + /// + /// Lists thumbnails of images attached to a step. + /// + /// May return any of the following canonical error codes: - PERMISSION_DENIED - if the user is not authorized to read from the project, or from any of the images - INVALID_ARGUMENT - if the request is malformed - NOT_FOUND - if the step does not exist, or if any of the images do not exist + /// + /// # Arguments + /// + /// * `projectId` - A Project id. + /// Required. + /// * `historyId` - A History id. + /// Required. + /// * `executionId` - An Execution id. + /// Required. + /// * `stepId` - A Step id. + /// Required. + pub fn histories_executions_steps_thumbnails_list(&self, project_id: &str, history_id: &str, execution_id: &str, step_id: &str) -> ProjectHistoryExecutionStepThumbnailListCall<'a, C, A> { + ProjectHistoryExecutionStepThumbnailListCall { + hub: self.hub, + _project_id: project_id.to_string(), + _history_id: history_id.to_string(), + _execution_id: execution_id.to_string(), + _step_id: step_id.to_string(), + _page_token: Default::default(), + _page_size: Default::default(), + _delegate: Default::default(), + _scopes: Default::default(), + _additional_params: Default::default(), + } + } + + /// Create a builder to help you perform the following task: + /// + /// Gets an Execution. + /// + /// May return any of the following canonical error codes: + /// + /// - PERMISSION_DENIED - if the user is not authorized to write to project - INVALID_ARGUMENT - if the request is malformed - NOT_FOUND - if the Execution does not exist + /// + /// # Arguments + /// + /// * `projectId` - A Project id. + /// Required. + /// * `historyId` - A History id. + /// Required. + /// * `executionId` - An Execution id. + /// Required. + pub fn histories_executions_get(&self, project_id: &str, history_id: &str, execution_id: &str) -> ProjectHistoryExecutionGetCall<'a, C, A> { + ProjectHistoryExecutionGetCall { + hub: self.hub, + _project_id: project_id.to_string(), + _history_id: history_id.to_string(), + _execution_id: execution_id.to_string(), + _delegate: Default::default(), + _scopes: Default::default(), + _additional_params: Default::default(), + } + } + + /// Create a builder to help you perform the following task: + /// + /// Updates an existing Execution with the supplied partial entity. + /// + /// May return any of the following canonical error codes: + /// + /// - PERMISSION_DENIED - if the user is not authorized to write to project - INVALID_ARGUMENT - if the request is malformed - FAILED_PRECONDITION - if the requested state transition is illegal - NOT_FOUND - if the containing History does not exist + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `projectId` - A Project id. Required. + /// * `historyId` - Required. + /// * `executionId` - Required. + pub fn histories_executions_patch(&self, request: Execution, project_id: &str, history_id: &str, execution_id: &str) -> ProjectHistoryExecutionPatchCall<'a, C, A> { + ProjectHistoryExecutionPatchCall { + hub: self.hub, + _request: request, + _project_id: project_id.to_string(), + _history_id: history_id.to_string(), + _execution_id: execution_id.to_string(), + _request_id: Default::default(), + _delegate: Default::default(), + _scopes: Default::default(), + _additional_params: Default::default(), + } + } + + /// Create a builder to help you perform the following task: + /// + /// Lists Histories for a given Project. + /// + /// The histories are sorted by modification time in descending order. The history_id key will be used to order the history with the same modification time. + /// + /// May return any of the following canonical error codes: + /// + /// - PERMISSION_DENIED - if the user is not authorized to read project - INVALID_ARGUMENT - if the request is malformed - NOT_FOUND - if the History does not exist + /// + /// # Arguments + /// + /// * `projectId` - A Project id. + /// Required. + pub fn histories_list(&self, project_id: &str) -> ProjectHistoryListCall<'a, C, A> { + ProjectHistoryListCall { + hub: self.hub, + _project_id: project_id.to_string(), + _page_token: Default::default(), + _page_size: Default::default(), + _filter_by_name: Default::default(), + _delegate: Default::default(), + _scopes: Default::default(), + _additional_params: Default::default(), + } + } + + /// Create a builder to help you perform the following task: + /// + /// Gets a Step. + /// + /// May return any of the following canonical error codes: + /// + /// - PERMISSION_DENIED - if the user is not authorized to read project - INVALID_ARGUMENT - if the request is malformed - NOT_FOUND - if the Step does not exist + /// + /// # Arguments + /// + /// * `projectId` - A Project id. + /// Required. + /// * `historyId` - A History id. + /// Required. + /// * `executionId` - A Execution id. + /// Required. + /// * `stepId` - A Step id. + /// Required. + pub fn histories_executions_steps_get(&self, project_id: &str, history_id: &str, execution_id: &str, step_id: &str) -> ProjectHistoryExecutionStepGetCall<'a, C, A> { + ProjectHistoryExecutionStepGetCall { + hub: self.hub, + _project_id: project_id.to_string(), + _history_id: history_id.to_string(), + _execution_id: execution_id.to_string(), + _step_id: step_id.to_string(), + _delegate: Default::default(), + _scopes: Default::default(), + _additional_params: Default::default(), + } + } + + /// Create a builder to help you perform the following task: + /// + /// Publish xml files to an existing Step. + /// + /// May return any of the following canonical error codes: + /// + /// - PERMISSION_DENIED - if the user is not authorized to write project - INVALID_ARGUMENT - if the request is malformed - FAILED_PRECONDITION - if the requested state transition is illegal, e.g try to upload a duplicate xml file or a file too large. - NOT_FOUND - if the containing Execution does not exist + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `projectId` - A Project id. + /// Required. + /// * `historyId` - A History id. + /// Required. + /// * `executionId` - A Execution id. + /// Required. + /// * `stepId` - A Step id. Note: This step must include a TestExecutionStep. + /// Required. + pub fn histories_executions_steps_publish_xunit_xml_files(&self, request: PublishXunitXmlFilesRequest, project_id: &str, history_id: &str, execution_id: &str, step_id: &str) -> ProjectHistoryExecutionStepPublishXunitXmlFileCall<'a, C, A> { + ProjectHistoryExecutionStepPublishXunitXmlFileCall { + hub: self.hub, + _request: request, + _project_id: project_id.to_string(), + _history_id: history_id.to_string(), + _execution_id: execution_id.to_string(), + _step_id: step_id.to_string(), + _delegate: Default::default(), + _scopes: Default::default(), + _additional_params: Default::default(), + } + } + + /// Create a builder to help you perform the following task: + /// + /// Lists Steps for a given Execution. + /// + /// The steps are sorted by creation_time in descending order. The step_id key will be used to order the steps with the same creation_time. + /// + /// May return any of the following canonical error codes: + /// + /// - PERMISSION_DENIED - if the user is not authorized to read project - INVALID_ARGUMENT - if the request is malformed - FAILED_PRECONDITION - if an argument in the request happens to be invalid; e.g. if an attempt is made to list the children of a nonexistent Step - NOT_FOUND - if the containing Execution does not exist + /// + /// # Arguments + /// + /// * `projectId` - A Project id. + /// Required. + /// * `historyId` - A History id. + /// Required. + /// * `executionId` - A Execution id. + /// Required. + pub fn histories_executions_steps_list(&self, project_id: &str, history_id: &str, execution_id: &str) -> ProjectHistoryExecutionStepListCall<'a, C, A> { + ProjectHistoryExecutionStepListCall { + hub: self.hub, + _project_id: project_id.to_string(), + _history_id: history_id.to_string(), + _execution_id: execution_id.to_string(), + _page_token: Default::default(), + _page_size: Default::default(), + _delegate: Default::default(), + _scopes: Default::default(), + _additional_params: Default::default(), + } + } + + /// Create a builder to help you perform the following task: + /// + /// Updates an existing Step with the supplied partial entity. + /// + /// May return any of the following canonical error codes: + /// + /// - PERMISSION_DENIED - if the user is not authorized to write project - INVALID_ARGUMENT - if the request is malformed - FAILED_PRECONDITION - if the requested state transition is illegal (e.g try to upload a duplicate xml file), if the updated step is too large (more than 10Mib) - NOT_FOUND - if the containing Execution does not exist + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `projectId` - A Project id. + /// Required. + /// * `historyId` - A History id. + /// Required. + /// * `executionId` - A Execution id. + /// Required. + /// * `stepId` - A Step id. + /// Required. + pub fn histories_executions_steps_patch(&self, request: Step, project_id: &str, history_id: &str, execution_id: &str, step_id: &str) -> ProjectHistoryExecutionStepPatchCall<'a, C, A> { + ProjectHistoryExecutionStepPatchCall { + hub: self.hub, + _request: request, + _project_id: project_id.to_string(), + _history_id: history_id.to_string(), + _execution_id: execution_id.to_string(), + _step_id: step_id.to_string(), + _request_id: Default::default(), + _delegate: Default::default(), + _scopes: Default::default(), + _additional_params: Default::default(), + } + } + + /// Create a builder to help you perform the following task: + /// + /// Creates an Execution. + /// + /// The returned Execution will have the id set. + /// + /// May return any of the following canonical error codes: + /// + /// - PERMISSION_DENIED - if the user is not authorized to write to project - INVALID_ARGUMENT - if the request is malformed - NOT_FOUND - if the containing History does not exist + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `projectId` - A Project id. + /// Required. + /// * `historyId` - A History id. + /// Required. + pub fn histories_executions_create(&self, request: Execution, project_id: &str, history_id: &str) -> ProjectHistoryExecutionCreateCall<'a, C, A> { + ProjectHistoryExecutionCreateCall { + hub: self.hub, + _request: request, + _project_id: project_id.to_string(), + _history_id: history_id.to_string(), + _request_id: Default::default(), + _delegate: Default::default(), + _scopes: Default::default(), + _additional_params: Default::default(), + } + } + + /// Create a builder to help you perform the following task: + /// + /// Creates a Step. + /// + /// The returned Step will have the id set. + /// + /// May return any of the following canonical error codes: + /// + /// - PERMISSION_DENIED - if the user is not authorized to write to project - INVALID_ARGUMENT - if the request is malformed - FAILED_PRECONDITION - if the step is too large (more than 10Mib) - NOT_FOUND - if the containing Execution does not exist + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `projectId` - A Project id. + /// Required. + /// * `historyId` - A History id. + /// Required. + /// * `executionId` - A Execution id. + /// Required. + pub fn histories_executions_steps_create(&self, request: Step, project_id: &str, history_id: &str, execution_id: &str) -> ProjectHistoryExecutionStepCreateCall<'a, C, A> { + ProjectHistoryExecutionStepCreateCall { + hub: self.hub, + _request: request, + _project_id: project_id.to_string(), + _history_id: history_id.to_string(), + _execution_id: execution_id.to_string(), + _request_id: Default::default(), + _delegate: Default::default(), + _scopes: Default::default(), + _additional_params: Default::default(), + } + } + + /// Create a builder to help you perform the following task: + /// + /// Gets the Tool Results settings for a project. + /// + /// May return any of the following canonical error codes: + /// + /// - PERMISSION_DENIED - if the user is not authorized to read from project + /// + /// # Arguments + /// + /// * `projectId` - A Project id. + /// Required. + pub fn get_settings(&self, project_id: &str) -> ProjectGetSettingCall<'a, C, A> { + ProjectGetSettingCall { + hub: self.hub, + _project_id: project_id.to_string(), + _delegate: Default::default(), + _scopes: Default::default(), + _additional_params: Default::default(), + } + } + + /// Create a builder to help you perform the following task: + /// + /// Lists Histories for a given Project. + /// + /// The executions are sorted by creation_time in descending order. The execution_id key will be used to order the executions with the same creation_time. + /// + /// May return any of the following canonical error codes: + /// + /// - PERMISSION_DENIED - if the user is not authorized to read project - INVALID_ARGUMENT - if the request is malformed - NOT_FOUND - if the containing History does not exist + /// + /// # Arguments + /// + /// * `projectId` - A Project id. + /// Required. + /// * `historyId` - A History id. + /// Required. + pub fn histories_executions_list(&self, project_id: &str, history_id: &str) -> ProjectHistoryExecutionListCall<'a, C, A> { + ProjectHistoryExecutionListCall { + hub: self.hub, + _project_id: project_id.to_string(), + _history_id: history_id.to_string(), + _page_token: Default::default(), + _page_size: Default::default(), + _delegate: Default::default(), + _scopes: Default::default(), + _additional_params: Default::default(), + } + } + + /// Create a builder to help you perform the following task: + /// + /// Creates a History. + /// + /// The returned History will have the id set. + /// + /// May return any of the following canonical error codes: + /// + /// - PERMISSION_DENIED - if the user is not authorized to write to project - INVALID_ARGUMENT - if the request is malformed - NOT_FOUND - if the containing project does not exist + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `projectId` - A Project id. + /// Required. + pub fn histories_create(&self, request: History, project_id: &str) -> ProjectHistoryCreateCall<'a, C, A> { + ProjectHistoryCreateCall { + hub: self.hub, + _request: request, + _project_id: project_id.to_string(), + _request_id: Default::default(), + _delegate: Default::default(), + _scopes: Default::default(), + _additional_params: Default::default(), + } + } +} + + + + + +// ################### +// CallBuilders ### +// ################# + +/// Creates resources for settings which have not yet been set. +/// +/// Currently, this creates a single resource: a Google Cloud Storage bucket, to be used as the default bucket for this project. The bucket is created in the name of the user calling. Except in rare cases, calling this method in parallel from multiple clients will only create a single bucket. In order to avoid unnecessary storage charges, the bucket is configured to automatically delete objects older than 90 days. +/// +/// The bucket is created with the project-private ACL: All project team members are given permissions to the bucket and objects created within it according to their roles. Project owners have owners rights, and so on. The default ACL on objects created in the bucket is project-private as well. See Google Cloud Storage documentation for more details. +/// +/// If there is already a default bucket set and the project can access the bucket, this call does nothing. However, if the project doesn't have the permission to access the bucket or the bucket is deteleted, a new bucket will be created. +/// +/// May return any canonical error codes, including the following: +/// +/// - PERMISSION_DENIED - if the user is not authorized to write to project - Any error code raised by Google Cloud Storage +/// +/// A builder for the *initializeSettings* method supported by a *project* resource. +/// It is not used directly, but through a `ProjectMethods` instance. +/// +/// # Example +/// +/// Instantiate a resource method builder +/// +/// ```test_harness,no_run +/// # extern crate hyper; +/// # extern crate yup_oauth2 as oauth2; +/// # extern crate google_toolresults1_beta3 as toolresults1_beta3; +/// # #[test] fn egal() { +/// # use std::default::Default; +/// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; +/// # use toolresults1_beta3::ToolResults; +/// +/// # let secret: ApplicationSecret = Default::default(); +/// # let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, +/// # hyper::Client::new(), +/// # ::default(), None); +/// # let mut hub = ToolResults::new(hyper::Client::new(), auth); +/// // You can configure optional parameters by calling the respective setters at will, and +/// // execute the final call using `doit()`. +/// // Values shown here are possibly random and not representative ! +/// let result = hub.projects().initialize_settings("projectId") +/// .doit(); +/// # } +/// ``` +pub struct ProjectInitializeSettingCall<'a, C, A> + where C: 'a, A: 'a { + + hub: &'a ToolResults, + _project_id: String, + _delegate: Option<&'a mut Delegate>, + _additional_params: HashMap, + _scopes: BTreeMap +} + +impl<'a, C, A> CallBuilder for ProjectInitializeSettingCall<'a, C, A> {} + +impl<'a, C, A> ProjectInitializeSettingCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { + + + /// Perform the operation you have build so far. + pub fn doit(mut self) -> Result<(hyper::client::Response, ProjectSettings)> { + use std::io::{Read, Seek}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; + let mut dd = DefaultDelegate; + let mut dlg: &mut Delegate = match self._delegate { + Some(d) => d, + None => &mut dd + }; + dlg.begin(MethodInfo { id: "toolresults.projects.initializeSettings", + http_method: hyper::method::Method::Post }); + let mut params: Vec<(&str, String)> = Vec::with_capacity((3 + self._additional_params.len())); + params.push(("projectId", self._project_id.to_string())); + for &field in ["alt", "projectId"].iter() { + if self._additional_params.contains_key(field) { + dlg.finished(false); + return Err(Error::FieldClash(field)); + } + } + for (name, value) in self._additional_params.iter() { + params.push((&name, value.clone())); + } + + params.push(("alt", "json".to_string())); + + let mut url = "https://www.googleapis.com/toolresults/v1beta3/projects/{projectId}:initializeSettings".to_string(); + if self._scopes.len() == 0 { + self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); + } + + for &(find_this, param_name) in [("{projectId}", "projectId")].iter() { + let mut replace_with: Option<&str> = None; + for &(name, ref value) in params.iter() { + if name == param_name { + replace_with = Some(value); + break; + } + } + url = url.replace(find_this, replace_with.expect("to find substitution value in params")); + } + { + let mut indices_for_removal: Vec = Vec::with_capacity(1); + for param_name in ["projectId"].iter() { + if let Some(index) = params.iter().position(|t| &t.0 == param_name) { + indices_for_removal.push(index); + } + } + for &index in indices_for_removal.iter() { + params.remove(index); + } + } + + if params.len() > 0 { + url.push('?'); + url.push_str(&url::form_urlencoded::serialize(params)); + } + + + + loop { + let token = match self.hub.auth.borrow_mut().token(self._scopes.keys()) { + Ok(token) => token, + Err(err) => { + match dlg.token(&*err) { + Some(token) => token, + None => { + dlg.finished(false); + return Err(Error::MissingToken(err)) + } + } + } + }; + let auth_header = Authorization(Bearer { token: token.access_token }); + let mut req_result = { + let mut client = &mut *self.hub.client.borrow_mut(); + let mut req = client.borrow_mut().request(hyper::method::Method::Post, &url) + .header(UserAgent(self.hub._user_agent.clone())) + .header(auth_header.clone()); + + dlg.pre_request(); + req.send() + }; + + match req_result { + Err(err) => { + if let oauth2::Retry::After(d) = dlg.http_error(&err) { + sleep(d); + continue; + } + dlg.finished(false); + return Err(Error::HttpError(err)) + } + Ok(mut res) => { + if !res.status.is_success() { + let mut json_err = String::new(); + res.read_to_string(&mut json_err).unwrap(); + if let oauth2::Retry::After(d) = dlg.http_failure(&res, + json::from_str(&json_err).ok(), + json::from_str(&json_err).ok()) { + sleep(d); + continue; + } + dlg.finished(false); + return match json::from_str::(&json_err){ + Err(_) => Err(Error::Failure(res)), + Ok(serr) => Err(Error::BadRequest(serr)) + } + } + let result_value = { + let mut json_response = String::new(); + res.read_to_string(&mut json_response).unwrap(); + match json::from_str(&json_response) { + Ok(decoded) => (res, decoded), + Err(err) => { + dlg.response_json_decode_error(&json_response, &err); + return Err(Error::JsonDecodeError(json_response, err)); + } + } + }; + + dlg.finished(true); + return Ok(result_value) + } + } + } + } + + + /// A Project id. + /// + /// Required. + /// + /// Sets the *project id* path property to the given value. + /// + /// Even though the property as already been set when instantiating this call, + /// we provide this method for API completeness. + pub fn project_id(mut self, new_value: &str) -> ProjectInitializeSettingCall<'a, C, A> { + self._project_id = new_value.to_string(); + self + } + /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong + /// while executing the actual API request. + /// + /// It should be used to handle progress information, and to implement a certain level of resilience. + /// + /// Sets the *delegate* property to the given value. + pub fn delegate(mut self, new_value: &'a mut Delegate) -> ProjectInitializeSettingCall<'a, C, A> { + self._delegate = Some(new_value); + self + } + + /// Set any additional parameter of the query string used in the request. + /// It should be used to set parameters which are not yet available through their own + /// setters. + /// + /// Please note that this method must not be used to set any of the known paramters + /// which have their own setter method. If done anyway, the request will fail. + /// + /// # Additional Parameters + /// + /// * *quotaUser* (query-string) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. Overrides userIp if both are provided. + /// * *oauth_token* (query-string) - OAuth 2.0 token for the current user. + /// * *key* (query-string) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. + /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. + /// * *userIp* (query-string) - IP address of the site where the request originates. Use this if you want to enforce per-user limits. + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *alt* (query-string) - Data format for the response. + pub fn param(mut self, name: T, value: T) -> ProjectInitializeSettingCall<'a, C, A> + where T: AsRef { + self._additional_params.insert(name.as_ref().to_string(), value.as_ref().to_string()); + self + } + + /// Identifies the authorization scope for the method you are building. + /// + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::CloudPlatform`. + /// + /// The `scope` will be added to a set of scopes. This is important as one can maintain access + /// tokens for more than one scope. + /// + /// Usually there is more than one suitable scope to authorize an operation, some of which may + /// encompass more rights than others. For example, for listing resources, a *read-only* scope will be + /// sufficient, a read-write scope will do as well. + pub fn add_scope(mut self, scope: T) -> ProjectInitializeSettingCall<'a, C, A> + where T: AsRef { + self._scopes.insert(scope.as_ref().to_string(), ()); + self + } +} + + +/// Gets a History. +/// +/// May return any of the following canonical error codes: +/// +/// - PERMISSION_DENIED - if the user is not authorized to read project - INVALID_ARGUMENT - if the request is malformed - NOT_FOUND - if the History does not exist +/// +/// A builder for the *histories.get* method supported by a *project* resource. +/// It is not used directly, but through a `ProjectMethods` instance. +/// +/// # Example +/// +/// Instantiate a resource method builder +/// +/// ```test_harness,no_run +/// # extern crate hyper; +/// # extern crate yup_oauth2 as oauth2; +/// # extern crate google_toolresults1_beta3 as toolresults1_beta3; +/// # #[test] fn egal() { +/// # use std::default::Default; +/// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; +/// # use toolresults1_beta3::ToolResults; +/// +/// # let secret: ApplicationSecret = Default::default(); +/// # let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, +/// # hyper::Client::new(), +/// # ::default(), None); +/// # let mut hub = ToolResults::new(hyper::Client::new(), auth); +/// // You can configure optional parameters by calling the respective setters at will, and +/// // execute the final call using `doit()`. +/// // Values shown here are possibly random and not representative ! +/// let result = hub.projects().histories_get("projectId", "historyId") +/// .doit(); +/// # } +/// ``` +pub struct ProjectHistoryGetCall<'a, C, A> + where C: 'a, A: 'a { + + hub: &'a ToolResults, + _project_id: String, + _history_id: String, + _delegate: Option<&'a mut Delegate>, + _additional_params: HashMap, + _scopes: BTreeMap +} + +impl<'a, C, A> CallBuilder for ProjectHistoryGetCall<'a, C, A> {} + +impl<'a, C, A> ProjectHistoryGetCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { + + + /// Perform the operation you have build so far. + pub fn doit(mut self) -> Result<(hyper::client::Response, History)> { + use std::io::{Read, Seek}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; + let mut dd = DefaultDelegate; + let mut dlg: &mut Delegate = match self._delegate { + Some(d) => d, + None => &mut dd + }; + dlg.begin(MethodInfo { id: "toolresults.projects.histories.get", + http_method: hyper::method::Method::Get }); + let mut params: Vec<(&str, String)> = Vec::with_capacity((4 + self._additional_params.len())); + params.push(("projectId", self._project_id.to_string())); + params.push(("historyId", self._history_id.to_string())); + for &field in ["alt", "projectId", "historyId"].iter() { + if self._additional_params.contains_key(field) { + dlg.finished(false); + return Err(Error::FieldClash(field)); + } + } + for (name, value) in self._additional_params.iter() { + params.push((&name, value.clone())); + } + + params.push(("alt", "json".to_string())); + + let mut url = "https://www.googleapis.com/toolresults/v1beta3/projects/{projectId}/histories/{historyId}".to_string(); + if self._scopes.len() == 0 { + self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); + } + + for &(find_this, param_name) in [("{projectId}", "projectId"), ("{historyId}", "historyId")].iter() { + let mut replace_with: Option<&str> = None; + for &(name, ref value) in params.iter() { + if name == param_name { + replace_with = Some(value); + break; + } + } + url = url.replace(find_this, replace_with.expect("to find substitution value in params")); + } + { + let mut indices_for_removal: Vec = Vec::with_capacity(2); + for param_name in ["historyId", "projectId"].iter() { + if let Some(index) = params.iter().position(|t| &t.0 == param_name) { + indices_for_removal.push(index); + } + } + for &index in indices_for_removal.iter() { + params.remove(index); + } + } + + if params.len() > 0 { + url.push('?'); + url.push_str(&url::form_urlencoded::serialize(params)); + } + + + + loop { + let token = match self.hub.auth.borrow_mut().token(self._scopes.keys()) { + Ok(token) => token, + Err(err) => { + match dlg.token(&*err) { + Some(token) => token, + None => { + dlg.finished(false); + return Err(Error::MissingToken(err)) + } + } + } + }; + let auth_header = Authorization(Bearer { token: token.access_token }); + let mut req_result = { + let mut client = &mut *self.hub.client.borrow_mut(); + let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) + .header(UserAgent(self.hub._user_agent.clone())) + .header(auth_header.clone()); + + dlg.pre_request(); + req.send() + }; + + match req_result { + Err(err) => { + if let oauth2::Retry::After(d) = dlg.http_error(&err) { + sleep(d); + continue; + } + dlg.finished(false); + return Err(Error::HttpError(err)) + } + Ok(mut res) => { + if !res.status.is_success() { + let mut json_err = String::new(); + res.read_to_string(&mut json_err).unwrap(); + if let oauth2::Retry::After(d) = dlg.http_failure(&res, + json::from_str(&json_err).ok(), + json::from_str(&json_err).ok()) { + sleep(d); + continue; + } + dlg.finished(false); + return match json::from_str::(&json_err){ + Err(_) => Err(Error::Failure(res)), + Ok(serr) => Err(Error::BadRequest(serr)) + } + } + let result_value = { + let mut json_response = String::new(); + res.read_to_string(&mut json_response).unwrap(); + match json::from_str(&json_response) { + Ok(decoded) => (res, decoded), + Err(err) => { + dlg.response_json_decode_error(&json_response, &err); + return Err(Error::JsonDecodeError(json_response, err)); + } + } + }; + + dlg.finished(true); + return Ok(result_value) + } + } + } + } + + + /// A Project id. + /// + /// Required. + /// + /// Sets the *project id* path property to the given value. + /// + /// Even though the property as already been set when instantiating this call, + /// we provide this method for API completeness. + pub fn project_id(mut self, new_value: &str) -> ProjectHistoryGetCall<'a, C, A> { + self._project_id = new_value.to_string(); + self + } + /// A History id. + /// + /// Required. + /// + /// Sets the *history id* path property to the given value. + /// + /// Even though the property as already been set when instantiating this call, + /// we provide this method for API completeness. + pub fn history_id(mut self, new_value: &str) -> ProjectHistoryGetCall<'a, C, A> { + self._history_id = new_value.to_string(); + self + } + /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong + /// while executing the actual API request. + /// + /// It should be used to handle progress information, and to implement a certain level of resilience. + /// + /// Sets the *delegate* property to the given value. + pub fn delegate(mut self, new_value: &'a mut Delegate) -> ProjectHistoryGetCall<'a, C, A> { + self._delegate = Some(new_value); + self + } + + /// Set any additional parameter of the query string used in the request. + /// It should be used to set parameters which are not yet available through their own + /// setters. + /// + /// Please note that this method must not be used to set any of the known paramters + /// which have their own setter method. If done anyway, the request will fail. + /// + /// # Additional Parameters + /// + /// * *quotaUser* (query-string) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. Overrides userIp if both are provided. + /// * *oauth_token* (query-string) - OAuth 2.0 token for the current user. + /// * *key* (query-string) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. + /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. + /// * *userIp* (query-string) - IP address of the site where the request originates. Use this if you want to enforce per-user limits. + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *alt* (query-string) - Data format for the response. + pub fn param(mut self, name: T, value: T) -> ProjectHistoryGetCall<'a, C, A> + where T: AsRef { + self._additional_params.insert(name.as_ref().to_string(), value.as_ref().to_string()); + self + } + + /// Identifies the authorization scope for the method you are building. + /// + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::CloudPlatform`. + /// + /// The `scope` will be added to a set of scopes. This is important as one can maintain access + /// tokens for more than one scope. + /// + /// Usually there is more than one suitable scope to authorize an operation, some of which may + /// encompass more rights than others. For example, for listing resources, a *read-only* scope will be + /// sufficient, a read-write scope will do as well. + pub fn add_scope(mut self, scope: T) -> ProjectHistoryGetCall<'a, C, A> + where T: AsRef { + self._scopes.insert(scope.as_ref().to_string(), ()); + self + } +} + + +/// Lists thumbnails of images attached to a step. +/// +/// May return any of the following canonical error codes: - PERMISSION_DENIED - if the user is not authorized to read from the project, or from any of the images - INVALID_ARGUMENT - if the request is malformed - NOT_FOUND - if the step does not exist, or if any of the images do not exist +/// +/// A builder for the *histories.executions.steps.thumbnails.list* method supported by a *project* resource. +/// It is not used directly, but through a `ProjectMethods` instance. +/// +/// # Example +/// +/// Instantiate a resource method builder +/// +/// ```test_harness,no_run +/// # extern crate hyper; +/// # extern crate yup_oauth2 as oauth2; +/// # extern crate google_toolresults1_beta3 as toolresults1_beta3; +/// # #[test] fn egal() { +/// # use std::default::Default; +/// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; +/// # use toolresults1_beta3::ToolResults; +/// +/// # let secret: ApplicationSecret = Default::default(); +/// # let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, +/// # hyper::Client::new(), +/// # ::default(), None); +/// # let mut hub = ToolResults::new(hyper::Client::new(), auth); +/// // You can configure optional parameters by calling the respective setters at will, and +/// // execute the final call using `doit()`. +/// // Values shown here are possibly random and not representative ! +/// let result = hub.projects().histories_executions_steps_thumbnails_list("projectId", "historyId", "executionId", "stepId") +/// .page_token("sadipscing") +/// .page_size(-31) +/// .doit(); +/// # } +/// ``` +pub struct ProjectHistoryExecutionStepThumbnailListCall<'a, C, A> + where C: 'a, A: 'a { + + hub: &'a ToolResults, + _project_id: String, + _history_id: String, + _execution_id: String, + _step_id: String, + _page_token: Option, + _page_size: Option, + _delegate: Option<&'a mut Delegate>, + _additional_params: HashMap, + _scopes: BTreeMap +} + +impl<'a, C, A> CallBuilder for ProjectHistoryExecutionStepThumbnailListCall<'a, C, A> {} + +impl<'a, C, A> ProjectHistoryExecutionStepThumbnailListCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { + + + /// Perform the operation you have build so far. + pub fn doit(mut self) -> Result<(hyper::client::Response, ListStepThumbnailsResponse)> { + use std::io::{Read, Seek}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; + let mut dd = DefaultDelegate; + let mut dlg: &mut Delegate = match self._delegate { + Some(d) => d, + None => &mut dd + }; + dlg.begin(MethodInfo { id: "toolresults.projects.histories.executions.steps.thumbnails.list", + http_method: hyper::method::Method::Get }); + let mut params: Vec<(&str, String)> = Vec::with_capacity((8 + self._additional_params.len())); + params.push(("projectId", self._project_id.to_string())); + params.push(("historyId", self._history_id.to_string())); + params.push(("executionId", self._execution_id.to_string())); + params.push(("stepId", self._step_id.to_string())); + if let Some(value) = self._page_token { + params.push(("pageToken", value.to_string())); + } + if let Some(value) = self._page_size { + params.push(("pageSize", value.to_string())); + } + for &field in ["alt", "projectId", "historyId", "executionId", "stepId", "pageToken", "pageSize"].iter() { + if self._additional_params.contains_key(field) { + dlg.finished(false); + return Err(Error::FieldClash(field)); + } + } + for (name, value) in self._additional_params.iter() { + params.push((&name, value.clone())); + } + + params.push(("alt", "json".to_string())); + + let mut url = "https://www.googleapis.com/toolresults/v1beta3/projects/{projectId}/histories/{historyId}/executions/{executionId}/steps/{stepId}/thumbnails".to_string(); + if self._scopes.len() == 0 { + self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); + } + + for &(find_this, param_name) in [("{projectId}", "projectId"), ("{historyId}", "historyId"), ("{executionId}", "executionId"), ("{stepId}", "stepId")].iter() { + let mut replace_with: Option<&str> = None; + for &(name, ref value) in params.iter() { + if name == param_name { + replace_with = Some(value); + break; + } + } + url = url.replace(find_this, replace_with.expect("to find substitution value in params")); + } + { + let mut indices_for_removal: Vec = Vec::with_capacity(4); + for param_name in ["stepId", "executionId", "historyId", "projectId"].iter() { + if let Some(index) = params.iter().position(|t| &t.0 == param_name) { + indices_for_removal.push(index); + } + } + for &index in indices_for_removal.iter() { + params.remove(index); + } + } + + if params.len() > 0 { + url.push('?'); + url.push_str(&url::form_urlencoded::serialize(params)); + } + + + + loop { + let token = match self.hub.auth.borrow_mut().token(self._scopes.keys()) { + Ok(token) => token, + Err(err) => { + match dlg.token(&*err) { + Some(token) => token, + None => { + dlg.finished(false); + return Err(Error::MissingToken(err)) + } + } + } + }; + let auth_header = Authorization(Bearer { token: token.access_token }); + let mut req_result = { + let mut client = &mut *self.hub.client.borrow_mut(); + let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) + .header(UserAgent(self.hub._user_agent.clone())) + .header(auth_header.clone()); + + dlg.pre_request(); + req.send() + }; + + match req_result { + Err(err) => { + if let oauth2::Retry::After(d) = dlg.http_error(&err) { + sleep(d); + continue; + } + dlg.finished(false); + return Err(Error::HttpError(err)) + } + Ok(mut res) => { + if !res.status.is_success() { + let mut json_err = String::new(); + res.read_to_string(&mut json_err).unwrap(); + if let oauth2::Retry::After(d) = dlg.http_failure(&res, + json::from_str(&json_err).ok(), + json::from_str(&json_err).ok()) { + sleep(d); + continue; + } + dlg.finished(false); + return match json::from_str::(&json_err){ + Err(_) => Err(Error::Failure(res)), + Ok(serr) => Err(Error::BadRequest(serr)) + } + } + let result_value = { + let mut json_response = String::new(); + res.read_to_string(&mut json_response).unwrap(); + match json::from_str(&json_response) { + Ok(decoded) => (res, decoded), + Err(err) => { + dlg.response_json_decode_error(&json_response, &err); + return Err(Error::JsonDecodeError(json_response, err)); + } + } + }; + + dlg.finished(true); + return Ok(result_value) + } + } + } + } + + + /// A Project id. + /// + /// Required. + /// + /// Sets the *project id* path property to the given value. + /// + /// Even though the property as already been set when instantiating this call, + /// we provide this method for API completeness. + pub fn project_id(mut self, new_value: &str) -> ProjectHistoryExecutionStepThumbnailListCall<'a, C, A> { + self._project_id = new_value.to_string(); + self + } + /// A History id. + /// + /// Required. + /// + /// Sets the *history id* path property to the given value. + /// + /// Even though the property as already been set when instantiating this call, + /// we provide this method for API completeness. + pub fn history_id(mut self, new_value: &str) -> ProjectHistoryExecutionStepThumbnailListCall<'a, C, A> { + self._history_id = new_value.to_string(); + self + } + /// An Execution id. + /// + /// Required. + /// + /// Sets the *execution id* path property to the given value. + /// + /// Even though the property as already been set when instantiating this call, + /// we provide this method for API completeness. + pub fn execution_id(mut self, new_value: &str) -> ProjectHistoryExecutionStepThumbnailListCall<'a, C, A> { + self._execution_id = new_value.to_string(); + self + } + /// A Step id. + /// + /// Required. + /// + /// Sets the *step id* path property to the given value. + /// + /// Even though the property as already been set when instantiating this call, + /// we provide this method for API completeness. + pub fn step_id(mut self, new_value: &str) -> ProjectHistoryExecutionStepThumbnailListCall<'a, C, A> { + self._step_id = new_value.to_string(); + self + } + /// A continuation token to resume the query at the next item. + /// + /// Optional. + /// + /// Sets the *page token* query property to the given value. + pub fn page_token(mut self, new_value: &str) -> ProjectHistoryExecutionStepThumbnailListCall<'a, C, A> { + self._page_token = Some(new_value.to_string()); + self + } + /// The maximum number of thumbnails to fetch. + /// + /// Default value: 50. The server will use this default if the field is not set or has a value of 0. + /// + /// Optional. + /// + /// Sets the *page size* query property to the given value. + pub fn page_size(mut self, new_value: i32) -> ProjectHistoryExecutionStepThumbnailListCall<'a, C, A> { + self._page_size = Some(new_value); + self + } + /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong + /// while executing the actual API request. + /// + /// It should be used to handle progress information, and to implement a certain level of resilience. + /// + /// Sets the *delegate* property to the given value. + pub fn delegate(mut self, new_value: &'a mut Delegate) -> ProjectHistoryExecutionStepThumbnailListCall<'a, C, A> { + self._delegate = Some(new_value); + self + } + + /// Set any additional parameter of the query string used in the request. + /// It should be used to set parameters which are not yet available through their own + /// setters. + /// + /// Please note that this method must not be used to set any of the known paramters + /// which have their own setter method. If done anyway, the request will fail. + /// + /// # Additional Parameters + /// + /// * *quotaUser* (query-string) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. Overrides userIp if both are provided. + /// * *oauth_token* (query-string) - OAuth 2.0 token for the current user. + /// * *key* (query-string) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. + /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. + /// * *userIp* (query-string) - IP address of the site where the request originates. Use this if you want to enforce per-user limits. + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *alt* (query-string) - Data format for the response. + pub fn param(mut self, name: T, value: T) -> ProjectHistoryExecutionStepThumbnailListCall<'a, C, A> + where T: AsRef { + self._additional_params.insert(name.as_ref().to_string(), value.as_ref().to_string()); + self + } + + /// Identifies the authorization scope for the method you are building. + /// + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::CloudPlatform`. + /// + /// The `scope` will be added to a set of scopes. This is important as one can maintain access + /// tokens for more than one scope. + /// + /// Usually there is more than one suitable scope to authorize an operation, some of which may + /// encompass more rights than others. For example, for listing resources, a *read-only* scope will be + /// sufficient, a read-write scope will do as well. + pub fn add_scope(mut self, scope: T) -> ProjectHistoryExecutionStepThumbnailListCall<'a, C, A> + where T: AsRef { + self._scopes.insert(scope.as_ref().to_string(), ()); + self + } +} + + +/// Gets an Execution. +/// +/// May return any of the following canonical error codes: +/// +/// - PERMISSION_DENIED - if the user is not authorized to write to project - INVALID_ARGUMENT - if the request is malformed - NOT_FOUND - if the Execution does not exist +/// +/// A builder for the *histories.executions.get* method supported by a *project* resource. +/// It is not used directly, but through a `ProjectMethods` instance. +/// +/// # Example +/// +/// Instantiate a resource method builder +/// +/// ```test_harness,no_run +/// # extern crate hyper; +/// # extern crate yup_oauth2 as oauth2; +/// # extern crate google_toolresults1_beta3 as toolresults1_beta3; +/// # #[test] fn egal() { +/// # use std::default::Default; +/// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; +/// # use toolresults1_beta3::ToolResults; +/// +/// # let secret: ApplicationSecret = Default::default(); +/// # let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, +/// # hyper::Client::new(), +/// # ::default(), None); +/// # let mut hub = ToolResults::new(hyper::Client::new(), auth); +/// // You can configure optional parameters by calling the respective setters at will, and +/// // execute the final call using `doit()`. +/// // Values shown here are possibly random and not representative ! +/// let result = hub.projects().histories_executions_get("projectId", "historyId", "executionId") +/// .doit(); +/// # } +/// ``` +pub struct ProjectHistoryExecutionGetCall<'a, C, A> + where C: 'a, A: 'a { + + hub: &'a ToolResults, + _project_id: String, + _history_id: String, + _execution_id: String, + _delegate: Option<&'a mut Delegate>, + _additional_params: HashMap, + _scopes: BTreeMap +} + +impl<'a, C, A> CallBuilder for ProjectHistoryExecutionGetCall<'a, C, A> {} + +impl<'a, C, A> ProjectHistoryExecutionGetCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { + + + /// Perform the operation you have build so far. + pub fn doit(mut self) -> Result<(hyper::client::Response, Execution)> { + use std::io::{Read, Seek}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; + let mut dd = DefaultDelegate; + let mut dlg: &mut Delegate = match self._delegate { + Some(d) => d, + None => &mut dd + }; + dlg.begin(MethodInfo { id: "toolresults.projects.histories.executions.get", + http_method: hyper::method::Method::Get }); + let mut params: Vec<(&str, String)> = Vec::with_capacity((5 + self._additional_params.len())); + params.push(("projectId", self._project_id.to_string())); + params.push(("historyId", self._history_id.to_string())); + params.push(("executionId", self._execution_id.to_string())); + for &field in ["alt", "projectId", "historyId", "executionId"].iter() { + if self._additional_params.contains_key(field) { + dlg.finished(false); + return Err(Error::FieldClash(field)); + } + } + for (name, value) in self._additional_params.iter() { + params.push((&name, value.clone())); + } + + params.push(("alt", "json".to_string())); + + let mut url = "https://www.googleapis.com/toolresults/v1beta3/projects/{projectId}/histories/{historyId}/executions/{executionId}".to_string(); + if self._scopes.len() == 0 { + self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); + } + + for &(find_this, param_name) in [("{projectId}", "projectId"), ("{historyId}", "historyId"), ("{executionId}", "executionId")].iter() { + let mut replace_with: Option<&str> = None; + for &(name, ref value) in params.iter() { + if name == param_name { + replace_with = Some(value); + break; + } + } + url = url.replace(find_this, replace_with.expect("to find substitution value in params")); + } + { + let mut indices_for_removal: Vec = Vec::with_capacity(3); + for param_name in ["executionId", "historyId", "projectId"].iter() { + if let Some(index) = params.iter().position(|t| &t.0 == param_name) { + indices_for_removal.push(index); + } + } + for &index in indices_for_removal.iter() { + params.remove(index); + } + } + + if params.len() > 0 { + url.push('?'); + url.push_str(&url::form_urlencoded::serialize(params)); + } + + + + loop { + let token = match self.hub.auth.borrow_mut().token(self._scopes.keys()) { + Ok(token) => token, + Err(err) => { + match dlg.token(&*err) { + Some(token) => token, + None => { + dlg.finished(false); + return Err(Error::MissingToken(err)) + } + } + } + }; + let auth_header = Authorization(Bearer { token: token.access_token }); + let mut req_result = { + let mut client = &mut *self.hub.client.borrow_mut(); + let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) + .header(UserAgent(self.hub._user_agent.clone())) + .header(auth_header.clone()); + + dlg.pre_request(); + req.send() + }; + + match req_result { + Err(err) => { + if let oauth2::Retry::After(d) = dlg.http_error(&err) { + sleep(d); + continue; + } + dlg.finished(false); + return Err(Error::HttpError(err)) + } + Ok(mut res) => { + if !res.status.is_success() { + let mut json_err = String::new(); + res.read_to_string(&mut json_err).unwrap(); + if let oauth2::Retry::After(d) = dlg.http_failure(&res, + json::from_str(&json_err).ok(), + json::from_str(&json_err).ok()) { + sleep(d); + continue; + } + dlg.finished(false); + return match json::from_str::(&json_err){ + Err(_) => Err(Error::Failure(res)), + Ok(serr) => Err(Error::BadRequest(serr)) + } + } + let result_value = { + let mut json_response = String::new(); + res.read_to_string(&mut json_response).unwrap(); + match json::from_str(&json_response) { + Ok(decoded) => (res, decoded), + Err(err) => { + dlg.response_json_decode_error(&json_response, &err); + return Err(Error::JsonDecodeError(json_response, err)); + } + } + }; + + dlg.finished(true); + return Ok(result_value) + } + } + } + } + + + /// A Project id. + /// + /// Required. + /// + /// Sets the *project id* path property to the given value. + /// + /// Even though the property as already been set when instantiating this call, + /// we provide this method for API completeness. + pub fn project_id(mut self, new_value: &str) -> ProjectHistoryExecutionGetCall<'a, C, A> { + self._project_id = new_value.to_string(); + self + } + /// A History id. + /// + /// Required. + /// + /// Sets the *history id* path property to the given value. + /// + /// Even though the property as already been set when instantiating this call, + /// we provide this method for API completeness. + pub fn history_id(mut self, new_value: &str) -> ProjectHistoryExecutionGetCall<'a, C, A> { + self._history_id = new_value.to_string(); + self + } + /// An Execution id. + /// + /// Required. + /// + /// Sets the *execution id* path property to the given value. + /// + /// Even though the property as already been set when instantiating this call, + /// we provide this method for API completeness. + pub fn execution_id(mut self, new_value: &str) -> ProjectHistoryExecutionGetCall<'a, C, A> { + self._execution_id = new_value.to_string(); + self + } + /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong + /// while executing the actual API request. + /// + /// It should be used to handle progress information, and to implement a certain level of resilience. + /// + /// Sets the *delegate* property to the given value. + pub fn delegate(mut self, new_value: &'a mut Delegate) -> ProjectHistoryExecutionGetCall<'a, C, A> { + self._delegate = Some(new_value); + self + } + + /// Set any additional parameter of the query string used in the request. + /// It should be used to set parameters which are not yet available through their own + /// setters. + /// + /// Please note that this method must not be used to set any of the known paramters + /// which have their own setter method. If done anyway, the request will fail. + /// + /// # Additional Parameters + /// + /// * *quotaUser* (query-string) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. Overrides userIp if both are provided. + /// * *oauth_token* (query-string) - OAuth 2.0 token for the current user. + /// * *key* (query-string) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. + /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. + /// * *userIp* (query-string) - IP address of the site where the request originates. Use this if you want to enforce per-user limits. + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *alt* (query-string) - Data format for the response. + pub fn param(mut self, name: T, value: T) -> ProjectHistoryExecutionGetCall<'a, C, A> + where T: AsRef { + self._additional_params.insert(name.as_ref().to_string(), value.as_ref().to_string()); + self + } + + /// Identifies the authorization scope for the method you are building. + /// + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::CloudPlatform`. + /// + /// The `scope` will be added to a set of scopes. This is important as one can maintain access + /// tokens for more than one scope. + /// + /// Usually there is more than one suitable scope to authorize an operation, some of which may + /// encompass more rights than others. For example, for listing resources, a *read-only* scope will be + /// sufficient, a read-write scope will do as well. + pub fn add_scope(mut self, scope: T) -> ProjectHistoryExecutionGetCall<'a, C, A> + where T: AsRef { + self._scopes.insert(scope.as_ref().to_string(), ()); + self + } +} + + +/// Updates an existing Execution with the supplied partial entity. +/// +/// May return any of the following canonical error codes: +/// +/// - PERMISSION_DENIED - if the user is not authorized to write to project - INVALID_ARGUMENT - if the request is malformed - FAILED_PRECONDITION - if the requested state transition is illegal - NOT_FOUND - if the containing History does not exist +/// +/// A builder for the *histories.executions.patch* method supported by a *project* resource. +/// It is not used directly, but through a `ProjectMethods` instance. +/// +/// # Example +/// +/// Instantiate a resource method builder +/// +/// ```test_harness,no_run +/// # extern crate hyper; +/// # extern crate yup_oauth2 as oauth2; +/// # extern crate google_toolresults1_beta3 as toolresults1_beta3; +/// use toolresults1_beta3::Execution; +/// # #[test] fn egal() { +/// # use std::default::Default; +/// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; +/// # use toolresults1_beta3::ToolResults; +/// +/// # let secret: ApplicationSecret = Default::default(); +/// # let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, +/// # hyper::Client::new(), +/// # ::default(), None); +/// # let mut hub = ToolResults::new(hyper::Client::new(), auth); +/// // As the method needs a request, you would usually fill it with the desired information +/// // into the respective structure. Some of the parts shown here might not be applicable ! +/// // Values shown here are possibly random and not representative ! +/// let mut req = Execution::default(); +/// +/// // You can configure optional parameters by calling the respective setters at will, and +/// // execute the final call using `doit()`. +/// // Values shown here are possibly random and not representative ! +/// let result = hub.projects().histories_executions_patch(req, "projectId", "historyId", "executionId") +/// .request_id("diam") +/// .doit(); +/// # } +/// ``` +pub struct ProjectHistoryExecutionPatchCall<'a, C, A> + where C: 'a, A: 'a { + + hub: &'a ToolResults, + _request: Execution, + _project_id: String, + _history_id: String, + _execution_id: String, + _request_id: Option, + _delegate: Option<&'a mut Delegate>, + _additional_params: HashMap, + _scopes: BTreeMap +} + +impl<'a, C, A> CallBuilder for ProjectHistoryExecutionPatchCall<'a, C, A> {} + +impl<'a, C, A> ProjectHistoryExecutionPatchCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { + + + /// Perform the operation you have build so far. + pub fn doit(mut self) -> Result<(hyper::client::Response, Execution)> { + use std::io::{Read, Seek}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; + let mut dd = DefaultDelegate; + let mut dlg: &mut Delegate = match self._delegate { + Some(d) => d, + None => &mut dd + }; + dlg.begin(MethodInfo { id: "toolresults.projects.histories.executions.patch", + http_method: hyper::method::Method::Patch }); + let mut params: Vec<(&str, String)> = Vec::with_capacity((7 + self._additional_params.len())); + params.push(("projectId", self._project_id.to_string())); + params.push(("historyId", self._history_id.to_string())); + params.push(("executionId", self._execution_id.to_string())); + if let Some(value) = self._request_id { + params.push(("requestId", value.to_string())); + } + for &field in ["alt", "projectId", "historyId", "executionId", "requestId"].iter() { + if self._additional_params.contains_key(field) { + dlg.finished(false); + return Err(Error::FieldClash(field)); + } + } + for (name, value) in self._additional_params.iter() { + params.push((&name, value.clone())); + } + + params.push(("alt", "json".to_string())); + + let mut url = "https://www.googleapis.com/toolresults/v1beta3/projects/{projectId}/histories/{historyId}/executions/{executionId}".to_string(); + if self._scopes.len() == 0 { + self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); + } + + for &(find_this, param_name) in [("{projectId}", "projectId"), ("{historyId}", "historyId"), ("{executionId}", "executionId")].iter() { + let mut replace_with: Option<&str> = None; + for &(name, ref value) in params.iter() { + if name == param_name { + replace_with = Some(value); + break; + } + } + url = url.replace(find_this, replace_with.expect("to find substitution value in params")); + } + { + let mut indices_for_removal: Vec = Vec::with_capacity(3); + for param_name in ["executionId", "historyId", "projectId"].iter() { + if let Some(index) = params.iter().position(|t| &t.0 == param_name) { + indices_for_removal.push(index); + } + } + for &index in indices_for_removal.iter() { + params.remove(index); + } + } + + if params.len() > 0 { + url.push('?'); + url.push_str(&url::form_urlencoded::serialize(params)); + } + + let mut json_mime_type = mime::Mime(mime::TopLevel::Application, mime::SubLevel::Json, Default::default()); + let mut request_value_reader = + { + let mut value = json::value::to_value(&self._request); + remove_json_null_values(&mut value); + let mut dst = io::Cursor::new(Vec::with_capacity(128)); + json::to_writer(&mut dst, &value).unwrap(); + dst + }; + let request_size = request_value_reader.seek(io::SeekFrom::End(0)).unwrap(); + request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); + + + loop { + let token = match self.hub.auth.borrow_mut().token(self._scopes.keys()) { + Ok(token) => token, + Err(err) => { + match dlg.token(&*err) { + Some(token) => token, + None => { + dlg.finished(false); + return Err(Error::MissingToken(err)) + } + } + } + }; + let auth_header = Authorization(Bearer { token: token.access_token }); + request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); + let mut req_result = { + let mut client = &mut *self.hub.client.borrow_mut(); + let mut req = client.borrow_mut().request(hyper::method::Method::Patch, &url) + .header(UserAgent(self.hub._user_agent.clone())) + .header(auth_header.clone()) + .header(ContentType(json_mime_type.clone())) + .header(ContentLength(request_size as u64)) + .body(&mut request_value_reader); + + dlg.pre_request(); + req.send() + }; + + match req_result { + Err(err) => { + if let oauth2::Retry::After(d) = dlg.http_error(&err) { + sleep(d); + continue; + } + dlg.finished(false); + return Err(Error::HttpError(err)) + } + Ok(mut res) => { + if !res.status.is_success() { + let mut json_err = String::new(); + res.read_to_string(&mut json_err).unwrap(); + if let oauth2::Retry::After(d) = dlg.http_failure(&res, + json::from_str(&json_err).ok(), + json::from_str(&json_err).ok()) { + sleep(d); + continue; + } + dlg.finished(false); + return match json::from_str::(&json_err){ + Err(_) => Err(Error::Failure(res)), + Ok(serr) => Err(Error::BadRequest(serr)) + } + } + let result_value = { + let mut json_response = String::new(); + res.read_to_string(&mut json_response).unwrap(); + match json::from_str(&json_response) { + Ok(decoded) => (res, decoded), + Err(err) => { + dlg.response_json_decode_error(&json_response, &err); + return Err(Error::JsonDecodeError(json_response, err)); + } + } + }; + + dlg.finished(true); + return Ok(result_value) + } + } + } + } + + + /// + /// Sets the *request* property to the given value. + /// + /// Even though the property as already been set when instantiating this call, + /// we provide this method for API completeness. + pub fn request(mut self, new_value: Execution) -> ProjectHistoryExecutionPatchCall<'a, C, A> { + self._request = new_value; + self + } + /// A Project id. Required. + /// + /// Sets the *project id* path property to the given value. + /// + /// Even though the property as already been set when instantiating this call, + /// we provide this method for API completeness. + pub fn project_id(mut self, new_value: &str) -> ProjectHistoryExecutionPatchCall<'a, C, A> { + self._project_id = new_value.to_string(); + self + } + /// Required. + /// + /// Sets the *history id* path property to the given value. + /// + /// Even though the property as already been set when instantiating this call, + /// we provide this method for API completeness. + pub fn history_id(mut self, new_value: &str) -> ProjectHistoryExecutionPatchCall<'a, C, A> { + self._history_id = new_value.to_string(); + self + } + /// Required. + /// + /// Sets the *execution id* path property to the given value. + /// + /// Even though the property as already been set when instantiating this call, + /// we provide this method for API completeness. + pub fn execution_id(mut self, new_value: &str) -> ProjectHistoryExecutionPatchCall<'a, C, A> { + self._execution_id = new_value.to_string(); + self + } + /// A unique request ID for server to detect duplicated requests. For example, a UUID. + /// + /// Optional, but strongly recommended. + /// + /// Sets the *request id* query property to the given value. + pub fn request_id(mut self, new_value: &str) -> ProjectHistoryExecutionPatchCall<'a, C, A> { + self._request_id = Some(new_value.to_string()); + self + } + /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong + /// while executing the actual API request. + /// + /// It should be used to handle progress information, and to implement a certain level of resilience. + /// + /// Sets the *delegate* property to the given value. + pub fn delegate(mut self, new_value: &'a mut Delegate) -> ProjectHistoryExecutionPatchCall<'a, C, A> { + self._delegate = Some(new_value); + self + } + + /// Set any additional parameter of the query string used in the request. + /// It should be used to set parameters which are not yet available through their own + /// setters. + /// + /// Please note that this method must not be used to set any of the known paramters + /// which have their own setter method. If done anyway, the request will fail. + /// + /// # Additional Parameters + /// + /// * *quotaUser* (query-string) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. Overrides userIp if both are provided. + /// * *oauth_token* (query-string) - OAuth 2.0 token for the current user. + /// * *key* (query-string) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. + /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. + /// * *userIp* (query-string) - IP address of the site where the request originates. Use this if you want to enforce per-user limits. + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *alt* (query-string) - Data format for the response. + pub fn param(mut self, name: T, value: T) -> ProjectHistoryExecutionPatchCall<'a, C, A> + where T: AsRef { + self._additional_params.insert(name.as_ref().to_string(), value.as_ref().to_string()); + self + } + + /// Identifies the authorization scope for the method you are building. + /// + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::CloudPlatform`. + /// + /// The `scope` will be added to a set of scopes. This is important as one can maintain access + /// tokens for more than one scope. + /// + /// Usually there is more than one suitable scope to authorize an operation, some of which may + /// encompass more rights than others. For example, for listing resources, a *read-only* scope will be + /// sufficient, a read-write scope will do as well. + pub fn add_scope(mut self, scope: T) -> ProjectHistoryExecutionPatchCall<'a, C, A> + where T: AsRef { + self._scopes.insert(scope.as_ref().to_string(), ()); + self + } +} + + +/// Lists Histories for a given Project. +/// +/// The histories are sorted by modification time in descending order. The history_id key will be used to order the history with the same modification time. +/// +/// May return any of the following canonical error codes: +/// +/// - PERMISSION_DENIED - if the user is not authorized to read project - INVALID_ARGUMENT - if the request is malformed - NOT_FOUND - if the History does not exist +/// +/// A builder for the *histories.list* method supported by a *project* resource. +/// It is not used directly, but through a `ProjectMethods` instance. +/// +/// # Example +/// +/// Instantiate a resource method builder +/// +/// ```test_harness,no_run +/// # extern crate hyper; +/// # extern crate yup_oauth2 as oauth2; +/// # extern crate google_toolresults1_beta3 as toolresults1_beta3; +/// # #[test] fn egal() { +/// # use std::default::Default; +/// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; +/// # use toolresults1_beta3::ToolResults; +/// +/// # let secret: ApplicationSecret = Default::default(); +/// # let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, +/// # hyper::Client::new(), +/// # ::default(), None); +/// # let mut hub = ToolResults::new(hyper::Client::new(), auth); +/// // You can configure optional parameters by calling the respective setters at will, and +/// // execute the final call using `doit()`. +/// // Values shown here are possibly random and not representative ! +/// let result = hub.projects().histories_list("projectId") +/// .page_token("Lorem") +/// .page_size(-21) +/// .filter_by_name("duo") +/// .doit(); +/// # } +/// ``` +pub struct ProjectHistoryListCall<'a, C, A> + where C: 'a, A: 'a { + + hub: &'a ToolResults, + _project_id: String, + _page_token: Option, + _page_size: Option, + _filter_by_name: Option, + _delegate: Option<&'a mut Delegate>, + _additional_params: HashMap, + _scopes: BTreeMap +} + +impl<'a, C, A> CallBuilder for ProjectHistoryListCall<'a, C, A> {} + +impl<'a, C, A> ProjectHistoryListCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { + + + /// Perform the operation you have build so far. + pub fn doit(mut self) -> Result<(hyper::client::Response, ListHistoriesResponse)> { + use std::io::{Read, Seek}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; + let mut dd = DefaultDelegate; + let mut dlg: &mut Delegate = match self._delegate { + Some(d) => d, + None => &mut dd + }; + dlg.begin(MethodInfo { id: "toolresults.projects.histories.list", + http_method: hyper::method::Method::Get }); + let mut params: Vec<(&str, String)> = Vec::with_capacity((6 + self._additional_params.len())); + params.push(("projectId", self._project_id.to_string())); + if let Some(value) = self._page_token { + params.push(("pageToken", value.to_string())); + } + if let Some(value) = self._page_size { + params.push(("pageSize", value.to_string())); + } + if let Some(value) = self._filter_by_name { + params.push(("filterByName", value.to_string())); + } + for &field in ["alt", "projectId", "pageToken", "pageSize", "filterByName"].iter() { + if self._additional_params.contains_key(field) { + dlg.finished(false); + return Err(Error::FieldClash(field)); + } + } + for (name, value) in self._additional_params.iter() { + params.push((&name, value.clone())); + } + + params.push(("alt", "json".to_string())); + + let mut url = "https://www.googleapis.com/toolresults/v1beta3/projects/{projectId}/histories".to_string(); + if self._scopes.len() == 0 { + self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); + } + + for &(find_this, param_name) in [("{projectId}", "projectId")].iter() { + let mut replace_with: Option<&str> = None; + for &(name, ref value) in params.iter() { + if name == param_name { + replace_with = Some(value); + break; + } + } + url = url.replace(find_this, replace_with.expect("to find substitution value in params")); + } + { + let mut indices_for_removal: Vec = Vec::with_capacity(1); + for param_name in ["projectId"].iter() { + if let Some(index) = params.iter().position(|t| &t.0 == param_name) { + indices_for_removal.push(index); + } + } + for &index in indices_for_removal.iter() { + params.remove(index); + } + } + + if params.len() > 0 { + url.push('?'); + url.push_str(&url::form_urlencoded::serialize(params)); + } + + + + loop { + let token = match self.hub.auth.borrow_mut().token(self._scopes.keys()) { + Ok(token) => token, + Err(err) => { + match dlg.token(&*err) { + Some(token) => token, + None => { + dlg.finished(false); + return Err(Error::MissingToken(err)) + } + } + } + }; + let auth_header = Authorization(Bearer { token: token.access_token }); + let mut req_result = { + let mut client = &mut *self.hub.client.borrow_mut(); + let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) + .header(UserAgent(self.hub._user_agent.clone())) + .header(auth_header.clone()); + + dlg.pre_request(); + req.send() + }; + + match req_result { + Err(err) => { + if let oauth2::Retry::After(d) = dlg.http_error(&err) { + sleep(d); + continue; + } + dlg.finished(false); + return Err(Error::HttpError(err)) + } + Ok(mut res) => { + if !res.status.is_success() { + let mut json_err = String::new(); + res.read_to_string(&mut json_err).unwrap(); + if let oauth2::Retry::After(d) = dlg.http_failure(&res, + json::from_str(&json_err).ok(), + json::from_str(&json_err).ok()) { + sleep(d); + continue; + } + dlg.finished(false); + return match json::from_str::(&json_err){ + Err(_) => Err(Error::Failure(res)), + Ok(serr) => Err(Error::BadRequest(serr)) + } + } + let result_value = { + let mut json_response = String::new(); + res.read_to_string(&mut json_response).unwrap(); + match json::from_str(&json_response) { + Ok(decoded) => (res, decoded), + Err(err) => { + dlg.response_json_decode_error(&json_response, &err); + return Err(Error::JsonDecodeError(json_response, err)); + } + } + }; + + dlg.finished(true); + return Ok(result_value) + } + } + } + } + + + /// A Project id. + /// + /// Required. + /// + /// Sets the *project id* path property to the given value. + /// + /// Even though the property as already been set when instantiating this call, + /// we provide this method for API completeness. + pub fn project_id(mut self, new_value: &str) -> ProjectHistoryListCall<'a, C, A> { + self._project_id = new_value.to_string(); + self + } + /// A continuation token to resume the query at the next item. + /// + /// Optional. + /// + /// Sets the *page token* query property to the given value. + pub fn page_token(mut self, new_value: &str) -> ProjectHistoryListCall<'a, C, A> { + self._page_token = Some(new_value.to_string()); + self + } + /// The maximum number of Histories to fetch. + /// + /// Default value: 20. The server will use this default if the field is not set or has a value of 0. Any value greater than 100 will be treated as 100. + /// + /// Optional. + /// + /// Sets the *page size* query property to the given value. + pub fn page_size(mut self, new_value: i32) -> ProjectHistoryListCall<'a, C, A> { + self._page_size = Some(new_value); + self + } + /// If set, only return histories with the given name. + /// + /// Optional. + /// + /// Sets the *filter by name* query property to the given value. + pub fn filter_by_name(mut self, new_value: &str) -> ProjectHistoryListCall<'a, C, A> { + self._filter_by_name = Some(new_value.to_string()); + self + } + /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong + /// while executing the actual API request. + /// + /// It should be used to handle progress information, and to implement a certain level of resilience. + /// + /// Sets the *delegate* property to the given value. + pub fn delegate(mut self, new_value: &'a mut Delegate) -> ProjectHistoryListCall<'a, C, A> { + self._delegate = Some(new_value); + self + } + + /// Set any additional parameter of the query string used in the request. + /// It should be used to set parameters which are not yet available through their own + /// setters. + /// + /// Please note that this method must not be used to set any of the known paramters + /// which have their own setter method. If done anyway, the request will fail. + /// + /// # Additional Parameters + /// + /// * *quotaUser* (query-string) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. Overrides userIp if both are provided. + /// * *oauth_token* (query-string) - OAuth 2.0 token for the current user. + /// * *key* (query-string) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. + /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. + /// * *userIp* (query-string) - IP address of the site where the request originates. Use this if you want to enforce per-user limits. + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *alt* (query-string) - Data format for the response. + pub fn param(mut self, name: T, value: T) -> ProjectHistoryListCall<'a, C, A> + where T: AsRef { + self._additional_params.insert(name.as_ref().to_string(), value.as_ref().to_string()); + self + } + + /// Identifies the authorization scope for the method you are building. + /// + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::CloudPlatform`. + /// + /// The `scope` will be added to a set of scopes. This is important as one can maintain access + /// tokens for more than one scope. + /// + /// Usually there is more than one suitable scope to authorize an operation, some of which may + /// encompass more rights than others. For example, for listing resources, a *read-only* scope will be + /// sufficient, a read-write scope will do as well. + pub fn add_scope(mut self, scope: T) -> ProjectHistoryListCall<'a, C, A> + where T: AsRef { + self._scopes.insert(scope.as_ref().to_string(), ()); + self + } +} + + +/// Gets a Step. +/// +/// May return any of the following canonical error codes: +/// +/// - PERMISSION_DENIED - if the user is not authorized to read project - INVALID_ARGUMENT - if the request is malformed - NOT_FOUND - if the Step does not exist +/// +/// A builder for the *histories.executions.steps.get* method supported by a *project* resource. +/// It is not used directly, but through a `ProjectMethods` instance. +/// +/// # Example +/// +/// Instantiate a resource method builder +/// +/// ```test_harness,no_run +/// # extern crate hyper; +/// # extern crate yup_oauth2 as oauth2; +/// # extern crate google_toolresults1_beta3 as toolresults1_beta3; +/// # #[test] fn egal() { +/// # use std::default::Default; +/// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; +/// # use toolresults1_beta3::ToolResults; +/// +/// # let secret: ApplicationSecret = Default::default(); +/// # let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, +/// # hyper::Client::new(), +/// # ::default(), None); +/// # let mut hub = ToolResults::new(hyper::Client::new(), auth); +/// // You can configure optional parameters by calling the respective setters at will, and +/// // execute the final call using `doit()`. +/// // Values shown here are possibly random and not representative ! +/// let result = hub.projects().histories_executions_steps_get("projectId", "historyId", "executionId", "stepId") +/// .doit(); +/// # } +/// ``` +pub struct ProjectHistoryExecutionStepGetCall<'a, C, A> + where C: 'a, A: 'a { + + hub: &'a ToolResults, + _project_id: String, + _history_id: String, + _execution_id: String, + _step_id: String, + _delegate: Option<&'a mut Delegate>, + _additional_params: HashMap, + _scopes: BTreeMap +} + +impl<'a, C, A> CallBuilder for ProjectHistoryExecutionStepGetCall<'a, C, A> {} + +impl<'a, C, A> ProjectHistoryExecutionStepGetCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { + + + /// Perform the operation you have build so far. + pub fn doit(mut self) -> Result<(hyper::client::Response, Step)> { + use std::io::{Read, Seek}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; + let mut dd = DefaultDelegate; + let mut dlg: &mut Delegate = match self._delegate { + Some(d) => d, + None => &mut dd + }; + dlg.begin(MethodInfo { id: "toolresults.projects.histories.executions.steps.get", + http_method: hyper::method::Method::Get }); + let mut params: Vec<(&str, String)> = Vec::with_capacity((6 + self._additional_params.len())); + params.push(("projectId", self._project_id.to_string())); + params.push(("historyId", self._history_id.to_string())); + params.push(("executionId", self._execution_id.to_string())); + params.push(("stepId", self._step_id.to_string())); + for &field in ["alt", "projectId", "historyId", "executionId", "stepId"].iter() { + if self._additional_params.contains_key(field) { + dlg.finished(false); + return Err(Error::FieldClash(field)); + } + } + for (name, value) in self._additional_params.iter() { + params.push((&name, value.clone())); + } + + params.push(("alt", "json".to_string())); + + let mut url = "https://www.googleapis.com/toolresults/v1beta3/projects/{projectId}/histories/{historyId}/executions/{executionId}/steps/{stepId}".to_string(); + if self._scopes.len() == 0 { + self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); + } + + for &(find_this, param_name) in [("{projectId}", "projectId"), ("{historyId}", "historyId"), ("{executionId}", "executionId"), ("{stepId}", "stepId")].iter() { + let mut replace_with: Option<&str> = None; + for &(name, ref value) in params.iter() { + if name == param_name { + replace_with = Some(value); + break; + } + } + url = url.replace(find_this, replace_with.expect("to find substitution value in params")); + } + { + let mut indices_for_removal: Vec = Vec::with_capacity(4); + for param_name in ["stepId", "executionId", "historyId", "projectId"].iter() { + if let Some(index) = params.iter().position(|t| &t.0 == param_name) { + indices_for_removal.push(index); + } + } + for &index in indices_for_removal.iter() { + params.remove(index); + } + } + + if params.len() > 0 { + url.push('?'); + url.push_str(&url::form_urlencoded::serialize(params)); + } + + + + loop { + let token = match self.hub.auth.borrow_mut().token(self._scopes.keys()) { + Ok(token) => token, + Err(err) => { + match dlg.token(&*err) { + Some(token) => token, + None => { + dlg.finished(false); + return Err(Error::MissingToken(err)) + } + } + } + }; + let auth_header = Authorization(Bearer { token: token.access_token }); + let mut req_result = { + let mut client = &mut *self.hub.client.borrow_mut(); + let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) + .header(UserAgent(self.hub._user_agent.clone())) + .header(auth_header.clone()); + + dlg.pre_request(); + req.send() + }; + + match req_result { + Err(err) => { + if let oauth2::Retry::After(d) = dlg.http_error(&err) { + sleep(d); + continue; + } + dlg.finished(false); + return Err(Error::HttpError(err)) + } + Ok(mut res) => { + if !res.status.is_success() { + let mut json_err = String::new(); + res.read_to_string(&mut json_err).unwrap(); + if let oauth2::Retry::After(d) = dlg.http_failure(&res, + json::from_str(&json_err).ok(), + json::from_str(&json_err).ok()) { + sleep(d); + continue; + } + dlg.finished(false); + return match json::from_str::(&json_err){ + Err(_) => Err(Error::Failure(res)), + Ok(serr) => Err(Error::BadRequest(serr)) + } + } + let result_value = { + let mut json_response = String::new(); + res.read_to_string(&mut json_response).unwrap(); + match json::from_str(&json_response) { + Ok(decoded) => (res, decoded), + Err(err) => { + dlg.response_json_decode_error(&json_response, &err); + return Err(Error::JsonDecodeError(json_response, err)); + } + } + }; + + dlg.finished(true); + return Ok(result_value) + } + } + } + } + + + /// A Project id. + /// + /// Required. + /// + /// Sets the *project id* path property to the given value. + /// + /// Even though the property as already been set when instantiating this call, + /// we provide this method for API completeness. + pub fn project_id(mut self, new_value: &str) -> ProjectHistoryExecutionStepGetCall<'a, C, A> { + self._project_id = new_value.to_string(); + self + } + /// A History id. + /// + /// Required. + /// + /// Sets the *history id* path property to the given value. + /// + /// Even though the property as already been set when instantiating this call, + /// we provide this method for API completeness. + pub fn history_id(mut self, new_value: &str) -> ProjectHistoryExecutionStepGetCall<'a, C, A> { + self._history_id = new_value.to_string(); + self + } + /// A Execution id. + /// + /// Required. + /// + /// Sets the *execution id* path property to the given value. + /// + /// Even though the property as already been set when instantiating this call, + /// we provide this method for API completeness. + pub fn execution_id(mut self, new_value: &str) -> ProjectHistoryExecutionStepGetCall<'a, C, A> { + self._execution_id = new_value.to_string(); + self + } + /// A Step id. + /// + /// Required. + /// + /// Sets the *step id* path property to the given value. + /// + /// Even though the property as already been set when instantiating this call, + /// we provide this method for API completeness. + pub fn step_id(mut self, new_value: &str) -> ProjectHistoryExecutionStepGetCall<'a, C, A> { + self._step_id = new_value.to_string(); + self + } + /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong + /// while executing the actual API request. + /// + /// It should be used to handle progress information, and to implement a certain level of resilience. + /// + /// Sets the *delegate* property to the given value. + pub fn delegate(mut self, new_value: &'a mut Delegate) -> ProjectHistoryExecutionStepGetCall<'a, C, A> { + self._delegate = Some(new_value); + self + } + + /// Set any additional parameter of the query string used in the request. + /// It should be used to set parameters which are not yet available through their own + /// setters. + /// + /// Please note that this method must not be used to set any of the known paramters + /// which have their own setter method. If done anyway, the request will fail. + /// + /// # Additional Parameters + /// + /// * *quotaUser* (query-string) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. Overrides userIp if both are provided. + /// * *oauth_token* (query-string) - OAuth 2.0 token for the current user. + /// * *key* (query-string) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. + /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. + /// * *userIp* (query-string) - IP address of the site where the request originates. Use this if you want to enforce per-user limits. + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *alt* (query-string) - Data format for the response. + pub fn param(mut self, name: T, value: T) -> ProjectHistoryExecutionStepGetCall<'a, C, A> + where T: AsRef { + self._additional_params.insert(name.as_ref().to_string(), value.as_ref().to_string()); + self + } + + /// Identifies the authorization scope for the method you are building. + /// + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::CloudPlatform`. + /// + /// The `scope` will be added to a set of scopes. This is important as one can maintain access + /// tokens for more than one scope. + /// + /// Usually there is more than one suitable scope to authorize an operation, some of which may + /// encompass more rights than others. For example, for listing resources, a *read-only* scope will be + /// sufficient, a read-write scope will do as well. + pub fn add_scope(mut self, scope: T) -> ProjectHistoryExecutionStepGetCall<'a, C, A> + where T: AsRef { + self._scopes.insert(scope.as_ref().to_string(), ()); + self + } +} + + +/// Publish xml files to an existing Step. +/// +/// May return any of the following canonical error codes: +/// +/// - PERMISSION_DENIED - if the user is not authorized to write project - INVALID_ARGUMENT - if the request is malformed - FAILED_PRECONDITION - if the requested state transition is illegal, e.g try to upload a duplicate xml file or a file too large. - NOT_FOUND - if the containing Execution does not exist +/// +/// A builder for the *histories.executions.steps.publishXunitXmlFiles* method supported by a *project* resource. +/// It is not used directly, but through a `ProjectMethods` instance. +/// +/// # Example +/// +/// Instantiate a resource method builder +/// +/// ```test_harness,no_run +/// # extern crate hyper; +/// # extern crate yup_oauth2 as oauth2; +/// # extern crate google_toolresults1_beta3 as toolresults1_beta3; +/// use toolresults1_beta3::PublishXunitXmlFilesRequest; +/// # #[test] fn egal() { +/// # use std::default::Default; +/// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; +/// # use toolresults1_beta3::ToolResults; +/// +/// # let secret: ApplicationSecret = Default::default(); +/// # let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, +/// # hyper::Client::new(), +/// # ::default(), None); +/// # let mut hub = ToolResults::new(hyper::Client::new(), auth); +/// // As the method needs a request, you would usually fill it with the desired information +/// // into the respective structure. Some of the parts shown here might not be applicable ! +/// // Values shown here are possibly random and not representative ! +/// let mut req = PublishXunitXmlFilesRequest::default(); +/// +/// // You can configure optional parameters by calling the respective setters at will, and +/// // execute the final call using `doit()`. +/// // Values shown here are possibly random and not representative ! +/// let result = hub.projects().histories_executions_steps_publish_xunit_xml_files(req, "projectId", "historyId", "executionId", "stepId") +/// .doit(); +/// # } +/// ``` +pub struct ProjectHistoryExecutionStepPublishXunitXmlFileCall<'a, C, A> + where C: 'a, A: 'a { + + hub: &'a ToolResults, + _request: PublishXunitXmlFilesRequest, + _project_id: String, + _history_id: String, + _execution_id: String, + _step_id: String, + _delegate: Option<&'a mut Delegate>, + _additional_params: HashMap, + _scopes: BTreeMap +} + +impl<'a, C, A> CallBuilder for ProjectHistoryExecutionStepPublishXunitXmlFileCall<'a, C, A> {} + +impl<'a, C, A> ProjectHistoryExecutionStepPublishXunitXmlFileCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { + + + /// Perform the operation you have build so far. + pub fn doit(mut self) -> Result<(hyper::client::Response, Step)> { + use std::io::{Read, Seek}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; + let mut dd = DefaultDelegate; + let mut dlg: &mut Delegate = match self._delegate { + Some(d) => d, + None => &mut dd + }; + dlg.begin(MethodInfo { id: "toolresults.projects.histories.executions.steps.publishXunitXmlFiles", + http_method: hyper::method::Method::Post }); + let mut params: Vec<(&str, String)> = Vec::with_capacity((7 + self._additional_params.len())); + params.push(("projectId", self._project_id.to_string())); + params.push(("historyId", self._history_id.to_string())); + params.push(("executionId", self._execution_id.to_string())); + params.push(("stepId", self._step_id.to_string())); + for &field in ["alt", "projectId", "historyId", "executionId", "stepId"].iter() { + if self._additional_params.contains_key(field) { + dlg.finished(false); + return Err(Error::FieldClash(field)); + } + } + for (name, value) in self._additional_params.iter() { + params.push((&name, value.clone())); + } + + params.push(("alt", "json".to_string())); + + let mut url = "https://www.googleapis.com/toolresults/v1beta3/projects/{projectId}/histories/{historyId}/executions/{executionId}/steps/{stepId}:publishXunitXmlFiles".to_string(); + if self._scopes.len() == 0 { + self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); + } + + for &(find_this, param_name) in [("{projectId}", "projectId"), ("{historyId}", "historyId"), ("{executionId}", "executionId"), ("{stepId}", "stepId")].iter() { + let mut replace_with: Option<&str> = None; + for &(name, ref value) in params.iter() { + if name == param_name { + replace_with = Some(value); + break; + } + } + url = url.replace(find_this, replace_with.expect("to find substitution value in params")); + } + { + let mut indices_for_removal: Vec = Vec::with_capacity(4); + for param_name in ["stepId", "executionId", "historyId", "projectId"].iter() { + if let Some(index) = params.iter().position(|t| &t.0 == param_name) { + indices_for_removal.push(index); + } + } + for &index in indices_for_removal.iter() { + params.remove(index); + } + } + + if params.len() > 0 { + url.push('?'); + url.push_str(&url::form_urlencoded::serialize(params)); + } + + let mut json_mime_type = mime::Mime(mime::TopLevel::Application, mime::SubLevel::Json, Default::default()); + let mut request_value_reader = + { + let mut value = json::value::to_value(&self._request); + remove_json_null_values(&mut value); + let mut dst = io::Cursor::new(Vec::with_capacity(128)); + json::to_writer(&mut dst, &value).unwrap(); + dst + }; + let request_size = request_value_reader.seek(io::SeekFrom::End(0)).unwrap(); + request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); + + + loop { + let token = match self.hub.auth.borrow_mut().token(self._scopes.keys()) { + Ok(token) => token, + Err(err) => { + match dlg.token(&*err) { + Some(token) => token, + None => { + dlg.finished(false); + return Err(Error::MissingToken(err)) + } + } + } + }; + let auth_header = Authorization(Bearer { token: token.access_token }); + request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); + let mut req_result = { + let mut client = &mut *self.hub.client.borrow_mut(); + let mut req = client.borrow_mut().request(hyper::method::Method::Post, &url) + .header(UserAgent(self.hub._user_agent.clone())) + .header(auth_header.clone()) + .header(ContentType(json_mime_type.clone())) + .header(ContentLength(request_size as u64)) + .body(&mut request_value_reader); + + dlg.pre_request(); + req.send() + }; + + match req_result { + Err(err) => { + if let oauth2::Retry::After(d) = dlg.http_error(&err) { + sleep(d); + continue; + } + dlg.finished(false); + return Err(Error::HttpError(err)) + } + Ok(mut res) => { + if !res.status.is_success() { + let mut json_err = String::new(); + res.read_to_string(&mut json_err).unwrap(); + if let oauth2::Retry::After(d) = dlg.http_failure(&res, + json::from_str(&json_err).ok(), + json::from_str(&json_err).ok()) { + sleep(d); + continue; + } + dlg.finished(false); + return match json::from_str::(&json_err){ + Err(_) => Err(Error::Failure(res)), + Ok(serr) => Err(Error::BadRequest(serr)) + } + } + let result_value = { + let mut json_response = String::new(); + res.read_to_string(&mut json_response).unwrap(); + match json::from_str(&json_response) { + Ok(decoded) => (res, decoded), + Err(err) => { + dlg.response_json_decode_error(&json_response, &err); + return Err(Error::JsonDecodeError(json_response, err)); + } + } + }; + + dlg.finished(true); + return Ok(result_value) + } + } + } + } + + + /// + /// Sets the *request* property to the given value. + /// + /// Even though the property as already been set when instantiating this call, + /// we provide this method for API completeness. + pub fn request(mut self, new_value: PublishXunitXmlFilesRequest) -> ProjectHistoryExecutionStepPublishXunitXmlFileCall<'a, C, A> { + self._request = new_value; + self + } + /// A Project id. + /// + /// Required. + /// + /// Sets the *project id* path property to the given value. + /// + /// Even though the property as already been set when instantiating this call, + /// we provide this method for API completeness. + pub fn project_id(mut self, new_value: &str) -> ProjectHistoryExecutionStepPublishXunitXmlFileCall<'a, C, A> { + self._project_id = new_value.to_string(); + self + } + /// A History id. + /// + /// Required. + /// + /// Sets the *history id* path property to the given value. + /// + /// Even though the property as already been set when instantiating this call, + /// we provide this method for API completeness. + pub fn history_id(mut self, new_value: &str) -> ProjectHistoryExecutionStepPublishXunitXmlFileCall<'a, C, A> { + self._history_id = new_value.to_string(); + self + } + /// A Execution id. + /// + /// Required. + /// + /// Sets the *execution id* path property to the given value. + /// + /// Even though the property as already been set when instantiating this call, + /// we provide this method for API completeness. + pub fn execution_id(mut self, new_value: &str) -> ProjectHistoryExecutionStepPublishXunitXmlFileCall<'a, C, A> { + self._execution_id = new_value.to_string(); + self + } + /// A Step id. Note: This step must include a TestExecutionStep. + /// + /// Required. + /// + /// Sets the *step id* path property to the given value. + /// + /// Even though the property as already been set when instantiating this call, + /// we provide this method for API completeness. + pub fn step_id(mut self, new_value: &str) -> ProjectHistoryExecutionStepPublishXunitXmlFileCall<'a, C, A> { + self._step_id = new_value.to_string(); + self + } + /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong + /// while executing the actual API request. + /// + /// It should be used to handle progress information, and to implement a certain level of resilience. + /// + /// Sets the *delegate* property to the given value. + pub fn delegate(mut self, new_value: &'a mut Delegate) -> ProjectHistoryExecutionStepPublishXunitXmlFileCall<'a, C, A> { + self._delegate = Some(new_value); + self + } + + /// Set any additional parameter of the query string used in the request. + /// It should be used to set parameters which are not yet available through their own + /// setters. + /// + /// Please note that this method must not be used to set any of the known paramters + /// which have their own setter method. If done anyway, the request will fail. + /// + /// # Additional Parameters + /// + /// * *quotaUser* (query-string) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. Overrides userIp if both are provided. + /// * *oauth_token* (query-string) - OAuth 2.0 token for the current user. + /// * *key* (query-string) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. + /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. + /// * *userIp* (query-string) - IP address of the site where the request originates. Use this if you want to enforce per-user limits. + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *alt* (query-string) - Data format for the response. + pub fn param(mut self, name: T, value: T) -> ProjectHistoryExecutionStepPublishXunitXmlFileCall<'a, C, A> + where T: AsRef { + self._additional_params.insert(name.as_ref().to_string(), value.as_ref().to_string()); + self + } + + /// Identifies the authorization scope for the method you are building. + /// + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::CloudPlatform`. + /// + /// The `scope` will be added to a set of scopes. This is important as one can maintain access + /// tokens for more than one scope. + /// + /// Usually there is more than one suitable scope to authorize an operation, some of which may + /// encompass more rights than others. For example, for listing resources, a *read-only* scope will be + /// sufficient, a read-write scope will do as well. + pub fn add_scope(mut self, scope: T) -> ProjectHistoryExecutionStepPublishXunitXmlFileCall<'a, C, A> + where T: AsRef { + self._scopes.insert(scope.as_ref().to_string(), ()); + self + } +} + + +/// Lists Steps for a given Execution. +/// +/// The steps are sorted by creation_time in descending order. The step_id key will be used to order the steps with the same creation_time. +/// +/// May return any of the following canonical error codes: +/// +/// - PERMISSION_DENIED - if the user is not authorized to read project - INVALID_ARGUMENT - if the request is malformed - FAILED_PRECONDITION - if an argument in the request happens to be invalid; e.g. if an attempt is made to list the children of a nonexistent Step - NOT_FOUND - if the containing Execution does not exist +/// +/// A builder for the *histories.executions.steps.list* method supported by a *project* resource. +/// It is not used directly, but through a `ProjectMethods` instance. +/// +/// # Example +/// +/// Instantiate a resource method builder +/// +/// ```test_harness,no_run +/// # extern crate hyper; +/// # extern crate yup_oauth2 as oauth2; +/// # extern crate google_toolresults1_beta3 as toolresults1_beta3; +/// # #[test] fn egal() { +/// # use std::default::Default; +/// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; +/// # use toolresults1_beta3::ToolResults; +/// +/// # let secret: ApplicationSecret = Default::default(); +/// # let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, +/// # hyper::Client::new(), +/// # ::default(), None); +/// # let mut hub = ToolResults::new(hyper::Client::new(), auth); +/// // You can configure optional parameters by calling the respective setters at will, and +/// // execute the final call using `doit()`. +/// // Values shown here are possibly random and not representative ! +/// let result = hub.projects().histories_executions_steps_list("projectId", "historyId", "executionId") +/// .page_token("labore") +/// .page_size(-39) +/// .doit(); +/// # } +/// ``` +pub struct ProjectHistoryExecutionStepListCall<'a, C, A> + where C: 'a, A: 'a { + + hub: &'a ToolResults, + _project_id: String, + _history_id: String, + _execution_id: String, + _page_token: Option, + _page_size: Option, + _delegate: Option<&'a mut Delegate>, + _additional_params: HashMap, + _scopes: BTreeMap +} + +impl<'a, C, A> CallBuilder for ProjectHistoryExecutionStepListCall<'a, C, A> {} + +impl<'a, C, A> ProjectHistoryExecutionStepListCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { + + + /// Perform the operation you have build so far. + pub fn doit(mut self) -> Result<(hyper::client::Response, ListStepsResponse)> { + use std::io::{Read, Seek}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; + let mut dd = DefaultDelegate; + let mut dlg: &mut Delegate = match self._delegate { + Some(d) => d, + None => &mut dd + }; + dlg.begin(MethodInfo { id: "toolresults.projects.histories.executions.steps.list", + http_method: hyper::method::Method::Get }); + let mut params: Vec<(&str, String)> = Vec::with_capacity((7 + self._additional_params.len())); + params.push(("projectId", self._project_id.to_string())); + params.push(("historyId", self._history_id.to_string())); + params.push(("executionId", self._execution_id.to_string())); + if let Some(value) = self._page_token { + params.push(("pageToken", value.to_string())); + } + if let Some(value) = self._page_size { + params.push(("pageSize", value.to_string())); + } + for &field in ["alt", "projectId", "historyId", "executionId", "pageToken", "pageSize"].iter() { + if self._additional_params.contains_key(field) { + dlg.finished(false); + return Err(Error::FieldClash(field)); + } + } + for (name, value) in self._additional_params.iter() { + params.push((&name, value.clone())); + } + + params.push(("alt", "json".to_string())); + + let mut url = "https://www.googleapis.com/toolresults/v1beta3/projects/{projectId}/histories/{historyId}/executions/{executionId}/steps".to_string(); + if self._scopes.len() == 0 { + self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); + } + + for &(find_this, param_name) in [("{projectId}", "projectId"), ("{historyId}", "historyId"), ("{executionId}", "executionId")].iter() { + let mut replace_with: Option<&str> = None; + for &(name, ref value) in params.iter() { + if name == param_name { + replace_with = Some(value); + break; + } + } + url = url.replace(find_this, replace_with.expect("to find substitution value in params")); + } + { + let mut indices_for_removal: Vec = Vec::with_capacity(3); + for param_name in ["executionId", "historyId", "projectId"].iter() { + if let Some(index) = params.iter().position(|t| &t.0 == param_name) { + indices_for_removal.push(index); + } + } + for &index in indices_for_removal.iter() { + params.remove(index); + } + } + + if params.len() > 0 { + url.push('?'); + url.push_str(&url::form_urlencoded::serialize(params)); + } + + + + loop { + let token = match self.hub.auth.borrow_mut().token(self._scopes.keys()) { + Ok(token) => token, + Err(err) => { + match dlg.token(&*err) { + Some(token) => token, + None => { + dlg.finished(false); + return Err(Error::MissingToken(err)) + } + } + } + }; + let auth_header = Authorization(Bearer { token: token.access_token }); + let mut req_result = { + let mut client = &mut *self.hub.client.borrow_mut(); + let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) + .header(UserAgent(self.hub._user_agent.clone())) + .header(auth_header.clone()); + + dlg.pre_request(); + req.send() + }; + + match req_result { + Err(err) => { + if let oauth2::Retry::After(d) = dlg.http_error(&err) { + sleep(d); + continue; + } + dlg.finished(false); + return Err(Error::HttpError(err)) + } + Ok(mut res) => { + if !res.status.is_success() { + let mut json_err = String::new(); + res.read_to_string(&mut json_err).unwrap(); + if let oauth2::Retry::After(d) = dlg.http_failure(&res, + json::from_str(&json_err).ok(), + json::from_str(&json_err).ok()) { + sleep(d); + continue; + } + dlg.finished(false); + return match json::from_str::(&json_err){ + Err(_) => Err(Error::Failure(res)), + Ok(serr) => Err(Error::BadRequest(serr)) + } + } + let result_value = { + let mut json_response = String::new(); + res.read_to_string(&mut json_response).unwrap(); + match json::from_str(&json_response) { + Ok(decoded) => (res, decoded), + Err(err) => { + dlg.response_json_decode_error(&json_response, &err); + return Err(Error::JsonDecodeError(json_response, err)); + } + } + }; + + dlg.finished(true); + return Ok(result_value) + } + } + } + } + + + /// A Project id. + /// + /// Required. + /// + /// Sets the *project id* path property to the given value. + /// + /// Even though the property as already been set when instantiating this call, + /// we provide this method for API completeness. + pub fn project_id(mut self, new_value: &str) -> ProjectHistoryExecutionStepListCall<'a, C, A> { + self._project_id = new_value.to_string(); + self + } + /// A History id. + /// + /// Required. + /// + /// Sets the *history id* path property to the given value. + /// + /// Even though the property as already been set when instantiating this call, + /// we provide this method for API completeness. + pub fn history_id(mut self, new_value: &str) -> ProjectHistoryExecutionStepListCall<'a, C, A> { + self._history_id = new_value.to_string(); + self + } + /// A Execution id. + /// + /// Required. + /// + /// Sets the *execution id* path property to the given value. + /// + /// Even though the property as already been set when instantiating this call, + /// we provide this method for API completeness. + pub fn execution_id(mut self, new_value: &str) -> ProjectHistoryExecutionStepListCall<'a, C, A> { + self._execution_id = new_value.to_string(); + self + } + /// A continuation token to resume the query at the next item. + /// + /// Optional. + /// + /// Sets the *page token* query property to the given value. + pub fn page_token(mut self, new_value: &str) -> ProjectHistoryExecutionStepListCall<'a, C, A> { + self._page_token = Some(new_value.to_string()); + self + } + /// The maximum number of Steps to fetch. + /// + /// Default value: 25. The server will use this default if the field is not set or has a value of 0. + /// + /// Optional. + /// + /// Sets the *page size* query property to the given value. + pub fn page_size(mut self, new_value: i32) -> ProjectHistoryExecutionStepListCall<'a, C, A> { + self._page_size = Some(new_value); + self + } + /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong + /// while executing the actual API request. + /// + /// It should be used to handle progress information, and to implement a certain level of resilience. + /// + /// Sets the *delegate* property to the given value. + pub fn delegate(mut self, new_value: &'a mut Delegate) -> ProjectHistoryExecutionStepListCall<'a, C, A> { + self._delegate = Some(new_value); + self + } + + /// Set any additional parameter of the query string used in the request. + /// It should be used to set parameters which are not yet available through their own + /// setters. + /// + /// Please note that this method must not be used to set any of the known paramters + /// which have their own setter method. If done anyway, the request will fail. + /// + /// # Additional Parameters + /// + /// * *quotaUser* (query-string) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. Overrides userIp if both are provided. + /// * *oauth_token* (query-string) - OAuth 2.0 token for the current user. + /// * *key* (query-string) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. + /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. + /// * *userIp* (query-string) - IP address of the site where the request originates. Use this if you want to enforce per-user limits. + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *alt* (query-string) - Data format for the response. + pub fn param(mut self, name: T, value: T) -> ProjectHistoryExecutionStepListCall<'a, C, A> + where T: AsRef { + self._additional_params.insert(name.as_ref().to_string(), value.as_ref().to_string()); + self + } + + /// Identifies the authorization scope for the method you are building. + /// + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::CloudPlatform`. + /// + /// The `scope` will be added to a set of scopes. This is important as one can maintain access + /// tokens for more than one scope. + /// + /// Usually there is more than one suitable scope to authorize an operation, some of which may + /// encompass more rights than others. For example, for listing resources, a *read-only* scope will be + /// sufficient, a read-write scope will do as well. + pub fn add_scope(mut self, scope: T) -> ProjectHistoryExecutionStepListCall<'a, C, A> + where T: AsRef { + self._scopes.insert(scope.as_ref().to_string(), ()); + self + } +} + + +/// Updates an existing Step with the supplied partial entity. +/// +/// May return any of the following canonical error codes: +/// +/// - PERMISSION_DENIED - if the user is not authorized to write project - INVALID_ARGUMENT - if the request is malformed - FAILED_PRECONDITION - if the requested state transition is illegal (e.g try to upload a duplicate xml file), if the updated step is too large (more than 10Mib) - NOT_FOUND - if the containing Execution does not exist +/// +/// A builder for the *histories.executions.steps.patch* method supported by a *project* resource. +/// It is not used directly, but through a `ProjectMethods` instance. +/// +/// # Example +/// +/// Instantiate a resource method builder +/// +/// ```test_harness,no_run +/// # extern crate hyper; +/// # extern crate yup_oauth2 as oauth2; +/// # extern crate google_toolresults1_beta3 as toolresults1_beta3; +/// use toolresults1_beta3::Step; +/// # #[test] fn egal() { +/// # use std::default::Default; +/// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; +/// # use toolresults1_beta3::ToolResults; +/// +/// # let secret: ApplicationSecret = Default::default(); +/// # let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, +/// # hyper::Client::new(), +/// # ::default(), None); +/// # let mut hub = ToolResults::new(hyper::Client::new(), auth); +/// // As the method needs a request, you would usually fill it with the desired information +/// // into the respective structure. Some of the parts shown here might not be applicable ! +/// // Values shown here are possibly random and not representative ! +/// let mut req = Step::default(); +/// +/// // You can configure optional parameters by calling the respective setters at will, and +/// // execute the final call using `doit()`. +/// // Values shown here are possibly random and not representative ! +/// let result = hub.projects().histories_executions_steps_patch(req, "projectId", "historyId", "executionId", "stepId") +/// .request_id("Lorem") +/// .doit(); +/// # } +/// ``` +pub struct ProjectHistoryExecutionStepPatchCall<'a, C, A> + where C: 'a, A: 'a { + + hub: &'a ToolResults, + _request: Step, + _project_id: String, + _history_id: String, + _execution_id: String, + _step_id: String, + _request_id: Option, + _delegate: Option<&'a mut Delegate>, + _additional_params: HashMap, + _scopes: BTreeMap +} + +impl<'a, C, A> CallBuilder for ProjectHistoryExecutionStepPatchCall<'a, C, A> {} + +impl<'a, C, A> ProjectHistoryExecutionStepPatchCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { + + + /// Perform the operation you have build so far. + pub fn doit(mut self) -> Result<(hyper::client::Response, Step)> { + use std::io::{Read, Seek}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; + let mut dd = DefaultDelegate; + let mut dlg: &mut Delegate = match self._delegate { + Some(d) => d, + None => &mut dd + }; + dlg.begin(MethodInfo { id: "toolresults.projects.histories.executions.steps.patch", + http_method: hyper::method::Method::Patch }); + let mut params: Vec<(&str, String)> = Vec::with_capacity((8 + self._additional_params.len())); + params.push(("projectId", self._project_id.to_string())); + params.push(("historyId", self._history_id.to_string())); + params.push(("executionId", self._execution_id.to_string())); + params.push(("stepId", self._step_id.to_string())); + if let Some(value) = self._request_id { + params.push(("requestId", value.to_string())); + } + for &field in ["alt", "projectId", "historyId", "executionId", "stepId", "requestId"].iter() { + if self._additional_params.contains_key(field) { + dlg.finished(false); + return Err(Error::FieldClash(field)); + } + } + for (name, value) in self._additional_params.iter() { + params.push((&name, value.clone())); + } + + params.push(("alt", "json".to_string())); + + let mut url = "https://www.googleapis.com/toolresults/v1beta3/projects/{projectId}/histories/{historyId}/executions/{executionId}/steps/{stepId}".to_string(); + if self._scopes.len() == 0 { + self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); + } + + for &(find_this, param_name) in [("{projectId}", "projectId"), ("{historyId}", "historyId"), ("{executionId}", "executionId"), ("{stepId}", "stepId")].iter() { + let mut replace_with: Option<&str> = None; + for &(name, ref value) in params.iter() { + if name == param_name { + replace_with = Some(value); + break; + } + } + url = url.replace(find_this, replace_with.expect("to find substitution value in params")); + } + { + let mut indices_for_removal: Vec = Vec::with_capacity(4); + for param_name in ["stepId", "executionId", "historyId", "projectId"].iter() { + if let Some(index) = params.iter().position(|t| &t.0 == param_name) { + indices_for_removal.push(index); + } + } + for &index in indices_for_removal.iter() { + params.remove(index); + } + } + + if params.len() > 0 { + url.push('?'); + url.push_str(&url::form_urlencoded::serialize(params)); + } + + let mut json_mime_type = mime::Mime(mime::TopLevel::Application, mime::SubLevel::Json, Default::default()); + let mut request_value_reader = + { + let mut value = json::value::to_value(&self._request); + remove_json_null_values(&mut value); + let mut dst = io::Cursor::new(Vec::with_capacity(128)); + json::to_writer(&mut dst, &value).unwrap(); + dst + }; + let request_size = request_value_reader.seek(io::SeekFrom::End(0)).unwrap(); + request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); + + + loop { + let token = match self.hub.auth.borrow_mut().token(self._scopes.keys()) { + Ok(token) => token, + Err(err) => { + match dlg.token(&*err) { + Some(token) => token, + None => { + dlg.finished(false); + return Err(Error::MissingToken(err)) + } + } + } + }; + let auth_header = Authorization(Bearer { token: token.access_token }); + request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); + let mut req_result = { + let mut client = &mut *self.hub.client.borrow_mut(); + let mut req = client.borrow_mut().request(hyper::method::Method::Patch, &url) + .header(UserAgent(self.hub._user_agent.clone())) + .header(auth_header.clone()) + .header(ContentType(json_mime_type.clone())) + .header(ContentLength(request_size as u64)) + .body(&mut request_value_reader); + + dlg.pre_request(); + req.send() + }; + + match req_result { + Err(err) => { + if let oauth2::Retry::After(d) = dlg.http_error(&err) { + sleep(d); + continue; + } + dlg.finished(false); + return Err(Error::HttpError(err)) + } + Ok(mut res) => { + if !res.status.is_success() { + let mut json_err = String::new(); + res.read_to_string(&mut json_err).unwrap(); + if let oauth2::Retry::After(d) = dlg.http_failure(&res, + json::from_str(&json_err).ok(), + json::from_str(&json_err).ok()) { + sleep(d); + continue; + } + dlg.finished(false); + return match json::from_str::(&json_err){ + Err(_) => Err(Error::Failure(res)), + Ok(serr) => Err(Error::BadRequest(serr)) + } + } + let result_value = { + let mut json_response = String::new(); + res.read_to_string(&mut json_response).unwrap(); + match json::from_str(&json_response) { + Ok(decoded) => (res, decoded), + Err(err) => { + dlg.response_json_decode_error(&json_response, &err); + return Err(Error::JsonDecodeError(json_response, err)); + } + } + }; + + dlg.finished(true); + return Ok(result_value) + } + } + } + } + + + /// + /// Sets the *request* property to the given value. + /// + /// Even though the property as already been set when instantiating this call, + /// we provide this method for API completeness. + pub fn request(mut self, new_value: Step) -> ProjectHistoryExecutionStepPatchCall<'a, C, A> { + self._request = new_value; + self + } + /// A Project id. + /// + /// Required. + /// + /// Sets the *project id* path property to the given value. + /// + /// Even though the property as already been set when instantiating this call, + /// we provide this method for API completeness. + pub fn project_id(mut self, new_value: &str) -> ProjectHistoryExecutionStepPatchCall<'a, C, A> { + self._project_id = new_value.to_string(); + self + } + /// A History id. + /// + /// Required. + /// + /// Sets the *history id* path property to the given value. + /// + /// Even though the property as already been set when instantiating this call, + /// we provide this method for API completeness. + pub fn history_id(mut self, new_value: &str) -> ProjectHistoryExecutionStepPatchCall<'a, C, A> { + self._history_id = new_value.to_string(); + self + } + /// A Execution id. + /// + /// Required. + /// + /// Sets the *execution id* path property to the given value. + /// + /// Even though the property as already been set when instantiating this call, + /// we provide this method for API completeness. + pub fn execution_id(mut self, new_value: &str) -> ProjectHistoryExecutionStepPatchCall<'a, C, A> { + self._execution_id = new_value.to_string(); + self + } + /// A Step id. + /// + /// Required. + /// + /// Sets the *step id* path property to the given value. + /// + /// Even though the property as already been set when instantiating this call, + /// we provide this method for API completeness. + pub fn step_id(mut self, new_value: &str) -> ProjectHistoryExecutionStepPatchCall<'a, C, A> { + self._step_id = new_value.to_string(); + self + } + /// A unique request ID for server to detect duplicated requests. For example, a UUID. + /// + /// Optional, but strongly recommended. + /// + /// Sets the *request id* query property to the given value. + pub fn request_id(mut self, new_value: &str) -> ProjectHistoryExecutionStepPatchCall<'a, C, A> { + self._request_id = Some(new_value.to_string()); + self + } + /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong + /// while executing the actual API request. + /// + /// It should be used to handle progress information, and to implement a certain level of resilience. + /// + /// Sets the *delegate* property to the given value. + pub fn delegate(mut self, new_value: &'a mut Delegate) -> ProjectHistoryExecutionStepPatchCall<'a, C, A> { + self._delegate = Some(new_value); + self + } + + /// Set any additional parameter of the query string used in the request. + /// It should be used to set parameters which are not yet available through their own + /// setters. + /// + /// Please note that this method must not be used to set any of the known paramters + /// which have their own setter method. If done anyway, the request will fail. + /// + /// # Additional Parameters + /// + /// * *quotaUser* (query-string) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. Overrides userIp if both are provided. + /// * *oauth_token* (query-string) - OAuth 2.0 token for the current user. + /// * *key* (query-string) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. + /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. + /// * *userIp* (query-string) - IP address of the site where the request originates. Use this if you want to enforce per-user limits. + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *alt* (query-string) - Data format for the response. + pub fn param(mut self, name: T, value: T) -> ProjectHistoryExecutionStepPatchCall<'a, C, A> + where T: AsRef { + self._additional_params.insert(name.as_ref().to_string(), value.as_ref().to_string()); + self + } + + /// Identifies the authorization scope for the method you are building. + /// + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::CloudPlatform`. + /// + /// The `scope` will be added to a set of scopes. This is important as one can maintain access + /// tokens for more than one scope. + /// + /// Usually there is more than one suitable scope to authorize an operation, some of which may + /// encompass more rights than others. For example, for listing resources, a *read-only* scope will be + /// sufficient, a read-write scope will do as well. + pub fn add_scope(mut self, scope: T) -> ProjectHistoryExecutionStepPatchCall<'a, C, A> + where T: AsRef { + self._scopes.insert(scope.as_ref().to_string(), ()); + self + } +} + + +/// Creates an Execution. +/// +/// The returned Execution will have the id set. +/// +/// May return any of the following canonical error codes: +/// +/// - PERMISSION_DENIED - if the user is not authorized to write to project - INVALID_ARGUMENT - if the request is malformed - NOT_FOUND - if the containing History does not exist +/// +/// A builder for the *histories.executions.create* method supported by a *project* resource. +/// It is not used directly, but through a `ProjectMethods` instance. +/// +/// # Example +/// +/// Instantiate a resource method builder +/// +/// ```test_harness,no_run +/// # extern crate hyper; +/// # extern crate yup_oauth2 as oauth2; +/// # extern crate google_toolresults1_beta3 as toolresults1_beta3; +/// use toolresults1_beta3::Execution; +/// # #[test] fn egal() { +/// # use std::default::Default; +/// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; +/// # use toolresults1_beta3::ToolResults; +/// +/// # let secret: ApplicationSecret = Default::default(); +/// # let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, +/// # hyper::Client::new(), +/// # ::default(), None); +/// # let mut hub = ToolResults::new(hyper::Client::new(), auth); +/// // As the method needs a request, you would usually fill it with the desired information +/// // into the respective structure. Some of the parts shown here might not be applicable ! +/// // Values shown here are possibly random and not representative ! +/// let mut req = Execution::default(); +/// +/// // You can configure optional parameters by calling the respective setters at will, and +/// // execute the final call using `doit()`. +/// // Values shown here are possibly random and not representative ! +/// let result = hub.projects().histories_executions_create(req, "projectId", "historyId") +/// .request_id("duo") +/// .doit(); +/// # } +/// ``` +pub struct ProjectHistoryExecutionCreateCall<'a, C, A> + where C: 'a, A: 'a { + + hub: &'a ToolResults, + _request: Execution, + _project_id: String, + _history_id: String, + _request_id: Option, + _delegate: Option<&'a mut Delegate>, + _additional_params: HashMap, + _scopes: BTreeMap +} + +impl<'a, C, A> CallBuilder for ProjectHistoryExecutionCreateCall<'a, C, A> {} + +impl<'a, C, A> ProjectHistoryExecutionCreateCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { + + + /// Perform the operation you have build so far. + pub fn doit(mut self) -> Result<(hyper::client::Response, Execution)> { + use std::io::{Read, Seek}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; + let mut dd = DefaultDelegate; + let mut dlg: &mut Delegate = match self._delegate { + Some(d) => d, + None => &mut dd + }; + dlg.begin(MethodInfo { id: "toolresults.projects.histories.executions.create", + http_method: hyper::method::Method::Post }); + let mut params: Vec<(&str, String)> = Vec::with_capacity((6 + self._additional_params.len())); + params.push(("projectId", self._project_id.to_string())); + params.push(("historyId", self._history_id.to_string())); + if let Some(value) = self._request_id { + params.push(("requestId", value.to_string())); + } + for &field in ["alt", "projectId", "historyId", "requestId"].iter() { + if self._additional_params.contains_key(field) { + dlg.finished(false); + return Err(Error::FieldClash(field)); + } + } + for (name, value) in self._additional_params.iter() { + params.push((&name, value.clone())); + } + + params.push(("alt", "json".to_string())); + + let mut url = "https://www.googleapis.com/toolresults/v1beta3/projects/{projectId}/histories/{historyId}/executions".to_string(); + if self._scopes.len() == 0 { + self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); + } + + for &(find_this, param_name) in [("{projectId}", "projectId"), ("{historyId}", "historyId")].iter() { + let mut replace_with: Option<&str> = None; + for &(name, ref value) in params.iter() { + if name == param_name { + replace_with = Some(value); + break; + } + } + url = url.replace(find_this, replace_with.expect("to find substitution value in params")); + } + { + let mut indices_for_removal: Vec = Vec::with_capacity(2); + for param_name in ["historyId", "projectId"].iter() { + if let Some(index) = params.iter().position(|t| &t.0 == param_name) { + indices_for_removal.push(index); + } + } + for &index in indices_for_removal.iter() { + params.remove(index); + } + } + + if params.len() > 0 { + url.push('?'); + url.push_str(&url::form_urlencoded::serialize(params)); + } + + let mut json_mime_type = mime::Mime(mime::TopLevel::Application, mime::SubLevel::Json, Default::default()); + let mut request_value_reader = + { + let mut value = json::value::to_value(&self._request); + remove_json_null_values(&mut value); + let mut dst = io::Cursor::new(Vec::with_capacity(128)); + json::to_writer(&mut dst, &value).unwrap(); + dst + }; + let request_size = request_value_reader.seek(io::SeekFrom::End(0)).unwrap(); + request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); + + + loop { + let token = match self.hub.auth.borrow_mut().token(self._scopes.keys()) { + Ok(token) => token, + Err(err) => { + match dlg.token(&*err) { + Some(token) => token, + None => { + dlg.finished(false); + return Err(Error::MissingToken(err)) + } + } + } + }; + let auth_header = Authorization(Bearer { token: token.access_token }); + request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); + let mut req_result = { + let mut client = &mut *self.hub.client.borrow_mut(); + let mut req = client.borrow_mut().request(hyper::method::Method::Post, &url) + .header(UserAgent(self.hub._user_agent.clone())) + .header(auth_header.clone()) + .header(ContentType(json_mime_type.clone())) + .header(ContentLength(request_size as u64)) + .body(&mut request_value_reader); + + dlg.pre_request(); + req.send() + }; + + match req_result { + Err(err) => { + if let oauth2::Retry::After(d) = dlg.http_error(&err) { + sleep(d); + continue; + } + dlg.finished(false); + return Err(Error::HttpError(err)) + } + Ok(mut res) => { + if !res.status.is_success() { + let mut json_err = String::new(); + res.read_to_string(&mut json_err).unwrap(); + if let oauth2::Retry::After(d) = dlg.http_failure(&res, + json::from_str(&json_err).ok(), + json::from_str(&json_err).ok()) { + sleep(d); + continue; + } + dlg.finished(false); + return match json::from_str::(&json_err){ + Err(_) => Err(Error::Failure(res)), + Ok(serr) => Err(Error::BadRequest(serr)) + } + } + let result_value = { + let mut json_response = String::new(); + res.read_to_string(&mut json_response).unwrap(); + match json::from_str(&json_response) { + Ok(decoded) => (res, decoded), + Err(err) => { + dlg.response_json_decode_error(&json_response, &err); + return Err(Error::JsonDecodeError(json_response, err)); + } + } + }; + + dlg.finished(true); + return Ok(result_value) + } + } + } + } + + + /// + /// Sets the *request* property to the given value. + /// + /// Even though the property as already been set when instantiating this call, + /// we provide this method for API completeness. + pub fn request(mut self, new_value: Execution) -> ProjectHistoryExecutionCreateCall<'a, C, A> { + self._request = new_value; + self + } + /// A Project id. + /// + /// Required. + /// + /// Sets the *project id* path property to the given value. + /// + /// Even though the property as already been set when instantiating this call, + /// we provide this method for API completeness. + pub fn project_id(mut self, new_value: &str) -> ProjectHistoryExecutionCreateCall<'a, C, A> { + self._project_id = new_value.to_string(); + self + } + /// A History id. + /// + /// Required. + /// + /// Sets the *history id* path property to the given value. + /// + /// Even though the property as already been set when instantiating this call, + /// we provide this method for API completeness. + pub fn history_id(mut self, new_value: &str) -> ProjectHistoryExecutionCreateCall<'a, C, A> { + self._history_id = new_value.to_string(); + self + } + /// A unique request ID for server to detect duplicated requests. For example, a UUID. + /// + /// Optional, but strongly recommended. + /// + /// Sets the *request id* query property to the given value. + pub fn request_id(mut self, new_value: &str) -> ProjectHistoryExecutionCreateCall<'a, C, A> { + self._request_id = Some(new_value.to_string()); + self + } + /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong + /// while executing the actual API request. + /// + /// It should be used to handle progress information, and to implement a certain level of resilience. + /// + /// Sets the *delegate* property to the given value. + pub fn delegate(mut self, new_value: &'a mut Delegate) -> ProjectHistoryExecutionCreateCall<'a, C, A> { + self._delegate = Some(new_value); + self + } + + /// Set any additional parameter of the query string used in the request. + /// It should be used to set parameters which are not yet available through their own + /// setters. + /// + /// Please note that this method must not be used to set any of the known paramters + /// which have their own setter method. If done anyway, the request will fail. + /// + /// # Additional Parameters + /// + /// * *quotaUser* (query-string) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. Overrides userIp if both are provided. + /// * *oauth_token* (query-string) - OAuth 2.0 token for the current user. + /// * *key* (query-string) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. + /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. + /// * *userIp* (query-string) - IP address of the site where the request originates. Use this if you want to enforce per-user limits. + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *alt* (query-string) - Data format for the response. + pub fn param(mut self, name: T, value: T) -> ProjectHistoryExecutionCreateCall<'a, C, A> + where T: AsRef { + self._additional_params.insert(name.as_ref().to_string(), value.as_ref().to_string()); + self + } + + /// Identifies the authorization scope for the method you are building. + /// + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::CloudPlatform`. + /// + /// The `scope` will be added to a set of scopes. This is important as one can maintain access + /// tokens for more than one scope. + /// + /// Usually there is more than one suitable scope to authorize an operation, some of which may + /// encompass more rights than others. For example, for listing resources, a *read-only* scope will be + /// sufficient, a read-write scope will do as well. + pub fn add_scope(mut self, scope: T) -> ProjectHistoryExecutionCreateCall<'a, C, A> + where T: AsRef { + self._scopes.insert(scope.as_ref().to_string(), ()); + self + } +} + + +/// Creates a Step. +/// +/// The returned Step will have the id set. +/// +/// May return any of the following canonical error codes: +/// +/// - PERMISSION_DENIED - if the user is not authorized to write to project - INVALID_ARGUMENT - if the request is malformed - FAILED_PRECONDITION - if the step is too large (more than 10Mib) - NOT_FOUND - if the containing Execution does not exist +/// +/// A builder for the *histories.executions.steps.create* method supported by a *project* resource. +/// It is not used directly, but through a `ProjectMethods` instance. +/// +/// # Example +/// +/// Instantiate a resource method builder +/// +/// ```test_harness,no_run +/// # extern crate hyper; +/// # extern crate yup_oauth2 as oauth2; +/// # extern crate google_toolresults1_beta3 as toolresults1_beta3; +/// use toolresults1_beta3::Step; +/// # #[test] fn egal() { +/// # use std::default::Default; +/// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; +/// # use toolresults1_beta3::ToolResults; +/// +/// # let secret: ApplicationSecret = Default::default(); +/// # let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, +/// # hyper::Client::new(), +/// # ::default(), None); +/// # let mut hub = ToolResults::new(hyper::Client::new(), auth); +/// // As the method needs a request, you would usually fill it with the desired information +/// // into the respective structure. Some of the parts shown here might not be applicable ! +/// // Values shown here are possibly random and not representative ! +/// let mut req = Step::default(); +/// +/// // You can configure optional parameters by calling the respective setters at will, and +/// // execute the final call using `doit()`. +/// // Values shown here are possibly random and not representative ! +/// let result = hub.projects().histories_executions_steps_create(req, "projectId", "historyId", "executionId") +/// .request_id("et") +/// .doit(); +/// # } +/// ``` +pub struct ProjectHistoryExecutionStepCreateCall<'a, C, A> + where C: 'a, A: 'a { + + hub: &'a ToolResults, + _request: Step, + _project_id: String, + _history_id: String, + _execution_id: String, + _request_id: Option, + _delegate: Option<&'a mut Delegate>, + _additional_params: HashMap, + _scopes: BTreeMap +} + +impl<'a, C, A> CallBuilder for ProjectHistoryExecutionStepCreateCall<'a, C, A> {} + +impl<'a, C, A> ProjectHistoryExecutionStepCreateCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { + + + /// Perform the operation you have build so far. + pub fn doit(mut self) -> Result<(hyper::client::Response, Step)> { + use std::io::{Read, Seek}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; + let mut dd = DefaultDelegate; + let mut dlg: &mut Delegate = match self._delegate { + Some(d) => d, + None => &mut dd + }; + dlg.begin(MethodInfo { id: "toolresults.projects.histories.executions.steps.create", + http_method: hyper::method::Method::Post }); + let mut params: Vec<(&str, String)> = Vec::with_capacity((7 + self._additional_params.len())); + params.push(("projectId", self._project_id.to_string())); + params.push(("historyId", self._history_id.to_string())); + params.push(("executionId", self._execution_id.to_string())); + if let Some(value) = self._request_id { + params.push(("requestId", value.to_string())); + } + for &field in ["alt", "projectId", "historyId", "executionId", "requestId"].iter() { + if self._additional_params.contains_key(field) { + dlg.finished(false); + return Err(Error::FieldClash(field)); + } + } + for (name, value) in self._additional_params.iter() { + params.push((&name, value.clone())); + } + + params.push(("alt", "json".to_string())); + + let mut url = "https://www.googleapis.com/toolresults/v1beta3/projects/{projectId}/histories/{historyId}/executions/{executionId}/steps".to_string(); + if self._scopes.len() == 0 { + self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); + } + + for &(find_this, param_name) in [("{projectId}", "projectId"), ("{historyId}", "historyId"), ("{executionId}", "executionId")].iter() { + let mut replace_with: Option<&str> = None; + for &(name, ref value) in params.iter() { + if name == param_name { + replace_with = Some(value); + break; + } + } + url = url.replace(find_this, replace_with.expect("to find substitution value in params")); + } + { + let mut indices_for_removal: Vec = Vec::with_capacity(3); + for param_name in ["executionId", "historyId", "projectId"].iter() { + if let Some(index) = params.iter().position(|t| &t.0 == param_name) { + indices_for_removal.push(index); + } + } + for &index in indices_for_removal.iter() { + params.remove(index); + } + } + + if params.len() > 0 { + url.push('?'); + url.push_str(&url::form_urlencoded::serialize(params)); + } + + let mut json_mime_type = mime::Mime(mime::TopLevel::Application, mime::SubLevel::Json, Default::default()); + let mut request_value_reader = + { + let mut value = json::value::to_value(&self._request); + remove_json_null_values(&mut value); + let mut dst = io::Cursor::new(Vec::with_capacity(128)); + json::to_writer(&mut dst, &value).unwrap(); + dst + }; + let request_size = request_value_reader.seek(io::SeekFrom::End(0)).unwrap(); + request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); + + + loop { + let token = match self.hub.auth.borrow_mut().token(self._scopes.keys()) { + Ok(token) => token, + Err(err) => { + match dlg.token(&*err) { + Some(token) => token, + None => { + dlg.finished(false); + return Err(Error::MissingToken(err)) + } + } + } + }; + let auth_header = Authorization(Bearer { token: token.access_token }); + request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); + let mut req_result = { + let mut client = &mut *self.hub.client.borrow_mut(); + let mut req = client.borrow_mut().request(hyper::method::Method::Post, &url) + .header(UserAgent(self.hub._user_agent.clone())) + .header(auth_header.clone()) + .header(ContentType(json_mime_type.clone())) + .header(ContentLength(request_size as u64)) + .body(&mut request_value_reader); + + dlg.pre_request(); + req.send() + }; + + match req_result { + Err(err) => { + if let oauth2::Retry::After(d) = dlg.http_error(&err) { + sleep(d); + continue; + } + dlg.finished(false); + return Err(Error::HttpError(err)) + } + Ok(mut res) => { + if !res.status.is_success() { + let mut json_err = String::new(); + res.read_to_string(&mut json_err).unwrap(); + if let oauth2::Retry::After(d) = dlg.http_failure(&res, + json::from_str(&json_err).ok(), + json::from_str(&json_err).ok()) { + sleep(d); + continue; + } + dlg.finished(false); + return match json::from_str::(&json_err){ + Err(_) => Err(Error::Failure(res)), + Ok(serr) => Err(Error::BadRequest(serr)) + } + } + let result_value = { + let mut json_response = String::new(); + res.read_to_string(&mut json_response).unwrap(); + match json::from_str(&json_response) { + Ok(decoded) => (res, decoded), + Err(err) => { + dlg.response_json_decode_error(&json_response, &err); + return Err(Error::JsonDecodeError(json_response, err)); + } + } + }; + + dlg.finished(true); + return Ok(result_value) + } + } + } + } + + + /// + /// Sets the *request* property to the given value. + /// + /// Even though the property as already been set when instantiating this call, + /// we provide this method for API completeness. + pub fn request(mut self, new_value: Step) -> ProjectHistoryExecutionStepCreateCall<'a, C, A> { + self._request = new_value; + self + } + /// A Project id. + /// + /// Required. + /// + /// Sets the *project id* path property to the given value. + /// + /// Even though the property as already been set when instantiating this call, + /// we provide this method for API completeness. + pub fn project_id(mut self, new_value: &str) -> ProjectHistoryExecutionStepCreateCall<'a, C, A> { + self._project_id = new_value.to_string(); + self + } + /// A History id. + /// + /// Required. + /// + /// Sets the *history id* path property to the given value. + /// + /// Even though the property as already been set when instantiating this call, + /// we provide this method for API completeness. + pub fn history_id(mut self, new_value: &str) -> ProjectHistoryExecutionStepCreateCall<'a, C, A> { + self._history_id = new_value.to_string(); + self + } + /// A Execution id. + /// + /// Required. + /// + /// Sets the *execution id* path property to the given value. + /// + /// Even though the property as already been set when instantiating this call, + /// we provide this method for API completeness. + pub fn execution_id(mut self, new_value: &str) -> ProjectHistoryExecutionStepCreateCall<'a, C, A> { + self._execution_id = new_value.to_string(); + self + } + /// A unique request ID for server to detect duplicated requests. For example, a UUID. + /// + /// Optional, but strongly recommended. + /// + /// Sets the *request id* query property to the given value. + pub fn request_id(mut self, new_value: &str) -> ProjectHistoryExecutionStepCreateCall<'a, C, A> { + self._request_id = Some(new_value.to_string()); + self + } + /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong + /// while executing the actual API request. + /// + /// It should be used to handle progress information, and to implement a certain level of resilience. + /// + /// Sets the *delegate* property to the given value. + pub fn delegate(mut self, new_value: &'a mut Delegate) -> ProjectHistoryExecutionStepCreateCall<'a, C, A> { + self._delegate = Some(new_value); + self + } + + /// Set any additional parameter of the query string used in the request. + /// It should be used to set parameters which are not yet available through their own + /// setters. + /// + /// Please note that this method must not be used to set any of the known paramters + /// which have their own setter method. If done anyway, the request will fail. + /// + /// # Additional Parameters + /// + /// * *quotaUser* (query-string) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. Overrides userIp if both are provided. + /// * *oauth_token* (query-string) - OAuth 2.0 token for the current user. + /// * *key* (query-string) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. + /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. + /// * *userIp* (query-string) - IP address of the site where the request originates. Use this if you want to enforce per-user limits. + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *alt* (query-string) - Data format for the response. + pub fn param(mut self, name: T, value: T) -> ProjectHistoryExecutionStepCreateCall<'a, C, A> + where T: AsRef { + self._additional_params.insert(name.as_ref().to_string(), value.as_ref().to_string()); + self + } + + /// Identifies the authorization scope for the method you are building. + /// + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::CloudPlatform`. + /// + /// The `scope` will be added to a set of scopes. This is important as one can maintain access + /// tokens for more than one scope. + /// + /// Usually there is more than one suitable scope to authorize an operation, some of which may + /// encompass more rights than others. For example, for listing resources, a *read-only* scope will be + /// sufficient, a read-write scope will do as well. + pub fn add_scope(mut self, scope: T) -> ProjectHistoryExecutionStepCreateCall<'a, C, A> + where T: AsRef { + self._scopes.insert(scope.as_ref().to_string(), ()); + self + } +} + + +/// Gets the Tool Results settings for a project. +/// +/// May return any of the following canonical error codes: +/// +/// - PERMISSION_DENIED - if the user is not authorized to read from project +/// +/// A builder for the *getSettings* method supported by a *project* resource. +/// It is not used directly, but through a `ProjectMethods` instance. +/// +/// # Example +/// +/// Instantiate a resource method builder +/// +/// ```test_harness,no_run +/// # extern crate hyper; +/// # extern crate yup_oauth2 as oauth2; +/// # extern crate google_toolresults1_beta3 as toolresults1_beta3; +/// # #[test] fn egal() { +/// # use std::default::Default; +/// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; +/// # use toolresults1_beta3::ToolResults; +/// +/// # let secret: ApplicationSecret = Default::default(); +/// # let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, +/// # hyper::Client::new(), +/// # ::default(), None); +/// # let mut hub = ToolResults::new(hyper::Client::new(), auth); +/// // You can configure optional parameters by calling the respective setters at will, and +/// // execute the final call using `doit()`. +/// // Values shown here are possibly random and not representative ! +/// let result = hub.projects().get_settings("projectId") +/// .doit(); +/// # } +/// ``` +pub struct ProjectGetSettingCall<'a, C, A> + where C: 'a, A: 'a { + + hub: &'a ToolResults, + _project_id: String, + _delegate: Option<&'a mut Delegate>, + _additional_params: HashMap, + _scopes: BTreeMap +} + +impl<'a, C, A> CallBuilder for ProjectGetSettingCall<'a, C, A> {} + +impl<'a, C, A> ProjectGetSettingCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { + + + /// Perform the operation you have build so far. + pub fn doit(mut self) -> Result<(hyper::client::Response, ProjectSettings)> { + use std::io::{Read, Seek}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; + let mut dd = DefaultDelegate; + let mut dlg: &mut Delegate = match self._delegate { + Some(d) => d, + None => &mut dd + }; + dlg.begin(MethodInfo { id: "toolresults.projects.getSettings", + http_method: hyper::method::Method::Get }); + let mut params: Vec<(&str, String)> = Vec::with_capacity((3 + self._additional_params.len())); + params.push(("projectId", self._project_id.to_string())); + for &field in ["alt", "projectId"].iter() { + if self._additional_params.contains_key(field) { + dlg.finished(false); + return Err(Error::FieldClash(field)); + } + } + for (name, value) in self._additional_params.iter() { + params.push((&name, value.clone())); + } + + params.push(("alt", "json".to_string())); + + let mut url = "https://www.googleapis.com/toolresults/v1beta3/projects/{projectId}/settings".to_string(); + if self._scopes.len() == 0 { + self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); + } + + for &(find_this, param_name) in [("{projectId}", "projectId")].iter() { + let mut replace_with: Option<&str> = None; + for &(name, ref value) in params.iter() { + if name == param_name { + replace_with = Some(value); + break; + } + } + url = url.replace(find_this, replace_with.expect("to find substitution value in params")); + } + { + let mut indices_for_removal: Vec = Vec::with_capacity(1); + for param_name in ["projectId"].iter() { + if let Some(index) = params.iter().position(|t| &t.0 == param_name) { + indices_for_removal.push(index); + } + } + for &index in indices_for_removal.iter() { + params.remove(index); + } + } + + if params.len() > 0 { + url.push('?'); + url.push_str(&url::form_urlencoded::serialize(params)); + } + + + + loop { + let token = match self.hub.auth.borrow_mut().token(self._scopes.keys()) { + Ok(token) => token, + Err(err) => { + match dlg.token(&*err) { + Some(token) => token, + None => { + dlg.finished(false); + return Err(Error::MissingToken(err)) + } + } + } + }; + let auth_header = Authorization(Bearer { token: token.access_token }); + let mut req_result = { + let mut client = &mut *self.hub.client.borrow_mut(); + let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) + .header(UserAgent(self.hub._user_agent.clone())) + .header(auth_header.clone()); + + dlg.pre_request(); + req.send() + }; + + match req_result { + Err(err) => { + if let oauth2::Retry::After(d) = dlg.http_error(&err) { + sleep(d); + continue; + } + dlg.finished(false); + return Err(Error::HttpError(err)) + } + Ok(mut res) => { + if !res.status.is_success() { + let mut json_err = String::new(); + res.read_to_string(&mut json_err).unwrap(); + if let oauth2::Retry::After(d) = dlg.http_failure(&res, + json::from_str(&json_err).ok(), + json::from_str(&json_err).ok()) { + sleep(d); + continue; + } + dlg.finished(false); + return match json::from_str::(&json_err){ + Err(_) => Err(Error::Failure(res)), + Ok(serr) => Err(Error::BadRequest(serr)) + } + } + let result_value = { + let mut json_response = String::new(); + res.read_to_string(&mut json_response).unwrap(); + match json::from_str(&json_response) { + Ok(decoded) => (res, decoded), + Err(err) => { + dlg.response_json_decode_error(&json_response, &err); + return Err(Error::JsonDecodeError(json_response, err)); + } + } + }; + + dlg.finished(true); + return Ok(result_value) + } + } + } + } + + + /// A Project id. + /// + /// Required. + /// + /// Sets the *project id* path property to the given value. + /// + /// Even though the property as already been set when instantiating this call, + /// we provide this method for API completeness. + pub fn project_id(mut self, new_value: &str) -> ProjectGetSettingCall<'a, C, A> { + self._project_id = new_value.to_string(); + self + } + /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong + /// while executing the actual API request. + /// + /// It should be used to handle progress information, and to implement a certain level of resilience. + /// + /// Sets the *delegate* property to the given value. + pub fn delegate(mut self, new_value: &'a mut Delegate) -> ProjectGetSettingCall<'a, C, A> { + self._delegate = Some(new_value); + self + } + + /// Set any additional parameter of the query string used in the request. + /// It should be used to set parameters which are not yet available through their own + /// setters. + /// + /// Please note that this method must not be used to set any of the known paramters + /// which have their own setter method. If done anyway, the request will fail. + /// + /// # Additional Parameters + /// + /// * *quotaUser* (query-string) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. Overrides userIp if both are provided. + /// * *oauth_token* (query-string) - OAuth 2.0 token for the current user. + /// * *key* (query-string) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. + /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. + /// * *userIp* (query-string) - IP address of the site where the request originates. Use this if you want to enforce per-user limits. + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *alt* (query-string) - Data format for the response. + pub fn param(mut self, name: T, value: T) -> ProjectGetSettingCall<'a, C, A> + where T: AsRef { + self._additional_params.insert(name.as_ref().to_string(), value.as_ref().to_string()); + self + } + + /// Identifies the authorization scope for the method you are building. + /// + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::CloudPlatform`. + /// + /// The `scope` will be added to a set of scopes. This is important as one can maintain access + /// tokens for more than one scope. + /// + /// Usually there is more than one suitable scope to authorize an operation, some of which may + /// encompass more rights than others. For example, for listing resources, a *read-only* scope will be + /// sufficient, a read-write scope will do as well. + pub fn add_scope(mut self, scope: T) -> ProjectGetSettingCall<'a, C, A> + where T: AsRef { + self._scopes.insert(scope.as_ref().to_string(), ()); + self + } +} + + +/// Lists Histories for a given Project. +/// +/// The executions are sorted by creation_time in descending order. The execution_id key will be used to order the executions with the same creation_time. +/// +/// May return any of the following canonical error codes: +/// +/// - PERMISSION_DENIED - if the user is not authorized to read project - INVALID_ARGUMENT - if the request is malformed - NOT_FOUND - if the containing History does not exist +/// +/// A builder for the *histories.executions.list* method supported by a *project* resource. +/// It is not used directly, but through a `ProjectMethods` instance. +/// +/// # Example +/// +/// Instantiate a resource method builder +/// +/// ```test_harness,no_run +/// # extern crate hyper; +/// # extern crate yup_oauth2 as oauth2; +/// # extern crate google_toolresults1_beta3 as toolresults1_beta3; +/// # #[test] fn egal() { +/// # use std::default::Default; +/// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; +/// # use toolresults1_beta3::ToolResults; +/// +/// # let secret: ApplicationSecret = Default::default(); +/// # let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, +/// # hyper::Client::new(), +/// # ::default(), None); +/// # let mut hub = ToolResults::new(hyper::Client::new(), auth); +/// // You can configure optional parameters by calling the respective setters at will, and +/// // execute the final call using `doit()`. +/// // Values shown here are possibly random and not representative ! +/// let result = hub.projects().histories_executions_list("projectId", "historyId") +/// .page_token("ut") +/// .page_size(-16) +/// .doit(); +/// # } +/// ``` +pub struct ProjectHistoryExecutionListCall<'a, C, A> + where C: 'a, A: 'a { + + hub: &'a ToolResults, + _project_id: String, + _history_id: String, + _page_token: Option, + _page_size: Option, + _delegate: Option<&'a mut Delegate>, + _additional_params: HashMap, + _scopes: BTreeMap +} + +impl<'a, C, A> CallBuilder for ProjectHistoryExecutionListCall<'a, C, A> {} + +impl<'a, C, A> ProjectHistoryExecutionListCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { + + + /// Perform the operation you have build so far. + pub fn doit(mut self) -> Result<(hyper::client::Response, ListExecutionsResponse)> { + use std::io::{Read, Seek}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; + let mut dd = DefaultDelegate; + let mut dlg: &mut Delegate = match self._delegate { + Some(d) => d, + None => &mut dd + }; + dlg.begin(MethodInfo { id: "toolresults.projects.histories.executions.list", + http_method: hyper::method::Method::Get }); + let mut params: Vec<(&str, String)> = Vec::with_capacity((6 + self._additional_params.len())); + params.push(("projectId", self._project_id.to_string())); + params.push(("historyId", self._history_id.to_string())); + if let Some(value) = self._page_token { + params.push(("pageToken", value.to_string())); + } + if let Some(value) = self._page_size { + params.push(("pageSize", value.to_string())); + } + for &field in ["alt", "projectId", "historyId", "pageToken", "pageSize"].iter() { + if self._additional_params.contains_key(field) { + dlg.finished(false); + return Err(Error::FieldClash(field)); + } + } + for (name, value) in self._additional_params.iter() { + params.push((&name, value.clone())); + } + + params.push(("alt", "json".to_string())); + + let mut url = "https://www.googleapis.com/toolresults/v1beta3/projects/{projectId}/histories/{historyId}/executions".to_string(); + if self._scopes.len() == 0 { + self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); + } + + for &(find_this, param_name) in [("{projectId}", "projectId"), ("{historyId}", "historyId")].iter() { + let mut replace_with: Option<&str> = None; + for &(name, ref value) in params.iter() { + if name == param_name { + replace_with = Some(value); + break; + } + } + url = url.replace(find_this, replace_with.expect("to find substitution value in params")); + } + { + let mut indices_for_removal: Vec = Vec::with_capacity(2); + for param_name in ["historyId", "projectId"].iter() { + if let Some(index) = params.iter().position(|t| &t.0 == param_name) { + indices_for_removal.push(index); + } + } + for &index in indices_for_removal.iter() { + params.remove(index); + } + } + + if params.len() > 0 { + url.push('?'); + url.push_str(&url::form_urlencoded::serialize(params)); + } + + + + loop { + let token = match self.hub.auth.borrow_mut().token(self._scopes.keys()) { + Ok(token) => token, + Err(err) => { + match dlg.token(&*err) { + Some(token) => token, + None => { + dlg.finished(false); + return Err(Error::MissingToken(err)) + } + } + } + }; + let auth_header = Authorization(Bearer { token: token.access_token }); + let mut req_result = { + let mut client = &mut *self.hub.client.borrow_mut(); + let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) + .header(UserAgent(self.hub._user_agent.clone())) + .header(auth_header.clone()); + + dlg.pre_request(); + req.send() + }; + + match req_result { + Err(err) => { + if let oauth2::Retry::After(d) = dlg.http_error(&err) { + sleep(d); + continue; + } + dlg.finished(false); + return Err(Error::HttpError(err)) + } + Ok(mut res) => { + if !res.status.is_success() { + let mut json_err = String::new(); + res.read_to_string(&mut json_err).unwrap(); + if let oauth2::Retry::After(d) = dlg.http_failure(&res, + json::from_str(&json_err).ok(), + json::from_str(&json_err).ok()) { + sleep(d); + continue; + } + dlg.finished(false); + return match json::from_str::(&json_err){ + Err(_) => Err(Error::Failure(res)), + Ok(serr) => Err(Error::BadRequest(serr)) + } + } + let result_value = { + let mut json_response = String::new(); + res.read_to_string(&mut json_response).unwrap(); + match json::from_str(&json_response) { + Ok(decoded) => (res, decoded), + Err(err) => { + dlg.response_json_decode_error(&json_response, &err); + return Err(Error::JsonDecodeError(json_response, err)); + } + } + }; + + dlg.finished(true); + return Ok(result_value) + } + } + } + } + + + /// A Project id. + /// + /// Required. + /// + /// Sets the *project id* path property to the given value. + /// + /// Even though the property as already been set when instantiating this call, + /// we provide this method for API completeness. + pub fn project_id(mut self, new_value: &str) -> ProjectHistoryExecutionListCall<'a, C, A> { + self._project_id = new_value.to_string(); + self + } + /// A History id. + /// + /// Required. + /// + /// Sets the *history id* path property to the given value. + /// + /// Even though the property as already been set when instantiating this call, + /// we provide this method for API completeness. + pub fn history_id(mut self, new_value: &str) -> ProjectHistoryExecutionListCall<'a, C, A> { + self._history_id = new_value.to_string(); + self + } + /// A continuation token to resume the query at the next item. + /// + /// Optional. + /// + /// Sets the *page token* query property to the given value. + pub fn page_token(mut self, new_value: &str) -> ProjectHistoryExecutionListCall<'a, C, A> { + self._page_token = Some(new_value.to_string()); + self + } + /// The maximum number of Executions to fetch. + /// + /// Default value: 25. The server will use this default if the field is not set or has a value of 0. + /// + /// Optional. + /// + /// Sets the *page size* query property to the given value. + pub fn page_size(mut self, new_value: i32) -> ProjectHistoryExecutionListCall<'a, C, A> { + self._page_size = Some(new_value); + self + } + /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong + /// while executing the actual API request. + /// + /// It should be used to handle progress information, and to implement a certain level of resilience. + /// + /// Sets the *delegate* property to the given value. + pub fn delegate(mut self, new_value: &'a mut Delegate) -> ProjectHistoryExecutionListCall<'a, C, A> { + self._delegate = Some(new_value); + self + } + + /// Set any additional parameter of the query string used in the request. + /// It should be used to set parameters which are not yet available through their own + /// setters. + /// + /// Please note that this method must not be used to set any of the known paramters + /// which have their own setter method. If done anyway, the request will fail. + /// + /// # Additional Parameters + /// + /// * *quotaUser* (query-string) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. Overrides userIp if both are provided. + /// * *oauth_token* (query-string) - OAuth 2.0 token for the current user. + /// * *key* (query-string) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. + /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. + /// * *userIp* (query-string) - IP address of the site where the request originates. Use this if you want to enforce per-user limits. + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *alt* (query-string) - Data format for the response. + pub fn param(mut self, name: T, value: T) -> ProjectHistoryExecutionListCall<'a, C, A> + where T: AsRef { + self._additional_params.insert(name.as_ref().to_string(), value.as_ref().to_string()); + self + } + + /// Identifies the authorization scope for the method you are building. + /// + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::CloudPlatform`. + /// + /// The `scope` will be added to a set of scopes. This is important as one can maintain access + /// tokens for more than one scope. + /// + /// Usually there is more than one suitable scope to authorize an operation, some of which may + /// encompass more rights than others. For example, for listing resources, a *read-only* scope will be + /// sufficient, a read-write scope will do as well. + pub fn add_scope(mut self, scope: T) -> ProjectHistoryExecutionListCall<'a, C, A> + where T: AsRef { + self._scopes.insert(scope.as_ref().to_string(), ()); + self + } +} + + +/// Creates a History. +/// +/// The returned History will have the id set. +/// +/// May return any of the following canonical error codes: +/// +/// - PERMISSION_DENIED - if the user is not authorized to write to project - INVALID_ARGUMENT - if the request is malformed - NOT_FOUND - if the containing project does not exist +/// +/// A builder for the *histories.create* method supported by a *project* resource. +/// It is not used directly, but through a `ProjectMethods` instance. +/// +/// # Example +/// +/// Instantiate a resource method builder +/// +/// ```test_harness,no_run +/// # extern crate hyper; +/// # extern crate yup_oauth2 as oauth2; +/// # extern crate google_toolresults1_beta3 as toolresults1_beta3; +/// use toolresults1_beta3::History; +/// # #[test] fn egal() { +/// # use std::default::Default; +/// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; +/// # use toolresults1_beta3::ToolResults; +/// +/// # let secret: ApplicationSecret = Default::default(); +/// # let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, +/// # hyper::Client::new(), +/// # ::default(), None); +/// # let mut hub = ToolResults::new(hyper::Client::new(), auth); +/// // As the method needs a request, you would usually fill it with the desired information +/// // into the respective structure. Some of the parts shown here might not be applicable ! +/// // Values shown here are possibly random and not representative ! +/// let mut req = History::default(); +/// +/// // You can configure optional parameters by calling the respective setters at will, and +/// // execute the final call using `doit()`. +/// // Values shown here are possibly random and not representative ! +/// let result = hub.projects().histories_create(req, "projectId") +/// .request_id("dolor") +/// .doit(); +/// # } +/// ``` +pub struct ProjectHistoryCreateCall<'a, C, A> + where C: 'a, A: 'a { + + hub: &'a ToolResults, + _request: History, + _project_id: String, + _request_id: Option, + _delegate: Option<&'a mut Delegate>, + _additional_params: HashMap, + _scopes: BTreeMap +} + +impl<'a, C, A> CallBuilder for ProjectHistoryCreateCall<'a, C, A> {} + +impl<'a, C, A> ProjectHistoryCreateCall<'a, C, A> where C: BorrowMut, A: oauth2::GetToken { + + + /// Perform the operation you have build so far. + pub fn doit(mut self) -> Result<(hyper::client::Response, History)> { + use std::io::{Read, Seek}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; + let mut dd = DefaultDelegate; + let mut dlg: &mut Delegate = match self._delegate { + Some(d) => d, + None => &mut dd + }; + dlg.begin(MethodInfo { id: "toolresults.projects.histories.create", + http_method: hyper::method::Method::Post }); + let mut params: Vec<(&str, String)> = Vec::with_capacity((5 + self._additional_params.len())); + params.push(("projectId", self._project_id.to_string())); + if let Some(value) = self._request_id { + params.push(("requestId", value.to_string())); + } + for &field in ["alt", "projectId", "requestId"].iter() { + if self._additional_params.contains_key(field) { + dlg.finished(false); + return Err(Error::FieldClash(field)); + } + } + for (name, value) in self._additional_params.iter() { + params.push((&name, value.clone())); + } + + params.push(("alt", "json".to_string())); + + let mut url = "https://www.googleapis.com/toolresults/v1beta3/projects/{projectId}/histories".to_string(); + if self._scopes.len() == 0 { + self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); + } + + for &(find_this, param_name) in [("{projectId}", "projectId")].iter() { + let mut replace_with: Option<&str> = None; + for &(name, ref value) in params.iter() { + if name == param_name { + replace_with = Some(value); + break; + } + } + url = url.replace(find_this, replace_with.expect("to find substitution value in params")); + } + { + let mut indices_for_removal: Vec = Vec::with_capacity(1); + for param_name in ["projectId"].iter() { + if let Some(index) = params.iter().position(|t| &t.0 == param_name) { + indices_for_removal.push(index); + } + } + for &index in indices_for_removal.iter() { + params.remove(index); + } + } + + if params.len() > 0 { + url.push('?'); + url.push_str(&url::form_urlencoded::serialize(params)); + } + + let mut json_mime_type = mime::Mime(mime::TopLevel::Application, mime::SubLevel::Json, Default::default()); + let mut request_value_reader = + { + let mut value = json::value::to_value(&self._request); + remove_json_null_values(&mut value); + let mut dst = io::Cursor::new(Vec::with_capacity(128)); + json::to_writer(&mut dst, &value).unwrap(); + dst + }; + let request_size = request_value_reader.seek(io::SeekFrom::End(0)).unwrap(); + request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); + + + loop { + let token = match self.hub.auth.borrow_mut().token(self._scopes.keys()) { + Ok(token) => token, + Err(err) => { + match dlg.token(&*err) { + Some(token) => token, + None => { + dlg.finished(false); + return Err(Error::MissingToken(err)) + } + } + } + }; + let auth_header = Authorization(Bearer { token: token.access_token }); + request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); + let mut req_result = { + let mut client = &mut *self.hub.client.borrow_mut(); + let mut req = client.borrow_mut().request(hyper::method::Method::Post, &url) + .header(UserAgent(self.hub._user_agent.clone())) + .header(auth_header.clone()) + .header(ContentType(json_mime_type.clone())) + .header(ContentLength(request_size as u64)) + .body(&mut request_value_reader); + + dlg.pre_request(); + req.send() + }; + + match req_result { + Err(err) => { + if let oauth2::Retry::After(d) = dlg.http_error(&err) { + sleep(d); + continue; + } + dlg.finished(false); + return Err(Error::HttpError(err)) + } + Ok(mut res) => { + if !res.status.is_success() { + let mut json_err = String::new(); + res.read_to_string(&mut json_err).unwrap(); + if let oauth2::Retry::After(d) = dlg.http_failure(&res, + json::from_str(&json_err).ok(), + json::from_str(&json_err).ok()) { + sleep(d); + continue; + } + dlg.finished(false); + return match json::from_str::(&json_err){ + Err(_) => Err(Error::Failure(res)), + Ok(serr) => Err(Error::BadRequest(serr)) + } + } + let result_value = { + let mut json_response = String::new(); + res.read_to_string(&mut json_response).unwrap(); + match json::from_str(&json_response) { + Ok(decoded) => (res, decoded), + Err(err) => { + dlg.response_json_decode_error(&json_response, &err); + return Err(Error::JsonDecodeError(json_response, err)); + } + } + }; + + dlg.finished(true); + return Ok(result_value) + } + } + } + } + + + /// + /// Sets the *request* property to the given value. + /// + /// Even though the property as already been set when instantiating this call, + /// we provide this method for API completeness. + pub fn request(mut self, new_value: History) -> ProjectHistoryCreateCall<'a, C, A> { + self._request = new_value; + self + } + /// A Project id. + /// + /// Required. + /// + /// Sets the *project id* path property to the given value. + /// + /// Even though the property as already been set when instantiating this call, + /// we provide this method for API completeness. + pub fn project_id(mut self, new_value: &str) -> ProjectHistoryCreateCall<'a, C, A> { + self._project_id = new_value.to_string(); + self + } + /// A unique request ID for server to detect duplicated requests. For example, a UUID. + /// + /// Optional, but strongly recommended. + /// + /// Sets the *request id* query property to the given value. + pub fn request_id(mut self, new_value: &str) -> ProjectHistoryCreateCall<'a, C, A> { + self._request_id = Some(new_value.to_string()); + self + } + /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong + /// while executing the actual API request. + /// + /// It should be used to handle progress information, and to implement a certain level of resilience. + /// + /// Sets the *delegate* property to the given value. + pub fn delegate(mut self, new_value: &'a mut Delegate) -> ProjectHistoryCreateCall<'a, C, A> { + self._delegate = Some(new_value); + self + } + + /// Set any additional parameter of the query string used in the request. + /// It should be used to set parameters which are not yet available through their own + /// setters. + /// + /// Please note that this method must not be used to set any of the known paramters + /// which have their own setter method. If done anyway, the request will fail. + /// + /// # Additional Parameters + /// + /// * *quotaUser* (query-string) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. Overrides userIp if both are provided. + /// * *oauth_token* (query-string) - OAuth 2.0 token for the current user. + /// * *key* (query-string) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. + /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. + /// * *userIp* (query-string) - IP address of the site where the request originates. Use this if you want to enforce per-user limits. + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *alt* (query-string) - Data format for the response. + pub fn param(mut self, name: T, value: T) -> ProjectHistoryCreateCall<'a, C, A> + where T: AsRef { + self._additional_params.insert(name.as_ref().to_string(), value.as_ref().to_string()); + self + } + + /// Identifies the authorization scope for the method you are building. + /// + /// Use this method to actively specify which scope should be used, instead the default `Scope` variant + /// `Scope::CloudPlatform`. + /// + /// The `scope` will be added to a set of scopes. This is important as one can maintain access + /// tokens for more than one scope. + /// + /// Usually there is more than one suitable scope to authorize an operation, some of which may + /// encompass more rights than others. For example, for listing resources, a *read-only* scope will be + /// sufficient, a read-write scope will do as well. + pub fn add_scope(mut self, scope: T) -> ProjectHistoryCreateCall<'a, C, A> + where T: AsRef { + self._scopes.insert(scope.as_ref().to_string(), ()); + self + } +} + + diff --git a/gen/translate2-cli/Cargo.toml b/gen/translate2-cli/Cargo.toml index 3db457d903..03d567898b 100644 --- a/gen/translate2-cli/Cargo.toml +++ b/gen/translate2-cli/Cargo.toml @@ -4,7 +4,7 @@ [package] name = "google-translate2-cli" -version = "0.3.3+20160217" +version = "0.3.4+20160217" authors = ["Sebastian Thiel "] description = "A complete library to interact with translate (protocol v2)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/translate2-cli" @@ -17,18 +17,18 @@ keywords = ["translate", "google", "cli"] name = "translate2" [dependencies] -hyper = "0.7" -mime = "0.1.0" -serde = ">= 0.7.0" -serde_json = ">= 0.7.0" -yup-oauth2 = ">= 0.5.4" +hyper = "0.8" +mime = "0.2.0" +serde = "0.6.0" +serde_json = "0.6.0" +yup-oauth2 = ">= 0.5.6" strsim = "0.4" yup-hyper-mock = "1.0" clap = "2.0" [build-dependencies] -syntex = { version = ">= 0.23" } -serde_codegen = { version = ">= 0.6" } +syntex = { version = "= 0.28" } +serde_codegen = { version = "= 0.6.13" } [dependencies.google-translate2] diff --git a/gen/translate2-cli/README.md b/gen/translate2-cli/README.md index b235271ed3..16e5a0b383 100644 --- a/gen/translate2-cli/README.md +++ b/gen/translate2-cli/README.md @@ -17,14 +17,14 @@ Everything else about the *translate* API can be found at the You can download the pre-compiled 64bit binaries for the following platforms: -* ![icon](http://megaicons.net/static/img/icons_sizes/6/140/16/ubuntu-icon.png) [ubuntu](http://dl.byronimo.de/google.rs/cli/0.3.3/ubuntu/translate2.tar.gz) -* ![icon](http://hydra-media.cursecdn.com/wow.gamepedia.com/a/a2/Apple-icon-16x16.png?version=25ddd67ac3dd3b634478e3978b76cb74) [osx](http://dl.byronimo.de/google.rs/cli/0.3.3/osx/translate2.tar.gz) +* ![icon](http://megaicons.net/static/img/icons_sizes/6/140/16/ubuntu-icon.png) [ubuntu](http://dl.byronimo.de/google.rs/cli/0.3.4/ubuntu/translate2.tar.gz) +* ![icon](http://hydra-media.cursecdn.com/wow.gamepedia.com/a/a2/Apple-icon-16x16.png?version=25ddd67ac3dd3b634478e3978b76cb74) [osx](http://dl.byronimo.de/google.rs/cli/0.3.4/osx/translate2.tar.gz) Find the source code [on github](https://github.com/Byron/google-apis-rs/tree/master/gen/translate2-cli). # Usage -This documentation was generated from the *translate* API at revision *20160217*. The CLI is at version *0.3.3*. +This documentation was generated from the *translate* API at revision *20160217*. The CLI is at version *0.3.4*. ```bash translate2 [options] diff --git a/gen/translate2-cli/mkdocs.yml b/gen/translate2-cli/mkdocs.yml index 2a59e0e4c4..7a4c238a0c 100644 --- a/gen/translate2-cli/mkdocs.yml +++ b/gen/translate2-cli/mkdocs.yml @@ -1,4 +1,4 @@ -site_name: translate v0.3.3+20160217 +site_name: translate v0.3.4+20160217 site_url: http://byron.github.io/google-apis-rs/google-translate2-cli site_description: Write integrating applications with bcore diff --git a/gen/translate2-cli/src/cmn.rs b/gen/translate2-cli/src/cmn.rs index 188159ee80..ae86fdef65 100644 --- a/gen/translate2-cli/src/cmn.rs +++ b/gen/translate2-cli/src/cmn.rs @@ -414,7 +414,7 @@ impl TokenStorage for JsonTokenStorage { Err(err) => match err.kind() { io::ErrorKind::NotFound => Ok(()), - _ => Err(json::Error::Io(err)) + _ => Err(json::Error::IoError(err)) }, Ok(_) => Ok(()), } @@ -427,7 +427,7 @@ impl TokenStorage for JsonTokenStorage { Err(serde_err) => Err(serde_err), } }, - Err(io_err) => Err(json::Error::Io(io_err)) + Err(io_err) => Err(json::Error::IoError(io_err)) } } } @@ -444,7 +444,7 @@ impl TokenStorage for JsonTokenStorage { Err(io_err) => { match io_err.kind() { io::ErrorKind::NotFound => Ok(None), - _ => Err(json::Error::Io(io_err)) + _ => Err(json::Error::IoError(io_err)) } } } @@ -683,7 +683,7 @@ pub fn application_secret_from_directory(dir: &str, = json::from_str(json_console_secret).unwrap(); match json::to_writer_pretty(&mut f, &console_secret) { Err(serde_err) => match serde_err { - json::Error::Io(err) => err, + json::Error::IoError(err) => err, _ => panic!("Unexpected serde error: {:#?}", serde_err) }, Ok(_) => continue, @@ -696,7 +696,7 @@ pub fn application_secret_from_directory(dir: &str, }, Ok(f) => { match json::de::from_reader::<_, ConsoleApplicationSecret>(f) { - Err(json::Error::Io(err)) => + Err(json::Error::IoError(err)) => return secret_io_error(err), Err(json_err) => return Err(CLIError::Configuration( diff --git a/gen/translate2-cli/src/main.rs b/gen/translate2-cli/src/main.rs index a90cb012db..3b03438037 100644 --- a/gen/translate2-cli/src/main.rs +++ b/gen/translate2-cli/src/main.rs @@ -405,7 +405,7 @@ fn main() { let mut app = App::new("translate2") .author("Sebastian Thiel ") - .version("0.3.3+20160217") + .version("0.3.4+20160217") .about("Lets you translate text from one language to another") .after_help("All documentation details can be found at http://byron.github.io/google-apis-rs/google_translate2_cli") .arg(Arg::with_name("folder") diff --git a/gen/translate2/Cargo.toml b/gen/translate2/Cargo.toml index ed19e71cb1..91137004bc 100644 --- a/gen/translate2/Cargo.toml +++ b/gen/translate2/Cargo.toml @@ -4,7 +4,7 @@ [package] name = "google-translate2" -version = "0.1.12+20160217" +version = "0.1.13+20160217" authors = ["Sebastian Thiel "] description = "A complete library to interact with translate (protocol v2)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/translate2" @@ -16,14 +16,14 @@ build = "src/build.rs" [dependencies] -hyper = "0.7" -mime = "0.1.0" -serde = ">= 0.7.0" -serde_json = ">= 0.7.0" -yup-oauth2 = ">= 0.5.4" +hyper = "0.8" +mime = "0.2.0" +serde = "0.6.0" +serde_json = "0.6.0" +yup-oauth2 = ">= 0.5.6" url = ">= 0.5" [build-dependencies] -syntex = { version = ">= 0.23" } -serde_codegen = { version = ">= 0.6" } +syntex = { version = "= 0.28" } +serde_codegen = { version = "= 0.6.13" } diff --git a/gen/translate2/README.md b/gen/translate2/README.md index 70f951cef0..3473e843a5 100644 --- a/gen/translate2/README.md +++ b/gen/translate2/README.md @@ -5,7 +5,7 @@ DO NOT EDIT ! --> The `google-translate2` library allows access to all features of the *Google translate* service. -This documentation was generated from *translate* crate version *0.1.12+20160217*, where *20160217* is the exact revision of the *translate:v2* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.12*. +This documentation was generated from *translate* crate version *0.1.13+20160217*, where *20160217* is the exact revision of the *translate:v2* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.13*. Everything else about the *translate* *v2* API can be found at the [official documentation site](https://developers.google.com/translate/v2/using_rest). diff --git a/gen/translate2/src/cmn.rs b/gen/translate2/src/cmn.rs index 87b91a8986..c69621da55 100644 --- a/gen/translate2/src/cmn.rs +++ b/gen/translate2/src/cmn.rs @@ -12,7 +12,7 @@ use mime::{Mime, TopLevel, SubLevel, Attr, Value}; use oauth2::{TokenType, Retry, self}; use hyper; use hyper::header::{ContentType, ContentLength, Headers, UserAgent, Authorization, Header, - HeaderFormat}; + HeaderFormat, Bearer}; use hyper::http::h1::LINE_ENDING; use hyper::method::Method; use hyper::status::StatusCode; @@ -634,7 +634,7 @@ pub struct ResumableUploadHelper<'a, A: 'a> { pub start_at: Option, pub auth: &'a mut A, pub user_agent: &'a str, - pub auth_header: Authorization, + pub auth_header: Authorization, pub url: &'a str, pub reader: &'a mut ReadSeek, pub media_type: Mime, diff --git a/gen/translate2/src/lib.rs b/gen/translate2/src/lib.rs index 4083df4ae7..abf8c87532 100644 --- a/gen/translate2/src/lib.rs +++ b/gen/translate2/src/lib.rs @@ -2,7 +2,7 @@ // This file was generated automatically from 'src/mako/api/lib.rs.mako' // DO NOT EDIT ! -//! This documentation was generated from *translate* crate version *0.1.12+20160217*, where *20160217* is the exact revision of the *translate:v2* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.12*. +//! This documentation was generated from *translate* crate version *0.1.13+20160217*, where *20160217* is the exact revision of the *translate:v2* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.13*. //! //! Everything else about the *translate* *v2* API can be found at the //! [official documentation site](https://developers.google.com/translate/v2/using_rest). diff --git a/gen/translate2/src/lib.rs.in b/gen/translate2/src/lib.rs.in index 6a205763b7..c71e24ff42 100644 --- a/gen/translate2/src/lib.rs.in +++ b/gen/translate2/src/lib.rs.in @@ -105,7 +105,7 @@ impl<'a, C, A> Translate Translate { client: RefCell::new(client), auth: RefCell::new(authenticator), - _user_agent: "google-api-rust-client/0.1.12".to_string(), + _user_agent: "google-api-rust-client/0.1.13".to_string(), } } @@ -120,7 +120,7 @@ impl<'a, C, A> Translate } /// Set the user-agent header field to use in all requests to the server. - /// It defaults to `google-api-rust-client/0.1.12`. + /// It defaults to `google-api-rust-client/0.1.13`. /// /// Returns the previously set user-agent. pub fn user_agent(&mut self, agent_name: String) -> String { @@ -490,7 +490,7 @@ impl<'a, C, A> LanguageListCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, LanguagesListResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -681,7 +681,7 @@ impl<'a, C, A> DetectionListCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, DetectionsListResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -885,7 +885,7 @@ impl<'a, C, A> TranslationListCall<'a, C, A> where C: BorrowMut, /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, TranslationsListResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, diff --git a/gen/urlshortener1-cli/Cargo.toml b/gen/urlshortener1-cli/Cargo.toml index 5ec373c5f6..92c2e57982 100644 --- a/gen/urlshortener1-cli/Cargo.toml +++ b/gen/urlshortener1-cli/Cargo.toml @@ -4,7 +4,7 @@ [package] name = "google-urlshortener1-cli" -version = "0.3.3+20150519" +version = "0.3.4+20150519" authors = ["Sebastian Thiel "] description = "A complete library to interact with urlshortener (protocol v1)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/urlshortener1-cli" @@ -17,18 +17,18 @@ keywords = ["urlshortener", "google", "cli"] name = "urlshortener1" [dependencies] -hyper = "0.7" -mime = "0.1.0" -serde = ">= 0.7.0" -serde_json = ">= 0.7.0" -yup-oauth2 = ">= 0.5.4" +hyper = "0.8" +mime = "0.2.0" +serde = "0.6.0" +serde_json = "0.6.0" +yup-oauth2 = ">= 0.5.6" strsim = "0.4" yup-hyper-mock = "1.0" clap = "2.0" [build-dependencies] -syntex = { version = ">= 0.23" } -serde_codegen = { version = ">= 0.6" } +syntex = { version = "= 0.28" } +serde_codegen = { version = "= 0.6.13" } [dependencies.google-urlshortener1] diff --git a/gen/urlshortener1-cli/README.md b/gen/urlshortener1-cli/README.md index 0a545c75c2..ebf9d75265 100644 --- a/gen/urlshortener1-cli/README.md +++ b/gen/urlshortener1-cli/README.md @@ -17,14 +17,14 @@ Everything else about the *urlshortener* API can be found at the You can download the pre-compiled 64bit binaries for the following platforms: -* ![icon](http://megaicons.net/static/img/icons_sizes/6/140/16/ubuntu-icon.png) [ubuntu](http://dl.byronimo.de/google.rs/cli/0.3.3/ubuntu/urlshortener1.tar.gz) -* ![icon](http://hydra-media.cursecdn.com/wow.gamepedia.com/a/a2/Apple-icon-16x16.png?version=25ddd67ac3dd3b634478e3978b76cb74) [osx](http://dl.byronimo.de/google.rs/cli/0.3.3/osx/urlshortener1.tar.gz) +* ![icon](http://megaicons.net/static/img/icons_sizes/6/140/16/ubuntu-icon.png) [ubuntu](http://dl.byronimo.de/google.rs/cli/0.3.4/ubuntu/urlshortener1.tar.gz) +* ![icon](http://hydra-media.cursecdn.com/wow.gamepedia.com/a/a2/Apple-icon-16x16.png?version=25ddd67ac3dd3b634478e3978b76cb74) [osx](http://dl.byronimo.de/google.rs/cli/0.3.4/osx/urlshortener1.tar.gz) Find the source code [on github](https://github.com/Byron/google-apis-rs/tree/master/gen/urlshortener1-cli). # Usage -This documentation was generated from the *urlshortener* API at revision *20150519*. The CLI is at version *0.3.3*. +This documentation was generated from the *urlshortener* API at revision *20150519*. The CLI is at version *0.3.4*. ```bash urlshortener1 [options] diff --git a/gen/urlshortener1-cli/mkdocs.yml b/gen/urlshortener1-cli/mkdocs.yml index 2a7f019ab3..7ff7b26786 100644 --- a/gen/urlshortener1-cli/mkdocs.yml +++ b/gen/urlshortener1-cli/mkdocs.yml @@ -1,4 +1,4 @@ -site_name: urlshortener v0.3.3+20150519 +site_name: urlshortener v0.3.4+20150519 site_url: http://byron.github.io/google-apis-rs/google-urlshortener1-cli site_description: Write integrating applications with bcore diff --git a/gen/urlshortener1-cli/src/cmn.rs b/gen/urlshortener1-cli/src/cmn.rs index 188159ee80..ae86fdef65 100644 --- a/gen/urlshortener1-cli/src/cmn.rs +++ b/gen/urlshortener1-cli/src/cmn.rs @@ -414,7 +414,7 @@ impl TokenStorage for JsonTokenStorage { Err(err) => match err.kind() { io::ErrorKind::NotFound => Ok(()), - _ => Err(json::Error::Io(err)) + _ => Err(json::Error::IoError(err)) }, Ok(_) => Ok(()), } @@ -427,7 +427,7 @@ impl TokenStorage for JsonTokenStorage { Err(serde_err) => Err(serde_err), } }, - Err(io_err) => Err(json::Error::Io(io_err)) + Err(io_err) => Err(json::Error::IoError(io_err)) } } } @@ -444,7 +444,7 @@ impl TokenStorage for JsonTokenStorage { Err(io_err) => { match io_err.kind() { io::ErrorKind::NotFound => Ok(None), - _ => Err(json::Error::Io(io_err)) + _ => Err(json::Error::IoError(io_err)) } } } @@ -683,7 +683,7 @@ pub fn application_secret_from_directory(dir: &str, = json::from_str(json_console_secret).unwrap(); match json::to_writer_pretty(&mut f, &console_secret) { Err(serde_err) => match serde_err { - json::Error::Io(err) => err, + json::Error::IoError(err) => err, _ => panic!("Unexpected serde error: {:#?}", serde_err) }, Ok(_) => continue, @@ -696,7 +696,7 @@ pub fn application_secret_from_directory(dir: &str, }, Ok(f) => { match json::de::from_reader::<_, ConsoleApplicationSecret>(f) { - Err(json::Error::Io(err)) => + Err(json::Error::IoError(err)) => return secret_io_error(err), Err(json_err) => return Err(CLIError::Configuration( diff --git a/gen/urlshortener1-cli/src/main.rs b/gen/urlshortener1-cli/src/main.rs index f766181162..e56139fed0 100644 --- a/gen/urlshortener1-cli/src/main.rs +++ b/gen/urlshortener1-cli/src/main.rs @@ -430,7 +430,7 @@ fn main() { let mut app = App::new("urlshortener1") .author("Sebastian Thiel ") - .version("0.3.3+20150519") + .version("0.3.4+20150519") .about("Lets you create, inspect, and manage goo.gl short URLs") .after_help("All documentation details can be found at http://byron.github.io/google-apis-rs/google_urlshortener1_cli") .arg(Arg::with_name("url") diff --git a/gen/urlshortener1/Cargo.toml b/gen/urlshortener1/Cargo.toml index 181d75ad13..41be31ea3f 100644 --- a/gen/urlshortener1/Cargo.toml +++ b/gen/urlshortener1/Cargo.toml @@ -4,7 +4,7 @@ [package] name = "google-urlshortener1" -version = "0.1.12+20150519" +version = "0.1.13+20150519" authors = ["Sebastian Thiel "] description = "A complete library to interact with urlshortener (protocol v1)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/urlshortener1" @@ -16,14 +16,14 @@ build = "src/build.rs" [dependencies] -hyper = "0.7" -mime = "0.1.0" -serde = ">= 0.7.0" -serde_json = ">= 0.7.0" -yup-oauth2 = ">= 0.5.4" +hyper = "0.8" +mime = "0.2.0" +serde = "0.6.0" +serde_json = "0.6.0" +yup-oauth2 = ">= 0.5.6" url = ">= 0.5" [build-dependencies] -syntex = { version = ">= 0.23" } -serde_codegen = { version = ">= 0.6" } +syntex = { version = "= 0.28" } +serde_codegen = { version = "= 0.6.13" } diff --git a/gen/urlshortener1/README.md b/gen/urlshortener1/README.md index ce248b2768..a4864ec7c0 100644 --- a/gen/urlshortener1/README.md +++ b/gen/urlshortener1/README.md @@ -5,7 +5,7 @@ DO NOT EDIT ! --> The `google-urlshortener1` library allows access to all features of the *Google urlshortener* service. -This documentation was generated from *urlshortener* crate version *0.1.12+20150519*, where *20150519* is the exact revision of the *urlshortener:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.12*. +This documentation was generated from *urlshortener* crate version *0.1.13+20150519*, where *20150519* is the exact revision of the *urlshortener:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.13*. Everything else about the *urlshortener* *v1* API can be found at the [official documentation site](https://developers.google.com/url-shortener/v1/getting_started). diff --git a/gen/urlshortener1/src/cmn.rs b/gen/urlshortener1/src/cmn.rs index 87b91a8986..c69621da55 100644 --- a/gen/urlshortener1/src/cmn.rs +++ b/gen/urlshortener1/src/cmn.rs @@ -12,7 +12,7 @@ use mime::{Mime, TopLevel, SubLevel, Attr, Value}; use oauth2::{TokenType, Retry, self}; use hyper; use hyper::header::{ContentType, ContentLength, Headers, UserAgent, Authorization, Header, - HeaderFormat}; + HeaderFormat, Bearer}; use hyper::http::h1::LINE_ENDING; use hyper::method::Method; use hyper::status::StatusCode; @@ -634,7 +634,7 @@ pub struct ResumableUploadHelper<'a, A: 'a> { pub start_at: Option, pub auth: &'a mut A, pub user_agent: &'a str, - pub auth_header: Authorization, + pub auth_header: Authorization, pub url: &'a str, pub reader: &'a mut ReadSeek, pub media_type: Mime, diff --git a/gen/urlshortener1/src/lib.rs b/gen/urlshortener1/src/lib.rs index 7d4aaeb7b0..2c1dd83be1 100644 --- a/gen/urlshortener1/src/lib.rs +++ b/gen/urlshortener1/src/lib.rs @@ -2,7 +2,7 @@ // This file was generated automatically from 'src/mako/api/lib.rs.mako' // DO NOT EDIT ! -//! This documentation was generated from *urlshortener* crate version *0.1.12+20150519*, where *20150519* is the exact revision of the *urlshortener:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.12*. +//! This documentation was generated from *urlshortener* crate version *0.1.13+20150519*, where *20150519* is the exact revision of the *urlshortener:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.13*. //! //! Everything else about the *urlshortener* *v1* API can be found at the //! [official documentation site](https://developers.google.com/url-shortener/v1/getting_started). diff --git a/gen/urlshortener1/src/lib.rs.in b/gen/urlshortener1/src/lib.rs.in index ac016dc7ee..fb6091d473 100644 --- a/gen/urlshortener1/src/lib.rs.in +++ b/gen/urlshortener1/src/lib.rs.in @@ -128,7 +128,7 @@ impl<'a, C, A> Urlshortener Urlshortener { client: RefCell::new(client), auth: RefCell::new(authenticator), - _user_agent: "google-api-rust-client/0.1.12".to_string(), + _user_agent: "google-api-rust-client/0.1.13".to_string(), } } @@ -137,7 +137,7 @@ impl<'a, C, A> Urlshortener } /// Set the user-agent header field to use in all requests to the server. - /// It defaults to `google-api-rust-client/0.1.12`. + /// It defaults to `google-api-rust-client/0.1.13`. /// /// Returns the previously set user-agent. pub fn user_agent(&mut self, agent_name: String) -> String { @@ -429,7 +429,7 @@ impl<'a, C, A> UrlInsertCall<'a, C, A> where C: BorrowMut, A: oau /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Url)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -487,8 +487,7 @@ impl<'a, C, A> UrlInsertCall<'a, C, A> where C: BorrowMut, A: oau } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -659,7 +658,7 @@ impl<'a, C, A> UrlGetCall<'a, C, A> where C: BorrowMut, A: oauth2 /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Url)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -710,8 +709,7 @@ impl<'a, C, A> UrlGetCall<'a, C, A> where C: BorrowMut, A: oauth2 } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -887,7 +885,7 @@ impl<'a, C, A> UrlListCall<'a, C, A> where C: BorrowMut, A: oauth /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, UrlHistory)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -940,8 +938,7 @@ impl<'a, C, A> UrlListCall<'a, C, A> where C: BorrowMut, A: oauth } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) diff --git a/gen/webfonts1-cli/Cargo.toml b/gen/webfonts1-cli/Cargo.toml index 8306122ea8..887c50e2a8 100644 --- a/gen/webfonts1-cli/Cargo.toml +++ b/gen/webfonts1-cli/Cargo.toml @@ -4,7 +4,7 @@ [package] name = "google-webfonts1-cli" -version = "0.3.3+20140210" +version = "0.3.4+20160302" authors = ["Sebastian Thiel "] description = "A complete library to interact with webfonts (protocol v1)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/webfonts1-cli" @@ -17,18 +17,18 @@ keywords = ["webfonts", "google", "cli"] name = "webfonts1" [dependencies] -hyper = "0.7" -mime = "0.1.0" -serde = ">= 0.7.0" -serde_json = ">= 0.7.0" -yup-oauth2 = ">= 0.5.4" +hyper = "0.8" +mime = "0.2.0" +serde = "0.6.0" +serde_json = "0.6.0" +yup-oauth2 = ">= 0.5.6" strsim = "0.4" yup-hyper-mock = "1.0" clap = "2.0" [build-dependencies] -syntex = { version = ">= 0.23" } -serde_codegen = { version = ">= 0.6" } +syntex = { version = "= 0.28" } +serde_codegen = { version = "= 0.6.13" } [dependencies.google-webfonts1] diff --git a/gen/webfonts1-cli/README.md b/gen/webfonts1-cli/README.md index f28bd6acfc..2bd648c756 100644 --- a/gen/webfonts1-cli/README.md +++ b/gen/webfonts1-cli/README.md @@ -17,14 +17,14 @@ Everything else about the *webfonts* API can be found at the You can download the pre-compiled 64bit binaries for the following platforms: -* ![icon](http://megaicons.net/static/img/icons_sizes/6/140/16/ubuntu-icon.png) [ubuntu](http://dl.byronimo.de/google.rs/cli/0.3.3/ubuntu/webfonts1.tar.gz) -* ![icon](http://hydra-media.cursecdn.com/wow.gamepedia.com/a/a2/Apple-icon-16x16.png?version=25ddd67ac3dd3b634478e3978b76cb74) [osx](http://dl.byronimo.de/google.rs/cli/0.3.3/osx/webfonts1.tar.gz) +* ![icon](http://megaicons.net/static/img/icons_sizes/6/140/16/ubuntu-icon.png) [ubuntu](http://dl.byronimo.de/google.rs/cli/0.3.4/ubuntu/webfonts1.tar.gz) +* ![icon](http://hydra-media.cursecdn.com/wow.gamepedia.com/a/a2/Apple-icon-16x16.png?version=25ddd67ac3dd3b634478e3978b76cb74) [osx](http://dl.byronimo.de/google.rs/cli/0.3.4/osx/webfonts1.tar.gz) Find the source code [on github](https://github.com/Byron/google-apis-rs/tree/master/gen/webfonts1-cli). # Usage -This documentation was generated from the *webfonts* API at revision *20140210*. The CLI is at version *0.3.3*. +This documentation was generated from the *webfonts* API at revision *20160302*. The CLI is at version *0.3.4*. ```bash webfonts1 [options] diff --git a/gen/webfonts1-cli/mkdocs.yml b/gen/webfonts1-cli/mkdocs.yml index 997c0c8c57..448c231f63 100644 --- a/gen/webfonts1-cli/mkdocs.yml +++ b/gen/webfonts1-cli/mkdocs.yml @@ -1,4 +1,4 @@ -site_name: webfonts v0.3.3+20140210 +site_name: webfonts v0.3.4+20160302 site_url: http://byron.github.io/google-apis-rs/google-webfonts1-cli site_description: Write integrating applications with bcore diff --git a/gen/webfonts1-cli/src/cmn.rs b/gen/webfonts1-cli/src/cmn.rs index 188159ee80..ae86fdef65 100644 --- a/gen/webfonts1-cli/src/cmn.rs +++ b/gen/webfonts1-cli/src/cmn.rs @@ -414,7 +414,7 @@ impl TokenStorage for JsonTokenStorage { Err(err) => match err.kind() { io::ErrorKind::NotFound => Ok(()), - _ => Err(json::Error::Io(err)) + _ => Err(json::Error::IoError(err)) }, Ok(_) => Ok(()), } @@ -427,7 +427,7 @@ impl TokenStorage for JsonTokenStorage { Err(serde_err) => Err(serde_err), } }, - Err(io_err) => Err(json::Error::Io(io_err)) + Err(io_err) => Err(json::Error::IoError(io_err)) } } } @@ -444,7 +444,7 @@ impl TokenStorage for JsonTokenStorage { Err(io_err) => { match io_err.kind() { io::ErrorKind::NotFound => Ok(None), - _ => Err(json::Error::Io(io_err)) + _ => Err(json::Error::IoError(io_err)) } } } @@ -683,7 +683,7 @@ pub fn application_secret_from_directory(dir: &str, = json::from_str(json_console_secret).unwrap(); match json::to_writer_pretty(&mut f, &console_secret) { Err(serde_err) => match serde_err { - json::Error::Io(err) => err, + json::Error::IoError(err) => err, _ => panic!("Unexpected serde error: {:#?}", serde_err) }, Ok(_) => continue, @@ -696,7 +696,7 @@ pub fn application_secret_from_directory(dir: &str, }, Ok(f) => { match json::de::from_reader::<_, ConsoleApplicationSecret>(f) { - Err(json::Error::Io(err)) => + Err(json::Error::IoError(err)) => return secret_io_error(err), Err(json_err) => return Err(CLIError::Configuration( diff --git a/gen/webfonts1-cli/src/main.rs b/gen/webfonts1-cli/src/main.rs index 79b48da62c..b6efd91bd7 100644 --- a/gen/webfonts1-cli/src/main.rs +++ b/gen/webfonts1-cli/src/main.rs @@ -219,8 +219,8 @@ fn main() { let mut app = App::new("webfonts1") .author("Sebastian Thiel ") - .version("0.3.3+20140210") - .about("The Google Fonts Developer API.") + .version("0.3.4+20160302") + .about("Accesses the metadata for all families served by Google Fonts, providing a list of families currently available (including available styles and a list of supported script subsets).") .after_help("All documentation details can be found at http://byron.github.io/google-apis-rs/google_webfonts1_cli") .arg(Arg::with_name("folder") .long("config-dir") diff --git a/gen/webfonts1/Cargo.toml b/gen/webfonts1/Cargo.toml index 165ce77d38..0a109d66a9 100644 --- a/gen/webfonts1/Cargo.toml +++ b/gen/webfonts1/Cargo.toml @@ -4,7 +4,7 @@ [package] name = "google-webfonts1" -version = "0.1.12+20140210" +version = "0.1.13+20160302" authors = ["Sebastian Thiel "] description = "A complete library to interact with webfonts (protocol v1)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/webfonts1" @@ -16,14 +16,14 @@ build = "src/build.rs" [dependencies] -hyper = "0.7" -mime = "0.1.0" -serde = ">= 0.7.0" -serde_json = ">= 0.7.0" -yup-oauth2 = ">= 0.5.4" +hyper = "0.8" +mime = "0.2.0" +serde = "0.6.0" +serde_json = "0.6.0" +yup-oauth2 = ">= 0.5.6" url = ">= 0.5" [build-dependencies] -syntex = { version = ">= 0.23" } -serde_codegen = { version = ">= 0.6" } +syntex = { version = "= 0.28" } +serde_codegen = { version = "= 0.6.13" } diff --git a/gen/webfonts1/README.md b/gen/webfonts1/README.md index cc01a72d48..b20fa481ab 100644 --- a/gen/webfonts1/README.md +++ b/gen/webfonts1/README.md @@ -5,7 +5,7 @@ DO NOT EDIT ! --> The `google-webfonts1` library allows access to all features of the *Google webfonts* service. -This documentation was generated from *webfonts* crate version *0.1.12+20140210*, where *20140210* is the exact revision of the *webfonts:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.12*. +This documentation was generated from *webfonts* crate version *0.1.13+20160302*, where *20160302* is the exact revision of the *webfonts:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.13*. Everything else about the *webfonts* *v1* API can be found at the [official documentation site](https://developers.google.com/fonts/docs/developer_api). diff --git a/gen/webfonts1/src/cmn.rs b/gen/webfonts1/src/cmn.rs index 87b91a8986..c69621da55 100644 --- a/gen/webfonts1/src/cmn.rs +++ b/gen/webfonts1/src/cmn.rs @@ -12,7 +12,7 @@ use mime::{Mime, TopLevel, SubLevel, Attr, Value}; use oauth2::{TokenType, Retry, self}; use hyper; use hyper::header::{ContentType, ContentLength, Headers, UserAgent, Authorization, Header, - HeaderFormat}; + HeaderFormat, Bearer}; use hyper::http::h1::LINE_ENDING; use hyper::method::Method; use hyper::status::StatusCode; @@ -634,7 +634,7 @@ pub struct ResumableUploadHelper<'a, A: 'a> { pub start_at: Option, pub auth: &'a mut A, pub user_agent: &'a str, - pub auth_header: Authorization, + pub auth_header: Authorization, pub url: &'a str, pub reader: &'a mut ReadSeek, pub media_type: Mime, diff --git a/gen/webfonts1/src/lib.rs b/gen/webfonts1/src/lib.rs index f06782d99d..db37509dac 100644 --- a/gen/webfonts1/src/lib.rs +++ b/gen/webfonts1/src/lib.rs @@ -2,7 +2,7 @@ // This file was generated automatically from 'src/mako/api/lib.rs.mako' // DO NOT EDIT ! -//! This documentation was generated from *webfonts* crate version *0.1.12+20140210*, where *20140210* is the exact revision of the *webfonts:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.12*. +//! This documentation was generated from *webfonts* crate version *0.1.13+20160302*, where *20160302* is the exact revision of the *webfonts:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.13*. //! //! Everything else about the *webfonts* *v1* API can be found at the //! [official documentation site](https://developers.google.com/fonts/docs/developer_api). diff --git a/gen/webfonts1/src/lib.rs.in b/gen/webfonts1/src/lib.rs.in index 693817c875..e0c43ff8c0 100644 --- a/gen/webfonts1/src/lib.rs.in +++ b/gen/webfonts1/src/lib.rs.in @@ -106,7 +106,7 @@ impl<'a, C, A> Webfonts Webfonts { client: RefCell::new(client), auth: RefCell::new(authenticator), - _user_agent: "google-api-rust-client/0.1.12".to_string(), + _user_agent: "google-api-rust-client/0.1.13".to_string(), } } @@ -115,7 +115,7 @@ impl<'a, C, A> Webfonts } /// Set the user-agent header field to use in all requests to the server. - /// It defaults to `google-api-rust-client/0.1.12`. + /// It defaults to `google-api-rust-client/0.1.13`. /// /// Returns the previously set user-agent. pub fn user_agent(&mut self, agent_name: String) -> String { @@ -294,7 +294,7 @@ impl<'a, C, A> WebfontListCall<'a, C, A> where C: BorrowMut, A: o /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, WebfontList)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, diff --git a/gen/webmasters3-cli/Cargo.toml b/gen/webmasters3-cli/Cargo.toml index 3365865c51..d41a2a2897 100644 --- a/gen/webmasters3-cli/Cargo.toml +++ b/gen/webmasters3-cli/Cargo.toml @@ -4,7 +4,7 @@ [package] name = "google-webmasters3-cli" -version = "0.3.3+20151229" +version = "0.3.4+20160317" authors = ["Sebastian Thiel "] description = "A complete library to interact with webmasters (protocol v3)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/webmasters3-cli" @@ -17,18 +17,18 @@ keywords = ["webmasters", "google", "cli"] name = "webmasters3" [dependencies] -hyper = "0.7" -mime = "0.1.0" -serde = ">= 0.7.0" -serde_json = ">= 0.7.0" -yup-oauth2 = ">= 0.5.4" +hyper = "0.8" +mime = "0.2.0" +serde = "0.6.0" +serde_json = "0.6.0" +yup-oauth2 = ">= 0.5.6" strsim = "0.4" yup-hyper-mock = "1.0" clap = "2.0" [build-dependencies] -syntex = { version = ">= 0.23" } -serde_codegen = { version = ">= 0.6" } +syntex = { version = "= 0.28" } +serde_codegen = { version = "= 0.6.13" } [dependencies.google-webmasters3] diff --git a/gen/webmasters3-cli/README.md b/gen/webmasters3-cli/README.md index ade229cc3a..aead43e818 100644 --- a/gen/webmasters3-cli/README.md +++ b/gen/webmasters3-cli/README.md @@ -17,14 +17,14 @@ Everything else about the *webmasters* API can be found at the You can download the pre-compiled 64bit binaries for the following platforms: -* ![icon](http://megaicons.net/static/img/icons_sizes/6/140/16/ubuntu-icon.png) [ubuntu](http://dl.byronimo.de/google.rs/cli/0.3.3/ubuntu/webmasters3.tar.gz) -* ![icon](http://hydra-media.cursecdn.com/wow.gamepedia.com/a/a2/Apple-icon-16x16.png?version=25ddd67ac3dd3b634478e3978b76cb74) [osx](http://dl.byronimo.de/google.rs/cli/0.3.3/osx/webmasters3.tar.gz) +* ![icon](http://megaicons.net/static/img/icons_sizes/6/140/16/ubuntu-icon.png) [ubuntu](http://dl.byronimo.de/google.rs/cli/0.3.4/ubuntu/webmasters3.tar.gz) +* ![icon](http://hydra-media.cursecdn.com/wow.gamepedia.com/a/a2/Apple-icon-16x16.png?version=25ddd67ac3dd3b634478e3978b76cb74) [osx](http://dl.byronimo.de/google.rs/cli/0.3.4/osx/webmasters3.tar.gz) Find the source code [on github](https://github.com/Byron/google-apis-rs/tree/master/gen/webmasters3-cli). # Usage -This documentation was generated from the *webmasters* API at revision *20151229*. The CLI is at version *0.3.3*. +This documentation was generated from the *webmasters* API at revision *20160317*. The CLI is at version *0.3.4*. ```bash webmasters3 [options] diff --git a/gen/webmasters3-cli/mkdocs.yml b/gen/webmasters3-cli/mkdocs.yml index 83e1d3fbbe..a5ca3c9913 100644 --- a/gen/webmasters3-cli/mkdocs.yml +++ b/gen/webmasters3-cli/mkdocs.yml @@ -1,4 +1,4 @@ -site_name: webmasters v0.3.3+20151229 +site_name: webmasters v0.3.4+20160317 site_url: http://byron.github.io/google-apis-rs/google-webmasters3-cli site_description: Write integrating applications with bcore diff --git a/gen/webmasters3-cli/src/cmn.rs b/gen/webmasters3-cli/src/cmn.rs index 188159ee80..ae86fdef65 100644 --- a/gen/webmasters3-cli/src/cmn.rs +++ b/gen/webmasters3-cli/src/cmn.rs @@ -414,7 +414,7 @@ impl TokenStorage for JsonTokenStorage { Err(err) => match err.kind() { io::ErrorKind::NotFound => Ok(()), - _ => Err(json::Error::Io(err)) + _ => Err(json::Error::IoError(err)) }, Ok(_) => Ok(()), } @@ -427,7 +427,7 @@ impl TokenStorage for JsonTokenStorage { Err(serde_err) => Err(serde_err), } }, - Err(io_err) => Err(json::Error::Io(io_err)) + Err(io_err) => Err(json::Error::IoError(io_err)) } } } @@ -444,7 +444,7 @@ impl TokenStorage for JsonTokenStorage { Err(io_err) => { match io_err.kind() { io::ErrorKind::NotFound => Ok(None), - _ => Err(json::Error::Io(io_err)) + _ => Err(json::Error::IoError(io_err)) } } } @@ -683,7 +683,7 @@ pub fn application_secret_from_directory(dir: &str, = json::from_str(json_console_secret).unwrap(); match json::to_writer_pretty(&mut f, &console_secret) { Err(serde_err) => match serde_err { - json::Error::Io(err) => err, + json::Error::IoError(err) => err, _ => panic!("Unexpected serde error: {:#?}", serde_err) }, Ok(_) => continue, @@ -696,7 +696,7 @@ pub fn application_secret_from_directory(dir: &str, }, Ok(f) => { match json::de::from_reader::<_, ConsoleApplicationSecret>(f) { - Err(json::Error::Io(err)) => + Err(json::Error::IoError(err)) => return secret_io_error(err), Err(json_err) => return Err(CLIError::Configuration( diff --git a/gen/webmasters3-cli/src/main.rs b/gen/webmasters3-cli/src/main.rs index f475e44d4d..128f697b8e 100644 --- a/gen/webmasters3-cli/src/main.rs +++ b/gen/webmasters3-cli/src/main.rs @@ -72,10 +72,11 @@ impl<'n> Engine<'n> { "end-date" => Some(("endDate", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "dimensions" => Some(("dimensions", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Vec })), "search-type" => Some(("searchType", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "start-row" => Some(("startRow", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), "row-limit" => Some(("rowLimit", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })), "aggregation-type" => Some(("aggregationType", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), _ => { - let suggestion = FieldCursor::did_you_mean(key, &vec!["aggregation-type", "dimensions", "end-date", "row-limit", "search-type", "start-date"]); + let suggestion = FieldCursor::did_you_mean(key, &vec!["aggregation-type", "dimensions", "end-date", "row-limit", "search-type", "start-date", "start-row"]); err.issues.push(CLIError::Field(FieldError::Unknown(temp_cursor.to_string(), suggestion, value.map(|v| v.to_string())))); None } @@ -1242,8 +1243,8 @@ fn main() { let mut app = App::new("webmasters3") .author("Sebastian Thiel ") - .version("0.3.3+20151229") - .about("Lets you view Google Search Console data for your verified sites.") + .version("0.3.4+20160317") + .about("View Google Search Console data for your verified sites.") .after_help("All documentation details can be found at http://byron.github.io/google-apis-rs/google_webmasters3_cli") .arg(Arg::with_name("url") .long("scope") diff --git a/gen/webmasters3/Cargo.toml b/gen/webmasters3/Cargo.toml index 73fcb15f61..06d910bc99 100644 --- a/gen/webmasters3/Cargo.toml +++ b/gen/webmasters3/Cargo.toml @@ -4,7 +4,7 @@ [package] name = "google-webmasters3" -version = "0.1.12+20151229" +version = "0.1.13+20160317" authors = ["Sebastian Thiel "] description = "A complete library to interact with webmasters (protocol v3)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/webmasters3" @@ -16,14 +16,14 @@ build = "src/build.rs" [dependencies] -hyper = "0.7" -mime = "0.1.0" -serde = ">= 0.7.0" -serde_json = ">= 0.7.0" -yup-oauth2 = ">= 0.5.4" +hyper = "0.8" +mime = "0.2.0" +serde = "0.6.0" +serde_json = "0.6.0" +yup-oauth2 = ">= 0.5.6" url = ">= 0.5" [build-dependencies] -syntex = { version = ">= 0.23" } -serde_codegen = { version = ">= 0.6" } +syntex = { version = "= 0.28" } +serde_codegen = { version = "= 0.6.13" } diff --git a/gen/webmasters3/README.md b/gen/webmasters3/README.md index 8e5b3c3ab4..0c60d00c8f 100644 --- a/gen/webmasters3/README.md +++ b/gen/webmasters3/README.md @@ -5,7 +5,7 @@ DO NOT EDIT ! --> The `google-webmasters3` library allows access to all features of the *Google webmasters* service. -This documentation was generated from *webmasters* crate version *0.1.12+20151229*, where *20151229* is the exact revision of the *webmasters:v3* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.12*. +This documentation was generated from *webmasters* crate version *0.1.13+20160317*, where *20160317* is the exact revision of the *webmasters:v3* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.13*. Everything else about the *webmasters* *v3* API can be found at the [official documentation site](https://developers.google.com/webmaster-tools/). diff --git a/gen/webmasters3/src/cmn.rs b/gen/webmasters3/src/cmn.rs index 87b91a8986..c69621da55 100644 --- a/gen/webmasters3/src/cmn.rs +++ b/gen/webmasters3/src/cmn.rs @@ -12,7 +12,7 @@ use mime::{Mime, TopLevel, SubLevel, Attr, Value}; use oauth2::{TokenType, Retry, self}; use hyper; use hyper::header::{ContentType, ContentLength, Headers, UserAgent, Authorization, Header, - HeaderFormat}; + HeaderFormat, Bearer}; use hyper::http::h1::LINE_ENDING; use hyper::method::Method; use hyper::status::StatusCode; @@ -634,7 +634,7 @@ pub struct ResumableUploadHelper<'a, A: 'a> { pub start_at: Option, pub auth: &'a mut A, pub user_agent: &'a str, - pub auth_header: Authorization, + pub auth_header: Authorization, pub url: &'a str, pub reader: &'a mut ReadSeek, pub media_type: Mime, diff --git a/gen/webmasters3/src/lib.rs b/gen/webmasters3/src/lib.rs index 72f8042dfb..595be2ef47 100644 --- a/gen/webmasters3/src/lib.rs +++ b/gen/webmasters3/src/lib.rs @@ -2,7 +2,7 @@ // This file was generated automatically from 'src/mako/api/lib.rs.mako' // DO NOT EDIT ! -//! This documentation was generated from *webmasters* crate version *0.1.12+20151229*, where *20151229* is the exact revision of the *webmasters:v3* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.12*. +//! This documentation was generated from *webmasters* crate version *0.1.13+20160317*, where *20160317* is the exact revision of the *webmasters:v3* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.13*. //! //! Everything else about the *webmasters* *v3* API can be found at the //! [official documentation site](https://developers.google.com/webmaster-tools/). diff --git a/gen/webmasters3/src/lib.rs.in b/gen/webmasters3/src/lib.rs.in index 616d13dc68..a85dfc3189 100644 --- a/gen/webmasters3/src/lib.rs.in +++ b/gen/webmasters3/src/lib.rs.in @@ -131,7 +131,7 @@ impl<'a, C, A> Webmasters Webmasters { client: RefCell::new(client), auth: RefCell::new(authenticator), - _user_agent: "google-api-rust-client/0.1.12".to_string(), + _user_agent: "google-api-rust-client/0.1.13".to_string(), } } @@ -152,7 +152,7 @@ impl<'a, C, A> Webmasters } /// Set the user-agent header field to use in all requests to the server. - /// It defaults to `google-api-rust-client/0.1.12`. + /// It defaults to `google-api-rust-client/0.1.13`. /// /// Returns the previously set user-agent. pub fn user_agent(&mut self, agent_name: String) -> String { @@ -376,6 +376,12 @@ pub struct SearchAnalyticsQueryRequest { /// [Optional] Zero or more filters to apply to the dimension grouping values; for example, 'query contains "buy"' to see only data where the query string contains the substring "buy" (not case-sensitive). You can filter by a dimension without grouping by it. #[serde(rename="dimensionFilterGroups")] pub dimension_filter_groups: Option>, + /// [Optional; Default is 0] Zero-based index of the first row in the response. Must be a non-negative number. + #[serde(rename="startRow")] + pub start_row: Option, + /// [Optional; Default is 1000] The maximum number of rows to return. Must be a number from 1 to 5,000 (inclusive). + #[serde(rename="rowLimit")] + pub row_limit: Option, /// [Optional; Default is "auto"] How data is aggregated. If aggregated by property, all data for the same property is aggregated; if aggregated by page, all data is aggregated by canonical URI. If you filter or group by page, choose AUTO; otherwise you can aggregate either by property or by page, depending on how you want your data calculated; see the help documentation to learn how data is calculated differently by site versus by page. /// /// Note: If you group or filter by page, you cannot aggregate by property. @@ -383,9 +389,6 @@ pub struct SearchAnalyticsQueryRequest { /// If you specify any value other than AUTO, the aggregation type in the result will match the requested type, or if you request an invalid type, you will get an error. The API will never change your aggregation type if the requested type is invalid. #[serde(rename="aggregationType")] pub aggregation_type: Option, - /// [Optional; Default is 1000] The maximum number of rows to return. Must be a number from 1 to 5,000 (inclusive). - #[serde(rename="rowLimit")] - pub row_limit: Option, } impl RequestValue for SearchAnalyticsQueryRequest {} @@ -1025,7 +1028,7 @@ impl<'a, C, A> SitemapDeleteCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -1094,8 +1097,7 @@ impl<'a, C, A> SitemapDeleteCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Delete, &url) @@ -1262,7 +1264,7 @@ impl<'a, C, A> SitemapSubmitCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -1331,8 +1333,7 @@ impl<'a, C, A> SitemapSubmitCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Put, &url) @@ -1499,7 +1500,7 @@ impl<'a, C, A> SitemapGetCall<'a, C, A> where C: BorrowMut, A: oa /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, WmxSitemap)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -1569,8 +1570,7 @@ impl<'a, C, A> SitemapGetCall<'a, C, A> where C: BorrowMut, A: oa } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -1748,7 +1748,7 @@ impl<'a, C, A> SitemapListCall<'a, C, A> where C: BorrowMut, A: o /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, SitemapsListResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -1820,8 +1820,7 @@ impl<'a, C, A> SitemapListCall<'a, C, A> where C: BorrowMut, A: o } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -1994,7 +1993,7 @@ impl<'a, C, A> SiteGetCall<'a, C, A> where C: BorrowMut, A: oauth /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, WmxSite)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -2063,8 +2062,7 @@ impl<'a, C, A> SiteGetCall<'a, C, A> where C: BorrowMut, A: oauth } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -2230,7 +2228,7 @@ impl<'a, C, A> SiteAddCall<'a, C, A> where C: BorrowMut, A: oauth /// Perform the operation you have build so far. pub fn doit(mut self) -> Result { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -2298,8 +2296,7 @@ impl<'a, C, A> SiteAddCall<'a, C, A> where C: BorrowMut, A: oauth } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Put, &url) @@ -2454,7 +2451,7 @@ impl<'a, C, A> SiteListCall<'a, C, A> where C: BorrowMut, A: oaut /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, SitesListResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -2501,8 +2498,7 @@ impl<'a, C, A> SiteListCall<'a, C, A> where C: BorrowMut, A: oaut } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -2658,7 +2654,7 @@ impl<'a, C, A> SiteDeleteCall<'a, C, A> where C: BorrowMut, A: oa /// Perform the operation you have build so far. pub fn doit(mut self) -> Result { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -2726,8 +2722,7 @@ impl<'a, C, A> SiteDeleteCall<'a, C, A> where C: BorrowMut, A: oa } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Delete, &url) @@ -2892,7 +2887,7 @@ impl<'a, C, A> SearchanalyticQueryCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, SearchAnalyticsQueryResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -2972,8 +2967,7 @@ impl<'a, C, A> SearchanalyticQueryCall<'a, C, A> where C: BorrowMut UrlcrawlerrorscountQueryCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, UrlCrawlErrorsCountsQueryResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -3236,8 +3230,7 @@ impl<'a, C, A> UrlcrawlerrorscountQueryCall<'a, C, A> where C: BorrowMut UrlcrawlerrorssampleGetCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, UrlCrawlErrorsSample)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -3499,8 +3492,7 @@ impl<'a, C, A> UrlcrawlerrorssampleGetCall<'a, C, A> where C: BorrowMut UrlcrawlerrorssampleListCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, UrlCrawlErrorsSamplesListResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -3769,8 +3761,7 @@ impl<'a, C, A> UrlcrawlerrorssampleListCall<'a, C, A> where C: BorrowMut UrlcrawlerrorssampleMarkAsFixedCall<'a, C, A> where C: BorrowMut< /// Perform the operation you have build so far. pub fn doit(mut self) -> Result { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -4030,8 +4021,7 @@ impl<'a, C, A> UrlcrawlerrorssampleMarkAsFixedCall<'a, C, A> where C: BorrowMut< } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Delete, &url) diff --git a/gen/youtube3-cli/Cargo.toml b/gen/youtube3-cli/Cargo.toml index 75d13d10de..09589c277c 100644 --- a/gen/youtube3-cli/Cargo.toml +++ b/gen/youtube3-cli/Cargo.toml @@ -4,7 +4,7 @@ [package] name = "google-youtube3-cli" -version = "0.3.3+20160222" +version = "0.3.4+20160222" authors = ["Sebastian Thiel "] description = "A complete library to interact with YouTube (protocol v3)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/youtube3-cli" @@ -17,18 +17,18 @@ keywords = ["youtube", "google", "cli"] name = "youtube3" [dependencies] -hyper = "0.7" -mime = "0.1.0" -serde = ">= 0.7.0" -serde_json = ">= 0.7.0" -yup-oauth2 = ">= 0.5.4" +hyper = "0.8" +mime = "0.2.0" +serde = "0.6.0" +serde_json = "0.6.0" +yup-oauth2 = ">= 0.5.6" strsim = "0.4" yup-hyper-mock = "1.0" clap = "2.0" [build-dependencies] -syntex = { version = ">= 0.23" } -serde_codegen = { version = ">= 0.6" } +syntex = { version = "= 0.28" } +serde_codegen = { version = "= 0.6.13" } [dependencies.google-youtube3] diff --git a/gen/youtube3-cli/README.md b/gen/youtube3-cli/README.md index a7dc694e09..565892a723 100644 --- a/gen/youtube3-cli/README.md +++ b/gen/youtube3-cli/README.md @@ -17,14 +17,14 @@ Everything else about the *YouTube* API can be found at the You can download the pre-compiled 64bit binaries for the following platforms: -* ![icon](http://megaicons.net/static/img/icons_sizes/6/140/16/ubuntu-icon.png) [ubuntu](http://dl.byronimo.de/google.rs/cli/0.3.3/ubuntu/youtube3.tar.gz) -* ![icon](http://hydra-media.cursecdn.com/wow.gamepedia.com/a/a2/Apple-icon-16x16.png?version=25ddd67ac3dd3b634478e3978b76cb74) [osx](http://dl.byronimo.de/google.rs/cli/0.3.3/osx/youtube3.tar.gz) +* ![icon](http://megaicons.net/static/img/icons_sizes/6/140/16/ubuntu-icon.png) [ubuntu](http://dl.byronimo.de/google.rs/cli/0.3.4/ubuntu/youtube3.tar.gz) +* ![icon](http://hydra-media.cursecdn.com/wow.gamepedia.com/a/a2/Apple-icon-16x16.png?version=25ddd67ac3dd3b634478e3978b76cb74) [osx](http://dl.byronimo.de/google.rs/cli/0.3.4/osx/youtube3.tar.gz) Find the source code [on github](https://github.com/Byron/google-apis-rs/tree/master/gen/youtube3-cli). # Usage -This documentation was generated from the *YouTube* API at revision *20160222*. The CLI is at version *0.3.3*. +This documentation was generated from the *YouTube* API at revision *20160222*. The CLI is at version *0.3.4*. ```bash youtube3 [options] diff --git a/gen/youtube3-cli/mkdocs.yml b/gen/youtube3-cli/mkdocs.yml index b1a0d91810..a1bb140171 100644 --- a/gen/youtube3-cli/mkdocs.yml +++ b/gen/youtube3-cli/mkdocs.yml @@ -1,4 +1,4 @@ -site_name: YouTube v0.3.3+20160222 +site_name: YouTube v0.3.4+20160222 site_url: http://byron.github.io/google-apis-rs/google-youtube3-cli site_description: Write integrating applications with bcore diff --git a/gen/youtube3-cli/src/cmn.rs b/gen/youtube3-cli/src/cmn.rs index 188159ee80..ae86fdef65 100644 --- a/gen/youtube3-cli/src/cmn.rs +++ b/gen/youtube3-cli/src/cmn.rs @@ -414,7 +414,7 @@ impl TokenStorage for JsonTokenStorage { Err(err) => match err.kind() { io::ErrorKind::NotFound => Ok(()), - _ => Err(json::Error::Io(err)) + _ => Err(json::Error::IoError(err)) }, Ok(_) => Ok(()), } @@ -427,7 +427,7 @@ impl TokenStorage for JsonTokenStorage { Err(serde_err) => Err(serde_err), } }, - Err(io_err) => Err(json::Error::Io(io_err)) + Err(io_err) => Err(json::Error::IoError(io_err)) } } } @@ -444,7 +444,7 @@ impl TokenStorage for JsonTokenStorage { Err(io_err) => { match io_err.kind() { io::ErrorKind::NotFound => Ok(None), - _ => Err(json::Error::Io(io_err)) + _ => Err(json::Error::IoError(io_err)) } } } @@ -683,7 +683,7 @@ pub fn application_secret_from_directory(dir: &str, = json::from_str(json_console_secret).unwrap(); match json::to_writer_pretty(&mut f, &console_secret) { Err(serde_err) => match serde_err { - json::Error::Io(err) => err, + json::Error::IoError(err) => err, _ => panic!("Unexpected serde error: {:#?}", serde_err) }, Ok(_) => continue, @@ -696,7 +696,7 @@ pub fn application_secret_from_directory(dir: &str, }, Ok(f) => { match json::de::from_reader::<_, ConsoleApplicationSecret>(f) { - Err(json::Error::Io(err)) => + Err(json::Error::IoError(err)) => return secret_io_error(err), Err(json_err) => return Err(CLIError::Configuration( diff --git a/gen/youtube3-cli/src/main.rs b/gen/youtube3-cli/src/main.rs index 9b494e68da..27263e8cb2 100644 --- a/gen/youtube3-cli/src/main.rs +++ b/gen/youtube3-cli/src/main.rs @@ -8322,7 +8322,7 @@ fn main() { let mut app = App::new("youtube3") .author("Sebastian Thiel ") - .version("0.3.3+20160222") + .version("0.3.4+20160222") .about("Programmatic access to YouTube features.") .after_help("All documentation details can be found at http://byron.github.io/google-apis-rs/google_youtube3_cli") .arg(Arg::with_name("url") diff --git a/gen/youtube3/README.md b/gen/youtube3/README.md index 4f650fd0ef..7332bca23f 100644 --- a/gen/youtube3/README.md +++ b/gen/youtube3/README.md @@ -5,7 +5,7 @@ DO NOT EDIT ! --> The `google-youtube3` library allows access to all features of the *Google YouTube* service. -This documentation was generated from *YouTube* crate version *0.1.12+20160222*, where *20160222* is the exact revision of the *youtube:v3* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.12*. +This documentation was generated from *YouTube* crate version *0.1.13+20160222*, where *20160222* is the exact revision of the *youtube:v3* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.13*. Everything else about the *YouTube* *v3* API can be found at the [official documentation site](https://developers.google.com/youtube/v3). diff --git a/gen/youtube3/cargo.toml b/gen/youtube3/cargo.toml index 06d52f7e3d..c2026691b6 100644 --- a/gen/youtube3/cargo.toml +++ b/gen/youtube3/cargo.toml @@ -4,7 +4,7 @@ [package] name = "google-youtube3" -version = "0.1.12+20160222" +version = "0.1.13+20160222" authors = ["Sebastian Thiel "] description = "A complete library to interact with YouTube (protocol v3)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/youtube3" @@ -16,14 +16,14 @@ build = "src/build.rs" [dependencies] -hyper = "0.7" -mime = "0.1.0" -serde = ">= 0.7.0" -serde_json = ">= 0.7.0" -yup-oauth2 = ">= 0.5.4" +hyper = "0.8" +mime = "0.2.0" +serde = "0.6.0" +serde_json = "0.6.0" +yup-oauth2 = ">= 0.5.6" url = ">= 0.5" [build-dependencies] -syntex = { version = ">= 0.23" } -serde_codegen = { version = ">= 0.6" } +syntex = { version = "= 0.28" } +serde_codegen = { version = "= 0.6.13" } diff --git a/gen/youtube3/src/cmn.rs b/gen/youtube3/src/cmn.rs index 87b91a8986..c69621da55 100644 --- a/gen/youtube3/src/cmn.rs +++ b/gen/youtube3/src/cmn.rs @@ -12,7 +12,7 @@ use mime::{Mime, TopLevel, SubLevel, Attr, Value}; use oauth2::{TokenType, Retry, self}; use hyper; use hyper::header::{ContentType, ContentLength, Headers, UserAgent, Authorization, Header, - HeaderFormat}; + HeaderFormat, Bearer}; use hyper::http::h1::LINE_ENDING; use hyper::method::Method; use hyper::status::StatusCode; @@ -634,7 +634,7 @@ pub struct ResumableUploadHelper<'a, A: 'a> { pub start_at: Option, pub auth: &'a mut A, pub user_agent: &'a str, - pub auth_header: Authorization, + pub auth_header: Authorization, pub url: &'a str, pub reader: &'a mut ReadSeek, pub media_type: Mime, diff --git a/gen/youtube3/src/lib.rs b/gen/youtube3/src/lib.rs index c8db5d68a2..785e6947df 100644 --- a/gen/youtube3/src/lib.rs +++ b/gen/youtube3/src/lib.rs @@ -2,7 +2,7 @@ // This file was generated automatically from 'src/mako/api/lib.rs.mako' // DO NOT EDIT ! -//! This documentation was generated from *YouTube* crate version *0.1.12+20160222*, where *20160222* is the exact revision of the *youtube:v3* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.12*. +//! This documentation was generated from *YouTube* crate version *0.1.13+20160222*, where *20160222* is the exact revision of the *youtube:v3* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.13*. //! //! Everything else about the *YouTube* *v3* API can be found at the //! [official documentation site](https://developers.google.com/youtube/v3). diff --git a/gen/youtube3/src/lib.rs.in b/gen/youtube3/src/lib.rs.in index 39dee2ac55..e77a263a6f 100644 --- a/gen/youtube3/src/lib.rs.in +++ b/gen/youtube3/src/lib.rs.in @@ -157,7 +157,7 @@ impl<'a, C, A> YouTube YouTube { client: RefCell::new(client), auth: RefCell::new(authenticator), - _user_agent: "google-api-rust-client/0.1.12".to_string(), + _user_agent: "google-api-rust-client/0.1.13".to_string(), } } @@ -241,7 +241,7 @@ impl<'a, C, A> YouTube } /// Set the user-agent header field to use in all requests to the server. - /// It defaults to `google-api-rust-client/0.1.12`. + /// It defaults to `google-api-rust-client/0.1.13`. /// /// Returns the previously set user-agent. pub fn user_agent(&mut self, agent_name: String) -> String { @@ -8095,7 +8095,7 @@ impl<'a, C, A> ChannelSectionListCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, ChannelSectionListResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -8158,8 +8158,7 @@ impl<'a, C, A> ChannelSectionListCall<'a, C, A> where C: BorrowMut ChannelSectionInsertCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, ChannelSection)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -8466,8 +8465,7 @@ impl<'a, C, A> ChannelSectionInsertCall<'a, C, A> where C: BorrowMut ChannelSectionDeleteCall<'a, C, A> where C: BorrowMut Result { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -8733,8 +8731,7 @@ impl<'a, C, A> ChannelSectionDeleteCall<'a, C, A> where C: BorrowMut ChannelSectionUpdateCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, ChannelSection)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -8990,8 +8987,7 @@ impl<'a, C, A> ChannelSectionUpdateCall<'a, C, A> where C: BorrowMut PlaylistInsertCall<'a, C, A> where C: BorrowMut, A /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Playlist)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -9273,8 +9269,7 @@ impl<'a, C, A> PlaylistInsertCall<'a, C, A> where C: BorrowMut, A } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -9492,7 +9487,7 @@ impl<'a, C, A> PlaylistListCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, PlaylistListResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -9564,8 +9559,7 @@ impl<'a, C, A> PlaylistListCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -9797,7 +9791,7 @@ impl<'a, C, A> PlaylistDeleteCall<'a, C, A> where C: BorrowMut, A /// Perform the operation you have build so far. pub fn doit(mut self) -> Result { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -9847,8 +9841,7 @@ impl<'a, C, A> PlaylistDeleteCall<'a, C, A> where C: BorrowMut, A } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Delete, &url) @@ -10022,7 +10015,7 @@ impl<'a, C, A> PlaylistUpdateCall<'a, C, A> where C: BorrowMut, A /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Playlist)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -10087,8 +10080,7 @@ impl<'a, C, A> PlaylistUpdateCall<'a, C, A> where C: BorrowMut, A } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -10289,7 +10281,7 @@ impl<'a, C, A> VideoReportAbuseCall<'a, C, A> where C: BorrowMut, /// Perform the operation you have build so far. pub fn doit(mut self) -> Result { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -10349,8 +10341,7 @@ impl<'a, C, A> VideoReportAbuseCall<'a, C, A> where C: BorrowMut, } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -10538,7 +10529,7 @@ impl<'a, C, A> VideoListCall<'a, C, A> where C: BorrowMut, A: oau /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, VideoListResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -10616,8 +10607,7 @@ impl<'a, C, A> VideoListCall<'a, C, A> where C: BorrowMut, A: oau } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -10864,7 +10854,7 @@ impl<'a, C, A> VideoRateCall<'a, C, A> where C: BorrowMut, A: oau /// Perform the operation you have build so far. pub fn doit(mut self) -> Result { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -10912,8 +10902,7 @@ impl<'a, C, A> VideoRateCall<'a, C, A> where C: BorrowMut, A: oau } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Post, &url) @@ -11081,7 +11070,7 @@ impl<'a, C, A> VideoGetRatingCall<'a, C, A> where C: BorrowMut, A /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, VideoGetRatingResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -11132,8 +11121,7 @@ impl<'a, C, A> VideoGetRatingCall<'a, C, A> where C: BorrowMut, A } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -11310,7 +11298,7 @@ impl<'a, C, A> VideoDeleteCall<'a, C, A> where C: BorrowMut, A: o /// Perform the operation you have build so far. pub fn doit(mut self) -> Result { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -11360,8 +11348,7 @@ impl<'a, C, A> VideoDeleteCall<'a, C, A> where C: BorrowMut, A: o } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Delete, &url) @@ -11535,7 +11522,7 @@ impl<'a, C, A> VideoUpdateCall<'a, C, A> where C: BorrowMut, A: o /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Video)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -11600,8 +11587,7 @@ impl<'a, C, A> VideoUpdateCall<'a, C, A> where C: BorrowMut, A: o } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -11815,7 +11801,7 @@ impl<'a, C, A> VideoInsertCall<'a, C, A> where C: BorrowMut, A: o fn doit(mut self, mut reader: RS, reader_mime_type: mime::Mime, protocol: &'static str) -> Result<(hyper::client::Response, Video)> where RS: ReadSeek { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -11903,8 +11889,7 @@ impl<'a, C, A> VideoInsertCall<'a, C, A> where C: BorrowMut, A: o } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { if should_ask_dlg_for_url && (upload_url = dlg.upload_url()) == () && upload_url.is_some() { @@ -12246,7 +12231,7 @@ impl<'a, C, A> ActivityListCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, ActivityListResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -12318,8 +12303,7 @@ impl<'a, C, A> ActivityListCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -12552,7 +12536,7 @@ impl<'a, C, A> ActivityInsertCall<'a, C, A> where C: BorrowMut, A /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Activity)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -12614,8 +12598,7 @@ impl<'a, C, A> ActivityInsertCall<'a, C, A> where C: BorrowMut, A } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -12828,7 +12811,7 @@ impl<'a, C, A> LiveStreamUpdateCall<'a, C, A> where C: BorrowMut, /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, LiveStream)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -12896,8 +12879,7 @@ impl<'a, C, A> LiveStreamUpdateCall<'a, C, A> where C: BorrowMut, } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -13121,7 +13103,7 @@ impl<'a, C, A> LiveStreamDeleteCall<'a, C, A> where C: BorrowMut, /// Perform the operation you have build so far. pub fn doit(mut self) -> Result { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -13174,8 +13156,7 @@ impl<'a, C, A> LiveStreamDeleteCall<'a, C, A> where C: BorrowMut, } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Delete, &url) @@ -13380,7 +13361,7 @@ impl<'a, C, A> LiveStreamListCall<'a, C, A> where C: BorrowMut, A /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, LiveStreamListResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -13446,8 +13427,7 @@ impl<'a, C, A> LiveStreamListCall<'a, C, A> where C: BorrowMut, A } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -13699,7 +13679,7 @@ impl<'a, C, A> LiveStreamInsertCall<'a, C, A> where C: BorrowMut, /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, LiveStream)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -13767,8 +13747,7 @@ impl<'a, C, A> LiveStreamInsertCall<'a, C, A> where C: BorrowMut, } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -13995,7 +13974,7 @@ impl<'a, C, A> ChannelUpdateCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Channel)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -14060,8 +14039,7 @@ impl<'a, C, A> ChannelUpdateCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -14274,7 +14252,7 @@ impl<'a, C, A> ChannelListCall<'a, C, A> where C: BorrowMut, A: o /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, ChannelListResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -14352,8 +14330,7 @@ impl<'a, C, A> ChannelListCall<'a, C, A> where C: BorrowMut, A: o } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -14606,7 +14583,7 @@ impl<'a, C, A> WatermarkSetCall<'a, C, A> where C: BorrowMut, A: fn doit(mut self, mut reader: RS, reader_mime_type: mime::Mime, protocol: &'static str) -> Result where RS: ReadSeek { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -14678,8 +14655,7 @@ impl<'a, C, A> WatermarkSetCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { if should_ask_dlg_for_url && (upload_url = dlg.upload_url()) == () && upload_url.is_some() { @@ -14960,7 +14936,7 @@ impl<'a, C, A> WatermarkUnsetCall<'a, C, A> where C: BorrowMut, A /// Perform the operation you have build so far. pub fn doit(mut self) -> Result { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -15010,8 +14986,7 @@ impl<'a, C, A> WatermarkUnsetCall<'a, C, A> where C: BorrowMut, A } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Post, &url) @@ -15183,7 +15158,7 @@ impl<'a, C, A> LiveChatModeratorInsertCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, LiveChatModerator)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -15245,8 +15220,7 @@ impl<'a, C, A> LiveChatModeratorInsertCall<'a, C, A> where C: BorrowMut LiveChatModeratorListCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, LiveChatModeratorListResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -15503,8 +15477,7 @@ impl<'a, C, A> LiveChatModeratorListCall<'a, C, A> where C: BorrowMut LiveChatModeratorDeleteCall<'a, C, A> where C: BorrowMut Result { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -15746,8 +15719,7 @@ impl<'a, C, A> LiveChatModeratorDeleteCall<'a, C, A> where C: BorrowMut CaptionDeleteCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -15960,8 +15932,7 @@ impl<'a, C, A> CaptionDeleteCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Delete, &url) @@ -16148,7 +16119,7 @@ impl<'a, C, A> CaptionInsertCall<'a, C, A> where C: BorrowMut, A: fn doit(mut self, mut reader: RS, reader_mime_type: mime::Mime, protocol: &'static str) -> Result<(hyper::client::Response, Caption)> where RS: ReadSeek { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -16230,8 +16201,7 @@ impl<'a, C, A> CaptionInsertCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { if should_ask_dlg_for_url && (upload_url = dlg.upload_url()) == () && upload_url.is_some() { @@ -16560,7 +16530,7 @@ impl<'a, C, A> CaptionListCall<'a, C, A> where C: BorrowMut, A: o /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, CaptionListResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -16618,8 +16588,7 @@ impl<'a, C, A> CaptionListCall<'a, C, A> where C: BorrowMut, A: o } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -16834,7 +16803,7 @@ impl<'a, C, A> CaptionDownloadCall<'a, C, A> where C: BorrowMut, /// Perform the operation you have build so far. pub fn doit(mut self) -> Result { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -16914,8 +16883,7 @@ impl<'a, C, A> CaptionDownloadCall<'a, C, A> where C: BorrowMut, } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -17116,7 +17084,7 @@ impl<'a, C, A> CaptionUpdateCall<'a, C, A> where C: BorrowMut, A: fn doit(mut self, mut reader: RS, reader_mime_type: mime::Mime, protocol: &'static str) -> Result<(hyper::client::Response, Caption)> where RS: ReadSeek { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -17198,8 +17166,7 @@ impl<'a, C, A> CaptionUpdateCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { if should_ask_dlg_for_url && (upload_url = dlg.upload_url()) == () && upload_url.is_some() { @@ -17509,7 +17476,7 @@ impl<'a, C, A> I18nLanguageListCall<'a, C, A> where C: BorrowMut, /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, I18nLanguageListResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -17560,8 +17527,7 @@ impl<'a, C, A> I18nLanguageListCall<'a, C, A> where C: BorrowMut, } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -17740,7 +17706,7 @@ impl<'a, C, A> GuideCategoryListCall<'a, C, A> where C: BorrowMut /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, GuideCategoryListResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -17797,8 +17763,7 @@ impl<'a, C, A> GuideCategoryListCall<'a, C, A> where C: BorrowMut } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -18005,7 +17970,7 @@ impl<'a, C, A> CommentThreadListCall<'a, C, A> where C: BorrowMut /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, CommentThreadListResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -18083,8 +18048,7 @@ impl<'a, C, A> CommentThreadListCall<'a, C, A> where C: BorrowMut } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -18337,7 +18301,7 @@ impl<'a, C, A> CommentThreadUpdateCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, CommentThread)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -18399,8 +18363,7 @@ impl<'a, C, A> CommentThreadUpdateCall<'a, C, A> where C: BorrowMut CommentThreadInsertCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, CommentThread)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -18651,8 +18614,7 @@ impl<'a, C, A> CommentThreadInsertCall<'a, C, A> where C: BorrowMut CommentInsertCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Comment)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -18903,8 +18865,7 @@ impl<'a, C, A> CommentInsertCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -19089,7 +19050,7 @@ impl<'a, C, A> CommentSetModerationStatuCall<'a, C, A> where C: BorrowMut Result { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -19140,8 +19101,7 @@ impl<'a, C, A> CommentSetModerationStatuCall<'a, C, A> where C: BorrowMut CommentDeleteCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -19363,8 +19323,7 @@ impl<'a, C, A> CommentDeleteCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Delete, &url) @@ -19530,7 +19489,7 @@ impl<'a, C, A> CommentListCall<'a, C, A> where C: BorrowMut, A: o /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, CommentListResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -19593,8 +19552,7 @@ impl<'a, C, A> CommentListCall<'a, C, A> where C: BorrowMut, A: o } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -19808,7 +19766,7 @@ impl<'a, C, A> CommentUpdateCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Comment)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -19870,8 +19828,7 @@ impl<'a, C, A> CommentUpdateCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -20053,7 +20010,7 @@ impl<'a, C, A> CommentMarkAsSpamCall<'a, C, A> where C: BorrowMut /// Perform the operation you have build so far. pub fn doit(mut self) -> Result { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -20100,8 +20057,7 @@ impl<'a, C, A> CommentMarkAsSpamCall<'a, C, A> where C: BorrowMut } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Post, &url) @@ -20266,7 +20222,7 @@ impl<'a, C, A> PlaylistItemInsertCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, PlaylistItem)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -20331,8 +20287,7 @@ impl<'a, C, A> PlaylistItemInsertCall<'a, C, A> where C: BorrowMut PlaylistItemDeleteCall<'a, C, A> where C: BorrowMut Result { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -20570,8 +20525,7 @@ impl<'a, C, A> PlaylistItemDeleteCall<'a, C, A> where C: BorrowMut PlaylistItemListCall<'a, C, A> where C: BorrowMut, /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, PlaylistItemListResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -20805,8 +20759,7 @@ impl<'a, C, A> PlaylistItemListCall<'a, C, A> where C: BorrowMut, } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -21025,7 +20978,7 @@ impl<'a, C, A> PlaylistItemUpdateCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, PlaylistItem)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -21087,8 +21040,7 @@ impl<'a, C, A> PlaylistItemUpdateCall<'a, C, A> where C: BorrowMut LiveChatMessageListCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, LiveChatMessageListResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -21357,8 +21309,7 @@ impl<'a, C, A> LiveChatMessageListCall<'a, C, A> where C: BorrowMut LiveChatMessageDeleteCall<'a, C, A> where C: BorrowMut Result { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -21616,8 +21567,7 @@ impl<'a, C, A> LiveChatMessageDeleteCall<'a, C, A> where C: BorrowMut LiveChatMessageInsertCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, LiveChatMessage)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -21842,8 +21792,7 @@ impl<'a, C, A> LiveChatMessageInsertCall<'a, C, A> where C: BorrowMut VideoCategoryListCall<'a, C, A> where C: BorrowMut /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, VideoCategoryListResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -22088,8 +22037,7 @@ impl<'a, C, A> VideoCategoryListCall<'a, C, A> where C: BorrowMut } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -22278,7 +22226,7 @@ impl<'a, C, A> I18nRegionListCall<'a, C, A> where C: BorrowMut, A /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, I18nRegionListResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -22329,8 +22277,7 @@ impl<'a, C, A> I18nRegionListCall<'a, C, A> where C: BorrowMut, A } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -22510,7 +22457,7 @@ impl<'a, C, A> SubscriptionInsertCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, Subscription)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -22572,8 +22519,7 @@ impl<'a, C, A> SubscriptionInsertCall<'a, C, A> where C: BorrowMut SubscriptionDeleteCall<'a, C, A> where C: BorrowMut Result { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -22802,8 +22748,7 @@ impl<'a, C, A> SubscriptionDeleteCall<'a, C, A> where C: BorrowMut SubscriptionListCall<'a, C, A> where C: BorrowMut, /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, SubscriptionListResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -23057,8 +23002,7 @@ impl<'a, C, A> SubscriptionListCall<'a, C, A> where C: BorrowMut, } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -23309,7 +23253,7 @@ impl<'a, C, A> LiveChatBanInsertCall<'a, C, A> where C: BorrowMut /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, LiveChatBan)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -23371,8 +23315,7 @@ impl<'a, C, A> LiveChatBanInsertCall<'a, C, A> where C: BorrowMut } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -23554,7 +23497,7 @@ impl<'a, C, A> LiveChatBanDeleteCall<'a, C, A> where C: BorrowMut /// Perform the operation you have build so far. pub fn doit(mut self) -> Result { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -23601,8 +23544,7 @@ impl<'a, C, A> LiveChatBanDeleteCall<'a, C, A> where C: BorrowMut } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Delete, &url) @@ -23779,7 +23721,7 @@ impl<'a, C, A> SponsorListCall<'a, C, A> where C: BorrowMut, A: o /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, SponsorListResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -23836,8 +23778,7 @@ impl<'a, C, A> SponsorListCall<'a, C, A> where C: BorrowMut, A: o } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -24046,7 +23987,7 @@ impl<'a, C, A> VideoAbuseReportReasonListCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, VideoAbuseReportReasonListResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -24097,8 +24038,7 @@ impl<'a, C, A> VideoAbuseReportReasonListCall<'a, C, A> where C: BorrowMut LiveBroadcastControlCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, LiveBroadcast)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -24367,8 +24307,7 @@ impl<'a, C, A> LiveBroadcastControlCall<'a, C, A> where C: BorrowMut LiveBroadcastUpdateCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, LiveBroadcast)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -24695,8 +24634,7 @@ impl<'a, C, A> LiveBroadcastUpdateCall<'a, C, A> where C: BorrowMut LiveBroadcastBindCall<'a, C, A> where C: BorrowMut /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, LiveBroadcast)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -24997,8 +24935,7 @@ impl<'a, C, A> LiveBroadcastBindCall<'a, C, A> where C: BorrowMut } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Post, &url) @@ -25239,7 +25176,7 @@ impl<'a, C, A> LiveBroadcastInsertCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, LiveBroadcast)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -25307,8 +25244,7 @@ impl<'a, C, A> LiveBroadcastInsertCall<'a, C, A> where C: BorrowMut LiveBroadcastDeleteCall<'a, C, A> where C: BorrowMut Result { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -25583,8 +25519,7 @@ impl<'a, C, A> LiveBroadcastDeleteCall<'a, C, A> where C: BorrowMut LiveBroadcastListCall<'a, C, A> where C: BorrowMut /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, LiveBroadcastListResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -25865,8 +25800,7 @@ impl<'a, C, A> LiveBroadcastListCall<'a, C, A> where C: BorrowMut } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -26123,7 +26057,7 @@ impl<'a, C, A> LiveBroadcastTransitionCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, LiveBroadcast)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -26179,8 +26113,7 @@ impl<'a, C, A> LiveBroadcastTransitionCall<'a, C, A> where C: BorrowMut ChannelBannerInsertCall<'a, C, A> where C: BorrowMut(mut self, mut reader: RS, reader_mime_type: mime::Mime, protocol: &'static str) -> Result<(hyper::client::Response, ChannelBannerResource)> where RS: ReadSeek { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -26479,8 +26412,7 @@ impl<'a, C, A> ChannelBannerInsertCall<'a, C, A> where C: BorrowMut SearchListCall<'a, C, A> where C: BorrowMut, A: oa /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, SearchListResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -26957,8 +26889,7 @@ impl<'a, C, A> SearchListCall<'a, C, A> where C: BorrowMut, A: oa } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -27352,7 +27283,7 @@ impl<'a, C, A> ThumbnailSetCall<'a, C, A> where C: BorrowMut, A: fn doit(mut self, mut reader: RS, reader_mime_type: mime::Mime, protocol: &'static str) -> Result<(hyper::client::Response, ThumbnailSetResponse)> where RS: ReadSeek { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -27414,8 +27345,7 @@ impl<'a, C, A> ThumbnailSetCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { if should_ask_dlg_for_url && (upload_url = dlg.upload_url()) == () && upload_url.is_some() { should_ask_dlg_for_url = false; @@ -27707,7 +27637,7 @@ impl<'a, C, A> FanFundingEventListCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, FanFundingEventListResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -27764,8 +27694,7 @@ impl<'a, C, A> FanFundingEventListCall<'a, C, A> where C: BorrowMut"] description = "A complete library to interact with YouTube Analytics (protocol v1)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/youtubeanalytics1-cli" @@ -17,18 +17,18 @@ keywords = ["youtubeAnalytics", "google", "cli"] name = "youtubeanalytics1" [dependencies] -hyper = "0.7" -mime = "0.1.0" -serde = ">= 0.7.0" -serde_json = ">= 0.7.0" -yup-oauth2 = ">= 0.5.4" +hyper = "0.8" +mime = "0.2.0" +serde = "0.6.0" +serde_json = "0.6.0" +yup-oauth2 = ">= 0.5.6" strsim = "0.4" yup-hyper-mock = "1.0" clap = "2.0" [build-dependencies] -syntex = { version = ">= 0.23" } -serde_codegen = { version = ">= 0.6" } +syntex = { version = "= 0.28" } +serde_codegen = { version = "= 0.6.13" } [dependencies.google-youtubeanalytics1] diff --git a/gen/youtubeanalytics1-cli/README.md b/gen/youtubeanalytics1-cli/README.md index d3f5b55bc4..e729585534 100644 --- a/gen/youtubeanalytics1-cli/README.md +++ b/gen/youtubeanalytics1-cli/README.md @@ -17,14 +17,14 @@ Everything else about the *YouTube Analytics* API can be found at the You can download the pre-compiled 64bit binaries for the following platforms: -* ![icon](http://megaicons.net/static/img/icons_sizes/6/140/16/ubuntu-icon.png) [ubuntu](http://dl.byronimo.de/google.rs/cli/0.3.3/ubuntu/youtubeanalytics1.tar.gz) -* ![icon](http://hydra-media.cursecdn.com/wow.gamepedia.com/a/a2/Apple-icon-16x16.png?version=25ddd67ac3dd3b634478e3978b76cb74) [osx](http://dl.byronimo.de/google.rs/cli/0.3.3/osx/youtubeanalytics1.tar.gz) +* ![icon](http://megaicons.net/static/img/icons_sizes/6/140/16/ubuntu-icon.png) [ubuntu](http://dl.byronimo.de/google.rs/cli/0.3.4/ubuntu/youtubeanalytics1.tar.gz) +* ![icon](http://hydra-media.cursecdn.com/wow.gamepedia.com/a/a2/Apple-icon-16x16.png?version=25ddd67ac3dd3b634478e3978b76cb74) [osx](http://dl.byronimo.de/google.rs/cli/0.3.4/osx/youtubeanalytics1.tar.gz) Find the source code [on github](https://github.com/Byron/google-apis-rs/tree/master/gen/youtubeanalytics1-cli). # Usage -This documentation was generated from the *YouTube Analytics* API at revision *20160204*. The CLI is at version *0.3.3*. +This documentation was generated from the *YouTube Analytics* API at revision *20160301*. The CLI is at version *0.3.4*. ```bash youtubeanalytics1 [options] diff --git a/gen/youtubeanalytics1-cli/mkdocs.yml b/gen/youtubeanalytics1-cli/mkdocs.yml index fd4e160d8a..48b3fbcbfc 100644 --- a/gen/youtubeanalytics1-cli/mkdocs.yml +++ b/gen/youtubeanalytics1-cli/mkdocs.yml @@ -1,4 +1,4 @@ -site_name: YouTube Analytics v0.3.3+20160204 +site_name: YouTube Analytics v0.3.4+20160301 site_url: http://byron.github.io/google-apis-rs/google-youtubeanalytics1-cli site_description: Write integrating applications with bcore diff --git a/gen/youtubeanalytics1-cli/src/cmn.rs b/gen/youtubeanalytics1-cli/src/cmn.rs index 188159ee80..ae86fdef65 100644 --- a/gen/youtubeanalytics1-cli/src/cmn.rs +++ b/gen/youtubeanalytics1-cli/src/cmn.rs @@ -414,7 +414,7 @@ impl TokenStorage for JsonTokenStorage { Err(err) => match err.kind() { io::ErrorKind::NotFound => Ok(()), - _ => Err(json::Error::Io(err)) + _ => Err(json::Error::IoError(err)) }, Ok(_) => Ok(()), } @@ -427,7 +427,7 @@ impl TokenStorage for JsonTokenStorage { Err(serde_err) => Err(serde_err), } }, - Err(io_err) => Err(json::Error::Io(io_err)) + Err(io_err) => Err(json::Error::IoError(io_err)) } } } @@ -444,7 +444,7 @@ impl TokenStorage for JsonTokenStorage { Err(io_err) => { match io_err.kind() { io::ErrorKind::NotFound => Ok(None), - _ => Err(json::Error::Io(io_err)) + _ => Err(json::Error::IoError(io_err)) } } } @@ -683,7 +683,7 @@ pub fn application_secret_from_directory(dir: &str, = json::from_str(json_console_secret).unwrap(); match json::to_writer_pretty(&mut f, &console_secret) { Err(serde_err) => match serde_err { - json::Error::Io(err) => err, + json::Error::IoError(err) => err, _ => panic!("Unexpected serde error: {:#?}", serde_err) }, Ok(_) => continue, @@ -696,7 +696,7 @@ pub fn application_secret_from_directory(dir: &str, }, Ok(f) => { match json::de::from_reader::<_, ConsoleApplicationSecret>(f) { - Err(json::Error::Io(err)) => + Err(json::Error::IoError(err)) => return secret_io_error(err), Err(json_err) => return Err(CLIError::Configuration( diff --git a/gen/youtubeanalytics1-cli/src/main.rs b/gen/youtubeanalytics1-cli/src/main.rs index e38cabb5d9..a84c7a6d73 100644 --- a/gen/youtubeanalytics1-cli/src/main.rs +++ b/gen/youtubeanalytics1-cli/src/main.rs @@ -1125,8 +1125,8 @@ fn main() { let mut app = App::new("youtubeanalytics1") .author("Sebastian Thiel ") - .version("0.3.3+20160204") - .about("Retrieve your YouTube Analytics reports.") + .version("0.3.4+20160301") + .about("Retrieves your YouTube Analytics reports.") .after_help("All documentation details can be found at http://byron.github.io/google-apis-rs/google_youtubeanalytics1_cli") .arg(Arg::with_name("url") .long("scope") diff --git a/gen/youtubeanalytics1/Cargo.toml b/gen/youtubeanalytics1/Cargo.toml index 23f0143bed..1898985b38 100644 --- a/gen/youtubeanalytics1/Cargo.toml +++ b/gen/youtubeanalytics1/Cargo.toml @@ -4,7 +4,7 @@ [package] name = "google-youtubeanalytics1" -version = "0.1.12+20160204" +version = "0.1.13+20160301" authors = ["Sebastian Thiel "] description = "A complete library to interact with YouTube Analytics (protocol v1)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/youtubeanalytics1" @@ -16,14 +16,14 @@ build = "src/build.rs" [dependencies] -hyper = "0.7" -mime = "0.1.0" -serde = ">= 0.7.0" -serde_json = ">= 0.7.0" -yup-oauth2 = ">= 0.5.4" +hyper = "0.8" +mime = "0.2.0" +serde = "0.6.0" +serde_json = "0.6.0" +yup-oauth2 = ">= 0.5.6" url = ">= 0.5" [build-dependencies] -syntex = { version = ">= 0.23" } -serde_codegen = { version = ">= 0.6" } +syntex = { version = "= 0.28" } +serde_codegen = { version = "= 0.6.13" } diff --git a/gen/youtubeanalytics1/README.md b/gen/youtubeanalytics1/README.md index 5e473e5cf0..9bd2aedc10 100644 --- a/gen/youtubeanalytics1/README.md +++ b/gen/youtubeanalytics1/README.md @@ -5,7 +5,7 @@ DO NOT EDIT ! --> The `google-youtubeanalytics1` library allows access to all features of the *Google YouTube Analytics* service. -This documentation was generated from *YouTube Analytics* crate version *0.1.12+20160204*, where *20160204* is the exact revision of the *youtubeAnalytics:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.12*. +This documentation was generated from *YouTube Analytics* crate version *0.1.13+20160301*, where *20160301* is the exact revision of the *youtubeAnalytics:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.13*. Everything else about the *YouTube Analytics* *v1* API can be found at the [official documentation site](http://developers.google.com/youtube/analytics/). diff --git a/gen/youtubeanalytics1/src/cmn.rs b/gen/youtubeanalytics1/src/cmn.rs index 87b91a8986..c69621da55 100644 --- a/gen/youtubeanalytics1/src/cmn.rs +++ b/gen/youtubeanalytics1/src/cmn.rs @@ -12,7 +12,7 @@ use mime::{Mime, TopLevel, SubLevel, Attr, Value}; use oauth2::{TokenType, Retry, self}; use hyper; use hyper::header::{ContentType, ContentLength, Headers, UserAgent, Authorization, Header, - HeaderFormat}; + HeaderFormat, Bearer}; use hyper::http::h1::LINE_ENDING; use hyper::method::Method; use hyper::status::StatusCode; @@ -634,7 +634,7 @@ pub struct ResumableUploadHelper<'a, A: 'a> { pub start_at: Option, pub auth: &'a mut A, pub user_agent: &'a str, - pub auth_header: Authorization, + pub auth_header: Authorization, pub url: &'a str, pub reader: &'a mut ReadSeek, pub media_type: Mime, diff --git a/gen/youtubeanalytics1/src/lib.rs b/gen/youtubeanalytics1/src/lib.rs index 37215b3be2..b20df3e9d1 100644 --- a/gen/youtubeanalytics1/src/lib.rs +++ b/gen/youtubeanalytics1/src/lib.rs @@ -2,7 +2,7 @@ // This file was generated automatically from 'src/mako/api/lib.rs.mako' // DO NOT EDIT ! -//! This documentation was generated from *YouTube Analytics* crate version *0.1.12+20160204*, where *20160204* is the exact revision of the *youtubeAnalytics:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.12*. +//! This documentation was generated from *YouTube Analytics* crate version *0.1.13+20160301*, where *20160301* is the exact revision of the *youtubeAnalytics:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.13*. //! //! Everything else about the *YouTube Analytics* *v1* API can be found at the //! [official documentation site](http://developers.google.com/youtube/analytics/). diff --git a/gen/youtubeanalytics1/src/lib.rs.in b/gen/youtubeanalytics1/src/lib.rs.in index d92d37dca4..5eb7021527 100644 --- a/gen/youtubeanalytics1/src/lib.rs.in +++ b/gen/youtubeanalytics1/src/lib.rs.in @@ -147,7 +147,7 @@ impl<'a, C, A> YouTubeAnalytics YouTubeAnalytics { client: RefCell::new(client), auth: RefCell::new(authenticator), - _user_agent: "google-api-rust-client/0.1.12".to_string(), + _user_agent: "google-api-rust-client/0.1.13".to_string(), } } @@ -168,7 +168,7 @@ impl<'a, C, A> YouTubeAnalytics } /// Set the user-agent header field to use in all requests to the server. - /// It defaults to `google-api-rust-client/0.1.12`. + /// It defaults to `google-api-rust-client/0.1.13`. /// /// Returns the previously set user-agent. pub fn user_agent(&mut self, agent_name: String) -> String { @@ -992,7 +992,7 @@ impl<'a, C, A> ReportQueryCall<'a, C, A> where C: BorrowMut, A: o /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, ResultTable)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -1061,8 +1061,7 @@ impl<'a, C, A> ReportQueryCall<'a, C, A> where C: BorrowMut, A: o } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -1302,7 +1301,7 @@ impl<'a, C, A> BatchReportDefinitionListCall<'a, C, A> where C: BorrowMut Result<(hyper::client::Response, BatchReportDefinitionList)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -1350,8 +1349,7 @@ impl<'a, C, A> BatchReportDefinitionListCall<'a, C, A> where C: BorrowMut GroupItemInsertCall<'a, C, A> where C: BorrowMut, /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, GroupItem)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -1586,8 +1584,7 @@ impl<'a, C, A> GroupItemInsertCall<'a, C, A> where C: BorrowMut, } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -1767,7 +1764,7 @@ impl<'a, C, A> GroupItemListCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, GroupItemListResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -1818,8 +1815,7 @@ impl<'a, C, A> GroupItemListCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -1996,7 +1992,7 @@ impl<'a, C, A> GroupItemDeleteCall<'a, C, A> where C: BorrowMut, /// Perform the operation you have build so far. pub fn doit(mut self) -> Result { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -2046,8 +2042,7 @@ impl<'a, C, A> GroupItemDeleteCall<'a, C, A> where C: BorrowMut, } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Delete, &url) @@ -2214,7 +2209,7 @@ impl<'a, C, A> GroupDeleteCall<'a, C, A> where C: BorrowMut, A: o /// Perform the operation you have build so far. pub fn doit(mut self) -> Result { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -2264,8 +2259,7 @@ impl<'a, C, A> GroupDeleteCall<'a, C, A> where C: BorrowMut, A: o } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Delete, &url) @@ -2438,7 +2432,7 @@ impl<'a, C, A> GroupInsertCall<'a, C, A> where C: BorrowMut, A: o /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Group)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -2499,8 +2493,7 @@ impl<'a, C, A> GroupInsertCall<'a, C, A> where C: BorrowMut, A: o } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -2685,7 +2678,7 @@ impl<'a, C, A> GroupListCall<'a, C, A> where C: BorrowMut, A: oau /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, GroupListResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -2744,8 +2737,7 @@ impl<'a, C, A> GroupListCall<'a, C, A> where C: BorrowMut, A: oau } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -2939,7 +2931,7 @@ impl<'a, C, A> GroupUpdateCall<'a, C, A> where C: BorrowMut, A: o /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Group)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -3000,8 +2992,7 @@ impl<'a, C, A> GroupUpdateCall<'a, C, A> where C: BorrowMut, A: o } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); @@ -3180,7 +3171,7 @@ impl<'a, C, A> BatchReportListCall<'a, C, A> where C: BorrowMut, /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, BatchReportList)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -3229,8 +3220,7 @@ impl<'a, C, A> BatchReportListCall<'a, C, A> where C: BorrowMut, } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) diff --git a/gen/youtubereporting1-cli/Cargo.toml b/gen/youtubereporting1-cli/Cargo.toml index 895b0aec18..ab93d890ed 100644 --- a/gen/youtubereporting1-cli/Cargo.toml +++ b/gen/youtubereporting1-cli/Cargo.toml @@ -4,7 +4,7 @@ [package] name = "google-youtubereporting1-cli" -version = "0.3.3+20151026" +version = "0.3.4+20160315" authors = ["Sebastian Thiel "] description = "A complete library to interact with YouTube Reporting (protocol v1)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/youtubereporting1-cli" @@ -17,18 +17,18 @@ keywords = ["youtubereporting", "google", "cli"] name = "youtubereporting1" [dependencies] -hyper = "0.7" -mime = "0.1.0" -serde = ">= 0.7.0" -serde_json = ">= 0.7.0" -yup-oauth2 = ">= 0.5.4" +hyper = "0.8" +mime = "0.2.0" +serde = "0.6.0" +serde_json = "0.6.0" +yup-oauth2 = ">= 0.5.6" strsim = "0.4" yup-hyper-mock = "1.0" clap = "2.0" [build-dependencies] -syntex = { version = ">= 0.23" } -serde_codegen = { version = ">= 0.6" } +syntex = { version = "= 0.28" } +serde_codegen = { version = "= 0.6.13" } [dependencies.google-youtubereporting1] diff --git a/gen/youtubereporting1-cli/README.md b/gen/youtubereporting1-cli/README.md index 7542ff2c8e..80ef1f7b51 100644 --- a/gen/youtubereporting1-cli/README.md +++ b/gen/youtubereporting1-cli/README.md @@ -17,14 +17,14 @@ Everything else about the *YouTube Reporting* API can be found at the You can download the pre-compiled 64bit binaries for the following platforms: -* ![icon](http://megaicons.net/static/img/icons_sizes/6/140/16/ubuntu-icon.png) [ubuntu](http://dl.byronimo.de/google.rs/cli/0.3.3/ubuntu/youtubereporting1.tar.gz) -* ![icon](http://hydra-media.cursecdn.com/wow.gamepedia.com/a/a2/Apple-icon-16x16.png?version=25ddd67ac3dd3b634478e3978b76cb74) [osx](http://dl.byronimo.de/google.rs/cli/0.3.3/osx/youtubereporting1.tar.gz) +* ![icon](http://megaicons.net/static/img/icons_sizes/6/140/16/ubuntu-icon.png) [ubuntu](http://dl.byronimo.de/google.rs/cli/0.3.4/ubuntu/youtubereporting1.tar.gz) +* ![icon](http://hydra-media.cursecdn.com/wow.gamepedia.com/a/a2/Apple-icon-16x16.png?version=25ddd67ac3dd3b634478e3978b76cb74) [osx](http://dl.byronimo.de/google.rs/cli/0.3.4/osx/youtubereporting1.tar.gz) Find the source code [on github](https://github.com/Byron/google-apis-rs/tree/master/gen/youtubereporting1-cli). # Usage -This documentation was generated from the *YouTube Reporting* API at revision *20151026*. The CLI is at version *0.3.3*. +This documentation was generated from the *YouTube Reporting* API at revision *20160315*. The CLI is at version *0.3.4*. ```bash youtubereporting1 [options] diff --git a/gen/youtubereporting1-cli/mkdocs.yml b/gen/youtubereporting1-cli/mkdocs.yml index bef97546c5..3d04b439f6 100644 --- a/gen/youtubereporting1-cli/mkdocs.yml +++ b/gen/youtubereporting1-cli/mkdocs.yml @@ -1,4 +1,4 @@ -site_name: YouTube Reporting v0.3.3+20151026 +site_name: YouTube Reporting v0.3.4+20160315 site_url: http://byron.github.io/google-apis-rs/google-youtubereporting1-cli site_description: Write integrating applications with bcore diff --git a/gen/youtubereporting1-cli/src/cmn.rs b/gen/youtubereporting1-cli/src/cmn.rs index 188159ee80..ae86fdef65 100644 --- a/gen/youtubereporting1-cli/src/cmn.rs +++ b/gen/youtubereporting1-cli/src/cmn.rs @@ -414,7 +414,7 @@ impl TokenStorage for JsonTokenStorage { Err(err) => match err.kind() { io::ErrorKind::NotFound => Ok(()), - _ => Err(json::Error::Io(err)) + _ => Err(json::Error::IoError(err)) }, Ok(_) => Ok(()), } @@ -427,7 +427,7 @@ impl TokenStorage for JsonTokenStorage { Err(serde_err) => Err(serde_err), } }, - Err(io_err) => Err(json::Error::Io(io_err)) + Err(io_err) => Err(json::Error::IoError(io_err)) } } } @@ -444,7 +444,7 @@ impl TokenStorage for JsonTokenStorage { Err(io_err) => { match io_err.kind() { io::ErrorKind::NotFound => Ok(None), - _ => Err(json::Error::Io(io_err)) + _ => Err(json::Error::IoError(io_err)) } } } @@ -683,7 +683,7 @@ pub fn application_secret_from_directory(dir: &str, = json::from_str(json_console_secret).unwrap(); match json::to_writer_pretty(&mut f, &console_secret) { Err(serde_err) => match serde_err { - json::Error::Io(err) => err, + json::Error::IoError(err) => err, _ => panic!("Unexpected serde error: {:#?}", serde_err) }, Ok(_) => continue, @@ -696,7 +696,7 @@ pub fn application_secret_from_directory(dir: &str, }, Ok(f) => { match json::de::from_reader::<_, ConsoleApplicationSecret>(f) { - Err(json::Error::Io(err)) => + Err(json::Error::IoError(err)) => return secret_io_error(err), Err(json_err) => return Err(CLIError::Configuration( diff --git a/gen/youtubereporting1-cli/src/main.rs b/gen/youtubereporting1-cli/src/main.rs index 7da96969b9..737b6de669 100644 --- a/gen/youtubereporting1-cli/src/main.rs +++ b/gen/youtubereporting1-cli/src/main.rs @@ -69,11 +69,12 @@ impl<'n> Engine<'n> { let type_info: Option<(&'static str, JsonTypeInfo)> = match &temp_cursor.to_string()[..] { "report-type-id" => Some(("reportTypeId", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "system-managed" => Some(("systemManaged", JsonTypeInfo { jtype: JsonType::Boolean, ctype: ComplexType::Pod })), "id" => Some(("id", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "create-time" => Some(("createTime", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), "name" => Some(("name", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), _ => { - let suggestion = FieldCursor::did_you_mean(key, &vec!["create-time", "id", "name", "report-type-id"]); + let suggestion = FieldCursor::did_you_mean(key, &vec!["create-time", "id", "name", "report-type-id", "system-managed"]); err.issues.push(CLIError::Field(FieldError::Unknown(temp_cursor.to_string(), suggestion, value.map(|v| v.to_string())))); None } @@ -264,6 +265,9 @@ impl<'n> Engine<'n> { "on-behalf-of-content-owner" => { call = call.on_behalf_of_content_owner(value.unwrap_or("")); }, + "include-system-managed" => { + call = call.include_system_managed(arg_from_str(value.unwrap_or("false"), err, "include-system-managed", "boolean")); + }, _ => { let mut found = false; for param in &self.gp { @@ -277,7 +281,7 @@ impl<'n> Engine<'n> { err.issues.push(CLIError::UnknownParameter(key.to_string(), {let mut v = Vec::new(); v.extend(self.gp.iter().map(|v|*v)); - v.extend(["page-token", "on-behalf-of-content-owner", "page-size"].iter().map(|v|*v)); + v.extend(["page-token", "on-behalf-of-content-owner", "include-system-managed", "page-size"].iter().map(|v|*v)); v } )); } } @@ -373,6 +377,12 @@ impl<'n> Engine<'n> { for parg in opt.values_of("v").map(|i|i.collect()).unwrap_or(Vec::new()).iter() { let (key, value) = parse_kv_arg(&*parg, err, false); match key { + "start-time-before" => { + call = call.start_time_before(value.unwrap_or("")); + }, + "start-time-at-or-after" => { + call = call.start_time_at_or_after(value.unwrap_or("")); + }, "page-token" => { call = call.page_token(value.unwrap_or("")); }, @@ -398,7 +408,7 @@ impl<'n> Engine<'n> { err.issues.push(CLIError::UnknownParameter(key.to_string(), {let mut v = Vec::new(); v.extend(self.gp.iter().map(|v|*v)); - v.extend(["page-token", "on-behalf-of-content-owner", "created-after", "page-size"].iter().map(|v|*v)); + v.extend(["created-after", "page-size", "start-time-at-or-after", "on-behalf-of-content-owner", "page-token", "start-time-before"].iter().map(|v|*v)); v } )); } } @@ -508,6 +518,9 @@ impl<'n> Engine<'n> { "on-behalf-of-content-owner" => { call = call.on_behalf_of_content_owner(value.unwrap_or("")); }, + "include-system-managed" => { + call = call.include_system_managed(arg_from_str(value.unwrap_or("false"), err, "include-system-managed", "boolean")); + }, _ => { let mut found = false; for param in &self.gp { @@ -521,7 +534,7 @@ impl<'n> Engine<'n> { err.issues.push(CLIError::UnknownParameter(key.to_string(), {let mut v = Vec::new(); v.extend(self.gp.iter().map(|v|*v)); - v.extend(["page-token", "on-behalf-of-content-owner", "page-size"].iter().map(|v|*v)); + v.extend(["page-token", "on-behalf-of-content-owner", "include-system-managed", "page-size"].iter().map(|v|*v)); v } )); } } @@ -836,7 +849,7 @@ fn main() { vec![ (Some(r##"resource-name"##), None, - Some(r##"Name of the media that is being downloaded. See [][ByteStream.ReadRequest.resource_name]."##), + Some(r##"Name of the media that is being downloaded. See ByteStream.ReadRequest.resource_name."##), Some(true), Some(false)), @@ -877,8 +890,8 @@ fn main() { let mut app = App::new("youtubereporting1") .author("Sebastian Thiel ") - .version("0.3.3+20151026") - .about("An API to schedule reporting jobs and download the resulting bulk data reports about YouTube channels, videos etc. in the form of CSV files.") + .version("0.3.4+20160315") + .about("Schedules reporting jobs and downloads the resulting bulk data reports about YouTube channels, videos, etc. in the form of CSV files.") .after_help("All documentation details can be found at http://byron.github.io/google-apis-rs/google_youtubereporting1_cli") .arg(Arg::with_name("url") .long("scope") diff --git a/gen/youtubereporting1/Cargo.toml b/gen/youtubereporting1/Cargo.toml index 410ca076f3..51665819d3 100644 --- a/gen/youtubereporting1/Cargo.toml +++ b/gen/youtubereporting1/Cargo.toml @@ -4,7 +4,7 @@ [package] name = "google-youtubereporting1" -version = "0.1.12+20151026" +version = "0.1.13+20160315" authors = ["Sebastian Thiel "] description = "A complete library to interact with YouTube Reporting (protocol v1)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/youtubereporting1" @@ -16,14 +16,14 @@ build = "src/build.rs" [dependencies] -hyper = "0.7" -mime = "0.1.0" -serde = ">= 0.7.0" -serde_json = ">= 0.7.0" -yup-oauth2 = ">= 0.5.4" +hyper = "0.8" +mime = "0.2.0" +serde = "0.6.0" +serde_json = "0.6.0" +yup-oauth2 = ">= 0.5.6" url = ">= 0.5" [build-dependencies] -syntex = { version = ">= 0.23" } -serde_codegen = { version = ">= 0.6" } +syntex = { version = "= 0.28" } +serde_codegen = { version = "= 0.6.13" } diff --git a/gen/youtubereporting1/README.md b/gen/youtubereporting1/README.md index f2c4dae2cb..ac165c4723 100644 --- a/gen/youtubereporting1/README.md +++ b/gen/youtubereporting1/README.md @@ -5,7 +5,7 @@ DO NOT EDIT ! --> The `google-youtubereporting1` library allows access to all features of the *Google YouTube Reporting* service. -This documentation was generated from *YouTube Reporting* crate version *0.1.12+20151026*, where *20151026* is the exact revision of the *youtubereporting:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.12*. +This documentation was generated from *YouTube Reporting* crate version *0.1.13+20160315*, where *20160315* is the exact revision of the *youtubereporting:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.13*. Everything else about the *YouTube Reporting* *v1* API can be found at the [official documentation site](https://developers.google.com/youtube/reporting/v1/reports/). @@ -106,10 +106,12 @@ let mut hub = YouTubeReporting::new(hyper::Client::new(), auth); // execute the final call using `doit()`. // Values shown here are possibly random and not representative ! let result = hub.jobs().reports_list("jobId") - .page_token("sit") - .page_size(-65) - .on_behalf_of_content_owner("sed") - .created_after("et") + .start_time_before("sit") + .start_time_at_or_after("Stet") + .page_token("sed") + .page_size(-85) + .on_behalf_of_content_owner("dolores") + .created_after("kasd") .doit(); match result { diff --git a/gen/youtubereporting1/src/cmn.rs b/gen/youtubereporting1/src/cmn.rs index 87b91a8986..c69621da55 100644 --- a/gen/youtubereporting1/src/cmn.rs +++ b/gen/youtubereporting1/src/cmn.rs @@ -12,7 +12,7 @@ use mime::{Mime, TopLevel, SubLevel, Attr, Value}; use oauth2::{TokenType, Retry, self}; use hyper; use hyper::header::{ContentType, ContentLength, Headers, UserAgent, Authorization, Header, - HeaderFormat}; + HeaderFormat, Bearer}; use hyper::http::h1::LINE_ENDING; use hyper::method::Method; use hyper::status::StatusCode; @@ -634,7 +634,7 @@ pub struct ResumableUploadHelper<'a, A: 'a> { pub start_at: Option, pub auth: &'a mut A, pub user_agent: &'a str, - pub auth_header: Authorization, + pub auth_header: Authorization, pub url: &'a str, pub reader: &'a mut ReadSeek, pub media_type: Mime, diff --git a/gen/youtubereporting1/src/lib.rs b/gen/youtubereporting1/src/lib.rs index 4a7c32cbc9..09c05ccd24 100644 --- a/gen/youtubereporting1/src/lib.rs +++ b/gen/youtubereporting1/src/lib.rs @@ -2,7 +2,7 @@ // This file was generated automatically from 'src/mako/api/lib.rs.mako' // DO NOT EDIT ! -//! This documentation was generated from *YouTube Reporting* crate version *0.1.12+20151026*, where *20151026* is the exact revision of the *youtubereporting:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.12*. +//! This documentation was generated from *YouTube Reporting* crate version *0.1.13+20160315*, where *20160315* is the exact revision of the *youtubereporting:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.13*. //! //! Everything else about the *YouTube Reporting* *v1* API can be found at the //! [official documentation site](https://developers.google.com/youtube/reporting/v1/reports/). @@ -107,10 +107,12 @@ //! // execute the final call using `doit()`. //! // Values shown here are possibly random and not representative ! //! let result = hub.jobs().reports_list("jobId") -//! .page_token("sea") -//! .page_size(-55) -//! .on_behalf_of_content_owner("eos") -//! .created_after("erat") +//! .start_time_before("amet") +//! .start_time_at_or_after("no") +//! .page_token("labore") +//! .page_size(-39) +//! .on_behalf_of_content_owner("dolore") +//! .created_after("invidunt") //! .doit(); //! //! match result { diff --git a/gen/youtubereporting1/src/lib.rs.in b/gen/youtubereporting1/src/lib.rs.in index 536b9b0805..dfc0d70799 100644 --- a/gen/youtubereporting1/src/lib.rs.in +++ b/gen/youtubereporting1/src/lib.rs.in @@ -96,10 +96,12 @@ impl Default for Scope { /// // execute the final call using `doit()`. /// // Values shown here are possibly random and not representative ! /// let result = hub.jobs().reports_list("jobId") -/// .page_token("kasd") -/// .page_size(-22) -/// .on_behalf_of_content_owner("takimata") -/// .created_after("justo") +/// .start_time_before("takimata") +/// .start_time_at_or_after("justo") +/// .page_token("amet.") +/// .page_size(-81) +/// .on_behalf_of_content_owner("labore") +/// .created_after("sea") /// .doit(); /// /// match result { @@ -135,7 +137,7 @@ impl<'a, C, A> YouTubeReporting YouTubeReporting { client: RefCell::new(client), auth: RefCell::new(authenticator), - _user_agent: "google-api-rust-client/0.1.12".to_string(), + _user_agent: "google-api-rust-client/0.1.13".to_string(), } } @@ -150,7 +152,7 @@ impl<'a, C, A> YouTubeReporting } /// Set the user-agent header field to use in all requests to the server. - /// It defaults to `google-api-rust-client/0.1.12`. + /// It defaults to `google-api-rust-client/0.1.13`. /// /// Returns the previously set user-agent. pub fn user_agent(&mut self, agent_name: String) -> String { @@ -245,9 +247,12 @@ pub struct Job { /// The type of reports this job creates. Corresponds to the ID of a ReportType. #[serde(rename="reportTypeId")] pub report_type_id: Option, + /// True if this a system-managed job that cannot be modified by the user; otherwise false. + #[serde(rename="systemManaged")] + pub system_managed: Option, /// The server-generated ID of the job (max. 40 characters). pub id: Option, - /// The name of the job (max. 100 characters). TODO(lanthaler) Clarify what this will actually be used for + /// The name of the job (max. 100 characters). pub name: Option, /// The creation date/time of the job. #[serde(rename="createTime")] @@ -291,6 +296,9 @@ impl ResponseResult for ListReportsResponse {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ReportType { + /// True if this a system-managed report type; otherwise false. Reporting jobs for system-managed report types are created automatically and can thus not be used in the `CreateJob` method. + #[serde(rename="systemManaged")] + pub system_managed: Option, /// The ID of the report type (max. 100 characters). pub id: Option, /// The name of the report type (max. 100 characters). @@ -397,7 +405,7 @@ impl<'a, C, A> MediaMethods<'a, C, A> { /// /// # Arguments /// - /// * `resourceName` - Name of the media that is being downloaded. See [][ByteStream.ReadRequest.resource_name]. + /// * `resourceName` - Name of the media that is being downloaded. See ByteStream.ReadRequest.resource_name. pub fn download(&self, resource_name: &str) -> MediaDownloadCall<'a, C, A> { MediaDownloadCall { hub: self.hub, @@ -458,6 +466,7 @@ impl<'a, C, A> ReportTypeMethods<'a, C, A> { _page_token: Default::default(), _page_size: Default::default(), _on_behalf_of_content_owner: Default::default(), + _include_system_managed: Default::default(), _delegate: Default::default(), _scopes: Default::default(), _additional_params: Default::default(), @@ -572,6 +581,8 @@ impl<'a, C, A> JobMethods<'a, C, A> { JobReportListCall { hub: self.hub, _job_id: job_id.to_string(), + _start_time_before: Default::default(), + _start_time_at_or_after: Default::default(), _page_token: Default::default(), _page_size: Default::default(), _on_behalf_of_content_owner: Default::default(), @@ -591,6 +602,7 @@ impl<'a, C, A> JobMethods<'a, C, A> { _page_token: Default::default(), _page_size: Default::default(), _on_behalf_of_content_owner: Default::default(), + _include_system_managed: Default::default(), _delegate: Default::default(), _scopes: Default::default(), _additional_params: Default::default(), @@ -678,7 +690,7 @@ impl<'a, C, A> MediaDownloadCall<'a, C, A> where C: BorrowMut, A: pub fn doit(mut self) -> Result<(hyper::client::Response, Media)> { use url::percent_encoding::{percent_encode, FORM_URLENCODED_ENCODE_SET}; use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -766,8 +778,7 @@ impl<'a, C, A> MediaDownloadCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -823,7 +834,7 @@ impl<'a, C, A> MediaDownloadCall<'a, C, A> where C: BorrowMut, A: } - /// Name of the media that is being downloaded. See [][ByteStream.ReadRequest.resource_name]. + /// Name of the media that is being downloaded. See ByteStream.ReadRequest.resource_name. /// /// Sets the *resource name* path property to the given value. /// @@ -918,9 +929,10 @@ impl<'a, C, A> MediaDownloadCall<'a, C, A> where C: BorrowMut, A: /// // execute the final call using `doit()`. /// // Values shown here are possibly random and not representative ! /// let result = hub.report_types().list() -/// .page_token("erat") -/// .page_size(-35) -/// .on_behalf_of_content_owner("sea") +/// .page_token("dolores") +/// .page_size(-61) +/// .on_behalf_of_content_owner("sadipscing") +/// .include_system_managed(true) /// .doit(); /// # } /// ``` @@ -931,6 +943,7 @@ pub struct ReportTypeListCall<'a, C, A> _page_token: Option, _page_size: Option, _on_behalf_of_content_owner: Option, + _include_system_managed: Option, _delegate: Option<&'a mut Delegate>, _additional_params: HashMap, _scopes: BTreeMap @@ -944,7 +957,7 @@ impl<'a, C, A> ReportTypeListCall<'a, C, A> where C: BorrowMut, A /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, ListReportTypesResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -952,7 +965,7 @@ impl<'a, C, A> ReportTypeListCall<'a, C, A> where C: BorrowMut, A }; dlg.begin(MethodInfo { id: "youtubereporting.reportTypes.list", http_method: hyper::method::Method::Get }); - let mut params: Vec<(&str, String)> = Vec::with_capacity((5 + self._additional_params.len())); + let mut params: Vec<(&str, String)> = Vec::with_capacity((6 + self._additional_params.len())); if let Some(value) = self._page_token { params.push(("pageToken", value.to_string())); } @@ -962,7 +975,10 @@ impl<'a, C, A> ReportTypeListCall<'a, C, A> where C: BorrowMut, A if let Some(value) = self._on_behalf_of_content_owner { params.push(("onBehalfOfContentOwner", value.to_string())); } - for &field in ["alt", "pageToken", "pageSize", "onBehalfOfContentOwner"].iter() { + if let Some(value) = self._include_system_managed { + params.push(("includeSystemManaged", value.to_string())); + } + for &field in ["alt", "pageToken", "pageSize", "onBehalfOfContentOwner", "includeSystemManaged"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); return Err(Error::FieldClash(field)); @@ -1000,8 +1016,7 @@ impl<'a, C, A> ReportTypeListCall<'a, C, A> where C: BorrowMut, A } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -1078,6 +1093,13 @@ impl<'a, C, A> ReportTypeListCall<'a, C, A> where C: BorrowMut, A self._on_behalf_of_content_owner = Some(new_value.to_string()); self } + /// If set to true, also system-managed report types will be returned; otherwise only the report types that can be used to create new reporting jobs will be returned. + /// + /// Sets the *include system managed* query property to the given value. + pub fn include_system_managed(mut self, new_value: bool) -> ReportTypeListCall<'a, C, A> { + self._include_system_managed = Some(new_value); + self + } /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// @@ -1163,7 +1185,7 @@ impl<'a, C, A> ReportTypeListCall<'a, C, A> where C: BorrowMut, A /// // execute the final call using `doit()`. /// // Values shown here are possibly random and not representative ! /// let result = hub.jobs().delete("jobId") -/// .on_behalf_of_content_owner("dolores") +/// .on_behalf_of_content_owner("no") /// .doit(); /// # } /// ``` @@ -1186,7 +1208,7 @@ impl<'a, C, A> JobDeleteCall<'a, C, A> where C: BorrowMut, A: oau /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Empty)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -1258,8 +1280,7 @@ impl<'a, C, A> JobDeleteCall<'a, C, A> where C: BorrowMut, A: oau } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Delete, &url) @@ -1417,7 +1438,7 @@ impl<'a, C, A> JobDeleteCall<'a, C, A> where C: BorrowMut, A: oau /// // execute the final call using `doit()`. /// // Values shown here are possibly random and not representative ! /// let result = hub.jobs().reports_get("jobId", "reportId") -/// .on_behalf_of_content_owner("aliquyam") +/// .on_behalf_of_content_owner("et") /// .doit(); /// # } /// ``` @@ -1441,7 +1462,7 @@ impl<'a, C, A> JobReportGetCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Report)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -1514,8 +1535,7 @@ impl<'a, C, A> JobReportGetCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -1683,7 +1703,7 @@ impl<'a, C, A> JobReportGetCall<'a, C, A> where C: BorrowMut, A: /// // execute the final call using `doit()`. /// // Values shown here are possibly random and not representative ! /// let result = hub.jobs().get("jobId") -/// .on_behalf_of_content_owner("no") +/// .on_behalf_of_content_owner("diam") /// .doit(); /// # } /// ``` @@ -1706,7 +1726,7 @@ impl<'a, C, A> JobGetCall<'a, C, A> where C: BorrowMut, A: oauth2 /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Job)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -1778,8 +1798,7 @@ impl<'a, C, A> JobGetCall<'a, C, A> where C: BorrowMut, A: oauth2 } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -1937,10 +1956,12 @@ impl<'a, C, A> JobGetCall<'a, C, A> where C: BorrowMut, A: oauth2 /// // execute the final call using `doit()`. /// // Values shown here are possibly random and not representative ! /// let result = hub.jobs().reports_list("jobId") -/// .page_token("justo") -/// .page_size(-34) -/// .on_behalf_of_content_owner("et") -/// .created_after("diam") +/// .start_time_before("Lorem") +/// .start_time_at_or_after("et") +/// .page_token("duo") +/// .page_size(-32) +/// .on_behalf_of_content_owner("sea") +/// .created_after("Lorem") /// .doit(); /// # } /// ``` @@ -1949,6 +1970,8 @@ pub struct JobReportListCall<'a, C, A> hub: &'a YouTubeReporting, _job_id: String, + _start_time_before: Option, + _start_time_at_or_after: Option, _page_token: Option, _page_size: Option, _on_behalf_of_content_owner: Option, @@ -1966,7 +1989,7 @@ impl<'a, C, A> JobReportListCall<'a, C, A> where C: BorrowMut, A: /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, ListReportsResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -1974,8 +1997,14 @@ impl<'a, C, A> JobReportListCall<'a, C, A> where C: BorrowMut, A: }; dlg.begin(MethodInfo { id: "youtubereporting.jobs.reports.list", http_method: hyper::method::Method::Get }); - let mut params: Vec<(&str, String)> = Vec::with_capacity((7 + self._additional_params.len())); + let mut params: Vec<(&str, String)> = Vec::with_capacity((9 + self._additional_params.len())); params.push(("jobId", self._job_id.to_string())); + if let Some(value) = self._start_time_before { + params.push(("startTimeBefore", value.to_string())); + } + if let Some(value) = self._start_time_at_or_after { + params.push(("startTimeAtOrAfter", value.to_string())); + } if let Some(value) = self._page_token { params.push(("pageToken", value.to_string())); } @@ -1988,7 +2017,7 @@ impl<'a, C, A> JobReportListCall<'a, C, A> where C: BorrowMut, A: if let Some(value) = self._created_after { params.push(("createdAfter", value.to_string())); } - for &field in ["alt", "jobId", "pageToken", "pageSize", "onBehalfOfContentOwner", "createdAfter"].iter() { + for &field in ["alt", "jobId", "startTimeBefore", "startTimeAtOrAfter", "pageToken", "pageSize", "onBehalfOfContentOwner", "createdAfter"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); return Err(Error::FieldClash(field)); @@ -2047,8 +2076,7 @@ impl<'a, C, A> JobReportListCall<'a, C, A> where C: BorrowMut, A: } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -2114,6 +2142,20 @@ impl<'a, C, A> JobReportListCall<'a, C, A> where C: BorrowMut, A: self._job_id = new_value.to_string(); self } + /// If set, only reports whose start time is smaller than the specified date/time are returned. + /// + /// Sets the *start time before* query property to the given value. + pub fn start_time_before(mut self, new_value: &str) -> JobReportListCall<'a, C, A> { + self._start_time_before = Some(new_value.to_string()); + self + } + /// If set, only reports whose start time is greater than or equal the specified date/time are returned. + /// + /// Sets the *start time at or after* query property to the given value. + pub fn start_time_at_or_after(mut self, new_value: &str) -> JobReportListCall<'a, C, A> { + self._start_time_at_or_after = Some(new_value.to_string()); + self + } /// A token identifying a page of results the server should return. Typically, this is the value of ListReportsResponse.next_page_token returned in response to the previous call to the `ListReports` method. /// /// Sets the *page token* query property to the given value. @@ -2227,9 +2269,10 @@ impl<'a, C, A> JobReportListCall<'a, C, A> where C: BorrowMut, A: /// // execute the final call using `doit()`. /// // Values shown here are possibly random and not representative ! /// let result = hub.jobs().list() -/// .page_token("ipsum") -/// .page_size(-5) -/// .on_behalf_of_content_owner("et") +/// .page_token("eos") +/// .page_size(-81) +/// .on_behalf_of_content_owner("sadipscing") +/// .include_system_managed(true) /// .doit(); /// # } /// ``` @@ -2240,6 +2283,7 @@ pub struct JobListCall<'a, C, A> _page_token: Option, _page_size: Option, _on_behalf_of_content_owner: Option, + _include_system_managed: Option, _delegate: Option<&'a mut Delegate>, _additional_params: HashMap, _scopes: BTreeMap @@ -2253,7 +2297,7 @@ impl<'a, C, A> JobListCall<'a, C, A> where C: BorrowMut, A: oauth /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, ListJobsResponse)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -2261,7 +2305,7 @@ impl<'a, C, A> JobListCall<'a, C, A> where C: BorrowMut, A: oauth }; dlg.begin(MethodInfo { id: "youtubereporting.jobs.list", http_method: hyper::method::Method::Get }); - let mut params: Vec<(&str, String)> = Vec::with_capacity((5 + self._additional_params.len())); + let mut params: Vec<(&str, String)> = Vec::with_capacity((6 + self._additional_params.len())); if let Some(value) = self._page_token { params.push(("pageToken", value.to_string())); } @@ -2271,7 +2315,10 @@ impl<'a, C, A> JobListCall<'a, C, A> where C: BorrowMut, A: oauth if let Some(value) = self._on_behalf_of_content_owner { params.push(("onBehalfOfContentOwner", value.to_string())); } - for &field in ["alt", "pageToken", "pageSize", "onBehalfOfContentOwner"].iter() { + if let Some(value) = self._include_system_managed { + params.push(("includeSystemManaged", value.to_string())); + } + for &field in ["alt", "pageToken", "pageSize", "onBehalfOfContentOwner", "includeSystemManaged"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); return Err(Error::FieldClash(field)); @@ -2309,8 +2356,7 @@ impl<'a, C, A> JobListCall<'a, C, A> where C: BorrowMut, A: oauth } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url) @@ -2387,6 +2433,13 @@ impl<'a, C, A> JobListCall<'a, C, A> where C: BorrowMut, A: oauth self._on_behalf_of_content_owner = Some(new_value.to_string()); self } + /// If set to true, also system-managed jobs will be returned; otherwise only user-created jobs will be returned. System-managed jobs can neither be modified nor deleted. + /// + /// Sets the *include system managed* query property to the given value. + pub fn include_system_managed(mut self, new_value: bool) -> JobListCall<'a, C, A> { + self._include_system_managed = Some(new_value); + self + } /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong /// while executing the actual API request. /// @@ -2478,7 +2531,7 @@ impl<'a, C, A> JobListCall<'a, C, A> where C: BorrowMut, A: oauth /// // execute the final call using `doit()`. /// // Values shown here are possibly random and not representative ! /// let result = hub.jobs().create(req) -/// .on_behalf_of_content_owner("duo") +/// .on_behalf_of_content_owner("eirmod") /// .doit(); /// # } /// ``` @@ -2501,7 +2554,7 @@ impl<'a, C, A> JobCreateCall<'a, C, A> where C: BorrowMut, A: oau /// Perform the operation you have build so far. pub fn doit(mut self) -> Result<(hyper::client::Response, Job)> { use std::io::{Read, Seek}; - use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location}; + use hyper::header::{ContentType, ContentLength, Authorization, Bearer, UserAgent, Location}; let mut dd = DefaultDelegate; let mut dlg: &mut Delegate = match self._delegate { Some(d) => d, @@ -2562,8 +2615,7 @@ impl<'a, C, A> JobCreateCall<'a, C, A> where C: BorrowMut, A: oau } } }; - let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, - access_token: token.access_token }); + let auth_header = Authorization(Bearer { token: token.access_token }); request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); let mut req_result = { let mut client = &mut *self.hub.client.borrow_mut();