|
|
|
|
@@ -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> Taskqueue<C, A>
|
|
|
|
|
Taskqueue {
|
|
|
|
|
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(),
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@@ -144,7 +145,7 @@ impl<'a, C, A> Taskqueue<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 {
|
|
|
|
|
@@ -642,7 +643,7 @@ impl<'a, C, A> TaskqueueGetCall<'a, C, A> where C: BorrowMut<hyper::Client>, A:
|
|
|
|
|
Some(d) => d,
|
|
|
|
|
None => &mut dd
|
|
|
|
|
};
|
|
|
|
|
dlg.begin(MethodInfo { id: "taskqueue.taskqueues.get",
|
|
|
|
|
dlg.begin(MethodInfo { id: "taskqueue.taskqueues.get",
|
|
|
|
|
http_method: hyper::method::Method::Get });
|
|
|
|
|
let mut params: Vec<(&str, String)> = Vec::with_capacity((5 + self._additional_params.len()));
|
|
|
|
|
params.push(("project", self._project.to_string()));
|
|
|
|
|
@@ -688,7 +689,7 @@ impl<'a, C, A> TaskqueueGetCall<'a, C, A> where C: BorrowMut<hyper::Client>, A:
|
|
|
|
|
params.remove(index);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if params.len() > 0 {
|
|
|
|
|
url.push('?');
|
|
|
|
|
url.push_str(&url::form_urlencoded::serialize(params));
|
|
|
|
|
@@ -724,7 +725,7 @@ impl<'a, C, A> TaskqueueGetCall<'a, C, A> where C: BorrowMut<hyper::Client>, A:
|
|
|
|
|
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);
|
|
|
|
|
@@ -734,10 +735,10 @@ impl<'a, C, A> TaskqueueGetCall<'a, C, A> where C: BorrowMut<hyper::Client>, A:
|
|
|
|
|
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);
|
|
|
|
|
@@ -770,7 +771,7 @@ impl<'a, C, A> TaskqueueGetCall<'a, C, A> where C: BorrowMut<hyper::Client>, A:
|
|
|
|
|
///
|
|
|
|
|
/// Sets the *project* 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(mut self, new_value: &str) -> TaskqueueGetCall<'a, C, A> {
|
|
|
|
|
self._project = new_value.to_string();
|
|
|
|
|
@@ -780,7 +781,7 @@ impl<'a, C, A> TaskqueueGetCall<'a, C, A> where C: BorrowMut<hyper::Client>, A:
|
|
|
|
|
///
|
|
|
|
|
/// Sets the *taskqueue* 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 taskqueue(mut self, new_value: &str) -> TaskqueueGetCall<'a, C, A> {
|
|
|
|
|
self._taskqueue = new_value.to_string();
|
|
|
|
|
@@ -805,12 +806,12 @@ impl<'a, C, A> TaskqueueGetCall<'a, C, A> where C: BorrowMut<hyper::Client>, A:
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// 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
|
|
|
|
|
///
|
|
|
|
|
/// * *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.
|
|
|
|
|
@@ -827,17 +828,17 @@ impl<'a, C, A> TaskqueueGetCall<'a, C, A> where C: BorrowMut<hyper::Client>, A:
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// 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<T>(mut self, scope: T) -> TaskqueueGetCall<'a, C, A>
|
|
|
|
|
pub fn add_scope<T>(mut self, scope: T) -> TaskqueueGetCall<'a, C, A>
|
|
|
|
|
where T: AsRef<str> {
|
|
|
|
|
self._scopes.insert(scope.as_ref().to_string(), ());
|
|
|
|
|
self
|
|
|
|
|
@@ -906,7 +907,7 @@ impl<'a, C, A> TaskLeaseCall<'a, C, A> where C: BorrowMut<hyper::Client>, A: oau
|
|
|
|
|
Some(d) => d,
|
|
|
|
|
None => &mut dd
|
|
|
|
|
};
|
|
|
|
|
dlg.begin(MethodInfo { id: "taskqueue.tasks.lease",
|
|
|
|
|
dlg.begin(MethodInfo { id: "taskqueue.tasks.lease",
|
|
|
|
|
http_method: hyper::method::Method::Post });
|
|
|
|
|
let mut params: Vec<(&str, String)> = Vec::with_capacity((8 + self._additional_params.len()));
|
|
|
|
|
params.push(("project", self._project.to_string()));
|
|
|
|
|
@@ -957,7 +958,7 @@ impl<'a, C, A> TaskLeaseCall<'a, C, A> where C: BorrowMut<hyper::Client>, A: oau
|
|
|
|
|
params.remove(index);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if params.len() > 0 {
|
|
|
|
|
url.push('?');
|
|
|
|
|
url.push_str(&url::form_urlencoded::serialize(params));
|
|
|
|
|
@@ -993,7 +994,7 @@ impl<'a, C, A> TaskLeaseCall<'a, C, A> where C: BorrowMut<hyper::Client>, A: oau
|
|
|
|
|
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);
|
|
|
|
|
@@ -1003,10 +1004,10 @@ impl<'a, C, A> TaskLeaseCall<'a, C, A> where C: BorrowMut<hyper::Client>, A: oau
|
|
|
|
|
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);
|
|
|
|
|
@@ -1039,7 +1040,7 @@ impl<'a, C, A> TaskLeaseCall<'a, C, A> where C: BorrowMut<hyper::Client>, A: oau
|
|
|
|
|
///
|
|
|
|
|
/// Sets the *project* 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(mut self, new_value: &str) -> TaskLeaseCall<'a, C, A> {
|
|
|
|
|
self._project = new_value.to_string();
|
|
|
|
|
@@ -1049,7 +1050,7 @@ impl<'a, C, A> TaskLeaseCall<'a, C, A> where C: BorrowMut<hyper::Client>, A: oau
|
|
|
|
|
///
|
|
|
|
|
/// Sets the *taskqueue* 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 taskqueue(mut self, new_value: &str) -> TaskLeaseCall<'a, C, A> {
|
|
|
|
|
self._taskqueue = new_value.to_string();
|
|
|
|
|
@@ -1059,7 +1060,7 @@ impl<'a, C, A> TaskLeaseCall<'a, C, A> where C: BorrowMut<hyper::Client>, A: oau
|
|
|
|
|
///
|
|
|
|
|
/// Sets the *num tasks* query 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 num_tasks(mut self, new_value: i32) -> TaskLeaseCall<'a, C, A> {
|
|
|
|
|
self._num_tasks = new_value;
|
|
|
|
|
@@ -1069,7 +1070,7 @@ impl<'a, C, A> TaskLeaseCall<'a, C, A> where C: BorrowMut<hyper::Client>, A: oau
|
|
|
|
|
///
|
|
|
|
|
/// Sets the *lease secs* query 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 lease_secs(mut self, new_value: i32) -> TaskLeaseCall<'a, C, A> {
|
|
|
|
|
self._lease_secs = new_value;
|
|
|
|
|
@@ -1101,12 +1102,12 @@ impl<'a, C, A> TaskLeaseCall<'a, C, A> where C: BorrowMut<hyper::Client>, A: oau
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// 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
|
|
|
|
|
///
|
|
|
|
|
/// * *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.
|
|
|
|
|
@@ -1123,17 +1124,17 @@ impl<'a, C, A> TaskLeaseCall<'a, C, A> where C: BorrowMut<hyper::Client>, A: oau
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// 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<T>(mut self, scope: T) -> TaskLeaseCall<'a, C, A>
|
|
|
|
|
pub fn add_scope<T>(mut self, scope: T) -> TaskLeaseCall<'a, C, A>
|
|
|
|
|
where T: AsRef<str> {
|
|
|
|
|
self._scopes.insert(scope.as_ref().to_string(), ());
|
|
|
|
|
self
|
|
|
|
|
@@ -1203,7 +1204,7 @@ impl<'a, C, A> TaskInsertCall<'a, C, A> where C: BorrowMut<hyper::Client>, A: oa
|
|
|
|
|
Some(d) => d,
|
|
|
|
|
None => &mut dd
|
|
|
|
|
};
|
|
|
|
|
dlg.begin(MethodInfo { id: "taskqueue.tasks.insert",
|
|
|
|
|
dlg.begin(MethodInfo { id: "taskqueue.tasks.insert",
|
|
|
|
|
http_method: hyper::method::Method::Post });
|
|
|
|
|
let mut params: Vec<(&str, String)> = Vec::with_capacity((5 + self._additional_params.len()));
|
|
|
|
|
params.push(("project", self._project.to_string()));
|
|
|
|
|
@@ -1246,14 +1247,14 @@ impl<'a, C, A> TaskInsertCall<'a, C, A> where C: BorrowMut<hyper::Client>, A: oa
|
|
|
|
|
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);
|
|
|
|
|
@@ -1297,7 +1298,7 @@ impl<'a, C, A> TaskInsertCall<'a, C, A> where C: BorrowMut<hyper::Client>, A: oa
|
|
|
|
|
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);
|
|
|
|
|
@@ -1307,10 +1308,10 @@ impl<'a, C, A> TaskInsertCall<'a, C, A> where C: BorrowMut<hyper::Client>, A: oa
|
|
|
|
|
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);
|
|
|
|
|
@@ -1342,7 +1343,7 @@ impl<'a, C, A> TaskInsertCall<'a, C, A> where C: BorrowMut<hyper::Client>, A: oa
|
|
|
|
|
///
|
|
|
|
|
/// 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: Task) -> TaskInsertCall<'a, C, A> {
|
|
|
|
|
self._request = new_value;
|
|
|
|
|
@@ -1352,7 +1353,7 @@ impl<'a, C, A> TaskInsertCall<'a, C, A> where C: BorrowMut<hyper::Client>, A: oa
|
|
|
|
|
///
|
|
|
|
|
/// Sets the *project* 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(mut self, new_value: &str) -> TaskInsertCall<'a, C, A> {
|
|
|
|
|
self._project = new_value.to_string();
|
|
|
|
|
@@ -1362,7 +1363,7 @@ impl<'a, C, A> TaskInsertCall<'a, C, A> where C: BorrowMut<hyper::Client>, A: oa
|
|
|
|
|
///
|
|
|
|
|
/// Sets the *taskqueue* 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 taskqueue(mut self, new_value: &str) -> TaskInsertCall<'a, C, A> {
|
|
|
|
|
self._taskqueue = new_value.to_string();
|
|
|
|
|
@@ -1380,12 +1381,12 @@ impl<'a, C, A> TaskInsertCall<'a, C, A> where C: BorrowMut<hyper::Client>, A: oa
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// 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
|
|
|
|
|
///
|
|
|
|
|
/// * *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.
|
|
|
|
|
@@ -1402,17 +1403,17 @@ impl<'a, C, A> TaskInsertCall<'a, C, A> where C: BorrowMut<hyper::Client>, A: oa
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// 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<T>(mut self, scope: T) -> TaskInsertCall<'a, C, A>
|
|
|
|
|
pub fn add_scope<T>(mut self, scope: T) -> TaskInsertCall<'a, C, A>
|
|
|
|
|
where T: AsRef<str> {
|
|
|
|
|
self._scopes.insert(scope.as_ref().to_string(), ());
|
|
|
|
|
self
|
|
|
|
|
@@ -1476,7 +1477,7 @@ impl<'a, C, A> TaskDeleteCall<'a, C, A> where C: BorrowMut<hyper::Client>, A: oa
|
|
|
|
|
Some(d) => d,
|
|
|
|
|
None => &mut dd
|
|
|
|
|
};
|
|
|
|
|
dlg.begin(MethodInfo { id: "taskqueue.tasks.delete",
|
|
|
|
|
dlg.begin(MethodInfo { id: "taskqueue.tasks.delete",
|
|
|
|
|
http_method: hyper::method::Method::Delete });
|
|
|
|
|
let mut params: Vec<(&str, String)> = Vec::with_capacity((4 + self._additional_params.len()));
|
|
|
|
|
params.push(("project", self._project.to_string()));
|
|
|
|
|
@@ -1519,7 +1520,7 @@ impl<'a, C, A> TaskDeleteCall<'a, C, A> where C: BorrowMut<hyper::Client>, A: oa
|
|
|
|
|
params.remove(index);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if params.len() > 0 {
|
|
|
|
|
url.push('?');
|
|
|
|
|
url.push_str(&url::form_urlencoded::serialize(params));
|
|
|
|
|
@@ -1555,7 +1556,7 @@ impl<'a, C, A> TaskDeleteCall<'a, C, A> where C: BorrowMut<hyper::Client>, A: oa
|
|
|
|
|
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);
|
|
|
|
|
@@ -1565,10 +1566,10 @@ impl<'a, C, A> TaskDeleteCall<'a, C, A> where C: BorrowMut<hyper::Client>, A: oa
|
|
|
|
|
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);
|
|
|
|
|
@@ -1591,7 +1592,7 @@ impl<'a, C, A> TaskDeleteCall<'a, C, A> where C: BorrowMut<hyper::Client>, A: oa
|
|
|
|
|
///
|
|
|
|
|
/// Sets the *project* 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(mut self, new_value: &str) -> TaskDeleteCall<'a, C, A> {
|
|
|
|
|
self._project = new_value.to_string();
|
|
|
|
|
@@ -1601,7 +1602,7 @@ impl<'a, C, A> TaskDeleteCall<'a, C, A> where C: BorrowMut<hyper::Client>, A: oa
|
|
|
|
|
///
|
|
|
|
|
/// Sets the *taskqueue* 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 taskqueue(mut self, new_value: &str) -> TaskDeleteCall<'a, C, A> {
|
|
|
|
|
self._taskqueue = new_value.to_string();
|
|
|
|
|
@@ -1611,7 +1612,7 @@ impl<'a, C, A> TaskDeleteCall<'a, C, A> where C: BorrowMut<hyper::Client>, A: oa
|
|
|
|
|
///
|
|
|
|
|
/// Sets the *task* 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 task(mut self, new_value: &str) -> TaskDeleteCall<'a, C, A> {
|
|
|
|
|
self._task = new_value.to_string();
|
|
|
|
|
@@ -1629,12 +1630,12 @@ impl<'a, C, A> TaskDeleteCall<'a, C, A> where C: BorrowMut<hyper::Client>, A: oa
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// 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
|
|
|
|
|
///
|
|
|
|
|
/// * *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.
|
|
|
|
|
@@ -1651,17 +1652,17 @@ impl<'a, C, A> TaskDeleteCall<'a, C, A> where C: BorrowMut<hyper::Client>, A: oa
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// 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<T>(mut self, scope: T) -> TaskDeleteCall<'a, C, A>
|
|
|
|
|
pub fn add_scope<T>(mut self, scope: T) -> TaskDeleteCall<'a, C, A>
|
|
|
|
|
where T: AsRef<str> {
|
|
|
|
|
self._scopes.insert(scope.as_ref().to_string(), ());
|
|
|
|
|
self
|
|
|
|
|
@@ -1733,7 +1734,7 @@ impl<'a, C, A> TaskPatchCall<'a, C, A> where C: BorrowMut<hyper::Client>, A: oau
|
|
|
|
|
Some(d) => d,
|
|
|
|
|
None => &mut dd
|
|
|
|
|
};
|
|
|
|
|
dlg.begin(MethodInfo { id: "taskqueue.tasks.patch",
|
|
|
|
|
dlg.begin(MethodInfo { id: "taskqueue.tasks.patch",
|
|
|
|
|
http_method: hyper::method::Method::Patch });
|
|
|
|
|
let mut params: Vec<(&str, String)> = Vec::with_capacity((7 + self._additional_params.len()));
|
|
|
|
|
params.push(("project", self._project.to_string()));
|
|
|
|
|
@@ -1778,14 +1779,14 @@ impl<'a, C, A> TaskPatchCall<'a, C, A> where C: BorrowMut<hyper::Client>, A: oau
|
|
|
|
|
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);
|
|
|
|
|
@@ -1829,7 +1830,7 @@ impl<'a, C, A> TaskPatchCall<'a, C, A> where C: BorrowMut<hyper::Client>, A: oau
|
|
|
|
|
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);
|
|
|
|
|
@@ -1839,10 +1840,10 @@ impl<'a, C, A> TaskPatchCall<'a, C, A> where C: BorrowMut<hyper::Client>, A: oau
|
|
|
|
|
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);
|
|
|
|
|
@@ -1874,7 +1875,7 @@ impl<'a, C, A> TaskPatchCall<'a, C, A> where C: BorrowMut<hyper::Client>, A: oau
|
|
|
|
|
///
|
|
|
|
|
/// 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: Task) -> TaskPatchCall<'a, C, A> {
|
|
|
|
|
self._request = new_value;
|
|
|
|
|
@@ -1884,7 +1885,7 @@ impl<'a, C, A> TaskPatchCall<'a, C, A> where C: BorrowMut<hyper::Client>, A: oau
|
|
|
|
|
///
|
|
|
|
|
/// Sets the *project* 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(mut self, new_value: &str) -> TaskPatchCall<'a, C, A> {
|
|
|
|
|
self._project = new_value.to_string();
|
|
|
|
|
@@ -1893,7 +1894,7 @@ impl<'a, C, A> TaskPatchCall<'a, C, A> where C: BorrowMut<hyper::Client>, A: oau
|
|
|
|
|
///
|
|
|
|
|
/// Sets the *taskqueue* 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 taskqueue(mut self, new_value: &str) -> TaskPatchCall<'a, C, A> {
|
|
|
|
|
self._taskqueue = new_value.to_string();
|
|
|
|
|
@@ -1902,7 +1903,7 @@ impl<'a, C, A> TaskPatchCall<'a, C, A> where C: BorrowMut<hyper::Client>, A: oau
|
|
|
|
|
///
|
|
|
|
|
/// Sets the *task* 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 task(mut self, new_value: &str) -> TaskPatchCall<'a, C, A> {
|
|
|
|
|
self._task = new_value.to_string();
|
|
|
|
|
@@ -1912,7 +1913,7 @@ impl<'a, C, A> TaskPatchCall<'a, C, A> where C: BorrowMut<hyper::Client>, A: oau
|
|
|
|
|
///
|
|
|
|
|
/// Sets the *new lease seconds* query 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 new_lease_seconds(mut self, new_value: i32) -> TaskPatchCall<'a, C, A> {
|
|
|
|
|
self._new_lease_seconds = new_value;
|
|
|
|
|
@@ -1930,12 +1931,12 @@ impl<'a, C, A> TaskPatchCall<'a, C, A> where C: BorrowMut<hyper::Client>, A: oau
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// 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
|
|
|
|
|
///
|
|
|
|
|
/// * *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.
|
|
|
|
|
@@ -1952,17 +1953,17 @@ impl<'a, C, A> TaskPatchCall<'a, C, A> where C: BorrowMut<hyper::Client>, A: oau
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// 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<T>(mut self, scope: T) -> TaskPatchCall<'a, C, A>
|
|
|
|
|
pub fn add_scope<T>(mut self, scope: T) -> TaskPatchCall<'a, C, A>
|
|
|
|
|
where T: AsRef<str> {
|
|
|
|
|
self._scopes.insert(scope.as_ref().to_string(), ());
|
|
|
|
|
self
|
|
|
|
|
@@ -2025,7 +2026,7 @@ impl<'a, C, A> TaskListCall<'a, C, A> where C: BorrowMut<hyper::Client>, A: oaut
|
|
|
|
|
Some(d) => d,
|
|
|
|
|
None => &mut dd
|
|
|
|
|
};
|
|
|
|
|
dlg.begin(MethodInfo { id: "taskqueue.tasks.list",
|
|
|
|
|
dlg.begin(MethodInfo { id: "taskqueue.tasks.list",
|
|
|
|
|
http_method: hyper::method::Method::Get });
|
|
|
|
|
let mut params: Vec<(&str, String)> = Vec::with_capacity((4 + self._additional_params.len()));
|
|
|
|
|
params.push(("project", self._project.to_string()));
|
|
|
|
|
@@ -2068,7 +2069,7 @@ impl<'a, C, A> TaskListCall<'a, C, A> where C: BorrowMut<hyper::Client>, A: oaut
|
|
|
|
|
params.remove(index);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if params.len() > 0 {
|
|
|
|
|
url.push('?');
|
|
|
|
|
url.push_str(&url::form_urlencoded::serialize(params));
|
|
|
|
|
@@ -2104,7 +2105,7 @@ impl<'a, C, A> TaskListCall<'a, C, A> where C: BorrowMut<hyper::Client>, A: oaut
|
|
|
|
|
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);
|
|
|
|
|
@@ -2114,10 +2115,10 @@ impl<'a, C, A> TaskListCall<'a, C, A> where C: BorrowMut<hyper::Client>, A: oaut
|
|
|
|
|
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);
|
|
|
|
|
@@ -2150,7 +2151,7 @@ impl<'a, C, A> TaskListCall<'a, C, A> where C: BorrowMut<hyper::Client>, A: oaut
|
|
|
|
|
///
|
|
|
|
|
/// Sets the *project* 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(mut self, new_value: &str) -> TaskListCall<'a, C, A> {
|
|
|
|
|
self._project = new_value.to_string();
|
|
|
|
|
@@ -2160,7 +2161,7 @@ impl<'a, C, A> TaskListCall<'a, C, A> where C: BorrowMut<hyper::Client>, A: oaut
|
|
|
|
|
///
|
|
|
|
|
/// Sets the *taskqueue* 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 taskqueue(mut self, new_value: &str) -> TaskListCall<'a, C, A> {
|
|
|
|
|
self._taskqueue = new_value.to_string();
|
|
|
|
|
@@ -2178,12 +2179,12 @@ impl<'a, C, A> TaskListCall<'a, C, A> where C: BorrowMut<hyper::Client>, A: oaut
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// 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
|
|
|
|
|
///
|
|
|
|
|
/// * *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.
|
|
|
|
|
@@ -2200,17 +2201,17 @@ impl<'a, C, A> TaskListCall<'a, C, A> where C: BorrowMut<hyper::Client>, A: oaut
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// 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<T>(mut self, scope: T) -> TaskListCall<'a, C, A>
|
|
|
|
|
pub fn add_scope<T>(mut self, scope: T) -> TaskListCall<'a, C, A>
|
|
|
|
|
where T: AsRef<str> {
|
|
|
|
|
self._scopes.insert(scope.as_ref().to_string(), ());
|
|
|
|
|
self
|
|
|
|
|
@@ -2274,7 +2275,7 @@ impl<'a, C, A> TaskGetCall<'a, C, A> where C: BorrowMut<hyper::Client>, A: oauth
|
|
|
|
|
Some(d) => d,
|
|
|
|
|
None => &mut dd
|
|
|
|
|
};
|
|
|
|
|
dlg.begin(MethodInfo { id: "taskqueue.tasks.get",
|
|
|
|
|
dlg.begin(MethodInfo { id: "taskqueue.tasks.get",
|
|
|
|
|
http_method: hyper::method::Method::Get });
|
|
|
|
|
let mut params: Vec<(&str, String)> = Vec::with_capacity((5 + self._additional_params.len()));
|
|
|
|
|
params.push(("project", self._project.to_string()));
|
|
|
|
|
@@ -2318,7 +2319,7 @@ impl<'a, C, A> TaskGetCall<'a, C, A> where C: BorrowMut<hyper::Client>, A: oauth
|
|
|
|
|
params.remove(index);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if params.len() > 0 {
|
|
|
|
|
url.push('?');
|
|
|
|
|
url.push_str(&url::form_urlencoded::serialize(params));
|
|
|
|
|
@@ -2354,7 +2355,7 @@ impl<'a, C, A> TaskGetCall<'a, C, A> where C: BorrowMut<hyper::Client>, A: oauth
|
|
|
|
|
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);
|
|
|
|
|
@@ -2364,10 +2365,10 @@ impl<'a, C, A> TaskGetCall<'a, C, A> where C: BorrowMut<hyper::Client>, A: oauth
|
|
|
|
|
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);
|
|
|
|
|
@@ -2400,7 +2401,7 @@ impl<'a, C, A> TaskGetCall<'a, C, A> where C: BorrowMut<hyper::Client>, A: oauth
|
|
|
|
|
///
|
|
|
|
|
/// Sets the *project* 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(mut self, new_value: &str) -> TaskGetCall<'a, C, A> {
|
|
|
|
|
self._project = new_value.to_string();
|
|
|
|
|
@@ -2410,7 +2411,7 @@ impl<'a, C, A> TaskGetCall<'a, C, A> where C: BorrowMut<hyper::Client>, A: oauth
|
|
|
|
|
///
|
|
|
|
|
/// Sets the *taskqueue* 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 taskqueue(mut self, new_value: &str) -> TaskGetCall<'a, C, A> {
|
|
|
|
|
self._taskqueue = new_value.to_string();
|
|
|
|
|
@@ -2420,7 +2421,7 @@ impl<'a, C, A> TaskGetCall<'a, C, A> where C: BorrowMut<hyper::Client>, A: oauth
|
|
|
|
|
///
|
|
|
|
|
/// Sets the *task* 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 task(mut self, new_value: &str) -> TaskGetCall<'a, C, A> {
|
|
|
|
|
self._task = new_value.to_string();
|
|
|
|
|
@@ -2438,12 +2439,12 @@ impl<'a, C, A> TaskGetCall<'a, C, A> where C: BorrowMut<hyper::Client>, A: oauth
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// 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
|
|
|
|
|
///
|
|
|
|
|
/// * *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.
|
|
|
|
|
@@ -2460,17 +2461,17 @@ impl<'a, C, A> TaskGetCall<'a, C, A> where C: BorrowMut<hyper::Client>, 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::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<T>(mut self, scope: T) -> TaskGetCall<'a, C, A>
|
|
|
|
|
pub fn add_scope<T>(mut self, scope: T) -> TaskGetCall<'a, C, A>
|
|
|
|
|
where T: AsRef<str> {
|
|
|
|
|
self._scopes.insert(scope.as_ref().to_string(), ());
|
|
|
|
|
self
|
|
|
|
|
@@ -2542,7 +2543,7 @@ impl<'a, C, A> TaskUpdateCall<'a, C, A> where C: BorrowMut<hyper::Client>, A: oa
|
|
|
|
|
Some(d) => d,
|
|
|
|
|
None => &mut dd
|
|
|
|
|
};
|
|
|
|
|
dlg.begin(MethodInfo { id: "taskqueue.tasks.update",
|
|
|
|
|
dlg.begin(MethodInfo { id: "taskqueue.tasks.update",
|
|
|
|
|
http_method: hyper::method::Method::Post });
|
|
|
|
|
let mut params: Vec<(&str, String)> = Vec::with_capacity((7 + self._additional_params.len()));
|
|
|
|
|
params.push(("project", self._project.to_string()));
|
|
|
|
|
@@ -2587,14 +2588,14 @@ impl<'a, C, A> TaskUpdateCall<'a, C, A> where C: BorrowMut<hyper::Client>, A: oa
|
|
|
|
|
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);
|
|
|
|
|
@@ -2638,7 +2639,7 @@ impl<'a, C, A> TaskUpdateCall<'a, C, A> where C: BorrowMut<hyper::Client>, A: oa
|
|
|
|
|
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);
|
|
|
|
|
@@ -2648,10 +2649,10 @@ impl<'a, C, A> TaskUpdateCall<'a, C, A> where C: BorrowMut<hyper::Client>, A: oa
|
|
|
|
|
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);
|
|
|
|
|
@@ -2683,7 +2684,7 @@ impl<'a, C, A> TaskUpdateCall<'a, C, A> where C: BorrowMut<hyper::Client>, A: oa
|
|
|
|
|
///
|
|
|
|
|
/// 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: Task) -> TaskUpdateCall<'a, C, A> {
|
|
|
|
|
self._request = new_value;
|
|
|
|
|
@@ -2693,7 +2694,7 @@ impl<'a, C, A> TaskUpdateCall<'a, C, A> where C: BorrowMut<hyper::Client>, A: oa
|
|
|
|
|
///
|
|
|
|
|
/// Sets the *project* 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(mut self, new_value: &str) -> TaskUpdateCall<'a, C, A> {
|
|
|
|
|
self._project = new_value.to_string();
|
|
|
|
|
@@ -2702,7 +2703,7 @@ impl<'a, C, A> TaskUpdateCall<'a, C, A> where C: BorrowMut<hyper::Client>, A: oa
|
|
|
|
|
///
|
|
|
|
|
/// Sets the *taskqueue* 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 taskqueue(mut self, new_value: &str) -> TaskUpdateCall<'a, C, A> {
|
|
|
|
|
self._taskqueue = new_value.to_string();
|
|
|
|
|
@@ -2711,7 +2712,7 @@ impl<'a, C, A> TaskUpdateCall<'a, C, A> where C: BorrowMut<hyper::Client>, A: oa
|
|
|
|
|
///
|
|
|
|
|
/// Sets the *task* 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 task(mut self, new_value: &str) -> TaskUpdateCall<'a, C, A> {
|
|
|
|
|
self._task = new_value.to_string();
|
|
|
|
|
@@ -2721,7 +2722,7 @@ impl<'a, C, A> TaskUpdateCall<'a, C, A> where C: BorrowMut<hyper::Client>, A: oa
|
|
|
|
|
///
|
|
|
|
|
/// Sets the *new lease seconds* query 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 new_lease_seconds(mut self, new_value: i32) -> TaskUpdateCall<'a, C, A> {
|
|
|
|
|
self._new_lease_seconds = new_value;
|
|
|
|
|
@@ -2739,12 +2740,12 @@ impl<'a, C, A> TaskUpdateCall<'a, C, A> where C: BorrowMut<hyper::Client>, A: oa
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// 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
|
|
|
|
|
///
|
|
|
|
|
/// * *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.
|
|
|
|
|
@@ -2761,17 +2762,17 @@ impl<'a, C, A> TaskUpdateCall<'a, C, A> where C: BorrowMut<hyper::Client>, A: oa
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// 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<T>(mut self, scope: T) -> TaskUpdateCall<'a, C, A>
|
|
|
|
|
pub fn add_scope<T>(mut self, scope: T) -> TaskUpdateCall<'a, C, A>
|
|
|
|
|
where T: AsRef<str> {
|
|
|
|
|
self._scopes.insert(scope.as_ref().to_string(), ());
|
|
|
|
|
self
|
|
|
|
|
|