晋太元中,武陵人捕鱼为业。缘溪行,忘路之远近。忽逢桃花林,夹岸数百步,中无杂树,芳草鲜美,落英缤纷。渔人甚异之,复前行,欲穷其林。 林尽水源,便得一山,山有小口,仿佛若有光。便舍船,从口入。初极狭,才通人。复行数十步,豁然开朗。土地平旷,屋舍俨然,有良田、美池、桑竹之属。阡陌交通,鸡犬相闻。其中往来种作,男女衣着,悉如外人。黄发垂髫,并怡然自乐。 见渔人,乃大惊,问所从来。具答之。便要还家,设酒杀鸡作食。村中闻有此人,咸来问讯。自云先世避秦时乱,率妻子邑人来此绝境,不复出焉,遂与外人间隔。问今是何世,乃不知有汉,无论魏晋。此人一一为具言所闻,皆叹惋。余人各复延至其家,皆出酒食。停数日,辞去。此中人语云:“不足为外人道也。”(间隔 一作:隔绝) 既出,得其船,便扶向路,处处志之。及郡下,诣太守,说如此。太守即遣人随其往,寻向所志,遂迷,不复得路。 南阳刘子骥,高尚士也,闻之,欣然规往。未果,寻病终。后遂无问津者。
|
Server : Apache System : Linux srv.rainic.com 4.18.0-553.47.1.el8_10.x86_64 #1 SMP Wed Apr 2 05:45:37 EDT 2025 x86_64 User : rainic ( 1014) PHP Version : 7.4.33 Disable Function : exec,passthru,shell_exec,system Directory : /home/stando/www/wp-content/plugins/wp-analytify/lib/Google/Service/ |
Upload File : |
<?php
/*
* Copyright 2010 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
/**
* Service definition for Gmail (v1).
*
* <p>
* The Gmail REST API.
* </p>
*
* <p>
* For more information about this service, see the API
* <a href="https://developers.google.com/gmail/api/" target="_blank">Documentation</a>
* </p>
*
* @author Google, Inc.
*/
class Analytify_Google_Service_Gmail extends Analytify_Google_Service
{
/** View and manage your mail. */
const MAIL_Analytify_Google_COM = "https://mail.google.com";
/** Manage drafts and send emails. */
const GMAIL_COMPOSE = "https://www.googleapis.com/auth/gmail.compose";
/** View and modify but not delete your email. */
const GMAIL_MODIFY = "https://www.googleapis.com/auth/gmail.modify";
/** View your emails messages and settings. */
const GMAIL_READONLY = "https://www.googleapis.com/auth/gmail.readonly";
public $users_drafts;
public $users_history;
public $users_labels;
public $users_messages;
public $users_messages_attachments;
public $users_threads;
/**
* Constructs the internal representation of the Gmail service.
*
* @param Analytify_Google_Client $client
*/
public function __construct(Analytify_Google_Client $client)
{
parent::__construct($client);
$this->servicePath = 'gmail/v1/users/';
$this->version = 'v1';
$this->serviceName = 'gmail';
$this->users_drafts = new Analytify_Google_Service_Gmail_UsersDrafts_Resource(
$this,
$this->serviceName,
'drafts',
array(
'methods' => array(
'create' => array(
'path' => '{userId}/drafts',
'httpMethod' => 'POST',
'parameters' => array(
'userId' => array(
'location' => 'path',
'type' => 'string',
'required' => true,
),
),
),'delete' => array(
'path' => '{userId}/drafts/{id}',
'httpMethod' => 'DELETE',
'parameters' => array(
'userId' => array(
'location' => 'path',
'type' => 'string',
'required' => true,
),
'id' => array(
'location' => 'path',
'type' => 'string',
'required' => true,
),
),
),'get' => array(
'path' => '{userId}/drafts/{id}',
'httpMethod' => 'GET',
'parameters' => array(
'userId' => array(
'location' => 'path',
'type' => 'string',
'required' => true,
),
'id' => array(
'location' => 'path',
'type' => 'string',
'required' => true,
),
'format' => array(
'location' => 'query',
'type' => 'string',
),
),
),'list' => array(
'path' => '{userId}/drafts',
'httpMethod' => 'GET',
'parameters' => array(
'userId' => array(
'location' => 'path',
'type' => 'string',
'required' => true,
),
'pageToken' => array(
'location' => 'query',
'type' => 'string',
),
'maxResults' => array(
'location' => 'query',
'type' => 'integer',
),
),
),'send' => array(
'path' => '{userId}/drafts/send',
'httpMethod' => 'POST',
'parameters' => array(
'userId' => array(
'location' => 'path',
'type' => 'string',
'required' => true,
),
),
),'update' => array(
'path' => '{userId}/drafts/{id}',
'httpMethod' => 'PUT',
'parameters' => array(
'userId' => array(
'location' => 'path',
'type' => 'string',
'required' => true,
),
'id' => array(
'location' => 'path',
'type' => 'string',
'required' => true,
),
),
),
)
)
);
$this->users_history = new Analytify_Google_Service_Gmail_UsersHistory_Resource(
$this,
$this->serviceName,
'history',
array(
'methods' => array(
'list' => array(
'path' => '{userId}/history',
'httpMethod' => 'GET',
'parameters' => array(
'userId' => array(
'location' => 'path',
'type' => 'string',
'required' => true,
),
'pageToken' => array(
'location' => 'query',
'type' => 'string',
),
'maxResults' => array(
'location' => 'query',
'type' => 'integer',
),
'labelId' => array(
'location' => 'query',
'type' => 'string',
),
'startHistoryId' => array(
'location' => 'query',
'type' => 'string',
),
),
),
)
)
);
$this->users_labels = new Analytify_Google_Service_Gmail_UsersLabels_Resource(
$this,
$this->serviceName,
'labels',
array(
'methods' => array(
'create' => array(
'path' => '{userId}/labels',
'httpMethod' => 'POST',
'parameters' => array(
'userId' => array(
'location' => 'path',
'type' => 'string',
'required' => true,
),
),
),'delete' => array(
'path' => '{userId}/labels/{id}',
'httpMethod' => 'DELETE',
'parameters' => array(
'userId' => array(
'location' => 'path',
'type' => 'string',
'required' => true,
),
'id' => array(
'location' => 'path',
'type' => 'string',
'required' => true,
),
),
),'get' => array(
'path' => '{userId}/labels/{id}',
'httpMethod' => 'GET',
'parameters' => array(
'userId' => array(
'location' => 'path',
'type' => 'string',
'required' => true,
),
'id' => array(
'location' => 'path',
'type' => 'string',
'required' => true,
),
),
),'list' => array(
'path' => '{userId}/labels',
'httpMethod' => 'GET',
'parameters' => array(
'userId' => array(
'location' => 'path',
'type' => 'string',
'required' => true,
),
),
),'patch' => array(
'path' => '{userId}/labels/{id}',
'httpMethod' => 'PATCH',
'parameters' => array(
'userId' => array(
'location' => 'path',
'type' => 'string',
'required' => true,
),
'id' => array(
'location' => 'path',
'type' => 'string',
'required' => true,
),
),
),'update' => array(
'path' => '{userId}/labels/{id}',
'httpMethod' => 'PUT',
'parameters' => array(
'userId' => array(
'location' => 'path',
'type' => 'string',
'required' => true,
),
'id' => array(
'location' => 'path',
'type' => 'string',
'required' => true,
),
),
),
)
)
);
$this->users_messages = new Analytify_Google_Service_Gmail_UsersMessages_Resource(
$this,
$this->serviceName,
'messages',
array(
'methods' => array(
'delete' => array(
'path' => '{userId}/messages/{id}',
'httpMethod' => 'DELETE',
'parameters' => array(
'userId' => array(
'location' => 'path',
'type' => 'string',
'required' => true,
),
'id' => array(
'location' => 'path',
'type' => 'string',
'required' => true,
),
),
),'get' => array(
'path' => '{userId}/messages/{id}',
'httpMethod' => 'GET',
'parameters' => array(
'userId' => array(
'location' => 'path',
'type' => 'string',
'required' => true,
),
'id' => array(
'location' => 'path',
'type' => 'string',
'required' => true,
),
'format' => array(
'location' => 'query',
'type' => 'string',
),
),
),'import' => array(
'path' => '{userId}/messages/import',
'httpMethod' => 'POST',
'parameters' => array(
'userId' => array(
'location' => 'path',
'type' => 'string',
'required' => true,
),
),
),'insert' => array(
'path' => '{userId}/messages',
'httpMethod' => 'POST',
'parameters' => array(
'userId' => array(
'location' => 'path',
'type' => 'string',
'required' => true,
),
),
),'list' => array(
'path' => '{userId}/messages',
'httpMethod' => 'GET',
'parameters' => array(
'userId' => array(
'location' => 'path',
'type' => 'string',
'required' => true,
),
'maxResults' => array(
'location' => 'query',
'type' => 'integer',
),
'q' => array(
'location' => 'query',
'type' => 'string',
),
'pageToken' => array(
'location' => 'query',
'type' => 'string',
),
'includeSpamTrash' => array(
'location' => 'query',
'type' => 'boolean',
),
'labelIds' => array(
'location' => 'query',
'type' => 'string',
'repeated' => true,
),
),
),'modify' => array(
'path' => '{userId}/messages/{id}/modify',
'httpMethod' => 'POST',
'parameters' => array(
'userId' => array(
'location' => 'path',
'type' => 'string',
'required' => true,
),
'id' => array(
'location' => 'path',
'type' => 'string',
'required' => true,
),
),
),'send' => array(
'path' => '{userId}/messages/send',
'httpMethod' => 'POST',
'parameters' => array(
'userId' => array(
'location' => 'path',
'type' => 'string',
'required' => true,
),
),
),'trash' => array(
'path' => '{userId}/messages/{id}/trash',
'httpMethod' => 'POST',
'parameters' => array(
'userId' => array(
'location' => 'path',
'type' => 'string',
'required' => true,
),
'id' => array(
'location' => 'path',
'type' => 'string',
'required' => true,
),
),
),'untrash' => array(
'path' => '{userId}/messages/{id}/untrash',
'httpMethod' => 'POST',
'parameters' => array(
'userId' => array(
'location' => 'path',
'type' => 'string',
'required' => true,
),
'id' => array(
'location' => 'path',
'type' => 'string',
'required' => true,
),
),
),
)
)
);
$this->users_messages_attachments = new Analytify_Google_Service_Gmail_UsersMessagesAttachments_Resource(
$this,
$this->serviceName,
'attachments',
array(
'methods' => array(
'get' => array(
'path' => '{userId}/messages/{messageId}/attachments/{id}',
'httpMethod' => 'GET',
'parameters' => array(
'userId' => array(
'location' => 'path',
'type' => 'string',
'required' => true,
),
'messageId' => array(
'location' => 'path',
'type' => 'string',
'required' => true,
),
'id' => array(
'location' => 'path',
'type' => 'string',
'required' => true,
),
),
),
)
)
);
$this->users_threads = new Analytify_Google_Service_Gmail_UsersThreads_Resource(
$this,
$this->serviceName,
'threads',
array(
'methods' => array(
'delete' => array(
'path' => '{userId}/threads/{id}',
'httpMethod' => 'DELETE',
'parameters' => array(
'userId' => array(
'location' => 'path',
'type' => 'string',
'required' => true,
),
'id' => array(
'location' => 'path',
'type' => 'string',
'required' => true,
),
),
),'get' => array(
'path' => '{userId}/threads/{id}',
'httpMethod' => 'GET',
'parameters' => array(
'userId' => array(
'location' => 'path',
'type' => 'string',
'required' => true,
),
'id' => array(
'location' => 'path',
'type' => 'string',
'required' => true,
),
),
),'list' => array(
'path' => '{userId}/threads',
'httpMethod' => 'GET',
'parameters' => array(
'userId' => array(
'location' => 'path',
'type' => 'string',
'required' => true,
),
'maxResults' => array(
'location' => 'query',
'type' => 'integer',
),
'q' => array(
'location' => 'query',
'type' => 'string',
),
'pageToken' => array(
'location' => 'query',
'type' => 'string',
),
'includeSpamTrash' => array(
'location' => 'query',
'type' => 'boolean',
),
'labelIds' => array(
'location' => 'query',
'type' => 'string',
'repeated' => true,
),
),
),'modify' => array(
'path' => '{userId}/threads/{id}/modify',
'httpMethod' => 'POST',
'parameters' => array(
'userId' => array(
'location' => 'path',
'type' => 'string',
'required' => true,
),
'id' => array(
'location' => 'path',
'type' => 'string',
'required' => true,
),
),
),'trash' => array(
'path' => '{userId}/threads/{id}/trash',
'httpMethod' => 'POST',
'parameters' => array(
'userId' => array(
'location' => 'path',
'type' => 'string',
'required' => true,
),
'id' => array(
'location' => 'path',
'type' => 'string',
'required' => true,
),
),
),'untrash' => array(
'path' => '{userId}/threads/{id}/untrash',
'httpMethod' => 'POST',
'parameters' => array(
'userId' => array(
'location' => 'path',
'type' => 'string',
'required' => true,
),
'id' => array(
'location' => 'path',
'type' => 'string',
'required' => true,
),
),
),
)
)
);
}
}
/**
* The "users" collection of methods.
* Typical usage is:
* <code>
* $gmailService = new Analytify_Google_Service_Gmail(...);
* $users = $gmailService->users;
* </code>
*/
class Analytify_Google_Service_Gmail_Users_Resource extends Analytify_Google_Service_Resource
{
}
/**
* The "drafts" collection of methods.
* Typical usage is:
* <code>
* $gmailService = new Analytify_Google_Service_Gmail(...);
* $drafts = $gmailService->drafts;
* </code>
*/
class Analytify_Google_Service_Gmail_UsersDrafts_Resource extends Analytify_Google_Service_Resource
{
/**
* Creates a new draft with the DRAFT label. (drafts.create)
*
* @param string $userId
* The user's email address. The special value me can be used to indicate the authenticated user.
* @param Analytify_Google_Draft $postBody
* @param array $optParams Optional parameters.
* @return Analytify_Google_Service_Gmail_Draft
*/
public function create($userId, Analytify_Google_Service_Gmail_Draft $postBody, $optParams = array())
{
$params = array('userId' => $userId, 'postBody' => $postBody);
$params = array_merge($params, $optParams);
return $this->call('create', array($params), "Analytify_Google_Service_Gmail_Draft");
}
/**
* Immediately and permanently deletes the specified draft. Does not simply
* trash it. (drafts.delete)
*
* @param string $userId
* The user's email address. The special value me can be used to indicate the authenticated user.
* @param string $id
* The ID of the draft to delete.
* @param array $optParams Optional parameters.
*/
public function delete($userId, $id, $optParams = array())
{
$params = array('userId' => $userId, 'id' => $id);
$params = array_merge($params, $optParams);
return $this->call('delete', array($params));
}
/**
* Gets the specified draft. (drafts.get)
*
* @param string $userId
* The user's email address. The special value me can be used to indicate the authenticated user.
* @param string $id
* The ID of the draft to retrieve.
* @param array $optParams Optional parameters.
*
* @opt_param string format
* The format to return the draft in.
* @return Analytify_Google_Service_Gmail_Draft
*/
public function get($userId, $id, $optParams = array())
{
$params = array('userId' => $userId, 'id' => $id);
$params = array_merge($params, $optParams);
return $this->call('get', array($params), "Analytify_Google_Service_Gmail_Draft");
}
/**
* Lists the drafts in the user's mailbox. (drafts.listUsersDrafts)
*
* @param string $userId
* The user's email address. The special value me can be used to indicate the authenticated user.
* @param array $optParams Optional parameters.
*
* @opt_param string pageToken
* Page token to retrieve a specific page of results in the list.
* @opt_param string maxResults
* Maximum number of drafts to return.
* @return Analytify_Google_Service_Gmail_ListDraftsResponse
*/
public function listUsersDrafts($userId, $optParams = array())
{
$params = array('userId' => $userId);
$params = array_merge($params, $optParams);
return $this->call('list', array($params), "Analytify_Google_Service_Gmail_ListDraftsResponse");
}
/**
* Sends the specified, existing draft to the recipients in the To, Cc, and Bcc
* headers. (drafts.send)
*
* @param string $userId
* The user's email address. The special value me can be used to indicate the authenticated user.
* @param Analytify_Google_Draft $postBody
* @param array $optParams Optional parameters.
* @return Analytify_Google_Service_Gmail_Message
*/
public function send($userId, Analytify_Google_Service_Gmail_Draft $postBody, $optParams = array())
{
$params = array('userId' => $userId, 'postBody' => $postBody);
$params = array_merge($params, $optParams);
return $this->call('send', array($params), "Analytify_Google_Service_Gmail_Message");
}
/**
* Replaces a draft's content. (drafts.update)
*
* @param string $userId
* The user's email address. The special value me can be used to indicate the authenticated user.
* @param string $id
* The ID of the draft to update.
* @param Analytify_Google_Draft $postBody
* @param array $optParams Optional parameters.
* @return Analytify_Google_Service_Gmail_Draft
*/
public function update($userId, $id, Analytify_Google_Service_Gmail_Draft $postBody, $optParams = array())
{
$params = array('userId' => $userId, 'id' => $id, 'postBody' => $postBody);
$params = array_merge($params, $optParams);
return $this->call('update', array($params), "Analytify_Google_Service_Gmail_Draft");
}
}
/**
* The "history" collection of methods.
* Typical usage is:
* <code>
* $gmailService = new Analytify_Google_Service_Gmail(...);
* $history = $gmailService->history;
* </code>
*/
class Analytify_Google_Service_Gmail_UsersHistory_Resource extends Analytify_Google_Service_Resource
{
/**
* Lists the history of all changes to the given mailbox. History results are
* returned in chronological order (increasing historyId).
* (history.listUsersHistory)
*
* @param string $userId
* The user's email address. The special value me can be used to indicate the authenticated user.
* @param array $optParams Optional parameters.
*
* @opt_param string pageToken
* Page token to retrieve a specific page of results in the list.
* @opt_param string maxResults
* The maximum number of history records to return.
* @opt_param string labelId
* Only return messages with a label matching the ID.
* @opt_param string startHistoryId
* 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.
* @return Analytify_Google_Service_Gmail_ListHistoryResponse
*/
public function listUsersHistory($userId, $optParams = array())
{
$params = array('userId' => $userId);
$params = array_merge($params, $optParams);
return $this->call('list', array($params), "Analytify_Google_Service_Gmail_ListHistoryResponse");
}
}
/**
* The "labels" collection of methods.
* Typical usage is:
* <code>
* $gmailService = new Analytify_Google_Service_Gmail(...);
* $labels = $gmailService->labels;
* </code>
*/
class Analytify_Google_Service_Gmail_UsersLabels_Resource extends Analytify_Google_Service_Resource
{
/**
* Creates a new label. (labels.create)
*
* @param string $userId
* The user's email address. The special value me can be used to indicate the authenticated user.
* @param Analytify_Google_Label $postBody
* @param array $optParams Optional parameters.
* @return Analytify_Google_Service_Gmail_Label
*/
public function create($userId, Analytify_Google_Service_Gmail_Label $postBody, $optParams = array())
{
$params = array('userId' => $userId, 'postBody' => $postBody);
$params = array_merge($params, $optParams);
return $this->call('create', array($params), "Analytify_Google_Service_Gmail_Label");
}
/**
* Immediately and permanently deletes the specified label and removes it from
* any messages and threads that it is applied to. (labels.delete)
*
* @param string $userId
* The user's email address. The special value me can be used to indicate the authenticated user.
* @param string $id
* The ID of the label to delete.
* @param array $optParams Optional parameters.
*/
public function delete($userId, $id, $optParams = array())
{
$params = array('userId' => $userId, 'id' => $id);
$params = array_merge($params, $optParams);
return $this->call('delete', array($params));
}
/**
* Gets the specified label. (labels.get)
*
* @param string $userId
* The user's email address. The special value me can be used to indicate the authenticated user.
* @param string $id
* The ID of the label to retrieve.
* @param array $optParams Optional parameters.
* @return Analytify_Google_Service_Gmail_Label
*/
public function get($userId, $id, $optParams = array())
{
$params = array('userId' => $userId, 'id' => $id);
$params = array_merge($params, $optParams);
return $this->call('get', array($params), "Analytify_Google_Service_Gmail_Label");
}
/**
* Lists all labels in the user's mailbox. (labels.listUsersLabels)
*
* @param string $userId
* The user's email address. The special value me can be used to indicate the authenticated user.
* @param array $optParams Optional parameters.
* @return Analytify_Google_Service_Gmail_ListLabelsResponse
*/
public function listUsersLabels($userId, $optParams = array())
{
$params = array('userId' => $userId);
$params = array_merge($params, $optParams);
return $this->call('list', array($params), "Analytify_Google_Service_Gmail_ListLabelsResponse");
}
/**
* Updates the specified label. This method supports patch semantics.
* (labels.patch)
*
* @param string $userId
* The user's email address. The special value me can be used to indicate the authenticated user.
* @param string $id
* The ID of the label to update.
* @param Analytify_Google_Label $postBody
* @param array $optParams Optional parameters.
* @return Analytify_Google_Service_Gmail_Label
*/
public function patch($userId, $id, Analytify_Google_Service_Gmail_Label $postBody, $optParams = array())
{
$params = array('userId' => $userId, 'id' => $id, 'postBody' => $postBody);
$params = array_merge($params, $optParams);
return $this->call('patch', array($params), "Analytify_Google_Service_Gmail_Label");
}
/**
* Updates the specified label. (labels.update)
*
* @param string $userId
* The user's email address. The special value me can be used to indicate the authenticated user.
* @param string $id
* The ID of the label to update.
* @param Analytify_Google_Label $postBody
* @param array $optParams Optional parameters.
* @return Analytify_Google_Service_Gmail_Label
*/
public function update($userId, $id, Analytify_Google_Service_Gmail_Label $postBody, $optParams = array())
{
$params = array('userId' => $userId, 'id' => $id, 'postBody' => $postBody);
$params = array_merge($params, $optParams);
return $this->call('update', array($params), "Analytify_Google_Service_Gmail_Label");
}
}
/**
* The "messages" collection of methods.
* Typical usage is:
* <code>
* $gmailService = new Analytify_Google_Service_Gmail(...);
* $messages = $gmailService->messages;
* </code>
*/
class Analytify_Google_Service_Gmail_UsersMessages_Resource extends Analytify_Google_Service_Resource
{
/**
* Immediately and permanently deletes the specified message. This operation
* cannot be undone. Prefer messages.trash instead. (messages.delete)
*
* @param string $userId
* The user's email address. The special value me can be used to indicate the authenticated user.
* @param string $id
* The ID of the message to delete.
* @param array $optParams Optional parameters.
*/
public function delete($userId, $id, $optParams = array())
{
$params = array('userId' => $userId, 'id' => $id);
$params = array_merge($params, $optParams);
return $this->call('delete', array($params));
}
/**
* Gets the specified message. (messages.get)
*
* @param string $userId
* The user's email address. The special value me can be used to indicate the authenticated user.
* @param string $id
* The ID of the message to retrieve.
* @param array $optParams Optional parameters.
*
* @opt_param string format
* The format to return the message in.
* @return Analytify_Google_Service_Gmail_Message
*/
public function get($userId, $id, $optParams = array())
{
$params = array('userId' => $userId, 'id' => $id);
$params = array_merge($params, $optParams);
return $this->call('get', array($params), "Analytify_Google_Service_Gmail_Message");
}
/**
* Directly imports a message into only this user's mailbox, similar to
* receiving via SMTP. Does not send a message. (messages.import)
*
* @param string $userId
* The user's email address. The special value me can be used to indicate the authenticated user.
* @param Analytify_Google_Message $postBody
* @param array $optParams Optional parameters.
* @return Analytify_Google_Service_Gmail_Message
*/
public function import($userId, Analytify_Google_Service_Gmail_Message $postBody, $optParams = array())
{
$params = array('userId' => $userId, 'postBody' => $postBody);
$params = array_merge($params, $optParams);
return $this->call('import', array($params), "Analytify_Google_Service_Gmail_Message");
}
/**
* Directly inserts a message into only this user's mailbox. Does not send a
* message. (messages.insert)
*
* @param string $userId
* The user's email address. The special value me can be used to indicate the authenticated user.
* @param Analytify_Google_Message $postBody
* @param array $optParams Optional parameters.
* @return Analytify_Google_Service_Gmail_Message
*/
public function insert($userId, Analytify_Google_Service_Gmail_Message $postBody, $optParams = array())
{
$params = array('userId' => $userId, 'postBody' => $postBody);
$params = array_merge($params, $optParams);
return $this->call('insert', array($params), "Analytify_Google_Service_Gmail_Message");
}
/**
* Lists the messages in the user's mailbox. (messages.listUsersMessages)
*
* @param string $userId
* The user's email address. The special value me can be used to indicate the authenticated user.
* @param array $optParams Optional parameters.
*
* @opt_param string maxResults
* Maximum number of messages to return.
* @opt_param string q
* Only return messages matching the specified query. Supports the same query format as the Gmail
* search box. For example, "from:someuser@example.com rfc822msgid: is:unread".
* @opt_param string pageToken
* Page token to retrieve a specific page of results in the list.
* @opt_param bool includeSpamTrash
* Include messages from SPAM and TRASH in the results.
* @opt_param string labelIds
* Only return messages with labels that match all of the specified label IDs.
* @return Analytify_Google_Service_Gmail_ListMessagesResponse
*/
public function listUsersMessages($userId, $optParams = array())
{
$params = array('userId' => $userId);
$params = array_merge($params, $optParams);
return $this->call('list', array($params), "Analytify_Google_Service_Gmail_ListMessagesResponse");
}
/**
* Modifies the labels on the specified message. (messages.modify)
*
* @param string $userId
* The user's email address. The special value me can be used to indicate the authenticated user.
* @param string $id
* The ID of the message to modify.
* @param Analytify_Google_ModifyMessageRequest $postBody
* @param array $optParams Optional parameters.
* @return Analytify_Google_Service_Gmail_Message
*/
public function modify($userId, $id, Analytify_Google_Service_Gmail_ModifyMessageRequest $postBody, $optParams = array())
{
$params = array('userId' => $userId, 'id' => $id, 'postBody' => $postBody);
$params = array_merge($params, $optParams);
return $this->call('modify', array($params), "Analytify_Google_Service_Gmail_Message");
}
/**
* Sends the specified message to the recipients in the To, Cc, and Bcc headers.
* (messages.send)
*
* @param string $userId
* The user's email address. The special value me can be used to indicate the authenticated user.
* @param Analytify_Google_Message $postBody
* @param array $optParams Optional parameters.
* @return Analytify_Google_Service_Gmail_Message
*/
public function send($userId, Analytify_Google_Service_Gmail_Message $postBody, $optParams = array())
{
$params = array('userId' => $userId, 'postBody' => $postBody);
$params = array_merge($params, $optParams);
return $this->call('send', array($params), "Analytify_Google_Service_Gmail_Message");
}
/**
* Moves the specified message to the trash. (messages.trash)
*
* @param string $userId
* The user's email address. The special value me can be used to indicate the authenticated user.
* @param string $id
* The ID of the message to Trash.
* @param array $optParams Optional parameters.
* @return Analytify_Google_Service_Gmail_Message
*/
public function trash($userId, $id, $optParams = array())
{
$params = array('userId' => $userId, 'id' => $id);
$params = array_merge($params, $optParams);
return $this->call('trash', array($params), "Analytify_Google_Service_Gmail_Message");
}
/**
* Removes the specified message from the trash. (messages.untrash)
*
* @param string $userId
* The user's email address. The special value me can be used to indicate the authenticated user.
* @param string $id
* The ID of the message to remove from Trash.
* @param array $optParams Optional parameters.
* @return Analytify_Google_Service_Gmail_Message
*/
public function untrash($userId, $id, $optParams = array())
{
$params = array('userId' => $userId, 'id' => $id);
$params = array_merge($params, $optParams);
return $this->call('untrash', array($params), "Analytify_Google_Service_Gmail_Message");
}
}
/**
* The "attachments" collection of methods.
* Typical usage is:
* <code>
* $gmailService = new Analytify_Google_Service_Gmail(...);
* $attachments = $gmailService->attachments;
* </code>
*/
class Analytify_Google_Service_Gmail_UsersMessagesAttachments_Resource extends Analytify_Google_Service_Resource
{
/**
* Gets the specified message attachment. (attachments.get)
*
* @param string $userId
* The user's email address. The special value me can be used to indicate the authenticated user.
* @param string $messageId
* The ID of the message containing the attachment.
* @param string $id
* The ID of the attachment.
* @param array $optParams Optional parameters.
* @return Analytify_Google_Service_Gmail_MessagePartBody
*/
public function get($userId, $messageId, $id, $optParams = array())
{
$params = array('userId' => $userId, 'messageId' => $messageId, 'id' => $id);
$params = array_merge($params, $optParams);
return $this->call('get', array($params), "Analytify_Google_Service_Gmail_MessagePartBody");
}
}
/**
* The "threads" collection of methods.
* Typical usage is:
* <code>
* $gmailService = new Analytify_Google_Service_Gmail(...);
* $threads = $gmailService->threads;
* </code>
*/
class Analytify_Google_Service_Gmail_UsersThreads_Resource extends Analytify_Google_Service_Resource
{
/**
* Immediately and permanently deletes the specified thread. This operation
* cannot be undone. Prefer threads.trash instead. (threads.delete)
*
* @param string $userId
* The user's email address. The special value me can be used to indicate the authenticated user.
* @param string $id
* ID of the Thread to delete.
* @param array $optParams Optional parameters.
*/
public function delete($userId, $id, $optParams = array())
{
$params = array('userId' => $userId, 'id' => $id);
$params = array_merge($params, $optParams);
return $this->call('delete', array($params));
}
/**
* Gets the specified thread. (threads.get)
*
* @param string $userId
* The user's email address. The special value me can be used to indicate the authenticated user.
* @param string $id
* The ID of the thread to retrieve.
* @param array $optParams Optional parameters.
* @return Analytify_Google_Service_Gmail_Thread
*/
public function get($userId, $id, $optParams = array())
{
$params = array('userId' => $userId, 'id' => $id);
$params = array_merge($params, $optParams);
return $this->call('get', array($params), "Analytify_Google_Service_Gmail_Thread");
}
/**
* Lists the threads in the user's mailbox. (threads.listUsersThreads)
*
* @param string $userId
* The user's email address. The special value me can be used to indicate the authenticated user.
* @param array $optParams Optional parameters.
*
* @opt_param string maxResults
* Maximum number of threads to return.
* @opt_param string q
* Only return threads matching the specified query. Supports the same query format as the Gmail
* search box. For example, "from:someuser@example.com rfc822msgid: is:unread".
* @opt_param string pageToken
* Page token to retrieve a specific page of results in the list.
* @opt_param bool includeSpamTrash
* Include threads from SPAM and TRASH in the results.
* @opt_param string labelIds
* Only return threads with labels that match all of the specified label IDs.
* @return Analytify_Google_Service_Gmail_ListThreadsResponse
*/
public function listUsersThreads($userId, $optParams = array())
{
$params = array('userId' => $userId);
$params = array_merge($params, $optParams);
return $this->call('list', array($params), "Analytify_Google_Service_Gmail_ListThreadsResponse");
}
/**
* Modifies the labels applied to the thread. This applies to all messages in
* the thread. (threads.modify)
*
* @param string $userId
* The user's email address. The special value me can be used to indicate the authenticated user.
* @param string $id
* The ID of the thread to modify.
* @param Analytify_Google_ModifyThreadRequest $postBody
* @param array $optParams Optional parameters.
* @return Analytify_Google_Service_Gmail_Thread
*/
public function modify($userId, $id, Analytify_Google_Service_Gmail_ModifyThreadRequest $postBody, $optParams = array())
{
$params = array('userId' => $userId, 'id' => $id, 'postBody' => $postBody);
$params = array_merge($params, $optParams);
return $this->call('modify', array($params), "Analytify_Google_Service_Gmail_Thread");
}
/**
* Moves the specified thread to the trash. (threads.trash)
*
* @param string $userId
* The user's email address. The special value me can be used to indicate the authenticated user.
* @param string $id
* The ID of the thread to Trash.
* @param array $optParams Optional parameters.
* @return Analytify_Google_Service_Gmail_Thread
*/
public function trash($userId, $id, $optParams = array())
{
$params = array('userId' => $userId, 'id' => $id);
$params = array_merge($params, $optParams);
return $this->call('trash', array($params), "Analytify_Google_Service_Gmail_Thread");
}
/**
* Removes the specified thread from the trash. (threads.untrash)
*
* @param string $userId
* The user's email address. The special value me can be used to indicate the authenticated user.
* @param string $id
* The ID of the thread to remove from Trash.
* @param array $optParams Optional parameters.
* @return Analytify_Google_Service_Gmail_Thread
*/
public function untrash($userId, $id, $optParams = array())
{
$params = array('userId' => $userId, 'id' => $id);
$params = array_merge($params, $optParams);
return $this->call('untrash', array($params), "Analytify_Google_Service_Gmail_Thread");
}
}
class Analytify_Google_Service_Gmail_Draft extends Analytify_Google_Model
{
public $id;
protected $messageType = 'Analytify_Google_Service_Gmail_Message';
protected $messageDataType = '';
public function setId($id)
{
$this->id = $id;
}
public function getId()
{
return $this->id;
}
public function setMessage(Analytify_Google_Service_Gmail_Message $message)
{
$this->message = $message;
}
public function getMessage()
{
return $this->message;
}
}
class Analytify_Google_Service_Gmail_History extends Analytify_Google_Collection
{
public $id;
protected $messagesType = 'Analytify_Google_Service_Gmail_Message';
protected $messagesDataType = 'array';
public function setId($id)
{
$this->id = $id;
}
public function getId()
{
return $this->id;
}
public function setMessages($messages)
{
$this->messages = $messages;
}
public function getMessages()
{
return $this->messages;
}
}
class Analytify_Google_Service_Gmail_Label extends Analytify_Google_Model
{
public $id;
public $labelListVisibility;
public $messageListVisibility;
public $name;
public $type;
public function setId($id)
{
$this->id = $id;
}
public function getId()
{
return $this->id;
}
public function setLabelListVisibility($labelListVisibility)
{
$this->labelListVisibility = $labelListVisibility;
}
public function getLabelListVisibility()
{
return $this->labelListVisibility;
}
public function setMessageListVisibility($messageListVisibility)
{
$this->messageListVisibility = $messageListVisibility;
}
public function getMessageListVisibility()
{
return $this->messageListVisibility;
}
public function setName($name)
{
$this->name = $name;
}
public function getName()
{
return $this->name;
}
public function setType($type)
{
$this->type = $type;
}
public function getType()
{
return $this->type;
}
}
class Analytify_Google_Service_Gmail_ListDraftsResponse extends Analytify_Google_Collection
{
protected $draftsType = 'Analytify_Google_Service_Gmail_Draft';
protected $draftsDataType = 'array';
public $nextPageToken;
public $resultSizeEstimate;
public function setDrafts($drafts)
{
$this->drafts = $drafts;
}
public function getDrafts()
{
return $this->drafts;
}
public function setNextPageToken($nextPageToken)
{
$this->nextPageToken = $nextPageToken;
}
public function getNextPageToken()
{
return $this->nextPageToken;
}
public function setResultSizeEstimate($resultSizeEstimate)
{
$this->resultSizeEstimate = $resultSizeEstimate;
}
public function getResultSizeEstimate()
{
return $this->resultSizeEstimate;
}
}
class Analytify_Google_Service_Gmail_ListHistoryResponse extends Analytify_Google_Collection
{
protected $historyType = 'Analytify_Google_Service_Gmail_History';
protected $historyDataType = 'array';
public $historyId;
public $nextPageToken;
public function setHistory($history)
{
$this->history = $history;
}
public function getHistory()
{
return $this->history;
}
public function setHistoryId($historyId)
{
$this->historyId = $historyId;
}
public function getHistoryId()
{
return $this->historyId;
}
public function setNextPageToken($nextPageToken)
{
$this->nextPageToken = $nextPageToken;
}
public function getNextPageToken()
{
return $this->nextPageToken;
}
}
class Analytify_Google_Service_Gmail_ListLabelsResponse extends Analytify_Google_Collection
{
protected $labelsType = 'Analytify_Google_Service_Gmail_Label';
protected $labelsDataType = 'array';
public function setLabels($labels)
{
$this->labels = $labels;
}
public function getLabels()
{
return $this->labels;
}
}
class Analytify_Google_Service_Gmail_ListMessagesResponse extends Analytify_Google_Collection
{
protected $messagesType = 'Analytify_Google_Service_Gmail_Message';
protected $messagesDataType = 'array';
public $nextPageToken;
public $resultSizeEstimate;
public function setMessages($messages)
{
$this->messages = $messages;
}
public function getMessages()
{
return $this->messages;
}
public function setNextPageToken($nextPageToken)
{
$this->nextPageToken = $nextPageToken;
}
public function getNextPageToken()
{
return $this->nextPageToken;
}
public function setResultSizeEstimate($resultSizeEstimate)
{
$this->resultSizeEstimate = $resultSizeEstimate;
}
public function getResultSizeEstimate()
{
return $this->resultSizeEstimate;
}
}
class Analytify_Google_Service_Gmail_ListThreadsResponse extends Analytify_Google_Collection
{
public $nextPageToken;
public $resultSizeEstimate;
protected $threadsType = 'Analytify_Google_Service_Gmail_Thread';
protected $threadsDataType = 'array';
public function setNextPageToken($nextPageToken)
{
$this->nextPageToken = $nextPageToken;
}
public function getNextPageToken()
{
return $this->nextPageToken;
}
public function setResultSizeEstimate($resultSizeEstimate)
{
$this->resultSizeEstimate = $resultSizeEstimate;
}
public function getResultSizeEstimate()
{
return $this->resultSizeEstimate;
}
public function setThreads($threads)
{
$this->threads = $threads;
}
public function getThreads()
{
return $this->threads;
}
}
class Analytify_Google_Service_Gmail_Message extends Analytify_Google_Collection
{
public $historyId;
public $id;
public $labelIds;
protected $payloadType = 'Analytify_Google_Service_Gmail_MessagePart';
protected $payloadDataType = '';
public $raw;
public $sizeEstimate;
public $snippet;
public $threadId;
public function setHistoryId($historyId)
{
$this->historyId = $historyId;
}
public function getHistoryId()
{
return $this->historyId;
}
public function setId($id)
{
$this->id = $id;
}
public function getId()
{
return $this->id;
}
public function setLabelIds($labelIds)
{
$this->labelIds = $labelIds;
}
public function getLabelIds()
{
return $this->labelIds;
}
public function setPayload(Analytify_Google_Service_Gmail_MessagePart $payload)
{
$this->payload = $payload;
}
public function getPayload()
{
return $this->payload;
}
public function setRaw($raw)
{
$this->raw = $raw;
}
public function getRaw()
{
return $this->raw;
}
public function setSizeEstimate($sizeEstimate)
{
$this->sizeEstimate = $sizeEstimate;
}
public function getSizeEstimate()
{
return $this->sizeEstimate;
}
public function setSnippet($snippet)
{
$this->snippet = $snippet;
}
public function getSnippet()
{
return $this->snippet;
}
public function setThreadId($threadId)
{
$this->threadId = $threadId;
}
public function getThreadId()
{
return $this->threadId;
}
}
class Analytify_Google_Service_Gmail_MessagePart extends Analytify_Google_Collection
{
protected $bodyType = 'Analytify_Google_Service_Gmail_MessagePartBody';
protected $bodyDataType = '';
public $filename;
protected $headersType = 'Analytify_Google_Service_Gmail_MessagePartHeader';
protected $headersDataType = 'array';
public $mimeType;
public $partId;
protected $partsType = 'Analytify_Google_Service_Gmail_MessagePart';
protected $partsDataType = 'array';
public function setBody(Analytify_Google_Service_Gmail_MessagePartBody $body)
{
$this->body = $body;
}
public function getBody()
{
return $this->body;
}
public function setFilename($filename)
{
$this->filename = $filename;
}
public function getFilename()
{
return $this->filename;
}
public function setHeaders($headers)
{
$this->headers = $headers;
}
public function getHeaders()
{
return $this->headers;
}
public function setMimeType($mimeType)
{
$this->mimeType = $mimeType;
}
public function getMimeType()
{
return $this->mimeType;
}
public function setPartId($partId)
{
$this->partId = $partId;
}
public function getPartId()
{
return $this->partId;
}
public function setParts($parts)
{
$this->parts = $parts;
}
public function getParts()
{
return $this->parts;
}
}
class Analytify_Google_Service_Gmail_MessagePartBody extends Analytify_Google_Model
{
public $attachmentId;
public $data;
public $size;
public function setAttachmentId($attachmentId)
{
$this->attachmentId = $attachmentId;
}
public function getAttachmentId()
{
return $this->attachmentId;
}
public function setData($data)
{
$this->data = $data;
}
public function getData()
{
return $this->data;
}
public function setSize($size)
{
$this->size = $size;
}
public function getSize()
{
return $this->size;
}
}
class Analytify_Google_Service_Gmail_MessagePartHeader extends Analytify_Google_Model
{
public $name;
public $value;
public function setName($name)
{
$this->name = $name;
}
public function getName()
{
return $this->name;
}
public function setValue($value)
{
$this->value = $value;
}
public function getValue()
{
return $this->value;
}
}
class Analytify_Google_Service_Gmail_ModifyMessageRequest extends Analytify_Google_Collection
{
public $addLabelIds;
public $removeLabelIds;
public function setAddLabelIds($addLabelIds)
{
$this->addLabelIds = $addLabelIds;
}
public function getAddLabelIds()
{
return $this->addLabelIds;
}
public function setRemoveLabelIds($removeLabelIds)
{
$this->removeLabelIds = $removeLabelIds;
}
public function getRemoveLabelIds()
{
return $this->removeLabelIds;
}
}
class Analytify_Google_Service_Gmail_ModifyThreadRequest extends Analytify_Google_Collection
{
public $addLabelIds;
public $removeLabelIds;
public function setAddLabelIds($addLabelIds)
{
$this->addLabelIds = $addLabelIds;
}
public function getAddLabelIds()
{
return $this->addLabelIds;
}
public function setRemoveLabelIds($removeLabelIds)
{
$this->removeLabelIds = $removeLabelIds;
}
public function getRemoveLabelIds()
{
return $this->removeLabelIds;
}
}
class Analytify_Google_Service_Gmail_Thread extends Analytify_Google_Collection
{
public $historyId;
public $id;
protected $messagesType = 'Analytify_Google_Service_Gmail_Message';
protected $messagesDataType = 'array';
public $snippet;
public function setHistoryId($historyId)
{
$this->historyId = $historyId;
}
public function getHistoryId()
{
return $this->historyId;
}
public function setId($id)
{
$this->id = $id;
}
public function getId()
{
return $this->id;
}
public function setMessages($messages)
{
$this->messages = $messages;
}
public function getMessages()
{
return $this->messages;
}
public function setSnippet($snippet)
{
$this->snippet = $snippet;
}
public function getSnippet()
{
return $this->snippet;
}
}