# swagger-client
The Gmail API lets you view and manage Gmail mailbox data like threads, messages, and labels.

This Python package is automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project:

- API version: v1
- Package version: 1.0.0
- Build package: io.swagger.codegen.v3.generators.python.PythonClientCodegen
For more information, please visit [https://google.com](https://google.com)

## Requirements.

Python 2.7 and 3.4+

## Installation & Usage
### pip install

If the python package is hosted on Github, you can install directly from Github

```sh
pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git
```
(you may need to run `pip` with root permission: `sudo pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git`)

Then import the package:
```python
import swagger_client 
```

### Setuptools

Install via [Setuptools](http://pypi.python.org/pypi/setuptools).

```sh
python setup.py install --user
```
(or `sudo python setup.py install` to install the package for all users)

Then import the package:
```python
import swagger_client
```

## Getting Started

Please follow the [installation procedure](#installation--usage) and then run the following:

```python
from __future__ import print_function
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: Oauth2
configuration = swagger_client.Configuration()
configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: Oauth2c
configuration = swagger_client.Configuration()
configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.UsersApi(swagger_client.ApiClient(configuration))
user_id = 'user_id_example' # str | The user's email address. The special value `me` can be used to indicate the authenticated user.
body = swagger_client.Draft() # Draft |  (optional)
xgafv = 'xgafv_example' # str | V1 error format. (optional)
access_token = 'access_token_example' # str | OAuth access token. (optional)
alt = 'alt_example' # str | Data format for response. (optional)
param_callback = 'param_callback_example' # str | JSONP (optional)
fields = 'fields_example' # str | Selector specifying which fields to include in a partial response. (optional)
key = 'key_example' # str | 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. (optional)
oauth_token = 'oauth_token_example' # str | OAuth 2.0 token for the current user. (optional)
pretty_print = true # bool | Returns response with indentations and line breaks. (optional)
quota_user = 'quota_user_example' # str | 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. (optional)
upload_protocol = 'upload_protocol_example' # str | Upload protocol for media (e.g. \"raw\", \"multipart\"). (optional)
upload_type = 'upload_type_example' # str | Legacy upload protocol for media (e.g. \"media\", \"multipart\"). (optional)

try:
    # Create a new email draft
    api_response = api_instance.gmail_users_drafts_create(user_id, body=body, xgafv=xgafv, access_token=access_token, alt=alt, param_callback=param_callback, fields=fields, key=key, oauth_token=oauth_token, pretty_print=pretty_print, quota_user=quota_user, upload_protocol=upload_protocol, upload_type=upload_type)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling UsersApi->gmail_users_drafts_create: %s\n" % e)

# Configure OAuth2 access token for authorization: Oauth2
configuration = swagger_client.Configuration()
configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: Oauth2c
configuration = swagger_client.Configuration()
configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.UsersApi(swagger_client.ApiClient(configuration))
user_id = 'user_id_example' # str | The user's email address. The special value `me` can be used to indicate the authenticated user.
id = 'id_example' # str | The ID of the draft to delete.
xgafv = 'xgafv_example' # str | V1 error format. (optional)
access_token = 'access_token_example' # str | OAuth access token. (optional)
alt = 'alt_example' # str | Data format for response. (optional)
param_callback = 'param_callback_example' # str | JSONP (optional)
fields = 'fields_example' # str | Selector specifying which fields to include in a partial response. (optional)
key = 'key_example' # str | 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. (optional)
oauth_token = 'oauth_token_example' # str | OAuth 2.0 token for the current user. (optional)
pretty_print = true # bool | Returns response with indentations and line breaks. (optional)
quota_user = 'quota_user_example' # str | 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. (optional)
upload_protocol = 'upload_protocol_example' # str | Upload protocol for media (e.g. \"raw\", \"multipart\"). (optional)
upload_type = 'upload_type_example' # str | Legacy upload protocol for media (e.g. \"media\", \"multipart\"). (optional)

try:
    # Delete a specific email draft
    api_instance.gmail_users_drafts_delete(user_id, id, xgafv=xgafv, access_token=access_token, alt=alt, param_callback=param_callback, fields=fields, key=key, oauth_token=oauth_token, pretty_print=pretty_print, quota_user=quota_user, upload_protocol=upload_protocol, upload_type=upload_type)
except ApiException as e:
    print("Exception when calling UsersApi->gmail_users_drafts_delete: %s\n" % e)

# Configure OAuth2 access token for authorization: Oauth2
configuration = swagger_client.Configuration()
configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: Oauth2c
configuration = swagger_client.Configuration()
configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.UsersApi(swagger_client.ApiClient(configuration))
user_id = 'user_id_example' # str | The user's email address. The special value `me` can be used to indicate the authenticated user.
id = 'id_example' # str | The ID of the draft to retrieve.
xgafv = 'xgafv_example' # str | V1 error format. (optional)
access_token = 'access_token_example' # str | OAuth access token. (optional)
alt = 'alt_example' # str | Data format for response. (optional)
param_callback = 'param_callback_example' # str | JSONP (optional)
fields = 'fields_example' # str | Selector specifying which fields to include in a partial response. (optional)
key = 'key_example' # str | 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. (optional)
oauth_token = 'oauth_token_example' # str | OAuth 2.0 token for the current user. (optional)
pretty_print = true # bool | Returns response with indentations and line breaks. (optional)
quota_user = 'quota_user_example' # str | 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. (optional)
upload_protocol = 'upload_protocol_example' # str | Upload protocol for media (e.g. \"raw\", \"multipart\"). (optional)
upload_type = 'upload_type_example' # str | Legacy upload protocol for media (e.g. \"media\", \"multipart\"). (optional)
format = 'format_example' # str | The format to return the draft in. (optional)

try:
    # Get details of a draft
    api_response = api_instance.gmail_users_drafts_get(user_id, id, xgafv=xgafv, access_token=access_token, alt=alt, param_callback=param_callback, fields=fields, key=key, oauth_token=oauth_token, pretty_print=pretty_print, quota_user=quota_user, upload_protocol=upload_protocol, upload_type=upload_type, format=format)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling UsersApi->gmail_users_drafts_get: %s\n" % e)

# Configure OAuth2 access token for authorization: Oauth2
configuration = swagger_client.Configuration()
configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: Oauth2c
configuration = swagger_client.Configuration()
configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.UsersApi(swagger_client.ApiClient(configuration))
user_id = 'user_id_example' # str | The user's email address. The special value `me` can be used to indicate the authenticated user.
xgafv = 'xgafv_example' # str | V1 error format. (optional)
access_token = 'access_token_example' # str | OAuth access token. (optional)
alt = 'alt_example' # str | Data format for response. (optional)
param_callback = 'param_callback_example' # str | JSONP (optional)
fields = 'fields_example' # str | Selector specifying which fields to include in a partial response. (optional)
key = 'key_example' # str | 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. (optional)
oauth_token = 'oauth_token_example' # str | OAuth 2.0 token for the current user. (optional)
pretty_print = true # bool | Returns response with indentations and line breaks. (optional)
quota_user = 'quota_user_example' # str | 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. (optional)
upload_protocol = 'upload_protocol_example' # str | Upload protocol for media (e.g. \"raw\", \"multipart\"). (optional)
upload_type = 'upload_type_example' # str | Legacy upload protocol for media (e.g. \"media\", \"multipart\"). (optional)
include_spam_trash = true # bool | Include drafts from `SPAM` and `TRASH` in the results. (optional)
max_results = 56 # int | Maximum number of drafts to return. This field defaults to 100. The maximum allowed value for this field is 500. (optional)
page_token = 'page_token_example' # str | Page token to retrieve a specific page of results in the list. (optional)
q = 'q_example' # str | Only return draft messages matching the specified query. Supports the same query format as the Gmail search box. For example, `\"from:someuser@example.com rfc822msgid: is:unread\"`. (optional)

try:
    # List user's email drafts
    api_response = api_instance.gmail_users_drafts_list(user_id, xgafv=xgafv, access_token=access_token, alt=alt, param_callback=param_callback, fields=fields, key=key, oauth_token=oauth_token, pretty_print=pretty_print, quota_user=quota_user, upload_protocol=upload_protocol, upload_type=upload_type, include_spam_trash=include_spam_trash, max_results=max_results, page_token=page_token, q=q)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling UsersApi->gmail_users_drafts_list: %s\n" % e)

# Configure OAuth2 access token for authorization: Oauth2
configuration = swagger_client.Configuration()
configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: Oauth2c
configuration = swagger_client.Configuration()
configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.UsersApi(swagger_client.ApiClient(configuration))
user_id = 'user_id_example' # str | The user's email address. The special value `me` can be used to indicate the authenticated user.
body = swagger_client.Draft() # Draft |  (optional)
xgafv = 'xgafv_example' # str | V1 error format. (optional)
access_token = 'access_token_example' # str | OAuth access token. (optional)
alt = 'alt_example' # str | Data format for response. (optional)
param_callback = 'param_callback_example' # str | JSONP (optional)
fields = 'fields_example' # str | Selector specifying which fields to include in a partial response. (optional)
key = 'key_example' # str | 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. (optional)
oauth_token = 'oauth_token_example' # str | OAuth 2.0 token for the current user. (optional)
pretty_print = true # bool | Returns response with indentations and line breaks. (optional)
quota_user = 'quota_user_example' # str | 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. (optional)
upload_protocol = 'upload_protocol_example' # str | Upload protocol for media (e.g. \"raw\", \"multipart\"). (optional)
upload_type = 'upload_type_example' # str | Legacy upload protocol for media (e.g. \"media\", \"multipart\"). (optional)

try:
    # Send an existing draft email
    api_response = api_instance.gmail_users_drafts_send(user_id, body=body, xgafv=xgafv, access_token=access_token, alt=alt, param_callback=param_callback, fields=fields, key=key, oauth_token=oauth_token, pretty_print=pretty_print, quota_user=quota_user, upload_protocol=upload_protocol, upload_type=upload_type)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling UsersApi->gmail_users_drafts_send: %s\n" % e)

# Configure OAuth2 access token for authorization: Oauth2
configuration = swagger_client.Configuration()
configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: Oauth2c
configuration = swagger_client.Configuration()
configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.UsersApi(swagger_client.ApiClient(configuration))
user_id = 'user_id_example' # str | The user's email address. The special value `me` can be used to indicate the authenticated user.
id = 'id_example' # str | The ID of the draft to update.
body = swagger_client.Draft() # Draft |  (optional)
xgafv = 'xgafv_example' # str | V1 error format. (optional)
access_token = 'access_token_example' # str | OAuth access token. (optional)
alt = 'alt_example' # str | Data format for response. (optional)
param_callback = 'param_callback_example' # str | JSONP (optional)
fields = 'fields_example' # str | Selector specifying which fields to include in a partial response. (optional)
key = 'key_example' # str | 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. (optional)
oauth_token = 'oauth_token_example' # str | OAuth 2.0 token for the current user. (optional)
pretty_print = true # bool | Returns response with indentations and line breaks. (optional)
quota_user = 'quota_user_example' # str | 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. (optional)
upload_protocol = 'upload_protocol_example' # str | Upload protocol for media (e.g. \"raw\", \"multipart\"). (optional)
upload_type = 'upload_type_example' # str | Legacy upload protocol for media (e.g. \"media\", \"multipart\"). (optional)

try:
    # Update an email draft
    api_response = api_instance.gmail_users_drafts_update(user_id, id, body=body, xgafv=xgafv, access_token=access_token, alt=alt, param_callback=param_callback, fields=fields, key=key, oauth_token=oauth_token, pretty_print=pretty_print, quota_user=quota_user, upload_protocol=upload_protocol, upload_type=upload_type)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling UsersApi->gmail_users_drafts_update: %s\n" % e)

# Configure OAuth2 access token for authorization: Oauth2
configuration = swagger_client.Configuration()
configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: Oauth2c
configuration = swagger_client.Configuration()
configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.UsersApi(swagger_client.ApiClient(configuration))
user_id = 'user_id_example' # str | The user's email address. The special value `me` can be used to indicate the authenticated user.
xgafv = 'xgafv_example' # str | V1 error format. (optional)
access_token = 'access_token_example' # str | OAuth access token. (optional)
alt = 'alt_example' # str | Data format for response. (optional)
param_callback = 'param_callback_example' # str | JSONP (optional)
fields = 'fields_example' # str | Selector specifying which fields to include in a partial response. (optional)
key = 'key_example' # str | 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. (optional)
oauth_token = 'oauth_token_example' # str | OAuth 2.0 token for the current user. (optional)
pretty_print = true # bool | Returns response with indentations and line breaks. (optional)
quota_user = 'quota_user_example' # str | 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. (optional)
upload_protocol = 'upload_protocol_example' # str | Upload protocol for media (e.g. \"raw\", \"multipart\"). (optional)
upload_type = 'upload_type_example' # str | Legacy upload protocol for media (e.g. \"media\", \"multipart\"). (optional)

try:
    # Get user's Gmail profile
    api_response = api_instance.gmail_users_get_profile(user_id, xgafv=xgafv, access_token=access_token, alt=alt, param_callback=param_callback, fields=fields, key=key, oauth_token=oauth_token, pretty_print=pretty_print, quota_user=quota_user, upload_protocol=upload_protocol, upload_type=upload_type)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling UsersApi->gmail_users_get_profile: %s\n" % e)

# Configure OAuth2 access token for authorization: Oauth2
configuration = swagger_client.Configuration()
configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: Oauth2c
configuration = swagger_client.Configuration()
configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.UsersApi(swagger_client.ApiClient(configuration))
user_id = 'user_id_example' # str | The user's email address. The special value `me` can be used to indicate the authenticated user.
start_history_id = 'start_history_id_example' # str | 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.
xgafv = 'xgafv_example' # str | V1 error format. (optional)
access_token = 'access_token_example' # str | OAuth access token. (optional)
alt = 'alt_example' # str | Data format for response. (optional)
param_callback = 'param_callback_example' # str | JSONP (optional)
fields = 'fields_example' # str | Selector specifying which fields to include in a partial response. (optional)
key = 'key_example' # str | 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. (optional)
oauth_token = 'oauth_token_example' # str | OAuth 2.0 token for the current user. (optional)
pretty_print = true # bool | Returns response with indentations and line breaks. (optional)
quota_user = 'quota_user_example' # str | 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. (optional)
upload_protocol = 'upload_protocol_example' # str | Upload protocol for media (e.g. \"raw\", \"multipart\"). (optional)
upload_type = 'upload_type_example' # str | Legacy upload protocol for media (e.g. \"media\", \"multipart\"). (optional)
history_types = ['history_types_example'] # list[str] | History types to be returned by the function (optional)
label_id = 'label_id_example' # str | Only return messages with a label matching the ID. (optional)
max_results = 56 # int | Maximum number of history records to return. This field defaults to 100. The maximum allowed value for this field is 500. (optional)
page_token = 'page_token_example' # str | Page token to retrieve a specific page of results in the list. (optional)

try:
    # List mailbox change history
    api_response = api_instance.gmail_users_history_list(user_id, start_history_id, xgafv=xgafv, access_token=access_token, alt=alt, param_callback=param_callback, fields=fields, key=key, oauth_token=oauth_token, pretty_print=pretty_print, quota_user=quota_user, upload_protocol=upload_protocol, upload_type=upload_type, history_types=history_types, label_id=label_id, max_results=max_results, page_token=page_token)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling UsersApi->gmail_users_history_list: %s\n" % e)

# Configure OAuth2 access token for authorization: Oauth2
configuration = swagger_client.Configuration()
configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: Oauth2c
configuration = swagger_client.Configuration()
configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.UsersApi(swagger_client.ApiClient(configuration))
user_id = 'user_id_example' # str | The user's email address. The special value `me` can be used to indicate the authenticated user.
body = swagger_client.Label() # Label |  (optional)
xgafv = 'xgafv_example' # str | V1 error format. (optional)
access_token = 'access_token_example' # str | OAuth access token. (optional)
alt = 'alt_example' # str | Data format for response. (optional)
param_callback = 'param_callback_example' # str | JSONP (optional)
fields = 'fields_example' # str | Selector specifying which fields to include in a partial response. (optional)
key = 'key_example' # str | 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. (optional)
oauth_token = 'oauth_token_example' # str | OAuth 2.0 token for the current user. (optional)
pretty_print = true # bool | Returns response with indentations and line breaks. (optional)
quota_user = 'quota_user_example' # str | 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. (optional)
upload_protocol = 'upload_protocol_example' # str | Upload protocol for media (e.g. \"raw\", \"multipart\"). (optional)
upload_type = 'upload_type_example' # str | Legacy upload protocol for media (e.g. \"media\", \"multipart\"). (optional)

try:
    # Create a new email label
    api_response = api_instance.gmail_users_labels_create(user_id, body=body, xgafv=xgafv, access_token=access_token, alt=alt, param_callback=param_callback, fields=fields, key=key, oauth_token=oauth_token, pretty_print=pretty_print, quota_user=quota_user, upload_protocol=upload_protocol, upload_type=upload_type)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling UsersApi->gmail_users_labels_create: %s\n" % e)

# Configure OAuth2 access token for authorization: Oauth2
configuration = swagger_client.Configuration()
configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: Oauth2c
configuration = swagger_client.Configuration()
configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.UsersApi(swagger_client.ApiClient(configuration))
user_id = 'user_id_example' # str | The user's email address. The special value `me` can be used to indicate the authenticated user.
id = 'id_example' # str | The ID of the label to delete.
xgafv = 'xgafv_example' # str | V1 error format. (optional)
access_token = 'access_token_example' # str | OAuth access token. (optional)
alt = 'alt_example' # str | Data format for response. (optional)
param_callback = 'param_callback_example' # str | JSONP (optional)
fields = 'fields_example' # str | Selector specifying which fields to include in a partial response. (optional)
key = 'key_example' # str | 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. (optional)
oauth_token = 'oauth_token_example' # str | OAuth 2.0 token for the current user. (optional)
pretty_print = true # bool | Returns response with indentations and line breaks. (optional)
quota_user = 'quota_user_example' # str | 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. (optional)
upload_protocol = 'upload_protocol_example' # str | Upload protocol for media (e.g. \"raw\", \"multipart\"). (optional)
upload_type = 'upload_type_example' # str | Legacy upload protocol for media (e.g. \"media\", \"multipart\"). (optional)

try:
    # Delete a specific email label
    api_instance.gmail_users_labels_delete(user_id, id, xgafv=xgafv, access_token=access_token, alt=alt, param_callback=param_callback, fields=fields, key=key, oauth_token=oauth_token, pretty_print=pretty_print, quota_user=quota_user, upload_protocol=upload_protocol, upload_type=upload_type)
except ApiException as e:
    print("Exception when calling UsersApi->gmail_users_labels_delete: %s\n" % e)

# Configure OAuth2 access token for authorization: Oauth2
configuration = swagger_client.Configuration()
configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: Oauth2c
configuration = swagger_client.Configuration()
configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.UsersApi(swagger_client.ApiClient(configuration))
user_id = 'user_id_example' # str | The user's email address. The special value `me` can be used to indicate the authenticated user.
id = 'id_example' # str | The ID of the label to retrieve.
xgafv = 'xgafv_example' # str | V1 error format. (optional)
access_token = 'access_token_example' # str | OAuth access token. (optional)
alt = 'alt_example' # str | Data format for response. (optional)
param_callback = 'param_callback_example' # str | JSONP (optional)
fields = 'fields_example' # str | Selector specifying which fields to include in a partial response. (optional)
key = 'key_example' # str | 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. (optional)
oauth_token = 'oauth_token_example' # str | OAuth 2.0 token for the current user. (optional)
pretty_print = true # bool | Returns response with indentations and line breaks. (optional)
quota_user = 'quota_user_example' # str | 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. (optional)
upload_protocol = 'upload_protocol_example' # str | Upload protocol for media (e.g. \"raw\", \"multipart\"). (optional)
upload_type = 'upload_type_example' # str | Legacy upload protocol for media (e.g. \"media\", \"multipart\"). (optional)

try:
    # Get details of a label
    api_response = api_instance.gmail_users_labels_get(user_id, id, xgafv=xgafv, access_token=access_token, alt=alt, param_callback=param_callback, fields=fields, key=key, oauth_token=oauth_token, pretty_print=pretty_print, quota_user=quota_user, upload_protocol=upload_protocol, upload_type=upload_type)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling UsersApi->gmail_users_labels_get: %s\n" % e)

# Configure OAuth2 access token for authorization: Oauth2
configuration = swagger_client.Configuration()
configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: Oauth2c
configuration = swagger_client.Configuration()
configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.UsersApi(swagger_client.ApiClient(configuration))
user_id = 'user_id_example' # str | The user's email address. The special value `me` can be used to indicate the authenticated user.
xgafv = 'xgafv_example' # str | V1 error format. (optional)
access_token = 'access_token_example' # str | OAuth access token. (optional)
alt = 'alt_example' # str | Data format for response. (optional)
param_callback = 'param_callback_example' # str | JSONP (optional)
fields = 'fields_example' # str | Selector specifying which fields to include in a partial response. (optional)
key = 'key_example' # str | 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. (optional)
oauth_token = 'oauth_token_example' # str | OAuth 2.0 token for the current user. (optional)
pretty_print = true # bool | Returns response with indentations and line breaks. (optional)
quota_user = 'quota_user_example' # str | 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. (optional)
upload_protocol = 'upload_protocol_example' # str | Upload protocol for media (e.g. \"raw\", \"multipart\"). (optional)
upload_type = 'upload_type_example' # str | Legacy upload protocol for media (e.g. \"media\", \"multipart\"). (optional)

try:
    # List all email labels
    api_response = api_instance.gmail_users_labels_list(user_id, xgafv=xgafv, access_token=access_token, alt=alt, param_callback=param_callback, fields=fields, key=key, oauth_token=oauth_token, pretty_print=pretty_print, quota_user=quota_user, upload_protocol=upload_protocol, upload_type=upload_type)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling UsersApi->gmail_users_labels_list: %s\n" % e)

# Configure OAuth2 access token for authorization: Oauth2
configuration = swagger_client.Configuration()
configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: Oauth2c
configuration = swagger_client.Configuration()
configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.UsersApi(swagger_client.ApiClient(configuration))
user_id = 'user_id_example' # str | The user's email address. The special value `me` can be used to indicate the authenticated user.
id = 'id_example' # str | The ID of the label to update.
body = swagger_client.Label() # Label |  (optional)
xgafv = 'xgafv_example' # str | V1 error format. (optional)
access_token = 'access_token_example' # str | OAuth access token. (optional)
alt = 'alt_example' # str | Data format for response. (optional)
param_callback = 'param_callback_example' # str | JSONP (optional)
fields = 'fields_example' # str | Selector specifying which fields to include in a partial response. (optional)
key = 'key_example' # str | 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. (optional)
oauth_token = 'oauth_token_example' # str | OAuth 2.0 token for the current user. (optional)
pretty_print = true # bool | Returns response with indentations and line breaks. (optional)
quota_user = 'quota_user_example' # str | 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. (optional)
upload_protocol = 'upload_protocol_example' # str | Upload protocol for media (e.g. \"raw\", \"multipart\"). (optional)
upload_type = 'upload_type_example' # str | Legacy upload protocol for media (e.g. \"media\", \"multipart\"). (optional)

try:
    # Partially update a label
    api_response = api_instance.gmail_users_labels_patch(user_id, id, body=body, xgafv=xgafv, access_token=access_token, alt=alt, param_callback=param_callback, fields=fields, key=key, oauth_token=oauth_token, pretty_print=pretty_print, quota_user=quota_user, upload_protocol=upload_protocol, upload_type=upload_type)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling UsersApi->gmail_users_labels_patch: %s\n" % e)

# Configure OAuth2 access token for authorization: Oauth2
configuration = swagger_client.Configuration()
configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: Oauth2c
configuration = swagger_client.Configuration()
configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.UsersApi(swagger_client.ApiClient(configuration))
user_id = 'user_id_example' # str | The user's email address. The special value `me` can be used to indicate the authenticated user.
id = 'id_example' # str | The ID of the label to update.
body = swagger_client.Label() # Label |  (optional)
xgafv = 'xgafv_example' # str | V1 error format. (optional)
access_token = 'access_token_example' # str | OAuth access token. (optional)
alt = 'alt_example' # str | Data format for response. (optional)
param_callback = 'param_callback_example' # str | JSONP (optional)
fields = 'fields_example' # str | Selector specifying which fields to include in a partial response. (optional)
key = 'key_example' # str | 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. (optional)
oauth_token = 'oauth_token_example' # str | OAuth 2.0 token for the current user. (optional)
pretty_print = true # bool | Returns response with indentations and line breaks. (optional)
quota_user = 'quota_user_example' # str | 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. (optional)
upload_protocol = 'upload_protocol_example' # str | Upload protocol for media (e.g. \"raw\", \"multipart\"). (optional)
upload_type = 'upload_type_example' # str | Legacy upload protocol for media (e.g. \"media\", \"multipart\"). (optional)

try:
    # Update a specific label
    api_response = api_instance.gmail_users_labels_update(user_id, id, body=body, xgafv=xgafv, access_token=access_token, alt=alt, param_callback=param_callback, fields=fields, key=key, oauth_token=oauth_token, pretty_print=pretty_print, quota_user=quota_user, upload_protocol=upload_protocol, upload_type=upload_type)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling UsersApi->gmail_users_labels_update: %s\n" % e)

# Configure OAuth2 access token for authorization: Oauth2
configuration = swagger_client.Configuration()
configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: Oauth2c
configuration = swagger_client.Configuration()
configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.UsersApi(swagger_client.ApiClient(configuration))
user_id = 'user_id_example' # str | The user's email address. The special value `me` can be used to indicate the authenticated user.
message_id = 'message_id_example' # str | The ID of the message containing the attachment.
id = 'id_example' # str | The ID of the attachment.
xgafv = 'xgafv_example' # str | V1 error format. (optional)
access_token = 'access_token_example' # str | OAuth access token. (optional)
alt = 'alt_example' # str | Data format for response. (optional)
param_callback = 'param_callback_example' # str | JSONP (optional)
fields = 'fields_example' # str | Selector specifying which fields to include in a partial response. (optional)
key = 'key_example' # str | 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. (optional)
oauth_token = 'oauth_token_example' # str | OAuth 2.0 token for the current user. (optional)
pretty_print = true # bool | Returns response with indentations and line breaks. (optional)
quota_user = 'quota_user_example' # str | 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. (optional)
upload_protocol = 'upload_protocol_example' # str | Upload protocol for media (e.g. \"raw\", \"multipart\"). (optional)
upload_type = 'upload_type_example' # str | Legacy upload protocol for media (e.g. \"media\", \"multipart\"). (optional)

try:
    # Get a message attachment
    api_response = api_instance.gmail_users_messages_attachments_get(user_id, message_id, id, xgafv=xgafv, access_token=access_token, alt=alt, param_callback=param_callback, fields=fields, key=key, oauth_token=oauth_token, pretty_print=pretty_print, quota_user=quota_user, upload_protocol=upload_protocol, upload_type=upload_type)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling UsersApi->gmail_users_messages_attachments_get: %s\n" % e)

# Configure OAuth2 access token for authorization: Oauth2
configuration = swagger_client.Configuration()
configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: Oauth2c
configuration = swagger_client.Configuration()
configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.UsersApi(swagger_client.ApiClient(configuration))
user_id = 'user_id_example' # str | The user's email address. The special value `me` can be used to indicate the authenticated user.
body = swagger_client.BatchDeleteMessagesRequest() # BatchDeleteMessagesRequest |  (optional)
xgafv = 'xgafv_example' # str | V1 error format. (optional)
access_token = 'access_token_example' # str | OAuth access token. (optional)
alt = 'alt_example' # str | Data format for response. (optional)
param_callback = 'param_callback_example' # str | JSONP (optional)
fields = 'fields_example' # str | Selector specifying which fields to include in a partial response. (optional)
key = 'key_example' # str | 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. (optional)
oauth_token = 'oauth_token_example' # str | OAuth 2.0 token for the current user. (optional)
pretty_print = true # bool | Returns response with indentations and line breaks. (optional)
quota_user = 'quota_user_example' # str | 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. (optional)
upload_protocol = 'upload_protocol_example' # str | Upload protocol for media (e.g. \"raw\", \"multipart\"). (optional)
upload_type = 'upload_type_example' # str | Legacy upload protocol for media (e.g. \"media\", \"multipart\"). (optional)

try:
    # Batch delete email messages
    api_instance.gmail_users_messages_batch_delete(user_id, body=body, xgafv=xgafv, access_token=access_token, alt=alt, param_callback=param_callback, fields=fields, key=key, oauth_token=oauth_token, pretty_print=pretty_print, quota_user=quota_user, upload_protocol=upload_protocol, upload_type=upload_type)
except ApiException as e:
    print("Exception when calling UsersApi->gmail_users_messages_batch_delete: %s\n" % e)

# Configure OAuth2 access token for authorization: Oauth2
configuration = swagger_client.Configuration()
configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: Oauth2c
configuration = swagger_client.Configuration()
configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.UsersApi(swagger_client.ApiClient(configuration))
user_id = 'user_id_example' # str | The user's email address. The special value `me` can be used to indicate the authenticated user.
body = swagger_client.BatchModifyMessagesRequest() # BatchModifyMessagesRequest |  (optional)
xgafv = 'xgafv_example' # str | V1 error format. (optional)
access_token = 'access_token_example' # str | OAuth access token. (optional)
alt = 'alt_example' # str | Data format for response. (optional)
param_callback = 'param_callback_example' # str | JSONP (optional)
fields = 'fields_example' # str | Selector specifying which fields to include in a partial response. (optional)
key = 'key_example' # str | 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. (optional)
oauth_token = 'oauth_token_example' # str | OAuth 2.0 token for the current user. (optional)
pretty_print = true # bool | Returns response with indentations and line breaks. (optional)
quota_user = 'quota_user_example' # str | 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. (optional)
upload_protocol = 'upload_protocol_example' # str | Upload protocol for media (e.g. \"raw\", \"multipart\"). (optional)
upload_type = 'upload_type_example' # str | Legacy upload protocol for media (e.g. \"media\", \"multipart\"). (optional)

try:
    # Batch modify message labels
    api_instance.gmail_users_messages_batch_modify(user_id, body=body, xgafv=xgafv, access_token=access_token, alt=alt, param_callback=param_callback, fields=fields, key=key, oauth_token=oauth_token, pretty_print=pretty_print, quota_user=quota_user, upload_protocol=upload_protocol, upload_type=upload_type)
except ApiException as e:
    print("Exception when calling UsersApi->gmail_users_messages_batch_modify: %s\n" % e)

# Configure OAuth2 access token for authorization: Oauth2
configuration = swagger_client.Configuration()
configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: Oauth2c
configuration = swagger_client.Configuration()
configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.UsersApi(swagger_client.ApiClient(configuration))
user_id = 'user_id_example' # str | The user's email address. The special value `me` can be used to indicate the authenticated user.
id = 'id_example' # str | The ID of the message to delete.
xgafv = 'xgafv_example' # str | V1 error format. (optional)
access_token = 'access_token_example' # str | OAuth access token. (optional)
alt = 'alt_example' # str | Data format for response. (optional)
param_callback = 'param_callback_example' # str | JSONP (optional)
fields = 'fields_example' # str | Selector specifying which fields to include in a partial response. (optional)
key = 'key_example' # str | 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. (optional)
oauth_token = 'oauth_token_example' # str | OAuth 2.0 token for the current user. (optional)
pretty_print = true # bool | Returns response with indentations and line breaks. (optional)
quota_user = 'quota_user_example' # str | 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. (optional)
upload_protocol = 'upload_protocol_example' # str | Upload protocol for media (e.g. \"raw\", \"multipart\"). (optional)
upload_type = 'upload_type_example' # str | Legacy upload protocol for media (e.g. \"media\", \"multipart\"). (optional)

try:
    # Delete a specific email message
    api_instance.gmail_users_messages_delete(user_id, id, xgafv=xgafv, access_token=access_token, alt=alt, param_callback=param_callback, fields=fields, key=key, oauth_token=oauth_token, pretty_print=pretty_print, quota_user=quota_user, upload_protocol=upload_protocol, upload_type=upload_type)
except ApiException as e:
    print("Exception when calling UsersApi->gmail_users_messages_delete: %s\n" % e)

# Configure OAuth2 access token for authorization: Oauth2
configuration = swagger_client.Configuration()
configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: Oauth2c
configuration = swagger_client.Configuration()
configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.UsersApi(swagger_client.ApiClient(configuration))
user_id = 'user_id_example' # str | The user's email address. The special value `me` can be used to indicate the authenticated user.
id = 'id_example' # str | The ID of the message to retrieve. This ID is usually retrieved using `messages.list`. The ID is also contained in the result when a message is inserted (`messages.insert`) or imported (`messages.import`).
xgafv = 'xgafv_example' # str | V1 error format. (optional)
access_token = 'access_token_example' # str | OAuth access token. (optional)
alt = 'alt_example' # str | Data format for response. (optional)
param_callback = 'param_callback_example' # str | JSONP (optional)
fields = 'fields_example' # str | Selector specifying which fields to include in a partial response. (optional)
key = 'key_example' # str | 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. (optional)
oauth_token = 'oauth_token_example' # str | OAuth 2.0 token for the current user. (optional)
pretty_print = true # bool | Returns response with indentations and line breaks. (optional)
quota_user = 'quota_user_example' # str | 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. (optional)
upload_protocol = 'upload_protocol_example' # str | Upload protocol for media (e.g. \"raw\", \"multipart\"). (optional)
upload_type = 'upload_type_example' # str | Legacy upload protocol for media (e.g. \"media\", \"multipart\"). (optional)
format = 'format_example' # str | The format to return the message in. (optional)
metadata_headers = ['metadata_headers_example'] # list[str] | When given and format is `METADATA`, only include headers specified. (optional)

try:
    # Get details of a message
    api_response = api_instance.gmail_users_messages_get(user_id, id, xgafv=xgafv, access_token=access_token, alt=alt, param_callback=param_callback, fields=fields, key=key, oauth_token=oauth_token, pretty_print=pretty_print, quota_user=quota_user, upload_protocol=upload_protocol, upload_type=upload_type, format=format, metadata_headers=metadata_headers)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling UsersApi->gmail_users_messages_get: %s\n" % e)

# Configure OAuth2 access token for authorization: Oauth2
configuration = swagger_client.Configuration()
configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: Oauth2c
configuration = swagger_client.Configuration()
configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.UsersApi(swagger_client.ApiClient(configuration))
user_id = 'user_id_example' # str | The user's email address. The special value `me` can be used to indicate the authenticated user.
body = swagger_client.Message() # Message |  (optional)
xgafv = 'xgafv_example' # str | V1 error format. (optional)
access_token = 'access_token_example' # str | OAuth access token. (optional)
alt = 'alt_example' # str | Data format for response. (optional)
param_callback = 'param_callback_example' # str | JSONP (optional)
fields = 'fields_example' # str | Selector specifying which fields to include in a partial response. (optional)
key = 'key_example' # str | 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. (optional)
oauth_token = 'oauth_token_example' # str | OAuth 2.0 token for the current user. (optional)
pretty_print = true # bool | Returns response with indentations and line breaks. (optional)
quota_user = 'quota_user_example' # str | 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. (optional)
upload_protocol = 'upload_protocol_example' # str | Upload protocol for media (e.g. \"raw\", \"multipart\"). (optional)
upload_type = 'upload_type_example' # str | Legacy upload protocol for media (e.g. \"media\", \"multipart\"). (optional)
deleted = true # bool | Mark the email as permanently deleted (not TRASH) and only visible in Google Vault to a Vault administrator. Only used for Google Workspace accounts. (optional)
internal_date_source = 'internal_date_source_example' # str | Source for Gmail's internal date of the message. (optional)
never_mark_spam = true # bool | Ignore the Gmail spam classifier decision and never mark this email as SPAM in the mailbox. (optional)
process_for_calendar = true # bool | Process calendar invites in the email and add any extracted meetings to the Google Calendar for this user. (optional)

try:
    # Import a message into mailbox
    api_response = api_instance.gmail_users_messages_import(user_id, body=body, xgafv=xgafv, access_token=access_token, alt=alt, param_callback=param_callback, fields=fields, key=key, oauth_token=oauth_token, pretty_print=pretty_print, quota_user=quota_user, upload_protocol=upload_protocol, upload_type=upload_type, deleted=deleted, internal_date_source=internal_date_source, never_mark_spam=never_mark_spam, process_for_calendar=process_for_calendar)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling UsersApi->gmail_users_messages_import: %s\n" % e)

# Configure OAuth2 access token for authorization: Oauth2
configuration = swagger_client.Configuration()
configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: Oauth2c
configuration = swagger_client.Configuration()
configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.UsersApi(swagger_client.ApiClient(configuration))
user_id = 'user_id_example' # str | The user's email address. The special value `me` can be used to indicate the authenticated user.
body = swagger_client.Message() # Message |  (optional)
xgafv = 'xgafv_example' # str | V1 error format. (optional)
access_token = 'access_token_example' # str | OAuth access token. (optional)
alt = 'alt_example' # str | Data format for response. (optional)
param_callback = 'param_callback_example' # str | JSONP (optional)
fields = 'fields_example' # str | Selector specifying which fields to include in a partial response. (optional)
key = 'key_example' # str | 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. (optional)
oauth_token = 'oauth_token_example' # str | OAuth 2.0 token for the current user. (optional)
pretty_print = true # bool | Returns response with indentations and line breaks. (optional)
quota_user = 'quota_user_example' # str | 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. (optional)
upload_protocol = 'upload_protocol_example' # str | Upload protocol for media (e.g. \"raw\", \"multipart\"). (optional)
upload_type = 'upload_type_example' # str | Legacy upload protocol for media (e.g. \"media\", \"multipart\"). (optional)
deleted = true # bool | Mark the email as permanently deleted (not TRASH) and only visible in Google Vault to a Vault administrator. Only used for Google Workspace accounts. (optional)
internal_date_source = 'internal_date_source_example' # str | Source for Gmail's internal date of the message. (optional)

try:
    # Insert a message into mailbox
    api_response = api_instance.gmail_users_messages_insert(user_id, body=body, xgafv=xgafv, access_token=access_token, alt=alt, param_callback=param_callback, fields=fields, key=key, oauth_token=oauth_token, pretty_print=pretty_print, quota_user=quota_user, upload_protocol=upload_protocol, upload_type=upload_type, deleted=deleted, internal_date_source=internal_date_source)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling UsersApi->gmail_users_messages_insert: %s\n" % e)

# Configure OAuth2 access token for authorization: Oauth2
configuration = swagger_client.Configuration()
configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: Oauth2c
configuration = swagger_client.Configuration()
configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.UsersApi(swagger_client.ApiClient(configuration))
user_id = 'user_id_example' # str | The user's email address. The special value `me` can be used to indicate the authenticated user.
xgafv = 'xgafv_example' # str | V1 error format. (optional)
access_token = 'access_token_example' # str | OAuth access token. (optional)
alt = 'alt_example' # str | Data format for response. (optional)
param_callback = 'param_callback_example' # str | JSONP (optional)
fields = 'fields_example' # str | Selector specifying which fields to include in a partial response. (optional)
key = 'key_example' # str | 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. (optional)
oauth_token = 'oauth_token_example' # str | OAuth 2.0 token for the current user. (optional)
pretty_print = true # bool | Returns response with indentations and line breaks. (optional)
quota_user = 'quota_user_example' # str | 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. (optional)
upload_protocol = 'upload_protocol_example' # str | Upload protocol for media (e.g. \"raw\", \"multipart\"). (optional)
upload_type = 'upload_type_example' # str | Legacy upload protocol for media (e.g. \"media\", \"multipart\"). (optional)
include_spam_trash = true # bool | Include messages from `SPAM` and `TRASH` in the results. (optional)
label_ids = ['label_ids_example'] # list[str] | Only return messages with labels that match all of the specified label IDs. Messages in a thread might have labels that other messages in the same thread don't have. To learn more, see [Manage labels on messages and threads](https://developers.google.com/gmail/api/guides/labels#manage_labels_on_messages_threads). (optional)
max_results = 56 # int | Maximum number of messages to return. This field defaults to 100. The maximum allowed value for this field is 500. (optional)
page_token = 'page_token_example' # str | Page token to retrieve a specific page of results in the list. (optional)
q = 'q_example' # str | 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\"`. Parameter cannot be used when accessing the api using the gmail.metadata scope. (optional)

try:
    # List user's email messages
    api_response = api_instance.gmail_users_messages_list(user_id, xgafv=xgafv, access_token=access_token, alt=alt, param_callback=param_callback, fields=fields, key=key, oauth_token=oauth_token, pretty_print=pretty_print, quota_user=quota_user, upload_protocol=upload_protocol, upload_type=upload_type, include_spam_trash=include_spam_trash, label_ids=label_ids, max_results=max_results, page_token=page_token, q=q)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling UsersApi->gmail_users_messages_list: %s\n" % e)

# Configure OAuth2 access token for authorization: Oauth2
configuration = swagger_client.Configuration()
configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: Oauth2c
configuration = swagger_client.Configuration()
configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.UsersApi(swagger_client.ApiClient(configuration))
user_id = 'user_id_example' # str | The user's email address. The special value `me` can be used to indicate the authenticated user.
id = 'id_example' # str | The ID of the message to modify.
body = swagger_client.ModifyMessageRequest() # ModifyMessageRequest |  (optional)
xgafv = 'xgafv_example' # str | V1 error format. (optional)
access_token = 'access_token_example' # str | OAuth access token. (optional)
alt = 'alt_example' # str | Data format for response. (optional)
param_callback = 'param_callback_example' # str | JSONP (optional)
fields = 'fields_example' # str | Selector specifying which fields to include in a partial response. (optional)
key = 'key_example' # str | 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. (optional)
oauth_token = 'oauth_token_example' # str | OAuth 2.0 token for the current user. (optional)
pretty_print = true # bool | Returns response with indentations and line breaks. (optional)
quota_user = 'quota_user_example' # str | 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. (optional)
upload_protocol = 'upload_protocol_example' # str | Upload protocol for media (e.g. \"raw\", \"multipart\"). (optional)
upload_type = 'upload_type_example' # str | Legacy upload protocol for media (e.g. \"media\", \"multipart\"). (optional)

try:
    # Modify labels of a message
    api_response = api_instance.gmail_users_messages_modify(user_id, id, body=body, xgafv=xgafv, access_token=access_token, alt=alt, param_callback=param_callback, fields=fields, key=key, oauth_token=oauth_token, pretty_print=pretty_print, quota_user=quota_user, upload_protocol=upload_protocol, upload_type=upload_type)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling UsersApi->gmail_users_messages_modify: %s\n" % e)

# Configure OAuth2 access token for authorization: Oauth2
configuration = swagger_client.Configuration()
configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: Oauth2c
configuration = swagger_client.Configuration()
configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.UsersApi(swagger_client.ApiClient(configuration))
user_id = 'user_id_example' # str | The user's email address. The special value `me` can be used to indicate the authenticated user.
body = swagger_client.Message() # Message |  (optional)
xgafv = 'xgafv_example' # str | V1 error format. (optional)
access_token = 'access_token_example' # str | OAuth access token. (optional)
alt = 'alt_example' # str | Data format for response. (optional)
param_callback = 'param_callback_example' # str | JSONP (optional)
fields = 'fields_example' # str | Selector specifying which fields to include in a partial response. (optional)
key = 'key_example' # str | 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. (optional)
oauth_token = 'oauth_token_example' # str | OAuth 2.0 token for the current user. (optional)
pretty_print = true # bool | Returns response with indentations and line breaks. (optional)
quota_user = 'quota_user_example' # str | 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. (optional)
upload_protocol = 'upload_protocol_example' # str | Upload protocol for media (e.g. \"raw\", \"multipart\"). (optional)
upload_type = 'upload_type_example' # str | Legacy upload protocol for media (e.g. \"media\", \"multipart\"). (optional)

try:
    # Send an email message
    api_response = api_instance.gmail_users_messages_send(user_id, body=body, xgafv=xgafv, access_token=access_token, alt=alt, param_callback=param_callback, fields=fields, key=key, oauth_token=oauth_token, pretty_print=pretty_print, quota_user=quota_user, upload_protocol=upload_protocol, upload_type=upload_type)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling UsersApi->gmail_users_messages_send: %s\n" % e)

# Configure OAuth2 access token for authorization: Oauth2
configuration = swagger_client.Configuration()
configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: Oauth2c
configuration = swagger_client.Configuration()
configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.UsersApi(swagger_client.ApiClient(configuration))
user_id = 'user_id_example' # str | The user's email address. The special value `me` can be used to indicate the authenticated user.
id = 'id_example' # str | The ID of the message to Trash.
xgafv = 'xgafv_example' # str | V1 error format. (optional)
access_token = 'access_token_example' # str | OAuth access token. (optional)
alt = 'alt_example' # str | Data format for response. (optional)
param_callback = 'param_callback_example' # str | JSONP (optional)
fields = 'fields_example' # str | Selector specifying which fields to include in a partial response. (optional)
key = 'key_example' # str | 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. (optional)
oauth_token = 'oauth_token_example' # str | OAuth 2.0 token for the current user. (optional)
pretty_print = true # bool | Returns response with indentations and line breaks. (optional)
quota_user = 'quota_user_example' # str | 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. (optional)
upload_protocol = 'upload_protocol_example' # str | Upload protocol for media (e.g. \"raw\", \"multipart\"). (optional)
upload_type = 'upload_type_example' # str | Legacy upload protocol for media (e.g. \"media\", \"multipart\"). (optional)

try:
    # Trash a specific email message
    api_response = api_instance.gmail_users_messages_trash(user_id, id, xgafv=xgafv, access_token=access_token, alt=alt, param_callback=param_callback, fields=fields, key=key, oauth_token=oauth_token, pretty_print=pretty_print, quota_user=quota_user, upload_protocol=upload_protocol, upload_type=upload_type)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling UsersApi->gmail_users_messages_trash: %s\n" % e)

# Configure OAuth2 access token for authorization: Oauth2
configuration = swagger_client.Configuration()
configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: Oauth2c
configuration = swagger_client.Configuration()
configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.UsersApi(swagger_client.ApiClient(configuration))
user_id = 'user_id_example' # str | The user's email address. The special value `me` can be used to indicate the authenticated user.
id = 'id_example' # str | The ID of the message to remove from Trash.
xgafv = 'xgafv_example' # str | V1 error format. (optional)
access_token = 'access_token_example' # str | OAuth access token. (optional)
alt = 'alt_example' # str | Data format for response. (optional)
param_callback = 'param_callback_example' # str | JSONP (optional)
fields = 'fields_example' # str | Selector specifying which fields to include in a partial response. (optional)
key = 'key_example' # str | 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. (optional)
oauth_token = 'oauth_token_example' # str | OAuth 2.0 token for the current user. (optional)
pretty_print = true # bool | Returns response with indentations and line breaks. (optional)
quota_user = 'quota_user_example' # str | 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. (optional)
upload_protocol = 'upload_protocol_example' # str | Upload protocol for media (e.g. \"raw\", \"multipart\"). (optional)
upload_type = 'upload_type_example' # str | Legacy upload protocol for media (e.g. \"media\", \"multipart\"). (optional)

try:
    # Untrash a specific email message
    api_response = api_instance.gmail_users_messages_untrash(user_id, id, xgafv=xgafv, access_token=access_token, alt=alt, param_callback=param_callback, fields=fields, key=key, oauth_token=oauth_token, pretty_print=pretty_print, quota_user=quota_user, upload_protocol=upload_protocol, upload_type=upload_type)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling UsersApi->gmail_users_messages_untrash: %s\n" % e)

# Configure OAuth2 access token for authorization: Oauth2
configuration = swagger_client.Configuration()
configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: Oauth2c
configuration = swagger_client.Configuration()
configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.UsersApi(swagger_client.ApiClient(configuration))
user_id = 'user_id_example' # str | The requester's primary email address. To indicate the authenticated user, you can use the special value `me`.
body = swagger_client.CseIdentity() # CseIdentity |  (optional)
xgafv = 'xgafv_example' # str | V1 error format. (optional)
access_token = 'access_token_example' # str | OAuth access token. (optional)
alt = 'alt_example' # str | Data format for response. (optional)
param_callback = 'param_callback_example' # str | JSONP (optional)
fields = 'fields_example' # str | Selector specifying which fields to include in a partial response. (optional)
key = 'key_example' # str | 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. (optional)
oauth_token = 'oauth_token_example' # str | OAuth 2.0 token for the current user. (optional)
pretty_print = true # bool | Returns response with indentations and line breaks. (optional)
quota_user = 'quota_user_example' # str | 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. (optional)
upload_protocol = 'upload_protocol_example' # str | Upload protocol for media (e.g. \"raw\", \"multipart\"). (optional)
upload_type = 'upload_type_example' # str | Legacy upload protocol for media (e.g. \"media\", \"multipart\"). (optional)

try:
    # Create encrypted email identity
    api_response = api_instance.gmail_users_settings_cse_identities_create(user_id, body=body, xgafv=xgafv, access_token=access_token, alt=alt, param_callback=param_callback, fields=fields, key=key, oauth_token=oauth_token, pretty_print=pretty_print, quota_user=quota_user, upload_protocol=upload_protocol, upload_type=upload_type)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling UsersApi->gmail_users_settings_cse_identities_create: %s\n" % e)

# Configure OAuth2 access token for authorization: Oauth2
configuration = swagger_client.Configuration()
configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: Oauth2c
configuration = swagger_client.Configuration()
configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.UsersApi(swagger_client.ApiClient(configuration))
user_id = 'user_id_example' # str | The requester's primary email address. To indicate the authenticated user, you can use the special value `me`.
cse_email_address = 'cse_email_address_example' # str | The primary email address associated with the client-side encryption identity configuration that's removed.
xgafv = 'xgafv_example' # str | V1 error format. (optional)
access_token = 'access_token_example' # str | OAuth access token. (optional)
alt = 'alt_example' # str | Data format for response. (optional)
param_callback = 'param_callback_example' # str | JSONP (optional)
fields = 'fields_example' # str | Selector specifying which fields to include in a partial response. (optional)
key = 'key_example' # str | 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. (optional)
oauth_token = 'oauth_token_example' # str | OAuth 2.0 token for the current user. (optional)
pretty_print = true # bool | Returns response with indentations and line breaks. (optional)
quota_user = 'quota_user_example' # str | 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. (optional)
upload_protocol = 'upload_protocol_example' # str | Upload protocol for media (e.g. \"raw\", \"multipart\"). (optional)
upload_type = 'upload_type_example' # str | Legacy upload protocol for media (e.g. \"media\", \"multipart\"). (optional)

try:
    # Delete encryption identity
    api_instance.gmail_users_settings_cse_identities_delete(user_id, cse_email_address, xgafv=xgafv, access_token=access_token, alt=alt, param_callback=param_callback, fields=fields, key=key, oauth_token=oauth_token, pretty_print=pretty_print, quota_user=quota_user, upload_protocol=upload_protocol, upload_type=upload_type)
except ApiException as e:
    print("Exception when calling UsersApi->gmail_users_settings_cse_identities_delete: %s\n" % e)

# Configure OAuth2 access token for authorization: Oauth2
configuration = swagger_client.Configuration()
configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: Oauth2c
configuration = swagger_client.Configuration()
configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.UsersApi(swagger_client.ApiClient(configuration))
user_id = 'user_id_example' # str | The requester's primary email address. To indicate the authenticated user, you can use the special value `me`.
cse_email_address = 'cse_email_address_example' # str | The primary email address associated with the client-side encryption identity configuration that's retrieved.
xgafv = 'xgafv_example' # str | V1 error format. (optional)
access_token = 'access_token_example' # str | OAuth access token. (optional)
alt = 'alt_example' # str | Data format for response. (optional)
param_callback = 'param_callback_example' # str | JSONP (optional)
fields = 'fields_example' # str | Selector specifying which fields to include in a partial response. (optional)
key = 'key_example' # str | 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. (optional)
oauth_token = 'oauth_token_example' # str | OAuth 2.0 token for the current user. (optional)
pretty_print = true # bool | Returns response with indentations and line breaks. (optional)
quota_user = 'quota_user_example' # str | 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. (optional)
upload_protocol = 'upload_protocol_example' # str | Upload protocol for media (e.g. \"raw\", \"multipart\"). (optional)
upload_type = 'upload_type_example' # str | Legacy upload protocol for media (e.g. \"media\", \"multipart\"). (optional)

try:
    # Get encryption identity configuration
    api_response = api_instance.gmail_users_settings_cse_identities_get(user_id, cse_email_address, xgafv=xgafv, access_token=access_token, alt=alt, param_callback=param_callback, fields=fields, key=key, oauth_token=oauth_token, pretty_print=pretty_print, quota_user=quota_user, upload_protocol=upload_protocol, upload_type=upload_type)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling UsersApi->gmail_users_settings_cse_identities_get: %s\n" % e)

# Configure OAuth2 access token for authorization: Oauth2
configuration = swagger_client.Configuration()
configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: Oauth2c
configuration = swagger_client.Configuration()
configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.UsersApi(swagger_client.ApiClient(configuration))
user_id = 'user_id_example' # str | The requester's primary email address. To indicate the authenticated user, you can use the special value `me`.
xgafv = 'xgafv_example' # str | V1 error format. (optional)
access_token = 'access_token_example' # str | OAuth access token. (optional)
alt = 'alt_example' # str | Data format for response. (optional)
param_callback = 'param_callback_example' # str | JSONP (optional)
fields = 'fields_example' # str | Selector specifying which fields to include in a partial response. (optional)
key = 'key_example' # str | 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. (optional)
oauth_token = 'oauth_token_example' # str | OAuth 2.0 token for the current user. (optional)
pretty_print = true # bool | Returns response with indentations and line breaks. (optional)
quota_user = 'quota_user_example' # str | 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. (optional)
upload_protocol = 'upload_protocol_example' # str | Upload protocol for media (e.g. \"raw\", \"multipart\"). (optional)
upload_type = 'upload_type_example' # str | Legacy upload protocol for media (e.g. \"media\", \"multipart\"). (optional)
page_size = 56 # int | The number of identities to return. If not provided, the page size will default to 20 entries. (optional)
page_token = 'page_token_example' # str | Pagination token indicating which page of identities to return. If the token is not supplied, then the API will return the first page of results. (optional)

try:
    # List encrypted email identities
    api_response = api_instance.gmail_users_settings_cse_identities_list(user_id, xgafv=xgafv, access_token=access_token, alt=alt, param_callback=param_callback, fields=fields, key=key, oauth_token=oauth_token, pretty_print=pretty_print, quota_user=quota_user, upload_protocol=upload_protocol, upload_type=upload_type, page_size=page_size, page_token=page_token)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling UsersApi->gmail_users_settings_cse_identities_list: %s\n" % e)

# Configure OAuth2 access token for authorization: Oauth2
configuration = swagger_client.Configuration()
configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: Oauth2c
configuration = swagger_client.Configuration()
configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.UsersApi(swagger_client.ApiClient(configuration))
user_id = 'user_id_example' # str | The requester's primary email address. To indicate the authenticated user, you can use the special value `me`.
email_address = 'email_address_example' # str | The email address of the client-side encryption identity to update.
body = swagger_client.CseIdentity() # CseIdentity |  (optional)
xgafv = 'xgafv_example' # str | V1 error format. (optional)
access_token = 'access_token_example' # str | OAuth access token. (optional)
alt = 'alt_example' # str | Data format for response. (optional)
param_callback = 'param_callback_example' # str | JSONP (optional)
fields = 'fields_example' # str | Selector specifying which fields to include in a partial response. (optional)
key = 'key_example' # str | 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. (optional)
oauth_token = 'oauth_token_example' # str | OAuth 2.0 token for the current user. (optional)
pretty_print = true # bool | Returns response with indentations and line breaks. (optional)
quota_user = 'quota_user_example' # str | 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. (optional)
upload_protocol = 'upload_protocol_example' # str | Upload protocol for media (e.g. \"raw\", \"multipart\"). (optional)
upload_type = 'upload_type_example' # str | Legacy upload protocol for media (e.g. \"media\", \"multipart\"). (optional)

try:
    # Update encryption identity key pair
    api_response = api_instance.gmail_users_settings_cse_identities_patch(user_id, email_address, body=body, xgafv=xgafv, access_token=access_token, alt=alt, param_callback=param_callback, fields=fields, key=key, oauth_token=oauth_token, pretty_print=pretty_print, quota_user=quota_user, upload_protocol=upload_protocol, upload_type=upload_type)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling UsersApi->gmail_users_settings_cse_identities_patch: %s\n" % e)

# Configure OAuth2 access token for authorization: Oauth2
configuration = swagger_client.Configuration()
configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: Oauth2c
configuration = swagger_client.Configuration()
configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.UsersApi(swagger_client.ApiClient(configuration))
user_id = 'user_id_example' # str | The requester's primary email address. To indicate the authenticated user, you can use the special value `me`.
body = swagger_client.CseKeyPair() # CseKeyPair |  (optional)
xgafv = 'xgafv_example' # str | V1 error format. (optional)
access_token = 'access_token_example' # str | OAuth access token. (optional)
alt = 'alt_example' # str | Data format for response. (optional)
param_callback = 'param_callback_example' # str | JSONP (optional)
fields = 'fields_example' # str | Selector specifying which fields to include in a partial response. (optional)
key = 'key_example' # str | 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. (optional)
oauth_token = 'oauth_token_example' # str | OAuth 2.0 token for the current user. (optional)
pretty_print = true # bool | Returns response with indentations and line breaks. (optional)
quota_user = 'quota_user_example' # str | 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. (optional)
upload_protocol = 'upload_protocol_example' # str | Upload protocol for media (e.g. \"raw\", \"multipart\"). (optional)
upload_type = 'upload_type_example' # str | Legacy upload protocol for media (e.g. \"media\", \"multipart\"). (optional)

try:
    # Create encryption key pair
    api_response = api_instance.gmail_users_settings_cse_keypairs_create(user_id, body=body, xgafv=xgafv, access_token=access_token, alt=alt, param_callback=param_callback, fields=fields, key=key, oauth_token=oauth_token, pretty_print=pretty_print, quota_user=quota_user, upload_protocol=upload_protocol, upload_type=upload_type)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling UsersApi->gmail_users_settings_cse_keypairs_create: %s\n" % e)

# Configure OAuth2 access token for authorization: Oauth2
configuration = swagger_client.Configuration()
configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: Oauth2c
configuration = swagger_client.Configuration()
configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.UsersApi(swagger_client.ApiClient(configuration))
user_id = 'user_id_example' # str | The requester's primary email address. To indicate the authenticated user, you can use the special value `me`.
key_pair_id = 'key_pair_id_example' # str | The identifier of the key pair to turn off.
body = swagger_client.DisableCseKeyPairRequest() # DisableCseKeyPairRequest |  (optional)
xgafv = 'xgafv_example' # str | V1 error format. (optional)
access_token = 'access_token_example' # str | OAuth access token. (optional)
alt = 'alt_example' # str | Data format for response. (optional)
param_callback = 'param_callback_example' # str | JSONP (optional)
fields = 'fields_example' # str | Selector specifying which fields to include in a partial response. (optional)
key = 'key_example' # str | 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. (optional)
oauth_token = 'oauth_token_example' # str | OAuth 2.0 token for the current user. (optional)
pretty_print = true # bool | Returns response with indentations and line breaks. (optional)
quota_user = 'quota_user_example' # str | 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. (optional)
upload_protocol = 'upload_protocol_example' # str | Upload protocol for media (e.g. \"raw\", \"multipart\"). (optional)
upload_type = 'upload_type_example' # str | Legacy upload protocol for media (e.g. \"media\", \"multipart\"). (optional)

try:
    # Disable encryption key pair
    api_response = api_instance.gmail_users_settings_cse_keypairs_disable(user_id, key_pair_id, body=body, xgafv=xgafv, access_token=access_token, alt=alt, param_callback=param_callback, fields=fields, key=key, oauth_token=oauth_token, pretty_print=pretty_print, quota_user=quota_user, upload_protocol=upload_protocol, upload_type=upload_type)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling UsersApi->gmail_users_settings_cse_keypairs_disable: %s\n" % e)

# Configure OAuth2 access token for authorization: Oauth2
configuration = swagger_client.Configuration()
configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: Oauth2c
configuration = swagger_client.Configuration()
configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.UsersApi(swagger_client.ApiClient(configuration))
user_id = 'user_id_example' # str | The requester's primary email address. To indicate the authenticated user, you can use the special value `me`.
key_pair_id = 'key_pair_id_example' # str | The identifier of the key pair to turn on.
body = swagger_client.EnableCseKeyPairRequest() # EnableCseKeyPairRequest |  (optional)
xgafv = 'xgafv_example' # str | V1 error format. (optional)
access_token = 'access_token_example' # str | OAuth access token. (optional)
alt = 'alt_example' # str | Data format for response. (optional)
param_callback = 'param_callback_example' # str | JSONP (optional)
fields = 'fields_example' # str | Selector specifying which fields to include in a partial response. (optional)
key = 'key_example' # str | 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. (optional)
oauth_token = 'oauth_token_example' # str | OAuth 2.0 token for the current user. (optional)
pretty_print = true # bool | Returns response with indentations and line breaks. (optional)
quota_user = 'quota_user_example' # str | 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. (optional)
upload_protocol = 'upload_protocol_example' # str | Upload protocol for media (e.g. \"raw\", \"multipart\"). (optional)
upload_type = 'upload_type_example' # str | Legacy upload protocol for media (e.g. \"media\", \"multipart\"). (optional)

try:
    # Enable encryption key pair
    api_response = api_instance.gmail_users_settings_cse_keypairs_enable(user_id, key_pair_id, body=body, xgafv=xgafv, access_token=access_token, alt=alt, param_callback=param_callback, fields=fields, key=key, oauth_token=oauth_token, pretty_print=pretty_print, quota_user=quota_user, upload_protocol=upload_protocol, upload_type=upload_type)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling UsersApi->gmail_users_settings_cse_keypairs_enable: %s\n" % e)

# Configure OAuth2 access token for authorization: Oauth2
configuration = swagger_client.Configuration()
configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: Oauth2c
configuration = swagger_client.Configuration()
configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.UsersApi(swagger_client.ApiClient(configuration))
user_id = 'user_id_example' # str | The requester's primary email address. To indicate the authenticated user, you can use the special value `me`.
key_pair_id = 'key_pair_id_example' # str | The identifier of the key pair to retrieve.
xgafv = 'xgafv_example' # str | V1 error format. (optional)
access_token = 'access_token_example' # str | OAuth access token. (optional)
alt = 'alt_example' # str | Data format for response. (optional)
param_callback = 'param_callback_example' # str | JSONP (optional)
fields = 'fields_example' # str | Selector specifying which fields to include in a partial response. (optional)
key = 'key_example' # str | 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. (optional)
oauth_token = 'oauth_token_example' # str | OAuth 2.0 token for the current user. (optional)
pretty_print = true # bool | Returns response with indentations and line breaks. (optional)
quota_user = 'quota_user_example' # str | 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. (optional)
upload_protocol = 'upload_protocol_example' # str | Upload protocol for media (e.g. \"raw\", \"multipart\"). (optional)
upload_type = 'upload_type_example' # str | Legacy upload protocol for media (e.g. \"media\", \"multipart\"). (optional)

try:
    # Get encryption key pair details
    api_response = api_instance.gmail_users_settings_cse_keypairs_get(user_id, key_pair_id, xgafv=xgafv, access_token=access_token, alt=alt, param_callback=param_callback, fields=fields, key=key, oauth_token=oauth_token, pretty_print=pretty_print, quota_user=quota_user, upload_protocol=upload_protocol, upload_type=upload_type)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling UsersApi->gmail_users_settings_cse_keypairs_get: %s\n" % e)

# Configure OAuth2 access token for authorization: Oauth2
configuration = swagger_client.Configuration()
configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: Oauth2c
configuration = swagger_client.Configuration()
configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.UsersApi(swagger_client.ApiClient(configuration))
user_id = 'user_id_example' # str | The requester's primary email address. To indicate the authenticated user, you can use the special value `me`.
xgafv = 'xgafv_example' # str | V1 error format. (optional)
access_token = 'access_token_example' # str | OAuth access token. (optional)
alt = 'alt_example' # str | Data format for response. (optional)
param_callback = 'param_callback_example' # str | JSONP (optional)
fields = 'fields_example' # str | Selector specifying which fields to include in a partial response. (optional)
key = 'key_example' # str | 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. (optional)
oauth_token = 'oauth_token_example' # str | OAuth 2.0 token for the current user. (optional)
pretty_print = true # bool | Returns response with indentations and line breaks. (optional)
quota_user = 'quota_user_example' # str | 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. (optional)
upload_protocol = 'upload_protocol_example' # str | Upload protocol for media (e.g. \"raw\", \"multipart\"). (optional)
upload_type = 'upload_type_example' # str | Legacy upload protocol for media (e.g. \"media\", \"multipart\"). (optional)
page_size = 56 # int | The number of key pairs to return. If not provided, the page size will default to 20 entries. (optional)
page_token = 'page_token_example' # str | Pagination token indicating which page of key pairs to return. If the token is not supplied, then the API will return the first page of results. (optional)

try:
    # List encryption key pairs
    api_response = api_instance.gmail_users_settings_cse_keypairs_list(user_id, xgafv=xgafv, access_token=access_token, alt=alt, param_callback=param_callback, fields=fields, key=key, oauth_token=oauth_token, pretty_print=pretty_print, quota_user=quota_user, upload_protocol=upload_protocol, upload_type=upload_type, page_size=page_size, page_token=page_token)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling UsersApi->gmail_users_settings_cse_keypairs_list: %s\n" % e)

# Configure OAuth2 access token for authorization: Oauth2
configuration = swagger_client.Configuration()
configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: Oauth2c
configuration = swagger_client.Configuration()
configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.UsersApi(swagger_client.ApiClient(configuration))
user_id = 'user_id_example' # str | The requester's primary email address. To indicate the authenticated user, you can use the special value `me`.
key_pair_id = 'key_pair_id_example' # str | The identifier of the key pair to obliterate.
body = swagger_client.ObliterateCseKeyPairRequest() # ObliterateCseKeyPairRequest |  (optional)
xgafv = 'xgafv_example' # str | V1 error format. (optional)
access_token = 'access_token_example' # str | OAuth access token. (optional)
alt = 'alt_example' # str | Data format for response. (optional)
param_callback = 'param_callback_example' # str | JSONP (optional)
fields = 'fields_example' # str | Selector specifying which fields to include in a partial response. (optional)
key = 'key_example' # str | 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. (optional)
oauth_token = 'oauth_token_example' # str | OAuth 2.0 token for the current user. (optional)
pretty_print = true # bool | Returns response with indentations and line breaks. (optional)
quota_user = 'quota_user_example' # str | 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. (optional)
upload_protocol = 'upload_protocol_example' # str | Upload protocol for media (e.g. \"raw\", \"multipart\"). (optional)
upload_type = 'upload_type_example' # str | Legacy upload protocol for media (e.g. \"media\", \"multipart\"). (optional)

try:
    # Permanently delete encryption key pair
    api_instance.gmail_users_settings_cse_keypairs_obliterate(user_id, key_pair_id, body=body, xgafv=xgafv, access_token=access_token, alt=alt, param_callback=param_callback, fields=fields, key=key, oauth_token=oauth_token, pretty_print=pretty_print, quota_user=quota_user, upload_protocol=upload_protocol, upload_type=upload_type)
except ApiException as e:
    print("Exception when calling UsersApi->gmail_users_settings_cse_keypairs_obliterate: %s\n" % e)

# Configure OAuth2 access token for authorization: Oauth2
configuration = swagger_client.Configuration()
configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: Oauth2c
configuration = swagger_client.Configuration()
configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.UsersApi(swagger_client.ApiClient(configuration))
user_id = 'user_id_example' # str | User's email address. The special value \"me\" can be used to indicate the authenticated user.
body = swagger_client.Delegate() # Delegate |  (optional)
xgafv = 'xgafv_example' # str | V1 error format. (optional)
access_token = 'access_token_example' # str | OAuth access token. (optional)
alt = 'alt_example' # str | Data format for response. (optional)
param_callback = 'param_callback_example' # str | JSONP (optional)
fields = 'fields_example' # str | Selector specifying which fields to include in a partial response. (optional)
key = 'key_example' # str | 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. (optional)
oauth_token = 'oauth_token_example' # str | OAuth 2.0 token for the current user. (optional)
pretty_print = true # bool | Returns response with indentations and line breaks. (optional)
quota_user = 'quota_user_example' # str | 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. (optional)
upload_protocol = 'upload_protocol_example' # str | Upload protocol for media (e.g. \"raw\", \"multipart\"). (optional)
upload_type = 'upload_type_example' # str | Legacy upload protocol for media (e.g. \"media\", \"multipart\"). (optional)

try:
    # Add email delegate
    api_response = api_instance.gmail_users_settings_delegates_create(user_id, body=body, xgafv=xgafv, access_token=access_token, alt=alt, param_callback=param_callback, fields=fields, key=key, oauth_token=oauth_token, pretty_print=pretty_print, quota_user=quota_user, upload_protocol=upload_protocol, upload_type=upload_type)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling UsersApi->gmail_users_settings_delegates_create: %s\n" % e)

# Configure OAuth2 access token for authorization: Oauth2
configuration = swagger_client.Configuration()
configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: Oauth2c
configuration = swagger_client.Configuration()
configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.UsersApi(swagger_client.ApiClient(configuration))
user_id = 'user_id_example' # str | User's email address. The special value \"me\" can be used to indicate the authenticated user.
delegate_email = 'delegate_email_example' # str | The email address of the user to be removed as a delegate.
xgafv = 'xgafv_example' # str | V1 error format. (optional)
access_token = 'access_token_example' # str | OAuth access token. (optional)
alt = 'alt_example' # str | Data format for response. (optional)
param_callback = 'param_callback_example' # str | JSONP (optional)
fields = 'fields_example' # str | Selector specifying which fields to include in a partial response. (optional)
key = 'key_example' # str | 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. (optional)
oauth_token = 'oauth_token_example' # str | OAuth 2.0 token for the current user. (optional)
pretty_print = true # bool | Returns response with indentations and line breaks. (optional)
quota_user = 'quota_user_example' # str | 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. (optional)
upload_protocol = 'upload_protocol_example' # str | Upload protocol for media (e.g. \"raw\", \"multipart\"). (optional)
upload_type = 'upload_type_example' # str | Legacy upload protocol for media (e.g. \"media\", \"multipart\"). (optional)

try:
    # Remove email delegate
    api_instance.gmail_users_settings_delegates_delete(user_id, delegate_email, xgafv=xgafv, access_token=access_token, alt=alt, param_callback=param_callback, fields=fields, key=key, oauth_token=oauth_token, pretty_print=pretty_print, quota_user=quota_user, upload_protocol=upload_protocol, upload_type=upload_type)
except ApiException as e:
    print("Exception when calling UsersApi->gmail_users_settings_delegates_delete: %s\n" % e)

# Configure OAuth2 access token for authorization: Oauth2
configuration = swagger_client.Configuration()
configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: Oauth2c
configuration = swagger_client.Configuration()
configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.UsersApi(swagger_client.ApiClient(configuration))
user_id = 'user_id_example' # str | User's email address. The special value \"me\" can be used to indicate the authenticated user.
delegate_email = 'delegate_email_example' # str | The email address of the user whose delegate relationship is to be retrieved.
xgafv = 'xgafv_example' # str | V1 error format. (optional)
access_token = 'access_token_example' # str | OAuth access token. (optional)
alt = 'alt_example' # str | Data format for response. (optional)
param_callback = 'param_callback_example' # str | JSONP (optional)
fields = 'fields_example' # str | Selector specifying which fields to include in a partial response. (optional)
key = 'key_example' # str | 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. (optional)
oauth_token = 'oauth_token_example' # str | OAuth 2.0 token for the current user. (optional)
pretty_print = true # bool | Returns response with indentations and line breaks. (optional)
quota_user = 'quota_user_example' # str | 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. (optional)
upload_protocol = 'upload_protocol_example' # str | Upload protocol for media (e.g. \"raw\", \"multipart\"). (optional)
upload_type = 'upload_type_example' # str | Legacy upload protocol for media (e.g. \"media\", \"multipart\"). (optional)

try:
    # Get email delegate details
    api_response = api_instance.gmail_users_settings_delegates_get(user_id, delegate_email, xgafv=xgafv, access_token=access_token, alt=alt, param_callback=param_callback, fields=fields, key=key, oauth_token=oauth_token, pretty_print=pretty_print, quota_user=quota_user, upload_protocol=upload_protocol, upload_type=upload_type)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling UsersApi->gmail_users_settings_delegates_get: %s\n" % e)

# Configure OAuth2 access token for authorization: Oauth2
configuration = swagger_client.Configuration()
configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: Oauth2c
configuration = swagger_client.Configuration()
configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.UsersApi(swagger_client.ApiClient(configuration))
user_id = 'user_id_example' # str | User's email address. The special value \"me\" can be used to indicate the authenticated user.
xgafv = 'xgafv_example' # str | V1 error format. (optional)
access_token = 'access_token_example' # str | OAuth access token. (optional)
alt = 'alt_example' # str | Data format for response. (optional)
param_callback = 'param_callback_example' # str | JSONP (optional)
fields = 'fields_example' # str | Selector specifying which fields to include in a partial response. (optional)
key = 'key_example' # str | 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. (optional)
oauth_token = 'oauth_token_example' # str | OAuth 2.0 token for the current user. (optional)
pretty_print = true # bool | Returns response with indentations and line breaks. (optional)
quota_user = 'quota_user_example' # str | 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. (optional)
upload_protocol = 'upload_protocol_example' # str | Upload protocol for media (e.g. \"raw\", \"multipart\"). (optional)
upload_type = 'upload_type_example' # str | Legacy upload protocol for media (e.g. \"media\", \"multipart\"). (optional)

try:
    # List email delegates
    api_response = api_instance.gmail_users_settings_delegates_list(user_id, xgafv=xgafv, access_token=access_token, alt=alt, param_callback=param_callback, fields=fields, key=key, oauth_token=oauth_token, pretty_print=pretty_print, quota_user=quota_user, upload_protocol=upload_protocol, upload_type=upload_type)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling UsersApi->gmail_users_settings_delegates_list: %s\n" % e)

# Configure OAuth2 access token for authorization: Oauth2
configuration = swagger_client.Configuration()
configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: Oauth2c
configuration = swagger_client.Configuration()
configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.UsersApi(swagger_client.ApiClient(configuration))
user_id = 'user_id_example' # str | User's email address. The special value \"me\" can be used to indicate the authenticated user.
body = swagger_client.Filter() # Filter |  (optional)
xgafv = 'xgafv_example' # str | V1 error format. (optional)
access_token = 'access_token_example' # str | OAuth access token. (optional)
alt = 'alt_example' # str | Data format for response. (optional)
param_callback = 'param_callback_example' # str | JSONP (optional)
fields = 'fields_example' # str | Selector specifying which fields to include in a partial response. (optional)
key = 'key_example' # str | 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. (optional)
oauth_token = 'oauth_token_example' # str | OAuth 2.0 token for the current user. (optional)
pretty_print = true # bool | Returns response with indentations and line breaks. (optional)
quota_user = 'quota_user_example' # str | 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. (optional)
upload_protocol = 'upload_protocol_example' # str | Upload protocol for media (e.g. \"raw\", \"multipart\"). (optional)
upload_type = 'upload_type_example' # str | Legacy upload protocol for media (e.g. \"media\", \"multipart\"). (optional)

try:
    # Create email filter
    api_response = api_instance.gmail_users_settings_filters_create(user_id, body=body, xgafv=xgafv, access_token=access_token, alt=alt, param_callback=param_callback, fields=fields, key=key, oauth_token=oauth_token, pretty_print=pretty_print, quota_user=quota_user, upload_protocol=upload_protocol, upload_type=upload_type)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling UsersApi->gmail_users_settings_filters_create: %s\n" % e)

# Configure OAuth2 access token for authorization: Oauth2
configuration = swagger_client.Configuration()
configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: Oauth2c
configuration = swagger_client.Configuration()
configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.UsersApi(swagger_client.ApiClient(configuration))
user_id = 'user_id_example' # str | User's email address. The special value \"me\" can be used to indicate the authenticated user.
id = 'id_example' # str | The ID of the filter to be deleted.
xgafv = 'xgafv_example' # str | V1 error format. (optional)
access_token = 'access_token_example' # str | OAuth access token. (optional)
alt = 'alt_example' # str | Data format for response. (optional)
param_callback = 'param_callback_example' # str | JSONP (optional)
fields = 'fields_example' # str | Selector specifying which fields to include in a partial response. (optional)
key = 'key_example' # str | 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. (optional)
oauth_token = 'oauth_token_example' # str | OAuth 2.0 token for the current user. (optional)
pretty_print = true # bool | Returns response with indentations and line breaks. (optional)
quota_user = 'quota_user_example' # str | 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. (optional)
upload_protocol = 'upload_protocol_example' # str | Upload protocol for media (e.g. \"raw\", \"multipart\"). (optional)
upload_type = 'upload_type_example' # str | Legacy upload protocol for media (e.g. \"media\", \"multipart\"). (optional)

try:
    # Delete email filter
    api_instance.gmail_users_settings_filters_delete(user_id, id, xgafv=xgafv, access_token=access_token, alt=alt, param_callback=param_callback, fields=fields, key=key, oauth_token=oauth_token, pretty_print=pretty_print, quota_user=quota_user, upload_protocol=upload_protocol, upload_type=upload_type)
except ApiException as e:
    print("Exception when calling UsersApi->gmail_users_settings_filters_delete: %s\n" % e)

# Configure OAuth2 access token for authorization: Oauth2
configuration = swagger_client.Configuration()
configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: Oauth2c
configuration = swagger_client.Configuration()
configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.UsersApi(swagger_client.ApiClient(configuration))
user_id = 'user_id_example' # str | User's email address. The special value \"me\" can be used to indicate the authenticated user.
id = 'id_example' # str | The ID of the filter to be fetched.
xgafv = 'xgafv_example' # str | V1 error format. (optional)
access_token = 'access_token_example' # str | OAuth access token. (optional)
alt = 'alt_example' # str | Data format for response. (optional)
param_callback = 'param_callback_example' # str | JSONP (optional)
fields = 'fields_example' # str | Selector specifying which fields to include in a partial response. (optional)
key = 'key_example' # str | 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. (optional)
oauth_token = 'oauth_token_example' # str | OAuth 2.0 token for the current user. (optional)
pretty_print = true # bool | Returns response with indentations and line breaks. (optional)
quota_user = 'quota_user_example' # str | 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. (optional)
upload_protocol = 'upload_protocol_example' # str | Upload protocol for media (e.g. \"raw\", \"multipart\"). (optional)
upload_type = 'upload_type_example' # str | Legacy upload protocol for media (e.g. \"media\", \"multipart\"). (optional)

try:
    # Get email filter details
    api_response = api_instance.gmail_users_settings_filters_get(user_id, id, xgafv=xgafv, access_token=access_token, alt=alt, param_callback=param_callback, fields=fields, key=key, oauth_token=oauth_token, pretty_print=pretty_print, quota_user=quota_user, upload_protocol=upload_protocol, upload_type=upload_type)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling UsersApi->gmail_users_settings_filters_get: %s\n" % e)

# Configure OAuth2 access token for authorization: Oauth2
configuration = swagger_client.Configuration()
configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: Oauth2c
configuration = swagger_client.Configuration()
configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.UsersApi(swagger_client.ApiClient(configuration))
user_id = 'user_id_example' # str | User's email address. The special value \"me\" can be used to indicate the authenticated user.
xgafv = 'xgafv_example' # str | V1 error format. (optional)
access_token = 'access_token_example' # str | OAuth access token. (optional)
alt = 'alt_example' # str | Data format for response. (optional)
param_callback = 'param_callback_example' # str | JSONP (optional)
fields = 'fields_example' # str | Selector specifying which fields to include in a partial response. (optional)
key = 'key_example' # str | 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. (optional)
oauth_token = 'oauth_token_example' # str | OAuth 2.0 token for the current user. (optional)
pretty_print = true # bool | Returns response with indentations and line breaks. (optional)
quota_user = 'quota_user_example' # str | 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. (optional)
upload_protocol = 'upload_protocol_example' # str | Upload protocol for media (e.g. \"raw\", \"multipart\"). (optional)
upload_type = 'upload_type_example' # str | Legacy upload protocol for media (e.g. \"media\", \"multipart\"). (optional)

try:
    # List email filters
    api_response = api_instance.gmail_users_settings_filters_list(user_id, xgafv=xgafv, access_token=access_token, alt=alt, param_callback=param_callback, fields=fields, key=key, oauth_token=oauth_token, pretty_print=pretty_print, quota_user=quota_user, upload_protocol=upload_protocol, upload_type=upload_type)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling UsersApi->gmail_users_settings_filters_list: %s\n" % e)

# Configure OAuth2 access token for authorization: Oauth2
configuration = swagger_client.Configuration()
configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: Oauth2c
configuration = swagger_client.Configuration()
configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.UsersApi(swagger_client.ApiClient(configuration))
user_id = 'user_id_example' # str | User's email address. The special value \"me\" can be used to indicate the authenticated user.
body = swagger_client.ForwardingAddress() # ForwardingAddress |  (optional)
xgafv = 'xgafv_example' # str | V1 error format. (optional)
access_token = 'access_token_example' # str | OAuth access token. (optional)
alt = 'alt_example' # str | Data format for response. (optional)
param_callback = 'param_callback_example' # str | JSONP (optional)
fields = 'fields_example' # str | Selector specifying which fields to include in a partial response. (optional)
key = 'key_example' # str | 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. (optional)
oauth_token = 'oauth_token_example' # str | OAuth 2.0 token for the current user. (optional)
pretty_print = true # bool | Returns response with indentations and line breaks. (optional)
quota_user = 'quota_user_example' # str | 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. (optional)
upload_protocol = 'upload_protocol_example' # str | Upload protocol for media (e.g. \"raw\", \"multipart\"). (optional)
upload_type = 'upload_type_example' # str | Legacy upload protocol for media (e.g. \"media\", \"multipart\"). (optional)

try:
    # Create forwarding address
    api_response = api_instance.gmail_users_settings_forwarding_addresses_create(user_id, body=body, xgafv=xgafv, access_token=access_token, alt=alt, param_callback=param_callback, fields=fields, key=key, oauth_token=oauth_token, pretty_print=pretty_print, quota_user=quota_user, upload_protocol=upload_protocol, upload_type=upload_type)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling UsersApi->gmail_users_settings_forwarding_addresses_create: %s\n" % e)

# Configure OAuth2 access token for authorization: Oauth2
configuration = swagger_client.Configuration()
configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: Oauth2c
configuration = swagger_client.Configuration()
configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.UsersApi(swagger_client.ApiClient(configuration))
user_id = 'user_id_example' # str | User's email address. The special value \"me\" can be used to indicate the authenticated user.
forwarding_email = 'forwarding_email_example' # str | The forwarding address to be deleted.
xgafv = 'xgafv_example' # str | V1 error format. (optional)
access_token = 'access_token_example' # str | OAuth access token. (optional)
alt = 'alt_example' # str | Data format for response. (optional)
param_callback = 'param_callback_example' # str | JSONP (optional)
fields = 'fields_example' # str | Selector specifying which fields to include in a partial response. (optional)
key = 'key_example' # str | 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. (optional)
oauth_token = 'oauth_token_example' # str | OAuth 2.0 token for the current user. (optional)
pretty_print = true # bool | Returns response with indentations and line breaks. (optional)
quota_user = 'quota_user_example' # str | 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. (optional)
upload_protocol = 'upload_protocol_example' # str | Upload protocol for media (e.g. \"raw\", \"multipart\"). (optional)
upload_type = 'upload_type_example' # str | Legacy upload protocol for media (e.g. \"media\", \"multipart\"). (optional)

try:
    # Delete forwarding address
    api_instance.gmail_users_settings_forwarding_addresses_delete(user_id, forwarding_email, xgafv=xgafv, access_token=access_token, alt=alt, param_callback=param_callback, fields=fields, key=key, oauth_token=oauth_token, pretty_print=pretty_print, quota_user=quota_user, upload_protocol=upload_protocol, upload_type=upload_type)
except ApiException as e:
    print("Exception when calling UsersApi->gmail_users_settings_forwarding_addresses_delete: %s\n" % e)

# Configure OAuth2 access token for authorization: Oauth2
configuration = swagger_client.Configuration()
configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: Oauth2c
configuration = swagger_client.Configuration()
configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.UsersApi(swagger_client.ApiClient(configuration))
user_id = 'user_id_example' # str | User's email address. The special value \"me\" can be used to indicate the authenticated user.
forwarding_email = 'forwarding_email_example' # str | The forwarding address to be retrieved.
xgafv = 'xgafv_example' # str | V1 error format. (optional)
access_token = 'access_token_example' # str | OAuth access token. (optional)
alt = 'alt_example' # str | Data format for response. (optional)
param_callback = 'param_callback_example' # str | JSONP (optional)
fields = 'fields_example' # str | Selector specifying which fields to include in a partial response. (optional)
key = 'key_example' # str | 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. (optional)
oauth_token = 'oauth_token_example' # str | OAuth 2.0 token for the current user. (optional)
pretty_print = true # bool | Returns response with indentations and line breaks. (optional)
quota_user = 'quota_user_example' # str | 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. (optional)
upload_protocol = 'upload_protocol_example' # str | Upload protocol for media (e.g. \"raw\", \"multipart\"). (optional)
upload_type = 'upload_type_example' # str | Legacy upload protocol for media (e.g. \"media\", \"multipart\"). (optional)

try:
    # Get forwarding address details
    api_response = api_instance.gmail_users_settings_forwarding_addresses_get(user_id, forwarding_email, xgafv=xgafv, access_token=access_token, alt=alt, param_callback=param_callback, fields=fields, key=key, oauth_token=oauth_token, pretty_print=pretty_print, quota_user=quota_user, upload_protocol=upload_protocol, upload_type=upload_type)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling UsersApi->gmail_users_settings_forwarding_addresses_get: %s\n" % e)

# Configure OAuth2 access token for authorization: Oauth2
configuration = swagger_client.Configuration()
configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: Oauth2c
configuration = swagger_client.Configuration()
configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.UsersApi(swagger_client.ApiClient(configuration))
user_id = 'user_id_example' # str | User's email address. The special value \"me\" can be used to indicate the authenticated user.
xgafv = 'xgafv_example' # str | V1 error format. (optional)
access_token = 'access_token_example' # str | OAuth access token. (optional)
alt = 'alt_example' # str | Data format for response. (optional)
param_callback = 'param_callback_example' # str | JSONP (optional)
fields = 'fields_example' # str | Selector specifying which fields to include in a partial response. (optional)
key = 'key_example' # str | 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. (optional)
oauth_token = 'oauth_token_example' # str | OAuth 2.0 token for the current user. (optional)
pretty_print = true # bool | Returns response with indentations and line breaks. (optional)
quota_user = 'quota_user_example' # str | 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. (optional)
upload_protocol = 'upload_protocol_example' # str | Upload protocol for media (e.g. \"raw\", \"multipart\"). (optional)
upload_type = 'upload_type_example' # str | Legacy upload protocol for media (e.g. \"media\", \"multipart\"). (optional)

try:
    # List forwarding addresses
    api_response = api_instance.gmail_users_settings_forwarding_addresses_list(user_id, xgafv=xgafv, access_token=access_token, alt=alt, param_callback=param_callback, fields=fields, key=key, oauth_token=oauth_token, pretty_print=pretty_print, quota_user=quota_user, upload_protocol=upload_protocol, upload_type=upload_type)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling UsersApi->gmail_users_settings_forwarding_addresses_list: %s\n" % e)

# Configure OAuth2 access token for authorization: Oauth2
configuration = swagger_client.Configuration()
configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: Oauth2c
configuration = swagger_client.Configuration()
configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.UsersApi(swagger_client.ApiClient(configuration))
user_id = 'user_id_example' # str | User's email address. The special value \"me\" can be used to indicate the authenticated user.
xgafv = 'xgafv_example' # str | V1 error format. (optional)
access_token = 'access_token_example' # str | OAuth access token. (optional)
alt = 'alt_example' # str | Data format for response. (optional)
param_callback = 'param_callback_example' # str | JSONP (optional)
fields = 'fields_example' # str | Selector specifying which fields to include in a partial response. (optional)
key = 'key_example' # str | 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. (optional)
oauth_token = 'oauth_token_example' # str | OAuth 2.0 token for the current user. (optional)
pretty_print = true # bool | Returns response with indentations and line breaks. (optional)
quota_user = 'quota_user_example' # str | 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. (optional)
upload_protocol = 'upload_protocol_example' # str | Upload protocol for media (e.g. \"raw\", \"multipart\"). (optional)
upload_type = 'upload_type_example' # str | Legacy upload protocol for media (e.g. \"media\", \"multipart\"). (optional)

try:
    # Get auto-forwarding settings
    api_response = api_instance.gmail_users_settings_get_auto_forwarding(user_id, xgafv=xgafv, access_token=access_token, alt=alt, param_callback=param_callback, fields=fields, key=key, oauth_token=oauth_token, pretty_print=pretty_print, quota_user=quota_user, upload_protocol=upload_protocol, upload_type=upload_type)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling UsersApi->gmail_users_settings_get_auto_forwarding: %s\n" % e)

# Configure OAuth2 access token for authorization: Oauth2
configuration = swagger_client.Configuration()
configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: Oauth2c
configuration = swagger_client.Configuration()
configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.UsersApi(swagger_client.ApiClient(configuration))
user_id = 'user_id_example' # str | User's email address. The special value \"me\" can be used to indicate the authenticated user.
xgafv = 'xgafv_example' # str | V1 error format. (optional)
access_token = 'access_token_example' # str | OAuth access token. (optional)
alt = 'alt_example' # str | Data format for response. (optional)
param_callback = 'param_callback_example' # str | JSONP (optional)
fields = 'fields_example' # str | Selector specifying which fields to include in a partial response. (optional)
key = 'key_example' # str | 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. (optional)
oauth_token = 'oauth_token_example' # str | OAuth 2.0 token for the current user. (optional)
pretty_print = true # bool | Returns response with indentations and line breaks. (optional)
quota_user = 'quota_user_example' # str | 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. (optional)
upload_protocol = 'upload_protocol_example' # str | Upload protocol for media (e.g. \"raw\", \"multipart\"). (optional)
upload_type = 'upload_type_example' # str | Legacy upload protocol for media (e.g. \"media\", \"multipart\"). (optional)

try:
    # Get IMAP settings
    api_response = api_instance.gmail_users_settings_get_imap(user_id, xgafv=xgafv, access_token=access_token, alt=alt, param_callback=param_callback, fields=fields, key=key, oauth_token=oauth_token, pretty_print=pretty_print, quota_user=quota_user, upload_protocol=upload_protocol, upload_type=upload_type)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling UsersApi->gmail_users_settings_get_imap: %s\n" % e)

# Configure OAuth2 access token for authorization: Oauth2
configuration = swagger_client.Configuration()
configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: Oauth2c
configuration = swagger_client.Configuration()
configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.UsersApi(swagger_client.ApiClient(configuration))
user_id = 'user_id_example' # str | User's email address. The special value \"me\" can be used to indicate the authenticated user.
xgafv = 'xgafv_example' # str | V1 error format. (optional)
access_token = 'access_token_example' # str | OAuth access token. (optional)
alt = 'alt_example' # str | Data format for response. (optional)
param_callback = 'param_callback_example' # str | JSONP (optional)
fields = 'fields_example' # str | Selector specifying which fields to include in a partial response. (optional)
key = 'key_example' # str | 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. (optional)
oauth_token = 'oauth_token_example' # str | OAuth 2.0 token for the current user. (optional)
pretty_print = true # bool | Returns response with indentations and line breaks. (optional)
quota_user = 'quota_user_example' # str | 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. (optional)
upload_protocol = 'upload_protocol_example' # str | Upload protocol for media (e.g. \"raw\", \"multipart\"). (optional)
upload_type = 'upload_type_example' # str | Legacy upload protocol for media (e.g. \"media\", \"multipart\"). (optional)

try:
    # Get language settings
    api_response = api_instance.gmail_users_settings_get_language(user_id, xgafv=xgafv, access_token=access_token, alt=alt, param_callback=param_callback, fields=fields, key=key, oauth_token=oauth_token, pretty_print=pretty_print, quota_user=quota_user, upload_protocol=upload_protocol, upload_type=upload_type)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling UsersApi->gmail_users_settings_get_language: %s\n" % e)

# Configure OAuth2 access token for authorization: Oauth2
configuration = swagger_client.Configuration()
configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: Oauth2c
configuration = swagger_client.Configuration()
configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.UsersApi(swagger_client.ApiClient(configuration))
user_id = 'user_id_example' # str | User's email address. The special value \"me\" can be used to indicate the authenticated user.
xgafv = 'xgafv_example' # str | V1 error format. (optional)
access_token = 'access_token_example' # str | OAuth access token. (optional)
alt = 'alt_example' # str | Data format for response. (optional)
param_callback = 'param_callback_example' # str | JSONP (optional)
fields = 'fields_example' # str | Selector specifying which fields to include in a partial response. (optional)
key = 'key_example' # str | 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. (optional)
oauth_token = 'oauth_token_example' # str | OAuth 2.0 token for the current user. (optional)
pretty_print = true # bool | Returns response with indentations and line breaks. (optional)
quota_user = 'quota_user_example' # str | 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. (optional)
upload_protocol = 'upload_protocol_example' # str | Upload protocol for media (e.g. \"raw\", \"multipart\"). (optional)
upload_type = 'upload_type_example' # str | Legacy upload protocol for media (e.g. \"media\", \"multipart\"). (optional)

try:
    # Get POP settings
    api_response = api_instance.gmail_users_settings_get_pop(user_id, xgafv=xgafv, access_token=access_token, alt=alt, param_callback=param_callback, fields=fields, key=key, oauth_token=oauth_token, pretty_print=pretty_print, quota_user=quota_user, upload_protocol=upload_protocol, upload_type=upload_type)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling UsersApi->gmail_users_settings_get_pop: %s\n" % e)

# Configure OAuth2 access token for authorization: Oauth2
configuration = swagger_client.Configuration()
configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: Oauth2c
configuration = swagger_client.Configuration()
configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.UsersApi(swagger_client.ApiClient(configuration))
user_id = 'user_id_example' # str | User's email address. The special value \"me\" can be used to indicate the authenticated user.
xgafv = 'xgafv_example' # str | V1 error format. (optional)
access_token = 'access_token_example' # str | OAuth access token. (optional)
alt = 'alt_example' # str | Data format for response. (optional)
param_callback = 'param_callback_example' # str | JSONP (optional)
fields = 'fields_example' # str | Selector specifying which fields to include in a partial response. (optional)
key = 'key_example' # str | 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. (optional)
oauth_token = 'oauth_token_example' # str | OAuth 2.0 token for the current user. (optional)
pretty_print = true # bool | Returns response with indentations and line breaks. (optional)
quota_user = 'quota_user_example' # str | 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. (optional)
upload_protocol = 'upload_protocol_example' # str | Upload protocol for media (e.g. \"raw\", \"multipart\"). (optional)
upload_type = 'upload_type_example' # str | Legacy upload protocol for media (e.g. \"media\", \"multipart\"). (optional)

try:
    # Get vacation responder settings
    api_response = api_instance.gmail_users_settings_get_vacation(user_id, xgafv=xgafv, access_token=access_token, alt=alt, param_callback=param_callback, fields=fields, key=key, oauth_token=oauth_token, pretty_print=pretty_print, quota_user=quota_user, upload_protocol=upload_protocol, upload_type=upload_type)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling UsersApi->gmail_users_settings_get_vacation: %s\n" % e)

# Configure OAuth2 access token for authorization: Oauth2
configuration = swagger_client.Configuration()
configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: Oauth2c
configuration = swagger_client.Configuration()
configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.UsersApi(swagger_client.ApiClient(configuration))
user_id = 'user_id_example' # str | User's email address. The special value \"me\" can be used to indicate the authenticated user.
body = swagger_client.SendAs() # SendAs |  (optional)
xgafv = 'xgafv_example' # str | V1 error format. (optional)
access_token = 'access_token_example' # str | OAuth access token. (optional)
alt = 'alt_example' # str | Data format for response. (optional)
param_callback = 'param_callback_example' # str | JSONP (optional)
fields = 'fields_example' # str | Selector specifying which fields to include in a partial response. (optional)
key = 'key_example' # str | 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. (optional)
oauth_token = 'oauth_token_example' # str | OAuth 2.0 token for the current user. (optional)
pretty_print = true # bool | Returns response with indentations and line breaks. (optional)
quota_user = 'quota_user_example' # str | 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. (optional)
upload_protocol = 'upload_protocol_example' # str | Upload protocol for media (e.g. \"raw\", \"multipart\"). (optional)
upload_type = 'upload_type_example' # str | Legacy upload protocol for media (e.g. \"media\", \"multipart\"). (optional)

try:
    # Create send-as alias
    api_response = api_instance.gmail_users_settings_send_as_create(user_id, body=body, xgafv=xgafv, access_token=access_token, alt=alt, param_callback=param_callback, fields=fields, key=key, oauth_token=oauth_token, pretty_print=pretty_print, quota_user=quota_user, upload_protocol=upload_protocol, upload_type=upload_type)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling UsersApi->gmail_users_settings_send_as_create: %s\n" % e)

# Configure OAuth2 access token for authorization: Oauth2
configuration = swagger_client.Configuration()
configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: Oauth2c
configuration = swagger_client.Configuration()
configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.UsersApi(swagger_client.ApiClient(configuration))
user_id = 'user_id_example' # str | User's email address. The special value \"me\" can be used to indicate the authenticated user.
send_as_email = 'send_as_email_example' # str | The send-as alias to be deleted.
xgafv = 'xgafv_example' # str | V1 error format. (optional)
access_token = 'access_token_example' # str | OAuth access token. (optional)
alt = 'alt_example' # str | Data format for response. (optional)
param_callback = 'param_callback_example' # str | JSONP (optional)
fields = 'fields_example' # str | Selector specifying which fields to include in a partial response. (optional)
key = 'key_example' # str | 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. (optional)
oauth_token = 'oauth_token_example' # str | OAuth 2.0 token for the current user. (optional)
pretty_print = true # bool | Returns response with indentations and line breaks. (optional)
quota_user = 'quota_user_example' # str | 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. (optional)
upload_protocol = 'upload_protocol_example' # str | Upload protocol for media (e.g. \"raw\", \"multipart\"). (optional)
upload_type = 'upload_type_example' # str | Legacy upload protocol for media (e.g. \"media\", \"multipart\"). (optional)

try:
    # Delete send-as alias
    api_instance.gmail_users_settings_send_as_delete(user_id, send_as_email, xgafv=xgafv, access_token=access_token, alt=alt, param_callback=param_callback, fields=fields, key=key, oauth_token=oauth_token, pretty_print=pretty_print, quota_user=quota_user, upload_protocol=upload_protocol, upload_type=upload_type)
except ApiException as e:
    print("Exception when calling UsersApi->gmail_users_settings_send_as_delete: %s\n" % e)

# Configure OAuth2 access token for authorization: Oauth2
configuration = swagger_client.Configuration()
configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: Oauth2c
configuration = swagger_client.Configuration()
configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.UsersApi(swagger_client.ApiClient(configuration))
user_id = 'user_id_example' # str | User's email address. The special value \"me\" can be used to indicate the authenticated user.
send_as_email = 'send_as_email_example' # str | The send-as alias to be retrieved.
xgafv = 'xgafv_example' # str | V1 error format. (optional)
access_token = 'access_token_example' # str | OAuth access token. (optional)
alt = 'alt_example' # str | Data format for response. (optional)
param_callback = 'param_callback_example' # str | JSONP (optional)
fields = 'fields_example' # str | Selector specifying which fields to include in a partial response. (optional)
key = 'key_example' # str | 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. (optional)
oauth_token = 'oauth_token_example' # str | OAuth 2.0 token for the current user. (optional)
pretty_print = true # bool | Returns response with indentations and line breaks. (optional)
quota_user = 'quota_user_example' # str | 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. (optional)
upload_protocol = 'upload_protocol_example' # str | Upload protocol for media (e.g. \"raw\", \"multipart\"). (optional)
upload_type = 'upload_type_example' # str | Legacy upload protocol for media (e.g. \"media\", \"multipart\"). (optional)

try:
    # Get send-as alias details
    api_response = api_instance.gmail_users_settings_send_as_get(user_id, send_as_email, xgafv=xgafv, access_token=access_token, alt=alt, param_callback=param_callback, fields=fields, key=key, oauth_token=oauth_token, pretty_print=pretty_print, quota_user=quota_user, upload_protocol=upload_protocol, upload_type=upload_type)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling UsersApi->gmail_users_settings_send_as_get: %s\n" % e)

# Configure OAuth2 access token for authorization: Oauth2
configuration = swagger_client.Configuration()
configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: Oauth2c
configuration = swagger_client.Configuration()
configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.UsersApi(swagger_client.ApiClient(configuration))
user_id = 'user_id_example' # str | User's email address. The special value \"me\" can be used to indicate the authenticated user.
xgafv = 'xgafv_example' # str | V1 error format. (optional)
access_token = 'access_token_example' # str | OAuth access token. (optional)
alt = 'alt_example' # str | Data format for response. (optional)
param_callback = 'param_callback_example' # str | JSONP (optional)
fields = 'fields_example' # str | Selector specifying which fields to include in a partial response. (optional)
key = 'key_example' # str | 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. (optional)
oauth_token = 'oauth_token_example' # str | OAuth 2.0 token for the current user. (optional)
pretty_print = true # bool | Returns response with indentations and line breaks. (optional)
quota_user = 'quota_user_example' # str | 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. (optional)
upload_protocol = 'upload_protocol_example' # str | Upload protocol for media (e.g. \"raw\", \"multipart\"). (optional)
upload_type = 'upload_type_example' # str | Legacy upload protocol for media (e.g. \"media\", \"multipart\"). (optional)

try:
    # List send-as aliases
    api_response = api_instance.gmail_users_settings_send_as_list(user_id, xgafv=xgafv, access_token=access_token, alt=alt, param_callback=param_callback, fields=fields, key=key, oauth_token=oauth_token, pretty_print=pretty_print, quota_user=quota_user, upload_protocol=upload_protocol, upload_type=upload_type)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling UsersApi->gmail_users_settings_send_as_list: %s\n" % e)

# Configure OAuth2 access token for authorization: Oauth2
configuration = swagger_client.Configuration()
configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: Oauth2c
configuration = swagger_client.Configuration()
configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.UsersApi(swagger_client.ApiClient(configuration))
user_id = 'user_id_example' # str | User's email address. The special value \"me\" can be used to indicate the authenticated user.
send_as_email = 'send_as_email_example' # str | The send-as alias to be updated.
body = swagger_client.SendAs() # SendAs |  (optional)
xgafv = 'xgafv_example' # str | V1 error format. (optional)
access_token = 'access_token_example' # str | OAuth access token. (optional)
alt = 'alt_example' # str | Data format for response. (optional)
param_callback = 'param_callback_example' # str | JSONP (optional)
fields = 'fields_example' # str | Selector specifying which fields to include in a partial response. (optional)
key = 'key_example' # str | 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. (optional)
oauth_token = 'oauth_token_example' # str | OAuth 2.0 token for the current user. (optional)
pretty_print = true # bool | Returns response with indentations and line breaks. (optional)
quota_user = 'quota_user_example' # str | 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. (optional)
upload_protocol = 'upload_protocol_example' # str | Upload protocol for media (e.g. \"raw\", \"multipart\"). (optional)
upload_type = 'upload_type_example' # str | Legacy upload protocol for media (e.g. \"media\", \"multipart\"). (optional)

try:
    # Update send-as alias settings
    api_response = api_instance.gmail_users_settings_send_as_patch(user_id, send_as_email, body=body, xgafv=xgafv, access_token=access_token, alt=alt, param_callback=param_callback, fields=fields, key=key, oauth_token=oauth_token, pretty_print=pretty_print, quota_user=quota_user, upload_protocol=upload_protocol, upload_type=upload_type)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling UsersApi->gmail_users_settings_send_as_patch: %s\n" % e)

# Configure OAuth2 access token for authorization: Oauth2
configuration = swagger_client.Configuration()
configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: Oauth2c
configuration = swagger_client.Configuration()
configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.UsersApi(swagger_client.ApiClient(configuration))
user_id = 'user_id_example' # str | The user's email address. The special value `me` can be used to indicate the authenticated user.
send_as_email = 'send_as_email_example' # str | The email address that appears in the \"From:\" header for mail sent using this alias.
id = 'id_example' # str | The immutable ID for the SmimeInfo.
xgafv = 'xgafv_example' # str | V1 error format. (optional)
access_token = 'access_token_example' # str | OAuth access token. (optional)
alt = 'alt_example' # str | Data format for response. (optional)
param_callback = 'param_callback_example' # str | JSONP (optional)
fields = 'fields_example' # str | Selector specifying which fields to include in a partial response. (optional)
key = 'key_example' # str | 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. (optional)
oauth_token = 'oauth_token_example' # str | OAuth 2.0 token for the current user. (optional)
pretty_print = true # bool | Returns response with indentations and line breaks. (optional)
quota_user = 'quota_user_example' # str | 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. (optional)
upload_protocol = 'upload_protocol_example' # str | Upload protocol for media (e.g. \"raw\", \"multipart\"). (optional)
upload_type = 'upload_type_example' # str | Legacy upload protocol for media (e.g. \"media\", \"multipart\"). (optional)

try:
    # Delete S/MIME configuration
    api_instance.gmail_users_settings_send_as_smime_info_delete(user_id, send_as_email, id, xgafv=xgafv, access_token=access_token, alt=alt, param_callback=param_callback, fields=fields, key=key, oauth_token=oauth_token, pretty_print=pretty_print, quota_user=quota_user, upload_protocol=upload_protocol, upload_type=upload_type)
except ApiException as e:
    print("Exception when calling UsersApi->gmail_users_settings_send_as_smime_info_delete: %s\n" % e)

# Configure OAuth2 access token for authorization: Oauth2
configuration = swagger_client.Configuration()
configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: Oauth2c
configuration = swagger_client.Configuration()
configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.UsersApi(swagger_client.ApiClient(configuration))
user_id = 'user_id_example' # str | The user's email address. The special value `me` can be used to indicate the authenticated user.
send_as_email = 'send_as_email_example' # str | The email address that appears in the \"From:\" header for mail sent using this alias.
id = 'id_example' # str | The immutable ID for the SmimeInfo.
xgafv = 'xgafv_example' # str | V1 error format. (optional)
access_token = 'access_token_example' # str | OAuth access token. (optional)
alt = 'alt_example' # str | Data format for response. (optional)
param_callback = 'param_callback_example' # str | JSONP (optional)
fields = 'fields_example' # str | Selector specifying which fields to include in a partial response. (optional)
key = 'key_example' # str | 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. (optional)
oauth_token = 'oauth_token_example' # str | OAuth 2.0 token for the current user. (optional)
pretty_print = true # bool | Returns response with indentations and line breaks. (optional)
quota_user = 'quota_user_example' # str | 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. (optional)
upload_protocol = 'upload_protocol_example' # str | Upload protocol for media (e.g. \"raw\", \"multipart\"). (optional)
upload_type = 'upload_type_example' # str | Legacy upload protocol for media (e.g. \"media\", \"multipart\"). (optional)

try:
    # Get S/MIME configuration details
    api_response = api_instance.gmail_users_settings_send_as_smime_info_get(user_id, send_as_email, id, xgafv=xgafv, access_token=access_token, alt=alt, param_callback=param_callback, fields=fields, key=key, oauth_token=oauth_token, pretty_print=pretty_print, quota_user=quota_user, upload_protocol=upload_protocol, upload_type=upload_type)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling UsersApi->gmail_users_settings_send_as_smime_info_get: %s\n" % e)

# Configure OAuth2 access token for authorization: Oauth2
configuration = swagger_client.Configuration()
configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: Oauth2c
configuration = swagger_client.Configuration()
configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.UsersApi(swagger_client.ApiClient(configuration))
user_id = 'user_id_example' # str | The user's email address. The special value `me` can be used to indicate the authenticated user.
send_as_email = 'send_as_email_example' # str | The email address that appears in the \"From:\" header for mail sent using this alias.
body = swagger_client.SmimeInfo() # SmimeInfo |  (optional)
xgafv = 'xgafv_example' # str | V1 error format. (optional)
access_token = 'access_token_example' # str | OAuth access token. (optional)
alt = 'alt_example' # str | Data format for response. (optional)
param_callback = 'param_callback_example' # str | JSONP (optional)
fields = 'fields_example' # str | Selector specifying which fields to include in a partial response. (optional)
key = 'key_example' # str | 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. (optional)
oauth_token = 'oauth_token_example' # str | OAuth 2.0 token for the current user. (optional)
pretty_print = true # bool | Returns response with indentations and line breaks. (optional)
quota_user = 'quota_user_example' # str | 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. (optional)
upload_protocol = 'upload_protocol_example' # str | Upload protocol for media (e.g. \"raw\", \"multipart\"). (optional)
upload_type = 'upload_type_example' # str | Legacy upload protocol for media (e.g. \"media\", \"multipart\"). (optional)

try:
    # Add S/MIME configuration
    api_response = api_instance.gmail_users_settings_send_as_smime_info_insert(user_id, send_as_email, body=body, xgafv=xgafv, access_token=access_token, alt=alt, param_callback=param_callback, fields=fields, key=key, oauth_token=oauth_token, pretty_print=pretty_print, quota_user=quota_user, upload_protocol=upload_protocol, upload_type=upload_type)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling UsersApi->gmail_users_settings_send_as_smime_info_insert: %s\n" % e)

# Configure OAuth2 access token for authorization: Oauth2
configuration = swagger_client.Configuration()
configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: Oauth2c
configuration = swagger_client.Configuration()
configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.UsersApi(swagger_client.ApiClient(configuration))
user_id = 'user_id_example' # str | The user's email address. The special value `me` can be used to indicate the authenticated user.
send_as_email = 'send_as_email_example' # str | The email address that appears in the \"From:\" header for mail sent using this alias.
xgafv = 'xgafv_example' # str | V1 error format. (optional)
access_token = 'access_token_example' # str | OAuth access token. (optional)
alt = 'alt_example' # str | Data format for response. (optional)
param_callback = 'param_callback_example' # str | JSONP (optional)
fields = 'fields_example' # str | Selector specifying which fields to include in a partial response. (optional)
key = 'key_example' # str | 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. (optional)
oauth_token = 'oauth_token_example' # str | OAuth 2.0 token for the current user. (optional)
pretty_print = true # bool | Returns response with indentations and line breaks. (optional)
quota_user = 'quota_user_example' # str | 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. (optional)
upload_protocol = 'upload_protocol_example' # str | Upload protocol for media (e.g. \"raw\", \"multipart\"). (optional)
upload_type = 'upload_type_example' # str | Legacy upload protocol for media (e.g. \"media\", \"multipart\"). (optional)

try:
    # List S/MIME configurations
    api_response = api_instance.gmail_users_settings_send_as_smime_info_list(user_id, send_as_email, xgafv=xgafv, access_token=access_token, alt=alt, param_callback=param_callback, fields=fields, key=key, oauth_token=oauth_token, pretty_print=pretty_print, quota_user=quota_user, upload_protocol=upload_protocol, upload_type=upload_type)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling UsersApi->gmail_users_settings_send_as_smime_info_list: %s\n" % e)

# Configure OAuth2 access token for authorization: Oauth2
configuration = swagger_client.Configuration()
configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: Oauth2c
configuration = swagger_client.Configuration()
configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.UsersApi(swagger_client.ApiClient(configuration))
user_id = 'user_id_example' # str | The user's email address. The special value `me` can be used to indicate the authenticated user.
send_as_email = 'send_as_email_example' # str | The email address that appears in the \"From:\" header for mail sent using this alias.
id = 'id_example' # str | The immutable ID for the SmimeInfo.
xgafv = 'xgafv_example' # str | V1 error format. (optional)
access_token = 'access_token_example' # str | OAuth access token. (optional)
alt = 'alt_example' # str | Data format for response. (optional)
param_callback = 'param_callback_example' # str | JSONP (optional)
fields = 'fields_example' # str | Selector specifying which fields to include in a partial response. (optional)
key = 'key_example' # str | 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. (optional)
oauth_token = 'oauth_token_example' # str | OAuth 2.0 token for the current user. (optional)
pretty_print = true # bool | Returns response with indentations and line breaks. (optional)
quota_user = 'quota_user_example' # str | 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. (optional)
upload_protocol = 'upload_protocol_example' # str | Upload protocol for media (e.g. \"raw\", \"multipart\"). (optional)
upload_type = 'upload_type_example' # str | Legacy upload protocol for media (e.g. \"media\", \"multipart\"). (optional)

try:
    # Set default S/MIME configuration
    api_instance.gmail_users_settings_send_as_smime_info_set_default(user_id, send_as_email, id, xgafv=xgafv, access_token=access_token, alt=alt, param_callback=param_callback, fields=fields, key=key, oauth_token=oauth_token, pretty_print=pretty_print, quota_user=quota_user, upload_protocol=upload_protocol, upload_type=upload_type)
except ApiException as e:
    print("Exception when calling UsersApi->gmail_users_settings_send_as_smime_info_set_default: %s\n" % e)

# Configure OAuth2 access token for authorization: Oauth2
configuration = swagger_client.Configuration()
configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: Oauth2c
configuration = swagger_client.Configuration()
configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.UsersApi(swagger_client.ApiClient(configuration))
user_id = 'user_id_example' # str | User's email address. The special value \"me\" can be used to indicate the authenticated user.
send_as_email = 'send_as_email_example' # str | The send-as alias to be updated.
body = swagger_client.SendAs() # SendAs |  (optional)
xgafv = 'xgafv_example' # str | V1 error format. (optional)
access_token = 'access_token_example' # str | OAuth access token. (optional)
alt = 'alt_example' # str | Data format for response. (optional)
param_callback = 'param_callback_example' # str | JSONP (optional)
fields = 'fields_example' # str | Selector specifying which fields to include in a partial response. (optional)
key = 'key_example' # str | 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. (optional)
oauth_token = 'oauth_token_example' # str | OAuth 2.0 token for the current user. (optional)
pretty_print = true # bool | Returns response with indentations and line breaks. (optional)
quota_user = 'quota_user_example' # str | 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. (optional)
upload_protocol = 'upload_protocol_example' # str | Upload protocol for media (e.g. \"raw\", \"multipart\"). (optional)
upload_type = 'upload_type_example' # str | Legacy upload protocol for media (e.g. \"media\", \"multipart\"). (optional)

try:
    # Replace send-as alias configuration
    api_response = api_instance.gmail_users_settings_send_as_update(user_id, send_as_email, body=body, xgafv=xgafv, access_token=access_token, alt=alt, param_callback=param_callback, fields=fields, key=key, oauth_token=oauth_token, pretty_print=pretty_print, quota_user=quota_user, upload_protocol=upload_protocol, upload_type=upload_type)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling UsersApi->gmail_users_settings_send_as_update: %s\n" % e)

# Configure OAuth2 access token for authorization: Oauth2
configuration = swagger_client.Configuration()
configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: Oauth2c
configuration = swagger_client.Configuration()
configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.UsersApi(swagger_client.ApiClient(configuration))
user_id = 'user_id_example' # str | User's email address. The special value \"me\" can be used to indicate the authenticated user.
send_as_email = 'send_as_email_example' # str | The send-as alias to be verified.
xgafv = 'xgafv_example' # str | V1 error format. (optional)
access_token = 'access_token_example' # str | OAuth access token. (optional)
alt = 'alt_example' # str | Data format for response. (optional)
param_callback = 'param_callback_example' # str | JSONP (optional)
fields = 'fields_example' # str | Selector specifying which fields to include in a partial response. (optional)
key = 'key_example' # str | 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. (optional)
oauth_token = 'oauth_token_example' # str | OAuth 2.0 token for the current user. (optional)
pretty_print = true # bool | Returns response with indentations and line breaks. (optional)
quota_user = 'quota_user_example' # str | 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. (optional)
upload_protocol = 'upload_protocol_example' # str | Upload protocol for media (e.g. \"raw\", \"multipart\"). (optional)
upload_type = 'upload_type_example' # str | Legacy upload protocol for media (e.g. \"media\", \"multipart\"). (optional)

try:
    # Verify send-as alias
    api_instance.gmail_users_settings_send_as_verify(user_id, send_as_email, xgafv=xgafv, access_token=access_token, alt=alt, param_callback=param_callback, fields=fields, key=key, oauth_token=oauth_token, pretty_print=pretty_print, quota_user=quota_user, upload_protocol=upload_protocol, upload_type=upload_type)
except ApiException as e:
    print("Exception when calling UsersApi->gmail_users_settings_send_as_verify: %s\n" % e)

# Configure OAuth2 access token for authorization: Oauth2
configuration = swagger_client.Configuration()
configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: Oauth2c
configuration = swagger_client.Configuration()
configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.UsersApi(swagger_client.ApiClient(configuration))
user_id = 'user_id_example' # str | User's email address. The special value \"me\" can be used to indicate the authenticated user.
body = swagger_client.AutoForwarding() # AutoForwarding |  (optional)
xgafv = 'xgafv_example' # str | V1 error format. (optional)
access_token = 'access_token_example' # str | OAuth access token. (optional)
alt = 'alt_example' # str | Data format for response. (optional)
param_callback = 'param_callback_example' # str | JSONP (optional)
fields = 'fields_example' # str | Selector specifying which fields to include in a partial response. (optional)
key = 'key_example' # str | 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. (optional)
oauth_token = 'oauth_token_example' # str | OAuth 2.0 token for the current user. (optional)
pretty_print = true # bool | Returns response with indentations and line breaks. (optional)
quota_user = 'quota_user_example' # str | 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. (optional)
upload_protocol = 'upload_protocol_example' # str | Upload protocol for media (e.g. \"raw\", \"multipart\"). (optional)
upload_type = 'upload_type_example' # str | Legacy upload protocol for media (e.g. \"media\", \"multipart\"). (optional)

try:
    # Update auto-forwarding settings
    api_response = api_instance.gmail_users_settings_update_auto_forwarding(user_id, body=body, xgafv=xgafv, access_token=access_token, alt=alt, param_callback=param_callback, fields=fields, key=key, oauth_token=oauth_token, pretty_print=pretty_print, quota_user=quota_user, upload_protocol=upload_protocol, upload_type=upload_type)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling UsersApi->gmail_users_settings_update_auto_forwarding: %s\n" % e)

# Configure OAuth2 access token for authorization: Oauth2
configuration = swagger_client.Configuration()
configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: Oauth2c
configuration = swagger_client.Configuration()
configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.UsersApi(swagger_client.ApiClient(configuration))
user_id = 'user_id_example' # str | User's email address. The special value \"me\" can be used to indicate the authenticated user.
body = swagger_client.ImapSettings() # ImapSettings |  (optional)
xgafv = 'xgafv_example' # str | V1 error format. (optional)
access_token = 'access_token_example' # str | OAuth access token. (optional)
alt = 'alt_example' # str | Data format for response. (optional)
param_callback = 'param_callback_example' # str | JSONP (optional)
fields = 'fields_example' # str | Selector specifying which fields to include in a partial response. (optional)
key = 'key_example' # str | 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. (optional)
oauth_token = 'oauth_token_example' # str | OAuth 2.0 token for the current user. (optional)
pretty_print = true # bool | Returns response with indentations and line breaks. (optional)
quota_user = 'quota_user_example' # str | 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. (optional)
upload_protocol = 'upload_protocol_example' # str | Upload protocol for media (e.g. \"raw\", \"multipart\"). (optional)
upload_type = 'upload_type_example' # str | Legacy upload protocol for media (e.g. \"media\", \"multipart\"). (optional)

try:
    # Update IMAP settings
    api_response = api_instance.gmail_users_settings_update_imap(user_id, body=body, xgafv=xgafv, access_token=access_token, alt=alt, param_callback=param_callback, fields=fields, key=key, oauth_token=oauth_token, pretty_print=pretty_print, quota_user=quota_user, upload_protocol=upload_protocol, upload_type=upload_type)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling UsersApi->gmail_users_settings_update_imap: %s\n" % e)

# Configure OAuth2 access token for authorization: Oauth2
configuration = swagger_client.Configuration()
configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: Oauth2c
configuration = swagger_client.Configuration()
configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.UsersApi(swagger_client.ApiClient(configuration))
user_id = 'user_id_example' # str | User's email address. The special value \"me\" can be used to indicate the authenticated user.
body = swagger_client.LanguageSettings() # LanguageSettings |  (optional)
xgafv = 'xgafv_example' # str | V1 error format. (optional)
access_token = 'access_token_example' # str | OAuth access token. (optional)
alt = 'alt_example' # str | Data format for response. (optional)
param_callback = 'param_callback_example' # str | JSONP (optional)
fields = 'fields_example' # str | Selector specifying which fields to include in a partial response. (optional)
key = 'key_example' # str | 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. (optional)
oauth_token = 'oauth_token_example' # str | OAuth 2.0 token for the current user. (optional)
pretty_print = true # bool | Returns response with indentations and line breaks. (optional)
quota_user = 'quota_user_example' # str | 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. (optional)
upload_protocol = 'upload_protocol_example' # str | Upload protocol for media (e.g. \"raw\", \"multipart\"). (optional)
upload_type = 'upload_type_example' # str | Legacy upload protocol for media (e.g. \"media\", \"multipart\"). (optional)

try:
    # Update language settings
    api_response = api_instance.gmail_users_settings_update_language(user_id, body=body, xgafv=xgafv, access_token=access_token, alt=alt, param_callback=param_callback, fields=fields, key=key, oauth_token=oauth_token, pretty_print=pretty_print, quota_user=quota_user, upload_protocol=upload_protocol, upload_type=upload_type)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling UsersApi->gmail_users_settings_update_language: %s\n" % e)

# Configure OAuth2 access token for authorization: Oauth2
configuration = swagger_client.Configuration()
configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: Oauth2c
configuration = swagger_client.Configuration()
configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.UsersApi(swagger_client.ApiClient(configuration))
user_id = 'user_id_example' # str | User's email address. The special value \"me\" can be used to indicate the authenticated user.
body = swagger_client.PopSettings() # PopSettings |  (optional)
xgafv = 'xgafv_example' # str | V1 error format. (optional)
access_token = 'access_token_example' # str | OAuth access token. (optional)
alt = 'alt_example' # str | Data format for response. (optional)
param_callback = 'param_callback_example' # str | JSONP (optional)
fields = 'fields_example' # str | Selector specifying which fields to include in a partial response. (optional)
key = 'key_example' # str | 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. (optional)
oauth_token = 'oauth_token_example' # str | OAuth 2.0 token for the current user. (optional)
pretty_print = true # bool | Returns response with indentations and line breaks. (optional)
quota_user = 'quota_user_example' # str | 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. (optional)
upload_protocol = 'upload_protocol_example' # str | Upload protocol for media (e.g. \"raw\", \"multipart\"). (optional)
upload_type = 'upload_type_example' # str | Legacy upload protocol for media (e.g. \"media\", \"multipart\"). (optional)

try:
    # Update POP settings
    api_response = api_instance.gmail_users_settings_update_pop(user_id, body=body, xgafv=xgafv, access_token=access_token, alt=alt, param_callback=param_callback, fields=fields, key=key, oauth_token=oauth_token, pretty_print=pretty_print, quota_user=quota_user, upload_protocol=upload_protocol, upload_type=upload_type)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling UsersApi->gmail_users_settings_update_pop: %s\n" % e)

# Configure OAuth2 access token for authorization: Oauth2
configuration = swagger_client.Configuration()
configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: Oauth2c
configuration = swagger_client.Configuration()
configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.UsersApi(swagger_client.ApiClient(configuration))
user_id = 'user_id_example' # str | User's email address. The special value \"me\" can be used to indicate the authenticated user.
body = swagger_client.VacationSettings() # VacationSettings |  (optional)
xgafv = 'xgafv_example' # str | V1 error format. (optional)
access_token = 'access_token_example' # str | OAuth access token. (optional)
alt = 'alt_example' # str | Data format for response. (optional)
param_callback = 'param_callback_example' # str | JSONP (optional)
fields = 'fields_example' # str | Selector specifying which fields to include in a partial response. (optional)
key = 'key_example' # str | 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. (optional)
oauth_token = 'oauth_token_example' # str | OAuth 2.0 token for the current user. (optional)
pretty_print = true # bool | Returns response with indentations and line breaks. (optional)
quota_user = 'quota_user_example' # str | 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. (optional)
upload_protocol = 'upload_protocol_example' # str | Upload protocol for media (e.g. \"raw\", \"multipart\"). (optional)
upload_type = 'upload_type_example' # str | Legacy upload protocol for media (e.g. \"media\", \"multipart\"). (optional)

try:
    # Update vacation responder settings
    api_response = api_instance.gmail_users_settings_update_vacation(user_id, body=body, xgafv=xgafv, access_token=access_token, alt=alt, param_callback=param_callback, fields=fields, key=key, oauth_token=oauth_token, pretty_print=pretty_print, quota_user=quota_user, upload_protocol=upload_protocol, upload_type=upload_type)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling UsersApi->gmail_users_settings_update_vacation: %s\n" % e)

# Configure OAuth2 access token for authorization: Oauth2
configuration = swagger_client.Configuration()
configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: Oauth2c
configuration = swagger_client.Configuration()
configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.UsersApi(swagger_client.ApiClient(configuration))
user_id = 'user_id_example' # str | The user's email address. The special value `me` can be used to indicate the authenticated user.
xgafv = 'xgafv_example' # str | V1 error format. (optional)
access_token = 'access_token_example' # str | OAuth access token. (optional)
alt = 'alt_example' # str | Data format for response. (optional)
param_callback = 'param_callback_example' # str | JSONP (optional)
fields = 'fields_example' # str | Selector specifying which fields to include in a partial response. (optional)
key = 'key_example' # str | 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. (optional)
oauth_token = 'oauth_token_example' # str | OAuth 2.0 token for the current user. (optional)
pretty_print = true # bool | Returns response with indentations and line breaks. (optional)
quota_user = 'quota_user_example' # str | 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. (optional)
upload_protocol = 'upload_protocol_example' # str | Upload protocol for media (e.g. \"raw\", \"multipart\"). (optional)
upload_type = 'upload_type_example' # str | Legacy upload protocol for media (e.g. \"media\", \"multipart\"). (optional)

try:
    # Stop push notifications
    api_instance.gmail_users_stop(user_id, xgafv=xgafv, access_token=access_token, alt=alt, param_callback=param_callback, fields=fields, key=key, oauth_token=oauth_token, pretty_print=pretty_print, quota_user=quota_user, upload_protocol=upload_protocol, upload_type=upload_type)
except ApiException as e:
    print("Exception when calling UsersApi->gmail_users_stop: %s\n" % e)

# Configure OAuth2 access token for authorization: Oauth2
configuration = swagger_client.Configuration()
configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: Oauth2c
configuration = swagger_client.Configuration()
configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.UsersApi(swagger_client.ApiClient(configuration))
user_id = 'user_id_example' # str | The user's email address. The special value `me` can be used to indicate the authenticated user.
id = 'id_example' # str | ID of the Thread to delete.
xgafv = 'xgafv_example' # str | V1 error format. (optional)
access_token = 'access_token_example' # str | OAuth access token. (optional)
alt = 'alt_example' # str | Data format for response. (optional)
param_callback = 'param_callback_example' # str | JSONP (optional)
fields = 'fields_example' # str | Selector specifying which fields to include in a partial response. (optional)
key = 'key_example' # str | 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. (optional)
oauth_token = 'oauth_token_example' # str | OAuth 2.0 token for the current user. (optional)
pretty_print = true # bool | Returns response with indentations and line breaks. (optional)
quota_user = 'quota_user_example' # str | 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. (optional)
upload_protocol = 'upload_protocol_example' # str | Upload protocol for media (e.g. \"raw\", \"multipart\"). (optional)
upload_type = 'upload_type_example' # str | Legacy upload protocol for media (e.g. \"media\", \"multipart\"). (optional)

try:
    # Permanently delete email thread
    api_instance.gmail_users_threads_delete(user_id, id, xgafv=xgafv, access_token=access_token, alt=alt, param_callback=param_callback, fields=fields, key=key, oauth_token=oauth_token, pretty_print=pretty_print, quota_user=quota_user, upload_protocol=upload_protocol, upload_type=upload_type)
except ApiException as e:
    print("Exception when calling UsersApi->gmail_users_threads_delete: %s\n" % e)

# Configure OAuth2 access token for authorization: Oauth2
configuration = swagger_client.Configuration()
configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: Oauth2c
configuration = swagger_client.Configuration()
configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.UsersApi(swagger_client.ApiClient(configuration))
user_id = 'user_id_example' # str | The user's email address. The special value `me` can be used to indicate the authenticated user.
id = 'id_example' # str | The ID of the thread to retrieve.
xgafv = 'xgafv_example' # str | V1 error format. (optional)
access_token = 'access_token_example' # str | OAuth access token. (optional)
alt = 'alt_example' # str | Data format for response. (optional)
param_callback = 'param_callback_example' # str | JSONP (optional)
fields = 'fields_example' # str | Selector specifying which fields to include in a partial response. (optional)
key = 'key_example' # str | 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. (optional)
oauth_token = 'oauth_token_example' # str | OAuth 2.0 token for the current user. (optional)
pretty_print = true # bool | Returns response with indentations and line breaks. (optional)
quota_user = 'quota_user_example' # str | 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. (optional)
upload_protocol = 'upload_protocol_example' # str | Upload protocol for media (e.g. \"raw\", \"multipart\"). (optional)
upload_type = 'upload_type_example' # str | Legacy upload protocol for media (e.g. \"media\", \"multipart\"). (optional)
format = 'format_example' # str | The format to return the messages in. (optional)
metadata_headers = ['metadata_headers_example'] # list[str] | When given and format is METADATA, only include headers specified. (optional)

try:
    # Get email thread details
    api_response = api_instance.gmail_users_threads_get(user_id, id, xgafv=xgafv, access_token=access_token, alt=alt, param_callback=param_callback, fields=fields, key=key, oauth_token=oauth_token, pretty_print=pretty_print, quota_user=quota_user, upload_protocol=upload_protocol, upload_type=upload_type, format=format, metadata_headers=metadata_headers)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling UsersApi->gmail_users_threads_get: %s\n" % e)

# Configure OAuth2 access token for authorization: Oauth2
configuration = swagger_client.Configuration()
configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: Oauth2c
configuration = swagger_client.Configuration()
configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.UsersApi(swagger_client.ApiClient(configuration))
user_id = 'user_id_example' # str | The user's email address. The special value `me` can be used to indicate the authenticated user.
xgafv = 'xgafv_example' # str | V1 error format. (optional)
access_token = 'access_token_example' # str | OAuth access token. (optional)
alt = 'alt_example' # str | Data format for response. (optional)
param_callback = 'param_callback_example' # str | JSONP (optional)
fields = 'fields_example' # str | Selector specifying which fields to include in a partial response. (optional)
key = 'key_example' # str | 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. (optional)
oauth_token = 'oauth_token_example' # str | OAuth 2.0 token for the current user. (optional)
pretty_print = true # bool | Returns response with indentations and line breaks. (optional)
quota_user = 'quota_user_example' # str | 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. (optional)
upload_protocol = 'upload_protocol_example' # str | Upload protocol for media (e.g. \"raw\", \"multipart\"). (optional)
upload_type = 'upload_type_example' # str | Legacy upload protocol for media (e.g. \"media\", \"multipart\"). (optional)
include_spam_trash = true # bool | Include threads from `SPAM` and `TRASH` in the results. (optional)
label_ids = ['label_ids_example'] # list[str] | Only return threads with labels that match all of the specified label IDs. (optional)
max_results = 56 # int | Maximum number of threads to return. This field defaults to 100. The maximum allowed value for this field is 500. (optional)
page_token = 'page_token_example' # str | Page token to retrieve a specific page of results in the list. (optional)
q = 'q_example' # str | 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\"`. Parameter cannot be used when accessing the api using the gmail.metadata scope. (optional)

try:
    # List email threads
    api_response = api_instance.gmail_users_threads_list(user_id, xgafv=xgafv, access_token=access_token, alt=alt, param_callback=param_callback, fields=fields, key=key, oauth_token=oauth_token, pretty_print=pretty_print, quota_user=quota_user, upload_protocol=upload_protocol, upload_type=upload_type, include_spam_trash=include_spam_trash, label_ids=label_ids, max_results=max_results, page_token=page_token, q=q)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling UsersApi->gmail_users_threads_list: %s\n" % e)

# Configure OAuth2 access token for authorization: Oauth2
configuration = swagger_client.Configuration()
configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: Oauth2c
configuration = swagger_client.Configuration()
configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.UsersApi(swagger_client.ApiClient(configuration))
user_id = 'user_id_example' # str | The user's email address. The special value `me` can be used to indicate the authenticated user.
id = 'id_example' # str | The ID of the thread to modify.
body = swagger_client.ModifyThreadRequest() # ModifyThreadRequest |  (optional)
xgafv = 'xgafv_example' # str | V1 error format. (optional)
access_token = 'access_token_example' # str | OAuth access token. (optional)
alt = 'alt_example' # str | Data format for response. (optional)
param_callback = 'param_callback_example' # str | JSONP (optional)
fields = 'fields_example' # str | Selector specifying which fields to include in a partial response. (optional)
key = 'key_example' # str | 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. (optional)
oauth_token = 'oauth_token_example' # str | OAuth 2.0 token for the current user. (optional)
pretty_print = true # bool | Returns response with indentations and line breaks. (optional)
quota_user = 'quota_user_example' # str | 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. (optional)
upload_protocol = 'upload_protocol_example' # str | Upload protocol for media (e.g. \"raw\", \"multipart\"). (optional)
upload_type = 'upload_type_example' # str | Legacy upload protocol for media (e.g. \"media\", \"multipart\"). (optional)

try:
    # Modify thread labels
    api_response = api_instance.gmail_users_threads_modify(user_id, id, body=body, xgafv=xgafv, access_token=access_token, alt=alt, param_callback=param_callback, fields=fields, key=key, oauth_token=oauth_token, pretty_print=pretty_print, quota_user=quota_user, upload_protocol=upload_protocol, upload_type=upload_type)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling UsersApi->gmail_users_threads_modify: %s\n" % e)

# Configure OAuth2 access token for authorization: Oauth2
configuration = swagger_client.Configuration()
configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: Oauth2c
configuration = swagger_client.Configuration()
configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.UsersApi(swagger_client.ApiClient(configuration))
user_id = 'user_id_example' # str | The user's email address. The special value `me` can be used to indicate the authenticated user.
id = 'id_example' # str | The ID of the thread to Trash.
xgafv = 'xgafv_example' # str | V1 error format. (optional)
access_token = 'access_token_example' # str | OAuth access token. (optional)
alt = 'alt_example' # str | Data format for response. (optional)
param_callback = 'param_callback_example' # str | JSONP (optional)
fields = 'fields_example' # str | Selector specifying which fields to include in a partial response. (optional)
key = 'key_example' # str | 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. (optional)
oauth_token = 'oauth_token_example' # str | OAuth 2.0 token for the current user. (optional)
pretty_print = true # bool | Returns response with indentations and line breaks. (optional)
quota_user = 'quota_user_example' # str | 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. (optional)
upload_protocol = 'upload_protocol_example' # str | Upload protocol for media (e.g. \"raw\", \"multipart\"). (optional)
upload_type = 'upload_type_example' # str | Legacy upload protocol for media (e.g. \"media\", \"multipart\"). (optional)

try:
    # Trash email thread
    api_response = api_instance.gmail_users_threads_trash(user_id, id, xgafv=xgafv, access_token=access_token, alt=alt, param_callback=param_callback, fields=fields, key=key, oauth_token=oauth_token, pretty_print=pretty_print, quota_user=quota_user, upload_protocol=upload_protocol, upload_type=upload_type)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling UsersApi->gmail_users_threads_trash: %s\n" % e)

# Configure OAuth2 access token for authorization: Oauth2
configuration = swagger_client.Configuration()
configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: Oauth2c
configuration = swagger_client.Configuration()
configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.UsersApi(swagger_client.ApiClient(configuration))
user_id = 'user_id_example' # str | The user's email address. The special value `me` can be used to indicate the authenticated user.
id = 'id_example' # str | The ID of the thread to remove from Trash.
xgafv = 'xgafv_example' # str | V1 error format. (optional)
access_token = 'access_token_example' # str | OAuth access token. (optional)
alt = 'alt_example' # str | Data format for response. (optional)
param_callback = 'param_callback_example' # str | JSONP (optional)
fields = 'fields_example' # str | Selector specifying which fields to include in a partial response. (optional)
key = 'key_example' # str | 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. (optional)
oauth_token = 'oauth_token_example' # str | OAuth 2.0 token for the current user. (optional)
pretty_print = true # bool | Returns response with indentations and line breaks. (optional)
quota_user = 'quota_user_example' # str | 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. (optional)
upload_protocol = 'upload_protocol_example' # str | Upload protocol for media (e.g. \"raw\", \"multipart\"). (optional)
upload_type = 'upload_type_example' # str | Legacy upload protocol for media (e.g. \"media\", \"multipart\"). (optional)

try:
    # Untrash email thread
    api_response = api_instance.gmail_users_threads_untrash(user_id, id, xgafv=xgafv, access_token=access_token, alt=alt, param_callback=param_callback, fields=fields, key=key, oauth_token=oauth_token, pretty_print=pretty_print, quota_user=quota_user, upload_protocol=upload_protocol, upload_type=upload_type)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling UsersApi->gmail_users_threads_untrash: %s\n" % e)

# Configure OAuth2 access token for authorization: Oauth2
configuration = swagger_client.Configuration()
configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: Oauth2c
configuration = swagger_client.Configuration()
configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.UsersApi(swagger_client.ApiClient(configuration))
user_id = 'user_id_example' # str | The user's email address. The special value `me` can be used to indicate the authenticated user.
body = swagger_client.WatchRequest() # WatchRequest |  (optional)
xgafv = 'xgafv_example' # str | V1 error format. (optional)
access_token = 'access_token_example' # str | OAuth access token. (optional)
alt = 'alt_example' # str | Data format for response. (optional)
param_callback = 'param_callback_example' # str | JSONP (optional)
fields = 'fields_example' # str | Selector specifying which fields to include in a partial response. (optional)
key = 'key_example' # str | 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. (optional)
oauth_token = 'oauth_token_example' # str | OAuth 2.0 token for the current user. (optional)
pretty_print = true # bool | Returns response with indentations and line breaks. (optional)
quota_user = 'quota_user_example' # str | 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. (optional)
upload_protocol = 'upload_protocol_example' # str | Upload protocol for media (e.g. \"raw\", \"multipart\"). (optional)
upload_type = 'upload_type_example' # str | Legacy upload protocol for media (e.g. \"media\", \"multipart\"). (optional)

try:
    # Set up push notification watch
    api_response = api_instance.gmail_users_watch(user_id, body=body, xgafv=xgafv, access_token=access_token, alt=alt, param_callback=param_callback, fields=fields, key=key, oauth_token=oauth_token, pretty_print=pretty_print, quota_user=quota_user, upload_protocol=upload_protocol, upload_type=upload_type)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling UsersApi->gmail_users_watch: %s\n" % e)
```

## Documentation for API Endpoints

All URIs are relative to *https://gmail.googleapis.com/*

Class | Method | HTTP request | Description
------------ | ------------- | ------------- | -------------
*UsersApi* | [**gmail_users_drafts_create**](docs/UsersApi.md#gmail_users_drafts_create) | **POST** /gmail/v1/users/{userId}/drafts | Create a new email draft
*UsersApi* | [**gmail_users_drafts_delete**](docs/UsersApi.md#gmail_users_drafts_delete) | **DELETE** /gmail/v1/users/{userId}/drafts/{id} | Delete a specific email draft
*UsersApi* | [**gmail_users_drafts_get**](docs/UsersApi.md#gmail_users_drafts_get) | **GET** /gmail/v1/users/{userId}/drafts/{id} | Get details of a draft
*UsersApi* | [**gmail_users_drafts_list**](docs/UsersApi.md#gmail_users_drafts_list) | **GET** /gmail/v1/users/{userId}/drafts | List user&#x27;s email drafts
*UsersApi* | [**gmail_users_drafts_send**](docs/UsersApi.md#gmail_users_drafts_send) | **POST** /gmail/v1/users/{userId}/drafts/send | Send an existing draft email
*UsersApi* | [**gmail_users_drafts_update**](docs/UsersApi.md#gmail_users_drafts_update) | **PUT** /gmail/v1/users/{userId}/drafts/{id} | Update an email draft
*UsersApi* | [**gmail_users_get_profile**](docs/UsersApi.md#gmail_users_get_profile) | **GET** /gmail/v1/users/{userId}/profile | Get user&#x27;s Gmail profile
*UsersApi* | [**gmail_users_history_list**](docs/UsersApi.md#gmail_users_history_list) | **GET** /gmail/v1/users/{userId}/history | List mailbox change history
*UsersApi* | [**gmail_users_labels_create**](docs/UsersApi.md#gmail_users_labels_create) | **POST** /gmail/v1/users/{userId}/labels | Create a new email label
*UsersApi* | [**gmail_users_labels_delete**](docs/UsersApi.md#gmail_users_labels_delete) | **DELETE** /gmail/v1/users/{userId}/labels/{id} | Delete a specific email label
*UsersApi* | [**gmail_users_labels_get**](docs/UsersApi.md#gmail_users_labels_get) | **GET** /gmail/v1/users/{userId}/labels/{id} | Get details of a label
*UsersApi* | [**gmail_users_labels_list**](docs/UsersApi.md#gmail_users_labels_list) | **GET** /gmail/v1/users/{userId}/labels | List all email labels
*UsersApi* | [**gmail_users_labels_patch**](docs/UsersApi.md#gmail_users_labels_patch) | **PATCH** /gmail/v1/users/{userId}/labels/{id} | Partially update a label
*UsersApi* | [**gmail_users_labels_update**](docs/UsersApi.md#gmail_users_labels_update) | **PUT** /gmail/v1/users/{userId}/labels/{id} | Update a specific label
*UsersApi* | [**gmail_users_messages_attachments_get**](docs/UsersApi.md#gmail_users_messages_attachments_get) | **GET** /gmail/v1/users/{userId}/messages/{messageId}/attachments/{id} | Get a message attachment
*UsersApi* | [**gmail_users_messages_batch_delete**](docs/UsersApi.md#gmail_users_messages_batch_delete) | **POST** /gmail/v1/users/{userId}/messages/batchDelete | Batch delete email messages
*UsersApi* | [**gmail_users_messages_batch_modify**](docs/UsersApi.md#gmail_users_messages_batch_modify) | **POST** /gmail/v1/users/{userId}/messages/batchModify | Batch modify message labels
*UsersApi* | [**gmail_users_messages_delete**](docs/UsersApi.md#gmail_users_messages_delete) | **DELETE** /gmail/v1/users/{userId}/messages/{id} | Delete a specific email message
*UsersApi* | [**gmail_users_messages_get**](docs/UsersApi.md#gmail_users_messages_get) | **GET** /gmail/v1/users/{userId}/messages/{id} | Get details of a message
*UsersApi* | [**gmail_users_messages_import**](docs/UsersApi.md#gmail_users_messages_import) | **POST** /gmail/v1/users/{userId}/messages/import | Import a message into mailbox
*UsersApi* | [**gmail_users_messages_insert**](docs/UsersApi.md#gmail_users_messages_insert) | **POST** /gmail/v1/users/{userId}/messages | Insert a message into mailbox
*UsersApi* | [**gmail_users_messages_list**](docs/UsersApi.md#gmail_users_messages_list) | **GET** /gmail/v1/users/{userId}/messages | List user&#x27;s email messages
*UsersApi* | [**gmail_users_messages_modify**](docs/UsersApi.md#gmail_users_messages_modify) | **POST** /gmail/v1/users/{userId}/messages/{id}/modify | Modify labels of a message
*UsersApi* | [**gmail_users_messages_send**](docs/UsersApi.md#gmail_users_messages_send) | **POST** /gmail/v1/users/{userId}/messages/send | Send an email message
*UsersApi* | [**gmail_users_messages_trash**](docs/UsersApi.md#gmail_users_messages_trash) | **POST** /gmail/v1/users/{userId}/messages/{id}/trash | Trash a specific email message
*UsersApi* | [**gmail_users_messages_untrash**](docs/UsersApi.md#gmail_users_messages_untrash) | **POST** /gmail/v1/users/{userId}/messages/{id}/untrash | Untrash a specific email message
*UsersApi* | [**gmail_users_settings_cse_identities_create**](docs/UsersApi.md#gmail_users_settings_cse_identities_create) | **POST** /gmail/v1/users/{userId}/settings/cse/identities | Create encrypted email identity
*UsersApi* | [**gmail_users_settings_cse_identities_delete**](docs/UsersApi.md#gmail_users_settings_cse_identities_delete) | **DELETE** /gmail/v1/users/{userId}/settings/cse/identities/{cseEmailAddress} | Delete encryption identity
*UsersApi* | [**gmail_users_settings_cse_identities_get**](docs/UsersApi.md#gmail_users_settings_cse_identities_get) | **GET** /gmail/v1/users/{userId}/settings/cse/identities/{cseEmailAddress} | Get encryption identity configuration
*UsersApi* | [**gmail_users_settings_cse_identities_list**](docs/UsersApi.md#gmail_users_settings_cse_identities_list) | **GET** /gmail/v1/users/{userId}/settings/cse/identities | List encrypted email identities
*UsersApi* | [**gmail_users_settings_cse_identities_patch**](docs/UsersApi.md#gmail_users_settings_cse_identities_patch) | **PATCH** /gmail/v1/users/{userId}/settings/cse/identities/{emailAddress} | Update encryption identity key pair
*UsersApi* | [**gmail_users_settings_cse_keypairs_create**](docs/UsersApi.md#gmail_users_settings_cse_keypairs_create) | **POST** /gmail/v1/users/{userId}/settings/cse/keypairs | Create encryption key pair
*UsersApi* | [**gmail_users_settings_cse_keypairs_disable**](docs/UsersApi.md#gmail_users_settings_cse_keypairs_disable) | **POST** /gmail/v1/users/{userId}/settings/cse/keypairs/{keyPairId}:disable | Disable encryption key pair
*UsersApi* | [**gmail_users_settings_cse_keypairs_enable**](docs/UsersApi.md#gmail_users_settings_cse_keypairs_enable) | **POST** /gmail/v1/users/{userId}/settings/cse/keypairs/{keyPairId}:enable | Enable encryption key pair
*UsersApi* | [**gmail_users_settings_cse_keypairs_get**](docs/UsersApi.md#gmail_users_settings_cse_keypairs_get) | **GET** /gmail/v1/users/{userId}/settings/cse/keypairs/{keyPairId} | Get encryption key pair details
*UsersApi* | [**gmail_users_settings_cse_keypairs_list**](docs/UsersApi.md#gmail_users_settings_cse_keypairs_list) | **GET** /gmail/v1/users/{userId}/settings/cse/keypairs | List encryption key pairs
*UsersApi* | [**gmail_users_settings_cse_keypairs_obliterate**](docs/UsersApi.md#gmail_users_settings_cse_keypairs_obliterate) | **POST** /gmail/v1/users/{userId}/settings/cse/keypairs/{keyPairId}:obliterate | Permanently delete encryption key pair
*UsersApi* | [**gmail_users_settings_delegates_create**](docs/UsersApi.md#gmail_users_settings_delegates_create) | **POST** /gmail/v1/users/{userId}/settings/delegates | Add email delegate
*UsersApi* | [**gmail_users_settings_delegates_delete**](docs/UsersApi.md#gmail_users_settings_delegates_delete) | **DELETE** /gmail/v1/users/{userId}/settings/delegates/{delegateEmail} | Remove email delegate
*UsersApi* | [**gmail_users_settings_delegates_get**](docs/UsersApi.md#gmail_users_settings_delegates_get) | **GET** /gmail/v1/users/{userId}/settings/delegates/{delegateEmail} | Get email delegate details
*UsersApi* | [**gmail_users_settings_delegates_list**](docs/UsersApi.md#gmail_users_settings_delegates_list) | **GET** /gmail/v1/users/{userId}/settings/delegates | List email delegates
*UsersApi* | [**gmail_users_settings_filters_create**](docs/UsersApi.md#gmail_users_settings_filters_create) | **POST** /gmail/v1/users/{userId}/settings/filters | Create email filter
*UsersApi* | [**gmail_users_settings_filters_delete**](docs/UsersApi.md#gmail_users_settings_filters_delete) | **DELETE** /gmail/v1/users/{userId}/settings/filters/{id} | Delete email filter
*UsersApi* | [**gmail_users_settings_filters_get**](docs/UsersApi.md#gmail_users_settings_filters_get) | **GET** /gmail/v1/users/{userId}/settings/filters/{id} | Get email filter details
*UsersApi* | [**gmail_users_settings_filters_list**](docs/UsersApi.md#gmail_users_settings_filters_list) | **GET** /gmail/v1/users/{userId}/settings/filters | List email filters
*UsersApi* | [**gmail_users_settings_forwarding_addresses_create**](docs/UsersApi.md#gmail_users_settings_forwarding_addresses_create) | **POST** /gmail/v1/users/{userId}/settings/forwardingAddresses | Create forwarding address
*UsersApi* | [**gmail_users_settings_forwarding_addresses_delete**](docs/UsersApi.md#gmail_users_settings_forwarding_addresses_delete) | **DELETE** /gmail/v1/users/{userId}/settings/forwardingAddresses/{forwardingEmail} | Delete forwarding address
*UsersApi* | [**gmail_users_settings_forwarding_addresses_get**](docs/UsersApi.md#gmail_users_settings_forwarding_addresses_get) | **GET** /gmail/v1/users/{userId}/settings/forwardingAddresses/{forwardingEmail} | Get forwarding address details
*UsersApi* | [**gmail_users_settings_forwarding_addresses_list**](docs/UsersApi.md#gmail_users_settings_forwarding_addresses_list) | **GET** /gmail/v1/users/{userId}/settings/forwardingAddresses | List forwarding addresses
*UsersApi* | [**gmail_users_settings_get_auto_forwarding**](docs/UsersApi.md#gmail_users_settings_get_auto_forwarding) | **GET** /gmail/v1/users/{userId}/settings/autoForwarding | Get auto-forwarding settings
*UsersApi* | [**gmail_users_settings_get_imap**](docs/UsersApi.md#gmail_users_settings_get_imap) | **GET** /gmail/v1/users/{userId}/settings/imap | Get IMAP settings
*UsersApi* | [**gmail_users_settings_get_language**](docs/UsersApi.md#gmail_users_settings_get_language) | **GET** /gmail/v1/users/{userId}/settings/language | Get language settings
*UsersApi* | [**gmail_users_settings_get_pop**](docs/UsersApi.md#gmail_users_settings_get_pop) | **GET** /gmail/v1/users/{userId}/settings/pop | Get POP settings
*UsersApi* | [**gmail_users_settings_get_vacation**](docs/UsersApi.md#gmail_users_settings_get_vacation) | **GET** /gmail/v1/users/{userId}/settings/vacation | Get vacation responder settings
*UsersApi* | [**gmail_users_settings_send_as_create**](docs/UsersApi.md#gmail_users_settings_send_as_create) | **POST** /gmail/v1/users/{userId}/settings/sendAs | Create send-as alias
*UsersApi* | [**gmail_users_settings_send_as_delete**](docs/UsersApi.md#gmail_users_settings_send_as_delete) | **DELETE** /gmail/v1/users/{userId}/settings/sendAs/{sendAsEmail} | Delete send-as alias
*UsersApi* | [**gmail_users_settings_send_as_get**](docs/UsersApi.md#gmail_users_settings_send_as_get) | **GET** /gmail/v1/users/{userId}/settings/sendAs/{sendAsEmail} | Get send-as alias details
*UsersApi* | [**gmail_users_settings_send_as_list**](docs/UsersApi.md#gmail_users_settings_send_as_list) | **GET** /gmail/v1/users/{userId}/settings/sendAs | List send-as aliases
*UsersApi* | [**gmail_users_settings_send_as_patch**](docs/UsersApi.md#gmail_users_settings_send_as_patch) | **PATCH** /gmail/v1/users/{userId}/settings/sendAs/{sendAsEmail} | Update send-as alias settings
*UsersApi* | [**gmail_users_settings_send_as_smime_info_delete**](docs/UsersApi.md#gmail_users_settings_send_as_smime_info_delete) | **DELETE** /gmail/v1/users/{userId}/settings/sendAs/{sendAsEmail}/smimeInfo/{id} | Delete S/MIME configuration
*UsersApi* | [**gmail_users_settings_send_as_smime_info_get**](docs/UsersApi.md#gmail_users_settings_send_as_smime_info_get) | **GET** /gmail/v1/users/{userId}/settings/sendAs/{sendAsEmail}/smimeInfo/{id} | Get S/MIME configuration details
*UsersApi* | [**gmail_users_settings_send_as_smime_info_insert**](docs/UsersApi.md#gmail_users_settings_send_as_smime_info_insert) | **POST** /gmail/v1/users/{userId}/settings/sendAs/{sendAsEmail}/smimeInfo | Add S/MIME configuration
*UsersApi* | [**gmail_users_settings_send_as_smime_info_list**](docs/UsersApi.md#gmail_users_settings_send_as_smime_info_list) | **GET** /gmail/v1/users/{userId}/settings/sendAs/{sendAsEmail}/smimeInfo | List S/MIME configurations
*UsersApi* | [**gmail_users_settings_send_as_smime_info_set_default**](docs/UsersApi.md#gmail_users_settings_send_as_smime_info_set_default) | **POST** /gmail/v1/users/{userId}/settings/sendAs/{sendAsEmail}/smimeInfo/{id}/setDefault | Set default S/MIME configuration
*UsersApi* | [**gmail_users_settings_send_as_update**](docs/UsersApi.md#gmail_users_settings_send_as_update) | **PUT** /gmail/v1/users/{userId}/settings/sendAs/{sendAsEmail} | Replace send-as alias configuration
*UsersApi* | [**gmail_users_settings_send_as_verify**](docs/UsersApi.md#gmail_users_settings_send_as_verify) | **POST** /gmail/v1/users/{userId}/settings/sendAs/{sendAsEmail}/verify | Verify send-as alias
*UsersApi* | [**gmail_users_settings_update_auto_forwarding**](docs/UsersApi.md#gmail_users_settings_update_auto_forwarding) | **PUT** /gmail/v1/users/{userId}/settings/autoForwarding | Update auto-forwarding settings
*UsersApi* | [**gmail_users_settings_update_imap**](docs/UsersApi.md#gmail_users_settings_update_imap) | **PUT** /gmail/v1/users/{userId}/settings/imap | Update IMAP settings
*UsersApi* | [**gmail_users_settings_update_language**](docs/UsersApi.md#gmail_users_settings_update_language) | **PUT** /gmail/v1/users/{userId}/settings/language | Update language settings
*UsersApi* | [**gmail_users_settings_update_pop**](docs/UsersApi.md#gmail_users_settings_update_pop) | **PUT** /gmail/v1/users/{userId}/settings/pop | Update POP settings
*UsersApi* | [**gmail_users_settings_update_vacation**](docs/UsersApi.md#gmail_users_settings_update_vacation) | **PUT** /gmail/v1/users/{userId}/settings/vacation | Update vacation responder settings
*UsersApi* | [**gmail_users_stop**](docs/UsersApi.md#gmail_users_stop) | **POST** /gmail/v1/users/{userId}/stop | Stop push notifications
*UsersApi* | [**gmail_users_threads_delete**](docs/UsersApi.md#gmail_users_threads_delete) | **DELETE** /gmail/v1/users/{userId}/threads/{id} | Permanently delete email thread
*UsersApi* | [**gmail_users_threads_get**](docs/UsersApi.md#gmail_users_threads_get) | **GET** /gmail/v1/users/{userId}/threads/{id} | Get email thread details
*UsersApi* | [**gmail_users_threads_list**](docs/UsersApi.md#gmail_users_threads_list) | **GET** /gmail/v1/users/{userId}/threads | List email threads
*UsersApi* | [**gmail_users_threads_modify**](docs/UsersApi.md#gmail_users_threads_modify) | **POST** /gmail/v1/users/{userId}/threads/{id}/modify | Modify thread labels
*UsersApi* | [**gmail_users_threads_trash**](docs/UsersApi.md#gmail_users_threads_trash) | **POST** /gmail/v1/users/{userId}/threads/{id}/trash | Trash email thread
*UsersApi* | [**gmail_users_threads_untrash**](docs/UsersApi.md#gmail_users_threads_untrash) | **POST** /gmail/v1/users/{userId}/threads/{id}/untrash | Untrash email thread
*UsersApi* | [**gmail_users_watch**](docs/UsersApi.md#gmail_users_watch) | **POST** /gmail/v1/users/{userId}/watch | Set up push notification watch

## Documentation For Models

 - [AutoForwarding](docs/AutoForwarding.md)
 - [BatchDeleteMessagesRequest](docs/BatchDeleteMessagesRequest.md)
 - [BatchModifyMessagesRequest](docs/BatchModifyMessagesRequest.md)
 - [CseIdentity](docs/CseIdentity.md)
 - [CseKeyPair](docs/CseKeyPair.md)
 - [CsePrivateKeyMetadata](docs/CsePrivateKeyMetadata.md)
 - [Delegate](docs/Delegate.md)
 - [DisableCseKeyPairRequest](docs/DisableCseKeyPairRequest.md)
 - [Draft](docs/Draft.md)
 - [DraftMessage](docs/DraftMessage.md)
 - [EnableCseKeyPairRequest](docs/EnableCseKeyPairRequest.md)
 - [Filter](docs/Filter.md)
 - [FilterAction](docs/FilterAction.md)
 - [FilterCriteria](docs/FilterCriteria.md)
 - [ForwardingAddress](docs/ForwardingAddress.md)
 - [History](docs/History.md)
 - [HistoryLabelAdded](docs/HistoryLabelAdded.md)
 - [HistoryLabelRemoved](docs/HistoryLabelRemoved.md)
 - [HistoryMessageAdded](docs/HistoryMessageAdded.md)
 - [HistoryMessageDeleted](docs/HistoryMessageDeleted.md)
 - [ImapSettings](docs/ImapSettings.md)
 - [KaclsKeyMetadata](docs/KaclsKeyMetadata.md)
 - [Label](docs/Label.md)
 - [LabelColor](docs/LabelColor.md)
 - [LanguageSettings](docs/LanguageSettings.md)
 - [ListCseIdentitiesResponse](docs/ListCseIdentitiesResponse.md)
 - [ListCseKeyPairsResponse](docs/ListCseKeyPairsResponse.md)
 - [ListDelegatesResponse](docs/ListDelegatesResponse.md)
 - [ListDraftsResponse](docs/ListDraftsResponse.md)
 - [ListFiltersResponse](docs/ListFiltersResponse.md)
 - [ListForwardingAddressesResponse](docs/ListForwardingAddressesResponse.md)
 - [ListHistoryResponse](docs/ListHistoryResponse.md)
 - [ListLabelsResponse](docs/ListLabelsResponse.md)
 - [ListMessagesResponse](docs/ListMessagesResponse.md)
 - [ListSendAsResponse](docs/ListSendAsResponse.md)
 - [ListSmimeInfoResponse](docs/ListSmimeInfoResponse.md)
 - [ListThreadsResponse](docs/ListThreadsResponse.md)
 - [Message](docs/Message.md)
 - [MessagePart](docs/MessagePart.md)
 - [MessagePartBody](docs/MessagePartBody.md)
 - [MessagePartHeader](docs/MessagePartHeader.md)
 - [ModifyMessageRequest](docs/ModifyMessageRequest.md)
 - [ModifyThreadRequest](docs/ModifyThreadRequest.md)
 - [ObliterateCseKeyPairRequest](docs/ObliterateCseKeyPairRequest.md)
 - [PopSettings](docs/PopSettings.md)
 - [Profile](docs/Profile.md)
 - [SendAs](docs/SendAs.md)
 - [SmimeInfo](docs/SmimeInfo.md)
 - [SmtpMsa](docs/SmtpMsa.md)
 - [Thread](docs/Thread.md)
 - [VacationSettings](docs/VacationSettings.md)
 - [WatchRequest](docs/WatchRequest.md)
 - [WatchResponse](docs/WatchResponse.md)

## Documentation For Authorization


## Oauth2

- **Type**: OAuth
- **Flow**: implicit
- **Authorization URL**: https://accounts.google.com/o/oauth2/auth
- **Scopes**: 
 - **https://mail.google.com/**: Read, compose, send, and permanently delete all your email from Gmail
 - **https://www.googleapis.com/auth/gmail.addons.current.action.compose**: Manage drafts and send emails when you interact with the add-on
 - **https://www.googleapis.com/auth/gmail.addons.current.message.action**: View your email messages when you interact with the add-on
 - **https://www.googleapis.com/auth/gmail.addons.current.message.metadata**: View your email message metadata when the add-on is running
 - **https://www.googleapis.com/auth/gmail.addons.current.message.readonly**: View your email messages when the add-on is running
 - **https://www.googleapis.com/auth/gmail.compose**: Manage drafts and send emails
 - **https://www.googleapis.com/auth/gmail.insert**: Add emails into your Gmail mailbox
 - **https://www.googleapis.com/auth/gmail.labels**: See and edit your email labels
 - **https://www.googleapis.com/auth/gmail.metadata**: View your email message metadata such as labels and headers, but not the email body
 - **https://www.googleapis.com/auth/gmail.modify**: Read, compose, and send emails from your Gmail account
 - **https://www.googleapis.com/auth/gmail.readonly**: View your email messages and settings
 - **https://www.googleapis.com/auth/gmail.send**: Send email on your behalf
 - **https://www.googleapis.com/auth/gmail.settings.basic**: See, edit, create, or change your email settings and filters in Gmail
 - **https://www.googleapis.com/auth/gmail.settings.sharing**: Manage your sensitive mail settings, including who can manage your mail

## Oauth2c

- **Type**: OAuth
- **Flow**: accessCode
- **Authorization URL**: https://accounts.google.com/o/oauth2/auth
- **Scopes**: 
 - **https://mail.google.com/**: Read, compose, send, and permanently delete all your email from Gmail
 - **https://www.googleapis.com/auth/gmail.addons.current.action.compose**: Manage drafts and send emails when you interact with the add-on
 - **https://www.googleapis.com/auth/gmail.addons.current.message.action**: View your email messages when you interact with the add-on
 - **https://www.googleapis.com/auth/gmail.addons.current.message.metadata**: View your email message metadata when the add-on is running
 - **https://www.googleapis.com/auth/gmail.addons.current.message.readonly**: View your email messages when the add-on is running
 - **https://www.googleapis.com/auth/gmail.compose**: Manage drafts and send emails
 - **https://www.googleapis.com/auth/gmail.insert**: Add emails into your Gmail mailbox
 - **https://www.googleapis.com/auth/gmail.labels**: See and edit your email labels
 - **https://www.googleapis.com/auth/gmail.metadata**: View your email message metadata such as labels and headers, but not the email body
 - **https://www.googleapis.com/auth/gmail.modify**: Read, compose, and send emails from your Gmail account
 - **https://www.googleapis.com/auth/gmail.readonly**: View your email messages and settings
 - **https://www.googleapis.com/auth/gmail.send**: Send email on your behalf
 - **https://www.googleapis.com/auth/gmail.settings.basic**: See, edit, create, or change your email settings and filters in Gmail
 - **https://www.googleapis.com/auth/gmail.settings.sharing**: Manage your sensitive mail settings, including who can manage your mail


## Author


