{
  "discoveryVersion": "v1",
  "documentationLink": "https://developers.google.com/hangouts/chat",
  "auth": {
    "oauth2": {
      "scopes": {
        "https://www.googleapis.com/auth/chat.bot": {
          "description": "Private Service: https://www.googleapis.com/auth/chat.bot"
        },
        "https://www.googleapis.com/auth/chat.delete": {
          "description": "Delete conversations and spaces & remove access to associated files in Google Chat"
        },
        "https://www.googleapis.com/auth/chat.import": {
          "description": "Import spaces, messages, and memberships into Google Chat."
        },
        "https://www.googleapis.com/auth/chat.memberships": {
          "description": "View, add, update, and remove members from conversations in Google Chat"
        },
        "https://www.googleapis.com/auth/chat.memberships.app": {
          "description": "Add and remove itself from conversations in Google Chat"
        },
        "https://www.googleapis.com/auth/chat.memberships.readonly": {
          "description": "View members in Google Chat conversations."
        },
        "https://www.googleapis.com/auth/chat.messages": {
          "description": "View, compose, send, update, and delete messages, and add, view, and delete reactions to messages."
        },
        "https://www.googleapis.com/auth/chat.messages.create": {
          "description": "Compose and send messages in Google Chat"
        },
        "https://www.googleapis.com/auth/chat.messages.reactions": {
          "description": "View, add, and delete reactions to messages in Google Chat"
        },
        "https://www.googleapis.com/auth/chat.messages.reactions.create": {
          "description": "Add reactions to messages in Google Chat"
        },
        "https://www.googleapis.com/auth/chat.messages.reactions.readonly": {
          "description": "View reactions to messages in Google Chat"
        },
        "https://www.googleapis.com/auth/chat.messages.readonly": {
          "description": "View messages and reactions in Google Chat"
        },
        "https://www.googleapis.com/auth/chat.spaces": {
          "description": "Create conversations and spaces and see or edit metadata (including history settings and access settings) in Google Chat"
        },
        "https://www.googleapis.com/auth/chat.spaces.create": {
          "description": "Create new conversations in Google Chat"
        },
        "https://www.googleapis.com/auth/chat.spaces.readonly": {
          "description": "View chat and spaces in Google Chat"
        },
        "https://www.googleapis.com/auth/chat.users.readstate": {
          "description": "View and modify last read time for Google Chat conversations"
        },
        "https://www.googleapis.com/auth/chat.users.readstate.readonly": {
          "description": "View last read time for Google Chat conversations"
        }
      }
    }
  },
  "icons": {
    "x16": "http://www.google.com/images/icons/product/search-16.gif",
    "x32": "http://www.google.com/images/icons/product/search-32.gif"
  },
  "ownerName": "Google",
  "version_module": true,
  "revision": "20240521",
  "version": "v1",
  "resources": {
    "media": {
      "methods": {
        "download": {
          "id": "chat.media.download",
          "path": "v1/media/{+resourceName}",
          "flatPath": "v1/media/{mediaId}",
          "httpMethod": "GET",
          "parameters": {
            "resourceName": {
              "description": "Name of the media that is being downloaded. See ReadRequest.resource_name.",
              "pattern": "^.*$",
              "location": "path",
              "required": true,
              "type": "string"
            }
          },
          "parameterOrder": [
            "resourceName"
          ],
          "supportsMediaDownload": true,
          "response": {
            "$ref": "Media"
          },
          "scopes": [
            "https://www.googleapis.com/auth/chat.bot",
            "https://www.googleapis.com/auth/chat.messages",
            "https://www.googleapis.com/auth/chat.messages.readonly"
          ],
          "description": "Downloads media. Download is supported on the URI `/v1/media/{+name}?alt=media`."
        },
        "upload": {
          "id": "chat.media.upload",
          "path": "v1/{+parent}/attachments:upload",
          "flatPath": "v1/spaces/{spacesId}/attachments:upload",
          "httpMethod": "POST",
          "parameters": {
            "parent": {
              "description": "Required. Resource name of the Chat space in which the attachment is uploaded. Format \"spaces/{space}\".",
              "pattern": "^spaces/[^/]+$",
              "location": "path",
              "required": true,
              "type": "string"
            }
          },
          "parameterOrder": [
            "parent"
          ],
          "supportsMediaUpload": true,
          "mediaUpload": {
            "accept": [
              "*/*"
            ],
            "maxSize": "209715200",
            "protocols": {
              "resumable": {
                "multipart": true,
                "path": "/resumable/upload/v1/{+parent}/attachments:upload"
              },
              "simple": {
                "multipart": true,
                "path": "/upload/v1/{+parent}/attachments:upload"
              }
            }
          },
          "request": {
            "$ref": "UploadAttachmentRequest"
          },
          "response": {
            "$ref": "UploadAttachmentResponse"
          },
          "scopes": [
            "https://www.googleapis.com/auth/chat.import",
            "https://www.googleapis.com/auth/chat.messages",
            "https://www.googleapis.com/auth/chat.messages.create"
          ],
          "description": "Uploads an attachment. For an example, see [Upload media as a file attachment](https://developers.google.com/workspace/chat/upload-media-attachments). Requires user [authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user). You can upload attachments up to 200 MB. Certain file types aren't supported. For details, see [File types blocked by Google Chat](https://support.google.com/chat/answer/7651457?&co=GENIE.Platform%3DDesktop#File%20types%20blocked%20in%20Google%20Chat)."
        }
      }
    },
    "spaces": {
      "methods": {
        "list": {
          "id": "chat.spaces.list",
          "path": "v1/spaces",
          "flatPath": "v1/spaces",
          "httpMethod": "GET",
          "parameters": {
            "pageSize": {
              "description": "Optional. The maximum number of spaces to return. The service might return fewer than this value. If unspecified, at most 100 spaces are returned. The maximum value is 1000. If you use a value more than 1000, it's automatically changed to 1000. Negative values return an `INVALID_ARGUMENT` error.",
              "location": "query",
              "type": "integer",
              "format": "int32"
            },
            "pageToken": {
              "description": "Optional. A page token, received from a previous list spaces call. Provide this parameter to retrieve the subsequent page. When paginating, the filter value should match the call that provided the page token. Passing a different value may lead to unexpected results.",
              "location": "query",
              "type": "string"
            },
            "filter": {
              "description": "Optional. A query filter. You can filter spaces by the space type ([`space_type`](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces#spacetype)). To filter by space type, you must specify valid enum value, such as `SPACE` or `GROUP_CHAT` (the `space_type` can't be `SPACE_TYPE_UNSPECIFIED`). To query for multiple space types, use the `OR` operator. For example, the following queries are valid: ``` space_type = \"SPACE\" spaceType = \"GROUP_CHAT\" OR spaceType = \"DIRECT_MESSAGE\" ``` Invalid queries are rejected by the server with an `INVALID_ARGUMENT` error.",
              "location": "query",
              "type": "string"
            }
          },
          "parameterOrder": [],
          "response": {
            "$ref": "ListSpacesResponse"
          },
          "scopes": [
            "https://www.googleapis.com/auth/chat.bot",
            "https://www.googleapis.com/auth/chat.spaces",
            "https://www.googleapis.com/auth/chat.spaces.readonly"
          ],
          "description": "Lists spaces the caller is a member of. Group chats and DMs aren't listed until the first message is sent. For an example, see [List spaces](https://developers.google.com/workspace/chat/list-spaces). Requires [authentication](https://developers.google.com/workspace/chat/authenticate-authorize). Supports [app authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app) and [user authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user). Lists spaces visible to the caller or authenticated user. Group chats and DMs aren't listed until the first message is sent. To list all named spaces by Google Workspace organization, use the `spaces.search()` method using Workspace administrator privileges instead."
        },
        "search": {
          "id": "chat.spaces.search",
          "path": "v1/spaces:search",
          "flatPath": "v1/spaces:search",
          "httpMethod": "GET",
          "parameters": {
            "useAdminAccess": {
              "description": "When `true`, the method runs using the user's Google Workspace administrator privileges. The calling user must be a Google Workspace administrator with the [manage chat and spaces conversations privilege](https://support.google.com/a/answer/13369245). Requires either the `chat.admin.spaces.readonly` or `chat.admin.spaces` [OAuth 2.0 scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes). This method currently only supports admin access, thus only `true` is accepted for this field.",
              "location": "query",
              "type": "boolean"
            },
            "pageSize": {
              "description": "The maximum number of spaces to return. The service may return fewer than this value. If unspecified, at most 100 spaces are returned. The maximum value is 1000. If you use a value more than 1000, it's automatically changed to 1000.",
              "location": "query",
              "type": "integer",
              "format": "int32"
            },
            "pageToken": {
              "description": "A token, received from the previous search spaces call. Provide this parameter to retrieve the subsequent page. When paginating, all other parameters provided should match the call that provided the page token. Passing different values to the other parameters might lead to unexpected results.",
              "location": "query",
              "type": "string"
            },
            "query": {
              "description": "Required. A search query. You can search by using the following parameters: - `create_time` - `customer` - `display_name` - `external_user_allowed` - `last_active_time` - `space_history_state` - `space_type` `create_time` and `last_active_time` accept a timestamp in [RFC-3339](https://www.rfc-editor.org/rfc/rfc3339) format and the supported comparison operators are: `=`, `\u003c`, `\u003e`, `\u003c=`, `\u003e=`. `customer` is required and is used to indicate which customer to fetch spaces from. `customers/my_customer` is the only supported value. `display_name` only accepts the `HAS` (`:`) operator. The text to match is first tokenized into tokens and each token is prefix-matched case-insensitively and independently as a substring anywhere in the space's `display_name`. For example, `Fun Eve` matches `Fun event` or `The evening was fun` but not `notFun event` or `even`. `external_user_allowed` accepts either `true` or `false`. `space_history_state` only accepts values from the [`historyState`] (https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces#Space.HistoryState) field of a `space` resource. `space_type` is required and the only valid value is `SPACE`. Across different fields, only `AND` operators are supported. A valid example is `space_type = \"SPACE\" AND display_name:\"Hello\"` and an invalid example is `space_type = \"SPACE\" OR display_name:\"Hello\"`. Among the same field, `space_type` doesn't support `AND` or `OR` operators. `display_name`, 'space_history_state', and 'external_user_allowed' only support `OR` operators. `last_active_time` and `create_time` support both `AND` and `OR` operators. `AND` can only be used to represent a interval, such as `last_active_time \u003c \"2022-01-01T00:00:00+00:00\" AND last_active_time \u003e \"2023-01-01T00:00:00+00:00\"`. The following example queries are valid: ``` customer = \"customers/my_customer\" AND space_type = \"SPACE\" customer = \"customers/my_customer\" AND space_type = \"SPACE\" AND display_name:\"Hello World\" customer = \"customers/my_customer\" AND space_type = \"SPACE\" AND (last_active_time \u003c \"2020-01-01T00:00:00+00:00\" OR last_active_time \u003e \"2022-01-01T00:00:00+00:00\") customer = \"customers/my_customer\" AND space_type = \"SPACE\" AND (display_name:\"Hello World\" OR display_name:\"Fun event\") AND (last_active_time \u003e \"2020-01-01T00:00:00+00:00\" AND last_active_time \u003c \"2022-01-01T00:00:00+00:00\") customer = \"customers/my_customer\" AND space_type = \"SPACE\" AND (create_time \u003e \"2019-01-01T00:00:00+00:00\" AND create_time \u003c \"2020-01-01T00:00:00+00:00\") AND (external_user_allowed = \"true\") AND (space_history_state = \"HISTORY_ON\" OR space_history_state = \"HISTORY_OFF\") ```",
              "location": "query",
              "type": "string"
            },
            "orderBy": {
              "description": "Optional. How the list of spaces is ordered. Supported attributes to order by are: - `membership_count.joined_direct_human_user_count` — Denotes the count of human users that have directly joined a space. - `last_active_time` — Denotes the time when last eligible item is added to any topic of this space. - `create_time` — Denotes the time of the space creation. Valid ordering operation values are: - `ASC` for ascending. Default value. - `DESC` for descending. The supported syntax are: - `membership_count.joined_direct_human_user_count DESC` - `membership_count.joined_direct_human_user_count ASC` - `last_active_time DESC` - `last_active_time ASC` - `create_time DESC` - `create_time ASC`",
              "location": "query",
              "type": "string"
            }
          },
          "parameterOrder": [],
          "response": {
            "$ref": "SearchSpacesResponse"
          },
          "description": "[Developer Preview](https://developers.google.com/workspace/preview). Returns a list of spaces based on a user's search. Requires [user authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user). The user must be an administrator for the Google Workspace organization. In the request, set `use_admin_access` to `true`."
        },
        "get": {
          "id": "chat.spaces.get",
          "path": "v1/{+name}",
          "flatPath": "v1/spaces/{spacesId}",
          "httpMethod": "GET",
          "parameters": {
            "name": {
              "description": "Required. Resource name of the space, in the form `spaces/{space}`. Format: `spaces/{space}`",
              "pattern": "^spaces/[^/]+$",
              "location": "path",
              "required": true,
              "type": "string"
            }
          },
          "parameterOrder": [
            "name"
          ],
          "response": {
            "$ref": "Space"
          },
          "scopes": [
            "https://www.googleapis.com/auth/chat.bot",
            "https://www.googleapis.com/auth/chat.spaces",
            "https://www.googleapis.com/auth/chat.spaces.readonly"
          ],
          "description": "Returns details about a space. For an example, see [Get details about a space](https://developers.google.com/workspace/chat/get-spaces). Requires [authentication](https://developers.google.com/workspace/chat/authenticate-authorize). Supports [app authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app) and [user authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user)."
        },
        "create": {
          "id": "chat.spaces.create",
          "path": "v1/spaces",
          "flatPath": "v1/spaces",
          "httpMethod": "POST",
          "parameters": {
            "requestId": {
              "description": "Optional. A unique identifier for this request. A random UUID is recommended. Specifying an existing request ID returns the space created with that ID instead of creating a new space. Specifying an existing request ID from the same Chat app with a different authenticated user returns an error.",
              "location": "query",
              "type": "string"
            }
          },
          "parameterOrder": [],
          "request": {
            "$ref": "Space"
          },
          "response": {
            "$ref": "Space"
          },
          "scopes": [
            "https://www.googleapis.com/auth/chat.import",
            "https://www.googleapis.com/auth/chat.spaces",
            "https://www.googleapis.com/auth/chat.spaces.create"
          ],
          "description": "Creates a named space. Spaces grouped by topics aren't supported. For an example, see [Create a space](https://developers.google.com/workspace/chat/create-spaces). If you receive the error message `ALREADY_EXISTS` when creating a space, try a different `displayName`. An existing space within the Google Workspace organization might already use this display name. Requires [user authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user)."
        },
        "setup": {
          "id": "chat.spaces.setup",
          "path": "v1/spaces:setup",
          "flatPath": "v1/spaces:setup",
          "httpMethod": "POST",
          "parameters": {},
          "parameterOrder": [],
          "request": {
            "$ref": "SetUpSpaceRequest"
          },
          "response": {
            "$ref": "Space"
          },
          "scopes": [
            "https://www.googleapis.com/auth/chat.spaces",
            "https://www.googleapis.com/auth/chat.spaces.create"
          ],
          "description": "Creates a space and adds specified users to it. The calling user is automatically added to the space, and shouldn't be specified as a membership in the request. For an example, see [Set up a space with initial members](https://developers.google.com/workspace/chat/set-up-spaces). To specify the human members to add, add memberships with the appropriate `membership.member.name`. To add a human user, use `users/{user}`, where `{user}` can be the email address for the user. For users in the same Workspace organization `{user}` can also be the `id` for the person from the People API, or the `id` for the user in the Directory API. For example, if the People API Person profile ID for `user@example.com` is `123456789`, you can add the user to the space by setting the `membership.member.name` to `users/user@example.com` or `users/123456789`. For a named space or group chat, if the caller blocks, or is blocked by some members, or doesn't have permission to add some members, then those members aren't added to the created space. To create a direct message (DM) between the calling user and another human user, specify exactly one membership to represent the human user. If one user blocks the other, the request fails and the DM isn't created. To create a DM between the calling user and the calling app, set `Space.singleUserBotDm` to `true` and don't specify any memberships. You can only use this method to set up a DM with the calling app. To add the calling app as a member of a space or an existing DM between two human users, see [Invite or add a user or app to a space](https://developers.google.com/workspace/chat/create-members). If a DM already exists between two users, even when one user blocks the other at the time a request is made, then the existing DM is returned. Spaces with threaded replies aren't supported. If you receive the error message `ALREADY_EXISTS` when setting up a space, try a different `displayName`. An existing space within the Google Workspace organization might already use this display name. Requires [user authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user)."
        },
        "patch": {
          "id": "chat.spaces.patch",
          "path": "v1/{+name}",
          "flatPath": "v1/spaces/{spacesId}",
          "httpMethod": "PATCH",
          "parameters": {
            "name": {
              "description": "Resource name of the space. Format: `spaces/{space}`",
              "pattern": "^spaces/[^/]+$",
              "location": "path",
              "required": true,
              "type": "string"
            },
            "updateMask": {
              "description": "Required. The updated field paths, comma separated if there are multiple. Currently supported field paths: - `display_name` (Only supports changing the display name of a space with the `SPACE` type, or when also including the `space_type` mask to change a `GROUP_CHAT` space type to `SPACE`. Trying to update the display name of a `GROUP_CHAT` or a `DIRECT_MESSAGE` space results in an invalid argument error. If you receive the error message `ALREADY_EXISTS` when updating the `displayName`, try a different `displayName`. An existing space within the Google Workspace organization might already use this display name.) - `space_type` (Only supports changing a `GROUP_CHAT` space type to `SPACE`. Include `display_name` together with `space_type` in the update mask and ensure that the specified space has a non-empty display name and the `SPACE` space type. Including the `space_type` mask and the `SPACE` type in the specified space when updating the display name is optional if the existing space already has the `SPACE` type. Trying to update the space type in other ways results in an invalid argument error). - `space_details` - `space_history_state` (Supports [turning history on or off for the space](https://support.google.com/chat/answer/7664687) if [the organization allows users to change their history setting](https://support.google.com/a/answer/7664184). Warning: mutually exclusive with all other field paths.) - Developer Preview: `access_settings.audience` (Supports changing the [access setting](https://support.google.com/chat/answer/11971020) of a space. If no audience is specified in the access setting, the space's access setting is updated to restricted. Warning: mutually exclusive with all other field paths.)",
              "location": "query",
              "type": "string",
              "format": "google-fieldmask"
            }
          },
          "parameterOrder": [
            "name"
          ],
          "request": {
            "$ref": "Space"
          },
          "response": {
            "$ref": "Space"
          },
          "scopes": [
            "https://www.googleapis.com/auth/chat.import",
            "https://www.googleapis.com/auth/chat.spaces"
          ],
          "description": "Updates a space. For an example, see [Update a space](https://developers.google.com/workspace/chat/update-spaces). If you're updating the `displayName` field and receive the error message `ALREADY_EXISTS`, try a different display name.. An existing space within the Google Workspace organization might already use this display name. Requires [user authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user)."
        },
        "delete": {
          "id": "chat.spaces.delete",
          "path": "v1/{+name}",
          "flatPath": "v1/spaces/{spacesId}",
          "httpMethod": "DELETE",
          "parameters": {
            "name": {
              "description": "Required. Resource name of the space to delete. Format: `spaces/{space}`",
              "pattern": "^spaces/[^/]+$",
              "location": "path",
              "required": true,
              "type": "string"
            },
            "useAdminAccess": {
              "description": "[Developer Preview](https://developers.google.com/workspace/preview). When `true`, the method runs using the user's Google Workspace administrator privileges. The calling user must be a Google Workspace administrator with the [manage chat and spaces conversations privilege](https://support.google.com/a/answer/13369245). Requires the `chat.admin.delete` [OAuth 2.0 scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes).",
              "location": "query",
              "type": "boolean"
            }
          },
          "parameterOrder": [
            "name"
          ],
          "response": {
            "$ref": "Empty"
          },
          "scopes": [
            "https://www.googleapis.com/auth/chat.delete",
            "https://www.googleapis.com/auth/chat.import"
          ],
          "description": "Deletes a named space. Always performs a cascading delete, which means that the space's child resources—like messages posted in the space and memberships in the space—are also deleted. For an example, see [Delete a space](https://developers.google.com/workspace/chat/delete-spaces). Requires [user authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) from a user who has permission to delete the space."
        },
        "completeImport": {
          "id": "chat.spaces.completeImport",
          "path": "v1/{+name}:completeImport",
          "flatPath": "v1/spaces/{spacesId}:completeImport",
          "httpMethod": "POST",
          "parameters": {
            "name": {
              "description": "Required. Resource name of the import mode space. Format: `spaces/{space}`",
              "pattern": "^spaces/[^/]+$",
              "location": "path",
              "required": true,
              "type": "string"
            }
          },
          "parameterOrder": [
            "name"
          ],
          "request": {
            "$ref": "CompleteImportSpaceRequest"
          },
          "response": {
            "$ref": "CompleteImportSpaceResponse"
          },
          "scopes": [
            "https://www.googleapis.com/auth/chat.import"
          ],
          "description": "Completes the [import process](https://developers.google.com/workspace/chat/import-data) for the specified space and makes it visible to users. Requires app authentication and domain-wide delegation. For more information, see [Authorize Google Chat apps to import data](https://developers.google.com/workspace/chat/authorize-import)."
        },
        "findDirectMessage": {
          "id": "chat.spaces.findDirectMessage",
          "path": "v1/spaces:findDirectMessage",
          "flatPath": "v1/spaces:findDirectMessage",
          "httpMethod": "GET",
          "parameters": {
            "name": {
              "description": "Required. Resource name of the user to find direct message with. Format: `users/{user}`, where `{user}` is either the `id` for the [person](https://developers.google.com/people/api/rest/v1/people) from the People API, or the `id` for the [user](https://developers.google.com/admin-sdk/directory/reference/rest/v1/users) in the Directory API. For example, if the People API profile ID is `123456789`, you can find a direct message with that person by using `users/123456789` as the `name`. When [authenticated as a user](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user), you can use the email as an alias for `{user}`. For example, `users/example@gmail.com` where `example@gmail.com` is the email of the Google Chat user.",
              "location": "query",
              "type": "string"
            }
          },
          "parameterOrder": [],
          "response": {
            "$ref": "Space"
          },
          "scopes": [
            "https://www.googleapis.com/auth/chat.bot",
            "https://www.googleapis.com/auth/chat.spaces",
            "https://www.googleapis.com/auth/chat.spaces.readonly"
          ],
          "description": "Returns the existing direct message with the specified user. If no direct message space is found, returns a `404 NOT_FOUND` error. For an example, see [Find a direct message](/chat/api/guides/v1/spaces/find-direct-message). With [user authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user), returns the direct message space between the specified user and the authenticated user. With [app authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app), returns the direct message space between the specified user and the calling Chat app. Requires [user authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) or [app authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app)."
        }
      },
      "resources": {
        "spaceEvents": {
          "methods": {
            "get": {
              "id": "chat.spaces.spaceEvents.get",
              "path": "v1/{+name}",
              "flatPath": "v1/spaces/{spacesId}/spaceEvents/{spaceEventsId}",
              "httpMethod": "GET",
              "parameters": {
                "name": {
                  "description": "Required. The resource name of the space event. Format: `spaces/{space}/spaceEvents/{spaceEvent}`",
                  "pattern": "^spaces/[^/]+/spaceEvents/[^/]+$",
                  "location": "path",
                  "required": true,
                  "type": "string"
                }
              },
              "parameterOrder": [
                "name"
              ],
              "response": {
                "$ref": "SpaceEvent"
              },
              "scopes": [
                "https://www.googleapis.com/auth/chat.memberships",
                "https://www.googleapis.com/auth/chat.memberships.readonly",
                "https://www.googleapis.com/auth/chat.messages",
                "https://www.googleapis.com/auth/chat.messages.reactions",
                "https://www.googleapis.com/auth/chat.messages.reactions.readonly",
                "https://www.googleapis.com/auth/chat.messages.readonly",
                "https://www.googleapis.com/auth/chat.spaces",
                "https://www.googleapis.com/auth/chat.spaces.readonly"
              ],
              "description": "Returns an event from a Google Chat space. The [event payload](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.spaceEvents#SpaceEvent.FIELDS.oneof_payload) contains the most recent version of the resource that changed. For example, if you request an event about a new message but the message was later updated, the server returns the updated `Message` resource in the event payload. Requires [user authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user). To get an event, the authenticated user must be a member of the space. For an example, see [Get details about an event from a Google Chat space](https://developers.google.com/workspace/chat/get-space-event)."
            },
            "list": {
              "id": "chat.spaces.spaceEvents.list",
              "path": "v1/{+parent}/spaceEvents",
              "flatPath": "v1/spaces/{spacesId}/spaceEvents",
              "httpMethod": "GET",
              "parameters": {
                "parent": {
                  "description": "Required. Resource name of the [Google Chat space](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces) where the events occurred. Format: `spaces/{space}`.",
                  "pattern": "^spaces/[^/]+$",
                  "location": "path",
                  "required": true,
                  "type": "string"
                },
                "pageSize": {
                  "description": "Optional. The maximum number of space events returned. The service might return fewer than this value. Negative values return an `INVALID_ARGUMENT` error.",
                  "location": "query",
                  "type": "integer",
                  "format": "int32"
                },
                "pageToken": {
                  "description": "A page token, received from a previous list space events call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to list space events must match the call that provided the page token. Passing different values to the other parameters might lead to unexpected results.",
                  "location": "query",
                  "type": "string"
                },
                "filter": {
                  "description": "Required. A query filter. You must specify at least one event type (`event_type`) using the has `:` operator. To filter by multiple event types, use the `OR` operator. Omit batch event types in your filter. The request automatically returns any related batch events. For example, if you filter by new reactions (`google.workspace.chat.reaction.v1.created`), the server also returns batch new reactions events (`google.workspace.chat.reaction.v1.batchCreated`). For a list of supported event types, see the [`SpaceEvents` reference documentation](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.spaceEvents#SpaceEvent.FIELDS.event_type). Optionally, you can also filter by start time (`start_time`) and end time (`end_time`): * `start_time`: Exclusive timestamp from which to start listing space events. You can list events that occurred up to 28 days ago. If unspecified, lists space events from the past 28 days. * `end_time`: Inclusive timestamp until which space events are listed. If unspecified, lists events up to the time of the request. To specify a start or end time, use the equals `=` operator and format in [RFC-3339](https://www.rfc-editor.org/rfc/rfc3339). To filter by both `start_time` and `end_time`, use the `AND` operator. For example, the following queries are valid: ``` start_time=\"2023-08-23T19:20:33+00:00\" AND end_time=\"2023-08-23T19:21:54+00:00\" ``` ``` start_time=\"2023-08-23T19:20:33+00:00\" AND (event_types:\"google.workspace.chat.space.v1.updated\" OR event_types:\"google.workspace.chat.message.v1.created\") ``` The following queries are invalid: ``` start_time=\"2023-08-23T19:20:33+00:00\" OR end_time=\"2023-08-23T19:21:54+00:00\" ``` ``` event_types:\"google.workspace.chat.space.v1.updated\" AND event_types:\"google.workspace.chat.message.v1.created\" ``` Invalid queries are rejected by the server with an `INVALID_ARGUMENT` error.",
                  "location": "query",
                  "type": "string"
                }
              },
              "parameterOrder": [
                "parent"
              ],
              "response": {
                "$ref": "ListSpaceEventsResponse"
              },
              "scopes": [
                "https://www.googleapis.com/auth/chat.memberships",
                "https://www.googleapis.com/auth/chat.memberships.readonly",
                "https://www.googleapis.com/auth/chat.messages",
                "https://www.googleapis.com/auth/chat.messages.reactions",
                "https://www.googleapis.com/auth/chat.messages.reactions.readonly",
                "https://www.googleapis.com/auth/chat.messages.readonly",
                "https://www.googleapis.com/auth/chat.spaces",
                "https://www.googleapis.com/auth/chat.spaces.readonly"
              ],
              "description": "Lists events from a Google Chat space. For each event, the [payload](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.spaceEvents#SpaceEvent.FIELDS.oneof_payload) contains the most recent version of the Chat resource. For example, if you list events about new space members, the server returns `Membership` resources that contain the latest membership details. If new members were removed during the requested period, the event payload contains an empty `Membership` resource. Requires [user authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user). To list events, the authenticated user must be a member of the space. For an example, see [List events from a Google Chat space](https://developers.google.com/workspace/chat/list-space-events)."
            }
          }
        },
        "messages": {
          "methods": {
            "create": {
              "id": "chat.spaces.messages.create",
              "path": "v1/{+parent}/messages",
              "flatPath": "v1/spaces/{spacesId}/messages",
              "httpMethod": "POST",
              "parameters": {
                "parent": {
                  "description": "Required. The resource name of the space in which to create a message. Format: `spaces/{space}`",
                  "pattern": "^spaces/[^/]+$",
                  "location": "path",
                  "required": true,
                  "type": "string"
                },
                "threadKey": {
                  "description": "Optional. Deprecated: Use thread.thread_key instead. ID for the thread. Supports up to 4000 characters. To start or add to a thread, create a message and specify a `threadKey` or the thread.name. For example usage, see [Start or reply to a message thread](https://developers.google.com/workspace/chat/create-messages#create-message-thread).",
                  "location": "query",
                  "deprecated": true,
                  "type": "string"
                },
                "requestId": {
                  "description": "Optional. A unique request ID for this message. Specifying an existing request ID returns the message created with that ID instead of creating a new message.",
                  "location": "query",
                  "type": "string"
                },
                "messageReplyOption": {
                  "description": "Optional. Specifies whether a message starts a thread or replies to one. Only supported in named spaces.",
                  "location": "query",
                  "type": "string",
                  "enumDescriptions": [
                    "Default. Starts a new thread. Using this option ignores any thread ID or `thread_key` that's included.",
                    "Creates the message as a reply to the thread specified by thread ID or `thread_key`. If it fails, the message starts a new thread instead.",
                    "Creates the message as a reply to the thread specified by thread ID or `thread_key`. If a new `thread_key` is used, a new thread is created. If the message creation fails, a `NOT_FOUND` error is returned instead."
                  ],
                  "enum": [
                    "MESSAGE_REPLY_OPTION_UNSPECIFIED",
                    "REPLY_MESSAGE_FALLBACK_TO_NEW_THREAD",
                    "REPLY_MESSAGE_OR_FAIL"
                  ]
                },
                "messageId": {
                  "description": "Optional. A custom ID for a message. Lets Chat apps get, update, or delete a message without needing to store the system-assigned ID in the message's resource name (represented in the message `name` field). The value for this field must meet the following requirements: * Begins with `client-`. For example, `client-custom-name` is a valid custom ID, but `custom-name` is not. * Contains up to 63 characters and only lowercase letters, numbers, and hyphens. * Is unique within a space. A Chat app can't use the same custom ID for different messages. For details, see [Name a message](https://developers.google.com/workspace/chat/create-messages#name_a_created_message).",
                  "location": "query",
                  "type": "string"
                }
              },
              "parameterOrder": [
                "parent"
              ],
              "request": {
                "$ref": "Message"
              },
              "response": {
                "$ref": "Message"
              },
              "scopes": [
                "https://www.googleapis.com/auth/chat.bot",
                "https://www.googleapis.com/auth/chat.import",
                "https://www.googleapis.com/auth/chat.messages",
                "https://www.googleapis.com/auth/chat.messages.create"
              ],
              "description": "Creates a message in a Google Chat space. The maximum message size, including text and cards, is 32,000 bytes. For an example, see [Send a message](https://developers.google.com/workspace/chat/create-messages). Calling this method requires [authentication](https://developers.google.com/workspace/chat/authenticate-authorize) and supports the following authentication types: - For text messages, user authentication or app authentication are supported. - For card messages, only app authentication is supported. (Only Chat apps can create card messages.)"
            },
            "list": {
              "id": "chat.spaces.messages.list",
              "path": "v1/{+parent}/messages",
              "flatPath": "v1/spaces/{spacesId}/messages",
              "httpMethod": "GET",
              "parameters": {
                "parent": {
                  "description": "Required. The resource name of the space to list messages from. Format: `spaces/{space}`",
                  "pattern": "^spaces/[^/]+$",
                  "location": "path",
                  "required": true,
                  "type": "string"
                },
                "pageSize": {
                  "description": "The maximum number of messages returned. The service might return fewer messages than this value. If unspecified, at most 25 are returned. The maximum value is 1000. If you use a value more than 1000, it's automatically changed to 1000. Negative values return an `INVALID_ARGUMENT` error.",
                  "location": "query",
                  "type": "integer",
                  "format": "int32"
                },
                "pageToken": {
                  "description": "Optional, if resuming from a previous query. A page token received from a previous list messages call. Provide this parameter to retrieve the subsequent page. When paginating, all other parameters provided should match the call that provided the page token. Passing different values to the other parameters might lead to unexpected results.",
                  "location": "query",
                  "type": "string"
                },
                "filter": {
                  "description": "A query filter. You can filter messages by date (`create_time`) and thread (`thread.name`). To filter messages by the date they were created, specify the `create_time` with a timestamp in [RFC-3339](https://www.rfc-editor.org/rfc/rfc3339) format and double quotation marks. For example, `\"2023-04-21T11:30:00-04:00\"`. You can use the greater than operator `\u003e` to list messages that were created after a timestamp, or the less than operator `\u003c` to list messages that were created before a timestamp. To filter messages within a time interval, use the `AND` operator between two timestamps. To filter by thread, specify the `thread.name`, formatted as `spaces/{space}/threads/{thread}`. You can only specify one `thread.name` per query. To filter by both thread and date, use the `AND` operator in your query. For example, the following queries are valid: ``` create_time \u003e \"2012-04-21T11:30:00-04:00\" create_time \u003e \"2012-04-21T11:30:00-04:00\" AND thread.name = spaces/AAAAAAAAAAA/threads/123 create_time \u003e \"2012-04-21T11:30:00+00:00\" AND create_time \u003c \"2013-01-01T00:00:00+00:00\" AND thread.name = spaces/AAAAAAAAAAA/threads/123 thread.name = spaces/AAAAAAAAAAA/threads/123 ``` Invalid queries are rejected by the server with an `INVALID_ARGUMENT` error.",
                  "location": "query",
                  "type": "string"
                },
                "orderBy": {
                  "description": "Optional, if resuming from a previous query. How the list of messages is ordered. Specify a value to order by an ordering operation. Valid ordering operation values are as follows: - `ASC` for ascending. - `DESC` for descending. The default ordering is `create_time ASC`.",
                  "location": "query",
                  "type": "string"
                },
                "showDeleted": {
                  "description": "Whether to include deleted messages. Deleted messages include deleted time and metadata about their deletion, but message content is unavailable.",
                  "location": "query",
                  "type": "boolean"
                }
              },
              "parameterOrder": [
                "parent"
              ],
              "response": {
                "$ref": "ListMessagesResponse"
              },
              "scopes": [
                "https://www.googleapis.com/auth/chat.import",
                "https://www.googleapis.com/auth/chat.messages",
                "https://www.googleapis.com/auth/chat.messages.readonly"
              ],
              "description": "Lists messages in a space that the caller is a member of, including messages from blocked members and spaces. For an example, see [List messages](/chat/api/guides/v1/messages/list). Requires [user authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user)."
            },
            "get": {
              "id": "chat.spaces.messages.get",
              "path": "v1/{+name}",
              "flatPath": "v1/spaces/{spacesId}/messages/{messagesId}",
              "httpMethod": "GET",
              "parameters": {
                "name": {
                  "description": "Required. Resource name of the message. Format: `spaces/{space}/messages/{message}` If you've set a custom ID for your message, you can use the value from the `clientAssignedMessageId` field for `{message}`. For details, see [Name a message] (https://developers.google.com/workspace/chat/create-messages#name_a_created_message).",
                  "pattern": "^spaces/[^/]+/messages/[^/]+$",
                  "location": "path",
                  "required": true,
                  "type": "string"
                }
              },
              "parameterOrder": [
                "name"
              ],
              "response": {
                "$ref": "Message"
              },
              "scopes": [
                "https://www.googleapis.com/auth/chat.bot",
                "https://www.googleapis.com/auth/chat.messages",
                "https://www.googleapis.com/auth/chat.messages.readonly"
              ],
              "description": "Returns details about a message. For an example, see [Get details about a message](https://developers.google.com/workspace/chat/get-messages). Requires [authentication](https://developers.google.com/workspace/chat/authenticate-authorize). Supports [app authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app) and [user authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user). Note: Might return a message from a blocked member or space."
            },
            "update": {
              "id": "chat.spaces.messages.update",
              "path": "v1/{+name}",
              "flatPath": "v1/spaces/{spacesId}/messages/{messagesId}",
              "httpMethod": "PUT",
              "parameters": {
                "name": {
                  "description": "Resource name of the message. Format: `spaces/{space}/messages/{message}` Where `{space}` is the ID of the space where the message is posted and `{message}` is a system-assigned ID for the message. For example, `spaces/AAAAAAAAAAA/messages/BBBBBBBBBBB.BBBBBBBBBBB`. If you set a custom ID when you create a message, you can use this ID to specify the message in a request by replacing `{message}` with the value from the `clientAssignedMessageId` field. For example, `spaces/AAAAAAAAAAA/messages/client-custom-name`. For details, see [Name a message](https://developers.google.com/workspace/chat/create-messages#name_a_created_message).",
                  "pattern": "^spaces/[^/]+/messages/[^/]+$",
                  "location": "path",
                  "required": true,
                  "type": "string"
                },
                "updateMask": {
                  "description": "Required. The field paths to update. Separate multiple values with commas or use `*` to update all field paths. Currently supported field paths: - `text` - `attachment` - `cards` (Requires [app authentication](/chat/api/guides/auth/service-accounts).) - `cards_v2` (Requires [app authentication](/chat/api/guides/auth/service-accounts).) - `accessory_widgets` (Requires [app authentication](/chat/api/guides/auth/service-accounts).)",
                  "location": "query",
                  "type": "string",
                  "format": "google-fieldmask"
                },
                "allowMissing": {
                  "description": "Optional. If `true` and the message isn't found, a new message is created and `updateMask` is ignored. The specified message ID must be [client-assigned](https://developers.google.com/workspace/chat/create-messages#name_a_created_message) or the request fails.",
                  "location": "query",
                  "type": "boolean"
                }
              },
              "parameterOrder": [
                "name"
              ],
              "request": {
                "$ref": "Message"
              },
              "response": {
                "$ref": "Message"
              },
              "scopes": [
                "https://www.googleapis.com/auth/chat.bot",
                "https://www.googleapis.com/auth/chat.import",
                "https://www.googleapis.com/auth/chat.messages"
              ],
              "description": "Updates a message. There's a difference between the `patch` and `update` methods. The `patch` method uses a `patch` request while the `update` method uses a `put` request. We recommend using the `patch` method. For an example, see [Update a message](https://developers.google.com/workspace/chat/update-messages). Requires [authentication](https://developers.google.com/workspace/chat/authenticate-authorize). Supports [app authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app) and [user authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user). When using app authentication, requests can only update messages created by the calling Chat app."
            },
            "patch": {
              "id": "chat.spaces.messages.patch",
              "path": "v1/{+name}",
              "flatPath": "v1/spaces/{spacesId}/messages/{messagesId}",
              "httpMethod": "PATCH",
              "parameters": {
                "name": {
                  "description": "Resource name of the message. Format: `spaces/{space}/messages/{message}` Where `{space}` is the ID of the space where the message is posted and `{message}` is a system-assigned ID for the message. For example, `spaces/AAAAAAAAAAA/messages/BBBBBBBBBBB.BBBBBBBBBBB`. If you set a custom ID when you create a message, you can use this ID to specify the message in a request by replacing `{message}` with the value from the `clientAssignedMessageId` field. For example, `spaces/AAAAAAAAAAA/messages/client-custom-name`. For details, see [Name a message](https://developers.google.com/workspace/chat/create-messages#name_a_created_message).",
                  "pattern": "^spaces/[^/]+/messages/[^/]+$",
                  "location": "path",
                  "required": true,
                  "type": "string"
                },
                "updateMask": {
                  "description": "Required. The field paths to update. Separate multiple values with commas or use `*` to update all field paths. Currently supported field paths: - `text` - `attachment` - `cards` (Requires [app authentication](/chat/api/guides/auth/service-accounts).) - `cards_v2` (Requires [app authentication](/chat/api/guides/auth/service-accounts).) - `accessory_widgets` (Requires [app authentication](/chat/api/guides/auth/service-accounts).)",
                  "location": "query",
                  "type": "string",
                  "format": "google-fieldmask"
                },
                "allowMissing": {
                  "description": "Optional. If `true` and the message isn't found, a new message is created and `updateMask` is ignored. The specified message ID must be [client-assigned](https://developers.google.com/workspace/chat/create-messages#name_a_created_message) or the request fails.",
                  "location": "query",
                  "type": "boolean"
                }
              },
              "parameterOrder": [
                "name"
              ],
              "request": {
                "$ref": "Message"
              },
              "response": {
                "$ref": "Message"
              },
              "scopes": [
                "https://www.googleapis.com/auth/chat.bot",
                "https://www.googleapis.com/auth/chat.import",
                "https://www.googleapis.com/auth/chat.messages"
              ],
              "description": "Updates a message. There's a difference between the `patch` and `update` methods. The `patch` method uses a `patch` request while the `update` method uses a `put` request. We recommend using the `patch` method. For an example, see [Update a message](https://developers.google.com/workspace/chat/update-messages). Requires [authentication](https://developers.google.com/workspace/chat/authenticate-authorize). Supports [app authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app) and [user authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user). When using app authentication, requests can only update messages created by the calling Chat app."
            },
            "delete": {
              "id": "chat.spaces.messages.delete",
              "path": "v1/{+name}",
              "flatPath": "v1/spaces/{spacesId}/messages/{messagesId}",
              "httpMethod": "DELETE",
              "parameters": {
                "name": {
                  "description": "Required. Resource name of the message. Format: `spaces/{space}/messages/{message}` If you've set a custom ID for your message, you can use the value from the `clientAssignedMessageId` field for `{message}`. For details, see [Name a message] (https://developers.google.com/workspace/chat/create-messages#name_a_created_message).",
                  "pattern": "^spaces/[^/]+/messages/[^/]+$",
                  "location": "path",
                  "required": true,
                  "type": "string"
                },
                "force": {
                  "description": "When `true`, deleting a message also deletes its threaded replies. When `false`, if a message has threaded replies, deletion fails. Only applies when [authenticating as a user](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user). Has no effect when [authenticating as a Chat app] (https://developers.google.com/workspace/chat/authenticate-authorize-chat-app).",
                  "location": "query",
                  "type": "boolean"
                }
              },
              "parameterOrder": [
                "name"
              ],
              "response": {
                "$ref": "Empty"
              },
              "scopes": [
                "https://www.googleapis.com/auth/chat.bot",
                "https://www.googleapis.com/auth/chat.import",
                "https://www.googleapis.com/auth/chat.messages"
              ],
              "description": "Deletes a message. For an example, see [Delete a message](https://developers.google.com/workspace/chat/delete-messages). Requires [authentication](https://developers.google.com/workspace/chat/authenticate-authorize). Supports [app authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app) and [user authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user). When using app authentication, requests can only delete messages created by the calling Chat app."
            }
          },
          "resources": {
            "attachments": {
              "methods": {
                "get": {
                  "id": "chat.spaces.messages.attachments.get",
                  "path": "v1/{+name}",
                  "flatPath": "v1/spaces/{spacesId}/messages/{messagesId}/attachments/{attachmentsId}",
                  "httpMethod": "GET",
                  "parameters": {
                    "name": {
                      "description": "Required. Resource name of the attachment, in the form `spaces/{space}/messages/{message}/attachments/{attachment}`.",
                      "pattern": "^spaces/[^/]+/messages/[^/]+/attachments/[^/]+$",
                      "location": "path",
                      "required": true,
                      "type": "string"
                    }
                  },
                  "parameterOrder": [
                    "name"
                  ],
                  "response": {
                    "$ref": "Attachment"
                  },
                  "scopes": [
                    "https://www.googleapis.com/auth/chat.bot"
                  ],
                  "description": "Gets the metadata of a message attachment. The attachment data is fetched using the [media API](https://developers.google.com/workspace/chat/api/reference/rest/v1/media/download). For an example, see [Get metadata about a message attachment](https://developers.google.com/workspace/chat/get-media-attachments). Requires [app authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app)."
                }
              }
            },
            "reactions": {
              "methods": {
                "create": {
                  "id": "chat.spaces.messages.reactions.create",
                  "path": "v1/{+parent}/reactions",
                  "flatPath": "v1/spaces/{spacesId}/messages/{messagesId}/reactions",
                  "httpMethod": "POST",
                  "parameters": {
                    "parent": {
                      "description": "Required. The message where the reaction is created. Format: `spaces/{space}/messages/{message}`",
                      "pattern": "^spaces/[^/]+/messages/[^/]+$",
                      "location": "path",
                      "required": true,
                      "type": "string"
                    }
                  },
                  "parameterOrder": [
                    "parent"
                  ],
                  "request": {
                    "$ref": "Reaction"
                  },
                  "response": {
                    "$ref": "Reaction"
                  },
                  "scopes": [
                    "https://www.googleapis.com/auth/chat.import",
                    "https://www.googleapis.com/auth/chat.messages",
                    "https://www.googleapis.com/auth/chat.messages.reactions",
                    "https://www.googleapis.com/auth/chat.messages.reactions.create"
                  ],
                  "description": "Creates a reaction and adds it to a message. Only unicode emojis are supported. For an example, see [Add a reaction to a message](https://developers.google.com/workspace/chat/create-reactions). Requires [user authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user)."
                },
                "list": {
                  "id": "chat.spaces.messages.reactions.list",
                  "path": "v1/{+parent}/reactions",
                  "flatPath": "v1/spaces/{spacesId}/messages/{messagesId}/reactions",
                  "httpMethod": "GET",
                  "parameters": {
                    "parent": {
                      "description": "Required. The message users reacted to. Format: `spaces/{space}/messages/{message}`",
                      "pattern": "^spaces/[^/]+/messages/[^/]+$",
                      "location": "path",
                      "required": true,
                      "type": "string"
                    },
                    "pageSize": {
                      "description": "Optional. The maximum number of reactions returned. The service can return fewer reactions than this value. If unspecified, the default value is 25. The maximum value is 200; values above 200 are changed to 200.",
                      "location": "query",
                      "type": "integer",
                      "format": "int32"
                    },
                    "pageToken": {
                      "description": "Optional. (If resuming from a previous query.) A page token received from a previous list reactions call. Provide this to retrieve the subsequent page. When paginating, the filter value should match the call that provided the page token. Passing a different value might lead to unexpected results.",
                      "location": "query",
                      "type": "string"
                    },
                    "filter": {
                      "description": "Optional. A query filter. You can filter reactions by [emoji](https://developers.google.com/workspace/chat/api/reference/rest/v1/Emoji) (either `emoji.unicode` or `emoji.custom_emoji.uid`) and [user](https://developers.google.com/workspace/chat/api/reference/rest/v1/User) (`user.name`). To filter reactions for multiple emojis or users, join similar fields with the `OR` operator, such as `emoji.unicode = \"🙂\" OR emoji.unicode = \"👍\"` and `user.name = \"users/AAAAAA\" OR user.name = \"users/BBBBBB\"`. To filter reactions by emoji and user, use the `AND` operator, such as `emoji.unicode = \"🙂\" AND user.name = \"users/AAAAAA\"`. If your query uses both `AND` and `OR`, group them with parentheses. For example, the following queries are valid: ``` user.name = \"users/{user}\" emoji.unicode = \"🙂\" emoji.custom_emoji.uid = \"{uid}\" emoji.unicode = \"🙂\" OR emoji.unicode = \"👍\" emoji.unicode = \"🙂\" OR emoji.custom_emoji.uid = \"{uid}\" emoji.unicode = \"🙂\" AND user.name = \"users/{user}\" (emoji.unicode = \"🙂\" OR emoji.custom_emoji.uid = \"{uid}\") AND user.name = \"users/{user}\" ``` The following queries are invalid: ``` emoji.unicode = \"🙂\" AND emoji.unicode = \"👍\" emoji.unicode = \"🙂\" AND emoji.custom_emoji.uid = \"{uid}\" emoji.unicode = \"🙂\" OR user.name = \"users/{user}\" emoji.unicode = \"🙂\" OR emoji.custom_emoji.uid = \"{uid}\" OR user.name = \"users/{user}\" emoji.unicode = \"🙂\" OR emoji.custom_emoji.uid = \"{uid}\" AND user.name = \"users/{user}\" ``` Invalid queries are rejected by the server with an `INVALID_ARGUMENT` error.",
                      "location": "query",
                      "type": "string"
                    }
                  },
                  "parameterOrder": [
                    "parent"
                  ],
                  "response": {
                    "$ref": "ListReactionsResponse"
                  },
                  "scopes": [
                    "https://www.googleapis.com/auth/chat.messages",
                    "https://www.googleapis.com/auth/chat.messages.reactions",
                    "https://www.googleapis.com/auth/chat.messages.reactions.readonly",
                    "https://www.googleapis.com/auth/chat.messages.readonly"
                  ],
                  "description": "Lists reactions to a message. For an example, see [List reactions for a message](https://developers.google.com/workspace/chat/list-reactions). Requires [user authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user)."
                },
                "delete": {
                  "id": "chat.spaces.messages.reactions.delete",
                  "path": "v1/{+name}",
                  "flatPath": "v1/spaces/{spacesId}/messages/{messagesId}/reactions/{reactionsId}",
                  "httpMethod": "DELETE",
                  "parameters": {
                    "name": {
                      "description": "Required. Name of the reaction to delete. Format: `spaces/{space}/messages/{message}/reactions/{reaction}`",
                      "pattern": "^spaces/[^/]+/messages/[^/]+/reactions/[^/]+$",
                      "location": "path",
                      "required": true,
                      "type": "string"
                    }
                  },
                  "parameterOrder": [
                    "name"
                  ],
                  "response": {
                    "$ref": "Empty"
                  },
                  "scopes": [
                    "https://www.googleapis.com/auth/chat.import",
                    "https://www.googleapis.com/auth/chat.messages",
                    "https://www.googleapis.com/auth/chat.messages.reactions"
                  ],
                  "description": "Deletes a reaction to a message. Only unicode emojis are supported. For an example, see [Delete a reaction](https://developers.google.com/workspace/chat/delete-reactions). Requires [user authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user)."
                }
              }
            }
          }
        },
        "members": {
          "methods": {
            "list": {
              "id": "chat.spaces.members.list",
              "path": "v1/{+parent}/members",
              "flatPath": "v1/spaces/{spacesId}/members",
              "httpMethod": "GET",
              "parameters": {
                "parent": {
                  "description": "Required. The resource name of the space for which to fetch a membership list. Format: spaces/{space}",
                  "pattern": "^spaces/[^/]+$",
                  "location": "path",
                  "required": true,
                  "type": "string"
                },
                "pageSize": {
                  "description": "Optional. The maximum number of memberships to return. The service might return fewer than this value. If unspecified, at most 100 memberships are returned. The maximum value is 1000. If you use a value more than 1000, it's automatically changed to 1000. Negative values return an `INVALID_ARGUMENT` error.",
                  "location": "query",
                  "type": "integer",
                  "format": "int32"
                },
                "pageToken": {
                  "description": "Optional. A page token, received from a previous call to list memberships. Provide this parameter to retrieve the subsequent page. When paginating, all other parameters provided should match the call that provided the page token. Passing different values to the other parameters might lead to unexpected results.",
                  "location": "query",
                  "type": "string"
                },
                "filter": {
                  "description": "Optional. A query filter. You can filter memberships by a member's role ([`role`](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.members#membershiprole)) and type ([`member.type`](https://developers.google.com/workspace/chat/api/reference/rest/v1/User#type)). To filter by role, set `role` to `ROLE_MEMBER` or `ROLE_MANAGER`. To filter by type, set `member.type` to `HUMAN` or `BOT`. Developer Preview: You can also filter for `member.type` using the `!=` operator. To filter by both role and type, use the `AND` operator. To filter by either role or type, use the `OR` operator. Either `member.type = \"HUMAN\"` or `member.type != \"BOT\"` is required when `use_admin_access` is set to true. Other member type filters will be rejected. For example, the following queries are valid: ``` role = \"ROLE_MANAGER\" OR role = \"ROLE_MEMBER\" member.type = \"HUMAN\" AND role = \"ROLE_MANAGER\" member.type != \"BOT\" ``` The following queries are invalid: ``` member.type = \"HUMAN\" AND member.type = \"BOT\" role = \"ROLE_MANAGER\" AND role = \"ROLE_MEMBER\" ``` Invalid queries are rejected by the server with an `INVALID_ARGUMENT` error.",
                  "location": "query",
                  "type": "string"
                },
                "showGroups": {
                  "description": "Optional. When `true`, also returns memberships associated with a Google Group, in addition to other types of memberships. If a filter is set, Google Group memberships that don't match the filter criteria aren't returned.",
                  "location": "query",
                  "type": "boolean"
                },
                "showInvited": {
                  "description": "Optional. When `true`, also returns memberships associated with invited members, in addition to other types of memberships. If a filter is set, invited memberships that don't match the filter criteria aren't returned. Currently requires [user authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user).",
                  "location": "query",
                  "type": "boolean"
                },
                "useAdminAccess": {
                  "description": "[Developer Preview](https://developers.google.com/workspace/preview). When `true`, the method runs using the user's Google Workspace administrator privileges. The calling user must be a Google Workspace administrator with the [manage chat and spaces conversations privilege](https://support.google.com/a/answer/13369245). Requires either the `chat.admin.memberships.readonly` or `chat.admin.memberships` [OAuth 2.0 scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes). Listing app memberships in a space isn't supported when using admin access.",
                  "location": "query",
                  "type": "boolean"
                }
              },
              "parameterOrder": [
                "parent"
              ],
              "response": {
                "$ref": "ListMembershipsResponse"
              },
              "scopes": [
                "https://www.googleapis.com/auth/chat.bot",
                "https://www.googleapis.com/auth/chat.import",
                "https://www.googleapis.com/auth/chat.memberships",
                "https://www.googleapis.com/auth/chat.memberships.readonly"
              ],
              "description": "Lists memberships in a space. For an example, see [List users and Google Chat apps in a space](https://developers.google.com/workspace/chat/list-members). Listing memberships with [app authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app) lists memberships in spaces that the Chat app has access to, but excludes Chat app memberships, including its own. Listing memberships with [User authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) lists memberships in spaces that the authenticated user has access to. Requires [authentication](https://developers.google.com/workspace/chat/authenticate-authorize). Supports [app authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app) and [user authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user)."
            },
            "get": {
              "id": "chat.spaces.members.get",
              "path": "v1/{+name}",
              "flatPath": "v1/spaces/{spacesId}/members/{membersId}",
              "httpMethod": "GET",
              "parameters": {
                "name": {
                  "description": "Required. Resource name of the membership to retrieve. To get the app's own membership [by using user authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user), you can optionally use `spaces/{space}/members/app`. Format: `spaces/{space}/members/{member}` or `spaces/{space}/members/app` When [authenticated as a user](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user), you can use the user's email as an alias for `{member}`. For example, `spaces/{space}/members/example@gmail.com` where `example@gmail.com` is the email of the Google Chat user.",
                  "pattern": "^spaces/[^/]+/members/[^/]+$",
                  "location": "path",
                  "required": true,
                  "type": "string"
                }
              },
              "parameterOrder": [
                "name"
              ],
              "response": {
                "$ref": "Membership"
              },
              "scopes": [
                "https://www.googleapis.com/auth/chat.bot",
                "https://www.googleapis.com/auth/chat.memberships",
                "https://www.googleapis.com/auth/chat.memberships.readonly"
              ],
              "description": "Returns details about a membership. For an example, see [Get details about a user's or Google Chat app's membership](https://developers.google.com/workspace/chat/get-members). Requires [authentication](https://developers.google.com/workspace/chat/authenticate-authorize). Supports [app authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app) and [user authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user)."
            },
            "create": {
              "id": "chat.spaces.members.create",
              "path": "v1/{+parent}/members",
              "flatPath": "v1/spaces/{spacesId}/members",
              "httpMethod": "POST",
              "parameters": {
                "parent": {
                  "description": "Required. The resource name of the space for which to create the membership. Format: spaces/{space}",
                  "pattern": "^spaces/[^/]+$",
                  "location": "path",
                  "required": true,
                  "type": "string"
                },
                "useAdminAccess": {
                  "description": "[Developer Preview](https://developers.google.com/workspace/preview). When `true`, the method runs using the user's Google Workspace administrator privileges. The calling user must be a Google Workspace administrator with the [manage chat and spaces conversations privilege](https://support.google.com/a/answer/13369245). Requires the `chat.admin.memberships` [OAuth 2.0 scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes). Creating app memberships or creating memberships for users outside the administrator's Google Workspace organization isn't supported using admin access.",
                  "location": "query",
                  "type": "boolean"
                }
              },
              "parameterOrder": [
                "parent"
              ],
              "request": {
                "$ref": "Membership"
              },
              "response": {
                "$ref": "Membership"
              },
              "scopes": [
                "https://www.googleapis.com/auth/chat.import",
                "https://www.googleapis.com/auth/chat.memberships",
                "https://www.googleapis.com/auth/chat.memberships.app"
              ],
              "description": "Creates a human membership or app membership for the calling app. Creating memberships for other apps isn't supported. For an example, see [Invite or add a user or a Google Chat app to a space](https://developers.google.com/workspace/chat/create-members). When creating a membership, if the specified member has their auto-accept policy turned off, then they're invited, and must accept the space invitation before joining. Otherwise, creating a membership adds the member directly to the specified space. Requires [user authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user). To specify the member to add, set the `membership.member.name` for the human or app member. - To add the calling app to a space or a direct message between two human users, use `users/app`. Unable to add other apps to the space. - To add a human user, use `users/{user}`, where `{user}` can be the email address for the user. For users in the same Workspace organization `{user}` can also be the `id` for the person from the People API, or the `id` for the user in the Directory API. For example, if the People API Person profile ID for `user@example.com` is `123456789`, you can add the user to the space by setting the `membership.member.name` to `users/user@example.com` or `users/123456789`."
            },
            "patch": {
              "id": "chat.spaces.members.patch",
              "path": "v1/{+name}",
              "flatPath": "v1/spaces/{spacesId}/members/{membersId}",
              "httpMethod": "PATCH",
              "parameters": {
                "name": {
                  "description": "Resource name of the membership, assigned by the server. Format: `spaces/{space}/members/{member}`",
                  "pattern": "^spaces/[^/]+/members/[^/]+$",
                  "location": "path",
                  "required": true,
                  "type": "string"
                },
                "updateMask": {
                  "description": "Required. The field paths to update. Separate multiple values with commas or use `*` to update all field paths. Currently supported field paths: - `role`",
                  "location": "query",
                  "type": "string",
                  "format": "google-fieldmask"
                }
              },
              "parameterOrder": [
                "name"
              ],
              "request": {
                "$ref": "Membership"
              },
              "response": {
                "$ref": "Membership"
              },
              "scopes": [
                "https://www.googleapis.com/auth/chat.import",
                "https://www.googleapis.com/auth/chat.memberships"
              ],
              "description": "Updates a membership. For an example, see [Update a user's membership in a space](https://developers.google.com/workspace/chat/update-members). Requires [user authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user)."
            },
            "delete": {
              "id": "chat.spaces.members.delete",
              "path": "v1/{+name}",
              "flatPath": "v1/spaces/{spacesId}/members/{membersId}",
              "httpMethod": "DELETE",
              "parameters": {
                "name": {
                  "description": "Required. Resource name of the membership to delete. Chat apps can delete human users' or their own memberships. Chat apps can't delete other apps' memberships. When deleting a human membership, requires the `chat.memberships` scope and `spaces/{space}/members/{member}` format. You can use the email as an alias for `{member}`. For example, `spaces/{space}/members/example@gmail.com` where `example@gmail.com` is the email of the Google Chat user. When deleting an app membership, requires the `chat.memberships.app` scope and `spaces/{space}/members/app` format. Format: `spaces/{space}/members/{member}` or `spaces/{space}/members/app`.",
                  "pattern": "^spaces/[^/]+/members/[^/]+$",
                  "location": "path",
                  "required": true,
                  "type": "string"
                },
                "useAdminAccess": {
                  "description": "[Developer Preview](https://developers.google.com/workspace/preview). When `true`, the method runs using the user's Google Workspace administrator privileges. The calling user must be a Google Workspace administrator with the [manage chat and spaces conversations privilege](https://support.google.com/a/answer/13369245). Requires the `chat.admin.memberships` [OAuth 2.0 scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes). Deleting app memberships in a space isn't supported using admin access.",
                  "location": "query",
                  "type": "boolean"
                }
              },
              "parameterOrder": [
                "name"
              ],
              "response": {
                "$ref": "Membership"
              },
              "scopes": [
                "https://www.googleapis.com/auth/chat.import",
                "https://www.googleapis.com/auth/chat.memberships",
                "https://www.googleapis.com/auth/chat.memberships.app"
              ],
              "description": "Deletes a membership. For an example, see [Remove a user or a Google Chat app from a space](https://developers.google.com/workspace/chat/delete-members). Requires [user authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user)."
            }
          }
        }
      }
    },
    "users": {
      "resources": {
        "spaces": {
          "methods": {
            "getSpaceReadState": {
              "id": "chat.users.spaces.getSpaceReadState",
              "path": "v1/{+name}",
              "flatPath": "v1/users/{usersId}/spaces/{spacesId}/spaceReadState",
              "httpMethod": "GET",
              "parameters": {
                "name": {
                  "description": "Required. Resource name of the space read state to retrieve. Only supports getting read state for the calling user. To refer to the calling user, set one of the following: - The `me` alias. For example, `users/me/spaces/{space}/spaceReadState`. - Their Workspace email address. For example, `users/user@example.com/spaces/{space}/spaceReadState`. - Their user id. For example, `users/123456789/spaces/{space}/spaceReadState`. Format: users/{user}/spaces/{space}/spaceReadState",
                  "pattern": "^users/[^/]+/spaces/[^/]+/spaceReadState$",
                  "location": "path",
                  "required": true,
                  "type": "string"
                }
              },
              "parameterOrder": [
                "name"
              ],
              "response": {
                "$ref": "SpaceReadState"
              },
              "scopes": [
                "https://www.googleapis.com/auth/chat.users.readstate",
                "https://www.googleapis.com/auth/chat.users.readstate.readonly"
              ],
              "description": "Returns details about a user's read state within a space, used to identify read and unread messages. For an example, see [Get details about a user's space read state](https://developers.google.com/workspace/chat/get-space-read-state). Requires [user authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user)."
            },
            "updateSpaceReadState": {
              "id": "chat.users.spaces.updateSpaceReadState",
              "path": "v1/{+name}",
              "flatPath": "v1/users/{usersId}/spaces/{spacesId}/spaceReadState",
              "httpMethod": "PATCH",
              "parameters": {
                "name": {
                  "description": "Resource name of the space read state. Format: `users/{user}/spaces/{space}/spaceReadState`",
                  "pattern": "^users/[^/]+/spaces/[^/]+/spaceReadState$",
                  "location": "path",
                  "required": true,
                  "type": "string"
                },
                "updateMask": {
                  "description": "Required. The field paths to update. Currently supported field paths: - `last_read_time` When the `last_read_time` is before the latest message create time, the space appears as unread in the UI. To mark the space as read, set `last_read_time` to any value later (larger) than the latest message create time. The `last_read_time` is coerced to match the latest message create time. Note that the space read state only affects the read state of messages that are visible in the space's top-level conversation. Replies in threads are unaffected by this timestamp, and instead rely on the thread read state.",
                  "location": "query",
                  "type": "string",
                  "format": "google-fieldmask"
                }
              },
              "parameterOrder": [
                "name"
              ],
              "request": {
                "$ref": "SpaceReadState"
              },
              "response": {
                "$ref": "SpaceReadState"
              },
              "scopes": [
                "https://www.googleapis.com/auth/chat.users.readstate"
              ],
              "description": "Updates a user's read state within a space, used to identify read and unread messages. For an example, see [Update a user's space read state](https://developers.google.com/workspace/chat/update-space-read-state). Requires [user authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user)."
            }
          },
          "resources": {
            "threads": {
              "methods": {
                "getThreadReadState": {
                  "id": "chat.users.spaces.threads.getThreadReadState",
                  "path": "v1/{+name}",
                  "flatPath": "v1/users/{usersId}/spaces/{spacesId}/threads/{threadsId}/threadReadState",
                  "httpMethod": "GET",
                  "parameters": {
                    "name": {
                      "description": "Required. Resource name of the thread read state to retrieve. Only supports getting read state for the calling user. To refer to the calling user, set one of the following: - The `me` alias. For example, `users/me/spaces/{space}/threads/{thread}/threadReadState`. - Their Workspace email address. For example, `users/user@example.com/spaces/{space}/threads/{thread}/threadReadState`. - Their user id. For example, `users/123456789/spaces/{space}/threads/{thread}/threadReadState`. Format: users/{user}/spaces/{space}/threads/{thread}/threadReadState",
                      "pattern": "^users/[^/]+/spaces/[^/]+/threads/[^/]+/threadReadState$",
                      "location": "path",
                      "required": true,
                      "type": "string"
                    }
                  },
                  "parameterOrder": [
                    "name"
                  ],
                  "response": {
                    "$ref": "ThreadReadState"
                  },
                  "scopes": [
                    "https://www.googleapis.com/auth/chat.users.readstate",
                    "https://www.googleapis.com/auth/chat.users.readstate.readonly"
                  ],
                  "description": "Returns details about a user's read state within a thread, used to identify read and unread messages. For an example, see [Get details about a user's thread read state](https://developers.google.com/workspace/chat/get-thread-read-state). Requires [user authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user)."
                }
              }
            }
          }
        }
      }
    }
  },
  "title": "Google Chat API",
  "description": "The Google Chat API lets you build Chat apps to integrate your services with Google Chat and manage Chat resources such as spaces, members, and messages.",
  "kind": "discovery#restDescription",
  "parameters": {
    "access_token": {
      "type": "string",
      "description": "OAuth access token.",
      "location": "query"
    },
    "alt": {
      "type": "string",
      "description": "Data format for response.",
      "default": "json",
      "enum": [
        "json",
        "media",
        "proto"
      ],
      "enumDescriptions": [
        "Responses with Content-Type of application/json",
        "Media download with context-dependent Content-Type",
        "Responses with Content-Type of application/x-protobuf"
      ],
      "location": "query"
    },
    "callback": {
      "type": "string",
      "description": "JSONP",
      "location": "query"
    },
    "fields": {
      "type": "string",
      "description": "Selector specifying which fields to include in a partial response.",
      "location": "query"
    },
    "key": {
      "type": "string",
      "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"
    },
    "oauth_token": {
      "type": "string",
      "description": "OAuth 2.0 token for the current user.",
      "location": "query"
    },
    "prettyPrint": {
      "type": "boolean",
      "description": "Returns response with indentations and line breaks.",
      "default": "true",
      "location": "query"
    },
    "quotaUser": {
      "type": "string",
      "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"
    },
    "upload_protocol": {
      "type": "string",
      "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").",
      "location": "query"
    },
    "uploadType": {
      "type": "string",
      "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").",
      "location": "query"
    },
    "$.xgafv": {
      "type": "string",
      "description": "V1 error format.",
      "enum": [
        "1",
        "2"
      ],
      "enumDescriptions": [
        "v1 error format",
        "v2 error format"
      ],
      "location": "query"
    }
  },
  "baseUrl": "https://chat.googleapis.com/",
  "schemas": {
    "Media": {
      "id": "Media",
      "description": "Media resource.",
      "type": "object",
      "properties": {
        "resourceName": {
          "description": "Name of the media resource.",
          "type": "string"
        }
      }
    },
    "SpaceEvent": {
      "id": "SpaceEvent",
      "description": "An event that represents a change or activity in a Google Chat space. To learn more, see [Work with events from Google Chat](https://developers.google.com/workspace/chat/events-overview).",
      "type": "object",
      "properties": {
        "name": {
          "description": "Resource name of the space event. Format: `spaces/{space}/spaceEvents/{spaceEvent}`",
          "type": "string"
        },
        "eventTime": {
          "description": "Time when the event occurred.",
          "type": "string",
          "format": "google-datetime"
        },
        "eventType": {
          "description": "Type of space event. Each event type has a batch version, which represents multiple instances of the event type that occur in a short period of time. For `spaceEvents.list()` requests, omit batch event types in your query filter. By default, the server returns both event type and its batch version. Supported event types for [messages](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.messages): * New message: `google.workspace.chat.message.v1.created` * Updated message: `google.workspace.chat.message.v1.updated` * Deleted message: `google.workspace.chat.message.v1.deleted` * Multiple new messages: `google.workspace.chat.message.v1.batchCreated` * Multiple updated messages: `google.workspace.chat.message.v1.batchUpdated` * Multiple deleted messages: `google.workspace.chat.message.v1.batchDeleted` Supported event types for [memberships](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.members): * New membership: `google.workspace.chat.membership.v1.created` * Updated membership: `google.workspace.chat.membership.v1.updated` * Deleted membership: `google.workspace.chat.membership.v1.deleted` * Multiple new memberships: `google.workspace.chat.membership.v1.batchCreated` * Multiple updated memberships: `google.workspace.chat.membership.v1.batchUpdated` * Multiple deleted memberships: `google.workspace.chat.membership.v1.batchDeleted` Supported event types for [reactions](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.messages.reactions): * New reaction: `google.workspace.chat.reaction.v1.created` * Deleted reaction: `google.workspace.chat.reaction.v1.deleted` * Multiple new reactions: `google.workspace.chat.reaction.v1.batchCreated` * Multiple deleted reactions: `google.workspace.chat.reaction.v1.batchDeleted` Supported event types about the [space](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces): * Updated space: `google.workspace.chat.space.v1.updated` * Multiple space updates: `google.workspace.chat.space.v1.batchUpdated`",
          "type": "string"
        },
        "messageCreatedEventData": {
          "description": "Event payload for a new message. Event type: `google.workspace.chat.message.v1.created`",
          "$ref": "MessageCreatedEventData"
        },
        "messageUpdatedEventData": {
          "description": "Event payload for an updated message. Event type: `google.workspace.chat.message.v1.updated`",
          "$ref": "MessageUpdatedEventData"
        },
        "messageDeletedEventData": {
          "description": "Event payload for a deleted message. Event type: `google.workspace.chat.message.v1.deleted`",
          "$ref": "MessageDeletedEventData"
        },
        "messageBatchCreatedEventData": {
          "description": "Event payload for multiple new messages. Event type: `google.workspace.chat.message.v1.batchCreated`",
          "$ref": "MessageBatchCreatedEventData"
        },
        "messageBatchUpdatedEventData": {
          "description": "Event payload for multiple updated messages. Event type: `google.workspace.chat.message.v1.batchUpdated`",
          "$ref": "MessageBatchUpdatedEventData"
        },
        "messageBatchDeletedEventData": {
          "description": "Event payload for multiple deleted messages. Event type: `google.workspace.chat.message.v1.batchDeleted`",
          "$ref": "MessageBatchDeletedEventData"
        },
        "spaceUpdatedEventData": {
          "description": "Event payload for a space update. Event type: `google.workspace.chat.space.v1.updated`",
          "$ref": "SpaceUpdatedEventData"
        },
        "spaceBatchUpdatedEventData": {
          "description": "Event payload for multiple updates to a space. Event type: `google.workspace.chat.space.v1.batchUpdated`",
          "$ref": "SpaceBatchUpdatedEventData"
        },
        "membershipCreatedEventData": {
          "description": "Event payload for a new membership. Event type: `google.workspace.chat.membership.v1.created`",
          "$ref": "MembershipCreatedEventData"
        },
        "membershipUpdatedEventData": {
          "description": "Event payload for an updated membership. Event type: `google.workspace.chat.membership.v1.updated`",
          "$ref": "MembershipUpdatedEventData"
        },
        "membershipDeletedEventData": {
          "description": "Event payload for a deleted membership. Event type: `google.workspace.chat.membership.v1.deleted`",
          "$ref": "MembershipDeletedEventData"
        },
        "membershipBatchCreatedEventData": {
          "description": "Event payload for multiple new memberships. Event type: `google.workspace.chat.membership.v1.batchCreated`",
          "$ref": "MembershipBatchCreatedEventData"
        },
        "membershipBatchUpdatedEventData": {
          "description": "Event payload for multiple updated memberships. Event type: `google.workspace.chat.membership.v1.batchUpdated`",
          "$ref": "MembershipBatchUpdatedEventData"
        },
        "membershipBatchDeletedEventData": {
          "description": "Event payload for multiple deleted memberships. Event type: `google.workspace.chat.membership.v1.batchDeleted`",
          "$ref": "MembershipBatchDeletedEventData"
        },
        "reactionCreatedEventData": {
          "description": "Event payload for a new reaction. Event type: `google.workspace.chat.reaction.v1.created`",
          "$ref": "ReactionCreatedEventData"
        },
        "reactionDeletedEventData": {
          "description": "Event payload for a deleted reaction. Event type: `google.workspace.chat.reaction.v1.deleted`",
          "$ref": "ReactionDeletedEventData"
        },
        "reactionBatchCreatedEventData": {
          "description": "Event payload for multiple new reactions. Event type: `google.workspace.chat.reaction.v1.batchCreated`",
          "$ref": "ReactionBatchCreatedEventData"
        },
        "reactionBatchDeletedEventData": {
          "description": "Event payload for multiple deleted reactions. Event type: `google.workspace.chat.reaction.v1.batchDeleted`",
          "$ref": "ReactionBatchDeletedEventData"
        }
      }
    },
    "MessageCreatedEventData": {
      "id": "MessageCreatedEventData",
      "description": "Event payload for a new message. Event type: `google.workspace.chat.message.v1.created`",
      "type": "object",
      "properties": {
        "message": {
          "description": "The new message.",
          "$ref": "Message"
        }
      }
    },
    "Message": {
      "id": "Message",
      "description": "A message in a Google Chat space.",
      "type": "object",
      "properties": {
        "name": {
          "description": "Resource name of the message. Format: `spaces/{space}/messages/{message}` Where `{space}` is the ID of the space where the message is posted and `{message}` is a system-assigned ID for the message. For example, `spaces/AAAAAAAAAAA/messages/BBBBBBBBBBB.BBBBBBBBBBB`. If you set a custom ID when you create a message, you can use this ID to specify the message in a request by replacing `{message}` with the value from the `clientAssignedMessageId` field. For example, `spaces/AAAAAAAAAAA/messages/client-custom-name`. For details, see [Name a message](https://developers.google.com/workspace/chat/create-messages#name_a_created_message).",
          "type": "string"
        },
        "sender": {
          "description": "Output only. The user who created the message. If your Chat app [authenticates as a user](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user), the output populates the [user](https://developers.google.com/workspace/chat/api/reference/rest/v1/User) `name` and `type`.",
          "readOnly": true,
          "$ref": "User"
        },
        "createTime": {
          "description": "Optional. Immutable. For spaces created in Chat, the time at which the message was created. This field is output only, except when used in import mode spaces. For import mode spaces, set this field to the historical timestamp at which the message was created in the source in order to preserve the original creation time.",
          "type": "string",
          "format": "google-datetime"
        },
        "lastUpdateTime": {
          "description": "Output only. The time at which the message was last edited by a user. If the message has never been edited, this field is empty.",
          "readOnly": true,
          "type": "string",
          "format": "google-datetime"
        },
        "deleteTime": {
          "description": "Output only. The time at which the message was deleted in Google Chat. If the message is never deleted, this field is empty.",
          "readOnly": true,
          "type": "string",
          "format": "google-datetime"
        },
        "text": {
          "description": "Plain-text body of the message. The first link to an image, video, or web page generates a [preview chip](https://developers.google.com/workspace/chat/preview-links). You can also [@mention a Google Chat user](https://developers.google.com/workspace/chat/format-messages#messages-@mention), or everyone in the space. To learn about creating text messages, see [Send a text message](https://developers.google.com/workspace/chat/create-messages#create-text-messages).",
          "type": "string"
        },
        "formattedText": {
          "description": "Output only. Contains the message `text` with markups added to communicate formatting. This field might not capture all formatting visible in the UI, but includes the following: * [Markup syntax](https://developers.google.com/workspace/chat/format-messages) for bold, italic, strikethrough, monospace, monospace block, and bulleted list. * [User mentions](https://developers.google.com/workspace/chat/format-messages#messages-@mention) using the format ``. * Custom hyperlinks using the format `\u003c{url}|{rendered_text}\u003e` where the first string is the URL and the second is the rendered text—for example, ``. * Custom emoji using the format `:{emoji_name}:`—for example, `:smile:`. This doesn't apply to Unicode emoji, such as `U+1F600` for a grinning face emoji. For more information, see [View text formatting sent in a message](https://developers.google.com/workspace/chat/format-messages#view_text_formatting_sent_in_a_message)",
          "readOnly": true,
          "type": "string"
        },
        "cards": {
          "description": "Deprecated: Use `cards_v2` instead. Rich, formatted, and interactive cards that you can use to display UI elements such as: formatted texts, buttons, and clickable images. Cards are normally displayed below the plain-text body of the message. `cards` and `cards_v2` can have a maximum size of 32 KB.",
          "deprecated": true,
          "type": "array",
          "items": {
            "$ref": "Card"
          }
        },
        "cardsV2": {
          "description": "An array of [cards](https://developers.google.com/workspace/chat/api/reference/rest/v1/cards). Only Chat apps can create cards. If your Chat app [authenticates as a user](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user), the messages can't contain cards. To learn about cards and how to create them, see [Send card messages](https://developers.google.com/workspace/chat/create-messages#create). [Card builder](https://addons.gsuite.google.com/uikit/builder)",
          "type": "array",
          "items": {
            "$ref": "CardWithId"
          }
        },
        "annotations": {
          "description": "Output only. Annotations associated with the `text` in this message.",
          "readOnly": true,
          "type": "array",
          "items": {
            "$ref": "Annotation"
          }
        },
        "thread": {
          "description": "The thread the message belongs to. For example usage, see [Start or reply to a message thread](https://developers.google.com/workspace/chat/create-messages#create-message-thread).",
          "$ref": "Thread"
        },
        "space": {
          "description": "If your Chat app [authenticates as a user](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user), the output populates the [space](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces) `name`.",
          "$ref": "Space"
        },
        "fallbackText": {
          "description": "A plain-text description of the message's cards, used when the actual cards can't be displayed—for example, mobile notifications.",
          "type": "string"
        },
        "actionResponse": {
          "description": "Input only. Parameters that a Chat app can use to configure how its response is posted.",
          "$ref": "ActionResponse"
        },
        "argumentText": {
          "description": "Output only. Plain-text body of the message with all Chat app mentions stripped out.",
          "readOnly": true,
          "type": "string"
        },
        "slashCommand": {
          "description": "Output only. Slash command information, if applicable.",
          "readOnly": true,
          "$ref": "SlashCommand"
        },
        "attachment": {
          "description": "User-uploaded attachment.",
          "type": "array",
          "items": {
            "$ref": "Attachment"
          }
        },
        "matchedUrl": {
          "description": "Output only. A URL in `spaces.messages.text` that matches a link preview pattern. For more information, see [Preview links](https://developers.google.com/workspace/chat/preview-links).",
          "readOnly": true,
          "$ref": "MatchedUrl"
        },
        "threadReply": {
          "description": "Output only. When `true`, the message is a response in a reply thread. When `false`, the message is visible in the space's top-level conversation as either the first message of a thread or a message with no threaded replies. If the space doesn't support reply in threads, this field is always `false`.",
          "readOnly": true,
          "type": "boolean"
        },
        "clientAssignedMessageId": {
          "description": "Optional. A custom ID for the message. You can use field to identify a message, or to get, delete, or update a message. To set a custom ID, specify the [`messageId`](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.messages/create#body.QUERY_PARAMETERS.message_id) field when you create the message. For details, see [Name a message](https://developers.google.com/workspace/chat/create-messages#name_a_created_message).",
          "type": "string"
        },
        "emojiReactionSummaries": {
          "description": "Output only. The list of emoji reaction summaries on the message.",
          "readOnly": true,
          "type": "array",
          "items": {
            "$ref": "EmojiReactionSummary"
          }
        },
        "privateMessageViewer": {
          "description": "Immutable. Input for creating a message, otherwise output only. The user that can view the message. When set, the message is private and only visible to the specified user and the Chat app. Link previews and attachments aren't supported for private messages. Only Chat apps can send private messages. If your Chat app [authenticates as a user](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) to send a message, the message can't be private and must omit this field. For details, see [Send private messages to Google Chat users](https://developers.google.com/workspace/chat/private-messages).",
          "$ref": "User"
        },
        "deletionMetadata": {
          "description": "Output only. Information about a deleted message. A message is deleted when `delete_time` is set.",
          "readOnly": true,
          "$ref": "DeletionMetadata"
        },
        "quotedMessageMetadata": {
          "description": "Output only. Information about a message that's quoted by a Google Chat user in a space. Google Chat users can quote a message to reply to it.",
          "readOnly": true,
          "$ref": "QuotedMessageMetadata"
        },
        "attachedGifs": {
          "description": "Output only. GIF images that are attached to the message.",
          "readOnly": true,
          "type": "array",
          "items": {
            "$ref": "AttachedGif"
          }
        },
        "accessoryWidgets": {
          "description": "One or more interactive widgets that appear at the bottom of a message. You can add accessory widgets to messages that contain text, cards, or both text and cards. Not supported for messages that contain dialogs. For details, see [Add interactive widgets at the bottom of a message](https://developers.google.com/workspace/chat/create-messages#add-accessory-widgets). Creating a message with accessory widgets requires [app authentication] (https://developers.google.com/workspace/chat/authenticate-authorize-chat-app).",
          "type": "array",
          "items": {
            "$ref": "AccessoryWidget"
          }
        }
      }
    },
    "User": {
      "id": "User",
      "description": "A user in Google Chat. When returned as an output from a request, if your Chat app [authenticates as a user](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user), the output for a `User` resource only populates the user's `name` and `type`.",
      "type": "object",
      "properties": {
        "name": {
          "description": "Resource name for a Google Chat user. Format: `users/{user}`. `users/app` can be used as an alias for the calling app bot user. For human users, `{user}` is the same user identifier as: - the `id` for the [Person](https://developers.google.com/people/api/rest/v1/people) in the People API. For example, `users/123456789` in Chat API represents the same person as the `123456789` Person profile ID in People API. - the `id` for a [user](https://developers.google.com/admin-sdk/directory/reference/rest/v1/users) in the Admin SDK Directory API. - the user's email address can be used as an alias for `{user}` in API requests. For example, if the People API Person profile ID for `user@example.com` is `123456789`, you can use `users/user@example.com` as an alias to reference `users/123456789`. Only the canonical resource name (for example `users/123456789`) will be returned from the API.",
          "type": "string"
        },
        "displayName": {
          "description": "Output only. The user's display name.",
          "readOnly": true,
          "type": "string"
        },
        "domainId": {
          "description": "Unique identifier of the user's Google Workspace domain.",
          "type": "string"
        },
        "type": {
          "description": "User type.",
          "type": "string",
          "enumDescriptions": [
            "Default value for the enum. DO NOT USE.",
            "Human user.",
            "Chat app user."
          ],
          "enum": [
            "TYPE_UNSPECIFIED",
            "HUMAN",
            "BOT"
          ]
        },
        "isAnonymous": {
          "description": "Output only. When `true`, the user is deleted or their profile is not visible.",
          "readOnly": true,
          "type": "boolean"
        }
      }
    },
    "Card": {
      "id": "Card",
      "description": "A card is a UI element that can contain UI widgets such as text and images.",
      "type": "object",
      "properties": {
        "header": {
          "description": "The header of the card. A header usually contains a title and an image.",
          "$ref": "CardHeader"
        },
        "sections": {
          "description": "Sections are separated by a line divider.",
          "type": "array",
          "items": {
            "$ref": "Section"
          }
        },
        "cardActions": {
          "description": "The actions of this card.",
          "type": "array",
          "items": {
            "$ref": "CardAction"
          }
        },
        "name": {
          "description": "Name of the card.",
          "type": "string"
        }
      }
    },
    "CardHeader": {
      "id": "CardHeader",
      "type": "object",
      "properties": {
        "title": {
          "description": "The title must be specified. The header has a fixed height: if both a title and subtitle is specified, each takes up one line. If only the title is specified, it takes up both lines.",
          "type": "string"
        },
        "subtitle": {
          "description": "The subtitle of the card header.",
          "type": "string"
        },
        "imageStyle": {
          "description": "The image's type (for example, square border or circular border).",
          "type": "string",
          "enumDescriptions": [
            "",
            "Square border.",
            "Circular border."
          ],
          "enum": [
            "IMAGE_STYLE_UNSPECIFIED",
            "IMAGE",
            "AVATAR"
          ]
        },
        "imageUrl": {
          "description": "The URL of the image in the card header.",
          "type": "string"
        }
      }
    },
    "Section": {
      "id": "Section",
      "description": "A section contains a collection of widgets that are rendered (vertically) in the order that they are specified. Across all platforms, cards have a narrow fixed width, so there's currently no need for layout properties (for example, float).",
      "type": "object",
      "properties": {
        "header": {
          "description": "The header of the section. Formatted text is supported. For more information about formatting text, see [Formatting text in Google Chat apps](https://developers.google.com/workspace/chat/format-messages#card-formatting) and [Formatting text in Google Workspace Add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting).",
          "type": "string"
        },
        "widgets": {
          "description": "A section must contain at least one widget.",
          "type": "array",
          "items": {
            "$ref": "WidgetMarkup"
          }
        }
      }
    },
    "WidgetMarkup": {
      "id": "WidgetMarkup",
      "description": "A widget is a UI element that presents text and images.",
      "type": "object",
      "properties": {
        "textParagraph": {
          "description": "Display a text paragraph in this widget.",
          "$ref": "TextParagraph"
        },
        "image": {
          "description": "Display an image in this widget.",
          "$ref": "Image"
        },
        "keyValue": {
          "description": "Display a key value item in this widget.",
          "$ref": "KeyValue"
        },
        "buttons": {
          "description": "A list of buttons. Buttons is also `oneof data` and only one of these fields should be set.",
          "type": "array",
          "items": {
            "$ref": "Button"
          }
        }
      }
    },
    "TextParagraph": {
      "id": "TextParagraph",
      "description": "A paragraph of text. Formatted text supported. For more information about formatting text, see [Formatting text in Google Chat apps](https://developers.google.com/workspace/chat/format-messages#card-formatting) and [Formatting text in Google Workspace Add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting).",
      "type": "object",
      "properties": {
        "text": {
          "type": "string"
        }
      }
    },
    "Image": {
      "id": "Image",
      "description": "An image that's specified by a URL and can have an `onclick` action.",
      "type": "object",
      "properties": {
        "imageUrl": {
          "description": "The URL of the image.",
          "type": "string"
        },
        "onClick": {
          "description": "The `onclick` action.",
          "$ref": "OnClick"
        },
        "aspectRatio": {
          "description": "The aspect ratio of this image (width and height). This field lets you reserve the right height for the image while waiting for it to load. It's not meant to override the built-in aspect ratio of the image. If unset, the server fills it by prefetching the image.",
          "type": "number",
          "format": "double"
        }
      }
    },
    "OnClick": {
      "id": "OnClick",
      "description": "An `onclick` action (for example, open a link).",
      "type": "object",
      "properties": {
        "action": {
          "description": "A form action is triggered by this `onclick` action if specified.",
          "$ref": "FormAction"
        },
        "openLink": {
          "description": "This `onclick` action triggers an open link action if specified.",
          "$ref": "OpenLink"
        }
      }
    },
    "FormAction": {
      "id": "FormAction",
      "description": "A form action describes the behavior when the form is submitted. For example, you can invoke Apps Script to handle the form.",
      "type": "object",
      "properties": {
        "actionMethodName": {
          "description": "The method name is used to identify which part of the form triggered the form submission. This information is echoed back to the Chat app as part of the card click event. You can use the same method name for several elements that trigger a common behavior.",
          "type": "string"
        },
        "parameters": {
          "description": "List of action parameters.",
          "type": "array",
          "items": {
            "$ref": "ActionParameter"
          }
        }
      }
    },
    "ActionParameter": {
      "id": "ActionParameter",
      "description": "List of string parameters to supply when the action method is invoked. For example, consider three snooze buttons: snooze now, snooze one day, snooze next week. You might use `action method = snooze()`, passing the snooze type and snooze time in the list of string parameters.",
      "type": "object",
      "properties": {
        "key": {
          "description": "The name of the parameter for the action script.",
          "type": "string"
        },
        "value": {
          "description": "The value of the parameter.",
          "type": "string"
        }
      }
    },
    "OpenLink": {
      "id": "OpenLink",
      "description": "A link that opens a new window.",
      "type": "object",
      "properties": {
        "url": {
          "description": "The URL to open.",
          "type": "string"
        }
      }
    },
    "KeyValue": {
      "id": "KeyValue",
      "description": "A UI element contains a key (label) and a value (content). This element can also contain some actions such as `onclick` button.",
      "type": "object",
      "properties": {
        "icon": {
          "description": "An enum value that's replaced by the Chat API with the corresponding icon image.",
          "type": "string",
          "enumDescriptions": [
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            ""
          ],
          "enum": [
            "ICON_UNSPECIFIED",
            "AIRPLANE",
            "BOOKMARK",
            "BUS",
            "CAR",
            "CLOCK",
            "CONFIRMATION_NUMBER_ICON",
            "DOLLAR",
            "DESCRIPTION",
            "EMAIL",
            "EVENT_PERFORMER",
            "EVENT_SEAT",
            "FLIGHT_ARRIVAL",
            "FLIGHT_DEPARTURE",
            "HOTEL",
            "HOTEL_ROOM_TYPE",
            "INVITE",
            "MAP_PIN",
            "MEMBERSHIP",
            "MULTIPLE_PEOPLE",
            "OFFER",
            "PERSON",
            "PHONE",
            "RESTAURANT_ICON",
            "SHOPPING_CART",
            "STAR",
            "STORE",
            "TICKET",
            "TRAIN",
            "VIDEO_CAMERA",
            "VIDEO_PLAY"
          ]
        },
        "iconUrl": {
          "description": "The icon specified by a URL.",
          "type": "string"
        },
        "topLabel": {
          "description": "The text of the top label. Formatted text supported. For more information about formatting text, see [Formatting text in Google Chat apps](https://developers.google.com/workspace/chat/format-messages#card-formatting) and [Formatting text in Google Workspace Add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting).",
          "type": "string"
        },
        "content": {
          "description": "The text of the content. Formatted text supported and always required. For more information about formatting text, see [Formatting text in Google Chat apps](https://developers.google.com/workspace/chat/format-messages#card-formatting) and [Formatting text in Google Workspace Add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting).",
          "type": "string"
        },
        "contentMultiline": {
          "description": "If the content should be multiline.",
          "type": "boolean"
        },
        "bottomLabel": {
          "description": "The text of the bottom label. Formatted text supported. For more information about formatting text, see [Formatting text in Google Chat apps](https://developers.google.com/workspace/chat/format-messages#card-formatting) and [Formatting text in Google Workspace Add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting).",
          "type": "string"
        },
        "onClick": {
          "description": "The `onclick` action. Only the top label, bottom label, and content region are clickable.",
          "$ref": "OnClick"
        },
        "button": {
          "description": "A button that can be clicked to trigger an action.",
          "$ref": "Button"
        }
      }
    },
    "Button": {
      "id": "Button",
      "description": "A button. Can be a text button or an image button.",
      "type": "object",
      "properties": {
        "textButton": {
          "description": "A button with text and `onclick` action.",
          "$ref": "TextButton"
        },
        "imageButton": {
          "description": "A button with image and `onclick` action.",
          "$ref": "ImageButton"
        }
      }
    },
    "TextButton": {
      "id": "TextButton",
      "description": "A button with text and `onclick` action.",
      "type": "object",
      "properties": {
        "text": {
          "description": "The text of the button.",
          "type": "string"
        },
        "onClick": {
          "description": "The `onclick` action of the button.",
          "$ref": "OnClick"
        }
      }
    },
    "ImageButton": {
      "id": "ImageButton",
      "description": "An image button with an `onclick` action.",
      "type": "object",
      "properties": {
        "icon": {
          "description": "The icon specified by an `enum` that indices to an icon provided by Chat API.",
          "type": "string",
          "enumDescriptions": [
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            ""
          ],
          "enum": [
            "ICON_UNSPECIFIED",
            "AIRPLANE",
            "BOOKMARK",
            "BUS",
            "CAR",
            "CLOCK",
            "CONFIRMATION_NUMBER_ICON",
            "DOLLAR",
            "DESCRIPTION",
            "EMAIL",
            "EVENT_PERFORMER",
            "EVENT_SEAT",
            "FLIGHT_ARRIVAL",
            "FLIGHT_DEPARTURE",
            "HOTEL",
            "HOTEL_ROOM_TYPE",
            "INVITE",
            "MAP_PIN",
            "MEMBERSHIP",
            "MULTIPLE_PEOPLE",
            "OFFER",
            "PERSON",
            "PHONE",
            "RESTAURANT_ICON",
            "SHOPPING_CART",
            "STAR",
            "STORE",
            "TICKET",
            "TRAIN",
            "VIDEO_CAMERA",
            "VIDEO_PLAY"
          ]
        },
        "iconUrl": {
          "description": "The icon specified by a URL.",
          "type": "string"
        },
        "onClick": {
          "description": "The `onclick` action.",
          "$ref": "OnClick"
        },
        "name": {
          "description": "The name of this `image_button` that's used for accessibility. Default value is provided if this name isn't specified.",
          "type": "string"
        }
      }
    },
    "CardAction": {
      "id": "CardAction",
      "description": "A card action is the action associated with the card. For an invoice card, a typical action would be: delete invoice, email invoice or open the invoice in browser. Not supported by Google Chat apps.",
      "type": "object",
      "properties": {
        "actionLabel": {
          "description": "The label used to be displayed in the action menu item.",
          "type": "string"
        },
        "onClick": {
          "description": "The onclick action for this action item.",
          "$ref": "OnClick"
        }
      }
    },
    "CardWithId": {
      "id": "CardWithId",
      "description": "A [card](https://developers.google.com/workspace/chat/api/reference/rest/v1/cards) in a Google Chat message. Only Chat apps can create cards. If your Chat app [authenticates as a user](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user), the message can't contain cards. [Card builder](https://addons.gsuite.google.com/uikit/builder)",
      "type": "object",
      "properties": {
        "cardId": {
          "description": "Required if the message contains multiple cards. A unique identifier for a card in a message.",
          "type": "string"
        },
        "card": {
          "description": "A card. Maximum size is 32 KB.",
          "$ref": "GoogleAppsCardV1Card"
        }
      }
    },
    "GoogleAppsCardV1Card": {
      "id": "GoogleAppsCardV1Card",
      "description": "A card interface displayed in a Google Chat message or Google Workspace Add-on. Cards support a defined layout, interactive UI elements like buttons, and rich media like images. Use cards to present detailed information, gather information from users, and guide users to take a next step. [Card builder](https://addons.gsuite.google.com/uikit/builder) To learn how to build cards, see the following documentation: * For Google Chat apps, see [Design the components of a card or dialog](https://developers.google.com/workspace/chat/design-components-card-dialog). * For Google Workspace Add-ons, see [Card-based interfaces](https://developers.google.com/apps-script/add-ons/concepts/cards). **Example: Card message for a Google Chat app** ![Example contact card](https://developers.google.com/workspace/chat/images/card_api_reference.png) To create the sample card message in Google Chat, use the following JSON: ``` { \"cardsV2\": [ { \"cardId\": \"unique-card-id\", \"card\": { \"header\": { \"title\": \"Sasha\", \"subtitle\": \"Software Engineer\", \"imageUrl\": \"https://developers.google.com/workspace/chat/images/quickstart-app-avatar.png\", \"imageType\": \"CIRCLE\", \"imageAltText\": \"Avatar for Sasha\" }, \"sections\": [ { \"header\": \"Contact Info\", \"collapsible\": true, \"uncollapsibleWidgetsCount\": 1, \"widgets\": [ { \"decoratedText\": { \"startIcon\": { \"knownIcon\": \"EMAIL\" }, \"text\": \"sasha@example.com\" } }, { \"decoratedText\": { \"startIcon\": { \"knownIcon\": \"PERSON\" }, \"text\": \"Online\" } }, { \"decoratedText\": { \"startIcon\": { \"knownIcon\": \"PHONE\" }, \"text\": \"+1 (555) 555-1234\" } }, { \"buttonList\": { \"buttons\": [ { \"text\": \"Share\", \"onClick\": { \"openLink\": { \"url\": \"https://example.com/share\" } } }, { \"text\": \"Edit\", \"onClick\": { \"action\": { \"function\": \"goToView\", \"parameters\": [ { \"key\": \"viewType\", \"value\": \"EDIT\" } ] } } } ] } } ] } ] } } ] } ```",
      "type": "object",
      "properties": {
        "header": {
          "description": "The header of the card. A header usually contains a leading image and a title. Headers always appear at the top of a card.",
          "$ref": "GoogleAppsCardV1CardHeader"
        },
        "sections": {
          "description": "Contains a collection of widgets. Each section has its own, optional header. Sections are visually separated by a line divider. For an example in Google Chat apps, see [Define a section of a card](https://developers.google.com/workspace/chat/design-components-card-dialog#define_a_section_of_a_card).",
          "type": "array",
          "items": {
            "$ref": "GoogleAppsCardV1Section"
          }
        },
        "sectionDividerStyle": {
          "description": "The divider style between sections.",
          "type": "string",
          "enumDescriptions": [
            "Don't use. Unspecified.",
            "Default option. Render a solid divider between sections.",
            "If set, no divider is rendered between sections."
          ],
          "enum": [
            "DIVIDER_STYLE_UNSPECIFIED",
            "SOLID_DIVIDER",
            "NO_DIVIDER"
          ]
        },
        "cardActions": {
          "description": "The card's actions. Actions are added to the card's toolbar menu. [Google Workspace Add-ons](https://developers.google.com/workspace/add-ons): For example, the following JSON constructs a card action menu with `Settings` and `Send Feedback` options: ``` \"card_actions\": [ { \"actionLabel\": \"Settings\", \"onClick\": { \"action\": { \"functionName\": \"goToView\", \"parameters\": [ { \"key\": \"viewType\", \"value\": \"SETTING\" } ], \"loadIndicator\": \"LoadIndicator.SPINNER\" } } }, { \"actionLabel\": \"Send Feedback\", \"onClick\": { \"openLink\": { \"url\": \"https://example.com/feedback\" } } } ] ```",
          "type": "array",
          "items": {
            "$ref": "GoogleAppsCardV1CardAction"
          }
        },
        "name": {
          "description": "Name of the card. Used as a card identifier in card navigation. [Google Workspace Add-ons](https://developers.google.com/workspace/add-ons):",
          "type": "string"
        },
        "fixedFooter": {
          "description": "The fixed footer shown at the bottom of this card. Setting `fixedFooter` without specifying a `primaryButton` or a `secondaryButton` causes an error. For Chat apps, you can use fixed footers in [dialogs](https://developers.google.com/workspace/chat/dialogs), but not [card messages](https://developers.google.com/workspace/chat/create-messages#create). [Google Workspace Add-ons and Chat apps](https://developers.google.com/workspace/extend):",
          "$ref": "GoogleAppsCardV1CardFixedFooter"
        },
        "displayStyle": {
          "description": "In Google Workspace Add-ons, sets the display properties of the `peekCardHeader`. [Google Workspace Add-ons](https://developers.google.com/workspace/add-ons):",
          "type": "string",
          "enumDescriptions": [
            "Don't use. Unspecified.",
            "The header of the card appears at the bottom of the sidebar, partially covering the current top card of the stack. Clicking the header pops the card into the card stack. If the card has no header, a generated header is used instead.",
            "Default value. The card is shown by replacing the view of the top card in the card stack."
          ],
          "enum": [
            "DISPLAY_STYLE_UNSPECIFIED",
            "PEEK",
            "REPLACE"
          ]
        },
        "peekCardHeader": {
          "description": "When displaying contextual content, the peek card header acts as a placeholder so that the user can navigate forward between the homepage cards and the contextual cards. [Google Workspace Add-ons](https://developers.google.com/workspace/add-ons):",
          "$ref": "GoogleAppsCardV1CardHeader"
        }
      }
    },
    "GoogleAppsCardV1CardHeader": {
      "id": "GoogleAppsCardV1CardHeader",
      "description": "Represents a card header. For an example in Google Chat apps, see [Add a header](https://developers.google.com/workspace/chat/design-components-card-dialog#add_a_header). [Google Workspace Add-ons and Chat apps](https://developers.google.com/workspace/extend):",
      "type": "object",
      "properties": {
        "title": {
          "description": "Required. The title of the card header. The header has a fixed height: if both a title and subtitle are specified, each takes up one line. If only the title is specified, it takes up both lines.",
          "type": "string"
        },
        "subtitle": {
          "description": "The subtitle of the card header. If specified, appears on its own line below the `title`.",
          "type": "string"
        },
        "imageType": {
          "description": "The shape used to crop the image. [Google Workspace Add-ons and Chat apps](https://developers.google.com/workspace/extend):",
          "type": "string",
          "enumDescriptions": [
            "Default value. Applies a square mask to the image. For example, a 4x3 image becomes 3x3.",
            "Applies a circular mask to the image. For example, a 4x3 image becomes a circle with a diameter of 3."
          ],
          "enum": [
            "SQUARE",
            "CIRCLE"
          ]
        },
        "imageUrl": {
          "description": "The HTTPS URL of the image in the card header.",
          "type": "string"
        },
        "imageAltText": {
          "description": "The alternative text of this image that's used for accessibility.",
          "type": "string"
        }
      }
    },
    "GoogleAppsCardV1Section": {
      "id": "GoogleAppsCardV1Section",
      "description": "A section contains a collection of widgets that are rendered vertically in the order that they're specified. [Google Workspace Add-ons and Chat apps](https://developers.google.com/workspace/extend):",
      "type": "object",
      "properties": {
        "header": {
          "description": "Text that appears at the top of a section. Supports simple HTML formatted text. For more information about formatting text, see [Formatting text in Google Chat apps](https://developers.google.com/workspace/chat/format-messages#card-formatting) and [Formatting text in Google Workspace Add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting).",
          "type": "string"
        },
        "widgets": {
          "description": "All the widgets in the section. Must contain at least one widget.",
          "type": "array",
          "items": {
            "$ref": "GoogleAppsCardV1Widget"
          }
        },
        "collapsible": {
          "description": "Indicates whether this section is collapsible. Collapsible sections hide some or all widgets, but users can expand the section to reveal the hidden widgets by clicking **Show more**. Users can hide the widgets again by clicking **Show less**. To determine which widgets are hidden, specify `uncollapsibleWidgetsCount`.",
          "type": "boolean"
        },
        "uncollapsibleWidgetsCount": {
          "description": "The number of uncollapsible widgets which remain visible even when a section is collapsed. For example, when a section contains five widgets and the `uncollapsibleWidgetsCount` is set to `2`, the first two widgets are always shown and the last three are collapsed by default. The `uncollapsibleWidgetsCount` is taken into account only when `collapsible` is `true`.",
          "type": "integer",
          "format": "int32"
        }
      }
    },
    "GoogleAppsCardV1Widget": {
      "id": "GoogleAppsCardV1Widget",
      "description": "Each card is made up of widgets. A widget is a composite object that can represent one of text, images, buttons, and other object types.",
      "type": "object",
      "properties": {
        "textParagraph": {
          "description": "Displays a text paragraph. Supports simple HTML formatted text. For more information about formatting text, see [Formatting text in Google Chat apps](https://developers.google.com/workspace/chat/format-messages#card-formatting) and [Formatting text in Google Workspace Add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting). For example, the following JSON creates a bolded text: ``` \"textParagraph\": { \"text\": \" *bold text*\" } ```",
          "$ref": "GoogleAppsCardV1TextParagraph"
        },
        "image": {
          "description": "Displays an image. For example, the following JSON creates an image with alternative text: ``` \"image\": { \"imageUrl\": \"https://developers.google.com/workspace/chat/images/quickstart-app-avatar.png\", \"altText\": \"Chat app avatar\" } ```",
          "$ref": "GoogleAppsCardV1Image"
        },
        "decoratedText": {
          "description": "Displays a decorated text item. For example, the following JSON creates a decorated text widget showing email address: ``` \"decoratedText\": { \"icon\": { \"knownIcon\": \"EMAIL\" }, \"topLabel\": \"Email Address\", \"text\": \"sasha@example.com\", \"bottomLabel\": \"This is a new Email address!\", \"switchControl\": { \"name\": \"has_send_welcome_email_to_sasha\", \"selected\": false, \"controlType\": \"CHECKBOX\" } } ```",
          "$ref": "GoogleAppsCardV1DecoratedText"
        },
        "buttonList": {
          "description": "A list of buttons. For example, the following JSON creates two buttons. The first is a blue text button and the second is an image button that opens a link: ``` \"buttonList\": { \"buttons\": [ { \"text\": \"Edit\", \"color\": { \"red\": 0, \"green\": 0, \"blue\": 1, \"alpha\": 1 }, \"disabled\": true, }, { \"icon\": { \"knownIcon\": \"INVITE\", \"altText\": \"check calendar\" }, \"onClick\": { \"openLink\": { \"url\": \"https://example.com/calendar\" } } } ] } ```",
          "$ref": "GoogleAppsCardV1ButtonList"
        },
        "textInput": {
          "description": "Displays a text box that users can type into. For example, the following JSON creates a text input for an email address: ``` \"textInput\": { \"name\": \"mailing_address\", \"label\": \"Mailing Address\" } ``` As another example, the following JSON creates a text input for a programming language with static suggestions: ``` \"textInput\": { \"name\": \"preferred_programing_language\", \"label\": \"Preferred Language\", \"initialSuggestions\": { \"items\": [ { \"text\": \"C++\" }, { \"text\": \"Java\" }, { \"text\": \"JavaScript\" }, { \"text\": \"Python\" } ] } } ```",
          "$ref": "GoogleAppsCardV1TextInput"
        },
        "selectionInput": {
          "description": "Displays a selection control that lets users select items. Selection controls can be checkboxes, radio buttons, switches, or dropdown menus. For example, the following JSON creates a dropdown menu that lets users choose a size: ``` \"selectionInput\": { \"name\": \"size\", \"label\": \"Size\" \"type\": \"DROPDOWN\", \"items\": [ { \"text\": \"S\", \"value\": \"small\", \"selected\": false }, { \"text\": \"M\", \"value\": \"medium\", \"selected\": true }, { \"text\": \"L\", \"value\": \"large\", \"selected\": false }, { \"text\": \"XL\", \"value\": \"extra_large\", \"selected\": false } ] } ```",
          "$ref": "GoogleAppsCardV1SelectionInput"
        },
        "dateTimePicker": {
          "description": "Displays a widget that lets users input a date, time, or date and time. For example, the following JSON creates a date time picker to schedule an appointment: ``` \"dateTimePicker\": { \"name\": \"appointment_time\", \"label\": \"Book your appointment at:\", \"type\": \"DATE_AND_TIME\", \"valueMsEpoch\": \"796435200000\" } ```",
          "$ref": "GoogleAppsCardV1DateTimePicker"
        },
        "divider": {
          "description": "Displays a horizontal line divider between widgets. For example, the following JSON creates a divider: ``` \"divider\": { } ```",
          "$ref": "GoogleAppsCardV1Divider"
        },
        "grid": {
          "description": "Displays a grid with a collection of items. A grid supports any number of columns and items. The number of rows is determined by the upper bounds of the number items divided by the number of columns. A grid with 10 items and 2 columns has 5 rows. A grid with 11 items and 2 columns has 6 rows. [Google Workspace Add-ons and Chat apps](https://developers.google.com/workspace/extend): For example, the following JSON creates a 2 column grid with a single item: ``` \"grid\": { \"title\": \"A fine collection of items\", \"columnCount\": 2, \"borderStyle\": { \"type\": \"STROKE\", \"cornerRadius\": 4 }, \"items\": [ { \"image\": { \"imageUri\": \"https://www.example.com/image.png\", \"cropStyle\": { \"type\": \"SQUARE\" }, \"borderStyle\": { \"type\": \"STROKE\" } }, \"title\": \"An item\", \"textAlignment\": \"CENTER\" } ], \"onClick\": { \"openLink\": { \"url\": \"https://www.example.com\" } } } ```",
          "$ref": "GoogleAppsCardV1Grid"
        },
        "columns": {
          "description": "Displays up to 2 columns. To include more than 2 columns, or to use rows, use the `Grid` widget. For example, the following JSON creates 2 columns that each contain text paragraphs: ``` \"columns\": { \"columnItems\": [ { \"horizontalSizeStyle\": \"FILL_AVAILABLE_SPACE\", \"horizontalAlignment\": \"CENTER\", \"verticalAlignment\": \"CENTER\", \"widgets\": [ { \"textParagraph\": { \"text\": \"First column text paragraph\" } } ] }, { \"horizontalSizeStyle\": \"FILL_AVAILABLE_SPACE\", \"horizontalAlignment\": \"CENTER\", \"verticalAlignment\": \"CENTER\", \"widgets\": [ { \"textParagraph\": { \"text\": \"Second column text paragraph\" } } ] } ] } ```",
          "$ref": "GoogleAppsCardV1Columns"
        },
        "horizontalAlignment": {
          "description": "Specifies whether widgets align to the left, right, or center of a column.",
          "type": "string",
          "enumDescriptions": [
            "Don't use. Unspecified.",
            "Default value. Aligns widgets to the start position of the column. For left-to-right layouts, aligns to the left. For right-to-left layouts, aligns to the right.",
            "Aligns widgets to the center of the column.",
            "Aligns widgets to the end position of the column. For left-to-right layouts, aligns widgets to the right. For right-to-left layouts, aligns widgets to the left."
          ],
          "enum": [
            "HORIZONTAL_ALIGNMENT_UNSPECIFIED",
            "START",
            "CENTER",
            "END"
          ]
        }
      }
    },
    "GoogleAppsCardV1TextParagraph": {
      "id": "GoogleAppsCardV1TextParagraph",
      "description": "A paragraph of text that supports formatting. For an example in Google Chat apps, see [Add a paragraph of formatted text](https://developers.google.com/workspace/chat/add-text-image-card-dialog#add_a_paragraph_of_formatted_text). For more information about formatting text, see [Formatting text in Google Chat apps](https://developers.google.com/workspace/chat/format-messages#card-formatting) and [Formatting text in Google Workspace Add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting). [Google Workspace Add-ons and Chat apps](https://developers.google.com/workspace/extend):",
      "type": "object",
      "properties": {
        "text": {
          "description": "The text that's shown in the widget.",
          "type": "string"
        }
      }
    },
    "GoogleAppsCardV1Image": {
      "id": "GoogleAppsCardV1Image",
      "description": "An image that is specified by a URL and can have an `onClick` action. For an example, see [Add an image](https://developers.google.com/workspace/chat/add-text-image-card-dialog#add_an_image). [Google Workspace Add-ons and Chat apps](https://developers.google.com/workspace/extend):",
      "type": "object",
      "properties": {
        "imageUrl": {
          "description": "The HTTPS URL that hosts the image. For example: ``` https://developers.google.com/workspace/chat/images/quickstart-app-avatar.png ```",
          "type": "string"
        },
        "onClick": {
          "description": "When a user clicks the image, the click triggers this action.",
          "$ref": "GoogleAppsCardV1OnClick"
        },
        "altText": {
          "description": "The alternative text of this image that's used for accessibility.",
          "type": "string"
        }
      }
    },
    "GoogleAppsCardV1OnClick": {
      "id": "GoogleAppsCardV1OnClick",
      "description": "Represents how to respond when users click an interactive element on a card, such as a button. [Google Workspace Add-ons and Chat apps](https://developers.google.com/workspace/extend):",
      "type": "object",
      "properties": {
        "action": {
          "description": "If specified, an action is triggered by this `onClick`.",
          "$ref": "GoogleAppsCardV1Action"
        },
        "openLink": {
          "description": "If specified, this `onClick` triggers an open link action.",
          "$ref": "GoogleAppsCardV1OpenLink"
        },
        "openDynamicLinkAction": {
          "description": "An add-on triggers this action when the action needs to open a link. This differs from the `open_link` above in that this needs to talk to server to get the link. Thus some preparation work is required for web client to do before the open link action response comes back. [Google Workspace Add-ons](https://developers.google.com/workspace/add-ons):",
          "$ref": "GoogleAppsCardV1Action"
        },
        "card": {
          "description": "A new card is pushed to the card stack after clicking if specified. [Google Workspace Add-ons](https://developers.google.com/workspace/add-ons):",
          "$ref": "GoogleAppsCardV1Card"
        }
      }
    },
    "GoogleAppsCardV1Action": {
      "id": "GoogleAppsCardV1Action",
      "description": "An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace Add-ons and Chat apps](https://developers.google.com/workspace/extend):",
      "type": "object",
      "properties": {
        "function": {
          "description": "A custom function to invoke when the containing element is clicked or otherwise activated. For example usage, see [Read form data](https://developers.google.com/workspace/chat/read-form-data).",
          "type": "string"
        },
        "parameters": {
          "description": "List of action parameters.",
          "type": "array",
          "items": {
            "$ref": "GoogleAppsCardV1ActionParameter"
          }
        },
        "loadIndicator": {
          "description": "Specifies the loading indicator that the action displays while making the call to the action.",
          "type": "string",
          "enumDescriptions": [
            "Displays a spinner to indicate that content is loading.",
            "Nothing is displayed."
          ],
          "enum": [
            "SPINNER",
            "NONE"
          ]
        },
        "persistValues": {
          "description": "Indicates whether form values persist after the action. The default value is `false`. If `true`, form values remain after the action is triggered. To let the user make changes while the action is being processed, set [`LoadIndicator`](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) to `NONE`. For [card messages](https://developers.google.com/workspace/chat/api/guides/v1/messages/create#create) in Chat apps, you must also set the action's [`ResponseType`](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.messages#responsetype) to `UPDATE_MESSAGE` and use the same [`card_id`](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.messages#CardWithId) from the card that contained the action. If `false`, the form values are cleared when the action is triggered. To prevent the user from making changes while the action is being processed, set [`LoadIndicator`](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) to `SPINNER`.",
          "type": "boolean"
        },
        "interaction": {
          "description": "Optional. Required when opening a [dialog](https://developers.google.com/workspace/chat/dialogs). What to do in response to an interaction with a user, such as a user clicking a button in a card message. If unspecified, the app responds by executing an `action`—like opening a link or running a function—as normal. By specifying an `interaction`, the app can respond in special interactive ways. For example, by setting `interaction` to `OPEN_DIALOG`, the app can open a [dialog](https://developers.google.com/workspace/chat/dialogs). When specified, a loading indicator isn't shown. If specified for an add-on, the entire card is stripped and nothing is shown in the client. [Google Chat apps](https://developers.google.com/workspace/chat):",
          "type": "string",
          "enumDescriptions": [
            "Default value. The `action` executes as normal.",
            "Opens a [dialog](https://developers.google.com/workspace/chat/dialogs), a windowed, card-based interface that Chat apps use to interact with users. Only supported by Chat apps in response to button-clicks on card messages. If specified for an add-on, the entire card is stripped and nothing is shown in the client. [Google Chat apps](https://developers.google.com/workspace/chat):"
          ],
          "enum": [
            "INTERACTION_UNSPECIFIED",
            "OPEN_DIALOG"
          ]
        },
        "requiredWidgets": {
          "description": "[Developer Preview](https://developers.google.com/workspace/preview): Optional. Fill this list with the names of widgets that this Action needs for a valid submission. If the widgets listed here don't have a value when this Action is invoked, the form submission is aborted. [Google Workspace Add-ons and Chat apps](https://developers.google.com/workspace/extend):",
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "allWidgetsAreRequired": {
          "description": "[Developer Preview](https://developers.google.com/workspace/preview): Optional. If this is true, then all widgets are considered required by this action. [Google Workspace Add-ons and Chat apps](https://developers.google.com/workspace/extend):",
          "type": "boolean"
        }
      }
    },
    "GoogleAppsCardV1ActionParameter": {
      "id": "GoogleAppsCardV1ActionParameter",
      "description": "List of string parameters to supply when the action method is invoked. For example, consider three snooze buttons: snooze now, snooze one day, or snooze next week. You might use `action method = snooze()`, passing the snooze type and snooze time in the list of string parameters. To learn more, see [`CommonEventObject`](https://developers.google.com/workspace/chat/api/reference/rest/v1/Event#commoneventobject). [Google Workspace Add-ons and Chat apps](https://developers.google.com/workspace/extend):",
      "type": "object",
      "properties": {
        "key": {
          "description": "The name of the parameter for the action script.",
          "type": "string"
        },
        "value": {
          "description": "The value of the parameter.",
          "type": "string"
        }
      }
    },
    "GoogleAppsCardV1OpenLink": {
      "id": "GoogleAppsCardV1OpenLink",
      "description": "Represents an `onClick` event that opens a hyperlink. [Google Workspace Add-ons and Chat apps](https://developers.google.com/workspace/extend):",
      "type": "object",
      "properties": {
        "url": {
          "description": "The URL to open.",
          "type": "string"
        },
        "openAs": {
          "description": "How to open a link. [Google Workspace Add-ons](https://developers.google.com/workspace/add-ons):",
          "type": "string",
          "enumDescriptions": [
            "The link opens as a full-size window (if that's the frame used by the client).",
            "The link opens as an overlay, such as a pop-up."
          ],
          "enum": [
            "FULL_SIZE",
            "OVERLAY"
          ]
        },
        "onClose": {
          "description": "Whether the client forgets about a link after opening it, or observes it until the window closes. [Google Workspace Add-ons](https://developers.google.com/workspace/add-ons):",
          "type": "string",
          "enumDescriptions": [
            "Default value. The card doesn't reload; nothing happens.",
            "Reloads the card after the child window closes. If used in conjunction with [`OpenAs.OVERLAY`](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#openas), the child window acts as a modal dialog and the parent card is blocked until the child window closes."
          ],
          "enum": [
            "NOTHING",
            "RELOAD"
          ]
        }
      }
    },
    "GoogleAppsCardV1DecoratedText": {
      "id": "GoogleAppsCardV1DecoratedText",
      "description": "A widget that displays text with optional decorations such as a label above or below the text, an icon in front of the text, a selection widget, or a button after the text. For an example in Google Chat apps, see [Display text with decorative text](https://developers.google.com/workspace/chat/add-text-image-card-dialog#display_text_with_decorative_elements). [Google Workspace Add-ons and Chat apps](https://developers.google.com/workspace/extend):",
      "type": "object",
      "properties": {
        "icon": {
          "description": "Deprecated in favor of `startIcon`.",
          "deprecated": true,
          "$ref": "GoogleAppsCardV1Icon"
        },
        "startIcon": {
          "description": "The icon displayed in front of the text.",
          "$ref": "GoogleAppsCardV1Icon"
        },
        "topLabel": {
          "description": "The text that appears above `text`. Always truncates.",
          "type": "string"
        },
        "text": {
          "description": "Required. The primary text. Supports simple formatting. For more information about formatting text, see [Formatting text in Google Chat apps](https://developers.google.com/workspace/chat/format-messages#card-formatting) and [Formatting text in Google Workspace Add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting).",
          "type": "string"
        },
        "wrapText": {
          "description": "The wrap text setting. If `true`, the text wraps and displays on multiple lines. Otherwise, the text is truncated. Only applies to `text`, not `topLabel` and `bottomLabel`.",
          "type": "boolean"
        },
        "bottomLabel": {
          "description": "The text that appears below `text`. Always wraps.",
          "type": "string"
        },
        "onClick": {
          "description": "This action is triggered when users click `topLabel` or `bottomLabel`.",
          "$ref": "GoogleAppsCardV1OnClick"
        },
        "button": {
          "description": "A button that a user can click to trigger an action.",
          "$ref": "GoogleAppsCardV1Button"
        },
        "switchControl": {
          "description": "A switch widget that a user can click to change its state and trigger an action.",
          "$ref": "GoogleAppsCardV1SwitchControl"
        },
        "endIcon": {
          "description": "An icon displayed after the text. Supports [built-in](https://developers.google.com/workspace/chat/format-messages#builtinicons) and [custom](https://developers.google.com/workspace/chat/format-messages#customicons) icons.",
          "$ref": "GoogleAppsCardV1Icon"
        }
      }
    },
    "GoogleAppsCardV1Icon": {
      "id": "GoogleAppsCardV1Icon",
      "description": "An icon displayed in a widget on a card. For an example in Google Chat apps, see [Add an icon](https://developers.google.com/workspace/chat/add-text-image-card-dialog#add_an_icon). Supports [built-in](https://developers.google.com/workspace/chat/format-messages#builtinicons) and [custom](https://developers.google.com/workspace/chat/format-messages#customicons) icons. [Google Workspace Add-ons and Chat apps](https://developers.google.com/workspace/extend):",
      "type": "object",
      "properties": {
        "knownIcon": {
          "description": "Display one of the built-in icons provided by Google Workspace. For example, to display an airplane icon, specify `AIRPLANE`. For a bus, specify `BUS`. For a full list of supported icons, see [built-in icons](https://developers.google.com/workspace/chat/format-messages#builtinicons).",
          "type": "string"
        },
        "iconUrl": {
          "description": "Display a custom icon hosted at an HTTPS URL. For example: ``` \"iconUrl\": \"https://developers.google.com/workspace/chat/images/quickstart-app-avatar.png\" ``` Supported file types include `.png` and `.jpg`.",
          "type": "string"
        },
        "materialIcon": {
          "description": "Display one of the [Google Material Icons](https://fonts.google.com/icons). For example, to display a [checkbox icon](https://fonts.google.com/icons?selected=Material%20Symbols%20Outlined%3Acheck_box%3AFILL%400%3Bwght%40400%3BGRAD%400%3Bopsz%4048), use ``` \"material_icon\": { \"name\": \"check_box\" } ``` [Google Chat apps](https://developers.google.com/workspace/chat):",
          "$ref": "GoogleAppsCardV1MaterialIcon"
        },
        "altText": {
          "description": "Optional. A description of the icon used for accessibility. If unspecified, the default value `Button` is provided. As a best practice, you should set a helpful description for what the icon displays, and if applicable, what it does. For example, `A user's account portrait`, or `Opens a new browser tab and navigates to the Google Chat developer documentation at https://developers.google.com/workspace/chat`. If the icon is set in a `Button`, the `altText` appears as helper text when the user hovers over the button. However, if the button also sets `text`, the icon's `altText` is ignored.",
          "type": "string"
        },
        "imageType": {
          "description": "The crop style applied to the image. In some cases, applying a `CIRCLE` crop causes the image to be drawn larger than a built-in icon.",
          "type": "string",
          "enumDescriptions": [
            "Default value. Applies a square mask to the image. For example, a 4x3 image becomes 3x3.",
            "Applies a circular mask to the image. For example, a 4x3 image becomes a circle with a diameter of 3."
          ],
          "enum": [
            "SQUARE",
            "CIRCLE"
          ]
        }
      }
    },
    "GoogleAppsCardV1MaterialIcon": {
      "id": "GoogleAppsCardV1MaterialIcon",
      "description": "A [Google Material Icon](https://fonts.google.com/icons), which includes over 2500+ options. For example, to display a [checkbox icon](https://fonts.google.com/icons?selected=Material%20Symbols%20Outlined%3Acheck_box%3AFILL%400%3Bwght%40400%3BGRAD%400%3Bopsz%4048) with customized weight and grade, write the following: ``` { \"name\": \"check_box\", \"fill\": true, \"weight\": 300, \"grade\": -25 } ``` [Google Chat apps](https://developers.google.com/workspace/chat):",
      "type": "object",
      "properties": {
        "name": {
          "description": "The icon name defined in the [Google Material Icon](https://fonts.google.com/icons), for example, `check_box`. Any invalid names are abandoned and replaced with empty string and results in the icon failing to render.",
          "type": "string"
        },
        "fill": {
          "description": "Whether the icon renders as filled. Default value is false. To preview different icon settings, go to [Google Font Icons](https://fonts.google.com/icons) and adjust the settings under **Customize**.",
          "type": "boolean"
        },
        "weight": {
          "description": "The stroke weight of the icon. Choose from {100, 200, 300, 400, 500, 600, 700}. If absent, default value is 400. If any other value is specified, the default value is used. To preview different icon settings, go to [Google Font Icons](https://fonts.google.com/icons) and adjust the settings under **Customize**.",
          "type": "integer",
          "format": "int32"
        },
        "grade": {
          "description": "Weight and grade affect a symbol’s thickness. Adjustments to grade are more granular than adjustments to weight and have a small impact on the size of the symbol. Choose from {-25, 0, 200}. If absent, default value is 0. If any other value is specified, the default value is used. To preview different icon settings, go to [Google Font Icons](https://fonts.google.com/icons) and adjust the settings under **Customize**.",
          "type": "integer",
          "format": "int32"
        }
      }
    },
    "GoogleAppsCardV1Button": {
      "id": "GoogleAppsCardV1Button",
      "description": "A text, icon, or text and icon button that users can click. For an example in Google Chat apps, see [Add a button](https://developers.google.com/workspace/chat/design-interactive-card-dialog#add_a_button). To make an image a clickable button, specify an `Image` (not an `ImageComponent`) and set an `onClick` action. [Google Workspace Add-ons and Chat apps](https://developers.google.com/workspace/extend):",
      "type": "object",
      "properties": {
        "text": {
          "description": "The text displayed inside the button.",
          "type": "string"
        },
        "icon": {
          "description": "The icon image. If both `icon` and `text` are set, then the icon appears before the text.",
          "$ref": "GoogleAppsCardV1Icon"
        },
        "color": {
          "description": "If set, the button is filled with a solid background color and the font color changes to maintain contrast with the background color. For example, setting a blue background likely results in white text. If unset, the image background is white and the font color is blue. For red, green, and blue, the value of each field is a `float` number that you can express in either of two ways: as a number between 0 and 255 divided by 255 (153/255), or as a value between 0 and 1 (0.6). 0 represents the absence of a color and 1 or 255/255 represent the full presence of that color on the RGB scale. Optionally set `alpha`, which sets a level of transparency using this equation: ``` pixel color = alpha * (this color) + (1.0 - alpha) * (background color) ``` For `alpha`, a value of `1` corresponds with a solid color, and a value of `0` corresponds with a completely transparent color. For example, the following color represents a half transparent red: ``` \"color\": { \"red\": 1, \"green\": 0, \"blue\": 0, \"alpha\": 0.5 } ```",
          "$ref": "Color"
        },
        "onClick": {
          "description": "Required. The action to perform when a user clicks the button, such as opening a hyperlink or running a custom function.",
          "$ref": "GoogleAppsCardV1OnClick"
        },
        "disabled": {
          "description": "If `true`, the button is displayed in an inactive state and doesn't respond to user actions.",
          "type": "boolean"
        },
        "altText": {
          "description": "The alternative text that's used for accessibility. Set descriptive text that lets users know what the button does. For example, if a button opens a hyperlink, you might write: \"Opens a new browser tab and navigates to the Google Chat developer documentation at https://developers.google.com/workspace/chat\".",
          "type": "string"
        }
      }
    },
    "Color": {
      "id": "Color",
      "description": "Represents a color in the RGBA color space. This representation is designed for simplicity of conversion to and from color representations in various languages over compactness. For example, the fields of this representation can be trivially provided to the constructor of `java.awt.Color` in Java; it can also be trivially provided to UIColor's `+colorWithRed:green:blue:alpha` method in iOS; and, with just a little work, it can be easily formatted into a CSS `rgba()` string in JavaScript. This reference page doesn't have information about the absolute color space that should be used to interpret the RGB value—for example, sRGB, Adobe RGB, DCI-P3, and BT.2020. By default, applications should assume the sRGB color space. When color equality needs to be decided, implementations, unless documented otherwise, treat two colors as equal if all their red, green, blue, and alpha values each differ by at most `1e-5`. Example (Java): import com.google.type.Color; // ... public static java.awt.Color fromProto(Color protocolor) { float alpha = protocolor.hasAlpha() ? protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); } public static Color toProto(java.awt.Color color) { float red = (float) color.getRed(); float green = (float) color.getGreen(); float blue = (float) color.getBlue(); float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue / denominator); int alpha = color.getAlpha(); if (alpha != 255) { result.setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .build()); } return resultBuilder.build(); } // ... Example (iOS / Obj-C): // ... static UIColor* fromProto(Color* protocolor) { float red = [protocolor red]; float green = [protocolor green]; float blue = [protocolor blue]; FloatValue* alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper != nil) { alpha = [alpha_wrapper value]; } return [UIColor colorWithRed:red green:green blue:blue alpha:alpha]; } static Color* toProto(UIColor* color) { CGFloat red, green, blue, alpha; if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) { return nil; } Color* result = [[Color alloc] init]; [result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha \u003c= 0.9999) { [result setAlpha:floatWrapperWithValue(alpha)]; } [result autorelease]; return result; } // ... Example (JavaScript): // ... var protoToCssColor = function(rgb_color) { var redFrac = rgb_color.red || 0.0; var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0; var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255); var blue = Math.floor(blueFrac * 255); if (!('alpha' in rgb_color)) { return rgbToCssColor(red, green, blue); } var alphaFrac = rgb_color.alpha.value || 0.0; var rgbParams = [red, green, blue].join(','); return ['rgba(', rgbParams, ',', alphaFrac, ')'].join(''); }; var rgbToCssColor = function(red, green, blue) { var rgbNumber = new Number((red \u003c\u003c 16) | (green \u003c\u003c 8) | blue); var hexString = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var resultBuilder = ['#']; for (var i = 0; i \u003c missingZeros; i++) { resultBuilder.push('0'); } resultBuilder.push(hexString); return resultBuilder.join(''); }; // ...",
      "type": "object",
      "properties": {
        "red": {
          "description": "The amount of red in the color as a value in the interval [0, 1].",
          "type": "number",
          "format": "float"
        },
        "green": {
          "description": "The amount of green in the color as a value in the interval [0, 1].",
          "type": "number",
          "format": "float"
        },
        "blue": {
          "description": "The amount of blue in the color as a value in the interval [0, 1].",
          "type": "number",
          "format": "float"
        },
        "alpha": {
          "description": "The fraction of this color that should be applied to the pixel. That is, the final pixel color is defined by the equation: `pixel color = alpha * (this color) + (1.0 - alpha) * (background color)` This means that a value of 1.0 corresponds to a solid color, whereas a value of 0.0 corresponds to a completely transparent color. This uses a wrapper message rather than a simple float scalar so that it is possible to distinguish between a default value and the value being unset. If omitted, this color object is rendered as a solid color (as if the alpha value had been explicitly given a value of 1.0).",
          "type": "number",
          "format": "float"
        }
      }
    },
    "GoogleAppsCardV1SwitchControl": {
      "id": "GoogleAppsCardV1SwitchControl",
      "description": "Either a toggle-style switch or a checkbox inside a `decoratedText` widget. [Google Workspace Add-ons and Chat apps](https://developers.google.com/workspace/extend): Only supported in the `decoratedText` widget.",
      "type": "object",
      "properties": {
        "name": {
          "description": "The name by which the switch widget is identified in a form input event. For details about working with form inputs, see [Receive form data](https://developers.google.com/workspace/chat/read-form-data).",
          "type": "string"
        },
        "value": {
          "description": "The value entered by a user, returned as part of a form input event. For details about working with form inputs, see [Receive form data](https://developers.google.com/workspace/chat/read-form-data).",
          "type": "string"
        },
        "selected": {
          "description": "When `true`, the switch is selected.",
          "type": "boolean"
        },
        "onChangeAction": {
          "description": "The action to perform when the switch state is changed, such as what function to run.",
          "$ref": "GoogleAppsCardV1Action"
        },
        "controlType": {
          "description": "How the switch appears in the user interface. [Google Workspace Add-ons and Chat apps](https://developers.google.com/workspace/extend):",
          "type": "string",
          "enumDescriptions": [
            "A toggle-style switch.",
            "Deprecated in favor of `CHECK_BOX`.",
            "A checkbox."
          ],
          "enum": [
            "SWITCH",
            "CHECKBOX",
            "CHECK_BOX"
          ]
        }
      }
    },
    "GoogleAppsCardV1ButtonList": {
      "id": "GoogleAppsCardV1ButtonList",
      "description": "A list of buttons layed out horizontally. For an example in Google Chat apps, see [Add a button](https://developers.google.com/workspace/chat/design-interactive-card-dialog#add_a_button). [Google Workspace Add-ons and Chat apps](https://developers.google.com/workspace/extend):",
      "type": "object",
      "properties": {
        "buttons": {
          "description": "An array of buttons.",
          "type": "array",
          "items": {
            "$ref": "GoogleAppsCardV1Button"
          }
        }
      }
    },
    "GoogleAppsCardV1TextInput": {
      "id": "GoogleAppsCardV1TextInput",
      "description": "A field in which users can enter text. Supports suggestions and on-change actions. For an example in Google Chat apps, see [Add a field in which a user can enter text](https://developers.google.com/workspace/chat/design-interactive-card-dialog#add_a_field_in_which_a_user_can_enter_text). Chat apps receive and can process the value of entered text during form input events. For details about working with form inputs, see [Receive form data](https://developers.google.com/workspace/chat/read-form-data). When you need to collect undefined or abstract data from users, use a text input. To collect defined or enumerated data from users, use the SelectionInput widget. [Google Workspace Add-ons and Chat apps](https://developers.google.com/workspace/extend):",
      "type": "object",
      "properties": {
        "name": {
          "description": "The name by which the text input is identified in a form input event. For details about working with form inputs, see [Receive form data](https://developers.google.com/workspace/chat/read-form-data).",
          "type": "string"
        },
        "label": {
          "description": "The text that appears above the text input field in the user interface. Specify text that helps the user enter the information your app needs. For example, if you are asking someone's name, but specifically need their surname, write `surname` instead of `name`. Required if `hintText` is unspecified. Otherwise, optional.",
          "type": "string"
        },
        "hintText": {
          "description": "Text that appears below the text input field meant to assist users by prompting them to enter a certain value. This text is always visible. Required if `label` is unspecified. Otherwise, optional.",
          "type": "string"
        },
        "value": {
          "description": "The value entered by a user, returned as part of a form input event. For details about working with form inputs, see [Receive form data](https://developers.google.com/workspace/chat/read-form-data).",
          "type": "string"
        },
        "type": {
          "description": "How a text input field appears in the user interface. For example, whether the field is single or multi-line.",
          "type": "string",
          "enumDescriptions": [
            "The text input field has a fixed height of one line.",
            "The text input field has a fixed height of multiple lines."
          ],
          "enum": [
            "SINGLE_LINE",
            "MULTIPLE_LINE"
          ]
        },
        "onChangeAction": {
          "description": "What to do when a change occurs in the text input field. For example, a user adding to the field or deleting text. Examples of actions to take include running a custom function or opening a [dialog](https://developers.google.com/workspace/chat/dialogs) in Google Chat.",
          "$ref": "GoogleAppsCardV1Action"
        },
        "initialSuggestions": {
          "description": "Suggested values that users can enter. These values appear when users click inside the text input field. As users type, the suggested values dynamically filter to match what the users have typed. For example, a text input field for programming language might suggest Java, JavaScript, Python, and C++. When users start typing `Jav`, the list of suggestions filters to show just `Java` and `JavaScript`. Suggested values help guide users to enter values that your app can make sense of. When referring to JavaScript, some users might enter `javascript` and others `java script`. Suggesting `JavaScript` can standardize how users interact with your app. When specified, `TextInput.type` is always `SINGLE_LINE`, even if it's set to `MULTIPLE_LINE`. [Google Workspace Add-ons and Chat apps](https://developers.google.com/workspace/extend):",
          "$ref": "GoogleAppsCardV1Suggestions"
        },
        "autoCompleteAction": {
          "description": "Optional. Specify what action to take when the text input field provides suggestions to users who interact with it. If unspecified, the suggestions are set by `initialSuggestions` and are processed by the client. If specified, the app takes the action specified here, such as running a custom function. [Google Workspace Add-ons](https://developers.google.com/workspace/add-ons):",
          "$ref": "GoogleAppsCardV1Action"
        },
        "validation": {
          "description": "[Developer Preview](https://developers.google.com/workspace/preview): Specify the validation necessary for this text input field. [Google Workspace Add-ons and Chat apps](https://developers.google.com/workspace/extend):",
          "$ref": "GoogleAppsCardV1Validation"
        },
        "placeholderText": {
          "description": "Text that appears in the text input field when the field is empty. Use this text to prompt users to enter a value. For example, `Enter a number from 0 to 100`. [Google Chat apps](https://developers.google.com/workspace/chat):",
          "type": "string"
        }
      }
    },
    "GoogleAppsCardV1Suggestions": {
      "id": "GoogleAppsCardV1Suggestions",
      "description": "Suggested values that users can enter. These values appear when users click inside the text input field. As users type, the suggested values dynamically filter to match what the users have typed. For example, a text input field for programming language might suggest Java, JavaScript, Python, and C++. When users start typing `Jav`, the list of suggestions filters to show `Java` and `JavaScript`. Suggested values help guide users to enter values that your app can make sense of. When referring to JavaScript, some users might enter `javascript` and others `java script`. Suggesting `JavaScript` can standardize how users interact with your app. When specified, `TextInput.type` is always `SINGLE_LINE`, even if it's set to `MULTIPLE_LINE`. [Google Workspace Add-ons and Chat apps](https://developers.google.com/workspace/extend):",
      "type": "object",
      "properties": {
        "items": {
          "description": "A list of suggestions used for autocomplete recommendations in text input fields.",
          "type": "array",
          "items": {
            "$ref": "GoogleAppsCardV1SuggestionItem"
          }
        }
      }
    },
    "GoogleAppsCardV1SuggestionItem": {
      "id": "GoogleAppsCardV1SuggestionItem",
      "description": "One suggested value that users can enter in a text input field. [Google Workspace Add-ons and Chat apps](https://developers.google.com/workspace/extend):",
      "type": "object",
      "properties": {
        "text": {
          "description": "The value of a suggested input to a text input field. This is equivalent to what users enter themselves.",
          "type": "string"
        }
      }
    },
    "GoogleAppsCardV1Validation": {
      "id": "GoogleAppsCardV1Validation",
      "description": "[Developer Preview](https://developers.google.com/workspace/preview): Represents the necessary data for validating the widget it's attached to. [Google Workspace Add-ons and Chat apps](https://developers.google.com/workspace/extend):",
      "type": "object",
      "properties": {
        "characterLimit": {
          "description": "[Developer Preview](https://developers.google.com/workspace/preview): Specify the character limit for text input widgets. Note that this is only used for text input and is ignored for other widgets. [Google Workspace Add-ons and Chat apps](https://developers.google.com/workspace/extend):",
          "type": "integer",
          "format": "int32"
        },
        "inputType": {
          "description": "[Developer Preview](https://developers.google.com/workspace/preview): Specify the type of the input widgets. [Google Workspace Add-ons and Chat apps](https://developers.google.com/workspace/extend):",
          "type": "string",
          "enumDescriptions": [
            "Unspecified type. Do not use.",
            "Regular text that accepts all characters.",
            "An integer value.",
            "A float value.",
            "An email address.",
            "A emoji selected from system-provided emoji picker."
          ],
          "enum": [
            "INPUT_TYPE_UNSPECIFIED",
            "TEXT",
            "INTEGER",
            "FLOAT",
            "EMAIL",
            "EMOJI_PICKER"
          ]
        }
      }
    },
    "GoogleAppsCardV1SelectionInput": {
      "id": "GoogleAppsCardV1SelectionInput",
      "description": "A widget that creates one or more UI items that users can select. For example, a dropdown menu or checkboxes. You can use this widget to collect data that can be predicted or enumerated. For an example in Google Chat apps, see [Add selectable UI elements](/workspace/chat/design-interactive-card-dialog#add_selectable_ui_elements). Chat apps can process the value of items that users select or input. For details about working with form inputs, see [Receive form data](https://developers.google.com/workspace/chat/read-form-data). To collect undefined or abstract data from users, use the TextInput widget. [Google Workspace Add-ons and Chat apps](https://developers.google.com/workspace/extend):",
      "type": "object",
      "properties": {
        "name": {
          "description": "The name that identifies the selection input in a form input event. For details about working with form inputs, see [Receive form data](https://developers.google.com/workspace/chat/read-form-data).",
          "type": "string"
        },
        "label": {
          "description": "The text that appears above the selection input field in the user interface. Specify text that helps the user enter the information your app needs. For example, if users are selecting the urgency of a work ticket from a drop-down menu, the label might be \"Urgency\" or \"Select urgency\".",
          "type": "string"
        },
        "type": {
          "description": "The type of items that are displayed to users in a `SelectionInput` widget. Selection types support different types of interactions. For example, users can select one or more checkboxes, but they can only select one value from a dropdown menu.",
          "type": "string",
          "enumDescriptions": [
            "A set of checkboxes. Users can select one or more checkboxes.",
            "A set of radio buttons. Users can select one radio button.",
            "A set of switches. Users can turn on one or more switches.",
            "A dropdown menu. Users can select one item from the menu.",
            "A multiselect menu for static or dynamic data. From the menu bar, users select one or more items. Users can also input values to populate dynamic data. For example, users can start typing the name of a Google Chat space and the widget autosuggests the space. To populate items for a multiselect menu, you can use one of the following types of data sources: * Static data: Items are specified as `SelectionItem` objects in the widget. Up to 100 items. * Google Workspace data: Items are populated using data from Google Workspace, such as Google Workspace users or Google Chat spaces. * External data: Items are populated from an external data source outside of Google Workspace. For examples of how to implement multiselect menus, see [Add a multiselect menu](https://developers.google.com/workspace/chat/design-interactive-card-dialog#multiselect-menu). [Google Workspace Add-ons and Chat apps](https://developers.google.com/workspace/extend): Multiselect for Google Workspace Add-ons are in Developer Preview."
          ],
          "enum": [
            "CHECK_BOX",
            "RADIO_BUTTON",
            "SWITCH",
            "DROPDOWN",
            "MULTI_SELECT"
          ]
        },
        "items": {
          "description": "An array of selectable items. For example, an array of radio buttons or checkboxes. Supports up to 100 items.",
          "type": "array",
          "items": {
            "$ref": "GoogleAppsCardV1SelectionItem"
          }
        },
        "onChangeAction": {
          "description": "If specified, the form is submitted when the selection changes. If not specified, you must specify a separate button that submits the form. For details about working with form inputs, see [Receive form data](https://developers.google.com/workspace/chat/read-form-data).",
          "$ref": "GoogleAppsCardV1Action"
        },
        "multiSelectMaxSelectedItems": {
          "description": "For multiselect menus, the maximum number of items that a user can select. Minimum value is 1 item. If unspecified, defaults to 3 items.",
          "type": "integer",
          "format": "int32"
        },
        "multiSelectMinQueryLength": {
          "description": "For multiselect menus, the number of text characters that a user inputs before the app queries autocomplete and displays suggested items in the menu. If unspecified, defaults to 0 characters for static data sources and 3 characters for external data sources.",
          "type": "integer",
          "format": "int32"
        },
        "externalDataSource": {
          "description": "An external data source, such as a relational data base.",
          "$ref": "GoogleAppsCardV1Action"
        },
        "platformDataSource": {
          "description": "A data source from Google Workspace.",
          "$ref": "GoogleAppsCardV1PlatformDataSource"
        },
        "validation": {
          "description": "[Developer Preview](https://developers.google.com/workspace/preview). For dropdown menus, the validation for this selection input field. [Google Workspace Add-ons and Chat apps](https://developers.google.com/workspace/extend):",
          "$ref": "GoogleAppsCardV1Validation"
        }
      }
    },
    "GoogleAppsCardV1SelectionItem": {
      "id": "GoogleAppsCardV1SelectionItem",
      "description": "An item that users can select in a selection input, such as a checkbox or switch. [Google Workspace Add-ons and Chat apps](https://developers.google.com/workspace/extend):",
      "type": "object",
      "properties": {
        "text": {
          "description": "The text that identifies or describes the item to users.",
          "type": "string"
        },
        "value": {
          "description": "The value associated with this item. The client should use this as a form input value. For details about working with form inputs, see [Receive form data](https://developers.google.com/workspace/chat/read-form-data).",
          "type": "string"
        },
        "selected": {
          "description": "Whether the item is selected by default. If the selection input only accepts one value (such as for radio buttons or a dropdown menu), only set this field for one item.",
          "type": "boolean"
        },
        "startIconUri": {
          "description": "For multiselect menus, the URL for the icon displayed next to the item's `text` field. Supports PNG and JPEG files. Must be an `HTTPS` URL. For example, `https://developers.google.com/workspace/chat/images/quickstart-app-avatar.png`.",
          "type": "string"
        },
        "bottomText": {
          "description": "For multiselect menus, a text description or label that's displayed below the item's `text` field.",
          "type": "string"
        }
      }
    },
    "GoogleAppsCardV1PlatformDataSource": {
      "id": "GoogleAppsCardV1PlatformDataSource",
      "description": "For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Workspace. Used to populate items in a multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat):",
      "type": "object",
      "properties": {
        "commonDataSource": {
          "description": "A data source shared by all Google Workspace applications, such as users in a Google Workspace organization.",
          "type": "string",
          "enumDescriptions": [
            "Default value. Don't use.",
            "Google Workspace users. The user can only view and select users from their Google Workspace organization."
          ],
          "enum": [
            "UNKNOWN",
            "USER"
          ]
        },
        "hostAppDataSource": {
          "description": "A data source that's unique to a Google Workspace host application, such spaces in Google Chat.",
          "$ref": "HostAppDataSourceMarkup"
        }
      }
    },
    "HostAppDataSourceMarkup": {
      "id": "HostAppDataSourceMarkup",
      "description": "For a `SelectionInput` widget that uses a multiselect menu, a data source from a Google Workspace application. The data source populates selection items for the multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat):",
      "type": "object",
      "properties": {
        "chatDataSource": {
          "description": "A data source from Google Chat.",
          "$ref": "ChatClientDataSourceMarkup"
        }
      }
    },
    "ChatClientDataSourceMarkup": {
      "id": "ChatClientDataSourceMarkup",
      "description": "For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat):",
      "type": "object",
      "properties": {
        "spaceDataSource": {
          "description": "Google Chat spaces that the user is a member of.",
          "$ref": "SpaceDataSource"
        }
      }
    },
    "SpaceDataSource": {
      "id": "SpaceDataSource",
      "description": "A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat):",
      "type": "object",
      "properties": {
        "defaultToCurrentSpace": {
          "description": "If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.",
          "type": "boolean"
        }
      }
    },
    "GoogleAppsCardV1DateTimePicker": {
      "id": "GoogleAppsCardV1DateTimePicker",
      "description": "Lets users input a date, a time, or both a date and a time. For an example in Google Chat apps, see [Let a user pick a date and time](https://developers.google.com/workspace/chat/design-interactive-card-dialog#let_a_user_pick_a_date_and_time). Users can input text or use the picker to select dates and times. If users input an invalid date or time, the picker shows an error that prompts users to input the information correctly. [Google Workspace Add-ons and Chat apps](https://developers.google.com/workspace/extend):",
      "type": "object",
      "properties": {
        "name": {
          "description": "The name by which the `DateTimePicker` is identified in a form input event. For details about working with form inputs, see [Receive form data](https://developers.google.com/workspace/chat/read-form-data).",
          "type": "string"
        },
        "label": {
          "description": "The text that prompts users to input a date, a time, or a date and time. For example, if users are scheduling an appointment, use a label such as `Appointment date` or `Appointment date and time`.",
          "type": "string"
        },
        "type": {
          "description": "Whether the widget supports inputting a date, a time, or the date and time.",
          "type": "string",
          "enumDescriptions": [
            "Users input a date and time.",
            "Users input a date.",
            "Users input a time."
          ],
          "enum": [
            "DATE_AND_TIME",
            "DATE_ONLY",
            "TIME_ONLY"
          ]
        },
        "valueMsEpoch": {
          "description": "The default value displayed in the widget, in milliseconds since [Unix epoch time](https://en.wikipedia.org/wiki/Unix_time). Specify the value based on the type of picker (`DateTimePickerType`): * `DATE_AND_TIME`: a calendar date and time in UTC. For example, to represent January 1, 2023 at 12:00 PM UTC, use `1672574400000`. * `DATE_ONLY`: a calendar date at 00:00:00 UTC. For example, to represent January 1, 2023, use `1672531200000`. * `TIME_ONLY`: a time in UTC. For example, to represent 12:00 PM, use `43200000` (or `12 * 60 * 60 * 1000`).",
          "type": "string",
          "format": "int64"
        },
        "timezoneOffsetDate": {
          "description": "The number representing the time zone offset from UTC, in minutes. If set, the `value_ms_epoch` is displayed in the specified time zone. If unset, the value defaults to the user's time zone setting.",
          "type": "integer",
          "format": "int32"
        },
        "onChangeAction": {
          "description": "Triggered when the user clicks **Save** or **Clear** from the `DateTimePicker` interface.",
          "$ref": "GoogleAppsCardV1Action"
        },
        "validation": {
          "description": "[Developer Preview](https://developers.google.com/workspace/preview). Optional. Specify the validation required for this datetimer picker. [Google Workspace Add-ons and Chat apps](https://developers.google.com/workspace/extend):",
          "$ref": "GoogleAppsCardV1Validation"
        }
      }
    },
    "GoogleAppsCardV1Divider": {
      "id": "GoogleAppsCardV1Divider",
      "description": "Displays a divider between widgets as a horizontal line. For an example in Google Chat apps, see [Add a horizontal divider between widgets](https://developers.google.com/workspace/chat/format-structure-card-dialog#add_a_horizontal_divider_between_widgets). [Google Workspace Add-ons and Chat apps](https://developers.google.com/workspace/extend): For example, the following JSON creates a divider: ``` \"divider\": {} ```",
      "type": "object",
      "properties": {}
    },
    "GoogleAppsCardV1Grid": {
      "id": "GoogleAppsCardV1Grid",
      "description": "Displays a grid with a collection of items. Items can only include text or images. For responsive columns, or to include more than text or images, use `Columns`. For an example in Google Chat apps, see [Display a Grid with a collection of items](https://developers.google.com/workspace/chat/format-structure-card-dialog#display_a_grid_with_a_collection_of_items). A grid supports any number of columns and items. The number of rows is determined by items divided by columns. A grid with 10 items and 2 columns has 5 rows. A grid with 11 items and 2 columns has 6 rows. [Google Workspace Add-ons and Chat apps](https://developers.google.com/workspace/extend): For example, the following JSON creates a 2 column grid with a single item: ``` \"grid\": { \"title\": \"A fine collection of items\", \"columnCount\": 2, \"borderStyle\": { \"type\": \"STROKE\", \"cornerRadius\": 4 }, \"items\": [ { \"image\": { \"imageUri\": \"https://www.example.com/image.png\", \"cropStyle\": { \"type\": \"SQUARE\" }, \"borderStyle\": { \"type\": \"STROKE\" } }, \"title\": \"An item\", \"textAlignment\": \"CENTER\" } ], \"onClick\": { \"openLink\": { \"url\": \"https://www.example.com\" } } } ```",
      "type": "object",
      "properties": {
        "title": {
          "description": "The text that displays in the grid header.",
          "type": "string"
        },
        "items": {
          "description": "The items to display in the grid.",
          "type": "array",
          "items": {
            "$ref": "GoogleAppsCardV1GridItem"
          }
        },
        "borderStyle": {
          "description": "The border style to apply to each grid item.",
          "$ref": "GoogleAppsCardV1BorderStyle"
        },
        "columnCount": {
          "description": "The number of columns to display in the grid. A default value is used if this field isn't specified, and that default value is different depending on where the grid is shown (dialog versus companion).",
          "type": "integer",
          "format": "int32"
        },
        "onClick": {
          "description": "This callback is reused by each individual grid item, but with the item's identifier and index in the items list added to the callback's parameters.",
          "$ref": "GoogleAppsCardV1OnClick"
        }
      }
    },
    "GoogleAppsCardV1GridItem": {
      "id": "GoogleAppsCardV1GridItem",
      "description": "Represents an item in a grid layout. Items can contain text, an image, or both text and an image. [Google Workspace Add-ons and Chat apps](https://developers.google.com/workspace/extend):",
      "type": "object",
      "properties": {
        "id": {
          "description": "A user-specified identifier for this grid item. This identifier is returned in the parent grid's `onClick` callback parameters.",
          "type": "string"
        },
        "image": {
          "description": "The image that displays in the grid item.",
          "$ref": "GoogleAppsCardV1ImageComponent"
        },
        "title": {
          "description": "The grid item's title.",
          "type": "string"
        },
        "subtitle": {
          "description": "The grid item's subtitle.",
          "type": "string"
        },
        "layout": {
          "description": "The layout to use for the grid item.",
          "type": "string",
          "enumDescriptions": [
            "Don't use. Unspecified.",
            "The title and subtitle are shown below the grid item's image.",
            "The title and subtitle are shown above the grid item's image."
          ],
          "enum": [
            "GRID_ITEM_LAYOUT_UNSPECIFIED",
            "TEXT_BELOW",
            "TEXT_ABOVE"
          ]
        }
      }
    },
    "GoogleAppsCardV1ImageComponent": {
      "id": "GoogleAppsCardV1ImageComponent",
      "description": "Represents an image. [Google Workspace Add-ons and Chat apps](https://developers.google.com/workspace/extend):",
      "type": "object",
      "properties": {
        "imageUri": {
          "description": "The image URL.",
          "type": "string"
        },
        "altText": {
          "description": "The accessibility label for the image.",
          "type": "string"
        },
        "cropStyle": {
          "description": "The crop style to apply to the image.",
          "$ref": "GoogleAppsCardV1ImageCropStyle"
        },
        "borderStyle": {
          "description": "The border style to apply to the image.",
          "$ref": "GoogleAppsCardV1BorderStyle"
        }
      }
    },
    "GoogleAppsCardV1ImageCropStyle": {
      "id": "GoogleAppsCardV1ImageCropStyle",
      "description": "Represents the crop style applied to an image. [Google Workspace Add-ons and Chat apps](https://developers.google.com/workspace/extend): For example, here's how to apply a 16:9 aspect ratio: ``` cropStyle { \"type\": \"RECTANGLE_CUSTOM\", \"aspectRatio\": 16/9 } ```",
      "type": "object",
      "properties": {
        "type": {
          "description": "The crop type.",
          "type": "string",
          "enumDescriptions": [
            "Don't use. Unspecified.",
            "Default value. Applies a square crop.",
            "Applies a circular crop.",
            "Applies a rectangular crop with a custom aspect ratio. Set the custom aspect ratio with `aspectRatio`.",
            "Applies a rectangular crop with a 4:3 aspect ratio."
          ],
          "enum": [
            "IMAGE_CROP_TYPE_UNSPECIFIED",
            "SQUARE",
            "CIRCLE",
            "RECTANGLE_CUSTOM",
            "RECTANGLE_4_3"
          ]
        },
        "aspectRatio": {
          "description": "The aspect ratio to use if the crop type is `RECTANGLE_CUSTOM`. For example, here's how to apply a 16:9 aspect ratio: ``` cropStyle { \"type\": \"RECTANGLE_CUSTOM\", \"aspectRatio\": 16/9 } ```",
          "type": "number",
          "format": "double"
        }
      }
    },
    "GoogleAppsCardV1BorderStyle": {
      "id": "GoogleAppsCardV1BorderStyle",
      "description": "The style options for the border of a card or widget, including the border type and color. [Google Workspace Add-ons and Chat apps](https://developers.google.com/workspace/extend):",
      "type": "object",
      "properties": {
        "type": {
          "description": "The border type.",
          "type": "string",
          "enumDescriptions": [
            "Don't use. Unspecified.",
            "Default value. No border.",
            "Outline."
          ],
          "enum": [
            "BORDER_TYPE_UNSPECIFIED",
            "NO_BORDER",
            "STROKE"
          ]
        },
        "strokeColor": {
          "description": "The colors to use when the type is `BORDER_TYPE_STROKE`.",
          "$ref": "Color"
        },
        "cornerRadius": {
          "description": "The corner radius for the border.",
          "type": "integer",
          "format": "int32"
        }
      }
    },
    "GoogleAppsCardV1Columns": {
      "id": "GoogleAppsCardV1Columns",
      "description": "The `Columns` widget displays up to 2 columns in a card or dialog. You can add widgets to each column; the widgets appear in the order that they are specified. For an example in Google Chat apps, see [Display cards and dialogs in columns](https://developers.google.com/workspace/chat/format-structure-card-dialog#display_cards_and_dialogs_in_columns). The height of each column is determined by the taller column. For example, if the first column is taller than the second column, both columns have the height of the first column. Because each column can contain a different number of widgets, you can't define rows or align widgets between the columns. Columns are displayed side-by-side. You can customize the width of each column using the `HorizontalSizeStyle` field. If the user's screen width is too narrow, the second column wraps below the first: * On web, the second column wraps if the screen width is less than or equal to 480 pixels. * On iOS devices, the second column wraps if the screen width is less than or equal to 300 pt. * On Android devices, the second column wraps if the screen width is less than or equal to 320 dp. To include more than 2 columns, or to use rows, use the `Grid` widget. [Google Workspace Add-ons and Chat apps](https://developers.google.com/workspace/extend): Columns for Google Workspace Add-ons are in Developer Preview.",
      "type": "object",
      "properties": {
        "columnItems": {
          "description": "An array of columns. You can include up to 2 columns in a card or dialog.",
          "type": "array",
          "items": {
            "$ref": "GoogleAppsCardV1Column"
          }
        }
      }
    },
    "GoogleAppsCardV1Column": {
      "id": "GoogleAppsCardV1Column",
      "description": "A column. [Google Workspace Add-ons and Chat apps](https://developers.google.com/workspace/extend): Columns for Google Workspace Add-ons are in Developer Preview.",
      "type": "object",
      "properties": {
        "horizontalSizeStyle": {
          "description": "Specifies how a column fills the width of the card.",
          "type": "string",
          "enumDescriptions": [
            "Don't use. Unspecified.",
            "Default value. Column fills the available space, up to 70% of the card's width. If both columns are set to `FILL_AVAILABLE_SPACE`, each column fills 50% of the space.",
            "Column fills the least amount of space possible and no more than 30% of the card's width."
          ],
          "enum": [
            "HORIZONTAL_SIZE_STYLE_UNSPECIFIED",
            "FILL_AVAILABLE_SPACE",
            "FILL_MINIMUM_SPACE"
          ]
        },
        "horizontalAlignment": {
          "description": "Specifies whether widgets align to the left, right, or center of a column.",
          "type": "string",
          "enumDescriptions": [
            "Don't use. Unspecified.",
            "Default value. Aligns widgets to the start position of the column. For left-to-right layouts, aligns to the left. For right-to-left layouts, aligns to the right.",
            "Aligns widgets to the center of the column.",
            "Aligns widgets to the end position of the column. For left-to-right layouts, aligns widgets to the right. For right-to-left layouts, aligns widgets to the left."
          ],
          "enum": [
            "HORIZONTAL_ALIGNMENT_UNSPECIFIED",
            "START",
            "CENTER",
            "END"
          ]
        },
        "verticalAlignment": {
          "description": "Specifies whether widgets align to the top, bottom, or center of a column.",
          "type": "string",
          "enumDescriptions": [
            "Don't use. Unspecified.",
            "Default value. Aligns widgets to the center of a column.",
            "Aligns widgets to the top of a column.",
            "Aligns widgets to the bottom of a column."
          ],
          "enum": [
            "VERTICAL_ALIGNMENT_UNSPECIFIED",
            "CENTER",
            "TOP",
            "BOTTOM"
          ]
        },
        "widgets": {
          "description": "An array of widgets included in a column. Widgets appear in the order that they are specified.",
          "type": "array",
          "items": {
            "$ref": "GoogleAppsCardV1Widgets"
          }
        }
      }
    },
    "GoogleAppsCardV1Widgets": {
      "id": "GoogleAppsCardV1Widgets",
      "description": "The supported widgets that you can include in a column. [Google Workspace Add-ons and Chat apps](https://developers.google.com/workspace/extend): Columns for Google Workspace Add-ons are in Developer Preview.",
      "type": "object",
      "properties": {
        "textParagraph": {
          "description": "TextParagraph widget.",
          "$ref": "GoogleAppsCardV1TextParagraph"
        },
        "image": {
          "description": "Image widget.",
          "$ref": "GoogleAppsCardV1Image"
        },
        "decoratedText": {
          "description": "DecoratedText widget.",
          "$ref": "GoogleAppsCardV1DecoratedText"
        },
        "buttonList": {
          "description": "ButtonList widget.",
          "$ref": "GoogleAppsCardV1ButtonList"
        },
        "textInput": {
          "description": "TextInput widget.",
          "$ref": "GoogleAppsCardV1TextInput"
        },
        "selectionInput": {
          "description": "SelectionInput widget.",
          "$ref": "GoogleAppsCardV1SelectionInput"
        },
        "dateTimePicker": {
          "description": "DateTimePicker widget.",
          "$ref": "GoogleAppsCardV1DateTimePicker"
        }
      }
    },
    "GoogleAppsCardV1CardAction": {
      "id": "GoogleAppsCardV1CardAction",
      "description": "A card action is the action associated with the card. For example, an invoice card might include actions such as delete invoice, email invoice, or open the invoice in a browser. [Google Workspace Add-ons](https://developers.google.com/workspace/add-ons):",
      "type": "object",
      "properties": {
        "actionLabel": {
          "description": "The label that displays as the action menu item.",
          "type": "string"
        },
        "onClick": {
          "description": "The `onClick` action for this action item.",
          "$ref": "GoogleAppsCardV1OnClick"
        }
      }
    },
    "GoogleAppsCardV1CardFixedFooter": {
      "id": "GoogleAppsCardV1CardFixedFooter",
      "description": "A persistent (sticky) footer that that appears at the bottom of the card. Setting `fixedFooter` without specifying a `primaryButton` or a `secondaryButton` causes an error. For Chat apps, you can use fixed footers in [dialogs](https://developers.google.com/workspace/chat/dialogs), but not [card messages](https://developers.google.com/workspace/chat/create-messages#create). For an example in Google Chat apps, see [Add a persistent footer](https://developers.google.com/workspace/chat/design-components-card-dialog#add_a_persistent_footer). [Google Workspace Add-ons and Chat apps](https://developers.google.com/workspace/extend):",
      "type": "object",
      "properties": {
        "primaryButton": {
          "description": "The primary button of the fixed footer. The button must be a text button with text and color set.",
          "$ref": "GoogleAppsCardV1Button"
        },
        "secondaryButton": {
          "description": "The secondary button of the fixed footer. The button must be a text button with text and color set. If `secondaryButton` is set, you must also set `primaryButton`.",
          "$ref": "GoogleAppsCardV1Button"
        }
      }
    },
    "Annotation": {
      "id": "Annotation",
      "description": "Output only. Annotations associated with the plain-text body of the message. To add basic formatting to a text message, see [Format text messages](https://developers.google.com/workspace/chat/format-messages). Example plain-text message body: ``` Hello @FooBot how are you!\" ``` The corresponding annotations metadata: ``` \"annotations\":[{ \"type\":\"USER_MENTION\", \"startIndex\":6, \"length\":7, \"userMention\": { \"user\": { \"name\":\"users/{user}\", \"displayName\":\"FooBot\", \"avatarUrl\":\"https://goo.gl/aeDtrS\", \"type\":\"BOT\" }, \"type\":\"MENTION\" } }] ```",
      "type": "object",
      "properties": {
        "type": {
          "description": "The type of this annotation.",
          "type": "string",
          "enumDescriptions": [
            "Default value for the enum. Don't use.",
            "A user is mentioned.",
            "A slash command is invoked.",
            "A rich link annotation."
          ],
          "enum": [
            "ANNOTATION_TYPE_UNSPECIFIED",
            "USER_MENTION",
            "SLASH_COMMAND",
            "RICH_LINK"
          ]
        },
        "startIndex": {
          "description": "Start index (0-based, inclusive) in the plain-text message body this annotation corresponds to.",
          "type": "integer",
          "format": "int32"
        },
        "length": {
          "description": "Length of the substring in the plain-text message body this annotation corresponds to.",
          "type": "integer",
          "format": "int32"
        },
        "userMention": {
          "description": "The metadata of user mention.",
          "$ref": "UserMentionMetadata"
        },
        "slashCommand": {
          "description": "The metadata for a slash command.",
          "$ref": "SlashCommandMetadata"
        },
        "richLinkMetadata": {
          "description": "The metadata for a rich link.",
          "$ref": "RichLinkMetadata"
        }
      }
    },
    "UserMentionMetadata": {
      "id": "UserMentionMetadata",
      "description": "Annotation metadata for user mentions (@).",
      "type": "object",
      "properties": {
        "user": {
          "description": "The user mentioned.",
          "$ref": "User"
        },
        "type": {
          "description": "The type of user mention.",
          "type": "string",
          "enumDescriptions": [
            "Default value for the enum. Don't use.",
            "Add user to space.",
            "Mention user in space."
          ],
          "enum": [
            "TYPE_UNSPECIFIED",
            "ADD",
            "MENTION"
          ]
        }
      }
    },
    "SlashCommandMetadata": {
      "id": "SlashCommandMetadata",
      "description": "Annotation metadata for slash commands (/).",
      "type": "object",
      "properties": {
        "bot": {
          "description": "The Chat app whose command was invoked.",
          "$ref": "User"
        },
        "type": {
          "description": "The type of slash command.",
          "type": "string",
          "enumDescriptions": [
            "Default value for the enum. Don't use.",
            "Add Chat app to space.",
            "Invoke slash command in space."
          ],
          "enum": [
            "TYPE_UNSPECIFIED",
            "ADD",
            "INVOKE"
          ]
        },
        "commandName": {
          "description": "The name of the invoked slash command.",
          "type": "string"
        },
        "commandId": {
          "description": "The command ID of the invoked slash command.",
          "type": "string",
          "format": "int64"
        },
        "triggersDialog": {
          "description": "Indicates whether the slash command is for a dialog.",
          "type": "boolean"
        }
      }
    },
    "RichLinkMetadata": {
      "id": "RichLinkMetadata",
      "description": "A rich link to a resource.",
      "type": "object",
      "properties": {
        "uri": {
          "description": "The URI of this link.",
          "type": "string"
        },
        "richLinkType": {
          "description": "The rich link type.",
          "type": "string",
          "enumDescriptions": [
            "Default value for the enum. Don't use.",
            "A Google Drive rich link type."
          ],
          "enum": [
            "RICH_LINK_TYPE_UNSPECIFIED",
            "DRIVE_FILE"
          ]
        },
        "driveLinkData": {
          "description": "Data for a drive link.",
          "$ref": "DriveLinkData"
        }
      }
    },
    "DriveLinkData": {
      "id": "DriveLinkData",
      "description": "Data for Google Drive links.",
      "type": "object",
      "properties": {
        "driveDataRef": {
          "description": "A [DriveDataRef](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.messages.attachments#drivedataref) which references a Google Drive file.",
          "$ref": "DriveDataRef"
        },
        "mimeType": {
          "description": "The mime type of the linked Google Drive resource.",
          "type": "string"
        }
      }
    },
    "DriveDataRef": {
      "id": "DriveDataRef",
      "description": "A reference to the data of a drive attachment.",
      "type": "object",
      "properties": {
        "driveFileId": {
          "description": "The ID for the drive file. Use with the Drive API.",
          "type": "string"
        }
      }
    },
    "Thread": {
      "id": "Thread",
      "description": "A thread in a Google Chat space. For example usage, see [Start or reply to a message thread](https://developers.google.com/workspace/chat/create-messages#create-message-thread). If you specify a thread when creating a message, you can set the [`messageReplyOption`](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.messages/create#messagereplyoption) field to determine what happens if no matching thread is found.",
      "type": "object",
      "properties": {
        "name": {
          "description": "Output only. Resource name of the thread. Example: `spaces/{space}/threads/{thread}`",
          "type": "string"
        },
        "threadKey": {
          "description": "Optional. Input for creating or updating a thread. Otherwise, output only. ID for the thread. Supports up to 4000 characters. This ID is unique to the Chat app that sets it. For example, if multiple Chat apps create a message using the same thread key, the messages are posted in different threads. To reply in a thread created by a person or another Chat app, specify the thread `name` field instead.",
          "type": "string"
        }
      }
    },
    "Space": {
      "id": "Space",
      "description": "A space in Google Chat. Spaces are conversations between two or more users or 1:1 messages between a user and a Chat app.",
      "type": "object",
      "properties": {
        "name": {
          "description": "Resource name of the space. Format: `spaces/{space}`",
          "type": "string"
        },
        "type": {
          "description": "Output only. Deprecated: Use `space_type` instead. The type of a space.",
          "readOnly": true,
          "deprecated": true,
          "type": "string",
          "enumDescriptions": [
            "Reserved.",
            "Conversations between two or more humans.",
            "1:1 Direct Message between a human and a Chat app, where all messages are flat. Note that this doesn't include direct messages between two humans."
          ],
          "enum": [
            "TYPE_UNSPECIFIED",
            "ROOM",
            "DM"
          ]
        },
        "spaceType": {
          "description": "The type of space. Required when creating a space or updating the space type of a space. Output only for other usage.",
          "type": "string",
          "enumDescriptions": [
            "Reserved.",
            "A place where people send messages, share files, and collaborate. A `SPACE` can include Chat apps.",
            "Group conversations between 3 or more people. A `GROUP_CHAT` can include Chat apps.",
            "1:1 messages between two humans or a human and a Chat app."
          ],
          "enum": [
            "SPACE_TYPE_UNSPECIFIED",
            "SPACE",
            "GROUP_CHAT",
            "DIRECT_MESSAGE"
          ]
        },
        "singleUserBotDm": {
          "description": "Optional. Whether the space is a DM between a Chat app and a single human.",
          "type": "boolean"
        },
        "threaded": {
          "description": "Output only. Deprecated: Use `spaceThreadingState` instead. Whether messages are threaded in this space.",
          "readOnly": true,
          "deprecated": true,
          "type": "boolean"
        },
        "displayName": {
          "description": "The space's display name. Required when [creating a space](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces/create). If you receive the error message `ALREADY_EXISTS` when creating a space or updating the `displayName`, try a different `displayName`. An existing space within the Google Workspace organization might already use this display name. For direct messages, this field might be empty. Supports up to 128 characters.",
          "type": "string"
        },
        "externalUserAllowed": {
          "description": "Immutable. Whether this space permits any Google Chat user as a member. Input when creating a space in a Google Workspace organization. Omit this field when creating spaces in the following conditions: * The authenticated user uses a consumer account (unmanaged user account). By default, a space created by a consumer account permits any Google Chat user. * The space is used to [import data to Google Chat] (https://developers.google.com/chat/api/guides/import-data-overview) because import mode spaces must only permit members from the same Google Workspace organization. However, as part of the [Google Workspace Developer Preview Program](https://developers.google.com/workspace/preview), import mode spaces can permit any Google Chat user so this field can then be set for import mode spaces. For existing spaces, this field is output only.",
          "type": "boolean"
        },
        "spaceThreadingState": {
          "description": "Output only. The threading state in the Chat space.",
          "readOnly": true,
          "type": "string",
          "enumDescriptions": [
            "Reserved.",
            "Named spaces that support message threads. When users respond to a message, they can reply in-thread, which keeps their response in the context of the original message.",
            "Named spaces where the conversation is organized by topic. Topics and their replies are grouped together.",
            "Direct messages (DMs) between two people and group conversations between 3 or more people."
          ],
          "enum": [
            "SPACE_THREADING_STATE_UNSPECIFIED",
            "THREADED_MESSAGES",
            "GROUPED_MESSAGES",
            "UNTHREADED_MESSAGES"
          ]
        },
        "spaceDetails": {
          "description": "Details about the space including description and rules.",
          "$ref": "SpaceDetails"
        },
        "spaceHistoryState": {
          "description": "The message history state for messages and threads in this space.",
          "type": "string",
          "enumDescriptions": [
            "Default value. Do not use.",
            "History off. [Messages and threads are kept for 24 hours](https://support.google.com/chat/answer/7664687).",
            "History on. The organization's [Vault retention rules](https://support.google.com/vault/answer/7657597) specify for how long messages and threads are kept."
          ],
          "enum": [
            "HISTORY_STATE_UNSPECIFIED",
            "HISTORY_OFF",
            "HISTORY_ON"
          ]
        },
        "importMode": {
          "description": "Optional. Whether this space is created in `Import Mode` as part of a data migration into Google Workspace. While spaces are being imported, they aren't visible to users until the import is complete.",
          "type": "boolean"
        },
        "createTime": {
          "description": "Optional. Immutable. For spaces created in Chat, the time the space was created. This field is output only, except when used in import mode spaces. For import mode spaces, set this field to the historical timestamp at which the space was created in the source in order to preserve the original creation time. Only populated in the output when `spaceType` is `GROUP_CHAT` or `SPACE`.",
          "type": "string",
          "format": "google-datetime"
        },
        "lastActiveTime": {
          "description": "Output only. Timestamp of the last message in the space. [Developer Preview](https://developers.google.com/workspace/preview).",
          "readOnly": true,
          "type": "string",
          "format": "google-datetime"
        },
        "adminInstalled": {
          "description": "Output only. For direct message (DM) spaces with a Chat app, whether the space was created by a Google Workspace administrator. Administrators can install and set up a direct message with a Chat app on behalf of users in their organization. To support admin install, your Chat app must feature direct messaging.",
          "readOnly": true,
          "type": "boolean"
        },
        "membershipCount": {
          "description": "Output only. The count of joined memberships grouped by member type. Populated when the `space_type` is `SPACE`, `DIRECT_MESSAGE` or `GROUP_CHAT`. [Developer Preview](https://developers.google.com/workspace/preview).",
          "readOnly": true,
          "$ref": "MembershipCount"
        },
        "accessSettings": {
          "description": "Optional. Specifies the [access setting](https://support.google.com/chat/answer/11971020) of the space. Only populated when the `space_type` is `SPACE`. [Developer Preview](https://developers.google.com/workspace/preview).",
          "$ref": "AccessSettings"
        },
        "spaceUri": {
          "description": "Output only. The URI of the space. [Developer Preview](https://developers.google.com/workspace/preview).",
          "readOnly": true,
          "type": "string"
        }
      }
    },
    "SpaceDetails": {
      "id": "SpaceDetails",
      "description": "Details about the space including description and rules.",
      "type": "object",
      "properties": {
        "description": {
          "description": "Optional. A description of the space. For example, describe the space's discussion topic, functional purpose, or participants. Supports up to 150 characters.",
          "type": "string"
        },
        "guidelines": {
          "description": "Optional. The space's rules, expectations, and etiquette. Supports up to 5,000 characters.",
          "type": "string"
        }
      }
    },
    "MembershipCount": {
      "id": "MembershipCount",
      "description": "[Developer Preview](https://developers.google.com/workspace/preview). Represents the count of memberships of a space, grouped into categories.",
      "type": "object",
      "properties": {
        "joinedDirectHumanUserCount": {
          "description": "Count of human users that have directly joined the space, not counting users joined by having membership in a joined group.",
          "type": "integer",
          "format": "int32"
        },
        "joinedGroupCount": {
          "description": "Count of all groups that have directly joined the space.",
          "type": "integer",
          "format": "int32"
        }
      }
    },
    "AccessSettings": {
      "id": "AccessSettings",
      "description": "Represents the [access setting](https://support.google.com/chat/answer/11971020) of the space. [Developer Preview](https://developers.google.com/workspace/preview).",
      "type": "object",
      "properties": {
        "accessState": {
          "description": "Output only. Indicates the access state of the space.",
          "readOnly": true,
          "type": "string",
          "enumDescriptions": [
            "Access state is unknown or not supported in this API.",
            "Space is discoverable by added or invited members or groups.",
            "Space is discoverable by the selected [target audience](https://support.google.com/a/answer/9934697), as well as added or invited members or groups."
          ],
          "enum": [
            "ACCESS_STATE_UNSPECIFIED",
            "PRIVATE",
            "DISCOVERABLE"
          ]
        },
        "audience": {
          "description": "Optional. The resource name of the [target audience](https://support.google.com/a/answer/9934697) who can access the space. Set this field to a valid target audience ID to make the space discoverable or use the `audiences/default` alias to set the space with the default access setting in Admin Console, to learn more, see [Make a space discoverable to a target audience](https://developers.google.com/workspace/chat/space-target-audience). Unset this field to make the space restricted. Only populated when the space is discoverable. Format: `audiences/{audience}`, `audiences/default` can be used as the alias of the default Chat [Sharing setting](https://support.google.com/a/answer/12129901).",
          "type": "string"
        }
      }
    },
    "ActionResponse": {
      "id": "ActionResponse",
      "description": "Parameters that a Chat app can use to configure how its response is posted.",
      "type": "object",
      "properties": {
        "type": {
          "description": "Input only. The type of Chat app response.",
          "type": "string",
          "enumDescriptions": [
            "Default type that's handled as `NEW_MESSAGE`.",
            "Post as a new message in the topic.",
            "Update the Chat app's message. This is only permitted on a `CARD_CLICKED` event where the message sender type is `BOT`.",
            "Update the cards on a user's message. This is only permitted as a response to a `MESSAGE` event with a matched url, or a `CARD_CLICKED` event where the message sender type is `HUMAN`. Text is ignored.",
            "Privately ask the user for additional authentication or configuration.",
            "Presents a [dialog](https://developers.google.com/workspace/chat/dialogs).",
            "Widget text autocomplete options query."
          ],
          "enum": [
            "TYPE_UNSPECIFIED",
            "NEW_MESSAGE",
            "UPDATE_MESSAGE",
            "UPDATE_USER_MESSAGE_CARDS",
            "REQUEST_CONFIG",
            "DIALOG",
            "UPDATE_WIDGET"
          ]
        },
        "url": {
          "description": "Input only. URL for users to authenticate or configure. (Only for `REQUEST_CONFIG` response types.)",
          "type": "string"
        },
        "dialogAction": {
          "description": "Input only. A response to an interaction event related to a [dialog](https://developers.google.com/workspace/chat/dialogs). Must be accompanied by `ResponseType.Dialog`.",
          "$ref": "DialogAction"
        },
        "updatedWidget": {
          "description": "Input only. The response of the updated widget.",
          "$ref": "UpdatedWidget"
        }
      }
    },
    "DialogAction": {
      "id": "DialogAction",
      "description": "Contains a [dialog](https://developers.google.com/workspace/chat/dialogs) and request status code.",
      "type": "object",
      "properties": {
        "dialog": {
          "description": "Input only. [Dialog](https://developers.google.com/workspace/chat/dialogs) for the request.",
          "$ref": "Dialog"
        },
        "actionStatus": {
          "description": "Input only. Status for a request to either invoke or submit a [dialog](https://developers.google.com/workspace/chat/dialogs). Displays a status and message to users, if necessary. For example, in case of an error or success.",
          "$ref": "ActionStatus"
        }
      }
    },
    "Dialog": {
      "id": "Dialog",
      "description": "Wrapper around the card body of the dialog.",
      "type": "object",
      "properties": {
        "body": {
          "description": "Input only. Body of the dialog, which is rendered in a modal. Google Chat apps don't support the following card entities: `DateTimePicker`, `OnChangeAction`.",
          "$ref": "GoogleAppsCardV1Card"
        }
      }
    },
    "ActionStatus": {
      "id": "ActionStatus",
      "description": "Represents the status for a request to either invoke or submit a [dialog](https://developers.google.com/workspace/chat/dialogs).",
      "type": "object",
      "properties": {
        "statusCode": {
          "description": "The status code.",
          "type": "string",
          "enumDescriptions": [
            "Not an error; returned on success. HTTP Mapping: 200 OK",
            "The operation was cancelled, typically by the caller. HTTP Mapping: 499 Client Closed Request",
            "Unknown error. For example, this error may be returned when a `Status` value received from another address space belongs to an error space that is not known in this address space. Also errors raised by APIs that do not return enough error information may be converted to this error. HTTP Mapping: 500 Internal Server Error",
            "The client specified an invalid argument. Note that this differs from `FAILED_PRECONDITION`. `INVALID_ARGUMENT` indicates arguments that are problematic regardless of the state of the system (e.g., a malformed file name). HTTP Mapping: 400 Bad Request",
            "The deadline expired before the operation could complete. For operations that change the state of the system, this error may be returned even if the operation has completed successfully. For example, a successful response from a server could have been delayed long enough for the deadline to expire. HTTP Mapping: 504 Gateway Timeout",
            "Some requested entity (e.g., file or directory) was not found. Note to server developers: if a request is denied for an entire class of users, such as gradual feature rollout or undocumented allowlist, `NOT_FOUND` may be used. If a request is denied for some users within a class of users, such as user-based access control, `PERMISSION_DENIED` must be used. HTTP Mapping: 404 Not Found",
            "The entity that a client attempted to create (e.g., file or directory) already exists. HTTP Mapping: 409 Conflict",
            "The caller does not have permission to execute the specified operation. `PERMISSION_DENIED` must not be used for rejections caused by exhausting some resource (use `RESOURCE_EXHAUSTED` instead for those errors). `PERMISSION_DENIED` must not be used if the caller can not be identified (use `UNAUTHENTICATED` instead for those errors). This error code does not imply the request is valid or the requested entity exists or satisfies other pre-conditions. HTTP Mapping: 403 Forbidden",
            "The request does not have valid authentication credentials for the operation. HTTP Mapping: 401 Unauthorized",
            "Some resource has been exhausted, perhaps a per-user quota, or perhaps the entire file system is out of space. HTTP Mapping: 429 Too Many Requests",
            "The operation was rejected because the system is not in a state required for the operation's execution. For example, the directory to be deleted is non-empty, an rmdir operation is applied to a non-directory, etc. Service implementors can use the following guidelines to decide between `FAILED_PRECONDITION`, `ABORTED`, and `UNAVAILABLE`: (a) Use `UNAVAILABLE` if the client can retry just the failing call. (b) Use `ABORTED` if the client should retry at a higher level. For example, when a client-specified test-and-set fails, indicating the client should restart a read-modify-write sequence. (c) Use `FAILED_PRECONDITION` if the client should not retry until the system state has been explicitly fixed. For example, if an \"rmdir\" fails because the directory is non-empty, `FAILED_PRECONDITION` should be returned since the client should not retry unless the files are deleted from the directory. HTTP Mapping: 400 Bad Request",
            "The operation was aborted, typically due to a concurrency issue such as a sequencer check failure or transaction abort. See the guidelines above for deciding between `FAILED_PRECONDITION`, `ABORTED`, and `UNAVAILABLE`. HTTP Mapping: 409 Conflict",
            "The operation was attempted past the valid range. E.g., seeking or reading past end-of-file. Unlike `INVALID_ARGUMENT`, this error indicates a problem that may be fixed if the system state changes. For example, a 32-bit file system will generate `INVALID_ARGUMENT` if asked to read at an offset that is not in the range [0,2^32-1], but it will generate `OUT_OF_RANGE` if asked to read from an offset past the current file size. There is a fair bit of overlap between `FAILED_PRECONDITION` and `OUT_OF_RANGE`. We recommend using `OUT_OF_RANGE` (the more specific error) when it applies so that callers who are iterating through a space can easily look for an `OUT_OF_RANGE` error to detect when they are done. HTTP Mapping: 400 Bad Request",
            "The operation is not implemented or is not supported/enabled in this service. HTTP Mapping: 501 Not Implemented",
            "Internal errors. This means that some invariants expected by the underlying system have been broken. This error code is reserved for serious errors. HTTP Mapping: 500 Internal Server Error",
            "The service is currently unavailable. This is most likely a transient condition, which can be corrected by retrying with a backoff. Note that it is not always safe to retry non-idempotent operations. See the guidelines above for deciding between `FAILED_PRECONDITION`, `ABORTED`, and `UNAVAILABLE`. HTTP Mapping: 503 Service Unavailable",
            "Unrecoverable data loss or corruption. HTTP Mapping: 500 Internal Server Error"
          ],
          "enum": [
            "OK",
            "CANCELLED",
            "UNKNOWN",
            "INVALID_ARGUMENT",
            "DEADLINE_EXCEEDED",
            "NOT_FOUND",
            "ALREADY_EXISTS",
            "PERMISSION_DENIED",
            "UNAUTHENTICATED",
            "RESOURCE_EXHAUSTED",
            "FAILED_PRECONDITION",
            "ABORTED",
            "OUT_OF_RANGE",
            "UNIMPLEMENTED",
            "INTERNAL",
            "UNAVAILABLE",
            "DATA_LOSS"
          ]
        },
        "userFacingMessage": {
          "description": "The message to send users about the status of their request. If unset, a generic message based on the `status_code` is sent.",
          "type": "string"
        }
      }
    },
    "UpdatedWidget": {
      "id": "UpdatedWidget",
      "description": "The response of the updated widget. Used to provide autocomplete options for a widget.",
      "type": "object",
      "properties": {
        "suggestions": {
          "description": "List of widget autocomplete results",
          "$ref": "SelectionItems"
        },
        "widget": {
          "description": "The ID of the updated widget. The ID must match the one for the widget that triggered the update request.",
          "type": "string"
        }
      }
    },
    "SelectionItems": {
      "id": "SelectionItems",
      "description": "List of widget autocomplete results.",
      "type": "object",
      "properties": {
        "items": {
          "description": "An array of the SelectionItem objects.",
          "type": "array",
          "items": {
            "$ref": "GoogleAppsCardV1SelectionItem"
          }
        }
      }
    },
    "SlashCommand": {
      "id": "SlashCommand",
      "description": "A [slash command](https://developers.google.com/workspace/chat/slash-commands) in Google Chat.",
      "type": "object",
      "properties": {
        "commandId": {
          "description": "The ID of the slash command invoked.",
          "type": "string",
          "format": "int64"
        }
      }
    },
    "Attachment": {
      "id": "Attachment",
      "description": "An attachment in Google Chat.",
      "type": "object",
      "properties": {
        "name": {
          "description": "Resource name of the attachment, in the form `spaces/{space}/messages/{message}/attachments/{attachment}`.",
          "type": "string"
        },
        "contentName": {
          "description": "Output only. The original file name for the content, not the full path.",
          "readOnly": true,
          "type": "string"
        },
        "contentType": {
          "description": "Output only. The content type (MIME type) of the file.",
          "readOnly": true,
          "type": "string"
        },
        "attachmentDataRef": {
          "description": "A reference to the attachment data. This field is used with the media API to download the attachment data.",
          "$ref": "AttachmentDataRef"
        },
        "driveDataRef": {
          "description": "Output only. A reference to the Google Drive attachment. This field is used with the Google Drive API.",
          "readOnly": true,
          "$ref": "DriveDataRef"
        },
        "thumbnailUri": {
          "description": "Output only. The thumbnail URL which should be used to preview the attachment to a human user. Chat apps shouldn't use this URL to download attachment content.",
          "readOnly": true,
          "type": "string"
        },
        "downloadUri": {
          "description": "Output only. The download URL which should be used to allow a human user to download the attachment. Chat apps shouldn't use this URL to download attachment content.",
          "readOnly": true,
          "type": "string"
        },
        "source": {
          "description": "Output only. The source of the attachment.",
          "readOnly": true,
          "type": "string",
          "enumDescriptions": [
            "Reserved.",
            "The file is a Google Drive file.",
            "The file is uploaded to Chat."
          ],
          "enum": [
            "SOURCE_UNSPECIFIED",
            "DRIVE_FILE",
            "UPLOADED_CONTENT"
          ]
        }
      }
    },
    "AttachmentDataRef": {
      "id": "AttachmentDataRef",
      "description": "A reference to the attachment data.",
      "type": "object",
      "properties": {
        "resourceName": {
          "description": "The resource name of the attachment data. This field is used with the media API to download the attachment data.",
          "type": "string"
        },
        "attachmentUploadToken": {
          "description": "Opaque token containing a reference to an uploaded attachment. Treated by clients as an opaque string and used to create or update Chat messages with attachments.",
          "type": "string"
        }
      }
    },
    "MatchedUrl": {
      "id": "MatchedUrl",
      "description": "A matched URL in a Chat message. Chat apps can preview matched URLs. For more information, see [Preview links](https://developers.google.com/chat/how-tos/preview-links).",
      "type": "object",
      "properties": {
        "url": {
          "description": "Output only. The URL that was matched.",
          "readOnly": true,
          "type": "string"
        }
      }
    },
    "EmojiReactionSummary": {
      "id": "EmojiReactionSummary",
      "description": "The number of people who reacted to a message with a specific emoji.",
      "type": "object",
      "properties": {
        "emoji": {
          "description": "Emoji associated with the reactions.",
          "$ref": "Emoji"
        },
        "reactionCount": {
          "description": "The total number of reactions using the associated emoji.",
          "type": "integer",
          "format": "int32"
        }
      }
    },
    "Emoji": {
      "id": "Emoji",
      "description": "An emoji that is used as a reaction to a message.",
      "type": "object",
      "properties": {
        "unicode": {
          "description": "A basic emoji represented by a unicode string.",
          "type": "string"
        },
        "customEmoji": {
          "description": "Output only. A custom emoji.",
          "readOnly": true,
          "$ref": "CustomEmoji"
        }
      }
    },
    "CustomEmoji": {
      "id": "CustomEmoji",
      "description": "Represents a custom emoji.",
      "type": "object",
      "properties": {
        "uid": {
          "description": "Output only. Unique key for the custom emoji resource.",
          "readOnly": true,
          "type": "string"
        }
      }
    },
    "DeletionMetadata": {
      "id": "DeletionMetadata",
      "description": "Information about a deleted message. A message is deleted when `delete_time` is set.",
      "type": "object",
      "properties": {
        "deletionType": {
          "description": "Indicates who deleted the message.",
          "type": "string",
          "enumDescriptions": [
            "This value is unused.",
            "User deleted their own message.",
            "The space owner deleted the message.",
            "A Google Workspace admin deleted the message.",
            "A Chat app deleted its own message when it expired.",
            "A Chat app deleted the message on behalf of the user.",
            "A Chat app deleted the message on behalf of the space owner."
          ],
          "enum": [
            "DELETION_TYPE_UNSPECIFIED",
            "CREATOR",
            "SPACE_OWNER",
            "ADMIN",
            "APP_MESSAGE_EXPIRY",
            "CREATOR_VIA_APP",
            "SPACE_OWNER_VIA_APP"
          ]
        }
      }
    },
    "QuotedMessageMetadata": {
      "id": "QuotedMessageMetadata",
      "description": "Information about a quoted message.",
      "type": "object",
      "properties": {
        "name": {
          "description": "Output only. Resource name of the quoted message. Format: `spaces/{space}/messages/{message}`",
          "readOnly": true,
          "type": "string"
        },
        "lastUpdateTime": {
          "description": "Output only. The timestamp when the quoted message was created or when the quoted message was last updated.",
          "readOnly": true,
          "type": "string",
          "format": "google-datetime"
        }
      }
    },
    "AttachedGif": {
      "id": "AttachedGif",
      "description": "A GIF image that's specified by a URL.",
      "type": "object",
      "properties": {
        "uri": {
          "description": "Output only. The URL that hosts the GIF image.",
          "readOnly": true,
          "type": "string"
        }
      }
    },
    "AccessoryWidget": {
      "id": "AccessoryWidget",
      "description": "One or more interactive widgets that appear at the bottom of a message. For details, see [Add interactive widgets at the bottom of a message](https://developers.google.com/workspace/chat/create-messages#add-accessory-widgets).",
      "type": "object",
      "properties": {
        "buttonList": {
          "description": "A list of buttons.",
          "$ref": "GoogleAppsCardV1ButtonList"
        }
      }
    },
    "MessageUpdatedEventData": {
      "id": "MessageUpdatedEventData",
      "description": "Event payload for an updated message. Event type: `google.workspace.chat.message.v1.updated`",
      "type": "object",
      "properties": {
        "message": {
          "description": "The updated message.",
          "$ref": "Message"
        }
      }
    },
    "MessageDeletedEventData": {
      "id": "MessageDeletedEventData",
      "description": "Event payload for a deleted message. Event type: `google.workspace.chat.message.v1.deleted`",
      "type": "object",
      "properties": {
        "message": {
          "description": "The deleted message. Only the `name`, `createTime`, `deleteTime`, and `deletionMetadata` fields are populated.",
          "$ref": "Message"
        }
      }
    },
    "MessageBatchCreatedEventData": {
      "id": "MessageBatchCreatedEventData",
      "description": "Event payload for multiple new messages. Event type: `google.workspace.chat.message.v1.batchCreated`",
      "type": "object",
      "properties": {
        "messages": {
          "description": "A list of new messages.",
          "type": "array",
          "items": {
            "$ref": "MessageCreatedEventData"
          }
        }
      }
    },
    "MessageBatchUpdatedEventData": {
      "id": "MessageBatchUpdatedEventData",
      "description": "Event payload for multiple updated messages. Event type: `google.workspace.chat.message.v1.batchUpdated`",
      "type": "object",
      "properties": {
        "messages": {
          "description": "A list of updated messages.",
          "type": "array",
          "items": {
            "$ref": "MessageUpdatedEventData"
          }
        }
      }
    },
    "MessageBatchDeletedEventData": {
      "id": "MessageBatchDeletedEventData",
      "description": "Event payload for multiple deleted messages. Event type: `google.workspace.chat.message.v1.batchDeleted`",
      "type": "object",
      "properties": {
        "messages": {
          "description": "A list of deleted messages.",
          "type": "array",
          "items": {
            "$ref": "MessageDeletedEventData"
          }
        }
      }
    },
    "SpaceUpdatedEventData": {
      "id": "SpaceUpdatedEventData",
      "description": "Event payload for an updated space. Event type: `google.workspace.chat.space.v1.updated`",
      "type": "object",
      "properties": {
        "space": {
          "description": "The updated space.",
          "$ref": "Space"
        }
      }
    },
    "SpaceBatchUpdatedEventData": {
      "id": "SpaceBatchUpdatedEventData",
      "description": "Event payload for multiple updates to a space. Event type: `google.workspace.chat.space.v1.batchUpdated`",
      "type": "object",
      "properties": {
        "spaces": {
          "description": "A list of updated spaces.",
          "type": "array",
          "items": {
            "$ref": "SpaceUpdatedEventData"
          }
        }
      }
    },
    "MembershipCreatedEventData": {
      "id": "MembershipCreatedEventData",
      "description": "Event payload for a new membership. Event type: `google.workspace.chat.membership.v1.created`.",
      "type": "object",
      "properties": {
        "membership": {
          "description": "The new membership.",
          "$ref": "Membership"
        }
      }
    },
    "Membership": {
      "id": "Membership",
      "description": "Represents a membership relation in Google Chat, such as whether a user or Chat app is invited to, part of, or absent from a space.",
      "type": "object",
      "properties": {
        "name": {
          "description": "Resource name of the membership, assigned by the server. Format: `spaces/{space}/members/{member}`",
          "type": "string"
        },
        "state": {
          "description": "Output only. State of the membership.",
          "readOnly": true,
          "type": "string",
          "enumDescriptions": [
            "Default value. Don't use.",
            "The user is added to the space, and can participate in the space.",
            "The user is invited to join the space, but hasn't joined it.",
            "The user doesn't belong to the space and doesn't have a pending invitation to join the space."
          ],
          "enum": [
            "MEMBERSHIP_STATE_UNSPECIFIED",
            "JOINED",
            "INVITED",
            "NOT_A_MEMBER"
          ]
        },
        "role": {
          "description": "Optional. User's role within a Chat space, which determines their permitted actions in the space. This field can only be used as input in `UpdateMembership`.",
          "type": "string",
          "enumDescriptions": [
            "Default value. For users: they aren't a member of the space, but can be invited. For Google Groups: they're always assigned this role (other enum values might be used in the future).",
            "A member of the space. The user has basic permissions, like sending messages to the space. In 1:1 and unnamed group conversations, everyone has this role.",
            "A space manager. The user has all basic permissions plus administrative permissions that let them manage the space, like adding or removing members. Only supported in SpaceType.SPACE."
          ],
          "enum": [
            "MEMBERSHIP_ROLE_UNSPECIFIED",
            "ROLE_MEMBER",
            "ROLE_MANAGER"
          ]
        },
        "member": {
          "description": "The Google Chat user or app the membership corresponds to. If your Chat app [authenticates as a user](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user), the output populates the [user](https://developers.google.com/workspace/chat/api/reference/rest/v1/User) `name` and `type`.",
          "$ref": "User"
        },
        "groupMember": {
          "description": "The Google Group the membership corresponds to. Only supports read operations. Other operations, like creating or updating a membership, aren't currently supported.",
          "$ref": "Group"
        },
        "createTime": {
          "description": "Optional. Immutable. The creation time of the membership, such as when a member joined or was invited to join a space. This field is output only, except when used to import historical memberships in import mode spaces.",
          "type": "string",
          "format": "google-datetime"
        },
        "deleteTime": {
          "description": "Optional. Immutable. The deletion time of the membership, such as when a member left or was removed from a space. This field is output only, except when used to import historical memberships in import mode spaces.",
          "type": "string",
          "format": "google-datetime"
        }
      }
    },
    "Group": {
      "id": "Group",
      "description": "A Google Group in Google Chat.",
      "type": "object",
      "properties": {
        "name": {
          "description": "Resource name for a Google Group. Represents a [group](https://cloud.google.com/identity/docs/reference/rest/v1/groups) in Cloud Identity Groups API. Format: groups/{group}",
          "type": "string"
        }
      }
    },
    "MembershipUpdatedEventData": {
      "id": "MembershipUpdatedEventData",
      "description": "Event payload for an updated membership. Event type: `google.workspace.chat.membership.v1.updated`",
      "type": "object",
      "properties": {
        "membership": {
          "description": "The updated membership.",
          "$ref": "Membership"
        }
      }
    },
    "MembershipDeletedEventData": {
      "id": "MembershipDeletedEventData",
      "description": "Event payload for a deleted membership. Event type: `google.workspace.chat.membership.v1.deleted`",
      "type": "object",
      "properties": {
        "membership": {
          "description": "The deleted membership. Only the `name` and `state` fields are populated.",
          "$ref": "Membership"
        }
      }
    },
    "MembershipBatchCreatedEventData": {
      "id": "MembershipBatchCreatedEventData",
      "description": "Event payload for multiple new memberships. Event type: `google.workspace.chat.membership.v1.batchCreated`",
      "type": "object",
      "properties": {
        "memberships": {
          "description": "A list of new memberships.",
          "type": "array",
          "items": {
            "$ref": "MembershipCreatedEventData"
          }
        }
      }
    },
    "MembershipBatchUpdatedEventData": {
      "id": "MembershipBatchUpdatedEventData",
      "description": "Event payload for multiple updated memberships. Event type: `google.workspace.chat.membership.v1.batchUpdated`",
      "type": "object",
      "properties": {
        "memberships": {
          "description": "A list of updated memberships.",
          "type": "array",
          "items": {
            "$ref": "MembershipUpdatedEventData"
          }
        }
      }
    },
    "MembershipBatchDeletedEventData": {
      "id": "MembershipBatchDeletedEventData",
      "description": "Event payload for multiple deleted memberships. Event type: `google.workspace.chat.membership.v1.batchDeleted`",
      "type": "object",
      "properties": {
        "memberships": {
          "description": "A list of deleted memberships.",
          "type": "array",
          "items": {
            "$ref": "MembershipDeletedEventData"
          }
        }
      }
    },
    "ReactionCreatedEventData": {
      "id": "ReactionCreatedEventData",
      "description": "Event payload for a new reaction. Event type: `google.workspace.chat.reaction.v1.created`",
      "type": "object",
      "properties": {
        "reaction": {
          "description": "The new reaction.",
          "$ref": "Reaction"
        }
      }
    },
    "Reaction": {
      "id": "Reaction",
      "description": "A reaction to a message.",
      "type": "object",
      "properties": {
        "name": {
          "description": "The resource name of the reaction. Format: `spaces/{space}/messages/{message}/reactions/{reaction}`",
          "type": "string"
        },
        "user": {
          "description": "Output only. The user who created the reaction.",
          "readOnly": true,
          "$ref": "User"
        },
        "emoji": {
          "description": "The emoji used in the reaction.",
          "$ref": "Emoji"
        }
      }
    },
    "ReactionDeletedEventData": {
      "id": "ReactionDeletedEventData",
      "description": "Event payload for a deleted reaction. Type: `google.workspace.chat.reaction.v1.deleted`",
      "type": "object",
      "properties": {
        "reaction": {
          "description": "The deleted reaction.",
          "$ref": "Reaction"
        }
      }
    },
    "ReactionBatchCreatedEventData": {
      "id": "ReactionBatchCreatedEventData",
      "description": "Event payload for multiple new reactions. Event type: `google.workspace.chat.reaction.v1.batchCreated`",
      "type": "object",
      "properties": {
        "reactions": {
          "description": "A list of new reactions.",
          "type": "array",
          "items": {
            "$ref": "ReactionCreatedEventData"
          }
        }
      }
    },
    "ReactionBatchDeletedEventData": {
      "id": "ReactionBatchDeletedEventData",
      "description": "Event payload for multiple deleted reactions. Event type: `google.workspace.chat.reaction.v1.batchDeleted`",
      "type": "object",
      "properties": {
        "reactions": {
          "description": "A list of deleted reactions.",
          "type": "array",
          "items": {
            "$ref": "ReactionDeletedEventData"
          }
        }
      }
    },
    "ListSpaceEventsResponse": {
      "id": "ListSpaceEventsResponse",
      "description": "Response message for listing space events.",
      "type": "object",
      "properties": {
        "spaceEvents": {
          "description": "Results are returned in chronological order (oldest event first).",
          "type": "array",
          "items": {
            "$ref": "SpaceEvent"
          }
        },
        "nextPageToken": {
          "description": "Continuation token used to fetch more events. If this field is omitted, there are no subsequent pages.",
          "type": "string"
        }
      }
    },
    "ListMessagesResponse": {
      "id": "ListMessagesResponse",
      "description": "Response message for listing messages.",
      "type": "object",
      "properties": {
        "messages": {
          "description": "List of messages.",
          "type": "array",
          "items": {
            "$ref": "Message"
          }
        },
        "nextPageToken": {
          "description": "You can send a token as `pageToken` to retrieve the next page of results. If empty, there are no subsequent pages.",
          "type": "string"
        }
      }
    },
    "ListMembershipsResponse": {
      "id": "ListMembershipsResponse",
      "description": "Response to list memberships of the space.",
      "type": "object",
      "properties": {
        "memberships": {
          "description": "Unordered list. List of memberships in the requested (or first) page.",
          "type": "array",
          "items": {
            "$ref": "Membership"
          }
        },
        "nextPageToken": {
          "description": "A token that you can send as `pageToken` to retrieve the next page of results. If empty, there are no subsequent pages.",
          "type": "string"
        }
      }
    },
    "Empty": {
      "id": "Empty",
      "description": "A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }",
      "type": "object",
      "properties": {}
    },
    "UploadAttachmentRequest": {
      "id": "UploadAttachmentRequest",
      "description": "Request to upload an attachment.",
      "type": "object",
      "properties": {
        "filename": {
          "description": "Required. The filename of the attachment, including the file extension.",
          "type": "string"
        }
      }
    },
    "UploadAttachmentResponse": {
      "id": "UploadAttachmentResponse",
      "description": "Response of uploading an attachment.",
      "type": "object",
      "properties": {
        "attachmentDataRef": {
          "description": "Reference to the uploaded attachment.",
          "$ref": "AttachmentDataRef"
        }
      }
    },
    "ListSpacesResponse": {
      "id": "ListSpacesResponse",
      "description": "The response for a list spaces request.",
      "type": "object",
      "properties": {
        "spaces": {
          "description": "List of spaces in the requested (or first) page.",
          "type": "array",
          "items": {
            "$ref": "Space"
          }
        },
        "nextPageToken": {
          "description": "You can send a token as `pageToken` to retrieve the next page of results. If empty, there are no subsequent pages.",
          "type": "string"
        }
      }
    },
    "SearchSpacesResponse": {
      "id": "SearchSpacesResponse",
      "description": "Response with a list of spaces corresponding to the search spaces request.",
      "type": "object",
      "properties": {
        "spaces": {
          "description": "A page of the requested spaces.",
          "type": "array",
          "items": {
            "$ref": "Space"
          }
        },
        "nextPageToken": {
          "description": "A token that can be used to retrieve the next page. If this field is empty, there are no subsequent pages.",
          "type": "string"
        },
        "totalSize": {
          "description": "The total number of spaces that match the query, across all pages. If the result is over 10,000 spaces, this value is an estimate.",
          "type": "integer",
          "format": "int32"
        }
      }
    },
    "SetUpSpaceRequest": {
      "id": "SetUpSpaceRequest",
      "description": "Request to create a space and add specified users to it.",
      "type": "object",
      "properties": {
        "space": {
          "description": "Required. The `Space.spaceType` field is required. To create a space, set `Space.spaceType` to `SPACE` and set `Space.displayName`. If you receive the error message `ALREADY_EXISTS` when setting up a space, try a different `displayName`. An existing space within the Google Workspace organization might already use this display name. To create a group chat, set `Space.spaceType` to `GROUP_CHAT`. Don't set `Space.displayName`. To create a 1:1 conversation between humans, set `Space.spaceType` to `DIRECT_MESSAGE` and set `Space.singleUserBotDm` to `false`. Don't set `Space.displayName` or `Space.spaceDetails`. To create an 1:1 conversation between a human and the calling Chat app, set `Space.spaceType` to `DIRECT_MESSAGE` and `Space.singleUserBotDm` to `true`. Don't set `Space.displayName` or `Space.spaceDetails`. If a `DIRECT_MESSAGE` space already exists, that space is returned instead of creating a new space.",
          "$ref": "Space"
        },
        "requestId": {
          "description": "Optional. A unique identifier for this request. A random UUID is recommended. Specifying an existing request ID returns the space created with that ID instead of creating a new space. Specifying an existing request ID from the same Chat app with a different authenticated user returns an error.",
          "type": "string"
        },
        "memberships": {
          "description": "Optional. The Google Chat users to invite to join the space. Omit the calling user, as they are added automatically. The set currently allows up to 20 memberships (in addition to the caller). For human membership, the `Membership.member` field must contain a `user` with `name` populated (format: `users/{user}`) and `type` set to `User.Type.HUMAN`. You can only add human users when setting up a space (adding Chat apps is only supported for direct message setup with the calling app). You can also add members using the user's email as an alias for {user}. For example, the `user.name` can be `users/example@gmail.com`. To invite Gmail users or users from external Google Workspace domains, user's email must be used for `{user}`. Optional when setting `Space.spaceType` to `SPACE`. Required when setting `Space.spaceType` to `GROUP_CHAT`, along with at least two memberships. Required when setting `Space.spaceType` to `DIRECT_MESSAGE` with a human user, along with exactly one membership. Must be empty when creating a 1:1 conversation between a human and the calling Chat app (when setting `Space.spaceType` to `DIRECT_MESSAGE` and `Space.singleUserBotDm` to `true`).",
          "type": "array",
          "items": {
            "$ref": "Membership"
          }
        }
      }
    },
    "CompleteImportSpaceRequest": {
      "id": "CompleteImportSpaceRequest",
      "description": "Request message for completing the import process for a space.",
      "type": "object",
      "properties": {}
    },
    "CompleteImportSpaceResponse": {
      "id": "CompleteImportSpaceResponse",
      "description": "Response message for completing the import process for a space.",
      "type": "object",
      "properties": {
        "space": {
          "description": "The import mode space.",
          "$ref": "Space"
        }
      }
    },
    "ListReactionsResponse": {
      "id": "ListReactionsResponse",
      "description": "Response to a list reactions request.",
      "type": "object",
      "properties": {
        "reactions": {
          "description": "List of reactions in the requested (or first) page.",
          "type": "array",
          "items": {
            "$ref": "Reaction"
          }
        },
        "nextPageToken": {
          "description": "Continuation token to retrieve the next page of results. It's empty for the last page of results.",
          "type": "string"
        }
      }
    },
    "SpaceReadState": {
      "id": "SpaceReadState",
      "description": "A user's read state within a space, used to identify read and unread messages.",
      "type": "object",
      "properties": {
        "name": {
          "description": "Resource name of the space read state. Format: `users/{user}/spaces/{space}/spaceReadState`",
          "type": "string"
        },
        "lastReadTime": {
          "description": "Optional. The time when the user's space read state was updated. Usually this corresponds with either the timestamp of the last read message, or a timestamp specified by the user to mark the last read position in a space.",
          "type": "string",
          "format": "google-datetime"
        }
      }
    },
    "ThreadReadState": {
      "id": "ThreadReadState",
      "description": "A user's read state within a thread, used to identify read and unread messages.",
      "type": "object",
      "properties": {
        "name": {
          "description": "Resource name of the thread read state. Format: `users/{user}/spaces/{space}/threads/{thread}/threadReadState`",
          "type": "string"
        },
        "lastReadTime": {
          "description": "The time when the user's thread read state was updated. Usually this corresponds with the timestamp of the last read message in a thread.",
          "type": "string",
          "format": "google-datetime"
        }
      }
    },
    "ChatAppLogEntry": {
      "id": "ChatAppLogEntry",
      "description": "JSON payload of error messages. If the Cloud Logging API is enabled, these error messages are logged to [Google Cloud Logging](https://cloud.google.com/logging/docs).",
      "type": "object",
      "properties": {
        "deployment": {
          "description": "The deployment that caused the error. For Chat apps built in Apps Script, this is the deployment ID defined by Apps Script.",
          "type": "string"
        },
        "error": {
          "description": "The error code and message.",
          "$ref": "Status"
        },
        "deploymentFunction": {
          "description": "The unencrypted `callback_method` name that was running when the error was encountered.",
          "type": "string"
        }
      }
    },
    "Status": {
      "id": "Status",
      "description": "The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors).",
      "type": "object",
      "properties": {
        "code": {
          "description": "The status code, which should be an enum value of google.rpc.Code.",
          "type": "integer",
          "format": "int32"
        },
        "message": {
          "description": "A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.",
          "type": "string"
        },
        "details": {
          "description": "A list of messages that carry the error details. There is a common set of message types for APIs to use.",
          "type": "array",
          "items": {
            "type": "object",
            "additionalProperties": {
              "type": "any",
              "description": "Properties of the object. Contains field @type with type URL."
            }
          }
        }
      }
    },
    "DeprecatedEvent": {
      "id": "DeprecatedEvent",
      "description": "A Google Chat app interaction event. To learn about interaction events, see [Receive and respond to interactions with your Google Chat app](https://developers.google.com/workspace/chat/api/guides/message-formats). To learn about event types and for example event payloads, see [Types of Google Chat app interaction events](https://developers.google.com/workspace/chat/events). In addition to receiving events from user interactions, Chat apps can receive events about changes to spaces, such as when a new member is added to a space. To learn about space events, see [Work with events from Google Chat](https://developers.google.com/workspace/chat/events-overview).",
      "type": "object",
      "properties": {
        "type": {
          "description": "The type of interaction event. For details, see [Types of Google Chat app interaction events](https://developers.google.com/workspace/chat/events).",
          "type": "string",
          "enumDescriptions": [
            "Default value for the enum. DO NOT USE.",
            "A user sends the Chat app a message, or invokes the Chat app in a space.",
            "A user adds the Chat app to a space, or a Google Workspace administrator installs the Chat app in direct message spaces for users in their organization.",
            "A user removes the Chat app from a space.",
            "A user clicks an interactive element of a card or dialog from a Chat app, such as a button. If a user interacts with a dialog, the `CARD_CLICKED` interaction event's `isDialogEvent` field is set to `true` and includes a [`DialogEventType`](https://developers.google.com/workspace/chat/api/reference/rest/v1/DialogEventType).",
            "A user updates a widget in a card message or dialog."
          ],
          "enum": [
            "UNSPECIFIED",
            "MESSAGE",
            "ADDED_TO_SPACE",
            "REMOVED_FROM_SPACE",
            "CARD_CLICKED",
            "WIDGET_UPDATED"
          ]
        },
        "eventTime": {
          "description": "The timestamp indicating when the interaction event occurred.",
          "type": "string",
          "format": "google-datetime"
        },
        "token": {
          "description": "A secret value that legacy Chat apps can use to verify if a request is from Google. Google randomly generates the token, and its value remains static. You can obtain, revoke, or regenerate the token from the [Chat API configuration page](https://console.cloud.google.com/apis/api/chat.googleapis.com/hangouts-chat) in the Google Cloud Console. Modern Chat apps don't use this field. It is absent from API responses and the [Chat API configuration page](https://console.cloud.google.com/apis/api/chat.googleapis.com/hangouts-chat).",
          "type": "string"
        },
        "threadKey": {
          "description": "The Chat app-defined key for the thread related to the interaction event. See [`spaces.messages.thread.threadKey`](/chat/api/reference/rest/v1/spaces.messages#Thread.FIELDS.thread_key) for more information.",
          "type": "string"
        },
        "message": {
          "description": "The message that triggered the interaction event, if applicable.",
          "$ref": "Message"
        },
        "user": {
          "description": "The user that triggered the interaction event.",
          "$ref": "User"
        },
        "space": {
          "description": "The space in which the interaction event occurred.",
          "$ref": "Space"
        },
        "action": {
          "description": "For `CARD_CLICKED` interaction events, the form action data associated when a user clicks a card or dialog. To learn more, see [Read form data input by users on cards](https://developers.google.com/workspace/chat/read-form-data).",
          "$ref": "FormAction"
        },
        "configCompleteRedirectUrl": {
          "description": "The URL the Chat app should redirect the user to after they have completed an authorization or configuration flow outside of Google Chat. For more information, see [Connect a Chat app with other services & tools](https://developers.google.com/workspace/chat/connect-web-services-tools).",
          "type": "string"
        },
        "isDialogEvent": {
          "description": "For `CARD_CLICKED` and `MESSAGE` interaction events, whether the user is interacting with or about to interact with a [dialog](https://developers.google.com/workspace/chat/dialogs).",
          "type": "boolean"
        },
        "dialogEventType": {
          "description": "The type of [dialog](https://developers.google.com/workspace/chat/dialogs) interaction event received.",
          "type": "string",
          "enumDescriptions": [
            "Default value. Unspecified.",
            "A user opens a dialog.",
            "A user clicks an interactive element of a dialog. For example, a user fills out information in a dialog and clicks a button to submit the information.",
            "A user closes a dialog without submitting information, or the dialog is canceled."
          ],
          "enum": [
            "TYPE_UNSPECIFIED",
            "REQUEST_DIALOG",
            "SUBMIT_DIALOG",
            "CANCEL_DIALOG"
          ]
        },
        "common": {
          "description": "Represents information about the user's client, such as locale, host app, and platform. For Chat apps, `CommonEventObject` includes information submitted by users interacting with [dialogs](https://developers.google.com/workspace/chat/dialogs), like data entered on a card.",
          "$ref": "CommonEventObject"
        }
      }
    },
    "CommonEventObject": {
      "id": "CommonEventObject",
      "description": "Represents information about the user's client, such as locale, host app, and platform. For Chat apps, `CommonEventObject` includes data submitted by users interacting with cards, like data entered in [dialogs](https://developers.google.com/chat/how-tos/dialogs).",
      "type": "object",
      "properties": {
        "userLocale": {
          "description": "The full `locale.displayName` in the format of [ISO 639 language code]-[ISO 3166 country/region code] such as \"en-US\".",
          "type": "string"
        },
        "hostApp": {
          "description": "The hostApp enum which indicates the app the add-on is invoked from. Always `CHAT` for Chat apps.",
          "type": "string",
          "enumDescriptions": [
            "Google can't identify a host app.",
            "The add-on launches from Gmail.",
            "The add-on launches from Google Calendar.",
            "The add-on launches from Google Drive.",
            "Not used.",
            "The add-on launches from Google Docs.",
            "The add-on launches from Google Meet.",
            "The add-on launches from Google Sheets.",
            "The add-on launches from Google Slides.",
            "The add-on launches from Google Drawings.",
            "A Google Chat app. Not used for Google Workspace Add-ons."
          ],
          "enum": [
            "UNSPECIFIED_HOST_APP",
            "GMAIL",
            "CALENDAR",
            "DRIVE",
            "DEMO",
            "DOCS",
            "MEET",
            "SHEETS",
            "SLIDES",
            "DRAWINGS",
            "CHAT"
          ]
        },
        "platform": {
          "description": "The platform enum which indicates the platform where the event originates (`WEB`, `IOS`, or `ANDROID`). Not supported by Chat apps.",
          "type": "string",
          "enumDescriptions": [
            "",
            "",
            "",
            ""
          ],
          "enum": [
            "UNKNOWN_PLATFORM",
            "WEB",
            "IOS",
            "ANDROID"
          ]
        },
        "timeZone": {
          "description": "The timezone ID and offset from Coordinated Universal Time (UTC). Only supported for the event types [`CARD_CLICKED`](https://developers.google.com/chat/api/reference/rest/v1/EventType#ENUM_VALUES.CARD_CLICKED) and [`SUBMIT_DIALOG`](https://developers.google.com/chat/api/reference/rest/v1/DialogEventType#ENUM_VALUES.SUBMIT_DIALOG).",
          "$ref": "TimeZone"
        },
        "formInputs": {
          "description": "A map containing the values that a user inputs in a widget from a card or dialog. The map keys are the string IDs assigned to each widget, and the values represent inputs to the widget. For details, see [Process information inputted by users](https://developers.google.com/chat/ui/read-form-data).",
          "type": "object",
          "additionalProperties": {
            "$ref": "Inputs"
          }
        },
        "parameters": {
          "description": "Custom [parameters](/chat/api/reference/rest/v1/cards#ActionParameter) passed to the invoked function. Both keys and values must be strings.",
          "type": "object",
          "additionalProperties": {
            "type": "string"
          }
        },
        "invokedFunction": {
          "description": "Name of the invoked function associated with the widget. Only set for Chat apps.",
          "type": "string"
        }
      }
    },
    "TimeZone": {
      "id": "TimeZone",
      "description": "The timezone ID and offset from Coordinated Universal Time (UTC). Only supported for the event types [`CARD_CLICKED`](https://developers.google.com/chat/api/reference/rest/v1/EventType#ENUM_VALUES.CARD_CLICKED) and [`SUBMIT_DIALOG`](https://developers.google.com/chat/api/reference/rest/v1/DialogEventType#ENUM_VALUES.SUBMIT_DIALOG).",
      "type": "object",
      "properties": {
        "id": {
          "description": "The [IANA TZ](https://www.iana.org/time-zones) time zone database code, such as \"America/Toronto\".",
          "type": "string"
        },
        "offset": {
          "description": "The user timezone offset, in milliseconds, from Coordinated Universal Time (UTC).",
          "type": "integer",
          "format": "int32"
        }
      }
    },
    "Inputs": {
      "id": "Inputs",
      "description": "Types of data that users can [input on cards or dialogs](https://developers.google.com/chat/ui/read-form-data). The input type depends on the type of values that the widget accepts.",
      "type": "object",
      "properties": {
        "stringInputs": {
          "description": "A list of strings that represent the values that the user inputs in a widget. If the widget only accepts one value, such as a [`TextInput`](https://developers.google.com/chat/api/reference/rest/v1/cards#TextInput) widget, the list contains one string object. If the widget accepts multiple values, such as a [`SelectionInput`](https://developers.google.com/chat/api/reference/rest/v1/cards#selectioninput) widget of checkboxes, the list contains a string object for each value that the user inputs or selects.",
          "$ref": "StringInputs"
        },
        "dateTimeInput": {
          "description": "Date and time input values from a [`DateTimePicker`](https://developers.google.com/chat/api/reference/rest/v1/cards#DateTimePicker) widget that accepts both a date and time.",
          "$ref": "DateTimeInput"
        },
        "dateInput": {
          "description": "Date input values from a [`DateTimePicker`](https://developers.google.com/chat/api/reference/rest/v1/cards#DateTimePicker) widget that only accepts date values.",
          "$ref": "DateInput"
        },
        "timeInput": {
          "description": "Time input values from a [`DateTimePicker`](https://developers.google.com/chat/api/reference/rest/v1/cards#DateTimePicker) widget that only accepts time values.",
          "$ref": "TimeInput"
        }
      }
    },
    "StringInputs": {
      "id": "StringInputs",
      "description": "Input parameter for regular widgets. For single-valued widgets, it is a single value list. For multi-valued widgets, such as checkbox, all the values are presented.",
      "type": "object",
      "properties": {
        "value": {
          "description": "An list of strings entered by the user.",
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      }
    },
    "DateTimeInput": {
      "id": "DateTimeInput",
      "description": "Date and time input values.",
      "type": "object",
      "properties": {
        "msSinceEpoch": {
          "description": "Time since epoch time, in milliseconds.",
          "type": "string",
          "format": "int64"
        },
        "hasDate": {
          "description": "Whether the `datetime` input includes a calendar date.",
          "type": "boolean"
        },
        "hasTime": {
          "description": "Whether the `datetime` input includes a timestamp.",
          "type": "boolean"
        }
      }
    },
    "DateInput": {
      "id": "DateInput",
      "description": "Date input values.",
      "type": "object",
      "properties": {
        "msSinceEpoch": {
          "description": "Time since epoch time, in milliseconds.",
          "type": "string",
          "format": "int64"
        }
      }
    },
    "TimeInput": {
      "id": "TimeInput",
      "description": "Time input values.",
      "type": "object",
      "properties": {
        "hours": {
          "description": "The hour on a 24-hour clock.",
          "type": "integer",
          "format": "int32"
        },
        "minutes": {
          "description": "The number of minutes past the hour. Valid values are 0 to 59.",
          "type": "integer",
          "format": "int32"
        }
      }
    }
  },
  "ownerDomain": "google.com",
  "rootUrl": "https://chat.googleapis.com/",
  "id": "chat:v1",
  "fullyEncodeReservedExpansion": true,
  "mtlsRootUrl": "https://chat.mtls.googleapis.com/",
  "servicePath": "",
  "name": "chat",
  "protocol": "rest",
  "canonicalName": "Hangouts Chat",
  "basePath": "",
  "batchPath": "batch"
}
