mirror of
https://github.com/OMGeeky/google-apis-rs.git
synced 2026-02-23 15:49:49 +01:00
chore(code-update): to latest schema version
This commit is contained in:
@@ -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<u64>,
|
||||
pub auth: &'a mut A,
|
||||
pub user_agent: &'a str,
|
||||
pub auth_header: Authorization<oauth2::Scheme>,
|
||||
pub auth_header: Authorization<Bearer>,
|
||||
pub url: &'a str,
|
||||
pub reader: &'a mut ReadSeek,
|
||||
pub media_type: Mime,
|
||||
|
||||
@@ -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(),
|
||||
//! <MemoryStorage as Default>::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 !
|
||||
|
||||
@@ -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(),
|
||||
/// <MemoryStorage as Default>::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<C, A> {
|
||||
pub struct CloudResourceManager<C, A> {
|
||||
client: RefCell<C>,
|
||||
auth: RefCell<A>,
|
||||
_user_agent: String,
|
||||
}
|
||||
|
||||
impl<'a, C, A> Hub for Cloudresourcemanager<C, A> {}
|
||||
impl<'a, C, A> Hub for CloudResourceManager<C, A> {}
|
||||
|
||||
impl<'a, C, A> Cloudresourcemanager<C, A>
|
||||
impl<'a, C, A> CloudResourceManager<C, A>
|
||||
where C: BorrowMut<hyper::Client>, A: oauth2::GetToken {
|
||||
|
||||
pub fn new(client: C, authenticator: A) -> Cloudresourcemanager<C, A> {
|
||||
Cloudresourcemanager {
|
||||
pub fn new(client: C, authenticator: A) -> CloudResourceManager<C, A> {
|
||||
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<C, A>
|
||||
}
|
||||
|
||||
/// 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(),
|
||||
/// <MemoryStorage as Default>::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<C, A>,
|
||||
hub: &'a CloudResourceManager<C, A>,
|
||||
}
|
||||
|
||||
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(),
|
||||
/// # <MemoryStorage as Default>::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<C, A>,
|
||||
hub: &'a CloudResourceManager<C, A>,
|
||||
_project_id: String,
|
||||
_delegate: Option<&'a mut Delegate>,
|
||||
_additional_params: HashMap<String, String>,
|
||||
@@ -619,7 +619,7 @@ impl<'a, C, A> ProjectGetCall<'a, C, A> where C: BorrowMut<hyper::Client>, 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<hyper::Client>, 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<hyper::Client>, 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(),
|
||||
/// # <MemoryStorage as Default>::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<hyper::Client>, A: oa
|
||||
pub struct ProjectUndeleteCall<'a, C, A>
|
||||
where C: 'a, A: 'a {
|
||||
|
||||
hub: &'a Cloudresourcemanager<C, A>,
|
||||
hub: &'a CloudResourceManager<C, A>,
|
||||
_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<hyper::Client>,
|
||||
/// 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<hyper::Client>,
|
||||
}
|
||||
}
|
||||
};
|
||||
let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer,
|
||||
access_token: token.access_token });
|
||||
let auth_header = Authorization(Bearer { token: token.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<hyper::Client>,
|
||||
/// # #[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(),
|
||||
/// # <MemoryStorage as Default>::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<hyper::Client>,
|
||||
pub struct ProjectSetIamPolicyCall<'a, C, A>
|
||||
where C: 'a, A: 'a {
|
||||
|
||||
hub: &'a Cloudresourcemanager<C, A>,
|
||||
hub: &'a CloudResourceManager<C, A>,
|
||||
_request: SetIamPolicyRequest,
|
||||
_resource: String,
|
||||
_delegate: Option<&'a mut Delegate>,
|
||||
@@ -1141,7 +1139,7 @@ impl<'a, C, A> ProjectSetIamPolicyCall<'a, C, A> where C: BorrowMut<hyper::Clien
|
||||
/// Perform the operation you have build so far.
|
||||
pub fn doit(mut self) -> 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<hyper::Clien
|
||||
}
|
||||
}
|
||||
};
|
||||
let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer,
|
||||
access_token: token.access_token });
|
||||
let auth_header = Authorization(Bearer { token: token.access_token });
|
||||
request_value_reader.seek(io::SeekFrom::Start(0)).unwrap();
|
||||
let mut req_result = {
|
||||
let mut client = &mut *self.hub.client.borrow_mut();
|
||||
@@ -1376,13 +1373,13 @@ impl<'a, C, A> ProjectSetIamPolicyCall<'a, C, A> where C: BorrowMut<hyper::Clien
|
||||
/// # #[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(),
|
||||
/// # <MemoryStorage as Default>::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<hyper::Clien
|
||||
pub struct ProjectTestIamPermissionCall<'a, C, A>
|
||||
where C: 'a, A: 'a {
|
||||
|
||||
hub: &'a Cloudresourcemanager<C, A>,
|
||||
hub: &'a CloudResourceManager<C, A>,
|
||||
_request: TestIamPermissionsRequest,
|
||||
_resource: String,
|
||||
_delegate: Option<&'a mut Delegate>,
|
||||
@@ -1414,7 +1411,7 @@ impl<'a, C, A> ProjectTestIamPermissionCall<'a, C, A> where C: BorrowMut<hyper::
|
||||
/// Perform the operation you have build so far.
|
||||
pub fn doit(mut self) -> 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<hyper::
|
||||
}
|
||||
}
|
||||
};
|
||||
let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer,
|
||||
access_token: token.access_token });
|
||||
let auth_header = Authorization(Bearer { token: token.access_token });
|
||||
request_value_reader.seek(io::SeekFrom::Start(0)).unwrap();
|
||||
let mut req_result = {
|
||||
let mut client = &mut *self.hub.client.borrow_mut();
|
||||
@@ -1649,13 +1645,13 @@ impl<'a, C, A> ProjectTestIamPermissionCall<'a, C, A> where C: BorrowMut<hyper::
|
||||
/// # #[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(),
|
||||
/// # <MemoryStorage as Default>::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<hyper::
|
||||
pub struct ProjectUpdateCall<'a, C, A>
|
||||
where C: 'a, A: 'a {
|
||||
|
||||
hub: &'a Cloudresourcemanager<C, A>,
|
||||
hub: &'a CloudResourceManager<C, A>,
|
||||
_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<hyper::Client>, 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<hyper::Client>, A:
|
||||
}
|
||||
}
|
||||
};
|
||||
let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer,
|
||||
access_token: token.access_token });
|
||||
let auth_header = Authorization(Bearer { token: token.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<hyper::Client>, 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(),
|
||||
/// # <MemoryStorage as Default>::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<hyper::Client>, A:
|
||||
pub struct ProjectGetIamPolicyCall<'a, C, A>
|
||||
where C: 'a, A: 'a {
|
||||
|
||||
hub: &'a Cloudresourcemanager<C, A>,
|
||||
hub: &'a CloudResourceManager<C, A>,
|
||||
_request: GetIamPolicyRequest,
|
||||
_resource: String,
|
||||
_delegate: Option<&'a mut Delegate>,
|
||||
@@ -1960,7 +1955,7 @@ impl<'a, C, A> ProjectGetIamPolicyCall<'a, C, A> where C: BorrowMut<hyper::Clien
|
||||
/// Perform the operation you have build so far.
|
||||
pub fn doit(mut self) -> 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<hyper::Clien
|
||||
}
|
||||
}
|
||||
};
|
||||
let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer,
|
||||
access_token: token.access_token });
|
||||
let auth_header = Authorization(Bearer { token: token.access_token });
|
||||
request_value_reader.seek(io::SeekFrom::Start(0)).unwrap();
|
||||
let mut req_result = {
|
||||
let mut client = &mut *self.hub.client.borrow_mut();
|
||||
@@ -2194,13 +2188,13 @@ impl<'a, C, A> ProjectGetIamPolicyCall<'a, C, A> where C: BorrowMut<hyper::Clien
|
||||
/// # #[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(),
|
||||
/// # <MemoryStorage as Default>::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<hyper::Clien
|
||||
pub struct ProjectDeleteCall<'a, C, A>
|
||||
where C: 'a, A: 'a {
|
||||
|
||||
hub: &'a Cloudresourcemanager<C, A>,
|
||||
hub: &'a CloudResourceManager<C, A>,
|
||||
_project_id: String,
|
||||
_delegate: Option<&'a mut Delegate>,
|
||||
_additional_params: HashMap<String, String>,
|
||||
@@ -2226,7 +2220,7 @@ impl<'a, C, A> ProjectDeleteCall<'a, C, A> where C: BorrowMut<hyper::Client>, 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<hyper::Client>, A:
|
||||
}
|
||||
}
|
||||
};
|
||||
let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer,
|
||||
access_token: token.access_token });
|
||||
let auth_header = Authorization(Bearer { token: token.access_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<hyper::Client>, 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(),
|
||||
/// # <MemoryStorage as Default>::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<hyper::Client>, A:
|
||||
pub struct ProjectListCall<'a, C, A>
|
||||
where C: 'a, A: 'a {
|
||||
|
||||
hub: &'a Cloudresourcemanager<C, A>,
|
||||
hub: &'a CloudResourceManager<C, A>,
|
||||
_page_token: Option<String>,
|
||||
_page_size: Option<i32>,
|
||||
_filter: Option<String>,
|
||||
@@ -2473,7 +2466,7 @@ impl<'a, C, A> ProjectListCall<'a, C, A> where C: BorrowMut<hyper::Client>, 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<hyper::Client>, 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)
|
||||
|
||||
Reference in New Issue
Block a user