mirror of
https://github.com/OMGeeky/google-apis-rs.git
synced 2026-02-23 15:49:49 +01:00
chore(json-update): update json and regen all code
This commit is contained in:
@@ -12,7 +12,7 @@ use oauth2::{TokenType, Retry, self};
|
||||
use hyper;
|
||||
use hyper::header::{ContentType, ContentLength, Headers, UserAgent, Authorization, Header,
|
||||
HeaderFormat};
|
||||
use hyper::http::LINE_ENDING;
|
||||
use hyper::http::h1::LINE_ENDING;
|
||||
use hyper::method::Method;
|
||||
use hyper::status::StatusCode;
|
||||
|
||||
@@ -504,7 +504,7 @@ impl ::std::ops::DerefMut for XUploadContentType {
|
||||
}
|
||||
impl Header for XUploadContentType {
|
||||
fn header_name() -> &'static str { "X-Upload-Content-Type" }
|
||||
fn parse_header(raw: &[Vec<u8>]) -> Option<Self> {
|
||||
fn parse_header(raw: &[Vec<u8>]) -> hyper::error::Result<Self> {
|
||||
hyper::header::parsing::from_one_raw_str(raw).map(XUploadContentType)
|
||||
}
|
||||
}
|
||||
@@ -569,8 +569,8 @@ impl Header for ContentRange {
|
||||
}
|
||||
|
||||
/// We are not parsable, as parsing is done by the `Range` header
|
||||
fn parse_header(_: &[Vec<u8>]) -> Option<Self> {
|
||||
None
|
||||
fn parse_header(_: &[Vec<u8>]) -> hyper::error::Result<Self> {
|
||||
Err(hyper::error::Error::Method)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -595,19 +595,19 @@ impl Header for RangeResponseHeader {
|
||||
"Range"
|
||||
}
|
||||
|
||||
fn parse_header(raw: &[Vec<u8>]) -> Option<Self> {
|
||||
fn parse_header(raw: &[Vec<u8>]) -> hyper::error::Result<Self> {
|
||||
if raw.len() > 0 {
|
||||
let v = &raw[0];
|
||||
if let Ok(s) = std::str::from_utf8(v) {
|
||||
const PREFIX: &'static str = "bytes ";
|
||||
if s.starts_with(PREFIX) {
|
||||
if let Ok(c) = <Chunk as FromStr>::from_str(&s[PREFIX.len()..]) {
|
||||
return Some(RangeResponseHeader(c))
|
||||
return Ok(RangeResponseHeader(c))
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
None
|
||||
Err(hyper::error::Error::Method)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
// This file was generated automatically from 'src/mako/api/lib.rs.mako'
|
||||
// DO NOT EDIT !
|
||||
|
||||
//! This documentation was generated from *gmail* crate version *0.1.8+20150303*, where *20150303* is the exact revision of the *gmail:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.8*.
|
||||
//! This documentation was generated from *gmail* crate version *0.1.8+20150526*, where *20150526* is the exact revision of the *gmail:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.8*.
|
||||
//!
|
||||
//! Everything else about the *gmail* *v1* API can be found at the
|
||||
//! [official documentation site](https://developers.google.com/gmail/api/).
|
||||
@@ -12,7 +12,7 @@
|
||||
//! Handle the following *Resources* with ease from the central [hub](struct.Gmail.html) ...
|
||||
//!
|
||||
//! * users
|
||||
//! * [*drafts create*](struct.UserDraftCreateCall.html), [*drafts delete*](struct.UserDraftDeleteCall.html), [*drafts get*](struct.UserDraftGetCall.html), [*drafts list*](struct.UserDraftListCall.html), [*drafts send*](struct.UserDraftSendCall.html), [*drafts update*](struct.UserDraftUpdateCall.html), [*get profile*](struct.UserGetProfileCall.html), [*history list*](struct.UserHistoryListCall.html), [*labels create*](struct.UserLabelCreateCall.html), [*labels delete*](struct.UserLabelDeleteCall.html), [*labels get*](struct.UserLabelGetCall.html), [*labels list*](struct.UserLabelListCall.html), [*labels patch*](struct.UserLabelPatchCall.html), [*labels update*](struct.UserLabelUpdateCall.html), [*messages attachments get*](struct.UserMessageAttachmentGetCall.html), [*messages delete*](struct.UserMessageDeleteCall.html), [*messages get*](struct.UserMessageGetCall.html), [*messages import*](struct.UserMessageImportCall.html), [*messages insert*](struct.UserMessageInsertCall.html), [*messages list*](struct.UserMessageListCall.html), [*messages modify*](struct.UserMessageModifyCall.html), [*messages send*](struct.UserMessageSendCall.html), [*messages trash*](struct.UserMessageTrashCall.html), [*messages untrash*](struct.UserMessageUntrashCall.html), [*threads delete*](struct.UserThreadDeleteCall.html), [*threads get*](struct.UserThreadGetCall.html), [*threads list*](struct.UserThreadListCall.html), [*threads modify*](struct.UserThreadModifyCall.html), [*threads trash*](struct.UserThreadTrashCall.html) and [*threads untrash*](struct.UserThreadUntrashCall.html)
|
||||
//! * [*drafts create*](struct.UserDraftCreateCall.html), [*drafts delete*](struct.UserDraftDeleteCall.html), [*drafts get*](struct.UserDraftGetCall.html), [*drafts list*](struct.UserDraftListCall.html), [*drafts send*](struct.UserDraftSendCall.html), [*drafts update*](struct.UserDraftUpdateCall.html), [*get profile*](struct.UserGetProfileCall.html), [*history list*](struct.UserHistoryListCall.html), [*labels create*](struct.UserLabelCreateCall.html), [*labels delete*](struct.UserLabelDeleteCall.html), [*labels get*](struct.UserLabelGetCall.html), [*labels list*](struct.UserLabelListCall.html), [*labels patch*](struct.UserLabelPatchCall.html), [*labels update*](struct.UserLabelUpdateCall.html), [*messages attachments get*](struct.UserMessageAttachmentGetCall.html), [*messages delete*](struct.UserMessageDeleteCall.html), [*messages get*](struct.UserMessageGetCall.html), [*messages import*](struct.UserMessageImportCall.html), [*messages insert*](struct.UserMessageInsertCall.html), [*messages list*](struct.UserMessageListCall.html), [*messages modify*](struct.UserMessageModifyCall.html), [*messages send*](struct.UserMessageSendCall.html), [*messages trash*](struct.UserMessageTrashCall.html), [*messages untrash*](struct.UserMessageUntrashCall.html), [*stop*](struct.UserStopCall.html), [*threads delete*](struct.UserThreadDeleteCall.html), [*threads get*](struct.UserThreadGetCall.html), [*threads list*](struct.UserThreadListCall.html), [*threads modify*](struct.UserThreadModifyCall.html), [*threads trash*](struct.UserThreadTrashCall.html), [*threads untrash*](struct.UserThreadUntrashCall.html) and [*watch*](struct.UserWatchCall.html)
|
||||
//!
|
||||
//!
|
||||
//! Upload supported by ...
|
||||
@@ -20,8 +20,8 @@
|
||||
//! * [*messages import users*](struct.UserMessageImportCall.html)
|
||||
//! * [*drafts create users*](struct.UserDraftCreateCall.html)
|
||||
//! * [*drafts send users*](struct.UserDraftSendCall.html)
|
||||
//! * [*messages send users*](struct.UserMessageSendCall.html)
|
||||
//! * [*drafts update users*](struct.UserDraftUpdateCall.html)
|
||||
//! * [*messages send users*](struct.UserMessageSendCall.html)
|
||||
//! * [*messages insert users*](struct.UserMessageInsertCall.html)
|
||||
//!
|
||||
//!
|
||||
@@ -118,9 +118,9 @@
|
||||
//! // Values shown here are possibly random and not representative !
|
||||
//! let result = hub.users().messages_import(req, "userId")
|
||||
//! .process_for_calendar(true)
|
||||
//! .never_mark_spam(false)
|
||||
//! .internal_date_source("nonumy")
|
||||
//! .deleted(true)
|
||||
//! .never_mark_spam(true)
|
||||
//! .internal_date_source("sanctus")
|
||||
//! .deleted(false)
|
||||
//! .upload(fs::File::open("file.ext").unwrap(), "application/octet-stream".parse().unwrap());
|
||||
//!
|
||||
//! match result {
|
||||
|
||||
@@ -303,30 +303,6 @@ impl RequestValue for Label {}
|
||||
impl ResponseResult for Label {}
|
||||
|
||||
|
||||
/// There is no detailed description.
|
||||
///
|
||||
/// # Activities
|
||||
///
|
||||
/// This type is used in activities, which are methods you may call on this type or where this type is involved in.
|
||||
/// The list links the activity name, along with information about where it is used (one of *request* and *response*).
|
||||
///
|
||||
/// * [history list users](struct.UserHistoryListCall.html) (response)
|
||||
///
|
||||
#[derive(Default, Clone, Debug, Serialize, Deserialize)]
|
||||
pub struct ListHistoryResponse {
|
||||
/// Page token to retrieve the next page of results in the list.
|
||||
#[serde(rename="nextPageToken")]
|
||||
pub next_page_token: Option<String>,
|
||||
/// The ID of the mailbox's current history record.
|
||||
#[serde(rename="historyId")]
|
||||
pub history_id: Option<String>,
|
||||
/// List of history records. Any messages contained in the response will typically only have id and threadId fields populated.
|
||||
pub history: Option<Vec<History>>,
|
||||
}
|
||||
|
||||
impl ResponseResult for ListHistoryResponse {}
|
||||
|
||||
|
||||
/// A draft email in the user's mailbox.
|
||||
///
|
||||
/// # Activities
|
||||
@@ -506,6 +482,24 @@ pub struct HistoryLabelAdded {
|
||||
impl Part for HistoryLabelAdded {}
|
||||
|
||||
|
||||
/// There is no detailed description.
|
||||
///
|
||||
/// # Activities
|
||||
///
|
||||
/// This type is used in activities, which are methods you may call on this type or where this type is involved in.
|
||||
/// The list links the activity name, along with information about where it is used (one of *request* and *response*).
|
||||
///
|
||||
/// * [labels list users](struct.UserLabelListCall.html) (response)
|
||||
///
|
||||
#[derive(Default, Clone, Debug, Serialize, Deserialize)]
|
||||
pub struct ListLabelsResponse {
|
||||
/// List of labels.
|
||||
pub labels: Option<Vec<Label>>,
|
||||
}
|
||||
|
||||
impl ResponseResult for ListLabelsResponse {}
|
||||
|
||||
|
||||
/// There is no detailed description.
|
||||
///
|
||||
/// # Activities
|
||||
@@ -552,6 +546,33 @@ pub struct ModifyThreadRequest {
|
||||
impl RequestValue for ModifyThreadRequest {}
|
||||
|
||||
|
||||
/// Set up or update a new push notification watch on this user's mailbox.
|
||||
///
|
||||
/// # Activities
|
||||
///
|
||||
/// This type is used in activities, which are methods you may call on this type or where this type is involved in.
|
||||
/// The list links the activity name, along with information about where it is used (one of *request* and *response*).
|
||||
///
|
||||
/// * [watch users](struct.UserWatchCall.html) (request)
|
||||
///
|
||||
#[derive(Default, Clone, Debug, Serialize, Deserialize)]
|
||||
pub struct WatchRequest {
|
||||
/// List of label_ids to restrict notifications about. By default, if unspecified, all changes are pushed out. If specified then dictates which labels are required for a push notification to be generated.
|
||||
#[serde(rename="labelIds")]
|
||||
pub label_ids: Option<Vec<String>>,
|
||||
/// A fully qualified Google Cloud Pub/Sub API topic name to publish the events to. This topic name **must** already exist in Cloud Pub/Sub and you **must** have already granted gmail "publish" permission on it. For example, "projects/my-project-identifier/topics/my-topic-name" (using the new Cloud Pub/Sub "v1beta2" topic naming format).
|
||||
///
|
||||
/// Note that the "my-project-identifier" portion must exactly match your Google developer project id (the one executing this watch request).
|
||||
#[serde(rename="topicName")]
|
||||
pub topic_name: Option<String>,
|
||||
/// Filtering behavior of labelIds list specified.
|
||||
#[serde(rename="labelFilterAction")]
|
||||
pub label_filter_action: Option<String>,
|
||||
}
|
||||
|
||||
impl RequestValue for WatchRequest {}
|
||||
|
||||
|
||||
/// There is no detailed description.
|
||||
///
|
||||
/// # Activities
|
||||
@@ -583,15 +604,37 @@ impl ResponseResult for ListMessagesResponse {}
|
||||
/// This type is used in activities, which are methods you may call on this type or where this type is involved in.
|
||||
/// The list links the activity name, along with information about where it is used (one of *request* and *response*).
|
||||
///
|
||||
/// * [labels list users](struct.UserLabelListCall.html) (response)
|
||||
/// * [history list users](struct.UserHistoryListCall.html) (response)
|
||||
///
|
||||
#[derive(Default, Clone, Debug, Serialize, Deserialize)]
|
||||
pub struct ListLabelsResponse {
|
||||
/// List of labels.
|
||||
pub labels: Option<Vec<Label>>,
|
||||
pub struct ListHistoryResponse {
|
||||
/// Page token to retrieve the next page of results in the list.
|
||||
#[serde(rename="nextPageToken")]
|
||||
pub next_page_token: Option<String>,
|
||||
/// The ID of the mailbox's current history record.
|
||||
#[serde(rename="historyId")]
|
||||
pub history_id: Option<String>,
|
||||
/// List of history records. Any messages contained in the response will typically only have id and threadId fields populated.
|
||||
pub history: Option<Vec<History>>,
|
||||
}
|
||||
|
||||
impl ResponseResult for ListLabelsResponse {}
|
||||
impl ResponseResult for ListHistoryResponse {}
|
||||
|
||||
|
||||
/// There is no detailed description.
|
||||
///
|
||||
/// This type is not used in any activity, and only used as *part* of another schema.
|
||||
///
|
||||
#[derive(Default, Clone, Debug, Serialize, Deserialize)]
|
||||
pub struct HistoryLabelRemoved {
|
||||
/// Label IDs removed from the message.
|
||||
#[serde(rename="labelIds")]
|
||||
pub label_ids: Option<Vec<String>>,
|
||||
/// no description provided
|
||||
pub message: Option<Message>,
|
||||
}
|
||||
|
||||
impl Part for HistoryLabelRemoved {}
|
||||
|
||||
|
||||
/// An email message.
|
||||
@@ -612,6 +655,9 @@ impl ResponseResult for ListLabelsResponse {}
|
||||
///
|
||||
#[derive(Default, Clone, Debug, Serialize, Deserialize)]
|
||||
pub struct Message {
|
||||
/// The internal message creation timestamp (epoch ms), which determines ordering in the inbox. For normal SMTP-received email, this represents the time the message was originally accepted by Google, which is more reliable than the Date header. However, for API-migrated mail, it can be configured by client to be based on the Date header.
|
||||
#[serde(rename="internalDate")]
|
||||
pub internal_date: Option<String>,
|
||||
/// The ID of the last history record that modified this message.
|
||||
#[serde(rename="historyId")]
|
||||
pub history_id: Option<String>,
|
||||
@@ -641,20 +687,25 @@ impl RequestValue for Message {}
|
||||
impl ResponseResult for Message {}
|
||||
|
||||
|
||||
/// There is no detailed description.
|
||||
/// Push notification watch response.
|
||||
///
|
||||
/// This type is not used in any activity, and only used as *part* of another schema.
|
||||
/// # Activities
|
||||
///
|
||||
/// This type is used in activities, which are methods you may call on this type or where this type is involved in.
|
||||
/// The list links the activity name, along with information about where it is used (one of *request* and *response*).
|
||||
///
|
||||
/// * [watch users](struct.UserWatchCall.html) (response)
|
||||
///
|
||||
#[derive(Default, Clone, Debug, Serialize, Deserialize)]
|
||||
pub struct HistoryLabelRemoved {
|
||||
/// Label IDs removed from the message.
|
||||
#[serde(rename="labelIds")]
|
||||
pub label_ids: Option<Vec<String>>,
|
||||
/// no description provided
|
||||
pub message: Option<Message>,
|
||||
pub struct WatchResponse {
|
||||
/// When Gmail will stop sending notifications for mailbox updates (epoch millis). Call watch again before this time to renew the watch.
|
||||
pub expiration: Option<String>,
|
||||
/// The ID of the mailbox's current history record.
|
||||
#[serde(rename="historyId")]
|
||||
pub history_id: Option<String>,
|
||||
}
|
||||
|
||||
impl Part for HistoryLabelRemoved {}
|
||||
impl ResponseResult for WatchResponse {}
|
||||
|
||||
|
||||
|
||||
@@ -685,7 +736,7 @@ impl Part for HistoryLabelRemoved {}
|
||||
/// <MemoryStorage as Default>::default(), None);
|
||||
/// let mut hub = Gmail::new(hyper::Client::new(), auth);
|
||||
/// // Usually you wouldn't bind this to a variable, but keep calling *CallBuilders*
|
||||
/// // like `drafts_create(...)`, `drafts_delete(...)`, `drafts_get(...)`, `drafts_list(...)`, `drafts_send(...)`, `drafts_update(...)`, `get_profile(...)`, `history_list(...)`, `labels_create(...)`, `labels_delete(...)`, `labels_get(...)`, `labels_list(...)`, `labels_patch(...)`, `labels_update(...)`, `messages_attachments_get(...)`, `messages_delete(...)`, `messages_get(...)`, `messages_import(...)`, `messages_insert(...)`, `messages_list(...)`, `messages_modify(...)`, `messages_send(...)`, `messages_trash(...)`, `messages_untrash(...)`, `threads_delete(...)`, `threads_get(...)`, `threads_list(...)`, `threads_modify(...)`, `threads_trash(...)` and `threads_untrash(...)`
|
||||
/// // like `drafts_create(...)`, `drafts_delete(...)`, `drafts_get(...)`, `drafts_list(...)`, `drafts_send(...)`, `drafts_update(...)`, `get_profile(...)`, `history_list(...)`, `labels_create(...)`, `labels_delete(...)`, `labels_get(...)`, `labels_list(...)`, `labels_patch(...)`, `labels_update(...)`, `messages_attachments_get(...)`, `messages_delete(...)`, `messages_get(...)`, `messages_import(...)`, `messages_insert(...)`, `messages_list(...)`, `messages_modify(...)`, `messages_send(...)`, `messages_trash(...)`, `messages_untrash(...)`, `stop(...)`, `threads_delete(...)`, `threads_get(...)`, `threads_list(...)`, `threads_modify(...)`, `threads_trash(...)`, `threads_untrash(...)` and `watch(...)`
|
||||
/// // to build up your call.
|
||||
/// let rb = hub.users();
|
||||
/// # }
|
||||
@@ -700,6 +751,23 @@ impl<'a, C, A> MethodsBuilder for UserMethods<'a, C, A> {}
|
||||
|
||||
impl<'a, C, A> UserMethods<'a, C, A> {
|
||||
|
||||
/// Create a builder to help you perform the following task:
|
||||
///
|
||||
/// Stop receiving push notifications for the given user mailbox.
|
||||
///
|
||||
/// # Arguments
|
||||
///
|
||||
/// * `userId` - The user's email address. The special value me can be used to indicate the authenticated user.
|
||||
pub fn stop(&self, user_id: &str) -> UserStopCall<'a, C, A> {
|
||||
UserStopCall {
|
||||
hub: self.hub,
|
||||
_user_id: user_id.to_string(),
|
||||
_delegate: Default::default(),
|
||||
_scopes: Default::default(),
|
||||
_additional_params: Default::default(),
|
||||
}
|
||||
}
|
||||
|
||||
/// Create a builder to help you perform the following task:
|
||||
///
|
||||
/// Imports a message into only this user's mailbox, with standard email delivery scanning and classification similar to receiving via SMTP. Does not send a message.
|
||||
@@ -1157,6 +1225,25 @@ impl<'a, C, A> UserMethods<'a, C, A> {
|
||||
}
|
||||
}
|
||||
|
||||
/// Create a builder to help you perform the following task:
|
||||
///
|
||||
/// Set up or update a push notification watch on the given user mailbox.
|
||||
///
|
||||
/// # Arguments
|
||||
///
|
||||
/// * `request` - No description provided.
|
||||
/// * `userId` - The user's email address. The special value me can be used to indicate the authenticated user.
|
||||
pub fn watch(&self, request: WatchRequest, user_id: &str) -> UserWatchCall<'a, C, A> {
|
||||
UserWatchCall {
|
||||
hub: self.hub,
|
||||
_request: request,
|
||||
_user_id: user_id.to_string(),
|
||||
_delegate: Default::default(),
|
||||
_scopes: Default::default(),
|
||||
_additional_params: Default::default(),
|
||||
}
|
||||
}
|
||||
|
||||
/// Create a builder to help you perform the following task:
|
||||
///
|
||||
/// Lists the drafts in the user's mailbox.
|
||||
@@ -1306,6 +1393,231 @@ impl<'a, C, A> UserMethods<'a, C, A> {
|
||||
// CallBuilders ###
|
||||
// #################
|
||||
|
||||
/// Stop receiving push notifications for the given user mailbox.
|
||||
///
|
||||
/// A builder for the *stop* method supported by a *user* resource.
|
||||
/// It is not used directly, but through a `UserMethods` instance.
|
||||
///
|
||||
/// # Example
|
||||
///
|
||||
/// Instantiate a resource method builder
|
||||
///
|
||||
/// ```test_harness,no_run
|
||||
/// # extern crate hyper;
|
||||
/// # extern crate yup_oauth2 as oauth2;
|
||||
/// # extern crate google_gmail1 as gmail1;
|
||||
/// # #[test] fn egal() {
|
||||
/// # use std::default::Default;
|
||||
/// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage};
|
||||
/// # use gmail1::Gmail;
|
||||
///
|
||||
/// # let secret: ApplicationSecret = Default::default();
|
||||
/// # let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate,
|
||||
/// # hyper::Client::new(),
|
||||
/// # <MemoryStorage as Default>::default(), None);
|
||||
/// # let mut hub = Gmail::new(hyper::Client::new(), auth);
|
||||
/// // You can configure optional parameters by calling the respective setters at will, and
|
||||
/// // execute the final call using `doit()`.
|
||||
/// // Values shown here are possibly random and not representative !
|
||||
/// let result = hub.users().stop("userId")
|
||||
/// .doit();
|
||||
/// # }
|
||||
/// ```
|
||||
pub struct UserStopCall<'a, C, A>
|
||||
where C: 'a, A: 'a {
|
||||
|
||||
hub: &'a Gmail<C, A>,
|
||||
_user_id: String,
|
||||
_delegate: Option<&'a mut Delegate>,
|
||||
_additional_params: HashMap<String, String>,
|
||||
_scopes: BTreeMap<String, ()>
|
||||
}
|
||||
|
||||
impl<'a, C, A> CallBuilder for UserStopCall<'a, C, A> {}
|
||||
|
||||
impl<'a, C, A> UserStopCall<'a, C, A> where C: BorrowMut<hyper::Client>, A: oauth2::GetToken {
|
||||
|
||||
|
||||
/// Perform the operation you have build so far.
|
||||
pub fn doit(mut self) -> Result<hyper::client::Response> {
|
||||
use std::io::{Read, Seek};
|
||||
use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location};
|
||||
let mut dd = DefaultDelegate;
|
||||
let mut dlg: &mut Delegate = match self._delegate {
|
||||
Some(d) => d,
|
||||
None => &mut dd
|
||||
};
|
||||
dlg.begin(MethodInfo { id: "gmail.users.stop",
|
||||
http_method: hyper::method::Method::Post });
|
||||
let mut params: Vec<(&str, String)> = Vec::with_capacity((2 + self._additional_params.len()));
|
||||
params.push(("userId", self._user_id.to_string()));
|
||||
for &field in ["userId"].iter() {
|
||||
if self._additional_params.contains_key(field) {
|
||||
dlg.finished(false);
|
||||
return Err(Error::FieldClash(field));
|
||||
}
|
||||
}
|
||||
for (name, value) in self._additional_params.iter() {
|
||||
params.push((&name, value.clone()));
|
||||
}
|
||||
|
||||
|
||||
let mut url = "https://www.googleapis.com/gmail/v1/users/{userId}/stop".to_string();
|
||||
if self._scopes.len() == 0 {
|
||||
self._scopes.insert(Scope::Gmai.as_ref().to_string(), ());
|
||||
}
|
||||
|
||||
for &(find_this, param_name) in [("{userId}", "userId")].iter() {
|
||||
let mut replace_with: Option<&str> = None;
|
||||
for &(name, ref value) in params.iter() {
|
||||
if name == param_name {
|
||||
replace_with = Some(value);
|
||||
break;
|
||||
}
|
||||
}
|
||||
url = url.replace(find_this, replace_with.expect("to find substitution value in params"));
|
||||
}
|
||||
{
|
||||
let mut indices_for_removal: Vec<usize> = Vec::with_capacity(1);
|
||||
for param_name in ["userId"].iter() {
|
||||
if let Some(index) = params.iter().position(|t| &t.0 == param_name) {
|
||||
indices_for_removal.push(index);
|
||||
}
|
||||
}
|
||||
for &index in indices_for_removal.iter() {
|
||||
params.remove(index);
|
||||
}
|
||||
}
|
||||
|
||||
if params.len() > 0 {
|
||||
url.push('?');
|
||||
url.push_str(&url::form_urlencoded::serialize(params));
|
||||
}
|
||||
|
||||
|
||||
|
||||
loop {
|
||||
let token = match self.hub.auth.borrow_mut().token(self._scopes.keys()) {
|
||||
Ok(token) => token,
|
||||
Err(err) => {
|
||||
match dlg.token(&*err) {
|
||||
Some(token) => token,
|
||||
None => {
|
||||
dlg.finished(false);
|
||||
return Err(Error::MissingToken(err))
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer,
|
||||
access_token: token.access_token });
|
||||
let mut req_result = {
|
||||
let mut client = &mut *self.hub.client.borrow_mut();
|
||||
let mut req = client.borrow_mut().request(hyper::method::Method::Post, &url)
|
||||
.header(UserAgent(self.hub._user_agent.clone()))
|
||||
.header(auth_header.clone());
|
||||
|
||||
dlg.pre_request();
|
||||
req.send()
|
||||
};
|
||||
|
||||
match req_result {
|
||||
Err(err) => {
|
||||
if let oauth2::Retry::After(d) = dlg.http_error(&err) {
|
||||
sleep_ms(d.num_milliseconds() as u32);
|
||||
continue;
|
||||
}
|
||||
dlg.finished(false);
|
||||
return Err(Error::HttpError(err))
|
||||
}
|
||||
Ok(mut res) => {
|
||||
if !res.status.is_success() {
|
||||
let mut json_err = String::new();
|
||||
res.read_to_string(&mut json_err).unwrap();
|
||||
if let oauth2::Retry::After(d) = dlg.http_failure(&res,
|
||||
json::from_str(&json_err).ok(),
|
||||
json::from_str(&json_err).ok()) {
|
||||
sleep_ms(d.num_milliseconds() as u32);
|
||||
continue;
|
||||
}
|
||||
dlg.finished(false);
|
||||
return match json::from_str::<ErrorResponse>(&json_err){
|
||||
Err(_) => Err(Error::Failure(res)),
|
||||
Ok(serr) => Err(Error::BadRequest(serr))
|
||||
}
|
||||
}
|
||||
let result_value = res;
|
||||
|
||||
dlg.finished(true);
|
||||
return Ok(result_value)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// The user's email address. The special value me can be used to indicate the authenticated user.
|
||||
///
|
||||
/// Sets the *user id* path property to the given value.
|
||||
///
|
||||
/// Even though the property as already been set when instantiating this call,
|
||||
/// we provide this method for API completeness.
|
||||
pub fn user_id(mut self, new_value: &str) -> UserStopCall<'a, C, A> {
|
||||
self._user_id = new_value.to_string();
|
||||
self
|
||||
}
|
||||
/// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong
|
||||
/// while executing the actual API request.
|
||||
///
|
||||
/// It should be used to handle progress information, and to implement a certain level of resilience.
|
||||
///
|
||||
/// Sets the *delegate* property to the given value.
|
||||
pub fn delegate(mut self, new_value: &'a mut Delegate) -> UserStopCall<'a, C, A> {
|
||||
self._delegate = Some(new_value);
|
||||
self
|
||||
}
|
||||
|
||||
/// Set any additional parameter of the query string used in the request.
|
||||
/// It should be used to set parameters which are not yet available through their own
|
||||
/// setters.
|
||||
///
|
||||
/// Please note that this method must not be used to set any of the known paramters
|
||||
/// which have their own setter method. If done anyway, the request will fail.
|
||||
///
|
||||
/// # Additional Parameters
|
||||
///
|
||||
/// * *quotaUser* (query-string) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. Overrides userIp if both are provided.
|
||||
/// * *oauth_token* (query-string) - OAuth 2.0 token for the current user.
|
||||
/// * *key* (query-string) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
|
||||
/// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks.
|
||||
/// * *userIp* (query-string) - IP address of the site where the request originates. Use this if you want to enforce per-user limits.
|
||||
/// * *fields* (query-string) - Selector specifying which fields to include in a partial response.
|
||||
/// * *alt* (query-string) - Data format for the response.
|
||||
pub fn param<T>(mut self, name: T, value: T) -> UserStopCall<'a, C, A>
|
||||
where T: AsRef<str> {
|
||||
self._additional_params.insert(name.as_ref().to_string(), value.as_ref().to_string());
|
||||
self
|
||||
}
|
||||
|
||||
/// Identifies the authorization scope for the method you are building.
|
||||
///
|
||||
/// Use this method to actively specify which scope should be used, instead the default `Scope` variant
|
||||
/// `Scope::Gmai`.
|
||||
///
|
||||
/// 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) -> UserStopCall<'a, C, A>
|
||||
where T: AsRef<str> {
|
||||
self._scopes.insert(scope.as_ref().to_string(), ());
|
||||
self
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// Imports a message into only this user's mailbox, with standard email delivery scanning and classification similar to receiving via SMTP. Does not send a message.
|
||||
///
|
||||
/// A builder for the *messages.import* method supported by a *user* resource.
|
||||
@@ -1340,10 +1652,10 @@ impl<'a, C, A> UserMethods<'a, C, A> {
|
||||
/// // execute the final call using `upload(...)`.
|
||||
/// // Values shown here are possibly random and not representative !
|
||||
/// let result = hub.users().messages_import(req, "userId")
|
||||
/// .process_for_calendar(false)
|
||||
/// .process_for_calendar(true)
|
||||
/// .never_mark_spam(true)
|
||||
/// .internal_date_source("sea")
|
||||
/// .deleted(false)
|
||||
/// .internal_date_source("nonumy")
|
||||
/// .deleted(true)
|
||||
/// .upload(fs::File::open("file.ext").unwrap(), "application/octet-stream".parse().unwrap());
|
||||
/// # }
|
||||
/// ```
|
||||
@@ -1765,10 +2077,10 @@ impl<'a, C, A> UserMessageImportCall<'a, C, A> where C: BorrowMut<hyper::Client>
|
||||
/// // execute the final call using `doit()`.
|
||||
/// // Values shown here are possibly random and not representative !
|
||||
/// let result = hub.users().history_list("userId")
|
||||
/// .start_history_id("gubergren")
|
||||
/// .page_token("sadipscing")
|
||||
/// .max_results(70)
|
||||
/// .label_id("ea")
|
||||
/// .start_history_id("sadipscing")
|
||||
/// .page_token("aliquyam")
|
||||
/// .max_results(35)
|
||||
/// .label_id("no")
|
||||
/// .doit();
|
||||
/// # }
|
||||
/// ```
|
||||
@@ -1942,7 +2254,7 @@ impl<'a, C, A> UserHistoryListCall<'a, C, A> where C: BorrowMut<hyper::Client>,
|
||||
self._user_id = new_value.to_string();
|
||||
self
|
||||
}
|
||||
/// Required. Returns history records after the specified startHistoryId. The supplied startHistoryId should be obtained from the historyId of a message, thread, or previous list response. History IDs increase chronologically but are not contiguous with random gaps in between valid IDs. Supplying an invalid or out of date startHistoryId typically returns an HTTP 404 error code. A historyId is typically valid for at least a week, but in some circumstances may be valid for only a few hours. If you receive an HTTP 404 error response, your application should perform a full sync. If you receive no nextPageToken in the response, there are no updates to retrieve and you can store the returned historyId for a future request.
|
||||
/// Required. Returns history records after the specified startHistoryId. The supplied startHistoryId should be obtained from the historyId of a message, thread, or previous list response. History IDs increase chronologically but are not contiguous with random gaps in between valid IDs. Supplying an invalid or out of date startHistoryId typically returns an HTTP 404 error code. A historyId is typically valid for at least a week, but in some rare circumstances may be valid for only a few hours. If you receive an HTTP 404 error response, your application should perform a full sync. If you receive no nextPageToken in the response, there are no updates to retrieve and you can store the returned historyId for a future request.
|
||||
///
|
||||
/// Sets the *start history id* query property to the given value.
|
||||
pub fn start_history_id(mut self, new_value: &str) -> UserHistoryListCall<'a, C, A> {
|
||||
@@ -4934,7 +5246,7 @@ impl<'a, C, A> UserDraftUpdateCall<'a, C, A> where C: BorrowMut<hyper::Client>,
|
||||
/// // execute the final call using `doit()`.
|
||||
/// // Values shown here are possibly random and not representative !
|
||||
/// let result = hub.users().drafts_get("userId", "id")
|
||||
/// .format("elitr")
|
||||
/// .format("amet")
|
||||
/// .doit();
|
||||
/// # }
|
||||
/// ```
|
||||
@@ -6237,11 +6549,11 @@ impl<'a, C, A> UserDraftDeleteCall<'a, C, A> where C: BorrowMut<hyper::Client>,
|
||||
/// // execute the final call using `doit()`.
|
||||
/// // Values shown here are possibly random and not representative !
|
||||
/// let result = hub.users().threads_list("userId")
|
||||
/// .q("sea")
|
||||
/// .page_token("et")
|
||||
/// .max_results(31)
|
||||
/// .add_label_ids("et")
|
||||
/// .include_spam_trash(true)
|
||||
/// .q("et")
|
||||
/// .page_token("duo")
|
||||
/// .max_results(80)
|
||||
/// .add_label_ids("eirmod")
|
||||
/// .include_spam_trash(false)
|
||||
/// .doit();
|
||||
/// # }
|
||||
/// ```
|
||||
@@ -7814,6 +8126,273 @@ impl<'a, C, A> UserThreadTrashCall<'a, C, A> where C: BorrowMut<hyper::Client>,
|
||||
}
|
||||
|
||||
|
||||
/// Set up or update a push notification watch on the given user mailbox.
|
||||
///
|
||||
/// A builder for the *watch* method supported by a *user* resource.
|
||||
/// It is not used directly, but through a `UserMethods` instance.
|
||||
///
|
||||
/// # Example
|
||||
///
|
||||
/// Instantiate a resource method builder
|
||||
///
|
||||
/// ```test_harness,no_run
|
||||
/// # extern crate hyper;
|
||||
/// # extern crate yup_oauth2 as oauth2;
|
||||
/// # extern crate google_gmail1 as gmail1;
|
||||
/// use gmail1::WatchRequest;
|
||||
/// # #[test] fn egal() {
|
||||
/// # use std::default::Default;
|
||||
/// # use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage};
|
||||
/// # use gmail1::Gmail;
|
||||
///
|
||||
/// # let secret: ApplicationSecret = Default::default();
|
||||
/// # let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate,
|
||||
/// # hyper::Client::new(),
|
||||
/// # <MemoryStorage as Default>::default(), None);
|
||||
/// # let mut hub = Gmail::new(hyper::Client::new(), auth);
|
||||
/// // As the method needs a request, you would usually fill it with the desired information
|
||||
/// // into the respective structure. Some of the parts shown here might not be applicable !
|
||||
/// // Values shown here are possibly random and not representative !
|
||||
/// let mut req = WatchRequest::default();
|
||||
///
|
||||
/// // You can configure optional parameters by calling the respective setters at will, and
|
||||
/// // execute the final call using `doit()`.
|
||||
/// // Values shown here are possibly random and not representative !
|
||||
/// let result = hub.users().watch(req, "userId")
|
||||
/// .doit();
|
||||
/// # }
|
||||
/// ```
|
||||
pub struct UserWatchCall<'a, C, A>
|
||||
where C: 'a, A: 'a {
|
||||
|
||||
hub: &'a Gmail<C, A>,
|
||||
_request: WatchRequest,
|
||||
_user_id: String,
|
||||
_delegate: Option<&'a mut Delegate>,
|
||||
_additional_params: HashMap<String, String>,
|
||||
_scopes: BTreeMap<String, ()>
|
||||
}
|
||||
|
||||
impl<'a, C, A> CallBuilder for UserWatchCall<'a, C, A> {}
|
||||
|
||||
impl<'a, C, A> UserWatchCall<'a, C, A> where C: BorrowMut<hyper::Client>, A: oauth2::GetToken {
|
||||
|
||||
|
||||
/// Perform the operation you have build so far.
|
||||
pub fn doit(mut self) -> Result<(hyper::client::Response, WatchResponse)> {
|
||||
use std::io::{Read, Seek};
|
||||
use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location};
|
||||
let mut dd = DefaultDelegate;
|
||||
let mut dlg: &mut Delegate = match self._delegate {
|
||||
Some(d) => d,
|
||||
None => &mut dd
|
||||
};
|
||||
dlg.begin(MethodInfo { id: "gmail.users.watch",
|
||||
http_method: hyper::method::Method::Post });
|
||||
let mut params: Vec<(&str, String)> = Vec::with_capacity((4 + self._additional_params.len()));
|
||||
params.push(("userId", self._user_id.to_string()));
|
||||
for &field in ["alt", "userId"].iter() {
|
||||
if self._additional_params.contains_key(field) {
|
||||
dlg.finished(false);
|
||||
return Err(Error::FieldClash(field));
|
||||
}
|
||||
}
|
||||
for (name, value) in self._additional_params.iter() {
|
||||
params.push((&name, value.clone()));
|
||||
}
|
||||
|
||||
params.push(("alt", "json".to_string()));
|
||||
|
||||
let mut url = "https://www.googleapis.com/gmail/v1/users/{userId}/watch".to_string();
|
||||
if self._scopes.len() == 0 {
|
||||
self._scopes.insert(Scope::Gmai.as_ref().to_string(), ());
|
||||
}
|
||||
|
||||
for &(find_this, param_name) in [("{userId}", "userId")].iter() {
|
||||
let mut replace_with: Option<&str> = None;
|
||||
for &(name, ref value) in params.iter() {
|
||||
if name == param_name {
|
||||
replace_with = Some(value);
|
||||
break;
|
||||
}
|
||||
}
|
||||
url = url.replace(find_this, replace_with.expect("to find substitution value in params"));
|
||||
}
|
||||
{
|
||||
let mut indices_for_removal: Vec<usize> = Vec::with_capacity(1);
|
||||
for param_name in ["userId"].iter() {
|
||||
if let Some(index) = params.iter().position(|t| &t.0 == param_name) {
|
||||
indices_for_removal.push(index);
|
||||
}
|
||||
}
|
||||
for &index in indices_for_removal.iter() {
|
||||
params.remove(index);
|
||||
}
|
||||
}
|
||||
|
||||
if params.len() > 0 {
|
||||
url.push('?');
|
||||
url.push_str(&url::form_urlencoded::serialize(params));
|
||||
}
|
||||
|
||||
let mut json_mime_type = mime::Mime(mime::TopLevel::Application, mime::SubLevel::Json, Default::default());
|
||||
let mut request_value_reader =
|
||||
{
|
||||
let mut value = json::value::to_value(&self._request);
|
||||
remove_json_null_values(&mut value);
|
||||
let mut dst = io::Cursor::new(Vec::with_capacity(128));
|
||||
json::to_writer(&mut dst, &value).unwrap();
|
||||
dst
|
||||
};
|
||||
let request_size = request_value_reader.seek(io::SeekFrom::End(0)).unwrap();
|
||||
request_value_reader.seek(io::SeekFrom::Start(0)).unwrap();
|
||||
|
||||
|
||||
loop {
|
||||
let token = match self.hub.auth.borrow_mut().token(self._scopes.keys()) {
|
||||
Ok(token) => token,
|
||||
Err(err) => {
|
||||
match dlg.token(&*err) {
|
||||
Some(token) => token,
|
||||
None => {
|
||||
dlg.finished(false);
|
||||
return Err(Error::MissingToken(err))
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer,
|
||||
access_token: token.access_token });
|
||||
request_value_reader.seek(io::SeekFrom::Start(0)).unwrap();
|
||||
let mut req_result = {
|
||||
let mut client = &mut *self.hub.client.borrow_mut();
|
||||
let mut req = client.borrow_mut().request(hyper::method::Method::Post, &url)
|
||||
.header(UserAgent(self.hub._user_agent.clone()))
|
||||
.header(auth_header.clone())
|
||||
.header(ContentType(json_mime_type.clone()))
|
||||
.header(ContentLength(request_size as u64))
|
||||
.body(&mut request_value_reader);
|
||||
|
||||
dlg.pre_request();
|
||||
req.send()
|
||||
};
|
||||
|
||||
match req_result {
|
||||
Err(err) => {
|
||||
if let oauth2::Retry::After(d) = dlg.http_error(&err) {
|
||||
sleep_ms(d.num_milliseconds() as u32);
|
||||
continue;
|
||||
}
|
||||
dlg.finished(false);
|
||||
return Err(Error::HttpError(err))
|
||||
}
|
||||
Ok(mut res) => {
|
||||
if !res.status.is_success() {
|
||||
let mut json_err = String::new();
|
||||
res.read_to_string(&mut json_err).unwrap();
|
||||
if let oauth2::Retry::After(d) = dlg.http_failure(&res,
|
||||
json::from_str(&json_err).ok(),
|
||||
json::from_str(&json_err).ok()) {
|
||||
sleep_ms(d.num_milliseconds() as u32);
|
||||
continue;
|
||||
}
|
||||
dlg.finished(false);
|
||||
return match json::from_str::<ErrorResponse>(&json_err){
|
||||
Err(_) => Err(Error::Failure(res)),
|
||||
Ok(serr) => Err(Error::BadRequest(serr))
|
||||
}
|
||||
}
|
||||
let result_value = {
|
||||
let mut json_response = String::new();
|
||||
res.read_to_string(&mut json_response).unwrap();
|
||||
match json::from_str(&json_response) {
|
||||
Ok(decoded) => (res, decoded),
|
||||
Err(err) => {
|
||||
dlg.response_json_decode_error(&json_response, &err);
|
||||
return Err(Error::JsonDecodeError(json_response, err));
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
dlg.finished(true);
|
||||
return Ok(result_value)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
///
|
||||
/// Sets the *request* property to the given value.
|
||||
///
|
||||
/// Even though the property as already been set when instantiating this call,
|
||||
/// we provide this method for API completeness.
|
||||
pub fn request(mut self, new_value: WatchRequest) -> UserWatchCall<'a, C, A> {
|
||||
self._request = new_value;
|
||||
self
|
||||
}
|
||||
/// The user's email address. The special value me can be used to indicate the authenticated user.
|
||||
///
|
||||
/// Sets the *user id* path property to the given value.
|
||||
///
|
||||
/// Even though the property as already been set when instantiating this call,
|
||||
/// we provide this method for API completeness.
|
||||
pub fn user_id(mut self, new_value: &str) -> UserWatchCall<'a, C, A> {
|
||||
self._user_id = new_value.to_string();
|
||||
self
|
||||
}
|
||||
/// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong
|
||||
/// while executing the actual API request.
|
||||
///
|
||||
/// It should be used to handle progress information, and to implement a certain level of resilience.
|
||||
///
|
||||
/// Sets the *delegate* property to the given value.
|
||||
pub fn delegate(mut self, new_value: &'a mut Delegate) -> UserWatchCall<'a, C, A> {
|
||||
self._delegate = Some(new_value);
|
||||
self
|
||||
}
|
||||
|
||||
/// Set any additional parameter of the query string used in the request.
|
||||
/// It should be used to set parameters which are not yet available through their own
|
||||
/// setters.
|
||||
///
|
||||
/// Please note that this method must not be used to set any of the known paramters
|
||||
/// which have their own setter method. If done anyway, the request will fail.
|
||||
///
|
||||
/// # Additional Parameters
|
||||
///
|
||||
/// * *quotaUser* (query-string) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. Overrides userIp if both are provided.
|
||||
/// * *oauth_token* (query-string) - OAuth 2.0 token for the current user.
|
||||
/// * *key* (query-string) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
|
||||
/// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks.
|
||||
/// * *userIp* (query-string) - IP address of the site where the request originates. Use this if you want to enforce per-user limits.
|
||||
/// * *fields* (query-string) - Selector specifying which fields to include in a partial response.
|
||||
/// * *alt* (query-string) - Data format for the response.
|
||||
pub fn param<T>(mut self, name: T, value: T) -> UserWatchCall<'a, C, A>
|
||||
where T: AsRef<str> {
|
||||
self._additional_params.insert(name.as_ref().to_string(), value.as_ref().to_string());
|
||||
self
|
||||
}
|
||||
|
||||
/// Identifies the authorization scope for the method you are building.
|
||||
///
|
||||
/// Use this method to actively specify which scope should be used, instead the default `Scope` variant
|
||||
/// `Scope::Gmai`.
|
||||
///
|
||||
/// 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) -> UserWatchCall<'a, C, A>
|
||||
where T: AsRef<str> {
|
||||
self._scopes.insert(scope.as_ref().to_string(), ());
|
||||
self
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// Lists the drafts in the user's mailbox.
|
||||
///
|
||||
/// A builder for the *drafts.list* method supported by a *user* resource.
|
||||
@@ -7841,8 +8420,8 @@ impl<'a, C, A> UserThreadTrashCall<'a, C, A> where C: BorrowMut<hyper::Client>,
|
||||
/// // execute the final call using `doit()`.
|
||||
/// // Values shown here are possibly random and not representative !
|
||||
/// let result = hub.users().drafts_list("userId")
|
||||
/// .page_token("consetetur")
|
||||
/// .max_results(49)
|
||||
/// .page_token("voluptua.")
|
||||
/// .max_results(45)
|
||||
/// .doit();
|
||||
/// # }
|
||||
/// ```
|
||||
@@ -8485,8 +9064,8 @@ impl<'a, C, A> UserMessageSendCall<'a, C, A> where C: BorrowMut<hyper::Client>,
|
||||
/// // execute the final call using `doit()`.
|
||||
/// // Values shown here are possibly random and not representative !
|
||||
/// let result = hub.users().messages_get("userId", "id")
|
||||
/// .add_metadata_headers("justo")
|
||||
/// .format("sit")
|
||||
/// .add_metadata_headers("vero")
|
||||
/// .format("diam")
|
||||
/// .doit();
|
||||
/// # }
|
||||
/// ```
|
||||
@@ -8762,9 +9341,9 @@ impl<'a, C, A> UserMessageGetCall<'a, C, A> where C: BorrowMut<hyper::Client>, A
|
||||
/// // execute the final call using `doit()`.
|
||||
/// // Values shown here are possibly random and not representative !
|
||||
/// let result = hub.users().messages_list("userId")
|
||||
/// .q("diam")
|
||||
/// .page_token("rebum.")
|
||||
/// .max_results(56)
|
||||
/// .q("consetetur")
|
||||
/// .page_token("sadipscing")
|
||||
/// .max_results(25)
|
||||
/// .add_label_ids("sadipscing")
|
||||
/// .include_spam_trash(false)
|
||||
/// .doit();
|
||||
@@ -9299,8 +9878,8 @@ impl<'a, C, A> UserGetProfileCall<'a, C, A> where C: BorrowMut<hyper::Client>, A
|
||||
/// // execute the final call using `doit()`.
|
||||
/// // Values shown here are possibly random and not representative !
|
||||
/// let result = hub.users().threads_get("userId", "id")
|
||||
/// .add_metadata_headers("dolore")
|
||||
/// .format("duo")
|
||||
/// .add_metadata_headers("aliquyam")
|
||||
/// .format("Lorem")
|
||||
/// .doit();
|
||||
/// # }
|
||||
/// ```
|
||||
@@ -9583,7 +10162,7 @@ impl<'a, C, A> UserThreadGetCall<'a, C, A> where C: BorrowMut<hyper::Client>, A:
|
||||
/// // execute the final call using `upload(...)`.
|
||||
/// // Values shown here are possibly random and not representative !
|
||||
/// let result = hub.users().messages_insert(req, "userId")
|
||||
/// .internal_date_source("Lorem")
|
||||
/// .internal_date_source("clita")
|
||||
/// .deleted(true)
|
||||
/// .upload(fs::File::open("file.ext").unwrap(), "application/octet-stream".parse().unwrap());
|
||||
/// # }
|
||||
|
||||
Reference in New Issue
Block a user