mirror of
https://github.com/OMGeeky/google-apis-rs.git
synced 2026-02-23 15:49:49 +01:00
chore(regen-apis
This commit is contained in:
@@ -180,7 +180,7 @@
|
||||
|
||||
// Unused attributes happen thanks to defined, but unused structures
|
||||
// We don't warn about this, as depending on the API, some data structures or facilities are never used.
|
||||
// Instead of pre-determining this, we just disable the lint. It's manually tuned to not have any
|
||||
// Instead of pre-determining this, we just disable the lint. It's manually tuned to not have any
|
||||
// unused imports in fully featured APIs. Same with unused_mut ... .
|
||||
#![allow(unused_imports, unused_mut, dead_code)]
|
||||
|
||||
@@ -208,6 +208,7 @@ use std::collections::BTreeMap;
|
||||
use serde_json as json;
|
||||
use std::io;
|
||||
use std::fs;
|
||||
use std::mem;
|
||||
use std::thread::sleep;
|
||||
use std::time::Duration;
|
||||
|
||||
@@ -311,6 +312,8 @@ pub struct Taskqueue<C, A> {
|
||||
client: RefCell<C>,
|
||||
auth: RefCell<A>,
|
||||
_user_agent: String,
|
||||
_base_url: String,
|
||||
_root_url: String,
|
||||
}
|
||||
|
||||
impl<'a, C, A> Hub for Taskqueue<C, A> {}
|
||||
@@ -323,6 +326,8 @@ impl<'a, C, A> Taskqueue<C, A>
|
||||
client: RefCell::new(client),
|
||||
auth: RefCell::new(authenticator),
|
||||
_user_agent: "google-api-rust-client/1.0.4".to_string(),
|
||||
_base_url: "https://www.googleapis.com/taskqueue/v1beta2/projects/".to_string(),
|
||||
_root_url: "https://www.googleapis.com/".to_string(),
|
||||
}
|
||||
}
|
||||
|
||||
@@ -338,9 +343,23 @@ impl<'a, C, A> Taskqueue<C, A>
|
||||
///
|
||||
/// Returns the previously set user-agent.
|
||||
pub fn user_agent(&mut self, agent_name: String) -> String {
|
||||
let prev = self._user_agent.clone();
|
||||
self._user_agent = agent_name;
|
||||
prev
|
||||
mem::replace(&mut self._user_agent, agent_name)
|
||||
}
|
||||
|
||||
/// Set the base url to use in all requests to the server.
|
||||
/// It defaults to `https://www.googleapis.com/taskqueue/v1beta2/projects/`.
|
||||
///
|
||||
/// Returns the previously set base url.
|
||||
pub fn base_url(&mut self, new_base_url: String) -> String {
|
||||
mem::replace(&mut self._base_url, new_base_url)
|
||||
}
|
||||
|
||||
/// Set the root url to use in all requests to the server.
|
||||
/// It defaults to `https://www.googleapis.com/`.
|
||||
///
|
||||
/// Returns the previously set root url.
|
||||
pub fn root_url(&mut self, new_root_url: String) -> String {
|
||||
mem::replace(&mut self._root_url, new_root_url)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -852,7 +871,7 @@ impl<'a, C, A> TaskqueueGetCall<'a, C, A> where C: BorrowMut<hyper::Client>, A:
|
||||
|
||||
params.push(("alt", "json".to_string()));
|
||||
|
||||
let mut url = "https://www.googleapis.com/taskqueue/v1beta2/projects/{project}/taskqueues/{taskqueue}".to_string();
|
||||
let mut url = self.hub._base_url.clone() + "{project}/taskqueues/{taskqueue}";
|
||||
if self._scopes.len() == 0 {
|
||||
self._scopes.insert(Scope::Full.as_ref().to_string(), ());
|
||||
}
|
||||
@@ -1120,7 +1139,7 @@ impl<'a, C, A> TaskLeaseCall<'a, C, A> where C: BorrowMut<hyper::Client>, A: oau
|
||||
|
||||
params.push(("alt", "json".to_string()));
|
||||
|
||||
let mut url = "https://www.googleapis.com/taskqueue/v1beta2/projects/{project}/taskqueues/{taskqueue}/tasks/lease".to_string();
|
||||
let mut url = self.hub._base_url.clone() + "{project}/taskqueues/{taskqueue}/tasks/lease";
|
||||
if self._scopes.len() == 0 {
|
||||
self._scopes.insert(Scope::Full.as_ref().to_string(), ());
|
||||
}
|
||||
@@ -1408,7 +1427,7 @@ impl<'a, C, A> TaskInsertCall<'a, C, A> where C: BorrowMut<hyper::Client>, A: oa
|
||||
|
||||
params.push(("alt", "json".to_string()));
|
||||
|
||||
let mut url = "https://www.googleapis.com/taskqueue/v1beta2/projects/{project}/taskqueues/{taskqueue}/tasks".to_string();
|
||||
let mut url = self.hub._base_url.clone() + "{project}/taskqueues/{taskqueue}/tasks";
|
||||
if self._scopes.len() == 0 {
|
||||
self._scopes.insert(Scope::Full.as_ref().to_string(), ());
|
||||
}
|
||||
@@ -1680,7 +1699,7 @@ impl<'a, C, A> TaskDeleteCall<'a, C, A> where C: BorrowMut<hyper::Client>, A: oa
|
||||
}
|
||||
|
||||
|
||||
let mut url = "https://www.googleapis.com/taskqueue/v1beta2/projects/{project}/taskqueues/{taskqueue}/tasks/{task}".to_string();
|
||||
let mut url = self.hub._base_url.clone() + "{project}/taskqueues/{taskqueue}/tasks/{task}";
|
||||
if self._scopes.len() == 0 {
|
||||
self._scopes.insert(Scope::Full.as_ref().to_string(), ());
|
||||
}
|
||||
@@ -1938,7 +1957,7 @@ impl<'a, C, A> TaskPatchCall<'a, C, A> where C: BorrowMut<hyper::Client>, A: oau
|
||||
|
||||
params.push(("alt", "json".to_string()));
|
||||
|
||||
let mut url = "https://www.googleapis.com/taskqueue/v1beta2/projects/{project}/taskqueues/{taskqueue}/tasks/{task}".to_string();
|
||||
let mut url = self.hub._base_url.clone() + "{project}/taskqueues/{taskqueue}/tasks/{task}";
|
||||
if self._scopes.len() == 0 {
|
||||
self._scopes.insert(Scope::Full.as_ref().to_string(), ());
|
||||
}
|
||||
@@ -2227,7 +2246,7 @@ impl<'a, C, A> TaskListCall<'a, C, A> where C: BorrowMut<hyper::Client>, A: oaut
|
||||
|
||||
params.push(("alt", "json".to_string()));
|
||||
|
||||
let mut url = "https://www.googleapis.com/taskqueue/v1beta2/projects/{project}/taskqueues/{taskqueue}/tasks".to_string();
|
||||
let mut url = self.hub._base_url.clone() + "{project}/taskqueues/{taskqueue}/tasks";
|
||||
if self._scopes.len() == 0 {
|
||||
self._scopes.insert(Scope::Full.as_ref().to_string(), ());
|
||||
}
|
||||
@@ -2476,7 +2495,7 @@ impl<'a, C, A> TaskGetCall<'a, C, A> where C: BorrowMut<hyper::Client>, A: oauth
|
||||
|
||||
params.push(("alt", "json".to_string()));
|
||||
|
||||
let mut url = "https://www.googleapis.com/taskqueue/v1beta2/projects/{project}/taskqueues/{taskqueue}/tasks/{task}".to_string();
|
||||
let mut url = self.hub._base_url.clone() + "{project}/taskqueues/{taskqueue}/tasks/{task}";
|
||||
if self._scopes.len() == 0 {
|
||||
self._scopes.insert(Scope::Full.as_ref().to_string(), ());
|
||||
}
|
||||
@@ -2744,7 +2763,7 @@ impl<'a, C, A> TaskUpdateCall<'a, C, A> where C: BorrowMut<hyper::Client>, A: oa
|
||||
|
||||
params.push(("alt", "json".to_string()));
|
||||
|
||||
let mut url = "https://www.googleapis.com/taskqueue/v1beta2/projects/{project}/taskqueues/{taskqueue}/tasks/{task}".to_string();
|
||||
let mut url = self.hub._base_url.clone() + "{project}/taskqueues/{taskqueue}/tasks/{task}";
|
||||
if self._scopes.len() == 0 {
|
||||
self._scopes.insert(Scope::Full.as_ref().to_string(), ());
|
||||
}
|
||||
@@ -2961,4 +2980,3 @@ impl<'a, C, A> TaskUpdateCall<'a, C, A> where C: BorrowMut<hyper::Client>, A: oa
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user