|
|
|
|
@@ -19,10 +19,11 @@ use std::collections::BTreeMap;
|
|
|
|
|
use serde_json as json;
|
|
|
|
|
use std::io;
|
|
|
|
|
use std::fs;
|
|
|
|
|
use std::thread::sleep_ms;
|
|
|
|
|
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,
|
|
|
|
|
ResponseResult, RequestValue, NestedType, Delegate, DefaultDelegate, MethodsBuilder,
|
|
|
|
|
Resource, ErrorResponse, remove_json_null_values};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@@ -132,7 +133,7 @@ impl<'a, C, A> Container<C, A>
|
|
|
|
|
Container {
|
|
|
|
|
client: RefCell::new(client),
|
|
|
|
|
auth: RefCell::new(authenticator),
|
|
|
|
|
_user_agent: "google-api-rust-client/0.1.10".to_string(),
|
|
|
|
|
_user_agent: "google-api-rust-client/0.1.11".to_string(),
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@@ -141,7 +142,7 @@ impl<'a, C, A> Container<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.10`.
|
|
|
|
|
/// It defaults to `google-api-rust-client/0.1.11`.
|
|
|
|
|
///
|
|
|
|
|
/// Returns the previously set user-agent.
|
|
|
|
|
pub fn user_agent(&mut self, agent_name: String) -> String {
|
|
|
|
|
@@ -689,7 +690,7 @@ impl<'a, C, A> ProjectZoneClusterGetCall<'a, C, A> where C: BorrowMut<hyper::Cli
|
|
|
|
|
Some(d) => d,
|
|
|
|
|
None => &mut dd
|
|
|
|
|
};
|
|
|
|
|
dlg.begin(MethodInfo { id: "container.projects.zones.clusters.get",
|
|
|
|
|
dlg.begin(MethodInfo { id: "container.projects.zones.clusters.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()));
|
|
|
|
|
@@ -733,7 +734,7 @@ impl<'a, C, A> ProjectZoneClusterGetCall<'a, C, A> where C: BorrowMut<hyper::Cli
|
|
|
|
|
params.remove(index);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if params.len() > 0 {
|
|
|
|
|
url.push('?');
|
|
|
|
|
url.push_str(&url::form_urlencoded::serialize(params));
|
|
|
|
|
@@ -769,7 +770,7 @@ impl<'a, C, A> ProjectZoneClusterGetCall<'a, C, A> where C: BorrowMut<hyper::Cli
|
|
|
|
|
match req_result {
|
|
|
|
|
Err(err) => {
|
|
|
|
|
if let oauth2::Retry::After(d) = dlg.http_error(&err) {
|
|
|
|
|
sleep_ms(d.num_milliseconds() as u32);
|
|
|
|
|
sleep(d);
|
|
|
|
|
continue;
|
|
|
|
|
}
|
|
|
|
|
dlg.finished(false);
|
|
|
|
|
@@ -779,10 +780,10 @@ impl<'a, C, A> ProjectZoneClusterGetCall<'a, C, A> where C: BorrowMut<hyper::Cli
|
|
|
|
|
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,
|
|
|
|
|
if let oauth2::Retry::After(d) = dlg.http_failure(&res,
|
|
|
|
|
json::from_str(&json_err).ok(),
|
|
|
|
|
json::from_str(&json_err).ok()) {
|
|
|
|
|
sleep_ms(d.num_milliseconds() as u32);
|
|
|
|
|
sleep(d);
|
|
|
|
|
continue;
|
|
|
|
|
}
|
|
|
|
|
dlg.finished(false);
|
|
|
|
|
@@ -815,7 +816,7 @@ impl<'a, C, A> ProjectZoneClusterGetCall<'a, C, A> where C: BorrowMut<hyper::Cli
|
|
|
|
|
///
|
|
|
|
|
/// Sets the *project id* path property to the given value.
|
|
|
|
|
///
|
|
|
|
|
/// Even though the property as already been set when instantiating this call,
|
|
|
|
|
/// 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) -> ProjectZoneClusterGetCall<'a, C, A> {
|
|
|
|
|
self._project_id = new_value.to_string();
|
|
|
|
|
@@ -825,7 +826,7 @@ impl<'a, C, A> ProjectZoneClusterGetCall<'a, C, A> where C: BorrowMut<hyper::Cli
|
|
|
|
|
///
|
|
|
|
|
/// Sets the *zone* path property to the given value.
|
|
|
|
|
///
|
|
|
|
|
/// Even though the property as already been set when instantiating this call,
|
|
|
|
|
/// 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) -> ProjectZoneClusterGetCall<'a, C, A> {
|
|
|
|
|
self._zone = new_value.to_string();
|
|
|
|
|
@@ -835,7 +836,7 @@ impl<'a, C, A> ProjectZoneClusterGetCall<'a, C, A> where C: BorrowMut<hyper::Cli
|
|
|
|
|
///
|
|
|
|
|
/// Sets the *cluster id* path property to the given value.
|
|
|
|
|
///
|
|
|
|
|
/// Even though the property as already been set when instantiating this call,
|
|
|
|
|
/// Even though the property as already been set when instantiating this call,
|
|
|
|
|
/// we provide this method for API completeness.
|
|
|
|
|
pub fn cluster_id(mut self, new_value: &str) -> ProjectZoneClusterGetCall<'a, C, A> {
|
|
|
|
|
self._cluster_id = new_value.to_string();
|
|
|
|
|
@@ -853,12 +854,12 @@ impl<'a, C, A> ProjectZoneClusterGetCall<'a, C, A> where C: BorrowMut<hyper::Cli
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// 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
|
|
|
|
|
/// 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.
|
|
|
|
|
@@ -881,17 +882,17 @@ impl<'a, C, A> ProjectZoneClusterGetCall<'a, C, A> where C: BorrowMut<hyper::Cli
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// 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<T>(mut self, scope: T) -> ProjectZoneClusterGetCall<'a, C, A>
|
|
|
|
|
pub fn add_scope<T>(mut self, scope: T) -> ProjectZoneClusterGetCall<'a, C, A>
|
|
|
|
|
where T: AsRef<str> {
|
|
|
|
|
self._scopes.insert(scope.as_ref().to_string(), ());
|
|
|
|
|
self
|
|
|
|
|
@@ -954,7 +955,7 @@ impl<'a, C, A> ProjectZoneGetServerconfigCall<'a, C, A> where C: BorrowMut<hyper
|
|
|
|
|
Some(d) => d,
|
|
|
|
|
None => &mut dd
|
|
|
|
|
};
|
|
|
|
|
dlg.begin(MethodInfo { id: "container.projects.zones.getServerconfig",
|
|
|
|
|
dlg.begin(MethodInfo { id: "container.projects.zones.getServerconfig",
|
|
|
|
|
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()));
|
|
|
|
|
@@ -997,7 +998,7 @@ impl<'a, C, A> ProjectZoneGetServerconfigCall<'a, C, A> where C: BorrowMut<hyper
|
|
|
|
|
params.remove(index);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if params.len() > 0 {
|
|
|
|
|
url.push('?');
|
|
|
|
|
url.push_str(&url::form_urlencoded::serialize(params));
|
|
|
|
|
@@ -1033,7 +1034,7 @@ impl<'a, C, A> ProjectZoneGetServerconfigCall<'a, C, A> where C: BorrowMut<hyper
|
|
|
|
|
match req_result {
|
|
|
|
|
Err(err) => {
|
|
|
|
|
if let oauth2::Retry::After(d) = dlg.http_error(&err) {
|
|
|
|
|
sleep_ms(d.num_milliseconds() as u32);
|
|
|
|
|
sleep(d);
|
|
|
|
|
continue;
|
|
|
|
|
}
|
|
|
|
|
dlg.finished(false);
|
|
|
|
|
@@ -1043,10 +1044,10 @@ impl<'a, C, A> ProjectZoneGetServerconfigCall<'a, C, A> where C: BorrowMut<hyper
|
|
|
|
|
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,
|
|
|
|
|
if let oauth2::Retry::After(d) = dlg.http_failure(&res,
|
|
|
|
|
json::from_str(&json_err).ok(),
|
|
|
|
|
json::from_str(&json_err).ok()) {
|
|
|
|
|
sleep_ms(d.num_milliseconds() as u32);
|
|
|
|
|
sleep(d);
|
|
|
|
|
continue;
|
|
|
|
|
}
|
|
|
|
|
dlg.finished(false);
|
|
|
|
|
@@ -1079,7 +1080,7 @@ impl<'a, C, A> ProjectZoneGetServerconfigCall<'a, C, A> where C: BorrowMut<hyper
|
|
|
|
|
///
|
|
|
|
|
/// Sets the *project id* path property to the given value.
|
|
|
|
|
///
|
|
|
|
|
/// Even though the property as already been set when instantiating this call,
|
|
|
|
|
/// 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) -> ProjectZoneGetServerconfigCall<'a, C, A> {
|
|
|
|
|
self._project_id = new_value.to_string();
|
|
|
|
|
@@ -1089,7 +1090,7 @@ impl<'a, C, A> ProjectZoneGetServerconfigCall<'a, C, A> where C: BorrowMut<hyper
|
|
|
|
|
///
|
|
|
|
|
/// Sets the *zone* path property to the given value.
|
|
|
|
|
///
|
|
|
|
|
/// Even though the property as already been set when instantiating this call,
|
|
|
|
|
/// 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) -> ProjectZoneGetServerconfigCall<'a, C, A> {
|
|
|
|
|
self._zone = new_value.to_string();
|
|
|
|
|
@@ -1107,12 +1108,12 @@ impl<'a, C, A> ProjectZoneGetServerconfigCall<'a, C, A> where C: BorrowMut<hyper
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// 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
|
|
|
|
|
/// 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.
|
|
|
|
|
@@ -1135,17 +1136,17 @@ impl<'a, C, A> ProjectZoneGetServerconfigCall<'a, C, A> where C: BorrowMut<hyper
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// 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<T>(mut self, scope: T) -> ProjectZoneGetServerconfigCall<'a, C, A>
|
|
|
|
|
pub fn add_scope<T>(mut self, scope: T) -> ProjectZoneGetServerconfigCall<'a, C, A>
|
|
|
|
|
where T: AsRef<str> {
|
|
|
|
|
self._scopes.insert(scope.as_ref().to_string(), ());
|
|
|
|
|
self
|
|
|
|
|
@@ -1209,7 +1210,7 @@ impl<'a, C, A> ProjectZoneClusterDeleteCall<'a, C, A> where C: BorrowMut<hyper::
|
|
|
|
|
Some(d) => d,
|
|
|
|
|
None => &mut dd
|
|
|
|
|
};
|
|
|
|
|
dlg.begin(MethodInfo { id: "container.projects.zones.clusters.delete",
|
|
|
|
|
dlg.begin(MethodInfo { id: "container.projects.zones.clusters.delete",
|
|
|
|
|
http_method: hyper::method::Method::Delete });
|
|
|
|
|
let mut params: Vec<(&str, String)> = Vec::with_capacity((5 + self._additional_params.len()));
|
|
|
|
|
params.push(("projectId", self._project_id.to_string()));
|
|
|
|
|
@@ -1253,7 +1254,7 @@ impl<'a, C, A> ProjectZoneClusterDeleteCall<'a, C, A> where C: BorrowMut<hyper::
|
|
|
|
|
params.remove(index);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if params.len() > 0 {
|
|
|
|
|
url.push('?');
|
|
|
|
|
url.push_str(&url::form_urlencoded::serialize(params));
|
|
|
|
|
@@ -1289,7 +1290,7 @@ impl<'a, C, A> ProjectZoneClusterDeleteCall<'a, C, A> where C: BorrowMut<hyper::
|
|
|
|
|
match req_result {
|
|
|
|
|
Err(err) => {
|
|
|
|
|
if let oauth2::Retry::After(d) = dlg.http_error(&err) {
|
|
|
|
|
sleep_ms(d.num_milliseconds() as u32);
|
|
|
|
|
sleep(d);
|
|
|
|
|
continue;
|
|
|
|
|
}
|
|
|
|
|
dlg.finished(false);
|
|
|
|
|
@@ -1299,10 +1300,10 @@ impl<'a, C, A> ProjectZoneClusterDeleteCall<'a, C, A> where C: BorrowMut<hyper::
|
|
|
|
|
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,
|
|
|
|
|
if let oauth2::Retry::After(d) = dlg.http_failure(&res,
|
|
|
|
|
json::from_str(&json_err).ok(),
|
|
|
|
|
json::from_str(&json_err).ok()) {
|
|
|
|
|
sleep_ms(d.num_milliseconds() as u32);
|
|
|
|
|
sleep(d);
|
|
|
|
|
continue;
|
|
|
|
|
}
|
|
|
|
|
dlg.finished(false);
|
|
|
|
|
@@ -1335,7 +1336,7 @@ impl<'a, C, A> ProjectZoneClusterDeleteCall<'a, C, A> where C: BorrowMut<hyper::
|
|
|
|
|
///
|
|
|
|
|
/// Sets the *project id* path property to the given value.
|
|
|
|
|
///
|
|
|
|
|
/// Even though the property as already been set when instantiating this call,
|
|
|
|
|
/// 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) -> ProjectZoneClusterDeleteCall<'a, C, A> {
|
|
|
|
|
self._project_id = new_value.to_string();
|
|
|
|
|
@@ -1345,7 +1346,7 @@ impl<'a, C, A> ProjectZoneClusterDeleteCall<'a, C, A> where C: BorrowMut<hyper::
|
|
|
|
|
///
|
|
|
|
|
/// Sets the *zone* path property to the given value.
|
|
|
|
|
///
|
|
|
|
|
/// Even though the property as already been set when instantiating this call,
|
|
|
|
|
/// 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) -> ProjectZoneClusterDeleteCall<'a, C, A> {
|
|
|
|
|
self._zone = new_value.to_string();
|
|
|
|
|
@@ -1355,7 +1356,7 @@ impl<'a, C, A> ProjectZoneClusterDeleteCall<'a, C, A> where C: BorrowMut<hyper::
|
|
|
|
|
///
|
|
|
|
|
/// Sets the *cluster id* path property to the given value.
|
|
|
|
|
///
|
|
|
|
|
/// Even though the property as already been set when instantiating this call,
|
|
|
|
|
/// Even though the property as already been set when instantiating this call,
|
|
|
|
|
/// we provide this method for API completeness.
|
|
|
|
|
pub fn cluster_id(mut self, new_value: &str) -> ProjectZoneClusterDeleteCall<'a, C, A> {
|
|
|
|
|
self._cluster_id = new_value.to_string();
|
|
|
|
|
@@ -1373,12 +1374,12 @@ impl<'a, C, A> ProjectZoneClusterDeleteCall<'a, C, A> where C: BorrowMut<hyper::
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// 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
|
|
|
|
|
/// 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.
|
|
|
|
|
@@ -1401,17 +1402,17 @@ impl<'a, C, A> ProjectZoneClusterDeleteCall<'a, C, A> where C: BorrowMut<hyper::
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// 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<T>(mut self, scope: T) -> ProjectZoneClusterDeleteCall<'a, C, A>
|
|
|
|
|
pub fn add_scope<T>(mut self, scope: T) -> ProjectZoneClusterDeleteCall<'a, C, A>
|
|
|
|
|
where T: AsRef<str> {
|
|
|
|
|
self._scopes.insert(scope.as_ref().to_string(), ());
|
|
|
|
|
self
|
|
|
|
|
@@ -1474,7 +1475,7 @@ impl<'a, C, A> ProjectZoneClusterListCall<'a, C, A> where C: BorrowMut<hyper::Cl
|
|
|
|
|
Some(d) => d,
|
|
|
|
|
None => &mut dd
|
|
|
|
|
};
|
|
|
|
|
dlg.begin(MethodInfo { id: "container.projects.zones.clusters.list",
|
|
|
|
|
dlg.begin(MethodInfo { id: "container.projects.zones.clusters.list",
|
|
|
|
|
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()));
|
|
|
|
|
@@ -1517,7 +1518,7 @@ impl<'a, C, A> ProjectZoneClusterListCall<'a, C, A> where C: BorrowMut<hyper::Cl
|
|
|
|
|
params.remove(index);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if params.len() > 0 {
|
|
|
|
|
url.push('?');
|
|
|
|
|
url.push_str(&url::form_urlencoded::serialize(params));
|
|
|
|
|
@@ -1553,7 +1554,7 @@ impl<'a, C, A> ProjectZoneClusterListCall<'a, C, A> where C: BorrowMut<hyper::Cl
|
|
|
|
|
match req_result {
|
|
|
|
|
Err(err) => {
|
|
|
|
|
if let oauth2::Retry::After(d) = dlg.http_error(&err) {
|
|
|
|
|
sleep_ms(d.num_milliseconds() as u32);
|
|
|
|
|
sleep(d);
|
|
|
|
|
continue;
|
|
|
|
|
}
|
|
|
|
|
dlg.finished(false);
|
|
|
|
|
@@ -1563,10 +1564,10 @@ impl<'a, C, A> ProjectZoneClusterListCall<'a, C, A> where C: BorrowMut<hyper::Cl
|
|
|
|
|
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,
|
|
|
|
|
if let oauth2::Retry::After(d) = dlg.http_failure(&res,
|
|
|
|
|
json::from_str(&json_err).ok(),
|
|
|
|
|
json::from_str(&json_err).ok()) {
|
|
|
|
|
sleep_ms(d.num_milliseconds() as u32);
|
|
|
|
|
sleep(d);
|
|
|
|
|
continue;
|
|
|
|
|
}
|
|
|
|
|
dlg.finished(false);
|
|
|
|
|
@@ -1599,7 +1600,7 @@ impl<'a, C, A> ProjectZoneClusterListCall<'a, C, A> where C: BorrowMut<hyper::Cl
|
|
|
|
|
///
|
|
|
|
|
/// Sets the *project id* path property to the given value.
|
|
|
|
|
///
|
|
|
|
|
/// Even though the property as already been set when instantiating this call,
|
|
|
|
|
/// 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) -> ProjectZoneClusterListCall<'a, C, A> {
|
|
|
|
|
self._project_id = new_value.to_string();
|
|
|
|
|
@@ -1609,7 +1610,7 @@ impl<'a, C, A> ProjectZoneClusterListCall<'a, C, A> where C: BorrowMut<hyper::Cl
|
|
|
|
|
///
|
|
|
|
|
/// Sets the *zone* path property to the given value.
|
|
|
|
|
///
|
|
|
|
|
/// Even though the property as already been set when instantiating this call,
|
|
|
|
|
/// 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) -> ProjectZoneClusterListCall<'a, C, A> {
|
|
|
|
|
self._zone = new_value.to_string();
|
|
|
|
|
@@ -1627,12 +1628,12 @@ impl<'a, C, A> ProjectZoneClusterListCall<'a, C, A> where C: BorrowMut<hyper::Cl
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// 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
|
|
|
|
|
/// 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.
|
|
|
|
|
@@ -1655,17 +1656,17 @@ impl<'a, C, A> ProjectZoneClusterListCall<'a, C, A> where C: BorrowMut<hyper::Cl
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// 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<T>(mut self, scope: T) -> ProjectZoneClusterListCall<'a, C, A>
|
|
|
|
|
pub fn add_scope<T>(mut self, scope: T) -> ProjectZoneClusterListCall<'a, C, A>
|
|
|
|
|
where T: AsRef<str> {
|
|
|
|
|
self._scopes.insert(scope.as_ref().to_string(), ());
|
|
|
|
|
self
|
|
|
|
|
@@ -1728,7 +1729,7 @@ impl<'a, C, A> ProjectZoneOperationListCall<'a, C, A> where C: BorrowMut<hyper::
|
|
|
|
|
Some(d) => d,
|
|
|
|
|
None => &mut dd
|
|
|
|
|
};
|
|
|
|
|
dlg.begin(MethodInfo { id: "container.projects.zones.operations.list",
|
|
|
|
|
dlg.begin(MethodInfo { id: "container.projects.zones.operations.list",
|
|
|
|
|
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()));
|
|
|
|
|
@@ -1771,7 +1772,7 @@ impl<'a, C, A> ProjectZoneOperationListCall<'a, C, A> where C: BorrowMut<hyper::
|
|
|
|
|
params.remove(index);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if params.len() > 0 {
|
|
|
|
|
url.push('?');
|
|
|
|
|
url.push_str(&url::form_urlencoded::serialize(params));
|
|
|
|
|
@@ -1807,7 +1808,7 @@ impl<'a, C, A> ProjectZoneOperationListCall<'a, C, A> where C: BorrowMut<hyper::
|
|
|
|
|
match req_result {
|
|
|
|
|
Err(err) => {
|
|
|
|
|
if let oauth2::Retry::After(d) = dlg.http_error(&err) {
|
|
|
|
|
sleep_ms(d.num_milliseconds() as u32);
|
|
|
|
|
sleep(d);
|
|
|
|
|
continue;
|
|
|
|
|
}
|
|
|
|
|
dlg.finished(false);
|
|
|
|
|
@@ -1817,10 +1818,10 @@ impl<'a, C, A> ProjectZoneOperationListCall<'a, C, A> where C: BorrowMut<hyper::
|
|
|
|
|
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,
|
|
|
|
|
if let oauth2::Retry::After(d) = dlg.http_failure(&res,
|
|
|
|
|
json::from_str(&json_err).ok(),
|
|
|
|
|
json::from_str(&json_err).ok()) {
|
|
|
|
|
sleep_ms(d.num_milliseconds() as u32);
|
|
|
|
|
sleep(d);
|
|
|
|
|
continue;
|
|
|
|
|
}
|
|
|
|
|
dlg.finished(false);
|
|
|
|
|
@@ -1853,7 +1854,7 @@ impl<'a, C, A> ProjectZoneOperationListCall<'a, C, A> where C: BorrowMut<hyper::
|
|
|
|
|
///
|
|
|
|
|
/// Sets the *project id* path property to the given value.
|
|
|
|
|
///
|
|
|
|
|
/// Even though the property as already been set when instantiating this call,
|
|
|
|
|
/// 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) -> ProjectZoneOperationListCall<'a, C, A> {
|
|
|
|
|
self._project_id = new_value.to_string();
|
|
|
|
|
@@ -1863,7 +1864,7 @@ impl<'a, C, A> ProjectZoneOperationListCall<'a, C, A> where C: BorrowMut<hyper::
|
|
|
|
|
///
|
|
|
|
|
/// Sets the *zone* path property to the given value.
|
|
|
|
|
///
|
|
|
|
|
/// Even though the property as already been set when instantiating this call,
|
|
|
|
|
/// 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) -> ProjectZoneOperationListCall<'a, C, A> {
|
|
|
|
|
self._zone = new_value.to_string();
|
|
|
|
|
@@ -1881,12 +1882,12 @@ impl<'a, C, A> ProjectZoneOperationListCall<'a, C, A> where C: BorrowMut<hyper::
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// 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
|
|
|
|
|
/// 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.
|
|
|
|
|
@@ -1909,17 +1910,17 @@ impl<'a, C, A> ProjectZoneOperationListCall<'a, C, A> where C: BorrowMut<hyper::
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// 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<T>(mut self, scope: T) -> ProjectZoneOperationListCall<'a, C, A>
|
|
|
|
|
pub fn add_scope<T>(mut self, scope: T) -> ProjectZoneOperationListCall<'a, C, A>
|
|
|
|
|
where T: AsRef<str> {
|
|
|
|
|
self._scopes.insert(scope.as_ref().to_string(), ());
|
|
|
|
|
self
|
|
|
|
|
@@ -1989,7 +1990,7 @@ impl<'a, C, A> ProjectZoneClusterCreateCall<'a, C, A> where C: BorrowMut<hyper::
|
|
|
|
|
Some(d) => d,
|
|
|
|
|
None => &mut dd
|
|
|
|
|
};
|
|
|
|
|
dlg.begin(MethodInfo { id: "container.projects.zones.clusters.create",
|
|
|
|
|
dlg.begin(MethodInfo { id: "container.projects.zones.clusters.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()));
|
|
|
|
|
@@ -2032,14 +2033,14 @@ impl<'a, C, A> ProjectZoneClusterCreateCall<'a, C, A> where C: BorrowMut<hyper::
|
|
|
|
|
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 request_value_reader =
|
|
|
|
|
{
|
|
|
|
|
let mut value = json::value::to_value(&self._request);
|
|
|
|
|
remove_json_null_values(&mut value);
|
|
|
|
|
@@ -2083,7 +2084,7 @@ impl<'a, C, A> ProjectZoneClusterCreateCall<'a, C, A> where C: BorrowMut<hyper::
|
|
|
|
|
match req_result {
|
|
|
|
|
Err(err) => {
|
|
|
|
|
if let oauth2::Retry::After(d) = dlg.http_error(&err) {
|
|
|
|
|
sleep_ms(d.num_milliseconds() as u32);
|
|
|
|
|
sleep(d);
|
|
|
|
|
continue;
|
|
|
|
|
}
|
|
|
|
|
dlg.finished(false);
|
|
|
|
|
@@ -2093,10 +2094,10 @@ impl<'a, C, A> ProjectZoneClusterCreateCall<'a, C, A> where C: BorrowMut<hyper::
|
|
|
|
|
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,
|
|
|
|
|
if let oauth2::Retry::After(d) = dlg.http_failure(&res,
|
|
|
|
|
json::from_str(&json_err).ok(),
|
|
|
|
|
json::from_str(&json_err).ok()) {
|
|
|
|
|
sleep_ms(d.num_milliseconds() as u32);
|
|
|
|
|
sleep(d);
|
|
|
|
|
continue;
|
|
|
|
|
}
|
|
|
|
|
dlg.finished(false);
|
|
|
|
|
@@ -2128,7 +2129,7 @@ impl<'a, C, A> ProjectZoneClusterCreateCall<'a, C, A> where C: BorrowMut<hyper::
|
|
|
|
|
///
|
|
|
|
|
/// Sets the *request* property to the given value.
|
|
|
|
|
///
|
|
|
|
|
/// Even though the property as already been set when instantiating this call,
|
|
|
|
|
/// Even though the property as already been set when instantiating this call,
|
|
|
|
|
/// we provide this method for API completeness.
|
|
|
|
|
pub fn request(mut self, new_value: CreateClusterRequest) -> ProjectZoneClusterCreateCall<'a, C, A> {
|
|
|
|
|
self._request = new_value;
|
|
|
|
|
@@ -2138,7 +2139,7 @@ impl<'a, C, A> ProjectZoneClusterCreateCall<'a, C, A> where C: BorrowMut<hyper::
|
|
|
|
|
///
|
|
|
|
|
/// Sets the *project id* path property to the given value.
|
|
|
|
|
///
|
|
|
|
|
/// Even though the property as already been set when instantiating this call,
|
|
|
|
|
/// 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) -> ProjectZoneClusterCreateCall<'a, C, A> {
|
|
|
|
|
self._project_id = new_value.to_string();
|
|
|
|
|
@@ -2148,7 +2149,7 @@ impl<'a, C, A> ProjectZoneClusterCreateCall<'a, C, A> where C: BorrowMut<hyper::
|
|
|
|
|
///
|
|
|
|
|
/// Sets the *zone* path property to the given value.
|
|
|
|
|
///
|
|
|
|
|
/// Even though the property as already been set when instantiating this call,
|
|
|
|
|
/// 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) -> ProjectZoneClusterCreateCall<'a, C, A> {
|
|
|
|
|
self._zone = new_value.to_string();
|
|
|
|
|
@@ -2166,12 +2167,12 @@ impl<'a, C, A> ProjectZoneClusterCreateCall<'a, C, A> where C: BorrowMut<hyper::
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// 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
|
|
|
|
|
/// 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.
|
|
|
|
|
@@ -2194,17 +2195,17 @@ impl<'a, C, A> ProjectZoneClusterCreateCall<'a, C, A> where C: BorrowMut<hyper::
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// 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<T>(mut self, scope: T) -> ProjectZoneClusterCreateCall<'a, C, A>
|
|
|
|
|
pub fn add_scope<T>(mut self, scope: T) -> ProjectZoneClusterCreateCall<'a, C, A>
|
|
|
|
|
where T: AsRef<str> {
|
|
|
|
|
self._scopes.insert(scope.as_ref().to_string(), ());
|
|
|
|
|
self
|
|
|
|
|
@@ -2275,7 +2276,7 @@ impl<'a, C, A> ProjectZoneClusterUpdateCall<'a, C, A> where C: BorrowMut<hyper::
|
|
|
|
|
Some(d) => d,
|
|
|
|
|
None => &mut dd
|
|
|
|
|
};
|
|
|
|
|
dlg.begin(MethodInfo { id: "container.projects.zones.clusters.update",
|
|
|
|
|
dlg.begin(MethodInfo { id: "container.projects.zones.clusters.update",
|
|
|
|
|
http_method: hyper::method::Method::Put });
|
|
|
|
|
let mut params: Vec<(&str, String)> = Vec::with_capacity((6 + self._additional_params.len()));
|
|
|
|
|
params.push(("projectId", self._project_id.to_string()));
|
|
|
|
|
@@ -2319,14 +2320,14 @@ impl<'a, C, A> ProjectZoneClusterUpdateCall<'a, C, A> where C: BorrowMut<hyper::
|
|
|
|
|
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 request_value_reader =
|
|
|
|
|
{
|
|
|
|
|
let mut value = json::value::to_value(&self._request);
|
|
|
|
|
remove_json_null_values(&mut value);
|
|
|
|
|
@@ -2370,7 +2371,7 @@ impl<'a, C, A> ProjectZoneClusterUpdateCall<'a, C, A> where C: BorrowMut<hyper::
|
|
|
|
|
match req_result {
|
|
|
|
|
Err(err) => {
|
|
|
|
|
if let oauth2::Retry::After(d) = dlg.http_error(&err) {
|
|
|
|
|
sleep_ms(d.num_milliseconds() as u32);
|
|
|
|
|
sleep(d);
|
|
|
|
|
continue;
|
|
|
|
|
}
|
|
|
|
|
dlg.finished(false);
|
|
|
|
|
@@ -2380,10 +2381,10 @@ impl<'a, C, A> ProjectZoneClusterUpdateCall<'a, C, A> where C: BorrowMut<hyper::
|
|
|
|
|
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,
|
|
|
|
|
if let oauth2::Retry::After(d) = dlg.http_failure(&res,
|
|
|
|
|
json::from_str(&json_err).ok(),
|
|
|
|
|
json::from_str(&json_err).ok()) {
|
|
|
|
|
sleep_ms(d.num_milliseconds() as u32);
|
|
|
|
|
sleep(d);
|
|
|
|
|
continue;
|
|
|
|
|
}
|
|
|
|
|
dlg.finished(false);
|
|
|
|
|
@@ -2415,7 +2416,7 @@ impl<'a, C, A> ProjectZoneClusterUpdateCall<'a, C, A> where C: BorrowMut<hyper::
|
|
|
|
|
///
|
|
|
|
|
/// Sets the *request* property to the given value.
|
|
|
|
|
///
|
|
|
|
|
/// Even though the property as already been set when instantiating this call,
|
|
|
|
|
/// Even though the property as already been set when instantiating this call,
|
|
|
|
|
/// we provide this method for API completeness.
|
|
|
|
|
pub fn request(mut self, new_value: UpdateClusterRequest) -> ProjectZoneClusterUpdateCall<'a, C, A> {
|
|
|
|
|
self._request = new_value;
|
|
|
|
|
@@ -2425,7 +2426,7 @@ impl<'a, C, A> ProjectZoneClusterUpdateCall<'a, C, A> where C: BorrowMut<hyper::
|
|
|
|
|
///
|
|
|
|
|
/// Sets the *project id* path property to the given value.
|
|
|
|
|
///
|
|
|
|
|
/// Even though the property as already been set when instantiating this call,
|
|
|
|
|
/// 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) -> ProjectZoneClusterUpdateCall<'a, C, A> {
|
|
|
|
|
self._project_id = new_value.to_string();
|
|
|
|
|
@@ -2435,7 +2436,7 @@ impl<'a, C, A> ProjectZoneClusterUpdateCall<'a, C, A> where C: BorrowMut<hyper::
|
|
|
|
|
///
|
|
|
|
|
/// Sets the *zone* path property to the given value.
|
|
|
|
|
///
|
|
|
|
|
/// Even though the property as already been set when instantiating this call,
|
|
|
|
|
/// 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) -> ProjectZoneClusterUpdateCall<'a, C, A> {
|
|
|
|
|
self._zone = new_value.to_string();
|
|
|
|
|
@@ -2445,7 +2446,7 @@ impl<'a, C, A> ProjectZoneClusterUpdateCall<'a, C, A> where C: BorrowMut<hyper::
|
|
|
|
|
///
|
|
|
|
|
/// Sets the *cluster id* path property to the given value.
|
|
|
|
|
///
|
|
|
|
|
/// Even though the property as already been set when instantiating this call,
|
|
|
|
|
/// Even though the property as already been set when instantiating this call,
|
|
|
|
|
/// we provide this method for API completeness.
|
|
|
|
|
pub fn cluster_id(mut self, new_value: &str) -> ProjectZoneClusterUpdateCall<'a, C, A> {
|
|
|
|
|
self._cluster_id = new_value.to_string();
|
|
|
|
|
@@ -2463,12 +2464,12 @@ impl<'a, C, A> ProjectZoneClusterUpdateCall<'a, C, A> where C: BorrowMut<hyper::
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// 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
|
|
|
|
|
/// 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.
|
|
|
|
|
@@ -2491,17 +2492,17 @@ impl<'a, C, A> ProjectZoneClusterUpdateCall<'a, C, A> where C: BorrowMut<hyper::
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// 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<T>(mut self, scope: T) -> ProjectZoneClusterUpdateCall<'a, C, A>
|
|
|
|
|
pub fn add_scope<T>(mut self, scope: T) -> ProjectZoneClusterUpdateCall<'a, C, A>
|
|
|
|
|
where T: AsRef<str> {
|
|
|
|
|
self._scopes.insert(scope.as_ref().to_string(), ());
|
|
|
|
|
self
|
|
|
|
|
@@ -2565,7 +2566,7 @@ impl<'a, C, A> ProjectZoneOperationGetCall<'a, C, A> where C: BorrowMut<hyper::C
|
|
|
|
|
Some(d) => d,
|
|
|
|
|
None => &mut dd
|
|
|
|
|
};
|
|
|
|
|
dlg.begin(MethodInfo { id: "container.projects.zones.operations.get",
|
|
|
|
|
dlg.begin(MethodInfo { id: "container.projects.zones.operations.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()));
|
|
|
|
|
@@ -2609,7 +2610,7 @@ impl<'a, C, A> ProjectZoneOperationGetCall<'a, C, A> where C: BorrowMut<hyper::C
|
|
|
|
|
params.remove(index);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if params.len() > 0 {
|
|
|
|
|
url.push('?');
|
|
|
|
|
url.push_str(&url::form_urlencoded::serialize(params));
|
|
|
|
|
@@ -2645,7 +2646,7 @@ impl<'a, C, A> ProjectZoneOperationGetCall<'a, C, A> where C: BorrowMut<hyper::C
|
|
|
|
|
match req_result {
|
|
|
|
|
Err(err) => {
|
|
|
|
|
if let oauth2::Retry::After(d) = dlg.http_error(&err) {
|
|
|
|
|
sleep_ms(d.num_milliseconds() as u32);
|
|
|
|
|
sleep(d);
|
|
|
|
|
continue;
|
|
|
|
|
}
|
|
|
|
|
dlg.finished(false);
|
|
|
|
|
@@ -2655,10 +2656,10 @@ impl<'a, C, A> ProjectZoneOperationGetCall<'a, C, A> where C: BorrowMut<hyper::C
|
|
|
|
|
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,
|
|
|
|
|
if let oauth2::Retry::After(d) = dlg.http_failure(&res,
|
|
|
|
|
json::from_str(&json_err).ok(),
|
|
|
|
|
json::from_str(&json_err).ok()) {
|
|
|
|
|
sleep_ms(d.num_milliseconds() as u32);
|
|
|
|
|
sleep(d);
|
|
|
|
|
continue;
|
|
|
|
|
}
|
|
|
|
|
dlg.finished(false);
|
|
|
|
|
@@ -2691,7 +2692,7 @@ impl<'a, C, A> ProjectZoneOperationGetCall<'a, C, A> where C: BorrowMut<hyper::C
|
|
|
|
|
///
|
|
|
|
|
/// Sets the *project id* path property to the given value.
|
|
|
|
|
///
|
|
|
|
|
/// Even though the property as already been set when instantiating this call,
|
|
|
|
|
/// 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) -> ProjectZoneOperationGetCall<'a, C, A> {
|
|
|
|
|
self._project_id = new_value.to_string();
|
|
|
|
|
@@ -2701,7 +2702,7 @@ impl<'a, C, A> ProjectZoneOperationGetCall<'a, C, A> where C: BorrowMut<hyper::C
|
|
|
|
|
///
|
|
|
|
|
/// Sets the *zone* path property to the given value.
|
|
|
|
|
///
|
|
|
|
|
/// Even though the property as already been set when instantiating this call,
|
|
|
|
|
/// 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) -> ProjectZoneOperationGetCall<'a, C, A> {
|
|
|
|
|
self._zone = new_value.to_string();
|
|
|
|
|
@@ -2711,7 +2712,7 @@ impl<'a, C, A> ProjectZoneOperationGetCall<'a, C, A> where C: BorrowMut<hyper::C
|
|
|
|
|
///
|
|
|
|
|
/// Sets the *operation id* path property to the given value.
|
|
|
|
|
///
|
|
|
|
|
/// Even though the property as already been set when instantiating this call,
|
|
|
|
|
/// Even though the property as already been set when instantiating this call,
|
|
|
|
|
/// we provide this method for API completeness.
|
|
|
|
|
pub fn operation_id(mut self, new_value: &str) -> ProjectZoneOperationGetCall<'a, C, A> {
|
|
|
|
|
self._operation_id = new_value.to_string();
|
|
|
|
|
@@ -2729,12 +2730,12 @@ impl<'a, C, A> ProjectZoneOperationGetCall<'a, C, A> where C: BorrowMut<hyper::C
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// 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
|
|
|
|
|
/// 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.
|
|
|
|
|
@@ -2757,17 +2758,17 @@ impl<'a, C, A> ProjectZoneOperationGetCall<'a, C, A> where C: BorrowMut<hyper::C
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// 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<T>(mut self, scope: T) -> ProjectZoneOperationGetCall<'a, C, A>
|
|
|
|
|
pub fn add_scope<T>(mut self, scope: T) -> ProjectZoneOperationGetCall<'a, C, A>
|
|
|
|
|
where T: AsRef<str> {
|
|
|
|
|
self._scopes.insert(scope.as_ref().to_string(), ());
|
|
|
|
|
self
|
|
|
|
|
|