{
  "basePath": "",
  "resources": {
    "users": {
      "resources": {
        "drafts": {
          "methods": {
            "send": {
              "id": "gmail.users.drafts.send",
              "parameters": {
                "userId": {
                  "type": "string",
                  "required": true,
                  "location": "path",
                  "description": "The user's email address. The special value `me` can be used to indicate the authenticated user.",
                  "default": "me"
                }
              },
              "description": "Sends the specified, existing draft to the recipients in the `To`, `Cc`, and `Bcc` headers. For more information, see [Create and send draft emails](https://developers.google.com/workspace/gmail/api/guides/drafts).",
              "supportsMediaUpload": true,
              "response": {
                "$ref": "Message"
              },
              "path": "gmail/v1/users/{userId}/drafts/send",
              "parameterOrder": [
                "userId"
              ],
              "httpMethod": "POST",
              "scopes": [
                "https://mail.google.com/",
                "https://www.googleapis.com/auth/gmail.addons.current.action.compose",
                "https://www.googleapis.com/auth/gmail.compose",
                "https://www.googleapis.com/auth/gmail.modify"
              ],
              "flatPath": "gmail/v1/users/{userId}/drafts/send",
              "mediaUpload": {
                "accept": [
                  "message/*"
                ],
                "protocols": {
                  "resumable": {
                    "multipart": true,
                    "path": "/resumable/upload/gmail/v1/users/{userId}/drafts/send"
                  },
                  "simple": {
                    "multipart": true,
                    "path": "/upload/gmail/v1/users/{userId}/drafts/send"
                  }
                },
                "maxSize": "36700160"
              },
              "request": {
                "$ref": "Draft"
              }
            },
            "update": {
              "path": "gmail/v1/users/{userId}/drafts/{id}",
              "supportsMediaUpload": true,
              "response": {
                "$ref": "Draft"
              },
              "parameterOrder": [
                "userId",
                "id"
              ],
              "id": "gmail.users.drafts.update",
              "parameters": {
                "userId": {
                  "location": "path",
                  "description": "The user's email address. The special value `me` can be used to indicate the authenticated user.",
                  "default": "me",
                  "type": "string",
                  "required": true
                },
                "id": {
                  "description": "The ID of the draft to update.",
                  "required": true,
                  "location": "path",
                  "type": "string"
                }
              },
              "description": "Replaces a draft's content. For more information, see [Create and send draft emails](https://developers.google.com/workspace/gmail/api/guides/drafts).",
              "scopes": [
                "https://mail.google.com/",
                "https://www.googleapis.com/auth/gmail.addons.current.action.compose",
                "https://www.googleapis.com/auth/gmail.compose",
                "https://www.googleapis.com/auth/gmail.modify"
              ],
              "httpMethod": "PUT",
              "request": {
                "$ref": "Draft"
              },
              "flatPath": "gmail/v1/users/{userId}/drafts/{id}",
              "mediaUpload": {
                "protocols": {
                  "resumable": {
                    "path": "/resumable/upload/gmail/v1/users/{userId}/drafts/{id}",
                    "multipart": true
                  },
                  "simple": {
                    "multipart": true,
                    "path": "/upload/gmail/v1/users/{userId}/drafts/{id}"
                  }
                },
                "accept": [
                  "message/*"
                ],
                "maxSize": "36700160"
              }
            },
            "delete": {
              "flatPath": "gmail/v1/users/{userId}/drafts/{id}",
              "parameters": {
                "userId": {
                  "type": "string",
                  "required": true,
                  "location": "path",
                  "description": "The user's email address. The special value `me` can be used to indicate the authenticated user.",
                  "default": "me"
                },
                "id": {
                  "description": "The ID of the draft to delete.",
                  "required": true,
                  "type": "string",
                  "location": "path"
                }
              },
              "description": "Immediately and permanently deletes the specified draft. Does not simply trash it. For more information, see [Create and send draft emails](https://developers.google.com/workspace/gmail/api/guides/drafts).",
              "id": "gmail.users.drafts.delete",
              "httpMethod": "DELETE",
              "scopes": [
                "https://mail.google.com/",
                "https://www.googleapis.com/auth/gmail.addons.current.action.compose",
                "https://www.googleapis.com/auth/gmail.compose",
                "https://www.googleapis.com/auth/gmail.modify"
              ],
              "parameterOrder": [
                "userId",
                "id"
              ],
              "path": "gmail/v1/users/{userId}/drafts/{id}"
            },
            "create": {
              "parameterOrder": [
                "userId"
              ],
              "supportsMediaUpload": true,
              "response": {
                "$ref": "Draft"
              },
              "path": "gmail/v1/users/{userId}/drafts",
              "parameters": {
                "userId": {
                  "type": "string",
                  "required": true,
                  "location": "path",
                  "description": "The user's email address. The special value `me` can be used to indicate the authenticated user.",
                  "default": "me"
                }
              },
              "description": "Creates a draft with the `DRAFT` label. For more information, see [Create and send draft emails](https://developers.google.com/workspace/gmail/api/guides/drafts).",
              "id": "gmail.users.drafts.create",
              "flatPath": "gmail/v1/users/{userId}/drafts",
              "mediaUpload": {
                "maxSize": "36700160",
                "protocols": {
                  "resumable": {
                    "path": "/resumable/upload/gmail/v1/users/{userId}/drafts",
                    "multipart": true
                  },
                  "simple": {
                    "multipart": true,
                    "path": "/upload/gmail/v1/users/{userId}/drafts"
                  }
                },
                "accept": [
                  "message/*"
                ]
              },
              "request": {
                "$ref": "Draft"
              },
              "httpMethod": "POST",
              "scopes": [
                "https://mail.google.com/",
                "https://www.googleapis.com/auth/gmail.addons.current.action.compose",
                "https://www.googleapis.com/auth/gmail.compose",
                "https://www.googleapis.com/auth/gmail.modify"
              ]
            },
            "list": {
              "id": "gmail.users.drafts.list",
              "parameters": {
                "userId": {
                  "location": "path",
                  "description": "The user's email address. The special value `me` can be used to indicate the authenticated user.",
                  "default": "me",
                  "type": "string",
                  "required": true
                },
                "q": {
                  "type": "string",
                  "location": "query",
                  "description": "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\"`."
                },
                "pageToken": {
                  "location": "query",
                  "type": "string",
                  "description": "Page token to retrieve a specific page of results in the list."
                },
                "maxResults": {
                  "location": "query",
                  "format": "uint32",
                  "description": "Maximum number of drafts to return. This field defaults to 100. The maximum allowed value for this field is 500.",
                  "default": "100",
                  "type": "integer"
                },
                "includeSpamTrash": {
                  "description": "Include drafts from `SPAM` and `TRASH` in the results.",
                  "default": "false",
                  "type": "boolean",
                  "location": "query"
                }
              },
              "description": "Lists the drafts in the user's mailbox. For more information, see [Create and send draft emails](https://developers.google.com/workspace/gmail/api/guides/drafts).",
              "response": {
                "$ref": "ListDraftsResponse"
              },
              "path": "gmail/v1/users/{userId}/drafts",
              "parameterOrder": [
                "userId"
              ],
              "httpMethod": "GET",
              "scopes": [
                "https://mail.google.com/",
                "https://www.googleapis.com/auth/gmail.compose",
                "https://www.googleapis.com/auth/gmail.modify",
                "https://www.googleapis.com/auth/gmail.readonly"
              ],
              "flatPath": "gmail/v1/users/{userId}/drafts"
            },
            "get": {
              "response": {
                "$ref": "Draft"
              },
              "path": "gmail/v1/users/{userId}/drafts/{id}",
              "parameterOrder": [
                "userId",
                "id"
              ],
              "id": "gmail.users.drafts.get",
              "parameters": {
                "id": {
                  "description": "The ID of the draft to retrieve.",
                  "required": true,
                  "location": "path",
                  "type": "string"
                },
                "format": {
                  "description": "The format to return the draft in.",
                  "default": "full",
                  "enumDescriptions": [
                    "Returns only email message ID and labels; does not return the email headers, body, or payload.",
                    "Returns the full email message data with body content parsed in the `payload` field; the `raw` field is not used. Format cannot be used when accessing the api using the gmail.metadata scope.",
                    "Returns the full email message data with body content in the `raw` field as a base64url encoded string; the `payload` field is not used. Format cannot be used when accessing the api using the gmail.metadata scope.",
                    "Returns only email message ID, labels, and email headers."
                  ],
                  "location": "query",
                  "enum": [
                    "minimal",
                    "full",
                    "raw",
                    "metadata"
                  ],
                  "type": "string"
                },
                "userId": {
                  "required": true,
                  "type": "string",
                  "description": "The user's email address. The special value `me` can be used to indicate the authenticated user.",
                  "default": "me",
                  "location": "path"
                }
              },
              "description": "Gets the specified draft. For more information, see [Create and send draft emails](https://developers.google.com/workspace/gmail/api/guides/drafts).",
              "httpMethod": "GET",
              "scopes": [
                "https://mail.google.com/",
                "https://www.googleapis.com/auth/gmail.compose",
                "https://www.googleapis.com/auth/gmail.modify",
                "https://www.googleapis.com/auth/gmail.readonly"
              ],
              "flatPath": "gmail/v1/users/{userId}/drafts/{id}"
            }
          }
        },
        "threads": {
          "methods": {
            "delete": {
              "scopes": [
                "https://mail.google.com/"
              ],
              "id": "gmail.users.threads.delete",
              "httpMethod": "DELETE",
              "flatPath": "gmail/v1/users/{userId}/threads/{id}",
              "parameters": {
                "userId": {
                  "location": "path",
                  "description": "The user's email address. The special value `me` can be used to indicate the authenticated user.",
                  "default": "me",
                  "type": "string",
                  "required": true
                },
                "id": {
                  "location": "path",
                  "type": "string",
                  "description": "ID of the Thread to delete.",
                  "required": true
                }
              },
              "description": "Immediately and permanently deletes the specified thread. Any messages that belong to the thread are also deleted. This operation cannot be undone. Prefer `threads.trash` instead. For more information, see [Manage threads](https://developers.google.com/workspace/gmail/api/guides/threads).",
              "path": "gmail/v1/users/{userId}/threads/{id}",
              "parameterOrder": [
                "userId",
                "id"
              ]
            },
            "list": {
              "parameterOrder": [
                "userId"
              ],
              "path": "gmail/v1/users/{userId}/threads",
              "response": {
                "$ref": "ListThreadsResponse"
              },
              "parameters": {
                "includeSpamTrash": {
                  "location": "query",
                  "type": "boolean",
                  "description": "Include threads from `SPAM` and `TRASH` in the results.",
                  "default": "false"
                },
                "maxResults": {
                  "description": "Maximum number of threads to return. This field defaults to 100. The maximum allowed value for this field is 500.",
                  "default": "100",
                  "location": "query",
                  "format": "uint32",
                  "type": "integer"
                },
                "labelIds": {
                  "type": "string",
                  "location": "query",
                  "description": "Only return threads with labels that match all of the specified label IDs.",
                  "repeated": true
                },
                "pageToken": {
                  "description": "Page token to retrieve a specific page of results in the list.",
                  "location": "query",
                  "type": "string"
                },
                "q": {
                  "description": "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.",
                  "type": "string",
                  "location": "query"
                },
                "userId": {
                  "required": true,
                  "type": "string",
                  "description": "The user's email address. The special value `me` can be used to indicate the authenticated user.",
                  "default": "me",
                  "location": "path"
                }
              },
              "description": "Lists the threads in the user's mailbox. For more information, see [Manage threads](https://developers.google.com/workspace/gmail/api/guides/threads).",
              "id": "gmail.users.threads.list",
              "flatPath": "gmail/v1/users/{userId}/threads",
              "scopes": [
                "https://mail.google.com/",
                "https://www.googleapis.com/auth/gmail.metadata",
                "https://www.googleapis.com/auth/gmail.modify",
                "https://www.googleapis.com/auth/gmail.readonly"
              ],
              "httpMethod": "GET"
            },
            "trash": {
              "parameterOrder": [
                "userId",
                "id"
              ],
              "path": "gmail/v1/users/{userId}/threads/{id}/trash",
              "response": {
                "$ref": "Thread"
              },
              "parameters": {
                "userId": {
                  "type": "string",
                  "required": true,
                  "location": "path",
                  "description": "The user's email address. The special value `me` can be used to indicate the authenticated user.",
                  "default": "me"
                },
                "id": {
                  "description": "The ID of the thread to Trash.",
                  "required": true,
                  "type": "string",
                  "location": "path"
                }
              },
              "description": "Moves the specified thread to the trash. Any messages that belong to the thread are also moved to the trash. For more information, see [Manage threads](https://developers.google.com/workspace/gmail/api/guides/threads).",
              "id": "gmail.users.threads.trash",
              "flatPath": "gmail/v1/users/{userId}/threads/{id}/trash",
              "scopes": [
                "https://mail.google.com/",
                "https://www.googleapis.com/auth/gmail.modify"
              ],
              "httpMethod": "POST"
            },
            "get": {
              "parameterOrder": [
                "userId",
                "id"
              ],
              "response": {
                "$ref": "Thread"
              },
              "path": "gmail/v1/users/{userId}/threads/{id}",
              "parameters": {
                "userId": {
                  "required": true,
                  "type": "string",
                  "description": "The user's email address. The special value `me` can be used to indicate the authenticated user.",
                  "default": "me",
                  "location": "path"
                },
                "format": {
                  "location": "query",
                  "description": "The format to return the messages in.",
                  "default": "full",
                  "enumDescriptions": [
                    "Returns the full email message data with body content parsed in the `payload` field; the `raw` field is not used. Format cannot be used when accessing the api using the gmail.metadata scope.",
                    "Returns only email message IDs, labels, and email headers.",
                    "Returns only email message IDs and labels; does not return the email headers, body, or payload."
                  ],
                  "type": "string",
                  "enum": [
                    "full",
                    "metadata",
                    "minimal"
                  ]
                },
                "metadataHeaders": {
                  "type": "string",
                  "location": "query",
                  "description": "When given and format is METADATA, only include headers specified.",
                  "repeated": true
                },
                "id": {
                  "type": "string",
                  "location": "path",
                  "description": "The ID of the thread to retrieve.",
                  "required": true
                }
              },
              "description": "Gets the specified thread. For more information, see [Manage threads](https://developers.google.com/workspace/gmail/api/guides/threads).",
              "id": "gmail.users.threads.get",
              "flatPath": "gmail/v1/users/{userId}/threads/{id}",
              "httpMethod": "GET",
              "scopes": [
                "https://mail.google.com/",
                "https://www.googleapis.com/auth/gmail.addons.current.message.action",
                "https://www.googleapis.com/auth/gmail.addons.current.message.metadata",
                "https://www.googleapis.com/auth/gmail.addons.current.message.readonly",
                "https://www.googleapis.com/auth/gmail.metadata",
                "https://www.googleapis.com/auth/gmail.modify",
                "https://www.googleapis.com/auth/gmail.readonly"
              ]
            },
            "untrash": {
              "parameterOrder": [
                "userId",
                "id"
              ],
              "response": {
                "$ref": "Thread"
              },
              "path": "gmail/v1/users/{userId}/threads/{id}/untrash",
              "parameters": {
                "userId": {
                  "location": "path",
                  "description": "The user's email address. The special value `me` can be used to indicate the authenticated user.",
                  "default": "me",
                  "type": "string",
                  "required": true
                },
                "id": {
                  "description": "The ID of the thread to remove from Trash.",
                  "required": true,
                  "type": "string",
                  "location": "path"
                }
              },
              "description": "Removes the specified thread from the trash. Any messages that belong to the thread are also removed from the trash. For more information, see [Manage threads](https://developers.google.com/workspace/gmail/api/guides/threads).",
              "id": "gmail.users.threads.untrash",
              "flatPath": "gmail/v1/users/{userId}/threads/{id}/untrash",
              "httpMethod": "POST",
              "scopes": [
                "https://mail.google.com/",
                "https://www.googleapis.com/auth/gmail.modify"
              ]
            },
            "modify": {
              "parameters": {
                "userId": {
                  "type": "string",
                  "required": true,
                  "location": "path",
                  "description": "The user's email address. The special value `me` can be used to indicate the authenticated user.",
                  "default": "me"
                },
                "id": {
                  "type": "string",
                  "location": "path",
                  "description": "The ID of the thread to modify.",
                  "required": true
                }
              },
              "description": "Modifies the labels applied to the thread. This applies to all messages in the thread. For more information, see [Manage threads](https://developers.google.com/workspace/gmail/api/guides/threads).",
              "id": "gmail.users.threads.modify",
              "parameterOrder": [
                "userId",
                "id"
              ],
              "path": "gmail/v1/users/{userId}/threads/{id}/modify",
              "response": {
                "$ref": "Thread"
              },
              "request": {
                "$ref": "ModifyThreadRequest"
              },
              "flatPath": "gmail/v1/users/{userId}/threads/{id}/modify",
              "scopes": [
                "https://mail.google.com/",
                "https://www.googleapis.com/auth/gmail.modify"
              ],
              "httpMethod": "POST"
            }
          }
        },
        "history": {
          "methods": {
            "list": {
              "flatPath": "gmail/v1/users/{userId}/history",
              "scopes": [
                "https://mail.google.com/",
                "https://www.googleapis.com/auth/gmail.metadata",
                "https://www.googleapis.com/auth/gmail.modify",
                "https://www.googleapis.com/auth/gmail.readonly"
              ],
              "httpMethod": "GET",
              "parameterOrder": [
                "userId"
              ],
              "path": "gmail/v1/users/{userId}/history",
              "response": {
                "$ref": "ListHistoryResponse"
              },
              "parameters": {
                "userId": {
                  "type": "string",
                  "required": true,
                  "location": "path",
                  "description": "The user's email address. The special value `me` can be used to indicate the authenticated user.",
                  "default": "me"
                },
                "historyTypes": {
                  "enum": [
                    "messageAdded",
                    "messageDeleted",
                    "labelAdded",
                    "labelRemoved"
                  ],
                  "type": "string",
                  "description": "History types to be returned by the function",
                  "repeated": true,
                  "enumDescriptions": [
                    "",
                    "",
                    "",
                    ""
                  ],
                  "location": "query"
                },
                "pageToken": {
                  "description": "Page token to retrieve a specific page of results in the list.",
                  "type": "string",
                  "location": "query"
                },
                "maxResults": {
                  "description": "Maximum number of history records to return. This field defaults to 100. The maximum allowed value for this field is 500.",
                  "default": "100",
                  "location": "query",
                  "format": "uint32",
                  "type": "integer"
                },
                "startHistoryId": {
                  "description": "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.",
                  "type": "string",
                  "location": "query",
                  "format": "uint64"
                },
                "labelId": {
                  "description": "Only return messages with a label matching the ID.",
                  "location": "query",
                  "type": "string"
                }
              },
              "description": "Lists the history of all changes to the given mailbox. History results are returned in chronological order (increasing `historyId`). For more information, see [Synchronize clients with Gmail](https://developers.google.com/workspace/gmail/api/guides/sync).",
              "id": "gmail.users.history.list"
            }
          }
        },
        "labels": {
          "methods": {
            "create": {
              "scopes": [
                "https://mail.google.com/",
                "https://www.googleapis.com/auth/gmail.labels",
                "https://www.googleapis.com/auth/gmail.modify"
              ],
              "httpMethod": "POST",
              "request": {
                "$ref": "Label"
              },
              "flatPath": "gmail/v1/users/{userId}/labels",
              "path": "gmail/v1/users/{userId}/labels",
              "response": {
                "$ref": "Label"
              },
              "parameterOrder": [
                "userId"
              ],
              "id": "gmail.users.labels.create",
              "parameters": {
                "userId": {
                  "location": "path",
                  "description": "The user's email address. The special value `me` can be used to indicate the authenticated user.",
                  "default": "me",
                  "type": "string",
                  "required": true
                }
              },
              "description": "Creates a label. For more information, see [Manage labels](https://developers.google.com/workspace/gmail/api/guides/labels)."
            },
            "delete": {
              "parameterOrder": [
                "userId",
                "id"
              ],
              "path": "gmail/v1/users/{userId}/labels/{id}",
              "flatPath": "gmail/v1/users/{userId}/labels/{id}",
              "parameters": {
                "userId": {
                  "type": "string",
                  "required": true,
                  "location": "path",
                  "description": "The user's email address. The special value `me` can be used to indicate the authenticated user.",
                  "default": "me"
                },
                "id": {
                  "location": "path",
                  "type": "string",
                  "description": "The ID of the label to delete.",
                  "required": true
                }
              },
              "description": "Immediately and permanently deletes the specified label and removes it from any messages and threads that it's applied to. For more information, see [Manage labels](https://developers.google.com/workspace/gmail/api/guides/labels).",
              "id": "gmail.users.labels.delete",
              "httpMethod": "DELETE",
              "scopes": [
                "https://mail.google.com/",
                "https://www.googleapis.com/auth/gmail.labels",
                "https://www.googleapis.com/auth/gmail.modify"
              ]
            },
            "list": {
              "parameters": {
                "userId": {
                  "location": "path",
                  "description": "The user's email address. The special value `me` can be used to indicate the authenticated user.",
                  "default": "me",
                  "type": "string",
                  "required": true
                }
              },
              "description": "Lists all labels in the user's mailbox. For more information, see [Manage labels](https://developers.google.com/workspace/gmail/api/guides/labels).",
              "id": "gmail.users.labels.list",
              "parameterOrder": [
                "userId"
              ],
              "response": {
                "$ref": "ListLabelsResponse"
              },
              "path": "gmail/v1/users/{userId}/labels",
              "flatPath": "gmail/v1/users/{userId}/labels",
              "httpMethod": "GET",
              "scopes": [
                "https://mail.google.com/",
                "https://www.googleapis.com/auth/gmail.labels",
                "https://www.googleapis.com/auth/gmail.metadata",
                "https://www.googleapis.com/auth/gmail.modify",
                "https://www.googleapis.com/auth/gmail.readonly"
              ]
            },
            "update": {
              "parameterOrder": [
                "userId",
                "id"
              ],
              "path": "gmail/v1/users/{userId}/labels/{id}",
              "response": {
                "$ref": "Label"
              },
              "parameters": {
                "userId": {
                  "description": "The user's email address. The special value `me` can be used to indicate the authenticated user.",
                  "default": "me",
                  "location": "path",
                  "required": true,
                  "type": "string"
                },
                "id": {
                  "description": "The ID of the label to update.",
                  "required": true,
                  "type": "string",
                  "location": "path"
                }
              },
              "description": "Updates the specified label. For more information, see [Manage labels](https://developers.google.com/workspace/gmail/api/guides/labels).",
              "id": "gmail.users.labels.update",
              "request": {
                "$ref": "Label"
              },
              "flatPath": "gmail/v1/users/{userId}/labels/{id}",
              "scopes": [
                "https://mail.google.com/",
                "https://www.googleapis.com/auth/gmail.labels",
                "https://www.googleapis.com/auth/gmail.modify"
              ],
              "httpMethod": "PUT"
            },
            "get": {
              "flatPath": "gmail/v1/users/{userId}/labels/{id}",
              "httpMethod": "GET",
              "scopes": [
                "https://mail.google.com/",
                "https://www.googleapis.com/auth/gmail.labels",
                "https://www.googleapis.com/auth/gmail.metadata",
                "https://www.googleapis.com/auth/gmail.modify",
                "https://www.googleapis.com/auth/gmail.readonly"
              ],
              "parameterOrder": [
                "userId",
                "id"
              ],
              "response": {
                "$ref": "Label"
              },
              "path": "gmail/v1/users/{userId}/labels/{id}",
              "parameters": {
                "userId": {
                  "required": true,
                  "type": "string",
                  "description": "The user's email address. The special value `me` can be used to indicate the authenticated user.",
                  "default": "me",
                  "location": "path"
                },
                "id": {
                  "type": "string",
                  "location": "path",
                  "description": "The ID of the label to retrieve.",
                  "required": true
                }
              },
              "description": "Gets the specified label. For more information, see [Manage labels](https://developers.google.com/workspace/gmail/api/guides/labels).",
              "id": "gmail.users.labels.get"
            },
            "patch": {
              "flatPath": "gmail/v1/users/{userId}/labels/{id}",
              "request": {
                "$ref": "Label"
              },
              "httpMethod": "PATCH",
              "scopes": [
                "https://mail.google.com/",
                "https://www.googleapis.com/auth/gmail.labels",
                "https://www.googleapis.com/auth/gmail.modify"
              ],
              "parameters": {
                "userId": {
                  "description": "The user's email address. The special value `me` can be used to indicate the authenticated user.",
                  "default": "me",
                  "location": "path",
                  "required": true,
                  "type": "string"
                },
                "id": {
                  "type": "string",
                  "location": "path",
                  "description": "The ID of the label to update.",
                  "required": true
                }
              },
              "description": "Patch the specified label. For more information, see [Manage labels](https://developers.google.com/workspace/gmail/api/guides/labels).",
              "id": "gmail.users.labels.patch",
              "parameterOrder": [
                "userId",
                "id"
              ],
              "response": {
                "$ref": "Label"
              },
              "path": "gmail/v1/users/{userId}/labels/{id}"
            }
          }
        },
        "messages": {
          "methods": {
            "delete": {
              "scopes": [
                "https://mail.google.com/"
              ],
              "id": "gmail.users.messages.delete",
              "httpMethod": "DELETE",
              "flatPath": "gmail/v1/users/{userId}/messages/{id}",
              "parameters": {
                "userId": {
                  "type": "string",
                  "required": true,
                  "location": "path",
                  "description": "The user's email address. The special value `me` can be used to indicate the authenticated user.",
                  "default": "me"
                },
                "id": {
                  "type": "string",
                  "location": "path",
                  "description": "The ID of the message to delete.",
                  "required": true
                }
              },
              "description": "Immediately and permanently deletes the specified message. This operation cannot be undone. Prefer `messages.trash` instead.",
              "path": "gmail/v1/users/{userId}/messages/{id}",
              "parameterOrder": [
                "userId",
                "id"
              ]
            },
            "list": {
              "response": {
                "$ref": "ListMessagesResponse"
              },
              "path": "gmail/v1/users/{userId}/messages",
              "parameterOrder": [
                "userId"
              ],
              "id": "gmail.users.messages.list",
              "parameters": {
                "includeSpamTrash": {
                  "location": "query",
                  "type": "boolean",
                  "description": "Include messages from `SPAM` and `TRASH` in the results.",
                  "default": "false"
                },
                "maxResults": {
                  "description": "Maximum number of messages to return. This field defaults to 100. The maximum allowed value for this field is 500.",
                  "default": "100",
                  "location": "query",
                  "format": "uint32",
                  "type": "integer"
                },
                "labelIds": {
                  "type": "string",
                  "location": "query",
                  "description": "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/workspace/gmail/api/guides/labels#manage_labels_on_messages_threads).",
                  "repeated": true
                },
                "q": {
                  "description": "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.",
                  "type": "string",
                  "location": "query"
                },
                "userId": {
                  "required": true,
                  "type": "string",
                  "description": "The user's email address. The special value `me` can be used to indicate the authenticated user.",
                  "default": "me",
                  "location": "path"
                },
                "pageToken": {
                  "type": "string",
                  "location": "query",
                  "description": "Page token to retrieve a specific page of results in the list."
                }
              },
              "description": "Lists the messages in the user's mailbox. For more information, see [List Gmail messages](https://developers.google.com/workspace/gmail/api/guides/list-messages).",
              "httpMethod": "GET",
              "scopes": [
                "https://mail.google.com/",
                "https://www.googleapis.com/auth/gmail.metadata",
                "https://www.googleapis.com/auth/gmail.modify",
                "https://www.googleapis.com/auth/gmail.readonly"
              ],
              "flatPath": "gmail/v1/users/{userId}/messages"
            },
            "trash": {
              "httpMethod": "POST",
              "scopes": [
                "https://mail.google.com/",
                "https://www.googleapis.com/auth/gmail.modify"
              ],
              "flatPath": "gmail/v1/users/{userId}/messages/{id}/trash",
              "response": {
                "$ref": "Message"
              },
              "path": "gmail/v1/users/{userId}/messages/{id}/trash",
              "parameterOrder": [
                "userId",
                "id"
              ],
              "id": "gmail.users.messages.trash",
              "parameters": {
                "userId": {
                  "required": true,
                  "type": "string",
                  "description": "The user's email address. The special value `me` can be used to indicate the authenticated user.",
                  "default": "me",
                  "location": "path"
                },
                "id": {
                  "description": "The ID of the message to Trash.",
                  "required": true,
                  "type": "string",
                  "location": "path"
                }
              },
              "description": "Moves the specified message to the trash."
            },
            "insert": {
              "parameterOrder": [
                "userId"
              ],
              "supportsMediaUpload": true,
              "response": {
                "$ref": "Message"
              },
              "path": "gmail/v1/users/{userId}/messages",
              "parameters": {
                "userId": {
                  "location": "path",
                  "description": "The user's email address. The special value `me` can be used to indicate the authenticated user.",
                  "default": "me",
                  "type": "string",
                  "required": true
                },
                "internalDateSource": {
                  "type": "string",
                  "enum": [
                    "receivedTime",
                    "dateHeader"
                  ],
                  "location": "query",
                  "description": "Source for Gmail's internal date of the message.",
                  "default": "receivedTime",
                  "enumDescriptions": [
                    "Internal message date set to current time when received by Gmail.",
                    "Internal message time based on 'Date' header in email, when valid."
                  ]
                },
                "deleted": {
                  "description": "Mark the email as permanently deleted (not TRASH) and only visible in Google Vault to a Vault administrator. Only used for Google Workspace accounts.",
                  "default": "false",
                  "location": "query",
                  "type": "boolean"
                }
              },
              "description": "Directly inserts a message into only this user's mailbox similar to `IMAP APPEND`, bypassing most scanning and classification. Does not send a message. For more information, see [Create and send email messages](https://developers.google.com/workspace/gmail/api/guides/sending).",
              "id": "gmail.users.messages.insert",
              "flatPath": "gmail/v1/users/{userId}/messages",
              "mediaUpload": {
                "maxSize": "157286400",
                "accept": [
                  "message/*"
                ],
                "protocols": {
                  "resumable": {
                    "path": "/resumable/upload/gmail/v1/users/{userId}/messages",
                    "multipart": true
                  },
                  "simple": {
                    "multipart": true,
                    "path": "/upload/gmail/v1/users/{userId}/messages"
                  }
                }
              },
              "request": {
                "$ref": "Message"
              },
              "httpMethod": "POST",
              "scopes": [
                "https://mail.google.com/",
                "https://www.googleapis.com/auth/gmail.insert",
                "https://www.googleapis.com/auth/gmail.modify"
              ]
            },
            "batchDelete": {
              "scopes": [
                "https://mail.google.com/"
              ],
              "httpMethod": "POST",
              "request": {
                "$ref": "BatchDeleteMessagesRequest"
              },
              "flatPath": "gmail/v1/users/{userId}/messages/batchDelete",
              "path": "gmail/v1/users/{userId}/messages/batchDelete",
              "parameterOrder": [
                "userId"
              ],
              "id": "gmail.users.messages.batchDelete",
              "parameters": {
                "userId": {
                  "type": "string",
                  "required": true,
                  "location": "path",
                  "description": "The user's email address. The special value `me` can be used to indicate the authenticated user.",
                  "default": "me"
                }
              },
              "description": "Deletes many messages by message ID. Provides no guarantees that messages were not already deleted or even existed at all."
            },
            "send": {
              "scopes": [
                "https://mail.google.com/",
                "https://www.googleapis.com/auth/gmail.addons.current.action.compose",
                "https://www.googleapis.com/auth/gmail.compose",
                "https://www.googleapis.com/auth/gmail.modify",
                "https://www.googleapis.com/auth/gmail.send"
              ],
              "httpMethod": "POST",
              "request": {
                "$ref": "Message"
              },
              "flatPath": "gmail/v1/users/{userId}/messages/send",
              "mediaUpload": {
                "accept": [
                  "message/*"
                ],
                "protocols": {
                  "resumable": {
                    "path": "/resumable/upload/gmail/v1/users/{userId}/messages/send",
                    "multipart": true
                  },
                  "simple": {
                    "path": "/upload/gmail/v1/users/{userId}/messages/send",
                    "multipart": true
                  }
                },
                "maxSize": "36700160"
              },
              "path": "gmail/v1/users/{userId}/messages/send",
              "supportsMediaUpload": true,
              "response": {
                "$ref": "Message"
              },
              "parameterOrder": [
                "userId"
              ],
              "id": "gmail.users.messages.send",
              "parameters": {
                "userId": {
                  "type": "string",
                  "required": true,
                  "location": "path",
                  "description": "The user's email address. The special value `me` can be used to indicate the authenticated user.",
                  "default": "me"
                }
              },
              "description": "Sends the specified message to the recipients in the `To`, `Cc`, and `Bcc` headers. For more information, see [Create and send email messages](https://developers.google.com/workspace/gmail/api/guides/sending)."
            },
            "batchModify": {
              "scopes": [
                "https://mail.google.com/",
                "https://www.googleapis.com/auth/gmail.modify"
              ],
              "httpMethod": "POST",
              "request": {
                "$ref": "BatchModifyMessagesRequest"
              },
              "flatPath": "gmail/v1/users/{userId}/messages/batchModify",
              "id": "gmail.users.messages.batchModify",
              "parameters": {
                "userId": {
                  "type": "string",
                  "required": true,
                  "location": "path",
                  "description": "The user's email address. The special value `me` can be used to indicate the authenticated user.",
                  "default": "me"
                }
              },
              "description": "Modifies the labels and the Classification Label values on the specified messages. For administrators modifying messages for users in their organization, requests require authorization with a [service account](https://developers.google.com/identity/protocols/OAuth2ServiceAccount) that has [domain-wide delegation authority](https://developers.google.com/identity/protocols/OAuth2ServiceAccount#delegatingauthority) to impersonate users with the `https://www.googleapis.com/auth/gmail.modify.restricted` scope.",
              "path": "gmail/v1/users/{userId}/messages/batchModify",
              "parameterOrder": [
                "userId"
              ]
            },
            "import": {
              "httpMethod": "POST",
              "scopes": [
                "https://mail.google.com/",
                "https://www.googleapis.com/auth/gmail.insert",
                "https://www.googleapis.com/auth/gmail.modify"
              ],
              "flatPath": "gmail/v1/users/{userId}/messages/import",
              "mediaUpload": {
                "accept": [
                  "message/*"
                ],
                "protocols": {
                  "resumable": {
                    "path": "/resumable/upload/gmail/v1/users/{userId}/messages/import",
                    "multipart": true
                  },
                  "simple": {
                    "multipart": true,
                    "path": "/upload/gmail/v1/users/{userId}/messages/import"
                  }
                },
                "maxSize": "157286400"
              },
              "request": {
                "$ref": "Message"
              },
              "supportsMediaUpload": true,
              "response": {
                "$ref": "Message"
              },
              "path": "gmail/v1/users/{userId}/messages/import",
              "parameterOrder": [
                "userId"
              ],
              "id": "gmail.users.messages.import",
              "parameters": {
                "userId": {
                  "required": true,
                  "type": "string",
                  "description": "The user's email address. The special value `me` can be used to indicate the authenticated user.",
                  "default": "me",
                  "location": "path"
                },
                "processForCalendar": {
                  "location": "query",
                  "type": "boolean",
                  "description": "Process calendar invites in the email and add any extracted meetings to the Google Calendar for this user.",
                  "default": "false"
                },
                "deleted": {
                  "location": "query",
                  "type": "boolean",
                  "description": "Mark the email as permanently deleted (not TRASH) and only visible in Google Vault to a Vault administrator. Only used for Google Workspace accounts.",
                  "default": "false"
                },
                "internalDateSource": {
                  "location": "query",
                  "enumDescriptions": [
                    "Internal message date set to current time when received by Gmail.",
                    "Internal message time based on 'Date' header in email, when valid."
                  ],
                  "description": "Source for Gmail's internal date of the message.",
                  "default": "dateHeader",
                  "type": "string",
                  "enum": [
                    "receivedTime",
                    "dateHeader"
                  ]
                },
                "neverMarkSpam": {
                  "description": "Ignore the Gmail spam classifier decision and never mark this email as SPAM in the mailbox.",
                  "default": "false",
                  "location": "query",
                  "type": "boolean"
                }
              },
              "description": "Imports a message into only this user's mailbox, with standard email delivery scanning and classification similar to receiving via SMTP. This method doesn't perform SPF checks, so it might not work for some spam messages, such as those attempting to perform domain spoofing. This method does not send a message. Note that the maximum size of the message is 150 MB."
            },
            "get": {
              "flatPath": "gmail/v1/users/{userId}/messages/{id}",
              "httpMethod": "GET",
              "scopes": [
                "https://mail.google.com/",
                "https://www.googleapis.com/auth/gmail.addons.current.message.action",
                "https://www.googleapis.com/auth/gmail.addons.current.message.metadata",
                "https://www.googleapis.com/auth/gmail.addons.current.message.readonly",
                "https://www.googleapis.com/auth/gmail.metadata",
                "https://www.googleapis.com/auth/gmail.modify",
                "https://www.googleapis.com/auth/gmail.readonly"
              ],
              "parameters": {
                "format": {
                  "enumDescriptions": [
                    "Returns only email message ID and labels; does not return the email headers, body, or payload.",
                    "Returns the full email message data with body content parsed in the `payload` field; the `raw` field is not used. Format cannot be used when accessing the api using the gmail.metadata scope.",
                    "Returns the full email message data with body content in the `raw` field as a base64url encoded string; the `payload` field is not used. Format cannot be used when accessing the api using the gmail.metadata scope.",
                    "Returns only email message ID, labels, and email headers."
                  ],
                  "description": "The format to return the message in.",
                  "default": "full",
                  "location": "query",
                  "enum": [
                    "minimal",
                    "full",
                    "raw",
                    "metadata"
                  ],
                  "type": "string"
                },
                "metadataHeaders": {
                  "type": "string",
                  "location": "query",
                  "description": "When given and format is `METADATA`, only include headers specified.",
                  "repeated": true
                },
                "id": {
                  "type": "string",
                  "location": "path",
                  "description": "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`).",
                  "required": true
                },
                "userId": {
                  "description": "The user's email address. The special value `me` can be used to indicate the authenticated user.",
                  "default": "me",
                  "location": "path",
                  "required": true,
                  "type": "string"
                }
              },
              "description": "Gets the specified message.",
              "id": "gmail.users.messages.get",
              "parameterOrder": [
                "userId",
                "id"
              ],
              "response": {
                "$ref": "Message"
              },
              "path": "gmail/v1/users/{userId}/messages/{id}"
            },
            "untrash": {
              "scopes": [
                "https://mail.google.com/",
                "https://www.googleapis.com/auth/gmail.modify"
              ],
              "httpMethod": "POST",
              "flatPath": "gmail/v1/users/{userId}/messages/{id}/untrash",
              "path": "gmail/v1/users/{userId}/messages/{id}/untrash",
              "response": {
                "$ref": "Message"
              },
              "parameterOrder": [
                "userId",
                "id"
              ],
              "id": "gmail.users.messages.untrash",
              "parameters": {
                "userId": {
                  "description": "The user's email address. The special value `me` can be used to indicate the authenticated user.",
                  "default": "me",
                  "location": "path",
                  "required": true,
                  "type": "string"
                },
                "id": {
                  "type": "string",
                  "location": "path",
                  "description": "The ID of the message to remove from Trash.",
                  "required": true
                }
              },
              "description": "Removes the specified message from the trash."
            },
            "modify": {
              "response": {
                "$ref": "Message"
              },
              "path": "gmail/v1/users/{userId}/messages/{id}/modify",
              "parameterOrder": [
                "userId",
                "id"
              ],
              "id": "gmail.users.messages.modify",
              "parameters": {
                "userId": {
                  "description": "The user's email address. The special value `me` can be used to indicate the authenticated user.",
                  "default": "me",
                  "location": "path",
                  "required": true,
                  "type": "string"
                },
                "id": {
                  "location": "path",
                  "type": "string",
                  "description": "The ID of the message to modify.",
                  "required": true
                }
              },
              "description": "Modifies the labels and the Classification Label values on the specified message. For administrators modifying message for users in their organization, requests require authorization with a [service account](https://developers.google.com/identity/protocols/OAuth2ServiceAccount) that has [domain-wide delegation authority](https://developers.google.com/identity/protocols/OAuth2ServiceAccount#delegatingauthority) to impersonate users with the `https://www.googleapis.com/auth/gmail.modify.restricted` scope.",
              "httpMethod": "POST",
              "scopes": [
                "https://mail.google.com/",
                "https://www.googleapis.com/auth/gmail.modify"
              ],
              "flatPath": "gmail/v1/users/{userId}/messages/{id}/modify",
              "request": {
                "$ref": "ModifyMessageRequest"
              }
            }
          },
          "resources": {
            "attachments": {
              "methods": {
                "get": {
                  "flatPath": "gmail/v1/users/{userId}/messages/{messageId}/attachments/{id}",
                  "scopes": [
                    "https://mail.google.com/",
                    "https://www.googleapis.com/auth/gmail.addons.current.message.action",
                    "https://www.googleapis.com/auth/gmail.addons.current.message.readonly",
                    "https://www.googleapis.com/auth/gmail.modify",
                    "https://www.googleapis.com/auth/gmail.readonly"
                  ],
                  "httpMethod": "GET",
                  "parameterOrder": [
                    "userId",
                    "messageId",
                    "id"
                  ],
                  "path": "gmail/v1/users/{userId}/messages/{messageId}/attachments/{id}",
                  "response": {
                    "$ref": "MessagePartBody"
                  },
                  "parameters": {
                    "messageId": {
                      "description": "The ID of the message containing the attachment.",
                      "required": true,
                      "type": "string",
                      "location": "path"
                    },
                    "userId": {
                      "description": "The user's email address. The special value `me` can be used to indicate the authenticated user.",
                      "default": "me",
                      "location": "path",
                      "required": true,
                      "type": "string"
                    },
                    "id": {
                      "type": "string",
                      "location": "path",
                      "description": "The ID of the attachment.",
                      "required": true
                    }
                  },
                  "description": "Gets the specified message attachment.",
                  "id": "gmail.users.messages.attachments.get"
                }
              }
            }
          }
        },
        "settings": {
          "resources": {
            "sendAs": {
              "methods": {
                "patch": {
                  "id": "gmail.users.settings.sendAs.patch",
                  "parameters": {
                    "sendAsEmail": {
                      "description": "The send-as alias to be updated.",
                      "required": true,
                      "location": "path",
                      "type": "string"
                    },
                    "userId": {
                      "required": true,
                      "type": "string",
                      "description": "User's email address. The special value \"me\" can be used to indicate the authenticated user.",
                      "default": "me",
                      "location": "path"
                    }
                  },
                  "description": "Patch the specified send-as alias. For more information, see [Manage aliases and signatures with the Gmail API](https://developers.google.com/workspace/gmail/api/guides/alias_and_signature_settings).",
                  "response": {
                    "$ref": "SendAs"
                  },
                  "path": "gmail/v1/users/{userId}/settings/sendAs/{sendAsEmail}",
                  "parameterOrder": [
                    "userId",
                    "sendAsEmail"
                  ],
                  "httpMethod": "PATCH",
                  "scopes": [
                    "https://www.googleapis.com/auth/gmail.settings.basic",
                    "https://www.googleapis.com/auth/gmail.settings.sharing"
                  ],
                  "flatPath": "gmail/v1/users/{userId}/settings/sendAs/{sendAsEmail}",
                  "request": {
                    "$ref": "SendAs"
                  }
                },
                "get": {
                  "httpMethod": "GET",
                  "scopes": [
                    "https://mail.google.com/",
                    "https://www.googleapis.com/auth/gmail.modify",
                    "https://www.googleapis.com/auth/gmail.readonly",
                    "https://www.googleapis.com/auth/gmail.settings.basic"
                  ],
                  "flatPath": "gmail/v1/users/{userId}/settings/sendAs/{sendAsEmail}",
                  "response": {
                    "$ref": "SendAs"
                  },
                  "path": "gmail/v1/users/{userId}/settings/sendAs/{sendAsEmail}",
                  "parameterOrder": [
                    "userId",
                    "sendAsEmail"
                  ],
                  "id": "gmail.users.settings.sendAs.get",
                  "parameters": {
                    "sendAsEmail": {
                      "description": "The send-as alias to be retrieved.",
                      "required": true,
                      "type": "string",
                      "location": "path"
                    },
                    "userId": {
                      "type": "string",
                      "required": true,
                      "location": "path",
                      "description": "User's email address. The special value \"me\" can be used to indicate the authenticated user.",
                      "default": "me"
                    }
                  },
                  "description": "Gets the specified send-as alias. Fails with an HTTP 404 error if the specified address is not a member of the collection. For more information, see [Manage aliases and signatures with the Gmail API](https://developers.google.com/workspace/gmail/api/guides/alias_and_signature_settings)."
                },
                "update": {
                  "parameterOrder": [
                    "userId",
                    "sendAsEmail"
                  ],
                  "response": {
                    "$ref": "SendAs"
                  },
                  "path": "gmail/v1/users/{userId}/settings/sendAs/{sendAsEmail}",
                  "parameters": {
                    "userId": {
                      "type": "string",
                      "required": true,
                      "location": "path",
                      "description": "User's email address. The special value \"me\" can be used to indicate the authenticated user.",
                      "default": "me"
                    },
                    "sendAsEmail": {
                      "description": "The send-as alias to be updated.",
                      "required": true,
                      "location": "path",
                      "type": "string"
                    }
                  },
                  "description": "Updates a send-as alias. If a signature is provided, Gmail will sanitize the HTML before saving it with the alias. For more information, see [Manage aliases and signatures with the Gmail API](https://developers.google.com/workspace/gmail/api/guides/alias_and_signature_settings). Addresses other than the primary address for the account can only be updated by service account clients that have been delegated domain-wide authority.",
                  "id": "gmail.users.settings.sendAs.update",
                  "flatPath": "gmail/v1/users/{userId}/settings/sendAs/{sendAsEmail}",
                  "request": {
                    "$ref": "SendAs"
                  },
                  "httpMethod": "PUT",
                  "scopes": [
                    "https://www.googleapis.com/auth/gmail.settings.basic",
                    "https://www.googleapis.com/auth/gmail.settings.sharing"
                  ]
                },
                "verify": {
                  "flatPath": "gmail/v1/users/{userId}/settings/sendAs/{sendAsEmail}/verify",
                  "parameters": {
                    "userId": {
                      "required": true,
                      "type": "string",
                      "description": "User's email address. The special value \"me\" can be used to indicate the authenticated user.",
                      "default": "me",
                      "location": "path"
                    },
                    "sendAsEmail": {
                      "location": "path",
                      "type": "string",
                      "description": "The send-as alias to be verified.",
                      "required": true
                    }
                  },
                  "description": "Sends a verification email to the specified send-as alias address. The verification status must be `pending`. For more information, see [Manage aliases and signatures with the Gmail API](https://developers.google.com/workspace/gmail/api/guides/alias_and_signature_settings). This method is only available to service account clients that have been delegated domain-wide authority.",
                  "id": "gmail.users.settings.sendAs.verify",
                  "httpMethod": "POST",
                  "scopes": [
                    "https://www.googleapis.com/auth/gmail.settings.sharing"
                  ],
                  "parameterOrder": [
                    "userId",
                    "sendAsEmail"
                  ],
                  "path": "gmail/v1/users/{userId}/settings/sendAs/{sendAsEmail}/verify"
                },
                "list": {
                  "flatPath": "gmail/v1/users/{userId}/settings/sendAs",
                  "scopes": [
                    "https://mail.google.com/",
                    "https://www.googleapis.com/auth/gmail.modify",
                    "https://www.googleapis.com/auth/gmail.readonly",
                    "https://www.googleapis.com/auth/gmail.settings.basic"
                  ],
                  "httpMethod": "GET",
                  "parameters": {
                    "userId": {
                      "location": "path",
                      "description": "User's email address. The special value \"me\" can be used to indicate the authenticated user.",
                      "default": "me",
                      "type": "string",
                      "required": true
                    }
                  },
                  "description": "Lists the send-as aliases for the specified account. The result includes the primary send-as address associated with the account as well as any custom \"from\" aliases. For more information, see [Manage aliases and signatures with the Gmail API](https://developers.google.com/workspace/gmail/api/guides/alias_and_signature_settings).",
                  "id": "gmail.users.settings.sendAs.list",
                  "parameterOrder": [
                    "userId"
                  ],
                  "path": "gmail/v1/users/{userId}/settings/sendAs",
                  "response": {
                    "$ref": "ListSendAsResponse"
                  }
                },
                "create": {
                  "parameterOrder": [
                    "userId"
                  ],
                  "path": "gmail/v1/users/{userId}/settings/sendAs",
                  "response": {
                    "$ref": "SendAs"
                  },
                  "parameters": {
                    "userId": {
                      "description": "User's email address. The special value \"me\" can be used to indicate the authenticated user.",
                      "default": "me",
                      "location": "path",
                      "required": true,
                      "type": "string"
                    }
                  },
                  "description": "Creates a custom \"from\" send-as alias. If an SMTP MSA is specified, Gmail will attempt to connect to the SMTP service to validate the configuration before creating the alias. If ownership verification is required for the alias, a message will be sent to the email address and the resource's verification status will be set to `pending`; otherwise, the resource will be created with verification status set to `accepted`. If a signature is provided, Gmail will sanitize the HTML before saving it with the alias. For more information, see [Manage aliases and signatures with the Gmail API](https://developers.google.com/workspace/gmail/api/guides/alias_and_signature_settings). This method is only available to service account clients that have been delegated domain-wide authority.",
                  "id": "gmail.users.settings.sendAs.create",
                  "request": {
                    "$ref": "SendAs"
                  },
                  "flatPath": "gmail/v1/users/{userId}/settings/sendAs",
                  "scopes": [
                    "https://www.googleapis.com/auth/gmail.settings.sharing"
                  ],
                  "httpMethod": "POST"
                },
                "delete": {
                  "id": "gmail.users.settings.sendAs.delete",
                  "httpMethod": "DELETE",
                  "scopes": [
                    "https://www.googleapis.com/auth/gmail.settings.sharing"
                  ],
                  "flatPath": "gmail/v1/users/{userId}/settings/sendAs/{sendAsEmail}",
                  "parameters": {
                    "sendAsEmail": {
                      "type": "string",
                      "location": "path",
                      "description": "The send-as alias to be deleted.",
                      "required": true
                    },
                    "userId": {
                      "location": "path",
                      "description": "User's email address. The special value \"me\" can be used to indicate the authenticated user.",
                      "default": "me",
                      "type": "string",
                      "required": true
                    }
                  },
                  "description": "Deletes the specified send-as alias. Revokes any verification that may have been required for using it. For more information, see [Manage aliases and signatures with the Gmail API](https://developers.google.com/workspace/gmail/api/guides/alias_and_signature_settings). This method is only available to service account clients that have been delegated domain-wide authority.",
                  "path": "gmail/v1/users/{userId}/settings/sendAs/{sendAsEmail}",
                  "parameterOrder": [
                    "userId",
                    "sendAsEmail"
                  ]
                }
              },
              "resources": {
                "smimeInfo": {
                  "methods": {
                    "list": {
                      "flatPath": "gmail/v1/users/{userId}/settings/sendAs/{sendAsEmail}/smimeInfo",
                      "scopes": [
                        "https://mail.google.com/",
                        "https://www.googleapis.com/auth/gmail.modify",
                        "https://www.googleapis.com/auth/gmail.readonly",
                        "https://www.googleapis.com/auth/gmail.settings.basic",
                        "https://www.googleapis.com/auth/gmail.settings.sharing"
                      ],
                      "httpMethod": "GET",
                      "parameterOrder": [
                        "userId",
                        "sendAsEmail"
                      ],
                      "path": "gmail/v1/users/{userId}/settings/sendAs/{sendAsEmail}/smimeInfo",
                      "response": {
                        "$ref": "ListSmimeInfoResponse"
                      },
                      "parameters": {
                        "sendAsEmail": {
                          "description": "The email address that appears in the \"From:\" header for mail sent using this alias.",
                          "required": true,
                          "location": "path",
                          "type": "string"
                        },
                        "userId": {
                          "required": true,
                          "type": "string",
                          "description": "The user's email address. The special value `me` can be used to indicate the authenticated user.",
                          "default": "me",
                          "location": "path"
                        }
                      },
                      "description": "Lists S/MIME configs for the specified send-as alias. For more information, see [Manage S/MIME certificates with the Gmail API](https://developers.google.com/workspace/gmail/api/guides/smime_certs).",
                      "id": "gmail.users.settings.sendAs.smimeInfo.list"
                    },
                    "delete": {
                      "id": "gmail.users.settings.sendAs.smimeInfo.delete",
                      "httpMethod": "DELETE",
                      "scopes": [
                        "https://www.googleapis.com/auth/gmail.settings.basic",
                        "https://www.googleapis.com/auth/gmail.settings.sharing"
                      ],
                      "flatPath": "gmail/v1/users/{userId}/settings/sendAs/{sendAsEmail}/smimeInfo/{id}",
                      "parameters": {
                        "sendAsEmail": {
                          "location": "path",
                          "type": "string",
                          "description": "The email address that appears in the \"From:\" header for mail sent using this alias.",
                          "required": true
                        },
                        "userId": {
                          "type": "string",
                          "required": true,
                          "location": "path",
                          "description": "The user's email address. The special value `me` can be used to indicate the authenticated user.",
                          "default": "me"
                        },
                        "id": {
                          "location": "path",
                          "type": "string",
                          "description": "The immutable ID for the SmimeInfo.",
                          "required": true
                        }
                      },
                      "description": "Deletes the specified S/MIME config for the specified send-as alias. For more information, see [Manage S/MIME certificates with the Gmail API](https://developers.google.com/workspace/gmail/api/guides/smime_certs).",
                      "path": "gmail/v1/users/{userId}/settings/sendAs/{sendAsEmail}/smimeInfo/{id}",
                      "parameterOrder": [
                        "userId",
                        "sendAsEmail",
                        "id"
                      ]
                    },
                    "insert": {
                      "path": "gmail/v1/users/{userId}/settings/sendAs/{sendAsEmail}/smimeInfo",
                      "response": {
                        "$ref": "SmimeInfo"
                      },
                      "parameterOrder": [
                        "userId",
                        "sendAsEmail"
                      ],
                      "id": "gmail.users.settings.sendAs.smimeInfo.insert",
                      "parameters": {
                        "sendAsEmail": {
                          "description": "The email address that appears in the \"From:\" header for mail sent using this alias.",
                          "required": true,
                          "location": "path",
                          "type": "string"
                        },
                        "userId": {
                          "location": "path",
                          "description": "The user's email address. The special value `me` can be used to indicate the authenticated user.",
                          "default": "me",
                          "type": "string",
                          "required": true
                        }
                      },
                      "description": "Insert (upload) the given S/MIME config for the specified send-as alias. Note that `pkcs12` format is required for the key. For more information, see [Manage S/MIME certificates with the Gmail API](https://developers.google.com/workspace/gmail/api/guides/smime_certs).",
                      "scopes": [
                        "https://www.googleapis.com/auth/gmail.settings.basic",
                        "https://www.googleapis.com/auth/gmail.settings.sharing"
                      ],
                      "httpMethod": "POST",
                      "request": {
                        "$ref": "SmimeInfo"
                      },
                      "flatPath": "gmail/v1/users/{userId}/settings/sendAs/{sendAsEmail}/smimeInfo"
                    },
                    "setDefault": {
                      "path": "gmail/v1/users/{userId}/settings/sendAs/{sendAsEmail}/smimeInfo/{id}/setDefault",
                      "parameterOrder": [
                        "userId",
                        "sendAsEmail",
                        "id"
                      ],
                      "scopes": [
                        "https://www.googleapis.com/auth/gmail.settings.basic",
                        "https://www.googleapis.com/auth/gmail.settings.sharing"
                      ],
                      "id": "gmail.users.settings.sendAs.smimeInfo.setDefault",
                      "httpMethod": "POST",
                      "flatPath": "gmail/v1/users/{userId}/settings/sendAs/{sendAsEmail}/smimeInfo/{id}/setDefault",
                      "parameters": {
                        "id": {
                          "location": "path",
                          "type": "string",
                          "description": "The immutable ID for the SmimeInfo.",
                          "required": true
                        },
                        "userId": {
                          "type": "string",
                          "required": true,
                          "location": "path",
                          "description": "The user's email address. The special value `me` can be used to indicate the authenticated user.",
                          "default": "me"
                        },
                        "sendAsEmail": {
                          "location": "path",
                          "type": "string",
                          "description": "The email address that appears in the \"From:\" header for mail sent using this alias.",
                          "required": true
                        }
                      },
                      "description": "Sets the default S/MIME config for the specified send-as alias. For more information, see [Manage S/MIME certificates with the Gmail API](https://developers.google.com/workspace/gmail/api/guides/smime_certs)."
                    },
                    "get": {
                      "parameters": {
                        "userId": {
                          "required": true,
                          "type": "string",
                          "description": "The user's email address. The special value `me` can be used to indicate the authenticated user.",
                          "default": "me",
                          "location": "path"
                        },
                        "sendAsEmail": {
                          "description": "The email address that appears in the \"From:\" header for mail sent using this alias.",
                          "required": true,
                          "location": "path",
                          "type": "string"
                        },
                        "id": {
                          "description": "The immutable ID for the SmimeInfo.",
                          "required": true,
                          "location": "path",
                          "type": "string"
                        }
                      },
                      "description": "Gets the specified S/MIME config for the specified send-as alias. For more information, see [Manage S/MIME certificates with the Gmail API](https://developers.google.com/workspace/gmail/api/guides/smime_certs).",
                      "id": "gmail.users.settings.sendAs.smimeInfo.get",
                      "parameterOrder": [
                        "userId",
                        "sendAsEmail",
                        "id"
                      ],
                      "path": "gmail/v1/users/{userId}/settings/sendAs/{sendAsEmail}/smimeInfo/{id}",
                      "response": {
                        "$ref": "SmimeInfo"
                      },
                      "flatPath": "gmail/v1/users/{userId}/settings/sendAs/{sendAsEmail}/smimeInfo/{id}",
                      "scopes": [
                        "https://mail.google.com/",
                        "https://www.googleapis.com/auth/gmail.modify",
                        "https://www.googleapis.com/auth/gmail.readonly",
                        "https://www.googleapis.com/auth/gmail.settings.basic",
                        "https://www.googleapis.com/auth/gmail.settings.sharing"
                      ],
                      "httpMethod": "GET"
                    }
                  }
                }
              }
            },
            "cse": {
              "resources": {
                "identities": {
                  "methods": {
                    "patch": {
                      "parameters": {
                        "userId": {
                          "type": "string",
                          "required": true,
                          "location": "path",
                          "description": "The requester's primary email address. To indicate the authenticated user, you can use the special value `me`.",
                          "default": "me"
                        },
                        "emailAddress": {
                          "description": "The email address of the client-side encryption identity to update.",
                          "required": true,
                          "type": "string",
                          "location": "path"
                        }
                      },
                      "description": "Associates a different key pair with an existing client-side encryption identity. The updated key pair must validate against Google's [S/MIME certificate profiles](https://support.google.com/a/answer/7300887). For administrators managing identities and keypairs for users in their organization, requests require authorization with a [service account](https://developers.google.com/identity/protocols/OAuth2ServiceAccount) that has [domain-wide delegation authority](https://developers.google.com/identity/protocols/OAuth2ServiceAccount#delegatingauthority) to impersonate users with the `https://www.googleapis.com/auth/gmail.settings.basic` scope. For users managing their own identities and keypairs, requests require [hardware key encryption](https://support.google.com/a/answer/14153163) turned on and configured.",
                      "id": "gmail.users.settings.cse.identities.patch",
                      "parameterOrder": [
                        "userId",
                        "emailAddress"
                      ],
                      "response": {
                        "$ref": "CseIdentity"
                      },
                      "path": "gmail/v1/users/{userId}/settings/cse/identities/{emailAddress}",
                      "flatPath": "gmail/v1/users/{userId}/settings/cse/identities/{emailAddress}",
                      "request": {
                        "$ref": "CseIdentity"
                      },
                      "httpMethod": "PATCH",
                      "scopes": [
                        "https://www.googleapis.com/auth/gmail.settings.basic",
                        "https://www.googleapis.com/auth/gmail.settings.sharing"
                      ]
                    },
                    "get": {
                      "flatPath": "gmail/v1/users/{userId}/settings/cse/identities/{cseEmailAddress}",
                      "httpMethod": "GET",
                      "scopes": [
                        "https://mail.google.com/",
                        "https://www.googleapis.com/auth/gmail.modify",
                        "https://www.googleapis.com/auth/gmail.readonly",
                        "https://www.googleapis.com/auth/gmail.settings.basic",
                        "https://www.googleapis.com/auth/gmail.settings.sharing"
                      ],
                      "parameters": {
                        "userId": {
                          "location": "path",
                          "description": "The requester's primary email address. To indicate the authenticated user, you can use the special value `me`.",
                          "default": "me",
                          "type": "string",
                          "required": true
                        },
                        "cseEmailAddress": {
                          "location": "path",
                          "type": "string",
                          "description": "The primary email address associated with the client-side encryption identity configuration that's retrieved.",
                          "required": true
                        }
                      },
                      "description": "Retrieves a client-side encryption identity configuration. For administrators managing identities and keypairs for users in their organization, requests require authorization with a [service account](https://developers.google.com/identity/protocols/OAuth2ServiceAccount) that has [domain-wide delegation authority](https://developers.google.com/identity/protocols/OAuth2ServiceAccount#delegatingauthority) to impersonate users with the `https://www.googleapis.com/auth/gmail.settings.basic` scope. For users managing their own identities and keypairs, requests require [hardware key encryption](https://support.google.com/a/answer/14153163) turned on and configured.",
                      "id": "gmail.users.settings.cse.identities.get",
                      "parameterOrder": [
                        "userId",
                        "cseEmailAddress"
                      ],
                      "response": {
                        "$ref": "CseIdentity"
                      },
                      "path": "gmail/v1/users/{userId}/settings/cse/identities/{cseEmailAddress}"
                    },
                    "create": {
                      "parameters": {
                        "userId": {
                          "description": "The requester's primary email address. To indicate the authenticated user, you can use the special value `me`.",
                          "default": "me",
                          "location": "path",
                          "required": true,
                          "type": "string"
                        }
                      },
                      "description": "Creates and configures a client-side encryption identity that's authorized to send mail from the user account. Google publishes the S/MIME certificate to a shared domain-wide directory so that people within a Google Workspace organization can encrypt and send mail to the identity. For administrators managing identities and keypairs for users in their organization, requests require authorization with a [service account](https://developers.google.com/identity/protocols/OAuth2ServiceAccount) that has [domain-wide delegation authority](https://developers.google.com/identity/protocols/OAuth2ServiceAccount#delegatingauthority) to impersonate users with the `https://www.googleapis.com/auth/gmail.settings.basic` scope. For users managing their own identities and keypairs, requests require [hardware key encryption](https://support.google.com/a/answer/14153163) turned on and configured.",
                      "id": "gmail.users.settings.cse.identities.create",
                      "parameterOrder": [
                        "userId"
                      ],
                      "path": "gmail/v1/users/{userId}/settings/cse/identities",
                      "response": {
                        "$ref": "CseIdentity"
                      },
                      "request": {
                        "$ref": "CseIdentity"
                      },
                      "flatPath": "gmail/v1/users/{userId}/settings/cse/identities",
                      "scopes": [
                        "https://www.googleapis.com/auth/gmail.settings.basic",
                        "https://www.googleapis.com/auth/gmail.settings.sharing"
                      ],
                      "httpMethod": "POST"
                    },
                    "delete": {
                      "scopes": [
                        "https://www.googleapis.com/auth/gmail.settings.basic",
                        "https://www.googleapis.com/auth/gmail.settings.sharing"
                      ],
                      "id": "gmail.users.settings.cse.identities.delete",
                      "httpMethod": "DELETE",
                      "flatPath": "gmail/v1/users/{userId}/settings/cse/identities/{cseEmailAddress}",
                      "parameters": {
                        "userId": {
                          "required": true,
                          "type": "string",
                          "description": "The requester's primary email address. To indicate the authenticated user, you can use the special value `me`.",
                          "default": "me",
                          "location": "path"
                        },
                        "cseEmailAddress": {
                          "location": "path",
                          "type": "string",
                          "description": "The primary email address associated with the client-side encryption identity configuration that's removed.",
                          "required": true
                        }
                      },
                      "description": "Deletes a client-side encryption identity. The authenticated user can no longer use the identity to send encrypted messages. You cannot restore the identity after you delete it. Instead, use the CreateCseIdentity method to create another identity with the same configuration. For administrators managing identities and keypairs for users in their organization, requests require authorization with a [service account](https://developers.google.com/identity/protocols/OAuth2ServiceAccount) that has [domain-wide delegation authority](https://developers.google.com/identity/protocols/OAuth2ServiceAccount#delegatingauthority) to impersonate users with the `https://www.googleapis.com/auth/gmail.settings.basic` scope. For users managing their own identities and keypairs, requests require [hardware key encryption](https://support.google.com/a/answer/14153163) turned on and configured.",
                      "path": "gmail/v1/users/{userId}/settings/cse/identities/{cseEmailAddress}",
                      "parameterOrder": [
                        "userId",
                        "cseEmailAddress"
                      ]
                    },
                    "list": {
                      "httpMethod": "GET",
                      "scopes": [
                        "https://mail.google.com/",
                        "https://www.googleapis.com/auth/gmail.modify",
                        "https://www.googleapis.com/auth/gmail.readonly",
                        "https://www.googleapis.com/auth/gmail.settings.basic",
                        "https://www.googleapis.com/auth/gmail.settings.sharing"
                      ],
                      "flatPath": "gmail/v1/users/{userId}/settings/cse/identities",
                      "response": {
                        "$ref": "ListCseIdentitiesResponse"
                      },
                      "path": "gmail/v1/users/{userId}/settings/cse/identities",
                      "parameterOrder": [
                        "userId"
                      ],
                      "id": "gmail.users.settings.cse.identities.list",
                      "parameters": {
                        "userId": {
                          "type": "string",
                          "required": true,
                          "location": "path",
                          "description": "The requester's primary email address. To indicate the authenticated user, you can use the special value `me`.",
                          "default": "me"
                        },
                        "pageSize": {
                          "type": "integer",
                          "location": "query",
                          "format": "int32",
                          "description": "The number of identities to return. If not provided, the page size will default to 20 entries.",
                          "default": "20"
                        },
                        "pageToken": {
                          "location": "query",
                          "type": "string",
                          "description": "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."
                        }
                      },
                      "description": "Lists the client-side encrypted identities for an authenticated user. For administrators managing identities and keypairs for users in their organization, requests require authorization with a [service account](https://developers.google.com/identity/protocols/OAuth2ServiceAccount) that has [domain-wide delegation authority](https://developers.google.com/identity/protocols/OAuth2ServiceAccount#delegatingauthority) to impersonate users with the `https://www.googleapis.com/auth/gmail.settings.basic` scope. For users managing their own identities and keypairs, requests require [hardware key encryption](https://support.google.com/a/answer/14153163) turned on and configured."
                    }
                  }
                },
                "keypairs": {
                  "methods": {
                    "enable": {
                      "flatPath": "gmail/v1/users/{userId}/settings/cse/keypairs/{keyPairId}:enable",
                      "request": {
                        "$ref": "EnableCseKeyPairRequest"
                      },
                      "httpMethod": "POST",
                      "scopes": [
                        "https://www.googleapis.com/auth/gmail.settings.basic",
                        "https://www.googleapis.com/auth/gmail.settings.sharing"
                      ],
                      "parameters": {
                        "userId": {
                          "required": true,
                          "type": "string",
                          "description": "The requester's primary email address. To indicate the authenticated user, you can use the special value `me`.",
                          "default": "me",
                          "location": "path"
                        },
                        "keyPairId": {
                          "type": "string",
                          "location": "path",
                          "description": "The identifier of the key pair to turn on.",
                          "required": true
                        }
                      },
                      "description": "Turns on a client-side encryption key pair that was turned off. The key pair becomes active again for any associated client-side encryption identities. For administrators managing identities and keypairs for users in their organization, requests require authorization with a [service account](https://developers.google.com/identity/protocols/OAuth2ServiceAccount) that has [domain-wide delegation authority](https://developers.google.com/identity/protocols/OAuth2ServiceAccount#delegatingauthority) to impersonate users with the `https://www.googleapis.com/auth/gmail.settings.basic` scope. For users managing their own identities and keypairs, requests require [hardware key encryption](https://support.google.com/a/answer/14153163) turned on and configured.",
                      "id": "gmail.users.settings.cse.keypairs.enable",
                      "parameterOrder": [
                        "userId",
                        "keyPairId"
                      ],
                      "response": {
                        "$ref": "CseKeyPair"
                      },
                      "path": "gmail/v1/users/{userId}/settings/cse/keypairs/{keyPairId}:enable"
                    },
                    "obliterate": {
                      "parameters": {
                        "userId": {
                          "location": "path",
                          "description": "The requester's primary email address. To indicate the authenticated user, you can use the special value `me`.",
                          "default": "me",
                          "type": "string",
                          "required": true
                        },
                        "keyPairId": {
                          "description": "The identifier of the key pair to obliterate.",
                          "required": true,
                          "location": "path",
                          "type": "string"
                        }
                      },
                      "description": "Deletes a client-side encryption key pair permanently and immediately. You can only permanently delete key pairs that have been turned off for more than 30 days. To turn off a key pair, use the DisableCseKeyPair method. Gmail can't restore or decrypt any messages that were encrypted by an obliterated key. Authenticated users and Google Workspace administrators lose access to reading the encrypted messages. For administrators managing identities and keypairs for users in their organization, requests require authorization with a [service account](https://developers.google.com/identity/protocols/OAuth2ServiceAccount) that has [domain-wide delegation authority](https://developers.google.com/identity/protocols/OAuth2ServiceAccount#delegatingauthority) to impersonate users with the `https://www.googleapis.com/auth/gmail.settings.basic` scope. For users managing their own identities and keypairs, requests require [hardware key encryption](https://support.google.com/a/answer/14153163) turned on and configured.",
                      "id": "gmail.users.settings.cse.keypairs.obliterate",
                      "parameterOrder": [
                        "userId",
                        "keyPairId"
                      ],
                      "path": "gmail/v1/users/{userId}/settings/cse/keypairs/{keyPairId}:obliterate",
                      "flatPath": "gmail/v1/users/{userId}/settings/cse/keypairs/{keyPairId}:obliterate",
                      "request": {
                        "$ref": "ObliterateCseKeyPairRequest"
                      },
                      "httpMethod": "POST",
                      "scopes": [
                        "https://www.googleapis.com/auth/gmail.settings.basic",
                        "https://www.googleapis.com/auth/gmail.settings.sharing"
                      ]
                    },
                    "create": {
                      "parameters": {
                        "userId": {
                          "type": "string",
                          "required": true,
                          "location": "path",
                          "description": "The requester's primary email address. To indicate the authenticated user, you can use the special value `me`.",
                          "default": "me"
                        }
                      },
                      "description": "Creates and uploads a client-side encryption S/MIME public key certificate chain and private key metadata for the authenticated user. For administrators managing identities and keypairs for users in their organization, requests require authorization with a [service account](https://developers.google.com/identity/protocols/OAuth2ServiceAccount) that has [domain-wide delegation authority](https://developers.google.com/identity/protocols/OAuth2ServiceAccount#delegatingauthority) to impersonate users with the `https://www.googleapis.com/auth/gmail.settings.basic` scope. For users managing their own identities and keypairs, requests require [hardware key encryption](https://support.google.com/a/answer/14153163) turned on and configured.",
                      "id": "gmail.users.settings.cse.keypairs.create",
                      "parameterOrder": [
                        "userId"
                      ],
                      "response": {
                        "$ref": "CseKeyPair"
                      },
                      "path": "gmail/v1/users/{userId}/settings/cse/keypairs",
                      "flatPath": "gmail/v1/users/{userId}/settings/cse/keypairs",
                      "request": {
                        "$ref": "CseKeyPair"
                      },
                      "httpMethod": "POST",
                      "scopes": [
                        "https://www.googleapis.com/auth/gmail.settings.basic",
                        "https://www.googleapis.com/auth/gmail.settings.sharing"
                      ]
                    },
                    "disable": {
                      "scopes": [
                        "https://www.googleapis.com/auth/gmail.settings.basic",
                        "https://www.googleapis.com/auth/gmail.settings.sharing"
                      ],
                      "httpMethod": "POST",
                      "request": {
                        "$ref": "DisableCseKeyPairRequest"
                      },
                      "flatPath": "gmail/v1/users/{userId}/settings/cse/keypairs/{keyPairId}:disable",
                      "id": "gmail.users.settings.cse.keypairs.disable",
                      "parameters": {
                        "userId": {
                          "type": "string",
                          "required": true,
                          "location": "path",
                          "description": "The requester's primary email address. To indicate the authenticated user, you can use the special value `me`.",
                          "default": "me"
                        },
                        "keyPairId": {
                          "description": "The identifier of the key pair to turn off.",
                          "required": true,
                          "location": "path",
                          "type": "string"
                        }
                      },
                      "description": "Turns off a client-side encryption key pair. The authenticated user can no longer use the key pair to decrypt incoming CSE message texts or sign outgoing CSE mail. To regain access, use the EnableCseKeyPair to turn on the key pair. After 30 days, you can permanently delete the key pair by using the ObliterateCseKeyPair method. For administrators managing identities and keypairs for users in their organization, requests require authorization with a [service account](https://developers.google.com/identity/protocols/OAuth2ServiceAccount) that has [domain-wide delegation authority](https://developers.google.com/identity/protocols/OAuth2ServiceAccount#delegatingauthority) to impersonate users with the `https://www.googleapis.com/auth/gmail.settings.basic` scope. For users managing their own identities and keypairs, requests require [hardware key encryption](https://support.google.com/a/answer/14153163) turned on and configured.",
                      "path": "gmail/v1/users/{userId}/settings/cse/keypairs/{keyPairId}:disable",
                      "response": {
                        "$ref": "CseKeyPair"
                      },
                      "parameterOrder": [
                        "userId",
                        "keyPairId"
                      ]
                    },
                    "list": {
                      "scopes": [
                        "https://mail.google.com/",
                        "https://www.googleapis.com/auth/gmail.modify",
                        "https://www.googleapis.com/auth/gmail.readonly",
                        "https://www.googleapis.com/auth/gmail.settings.basic",
                        "https://www.googleapis.com/auth/gmail.settings.sharing"
                      ],
                      "httpMethod": "GET",
                      "flatPath": "gmail/v1/users/{userId}/settings/cse/keypairs",
                      "path": "gmail/v1/users/{userId}/settings/cse/keypairs",
                      "response": {
                        "$ref": "ListCseKeyPairsResponse"
                      },
                      "parameterOrder": [
                        "userId"
                      ],
                      "id": "gmail.users.settings.cse.keypairs.list",
                      "parameters": {
                        "pageToken": {
                          "description": "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.",
                          "location": "query",
                          "type": "string"
                        },
                        "userId": {
                          "description": "The requester's primary email address. To indicate the authenticated user, you can use the special value `me`.",
                          "default": "me",
                          "location": "path",
                          "required": true,
                          "type": "string"
                        },
                        "pageSize": {
                          "location": "query",
                          "format": "int32",
                          "description": "The number of key pairs to return. If not provided, the page size will default to 20 entries.",
                          "default": "20",
                          "type": "integer"
                        }
                      },
                      "description": "Lists client-side encryption key pairs for an authenticated user. For administrators managing identities and keypairs for users in their organization, requests require authorization with a [service account](https://developers.google.com/identity/protocols/OAuth2ServiceAccount) that has [domain-wide delegation authority](https://developers.google.com/identity/protocols/OAuth2ServiceAccount#delegatingauthority) to impersonate users with the `https://www.googleapis.com/auth/gmail.settings.basic` scope. For users managing their own identities and keypairs, requests require [hardware key encryption](https://support.google.com/a/answer/14153163) turned on and configured."
                    },
                    "get": {
                      "parameters": {
                        "userId": {
                          "type": "string",
                          "required": true,
                          "location": "path",
                          "description": "The requester's primary email address. To indicate the authenticated user, you can use the special value `me`.",
                          "default": "me"
                        },
                        "keyPairId": {
                          "type": "string",
                          "location": "path",
                          "description": "The identifier of the key pair to retrieve.",
                          "required": true
                        }
                      },
                      "description": "Retrieves an existing client-side encryption key pair. For administrators managing identities and keypairs for users in their organization, requests require authorization with a [service account](https://developers.google.com/identity/protocols/OAuth2ServiceAccount) that has [domain-wide delegation authority](https://developers.google.com/identity/protocols/OAuth2ServiceAccount#delegatingauthority) to impersonate users with the `https://www.googleapis.com/auth/gmail.settings.basic` scope. For users managing their own identities and keypairs, requests require [hardware key encryption](https://support.google.com/a/answer/14153163) turned on and configured.",
                      "id": "gmail.users.settings.cse.keypairs.get",
                      "parameterOrder": [
                        "userId",
                        "keyPairId"
                      ],
                      "path": "gmail/v1/users/{userId}/settings/cse/keypairs/{keyPairId}",
                      "response": {
                        "$ref": "CseKeyPair"
                      },
                      "flatPath": "gmail/v1/users/{userId}/settings/cse/keypairs/{keyPairId}",
                      "scopes": [
                        "https://mail.google.com/",
                        "https://www.googleapis.com/auth/gmail.modify",
                        "https://www.googleapis.com/auth/gmail.readonly",
                        "https://www.googleapis.com/auth/gmail.settings.basic",
                        "https://www.googleapis.com/auth/gmail.settings.sharing"
                      ],
                      "httpMethod": "GET"
                    }
                  }
                }
              }
            },
            "filters": {
              "methods": {
                "list": {
                  "flatPath": "gmail/v1/users/{userId}/settings/filters",
                  "scopes": [
                    "https://mail.google.com/",
                    "https://www.googleapis.com/auth/gmail.modify",
                    "https://www.googleapis.com/auth/gmail.readonly",
                    "https://www.googleapis.com/auth/gmail.settings.basic"
                  ],
                  "httpMethod": "GET",
                  "parameterOrder": [
                    "userId"
                  ],
                  "path": "gmail/v1/users/{userId}/settings/filters",
                  "response": {
                    "$ref": "ListFiltersResponse"
                  },
                  "parameters": {
                    "userId": {
                      "required": true,
                      "type": "string",
                      "description": "User's email address. The special value \"me\" can be used to indicate the authenticated user.",
                      "default": "me",
                      "location": "path"
                    }
                  },
                  "description": "Lists the message filters of a Gmail user. For more information, see [Manage Gmail filters](https://developers.google.com/workspace/gmail/api/guides/filter_settings).",
                  "id": "gmail.users.settings.filters.list"
                },
                "get": {
                  "flatPath": "gmail/v1/users/{userId}/settings/filters/{id}",
                  "httpMethod": "GET",
                  "scopes": [
                    "https://mail.google.com/",
                    "https://www.googleapis.com/auth/gmail.modify",
                    "https://www.googleapis.com/auth/gmail.readonly",
                    "https://www.googleapis.com/auth/gmail.settings.basic"
                  ],
                  "parameters": {
                    "userId": {
                      "description": "User's email address. The special value \"me\" can be used to indicate the authenticated user.",
                      "default": "me",
                      "location": "path",
                      "required": true,
                      "type": "string"
                    },
                    "id": {
                      "description": "The ID of the filter to be fetched.",
                      "required": true,
                      "type": "string",
                      "location": "path"
                    }
                  },
                  "description": "Gets a filter. For more information, see [Manage Gmail filters](https://developers.google.com/workspace/gmail/api/guides/filter_settings).",
                  "id": "gmail.users.settings.filters.get",
                  "parameterOrder": [
                    "userId",
                    "id"
                  ],
                  "response": {
                    "$ref": "Filter"
                  },
                  "path": "gmail/v1/users/{userId}/settings/filters/{id}"
                },
                "create": {
                  "request": {
                    "$ref": "Filter"
                  },
                  "flatPath": "gmail/v1/users/{userId}/settings/filters",
                  "scopes": [
                    "https://www.googleapis.com/auth/gmail.settings.basic"
                  ],
                  "httpMethod": "POST",
                  "parameters": {
                    "userId": {
                      "description": "User's email address. The special value \"me\" can be used to indicate the authenticated user.",
                      "default": "me",
                      "location": "path",
                      "required": true,
                      "type": "string"
                    }
                  },
                  "description": "Creates a filter. Note: you can only create a maximum of 1,000 filters. For more information, see [Manage Gmail filters](https://developers.google.com/workspace/gmail/api/guides/filter_settings).",
                  "id": "gmail.users.settings.filters.create",
                  "parameterOrder": [
                    "userId"
                  ],
                  "path": "gmail/v1/users/{userId}/settings/filters",
                  "response": {
                    "$ref": "Filter"
                  }
                },
                "delete": {
                  "scopes": [
                    "https://www.googleapis.com/auth/gmail.settings.basic"
                  ],
                  "id": "gmail.users.settings.filters.delete",
                  "httpMethod": "DELETE",
                  "flatPath": "gmail/v1/users/{userId}/settings/filters/{id}",
                  "parameters": {
                    "userId": {
                      "description": "User's email address. The special value \"me\" can be used to indicate the authenticated user.",
                      "default": "me",
                      "location": "path",
                      "required": true,
                      "type": "string"
                    },
                    "id": {
                      "location": "path",
                      "type": "string",
                      "description": "The ID of the filter to be deleted.",
                      "required": true
                    }
                  },
                  "description": "Immediately and permanently deletes the specified filter. For more information, see [Manage Gmail filters](https://developers.google.com/workspace/gmail/api/guides/filter_settings).",
                  "path": "gmail/v1/users/{userId}/settings/filters/{id}",
                  "parameterOrder": [
                    "userId",
                    "id"
                  ]
                }
              }
            },
            "forwardingAddresses": {
              "methods": {
                "list": {
                  "parameterOrder": [
                    "userId"
                  ],
                  "path": "gmail/v1/users/{userId}/settings/forwardingAddresses",
                  "response": {
                    "$ref": "ListForwardingAddressesResponse"
                  },
                  "parameters": {
                    "userId": {
                      "location": "path",
                      "description": "User's email address. The special value \"me\" can be used to indicate the authenticated user.",
                      "default": "me",
                      "type": "string",
                      "required": true
                    }
                  },
                  "description": "Lists the forwarding addresses for the specified account. For more information, see [Manage email forwarding](https://developers.google.com/workspace/gmail/api/guides/forwarding_settings).",
                  "id": "gmail.users.settings.forwardingAddresses.list",
                  "flatPath": "gmail/v1/users/{userId}/settings/forwardingAddresses",
                  "scopes": [
                    "https://mail.google.com/",
                    "https://www.googleapis.com/auth/gmail.modify",
                    "https://www.googleapis.com/auth/gmail.readonly",
                    "https://www.googleapis.com/auth/gmail.settings.basic"
                  ],
                  "httpMethod": "GET"
                },
                "get": {
                  "parameters": {
                    "userId": {
                      "required": true,
                      "type": "string",
                      "description": "User's email address. The special value \"me\" can be used to indicate the authenticated user.",
                      "default": "me",
                      "location": "path"
                    },
                    "forwardingEmail": {
                      "description": "The forwarding address to be retrieved.",
                      "required": true,
                      "location": "path",
                      "type": "string"
                    }
                  },
                  "description": "Gets the specified forwarding address. For more information, see [Manage email forwarding](https://developers.google.com/workspace/gmail/api/guides/forwarding_settings).",
                  "id": "gmail.users.settings.forwardingAddresses.get",
                  "parameterOrder": [
                    "userId",
                    "forwardingEmail"
                  ],
                  "response": {
                    "$ref": "ForwardingAddress"
                  },
                  "path": "gmail/v1/users/{userId}/settings/forwardingAddresses/{forwardingEmail}",
                  "flatPath": "gmail/v1/users/{userId}/settings/forwardingAddresses/{forwardingEmail}",
                  "httpMethod": "GET",
                  "scopes": [
                    "https://mail.google.com/",
                    "https://www.googleapis.com/auth/gmail.modify",
                    "https://www.googleapis.com/auth/gmail.readonly",
                    "https://www.googleapis.com/auth/gmail.settings.basic"
                  ]
                },
                "create": {
                  "id": "gmail.users.settings.forwardingAddresses.create",
                  "parameters": {
                    "userId": {
                      "location": "path",
                      "description": "User's email address. The special value \"me\" can be used to indicate the authenticated user.",
                      "default": "me",
                      "type": "string",
                      "required": true
                    }
                  },
                  "description": "Creates a forwarding address. If ownership verification is required, a message will be sent to the recipient and the resource's verification status will be set to `pending`; otherwise, the resource will be created with verification status set to `accepted`. For more information, see [Manage email forwarding](https://developers.google.com/workspace/gmail/api/guides/forwarding_settings). This method is only available to service account clients that have been delegated domain-wide authority.",
                  "path": "gmail/v1/users/{userId}/settings/forwardingAddresses",
                  "response": {
                    "$ref": "ForwardingAddress"
                  },
                  "parameterOrder": [
                    "userId"
                  ],
                  "scopes": [
                    "https://www.googleapis.com/auth/gmail.settings.sharing"
                  ],
                  "httpMethod": "POST",
                  "request": {
                    "$ref": "ForwardingAddress"
                  },
                  "flatPath": "gmail/v1/users/{userId}/settings/forwardingAddresses"
                },
                "delete": {
                  "flatPath": "gmail/v1/users/{userId}/settings/forwardingAddresses/{forwardingEmail}",
                  "parameters": {
                    "userId": {
                      "description": "User's email address. The special value \"me\" can be used to indicate the authenticated user.",
                      "default": "me",
                      "location": "path",
                      "required": true,
                      "type": "string"
                    },
                    "forwardingEmail": {
                      "type": "string",
                      "location": "path",
                      "description": "The forwarding address to be deleted.",
                      "required": true
                    }
                  },
                  "description": "Deletes the specified forwarding address and revokes any verification that may have been required. For more information, see [Manage email forwarding](https://developers.google.com/workspace/gmail/api/guides/forwarding_settings). This method is only available to service account clients that have been delegated domain-wide authority.",
                  "scopes": [
                    "https://www.googleapis.com/auth/gmail.settings.sharing"
                  ],
                  "id": "gmail.users.settings.forwardingAddresses.delete",
                  "httpMethod": "DELETE",
                  "parameterOrder": [
                    "userId",
                    "forwardingEmail"
                  ],
                  "path": "gmail/v1/users/{userId}/settings/forwardingAddresses/{forwardingEmail}"
                }
              }
            },
            "delegates": {
              "methods": {
                "list": {
                  "parameterOrder": [
                    "userId"
                  ],
                  "path": "gmail/v1/users/{userId}/settings/delegates",
                  "response": {
                    "$ref": "ListDelegatesResponse"
                  },
                  "parameters": {
                    "userId": {
                      "type": "string",
                      "required": true,
                      "location": "path",
                      "description": "User's email address. The special value \"me\" can be used to indicate the authenticated user.",
                      "default": "me"
                    }
                  },
                  "description": "Lists the delegates for the specified account. For more information, see [Manage delegates](https://developers.google.com/workspace/gmail/api/guides/delegate_settings). This method is only available to service account clients that have been delegated domain-wide authority.",
                  "id": "gmail.users.settings.delegates.list",
                  "flatPath": "gmail/v1/users/{userId}/settings/delegates",
                  "scopes": [
                    "https://mail.google.com/",
                    "https://www.googleapis.com/auth/gmail.modify",
                    "https://www.googleapis.com/auth/gmail.readonly",
                    "https://www.googleapis.com/auth/gmail.settings.basic"
                  ],
                  "httpMethod": "GET"
                },
                "get": {
                  "httpMethod": "GET",
                  "scopes": [
                    "https://mail.google.com/",
                    "https://www.googleapis.com/auth/gmail.modify",
                    "https://www.googleapis.com/auth/gmail.readonly",
                    "https://www.googleapis.com/auth/gmail.settings.basic"
                  ],
                  "flatPath": "gmail/v1/users/{userId}/settings/delegates/{delegateEmail}",
                  "id": "gmail.users.settings.delegates.get",
                  "parameters": {
                    "userId": {
                      "description": "User's email address. The special value \"me\" can be used to indicate the authenticated user.",
                      "default": "me",
                      "location": "path",
                      "required": true,
                      "type": "string"
                    },
                    "delegateEmail": {
                      "location": "path",
                      "type": "string",
                      "description": "The email address of the user whose delegate relationship is to be retrieved.",
                      "required": true
                    }
                  },
                  "description": "Gets the specified delegate. For more information, see [Manage delegates](https://developers.google.com/workspace/gmail/api/guides/delegate_settings). A delegate user must be referred to by their primary email address, and not an email alias. This method is only available to service account clients that have been delegated domain-wide authority.",
                  "response": {
                    "$ref": "Delegate"
                  },
                  "path": "gmail/v1/users/{userId}/settings/delegates/{delegateEmail}",
                  "parameterOrder": [
                    "userId",
                    "delegateEmail"
                  ]
                },
                "create": {
                  "parameterOrder": [
                    "userId"
                  ],
                  "response": {
                    "$ref": "Delegate"
                  },
                  "path": "gmail/v1/users/{userId}/settings/delegates",
                  "parameters": {
                    "userId": {
                      "required": true,
                      "type": "string",
                      "description": "User's email address. The special value \"me\" can be used to indicate the authenticated user.",
                      "default": "me",
                      "location": "path"
                    }
                  },
                  "description": "Adds a delegate with its verification status set directly to `accepted`, without sending any verification email. The delegate user must be a member of the same Google Workspace organization as the delegator user. For more information, see [Manage delegates](https://developers.google.com/workspace/gmail/api/guides/delegate_settings). Gmail imposes limitations on the number of delegates and delegators each user in a Google Workspace organization can have. These limits depend on your organization, but in general each user can have up to 25 delegates and up to 10 delegators. A delegate user must be referred to by their primary email address, and not an email alias. When a new delegate is created, there may be up to a one minute delay before the new delegate is available for use. This method is only available to service account clients that have been delegated domain-wide authority.",
                  "id": "gmail.users.settings.delegates.create",
                  "flatPath": "gmail/v1/users/{userId}/settings/delegates",
                  "request": {
                    "$ref": "Delegate"
                  },
                  "httpMethod": "POST",
                  "scopes": [
                    "https://www.googleapis.com/auth/gmail.settings.sharing"
                  ]
                },
                "delete": {
                  "parameterOrder": [
                    "userId",
                    "delegateEmail"
                  ],
                  "path": "gmail/v1/users/{userId}/settings/delegates/{delegateEmail}",
                  "flatPath": "gmail/v1/users/{userId}/settings/delegates/{delegateEmail}",
                  "parameters": {
                    "userId": {
                      "type": "string",
                      "required": true,
                      "location": "path",
                      "description": "User's email address. The special value \"me\" can be used to indicate the authenticated user.",
                      "default": "me"
                    },
                    "delegateEmail": {
                      "description": "The email address of the user to be removed as a delegate.",
                      "required": true,
                      "location": "path",
                      "type": "string"
                    }
                  },
                  "description": "Removes the specified delegate (which can be of any verification status), and revokes any verification that may have been required for using it. For more information, see [Manage delegates](https://developers.google.com/workspace/gmail/api/guides/delegate_settings). A delegate user must be referred to by their primary email address, and not an email alias. This method is only available to service account clients that have been delegated domain-wide authority.",
                  "id": "gmail.users.settings.delegates.delete",
                  "httpMethod": "DELETE",
                  "scopes": [
                    "https://www.googleapis.com/auth/gmail.settings.sharing"
                  ]
                }
              }
            }
          },
          "methods": {
            "updatePop": {
              "parameterOrder": [
                "userId"
              ],
              "path": "gmail/v1/users/{userId}/settings/pop",
              "response": {
                "$ref": "PopSettings"
              },
              "parameters": {
                "userId": {
                  "type": "string",
                  "required": true,
                  "location": "path",
                  "description": "User's email address. The special value \"me\" can be used to indicate the authenticated user.",
                  "default": "me"
                }
              },
              "description": "Updates POP settings. For more information, see [Configure POP and IMAP settings with the Gmail API](https://developers.google.com/workspace/gmail/api/guides/pop_imap_settings).",
              "id": "gmail.users.settings.updatePop",
              "request": {
                "$ref": "PopSettings"
              },
              "flatPath": "gmail/v1/users/{userId}/settings/pop",
              "scopes": [
                "https://www.googleapis.com/auth/gmail.settings.basic"
              ],
              "httpMethod": "PUT"
            },
            "updateAutoForwarding": {
              "scopes": [
                "https://www.googleapis.com/auth/gmail.settings.sharing"
              ],
              "httpMethod": "PUT",
              "request": {
                "$ref": "AutoForwarding"
              },
              "flatPath": "gmail/v1/users/{userId}/settings/autoForwarding",
              "id": "gmail.users.settings.updateAutoForwarding",
              "parameters": {
                "userId": {
                  "type": "string",
                  "required": true,
                  "location": "path",
                  "description": "User's email address. The special value \"me\" can be used to indicate the authenticated user.",
                  "default": "me"
                }
              },
              "description": "Updates the auto-forwarding setting for the specified account. A verified forwarding address must be specified when auto-forwarding is enabled. For more information, see [Manage email forwarding](https://developers.google.com/workspace/gmail/api/guides/forwarding_settings). This method is only available to service account clients that have been delegated domain-wide authority.",
              "path": "gmail/v1/users/{userId}/settings/autoForwarding",
              "response": {
                "$ref": "AutoForwarding"
              },
              "parameterOrder": [
                "userId"
              ]
            },
            "getPop": {
              "parameterOrder": [
                "userId"
              ],
              "path": "gmail/v1/users/{userId}/settings/pop",
              "response": {
                "$ref": "PopSettings"
              },
              "parameters": {
                "userId": {
                  "location": "path",
                  "description": "User's email address. The special value \"me\" can be used to indicate the authenticated user.",
                  "default": "me",
                  "type": "string",
                  "required": true
                }
              },
              "description": "Gets POP settings. For more information, see [Configure POP and IMAP settings with the Gmail API](https://developers.google.com/workspace/gmail/api/guides/pop_imap_settings).",
              "id": "gmail.users.settings.getPop",
              "flatPath": "gmail/v1/users/{userId}/settings/pop",
              "scopes": [
                "https://mail.google.com/",
                "https://www.googleapis.com/auth/gmail.modify",
                "https://www.googleapis.com/auth/gmail.readonly",
                "https://www.googleapis.com/auth/gmail.settings.basic"
              ],
              "httpMethod": "GET"
            },
            "getImap": {
              "flatPath": "gmail/v1/users/{userId}/settings/imap",
              "httpMethod": "GET",
              "scopes": [
                "https://mail.google.com/",
                "https://www.googleapis.com/auth/gmail.modify",
                "https://www.googleapis.com/auth/gmail.readonly",
                "https://www.googleapis.com/auth/gmail.settings.basic"
              ],
              "parameterOrder": [
                "userId"
              ],
              "response": {
                "$ref": "ImapSettings"
              },
              "path": "gmail/v1/users/{userId}/settings/imap",
              "parameters": {
                "userId": {
                  "required": true,
                  "type": "string",
                  "description": "User's email address. The special value \"me\" can be used to indicate the authenticated user.",
                  "default": "me",
                  "location": "path"
                }
              },
              "description": "Gets IMAP settings. For more information, see [Configure POP and IMAP settings with the Gmail API](https://developers.google.com/workspace/gmail/api/guides/pop_imap_settings).",
              "id": "gmail.users.settings.getImap"
            },
            "updateVacation": {
              "flatPath": "gmail/v1/users/{userId}/settings/vacation",
              "request": {
                "$ref": "VacationSettings"
              },
              "httpMethod": "PUT",
              "scopes": [
                "https://www.googleapis.com/auth/gmail.settings.basic"
              ],
              "parameters": {
                "userId": {
                  "type": "string",
                  "required": true,
                  "location": "path",
                  "description": "User's email address. The special value \"me\" can be used to indicate the authenticated user.",
                  "default": "me"
                }
              },
              "description": "Updates vacation responder settings. For more information, see [Manage vacation settings with the Gmail API](https://developers.google.com/workspace/gmail/api/guides/vacation_settings).",
              "id": "gmail.users.settings.updateVacation",
              "parameterOrder": [
                "userId"
              ],
              "response": {
                "$ref": "VacationSettings"
              },
              "path": "gmail/v1/users/{userId}/settings/vacation"
            },
            "getAutoForwarding": {
              "path": "gmail/v1/users/{userId}/settings/autoForwarding",
              "response": {
                "$ref": "AutoForwarding"
              },
              "parameterOrder": [
                "userId"
              ],
              "id": "gmail.users.settings.getAutoForwarding",
              "parameters": {
                "userId": {
                  "required": true,
                  "type": "string",
                  "description": "User's email address. The special value \"me\" can be used to indicate the authenticated user.",
                  "default": "me",
                  "location": "path"
                }
              },
              "description": "Gets the auto-forwarding setting for the specified account. For more information, see [Manage email forwarding](https://developers.google.com/workspace/gmail/api/guides/forwarding_settings).",
              "scopes": [
                "https://mail.google.com/",
                "https://www.googleapis.com/auth/gmail.modify",
                "https://www.googleapis.com/auth/gmail.readonly",
                "https://www.googleapis.com/auth/gmail.settings.basic"
              ],
              "httpMethod": "GET",
              "flatPath": "gmail/v1/users/{userId}/settings/autoForwarding"
            },
            "getLanguage": {
              "id": "gmail.users.settings.getLanguage",
              "parameters": {
                "userId": {
                  "type": "string",
                  "required": true,
                  "location": "path",
                  "description": "User's email address. The special value \"me\" can be used to indicate the authenticated user.",
                  "default": "me"
                }
              },
              "description": "Gets language settings. For more information, see [Manage language settings](https://developers.google.com/workspace/gmail/api/guides/language-settings).",
              "response": {
                "$ref": "LanguageSettings"
              },
              "path": "gmail/v1/users/{userId}/settings/language",
              "parameterOrder": [
                "userId"
              ],
              "httpMethod": "GET",
              "scopes": [
                "https://mail.google.com/",
                "https://www.googleapis.com/auth/gmail.modify",
                "https://www.googleapis.com/auth/gmail.readonly",
                "https://www.googleapis.com/auth/gmail.settings.basic"
              ],
              "flatPath": "gmail/v1/users/{userId}/settings/language"
            },
            "updateLanguage": {
              "path": "gmail/v1/users/{userId}/settings/language",
              "response": {
                "$ref": "LanguageSettings"
              },
              "parameterOrder": [
                "userId"
              ],
              "id": "gmail.users.settings.updateLanguage",
              "parameters": {
                "userId": {
                  "type": "string",
                  "required": true,
                  "location": "path",
                  "description": "User's email address. The special value \"me\" can be used to indicate the authenticated user.",
                  "default": "me"
                }
              },
              "description": "Updates language settings. For more information, see [Manage language settings](https://developers.google.com/workspace/gmail/api/guides/language-settings). If successful, the return object contains the `displayLanguage` that was saved for the user, which may differ from the value passed into the request. This is because the requested `displayLanguage` may not be directly supported by Gmail but have a close variant that is, and so the variant may be chosen and saved instead.",
              "scopes": [
                "https://www.googleapis.com/auth/gmail.settings.basic"
              ],
              "httpMethod": "PUT",
              "request": {
                "$ref": "LanguageSettings"
              },
              "flatPath": "gmail/v1/users/{userId}/settings/language"
            },
            "updateImap": {
              "flatPath": "gmail/v1/users/{userId}/settings/imap",
              "request": {
                "$ref": "ImapSettings"
              },
              "httpMethod": "PUT",
              "scopes": [
                "https://www.googleapis.com/auth/gmail.settings.basic"
              ],
              "parameterOrder": [
                "userId"
              ],
              "response": {
                "$ref": "ImapSettings"
              },
              "path": "gmail/v1/users/{userId}/settings/imap",
              "parameters": {
                "userId": {
                  "type": "string",
                  "required": true,
                  "location": "path",
                  "description": "User's email address. The special value \"me\" can be used to indicate the authenticated user.",
                  "default": "me"
                }
              },
              "description": "Updates IMAP settings. For more information, see [Configure POP and IMAP settings with the Gmail API](https://developers.google.com/workspace/gmail/api/guides/pop_imap_settings).",
              "id": "gmail.users.settings.updateImap"
            },
            "getVacation": {
              "scopes": [
                "https://mail.google.com/",
                "https://www.googleapis.com/auth/gmail.modify",
                "https://www.googleapis.com/auth/gmail.readonly",
                "https://www.googleapis.com/auth/gmail.settings.basic"
              ],
              "httpMethod": "GET",
              "flatPath": "gmail/v1/users/{userId}/settings/vacation",
              "path": "gmail/v1/users/{userId}/settings/vacation",
              "response": {
                "$ref": "VacationSettings"
              },
              "parameterOrder": [
                "userId"
              ],
              "id": "gmail.users.settings.getVacation",
              "parameters": {
                "userId": {
                  "type": "string",
                  "required": true,
                  "location": "path",
                  "description": "User's email address. The special value \"me\" can be used to indicate the authenticated user.",
                  "default": "me"
                }
              },
              "description": "Gets vacation responder settings. For more information, see [Manage vacation settings with the Gmail API](https://developers.google.com/workspace/gmail/api/guides/vacation_settings)."
            }
          }
        }
      },
      "methods": {
        "watch": {
          "request": {
            "$ref": "WatchRequest"
          },
          "flatPath": "gmail/v1/users/{userId}/watch",
          "scopes": [
            "https://mail.google.com/",
            "https://www.googleapis.com/auth/gmail.metadata",
            "https://www.googleapis.com/auth/gmail.modify",
            "https://www.googleapis.com/auth/gmail.readonly"
          ],
          "httpMethod": "POST",
          "parameters": {
            "userId": {
              "required": true,
              "type": "string",
              "description": "The user's email address. The special value `me` can be used to indicate the authenticated user.",
              "default": "me",
              "location": "path"
            }
          },
          "description": "Set up or update a push notification watch on the given user mailbox. For more information, see [Configure push notifications in Gmail API](https://developers.google.com/workspace/gmail/api/guides/push).",
          "id": "gmail.users.watch",
          "parameterOrder": [
            "userId"
          ],
          "path": "gmail/v1/users/{userId}/watch",
          "response": {
            "$ref": "WatchResponse"
          }
        },
        "getProfile": {
          "flatPath": "gmail/v1/users/{userId}/profile",
          "httpMethod": "GET",
          "scopes": [
            "https://mail.google.com/",
            "https://www.googleapis.com/auth/gmail.compose",
            "https://www.googleapis.com/auth/gmail.metadata",
            "https://www.googleapis.com/auth/gmail.modify",
            "https://www.googleapis.com/auth/gmail.readonly"
          ],
          "parameterOrder": [
            "userId"
          ],
          "response": {
            "$ref": "Profile"
          },
          "path": "gmail/v1/users/{userId}/profile",
          "parameters": {
            "userId": {
              "type": "string",
              "required": true,
              "location": "path",
              "description": "The user's email address. The special value `me` can be used to indicate the authenticated user.",
              "default": "me"
            }
          },
          "description": "Gets the current user's Gmail profile.",
          "id": "gmail.users.getProfile"
        },
        "stop": {
          "id": "gmail.users.stop",
          "httpMethod": "POST",
          "scopes": [
            "https://mail.google.com/",
            "https://www.googleapis.com/auth/gmail.metadata",
            "https://www.googleapis.com/auth/gmail.modify",
            "https://www.googleapis.com/auth/gmail.readonly"
          ],
          "flatPath": "gmail/v1/users/{userId}/stop",
          "parameters": {
            "userId": {
              "description": "The user's email address. The special value `me` can be used to indicate the authenticated user.",
              "default": "me",
              "location": "path",
              "required": true,
              "type": "string"
            }
          },
          "description": "Turn off push notification delivery for the given user mailbox. For more information, see [Configure push notifications in Gmail API](https://developers.google.com/workspace/gmail/api/guides/push).",
          "path": "gmail/v1/users/{userId}/stop",
          "parameterOrder": [
            "userId"
          ]
        }
      }
    }
  },
  "description": "The Gmail API lets you view and manage Gmail mailbox data like threads, messages, and labels.",
  "discoveryVersion": "v1",
  "parameters": {
    "prettyPrint": {
      "location": "query",
      "type": "boolean",
      "description": "Returns response with indentations and line breaks.",
      "default": "true"
    },
    "quotaUser": {
      "description": "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.",
      "location": "query",
      "type": "string"
    },
    "access_token": {
      "location": "query",
      "type": "string",
      "description": "OAuth access token."
    },
    "fields": {
      "type": "string",
      "location": "query",
      "description": "Selector specifying which fields to include in a partial response."
    },
    "callback": {
      "description": "JSONP",
      "type": "string",
      "location": "query"
    },
    "alt": {
      "type": "string",
      "enum": [
        "json",
        "media",
        "proto"
      ],
      "location": "query",
      "description": "Data format for response.",
      "default": "json",
      "enumDescriptions": [
        "Responses with Content-Type of application/json",
        "Media download with context-dependent Content-Type",
        "Responses with Content-Type of application/x-protobuf"
      ]
    },
    "$.xgafv": {
      "type": "string",
      "enum": [
        "1",
        "2"
      ],
      "location": "query",
      "description": "V1 error format.",
      "enumDescriptions": [
        "v1 error format",
        "v2 error format"
      ]
    },
    "oauth_token": {
      "description": "OAuth 2.0 token for the current user.",
      "type": "string",
      "location": "query"
    },
    "upload_protocol": {
      "location": "query",
      "type": "string",
      "description": "Upload protocol for media (e.g. \"raw\", \"multipart\")."
    },
    "key": {
      "description": "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.",
      "location": "query",
      "type": "string"
    },
    "uploadType": {
      "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").",
      "type": "string",
      "location": "query"
    }
  },
  "ownerName": "Google",
  "title": "Gmail API",
  "baseUrl": "https://gmail.googleapis.com/",
  "canonicalName": "Gmail",
  "ownerDomain": "google.com",
  "revision": "20260608",
  "servicePath": "",
  "schemas": {
    "ClassificationLabelFieldValue": {
      "id": "ClassificationLabelFieldValue",
      "type": "object",
      "properties": {
        "selection": {
          "description": "Selection choice ID for the selection option. Should only be set if the field type is `SELECTION` in the Google Drive `Label.Field` object. Maps to the id field of the Google Drive `Label.Field.SelectionOptions` resource.",
          "type": "string"
        },
        "fieldId": {
          "description": "Required. The field ID for the Classification Label Value. Maps to the ID field of the Google Drive `Label.Field` object.",
          "type": "string"
        }
      },
      "description": "Field values for a classification label."
    },
    "PopSettings": {
      "properties": {
        "disposition": {
          "type": "string",
          "description": "The action that will be executed on a message after it has been fetched via POP.",
          "enumDescriptions": [
            "Unspecified disposition.",
            "Leave the message in the `INBOX`.",
            "Archive the message.",
            "Move the message to the `TRASH`.",
            "Leave the message in the `INBOX` and mark it as read."
          ],
          "enum": [
            "dispositionUnspecified",
            "leaveInInbox",
            "archive",
            "trash",
            "markRead"
          ]
        },
        "accessWindow": {
          "type": "string",
          "description": "The range of messages which are accessible via POP.",
          "enumDescriptions": [
            "Unspecified range.",
            "Indicates that no messages are accessible via POP.",
            "Indicates that unfetched messages received after some past point in time are accessible via POP.",
            "Indicates that all unfetched messages are accessible via POP."
          ],
          "enum": [
            "accessWindowUnspecified",
            "disabled",
            "fromNowOn",
            "allMail"
          ]
        }
      },
      "description": "POP settings for an account.",
      "id": "PopSettings",
      "type": "object"
    },
    "Delegate": {
      "id": "Delegate",
      "type": "object",
      "properties": {
        "delegateEmail": {
          "description": "The email address of the delegate.",
          "type": "string"
        },
        "verificationStatus": {
          "description": "Indicates whether this address has been verified and can act as a delegate for the account. Read-only.",
          "enumDescriptions": [
            "Unspecified verification status.",
            "The address can act a delegate for the account.",
            "A verification request was mailed to the address, and the owner has not yet accepted it.",
            "A verification request was mailed to the address, and the owner rejected it.",
            "A verification request was mailed to the address, and it expired without verification."
          ],
          "enum": [
            "verificationStatusUnspecified",
            "accepted",
            "pending",
            "rejected",
            "expired"
          ],
          "type": "string"
        }
      },
      "description": "Settings for a delegate. Delegates can read, send, and delete messages, as well as view and add contacts, for the delegator's account. See \"Set up mail delegation\" for more information about delegates."
    },
    "LabelColor": {
      "properties": {
        "textColor": {
          "description": "The text color of the label, represented as hex string. This field is required in order to set the color of a label. Only the following predefined set of color values are allowed: \\#000000, #434343, #666666, #999999, #cccccc, #efefef, #f3f3f3, #ffffff, \\#fb4c2f, #ffad47, #fad165, #16a766, #43d692, #4a86e8, #a479e2, #f691b3, \\#f6c5be, #ffe6c7, #fef1d1, #b9e4d0, #c6f3de, #c9daf8, #e4d7f5, #fcdee8, \\#efa093, #ffd6a2, #fce8b3, #89d3b2, #a0eac9, #a4c2f4, #d0bcf1, #fbc8d9, \\#e66550, #ffbc6b, #fcda83, #44b984, #68dfa9, #6d9eeb, #b694e8, #f7a7c0, \\#cc3a21, #eaa041, #f2c960, #149e60, #3dc789, #3c78d8, #8e63ce, #e07798, \\#ac2b16, #cf8933, #d5ae49, #0b804b, #2a9c68, #285bac, #653e9b, #b65775, \\#822111, #a46a21, #aa8831, #076239, #1a764d, #1c4587, #41236d, #83334c, \\#464646, #e7e7e7, #0d3472, #b6cff5, #0d3b44, #98d7e4, #3d188e, #e3d7ff, \\#711a36, #fbd3e0, #8a1c0a, #f2b2a8, #7a2e0b, #ffc8af, #7a4706, #ffdeb5, \\#594c05, #fbe983, #684e07, #fdedc1, #0b4f30, #b3efd3, #04502e, #a2dcc1, \\#c2c2c2, #4986e7, #2da2bb, #b99aff, #994a64, #f691b2, #ff7537, #ffad46, \\#662e37, #ebdbde, #cca6ac, #094228, #42d692, #16a765, #757575, #1e53b8, \\#007286, #7858c3, #c2185b, #d93025, #54240e, #633e04, #521d28, #202124, \\#083018",
          "type": "string"
        },
        "backgroundColor": {
          "description": "The background color represented as hex string #RRGGBB (ex #000000). This field is required in order to set the color of a label. Only the following predefined set of color values are allowed: \\#000000, #434343, #666666, #999999, #cccccc, #efefef, #f3f3f3, #ffffff, \\#fb4c2f, #ffad47, #fad165, #16a766, #43d692, #4a86e8, #a479e2, #f691b3, \\#f6c5be, #ffe6c7, #fef1d1, #b9e4d0, #c6f3de, #c9daf8, #e4d7f5, #fcdee8, \\#efa093, #ffd6a2, #fce8b3, #89d3b2, #a0eac9, #a4c2f4, #d0bcf1, #fbc8d9, \\#e66550, #ffbc6b, #fcda83, #44b984, #68dfa9, #6d9eeb, #b694e8, #f7a7c0, \\#cc3a21, #eaa041, #f2c960, #149e60, #3dc789, #3c78d8, #8e63ce, #e07798, \\#ac2b16, #cf8933, #d5ae49, #0b804b, #2a9c68, #285bac, #653e9b, #b65775, \\#822111, #a46a21, #aa8831, #076239, #1a764d, #1c4587, #41236d, #83334c, \\#464646, #e7e7e7, #0d3472, #b6cff5, #0d3b44, #98d7e4, #3d188e, #e3d7ff, \\#711a36, #fbd3e0, #8a1c0a, #f2b2a8, #7a2e0b, #ffc8af, #7a4706, #ffdeb5, \\#594c05, #fbe983, #684e07, #fdedc1, #0b4f30, #b3efd3, #04502e, #a2dcc1, \\#c2c2c2, #4986e7, #2da2bb, #b99aff, #994a64, #f691b2, #ff7537, #ffad46, \\#662e37, #ebdbde, #cca6ac, #094228, #42d692, #16a765, #757575, #1e53b8, \\#007286, #7858c3, #c2185b, #d93025, #54240e, #633e04, #521d28, #202124, \\#083018",
          "type": "string"
        }
      },
      "id": "LabelColor",
      "type": "object"
    },
    "ListCseIdentitiesResponse": {
      "id": "ListCseIdentitiesResponse",
      "type": "object",
      "properties": {
        "cseIdentities": {
          "type": "array",
          "description": "One page of the list of CSE identities configured for the user.",
          "items": {
            "$ref": "CseIdentity"
          }
        },
        "nextPageToken": {
          "description": "Pagination token to be passed to a subsequent ListCseIdentities call in order to retrieve the next page of identities. If this value is not returned or is the empty string, then no further pages remain.",
          "type": "string"
        }
      }
    },
    "FilterCriteria": {
      "id": "FilterCriteria",
      "type": "object",
      "description": "Message matching criteria.",
      "properties": {
        "hasAttachment": {
          "description": "Whether the message has any attachment.",
          "type": "boolean"
        },
        "excludeChats": {
          "description": "Whether the response should exclude chats.",
          "type": "boolean"
        },
        "from": {
          "description": "The sender's display name or email address.",
          "type": "string"
        },
        "to": {
          "description": "The recipient's display name or email address. Includes recipients in the \"to\", \"cc\", and \"bcc\" header fields. You can use simply the local part of the email address. For example, \"example\" and \"example@\" both match \"example@gmail.com\". This field is case-insensitive.",
          "type": "string"
        },
        "sizeComparison": {
          "description": "How the message size in bytes should be in relation to the size field.",
          "enumDescriptions": [
            "",
            "Find messages smaller than the given size.",
            "Find messages larger than the given size."
          ],
          "enum": [
            "unspecified",
            "smaller",
            "larger"
          ],
          "type": "string"
        },
        "subject": {
          "description": "Case-insensitive phrase found in the message's subject. Trailing and leading whitespace are be trimmed and adjacent spaces are collapsed.",
          "type": "string"
        },
        "negatedQuery": {
          "description": "Only return messages not matching the specified query. Supports the same query format as the Gmail search box. For example, `\"from:someuser@example.com rfc822msgid: is:unread\"`.",
          "type": "string"
        },
        "query": {
          "description": "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\"`.",
          "type": "string"
        },
        "size": {
          "description": "The size of the entire RFC822 message in bytes, including all headers and attachments.",
          "format": "int32",
          "type": "integer"
        }
      }
    },
    "Draft": {
      "id": "Draft",
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "description": "The immutable ID of the draft.",
          "annotations": {
            "required": [
              "gmail.users.drafts.send"
            ]
          }
        },
        "message": {
          "description": "The message content of the draft.",
          "$ref": "Message"
        }
      },
      "description": "A draft email in the user's mailbox."
    },
    "BatchModifyMessagesRequest": {
      "id": "BatchModifyMessagesRequest",
      "type": "object",
      "properties": {
        "ids": {
          "type": "array",
          "description": "The IDs of the messages to modify. There is a limit of 1000 ids per request.",
          "items": {
            "type": "string"
          }
        },
        "removeLabelIds": {
          "items": {
            "type": "string"
          },
          "description": "A list of label IDs to remove from messages.",
          "type": "array"
        },
        "removeClassificationLabelIds": {
          "items": {
            "type": "string"
          },
          "description": "A list of Classification Label values to remove from messages.",
          "type": "array"
        },
        "addLabelIds": {
          "type": "array",
          "description": "A list of label IDs to add to messages.",
          "items": {
            "type": "string"
          }
        },
        "addClassificationLabels": {
          "type": "array",
          "description": "A list of Classification Label values to add. If a Classification Label with the same label ID is already applied to the message, fields with existing field IDs will be updated and fields with new field IDs will be added. There's a limit of 20 Classification Label values per request. If the message is already classified and the final total number of Classification Label values exceeds the maximum allowed number of Classification Label values per message, the modification fails.",
          "items": {
            "$ref": "ClassificationLabelValue"
          }
        }
      }
    },
    "CsePrivateKeyMetadata": {
      "id": "CsePrivateKeyMetadata",
      "type": "object",
      "description": "Metadata for a private key instance.",
      "properties": {
        "kaclsKeyMetadata": {
          "description": "Metadata for a private key instance managed by an external key access control list service.",
          "$ref": "KaclsKeyMetadata"
        },
        "hardwareKeyMetadata": {
          "description": "Metadata for hardware keys.",
          "$ref": "HardwareKeyMetadata"
        },
        "privateKeyMetadataId": {
          "readOnly": true,
          "type": "string",
          "description": "Output only. The immutable ID for the private key metadata instance."
        }
      }
    },
    "SignAndEncryptKeyPairs": {
      "id": "SignAndEncryptKeyPairs",
      "type": "object",
      "description": "The configuration of a CSE identity that uses different key pairs for signing and encryption.",
      "properties": {
        "signingKeyPairId": {
          "description": "The ID of the CseKeyPair that signs outgoing mail.",
          "type": "string"
        },
        "encryptionKeyPairId": {
          "description": "The ID of the CseKeyPair that encrypts signed outgoing mail.",
          "type": "string"
        }
      }
    },
    "BatchDeleteMessagesRequest": {
      "properties": {
        "ids": {
          "type": "array",
          "description": "The IDs of the messages to delete.",
          "items": {
            "type": "string"
          }
        }
      },
      "id": "BatchDeleteMessagesRequest",
      "type": "object"
    },
    "Label": {
      "id": "Label",
      "type": "object",
      "description": "Labels are used to categorize messages and threads within the user's mailbox. The maximum number of labels supported for a user's mailbox is 10,000.",
      "properties": {
        "labelListVisibility": {
          "type": "string",
          "enum": [
            "labelShow",
            "labelShowIfUnread",
            "labelHide"
          ],
          "description": "The visibility of the label in the label list in the Gmail web interface.",
          "annotations": {
            "required": [
              "gmail.users.labels.create",
              "gmail.users.labels.update"
            ]
          },
          "enumDescriptions": [
            "Show the label in the label list.",
            "Show the label if there are any unread messages with that label.",
            "Do not show the label in the label list."
          ]
        },
        "type": {
          "enumDescriptions": [
            "Labels created by Gmail.",
            "Custom labels created by the user or application."
          ],
          "enum": [
            "system",
            "user"
          ],
          "description": "The owner type for the label. User labels are created by the user and can be modified and deleted by the user and can be applied to any message or thread. System labels are internally created and cannot be added, modified, or deleted. System labels may be able to be applied to or removed from messages and threads under some circumstances but this is not guaranteed. For example, users can apply and remove the `INBOX` and `UNREAD` labels from messages and threads, but cannot apply or remove the `DRAFTS` or `SENT` labels from messages or threads.",
          "type": "string"
        },
        "id": {
          "description": "The immutable ID of the label.",
          "annotations": {
            "required": [
              "gmail.users.labels.update"
            ]
          },
          "type": "string"
        },
        "messagesUnread": {
          "format": "int32",
          "type": "integer",
          "description": "The number of unread messages with the label."
        },
        "threadsTotal": {
          "description": "The total number of threads with the label.",
          "format": "int32",
          "type": "integer"
        },
        "color": {
          "description": "The color to assign to the label. Color is only available for labels that have their `type` set to `user`.",
          "$ref": "LabelColor"
        },
        "messagesTotal": {
          "description": "The total number of messages with the label.",
          "format": "int32",
          "type": "integer"
        },
        "threadsUnread": {
          "description": "The number of unread threads with the label.",
          "type": "integer",
          "format": "int32"
        },
        "name": {
          "type": "string",
          "description": "The display name of the label.",
          "annotations": {
            "required": [
              "gmail.users.labels.create",
              "gmail.users.labels.update"
            ]
          }
        },
        "messageListVisibility": {
          "enumDescriptions": [
            "Show the label in the message list.",
            "Do not show the label in the message list."
          ],
          "description": "The visibility of messages with this label in the message list in the Gmail web interface.",
          "annotations": {
            "required": [
              "gmail.users.labels.create",
              "gmail.users.labels.update"
            ]
          },
          "type": "string",
          "enum": [
            "show",
            "hide"
          ]
        }
      }
    },
    "HardwareKeyMetadata": {
      "id": "HardwareKeyMetadata",
      "type": "object",
      "properties": {
        "description": {
          "description": "Description about the hardware key.",
          "type": "string"
        }
      },
      "description": "Metadata for hardware keys. If [hardware key encryption](https://support.google.com/a/answer/14153163) is set up for the Google Workspace organization, users can optionally store their private key on their smart card and use it to sign and decrypt email messages in Gmail by inserting their smart card into a reader attached to their Windows device."
    },
    "ClassificationLabelValue": {
      "description": "Classification Labels applied to the email message. Classification Labels are different from Gmail inbox labels. Only used for Google Workspace accounts. [Learn more about classification labels](https://support.google.com/a/answer/9292382).",
      "properties": {
        "labelId": {
          "description": "Required. The canonical or raw alphanumeric classification label ID. Maps to the ID field of the Google Drive Label resource.",
          "type": "string"
        },
        "fields": {
          "type": "array",
          "description": "Field values for the given classification label ID.",
          "items": {
            "$ref": "ClassificationLabelFieldValue"
          }
        }
      },
      "id": "ClassificationLabelValue",
      "type": "object"
    },
    "LanguageSettings": {
      "id": "LanguageSettings",
      "type": "object",
      "properties": {
        "displayLanguage": {
          "description": "The language to display Gmail in, formatted as an RFC 3066 Language Tag (for example `en-GB`, `fr` or `ja` for British English, French, or Japanese respectively). The set of languages supported by Gmail evolves over time, so please refer to the \"Language\" dropdown in the Gmail settings for all available options, as described in the language settings help article. For a table of sample values, see [Manage language settings](https://developers.google.com/workspace/gmail/api/guides/language-settings). Not all Gmail clients can display the same set of languages. In the case that a user's display language is not available for use on a particular client, said client automatically chooses to display in the closest supported variant (or a reasonable default).",
          "type": "string"
        }
      },
      "description": "Language settings for an account. These settings correspond to the \"Language settings\" feature in the web interface."
    },
    "Thread": {
      "description": "A collection of messages representing a conversation.",
      "properties": {
        "historyId": {
          "type": "string",
          "format": "uint64",
          "description": "The ID of the last history record that modified this thread."
        },
        "messages": {
          "items": {
            "$ref": "Message"
          },
          "description": "The list of messages in the thread.",
          "type": "array"
        },
        "id": {
          "description": "The unique ID of the thread.",
          "type": "string"
        },
        "snippet": {
          "description": "A short part of the message text.",
          "type": "string"
        }
      },
      "id": "Thread",
      "type": "object"
    },
    "VacationSettings": {
      "properties": {
        "enableAutoReply": {
          "description": "Flag that controls whether Gmail automatically replies to messages.",
          "type": "boolean"
        },
        "responseSubject": {
          "description": "Optional text to prepend to the subject line in vacation responses. In order to enable auto-replies, either the response subject or the response body must be nonempty.",
          "type": "string"
        },
        "responseBodyHtml": {
          "description": "Response body in HTML format. Gmail will sanitize the HTML before storing it. If both `response_body_plain_text` and `response_body_html` are specified, `response_body_html` will be used.",
          "type": "string"
        },
        "responseBodyPlainText": {
          "description": "Response body in plain text format. If both `response_body_plain_text` and `response_body_html` are specified, `response_body_html` will be used.",
          "type": "string"
        },
        "restrictToDomain": {
          "description": "Flag that determines whether responses are sent to recipients who are outside of the user's domain. This feature is only available for Google Workspace users.",
          "type": "boolean"
        },
        "startTime": {
          "type": "string",
          "format": "int64",
          "description": "An optional start time for sending auto-replies (epoch ms). When this is specified, Gmail will automatically reply only to messages that it receives after the start time. If both `startTime` and `endTime` are specified, `startTime` must precede `endTime`."
        },
        "endTime": {
          "description": "An optional end time for sending auto-replies (epoch ms). When this is specified, Gmail will automatically reply only to messages that it receives before the end time. If both `startTime` and `endTime` are specified, `startTime` must precede `endTime`.",
          "type": "string",
          "format": "int64"
        },
        "restrictToContacts": {
          "description": "Flag that determines whether responses are sent to recipients who are not in the user's list of contacts.",
          "type": "boolean"
        }
      },
      "description": "Vacation auto-reply settings for an account. These settings correspond to the \"Vacation responder\" feature in the web interface.",
      "id": "VacationSettings",
      "type": "object"
    },
    "ListDelegatesResponse": {
      "properties": {
        "delegates": {
          "description": "List of the user's delegates (with any verification status). If an account doesn't have delegates, this field doesn't appear.",
          "items": {
            "$ref": "Delegate"
          },
          "type": "array"
        }
      },
      "description": "Response for the ListDelegates method.",
      "id": "ListDelegatesResponse",
      "type": "object"
    },
    "MessagePart": {
      "description": "A single MIME message part.",
      "properties": {
        "partId": {
          "description": "The immutable ID of the message part.",
          "type": "string"
        },
        "parts": {
          "description": "The child MIME message parts of this part. This only applies to container MIME message parts, for example `multipart/*`. For non- container MIME message part types, such as `text/plain`, this field is empty. For more information, see RFC 1521.",
          "items": {
            "$ref": "MessagePart"
          },
          "type": "array"
        },
        "filename": {
          "description": "The filename of the attachment. Only present if this message part represents an attachment.",
          "type": "string"
        },
        "mimeType": {
          "description": "The MIME type of the message part.",
          "type": "string"
        },
        "body": {
          "description": "The message part body for this part, which may be empty for container MIME message parts.",
          "$ref": "MessagePartBody"
        },
        "headers": {
          "items": {
            "$ref": "MessagePartHeader"
          },
          "description": "List of headers on this message part. For the top-level message part, representing the entire message payload, it will contain the standard RFC 2822 email headers such as `To`, `From`, and `Subject`.",
          "type": "array"
        }
      },
      "id": "MessagePart",
      "type": "object"
    },
    "History": {
      "properties": {
        "messages": {
          "type": "array",
          "description": "List of messages changed in this history record. The fields for specific change types, such as `messagesAdded` may duplicate messages in this field. We recommend using the specific change-type fields instead of this.",
          "items": {
            "$ref": "Message"
          }
        },
        "messagesAdded": {
          "description": "Messages added to the mailbox in this history record.",
          "items": {
            "$ref": "HistoryMessageAdded"
          },
          "type": "array"
        },
        "labelsAdded": {
          "type": "array",
          "description": "Labels added to messages in this history record.",
          "items": {
            "$ref": "HistoryLabelAdded"
          }
        },
        "labelsRemoved": {
          "type": "array",
          "description": "Labels removed from messages in this history record.",
          "items": {
            "$ref": "HistoryLabelRemoved"
          }
        },
        "id": {
          "format": "uint64",
          "type": "string",
          "description": "The mailbox sequence ID."
        },
        "messagesDeleted": {
          "type": "array",
          "description": "Messages deleted (not Trashed) from the mailbox in this history record.",
          "items": {
            "$ref": "HistoryMessageDeleted"
          }
        }
      },
      "description": "A record of a change to the user's mailbox. Each history change may affect multiple messages in multiple ways.",
      "id": "History",
      "type": "object"
    },
    "HistoryLabelRemoved": {
      "id": "HistoryLabelRemoved",
      "type": "object",
      "properties": {
        "message": {
          "$ref": "Message"
        },
        "labelIds": {
          "description": "Label IDs removed from the message.",
          "items": {
            "type": "string"
          },
          "type": "array"
        }
      }
    },
    "KaclsKeyMetadata": {
      "description": "Metadata for private keys managed by an external key access control list service. For details about managing key access, see [Google Workspace CSE API Reference](https://developers.google.com/workspace/cse/reference).",
      "properties": {
        "kaclsUri": {
          "description": "The URI of the key access control list service that manages the private key.",
          "type": "string"
        },
        "kaclsData": {
          "description": "Opaque data generated and used by the key access control list service. Maximum size: 8 KiB.",
          "type": "string"
        }
      },
      "id": "KaclsKeyMetadata",
      "type": "object"
    },
    "SmtpMsa": {
      "description": "Configuration for communication with an SMTP service.",
      "properties": {
        "port": {
          "format": "int32",
          "type": "integer",
          "description": "The port of the SMTP service. Required."
        },
        "host": {
          "description": "The hostname of the SMTP service. Required.",
          "type": "string"
        },
        "username": {
          "description": "The username that will be used for authentication with the SMTP service. This is a write-only field that can be specified in requests to create or update SendAs settings; it is never populated in responses.",
          "type": "string"
        },
        "password": {
          "description": "The password that will be used for authentication with the SMTP service. This is a write-only field that can be specified in requests to create or update SendAs settings; it is never populated in responses.",
          "type": "string"
        },
        "securityMode": {
          "enumDescriptions": [
            "Unspecified security mode.",
            "Communication with the remote SMTP service is unsecured. Requires port 25.",
            "Communication with the remote SMTP service is secured using SSL.",
            "Communication with the remote SMTP service is secured using STARTTLS."
          ],
          "enum": [
            "securityModeUnspecified",
            "none",
            "ssl",
            "starttls"
          ],
          "description": "The protocol that will be used to secure communication with the SMTP service. Required.",
          "type": "string"
        }
      },
      "id": "SmtpMsa",
      "type": "object"
    },
    "ObliterateCseKeyPairRequest": {
      "id": "ObliterateCseKeyPairRequest",
      "type": "object",
      "properties": {},
      "description": "Request to obliterate a CSE key pair."
    },
    "HistoryMessageAdded": {
      "properties": {
        "message": {
          "$ref": "Message"
        }
      },
      "id": "HistoryMessageAdded",
      "type": "object"
    },
    "ListFiltersResponse": {
      "id": "ListFiltersResponse",
      "type": "object",
      "properties": {
        "filter": {
          "description": "List of a user's filters.",
          "items": {
            "$ref": "Filter"
          },
          "type": "array"
        }
      },
      "description": "Response for the ListFilters method."
    },
    "ListMessagesResponse": {
      "id": "ListMessagesResponse",
      "type": "object",
      "properties": {
        "messages": {
          "type": "array",
          "description": "List of messages. Note that each message resource contains only an `id` and a `threadId`. Additional message details can be fetched using the messages.get method.",
          "items": {
            "$ref": "Message"
          }
        },
        "resultSizeEstimate": {
          "format": "uint32",
          "type": "integer",
          "description": "Estimated total number of results."
        },
        "nextPageToken": {
          "description": "Token to retrieve the next page of results in the list.",
          "type": "string"
        }
      }
    },
    "ListCseKeyPairsResponse": {
      "properties": {
        "nextPageToken": {
          "description": "Pagination token to be passed to a subsequent ListCseKeyPairs call in order to retrieve the next page of key pairs. If this value is not returned, then no further pages remain.",
          "type": "string"
        },
        "cseKeyPairs": {
          "description": "One page of the list of CSE key pairs installed for the user.",
          "items": {
            "$ref": "CseKeyPair"
          },
          "type": "array"
        }
      },
      "id": "ListCseKeyPairsResponse",
      "type": "object"
    },
    "ListSendAsResponse": {
      "properties": {
        "sendAs": {
          "type": "array",
          "description": "List of send-as aliases.",
          "items": {
            "$ref": "SendAs"
          }
        }
      },
      "description": "Response for the ListSendAs method.",
      "id": "ListSendAsResponse",
      "type": "object"
    },
    "EnableCseKeyPairRequest": {
      "properties": {},
      "description": "Requests to turn on a client-side encryption key pair.",
      "id": "EnableCseKeyPairRequest",
      "type": "object"
    },
    "ImapSettings": {
      "id": "ImapSettings",
      "type": "object",
      "properties": {
        "maxFolderSize": {
          "description": "An optional limit on the number of messages that an IMAP folder may contain. Legal values are 0, 1000, 2000, 5000 or 10000. A value of zero is interpreted to mean that there is no limit.",
          "format": "int32",
          "type": "integer"
        },
        "expungeBehavior": {
          "type": "string",
          "enumDescriptions": [
            "Unspecified behavior.",
            "Archive messages marked as deleted.",
            "Move messages marked as deleted to the trash.",
            "Immediately and permanently delete messages marked as deleted. The expunged messages cannot be recovered."
          ],
          "enum": [
            "expungeBehaviorUnspecified",
            "archive",
            "trash",
            "deleteForever"
          ],
          "description": "The action that will be executed on a message when it is marked as deleted and expunged from the last visible IMAP folder."
        },
        "enabled": {
          "description": "Whether IMAP is enabled for the account.",
          "type": "boolean"
        },
        "autoExpunge": {
          "description": "If this value is true, Gmail will immediately expunge a message when it is marked as deleted in IMAP. Otherwise, Gmail will wait for an update from the client before expunging messages marked as deleted.",
          "type": "boolean"
        }
      },
      "description": "IMAP settings for an account."
    },
    "Profile": {
      "id": "Profile",
      "type": "object",
      "description": "Profile for a Gmail user.",
      "properties": {
        "historyId": {
          "description": "The ID of the mailbox's current history record.",
          "type": "string",
          "format": "uint64"
        },
        "emailAddress": {
          "description": "The user's email address.",
          "type": "string"
        },
        "threadsTotal": {
          "type": "integer",
          "format": "int32",
          "description": "The total number of threads in the mailbox."
        },
        "messagesTotal": {
          "format": "int32",
          "type": "integer",
          "description": "The total number of messages in the mailbox."
        }
      }
    },
    "SendAs": {
      "properties": {
        "displayName": {
          "description": "A name that appears in the \"From:\" header for mail sent using this alias. For custom \"from\" addresses, when this is empty, Gmail will populate the \"From:\" header with the name that is used for the primary address associated with the account. If the admin has disabled the ability for users to update their name format, requests to update this field for the primary login will silently fail.",
          "type": "string"
        },
        "sendAsEmail": {
          "description": "The email address that appears in the \"From:\" header for mail sent using this alias. This is read-only for all operations except create.",
          "type": "string"
        },
        "treatAsAlias": {
          "description": "Whether Gmail should treat this address as an alias for the user's primary email address. This setting only applies to custom \"from\" aliases.",
          "type": "boolean"
        },
        "smtpMsa": {
          "description": "An optional SMTP service that will be used as an outbound relay for mail sent using this alias. If this is empty, outbound mail will be sent directly from Gmail's servers to the destination SMTP service. This setting only applies to custom \"from\" aliases.",
          "$ref": "SmtpMsa"
        },
        "isDefault": {
          "description": "Whether this address is selected as the default \"From:\" address in situations such as composing a new message or sending a vacation auto-reply. Every Gmail account has exactly one default send-as address, so the only legal value that clients may write to this field is `true`. Changing this from `false` to `true` for an address will result in this field becoming `false` for the other previous default address.",
          "type": "boolean"
        },
        "verificationStatus": {
          "enumDescriptions": [
            "Unspecified verification status.",
            "The address is ready to use as a send-as alias.",
            "The address is awaiting verification by the owner."
          ],
          "enum": [
            "verificationStatusUnspecified",
            "accepted",
            "pending"
          ],
          "description": "Indicates whether this address has been verified for use as a send-as alias. Read-only. This setting only applies to custom \"from\" aliases.",
          "type": "string"
        },
        "isPrimary": {
          "description": "Whether this address is the primary address used to login to the account. Every Gmail account has exactly one primary address, and it cannot be deleted from the collection of send-as aliases. This field is read-only.",
          "type": "boolean"
        },
        "signature": {
          "description": "An optional HTML signature that is included in messages composed with this alias in the Gmail web UI. This signature is added to new emails only.",
          "type": "string"
        },
        "replyToAddress": {
          "description": "An optional email address that is included in a \"Reply-To:\" header for mail sent using this alias. If this is empty, Gmail will not generate a \"Reply-To:\" header.",
          "type": "string"
        }
      },
      "description": "Settings associated with a send-as alias, which can be either the primary login address associated with the account or a custom \"from\" address. Send-as aliases correspond to the \"Send Mail As\" feature in the web interface. The send-as alias must be a valid email address.",
      "id": "SendAs",
      "type": "object"
    },
    "ListHistoryResponse": {
      "properties": {
        "nextPageToken": {
          "description": "Page token to retrieve the next page of results in the list.",
          "type": "string"
        },
        "history": {
          "type": "array",
          "description": "List of history records. Any `messages` contained in the response will typically only have `id` and `threadId` fields populated.",
          "items": {
            "$ref": "History"
          }
        },
        "historyId": {
          "type": "string",
          "format": "uint64",
          "description": "The ID of the mailbox's current history record."
        }
      },
      "id": "ListHistoryResponse",
      "type": "object"
    },
    "ListDraftsResponse": {
      "id": "ListDraftsResponse",
      "type": "object",
      "properties": {
        "resultSizeEstimate": {
          "format": "uint32",
          "type": "integer",
          "description": "Estimated total number of results."
        },
        "drafts": {
          "items": {
            "$ref": "Draft"
          },
          "description": "List of drafts. Note that the `Message` property in each `Draft` resource only contains an `id` and a `threadId`. The [`messages.get`](https://developers.google.com/workspace/gmail/api/v1/reference/users/messages/get) method can fetch additional message details.",
          "type": "array"
        },
        "nextPageToken": {
          "description": "Token to retrieve the next page of results in the list.",
          "type": "string"
        }
      }
    },
    "WatchRequest": {
      "id": "WatchRequest",
      "type": "object",
      "description": "Set up or update a new push notification watch on this user's mailbox.",
      "properties": {
        "labelFilterAction": {
          "enum": [
            "include",
            "exclude"
          ],
          "type": "string",
          "enumDescriptions": [
            "Only get push notifications for message changes relating to labelIds specified.",
            "Get push notifications for all message changes except those relating to labelIds specified."
          ],
          "description": "Filtering behavior of `labelIds list` specified. This field is deprecated because it caused incorrect behavior in some cases; use `label_filter_behavior` instead.",
          "deprecated": true
        },
        "labelIds": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "List of label_ids to restrict notifications about. By default, if unspecified, all changes are pushed out. If specified then dictates which labels are required for a push notification to be generated."
        },
        "labelFilterBehavior": {
          "type": "string",
          "enumDescriptions": [
            "Only get push notifications for message changes relating to labelIds specified.",
            "Get push notifications for all message changes except those relating to labelIds specified."
          ],
          "enum": [
            "include",
            "exclude"
          ],
          "description": "Filtering behavior of `labelIds list` specified. This field replaces `label_filter_action`; if set, `label_filter_action` is ignored."
        },
        "topicName": {
          "description": "A fully qualified Google Cloud Pub/Sub API topic name to publish the events to. This topic name **must** already exist in Cloud Pub/Sub and you **must** have already granted gmail \"publish\" permission on it. For example, \"projects/my-project-identifier/topics/my-topic-name\" (using the Cloud Pub/Sub \"v1\" topic naming format). Note that the \"my-project-identifier\" portion must exactly match your Google developer project id (the one executing this watch request).",
          "type": "string"
        }
      }
    },
    "MessagePartHeader": {
      "id": "MessagePartHeader",
      "type": "object",
      "properties": {
        "value": {
          "description": "The value of the header after the `:` separator. For example, `someuser@example.com`.",
          "type": "string"
        },
        "name": {
          "description": "The name of the header before the `:` separator. For example, `To`.",
          "type": "string"
        }
      }
    },
    "AutoForwarding": {
      "properties": {
        "enabled": {
          "description": "Whether all incoming mail is automatically forwarded to another address.",
          "type": "boolean"
        },
        "emailAddress": {
          "description": "Email address to which all incoming messages are forwarded. This email address must be a verified member of the forwarding addresses.",
          "type": "string"
        },
        "disposition": {
          "type": "string",
          "enumDescriptions": [
            "Unspecified disposition.",
            "Leave the message in the `INBOX`.",
            "Archive the message.",
            "Move the message to the `TRASH`.",
            "Leave the message in the `INBOX` and mark it as read."
          ],
          "enum": [
            "dispositionUnspecified",
            "leaveInInbox",
            "archive",
            "trash",
            "markRead"
          ],
          "description": "The state that a message should be left in after it has been forwarded."
        }
      },
      "description": "Auto-forwarding settings for an account.",
      "id": "AutoForwarding",
      "type": "object"
    },
    "ForwardingAddress": {
      "id": "ForwardingAddress",
      "type": "object",
      "description": "Settings for a forwarding address.",
      "properties": {
        "forwardingEmail": {
          "description": "An email address to which messages can be forwarded.",
          "type": "string"
        },
        "verificationStatus": {
          "type": "string",
          "enumDescriptions": [
            "Unspecified verification status.",
            "The address is ready to use for forwarding.",
            "The address is awaiting verification by the owner."
          ],
          "enum": [
            "verificationStatusUnspecified",
            "accepted",
            "pending"
          ],
          "description": "Indicates whether this address has been verified and is usable for forwarding. Read-only."
        }
      }
    },
    "ListLabelsResponse": {
      "id": "ListLabelsResponse",
      "type": "object",
      "properties": {
        "labels": {
          "description": "List of labels. Note that each label resource only contains an `id`, `name`, `messageListVisibility`, `labelListVisibility`, and `type`. The [`labels.get`](https://developers.google.com/workspace/gmail/api/v1/reference/users/labels/get) method can fetch additional label details.",
          "items": {
            "$ref": "Label"
          },
          "type": "array"
        }
      }
    },
    "ListThreadsResponse": {
      "id": "ListThreadsResponse",
      "type": "object",
      "properties": {
        "threads": {
          "items": {
            "$ref": "Thread"
          },
          "description": "List of threads. Note that each thread resource does not contain a list of `messages`. The list of `messages` for a given thread can be fetched using the [`threads.get`](https://developers.google.com/workspace/gmail/api/v1/reference/users/threads/get) method.",
          "type": "array"
        },
        "resultSizeEstimate": {
          "description": "Estimated total number of results.",
          "format": "uint32",
          "type": "integer"
        },
        "nextPageToken": {
          "description": "Page token to retrieve the next page of results in the list.",
          "type": "string"
        }
      }
    },
    "DisableCseKeyPairRequest": {
      "id": "DisableCseKeyPairRequest",
      "type": "object",
      "description": "Requests to turn off a client-side encryption key pair.",
      "properties": {}
    },
    "ListForwardingAddressesResponse": {
      "description": "Response for the ListForwardingAddresses method.",
      "properties": {
        "forwardingAddresses": {
          "items": {
            "$ref": "ForwardingAddress"
          },
          "description": "List of addresses that may be used for forwarding.",
          "type": "array"
        }
      },
      "id": "ListForwardingAddressesResponse",
      "type": "object"
    },
    "WatchResponse": {
      "id": "WatchResponse",
      "type": "object",
      "description": "Push notification watch response.",
      "properties": {
        "historyId": {
          "format": "uint64",
          "type": "string",
          "description": "The ID of the mailbox's current history record."
        },
        "expiration": {
          "description": "When Gmail will stop sending notifications for mailbox updates (epoch millis). Call `watch` again before this time to renew the watch.",
          "type": "string",
          "format": "int64"
        }
      }
    },
    "MessagePartBody": {
      "id": "MessagePartBody",
      "type": "object",
      "description": "The body of a single MIME message part.",
      "properties": {
        "attachmentId": {
          "description": "When present, contains the ID of an external attachment that can be retrieved in a separate `messages.attachments.get` request. When not present, the entire content of the message part body is contained in the data field.",
          "type": "string"
        },
        "size": {
          "description": "Number of bytes for the message part data (encoding notwithstanding).",
          "type": "integer",
          "format": "int32"
        },
        "data": {
          "format": "byte",
          "type": "string",
          "description": "The body data of a MIME message part as a base64url encoded string. May be empty for MIME container types that have no message body or when the body data is sent as a separate attachment. An attachment ID is present if the body data is contained in a separate attachment."
        }
      }
    },
    "ListSmimeInfoResponse": {
      "properties": {
        "smimeInfo": {
          "items": {
            "$ref": "SmimeInfo"
          },
          "description": "List of SmimeInfo.",
          "type": "array"
        }
      },
      "id": "ListSmimeInfoResponse",
      "type": "object"
    },
    "FilterAction": {
      "id": "FilterAction",
      "type": "object",
      "description": "A set of actions to perform on a message.",
      "properties": {
        "addLabelIds": {
          "description": "List of labels to add to the message.",
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "forward": {
          "description": "Email address that the message should be forwarded to. This effectively redirects the message to the address specified in this field, maintaining the original sender in the \"From\" field.",
          "type": "string"
        },
        "removeLabelIds": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "List of labels to remove from the message."
        }
      }
    },
    "HistoryLabelAdded": {
      "properties": {
        "labelIds": {
          "type": "array",
          "description": "Label IDs added to the message.",
          "items": {
            "type": "string"
          }
        },
        "message": {
          "$ref": "Message"
        }
      },
      "id": "HistoryLabelAdded",
      "type": "object"
    },
    "ModifyMessageRequest": {
      "id": "ModifyMessageRequest",
      "type": "object",
      "properties": {
        "addLabelIds": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "A list of IDs of labels to add to this message. You can add up to 100 labels with each update."
        },
        "addClassificationLabels": {
          "description": "A list of classification label values to add. If a Classification Label with the same label ID is already applied to the message, fields with existing field IDs will be updated and fields with new field IDs will be added. There's a limit of 20 Classification Label values per request. If the message is already classified and the final total number of Classification Label values exceeds the maximum allowed number of Classification Label values per message, the modification fails.",
          "items": {
            "$ref": "ClassificationLabelValue"
          },
          "type": "array"
        },
        "removeLabelIds": {
          "items": {
            "type": "string"
          },
          "description": "A list IDs of labels to remove from this message. You can remove up to 100 labels with each update.",
          "type": "array"
        },
        "removeClassificationLabelIds": {
          "type": "array",
          "description": "A list of Classification Label values to remove from this message.",
          "items": {
            "type": "string"
          }
        }
      }
    },
    "HistoryMessageDeleted": {
      "properties": {
        "message": {
          "$ref": "Message"
        }
      },
      "id": "HistoryMessageDeleted",
      "type": "object"
    },
    "CseKeyPair": {
      "properties": {
        "enablementState": {
          "description": "Output only. The current state of the key pair.",
          "enumDescriptions": [
            "The current state of the key pair is not set. The key pair is neither turned on nor turned off.",
            "The key pair is turned on. For any email messages that this key pair encrypts, Gmail decrypts the messages and signs any outgoing mail with the private key. To turn on a key pair, use the EnableCseKeyPair method.",
            "The key pair is turned off. Authenticated users cannot decrypt email messages nor sign outgoing messages. If a key pair is turned off for more than 30 days, you can permanently delete it. To turn off a key pair, use the DisableCseKeyPair method."
          ],
          "readOnly": true,
          "type": "string",
          "enum": [
            "stateUnspecified",
            "enabled",
            "disabled"
          ]
        },
        "pkcs7": {
          "description": "Input only. The public key and its certificate chain. The chain must be in [PKCS#7](https://en.wikipedia.org/wiki/PKCS_7) format and use PEM encoding and ASCII armor.",
          "type": "string"
        },
        "disableTime": {
          "description": "Output only. If a key pair is set to `DISABLED`, the time that the key pair's state changed from `ENABLED` to `DISABLED`. This field is present only when the key pair is in state `DISABLED`.",
          "format": "google-datetime",
          "readOnly": true,
          "type": "string"
        },
        "privateKeyMetadata": {
          "type": "array",
          "description": "Metadata for instances of this key pair's private key.",
          "items": {
            "$ref": "CsePrivateKeyMetadata"
          }
        },
        "subjectEmailAddresses": {
          "description": "Output only. The email address identities that are specified on the leaf certificate.",
          "items": {
            "type": "string"
          },
          "readOnly": true,
          "type": "array"
        },
        "keyPairId": {
          "readOnly": true,
          "type": "string",
          "description": "Output only. The immutable ID for the client-side encryption S/MIME key pair."
        },
        "pem": {
          "readOnly": true,
          "type": "string",
          "description": "Output only. The public key and its certificate chain, in [PEM](https://en.wikipedia.org/wiki/Privacy-Enhanced_Mail) format."
        }
      },
      "description": "A client-side encryption S/MIME key pair, which is comprised of a public key, its certificate chain, and metadata for its paired private key. Gmail uses the key pair to complete the following tasks: - Sign outgoing client-side encrypted messages. - Save and reopen drafts of client-side encrypted messages. - Save and reopen sent messages. - Decrypt incoming or archived S/MIME messages. For administrators managing identities and keypairs for users in their organization, requests require authorization with a [service account](https://developers.google.com/identity/protocols/OAuth2ServiceAccount) that has [domain-wide delegation authority](https://developers.google.com/identity/protocols/OAuth2ServiceAccount#delegatingauthority) to impersonate users with the `https://www.googleapis.com/auth/gmail.settings.basic` scope. For users managing their own identities and keypairs, requests require [hardware key encryption](https://support.google.com/a/answer/14153163) turned on and configured.",
      "id": "CseKeyPair",
      "type": "object"
    },
    "ModifyThreadRequest": {
      "id": "ModifyThreadRequest",
      "type": "object",
      "properties": {
        "addLabelIds": {
          "type": "array",
          "description": "A list of IDs of labels to add to this thread. You can add up to 100 labels with each update.",
          "items": {
            "type": "string"
          }
        },
        "removeLabelIds": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "A list of IDs of labels to remove from this thread. You can remove up to 100 labels with each update."
        }
      }
    },
    "Message": {
      "id": "Message",
      "type": "object",
      "description": "An email message.",
      "properties": {
        "payload": {
          "description": "The parsed email structure in the message parts.",
          "$ref": "MessagePart"
        },
        "historyId": {
          "type": "string",
          "format": "uint64",
          "description": "The ID of the last history record that modified this message."
        },
        "classificationLabelValues": {
          "description": "Classification Label values on the message. Available Classification Label schemas can be queried using the Google Drive Labels API. Each classification label ID must be unique. If duplicate IDs are provided, only one will be retained, and the selection is arbitrary. Only used for Google Workspace accounts. There's a limit of 20 Classification Label values per request. If the Classification Label values exceeds the maximum allowed number, the request fails.",
          "items": {
            "$ref": "ClassificationLabelValue"
          },
          "type": "array"
        },
        "snippet": {
          "description": "A short part of the message text.",
          "type": "string"
        },
        "raw": {
          "description": "The entire email message in an RFC 2822 formatted and base64url encoded string. Returned in `messages.get` and `drafts.get` responses when the `format=RAW` parameter is supplied. @required gmail.users.drafts.create gmail.users.drafts.update",
          "annotations": {
            "required": [
              "gmail.users.messages.insert",
              "gmail.users.messages.send"
            ]
          },
          "type": "string",
          "format": "byte"
        },
        "labelIds": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "List of IDs of labels applied to this message."
        },
        "internalDate": {
          "format": "int64",
          "type": "string",
          "description": "The internal message creation timestamp (epoch ms), which determines ordering in the inbox. For normal SMTP-received email, this represents the time the message was originally accepted by Google, which is more reliable than the `Date` header. However, for API-migrated mail, it can be configured by client to be based on the `Date` header."
        },
        "sizeEstimate": {
          "description": "Estimated size in bytes of the message.",
          "format": "int32",
          "type": "integer"
        },
        "threadId": {
          "description": "The ID of the thread the message belongs to. To add a message or draft to a thread, the following criteria must be met: 1. The requested `threadId` must be specified on the `Message` or `Draft.Message` you supply with your request. 2. The `References` and `In-Reply-To` headers must be set in compliance with the [RFC 2822](https://tools.ietf.org/html/rfc2822) standard. 3. The `Subject` headers must match. ",
          "type": "string"
        },
        "id": {
          "description": "The immutable ID of the message.",
          "type": "string"
        }
      }
    },
    "CseIdentity": {
      "description": "The client-side encryption (CSE) configuration for the email address of an authenticated user. Gmail uses CSE configurations to save drafts of client-side encrypted email messages, and to sign and send encrypted email messages. For administrators managing identities and keypairs for users in their organization, requests require authorization with a [service account](https://developers.google.com/identity/protocols/OAuth2ServiceAccount) that has [domain-wide delegation authority](https://developers.google.com/identity/protocols/OAuth2ServiceAccount#delegatingauthority) to impersonate users with the `https://www.googleapis.com/auth/gmail.settings.basic` scope. For users managing their own identities and keypairs, requests require [hardware key encryption](https://support.google.com/a/answer/14153163) turned on and configured.",
      "properties": {
        "primaryKeyPairId": {
          "description": "If a key pair is associated, the ID of the key pair, CseKeyPair.",
          "type": "string"
        },
        "emailAddress": {
          "description": "The email address for the sending identity. The email address must be the primary email address of the authenticated user.",
          "type": "string"
        },
        "signAndEncryptKeyPairs": {
          "description": "The configuration of a CSE identity that uses different key pairs for signing and encryption.",
          "$ref": "SignAndEncryptKeyPairs"
        }
      },
      "id": "CseIdentity",
      "type": "object"
    },
    "Filter": {
      "id": "Filter",
      "type": "object",
      "description": "Resource definition for Gmail filters. Filters apply to specific messages instead of an entire email thread.",
      "properties": {
        "action": {
          "description": "Action that the filter performs.",
          "$ref": "FilterAction"
        },
        "id": {
          "description": "The server assigned ID of the filter.",
          "type": "string"
        },
        "criteria": {
          "description": "Matching criteria for the filter.",
          "$ref": "FilterCriteria"
        }
      }
    },
    "SmimeInfo": {
      "id": "SmimeInfo",
      "type": "object",
      "description": "An S/MIME email config.",
      "properties": {
        "issuerCn": {
          "description": "The S/MIME certificate issuer's common name.",
          "type": "string"
        },
        "expiration": {
          "format": "int64",
          "type": "string",
          "description": "When the certificate expires (in milliseconds since epoch)."
        },
        "pem": {
          "description": "PEM formatted X509 concatenated certificate string (standard base64 encoding). Format used for returning key, which includes public key as well as certificate chain (not private key).",
          "type": "string"
        },
        "encryptedKeyPassword": {
          "description": "Encrypted key password, when key is encrypted.",
          "type": "string"
        },
        "isDefault": {
          "description": "Whether this SmimeInfo is the default one for this user's send-as address.",
          "type": "boolean"
        },
        "id": {
          "description": "The immutable ID for the SmimeInfo.",
          "type": "string"
        },
        "pkcs12": {
          "description": "PKCS#12 format containing a single private/public key pair and certificate chain. This format is only accepted from client for creating a new SmimeInfo and is never returned, because the private key is not intended to be exported. PKCS#12 may be encrypted, in which case encryptedKeyPassword should be set appropriately.",
          "type": "string",
          "format": "byte"
        }
      }
    }
  },
  "name": "gmail",
  "documentationLink": "https://developers.google.com/workspace/gmail/api/",
  "icons": {
    "x16": "http://www.google.com/images/icons/product/search-16.gif",
    "x32": "http://www.google.com/images/icons/product/search-32.gif"
  },
  "batchPath": "batch",
  "version": "v1",
  "id": "gmail:v1",
  "auth": {
    "oauth2": {
      "scopes": {
        "https://www.googleapis.com/auth/gmail.readonly": {
          "description": "View your email messages and settings"
        },
        "https://www.googleapis.com/auth/gmail.addons.current.action.compose": {
          "description": "Manage drafts and send emails when you interact with the add-on"
        },
        "https://www.googleapis.com/auth/gmail.insert": {
          "description": "Add emails into your Gmail mailbox"
        },
        "https://www.googleapis.com/auth/gmail.settings.basic": {
          "description": "See, edit, create, or change your email settings and filters in Gmail"
        },
        "https://www.googleapis.com/auth/gmail.addons.current.message.action": {
          "description": "View your email messages when you interact with the add-on"
        },
        "https://www.googleapis.com/auth/gmail.metadata": {
          "description": "View your email message metadata such as labels and headers, but not the email body"
        },
        "https://www.googleapis.com/auth/gmail.settings.sharing": {
          "description": "Manage your sensitive mail settings, including who can manage your mail"
        },
        "https://mail.google.com/": {
          "description": "Read, compose, send, and permanently delete all your email from Gmail"
        },
        "https://www.googleapis.com/auth/gmail.addons.current.message.metadata": {
          "description": "View your email message metadata when the add-on is running"
        },
        "https://www.googleapis.com/auth/gmail.modify": {
          "description": "Read, compose, and send emails from your Gmail account"
        },
        "https://www.googleapis.com/auth/gmail.compose": {
          "description": "Manage drafts and send emails"
        },
        "https://www.googleapis.com/auth/gmail.labels": {
          "description": "See and edit your email labels"
        },
        "https://www.googleapis.com/auth/gmail.send": {
          "description": "Send email on your behalf"
        },
        "https://www.googleapis.com/auth/gmail.addons.current.message.readonly": {
          "description": "View your email messages when the add-on is running"
        }
      }
    }
  },
  "rootUrl": "https://gmail.googleapis.com/",
  "protocol": "rest",
  "kind": "discovery#restDescription",
  "mtlsRootUrl": "https://gmail.mtls.googleapis.com/"
}
