Google Chat API icon

Google Chat API

Enables apps to fetch information and perform actions in Google Chat

COMMUNITYBEARER0 INSTALLS
API Docs
OpenAPI Specificationv3.0
{
  "openapi": "3.0.0",
  "servers": [
    {
      "url": "https://chat.googleapis.com/"
    }
  ],
  "info": {
    "contact": {
      "name": "Google",
      "url": "https://google.com",
      "x-twitter": "youtube"
    },
    "description": "Enables apps to fetch information and perform actions in Google Chat. Authentication is a prerequisite for using the Google Chat REST API.",
    "license": {
      "name": "Creative Commons Attribution 3.0",
      "url": "http://creativecommons.org/licenses/by/3.0/"
    },
    "termsOfService": "https://developers.google.com/terms/",
    "title": "Google Chat API",
    "version": "v1",
    "x-apiClientRegistration": {
      "url": "https://console.developers.google.com"
    },
    "x-apisguru-categories": [
      "analytics",
      "media"
    ],
    "x-logo": {
      "url": "https://api.apis.guru/v2/cache/logo/https_www.google.com_images_branding_googlelogo_2x_googlelogo_color_272x92dp.png"
    },
    "x-origin": [
      {
        "converter": {
          "url": "https://github.com/mermade/oas-kit",
          "version": "7.0.4"
        },
        "format": "google",
        "url": "https://chat.googleapis.com/$discovery/rest?version=v1",
        "version": "v1"
      }
    ],
    "x-providerName": "googleapis.com",
    "x-serviceName": "chat"
  },
  "externalDocs": {
    "url": "https://developers.google.com/hangouts/chat"
  },
  "tags": [
    {
      "name": "media"
    },
    {
      "name": "spaces"
    }
  ],
  "paths": {
    "/v1/media/{resourceName}": {
      "get": {
        "description": "Downloads media. Download is supported on the URI `/v1/media/{+name}?alt=media`.",
        "operationId": "chat.media.download",
        "parameters": [
          {
            "description": "Name of the media that is being downloaded. See ReadRequest.resource_name.",
            "in": "path",
            "name": "resourceName",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Media"
                }
              }
            },
            "description": "Successful response"
          }
        },
        "security": [
          {
            "Oauth2": [
              "https://www.googleapis.com/auth/chat.bot"
            ],
            "Oauth2c": [
              "https://www.googleapis.com/auth/chat.bot"
            ]
          },
          {
            "Oauth2": [
              "https://www.googleapis.com/auth/chat.messages"
            ],
            "Oauth2c": [
              "https://www.googleapis.com/auth/chat.messages"
            ]
          },
          {
            "Oauth2": [
              "https://www.googleapis.com/auth/chat.messages.readonly"
            ],
            "Oauth2c": [
              "https://www.googleapis.com/auth/chat.messages.readonly"
            ]
          }
        ],
        "tags": [
          "media"
        ]
      },
      "parameters": [
        {
          "$ref": "#/components/parameters/_.xgafv"
        },
        {
          "$ref": "#/components/parameters/access_token"
        },
        {
          "$ref": "#/components/parameters/alt"
        },
        {
          "$ref": "#/components/parameters/callback"
        },
        {
          "$ref": "#/components/parameters/fields"
        },
        {
          "$ref": "#/components/parameters/key"
        },
        {
          "$ref": "#/components/parameters/oauth_token"
        },
        {
          "$ref": "#/components/parameters/prettyPrint"
        },
        {
          "$ref": "#/components/parameters/quotaUser"
        },
        {
          "$ref": "#/components/parameters/upload_protocol"
        },
        {
          "$ref": "#/components/parameters/uploadType"
        }
      ]
    },
    "/v1/spaces": {
      "get": {
        "description": "Lists spaces the caller is a member of. Requires [authentication](https://developers.google.com/chat/api/guides/auth). Fully supports [service account authentication](https://developers.google.com/chat/api/guides/auth/service-accounts). Supports [user authentication](https://developers.google.com/chat/api/guides/auth/users) as part of the [Google Workspace Developer Preview Program](https://developers.google.com/workspace/preview), which grants early access to certain features. [User authentication](https://developers.google.com/chat/api/guides/auth/users) requires the `chat.spaces` or `chat.spaces.readonly` authorization scope. Lists spaces visible to the caller or authenticated user. Group chats and DMs aren't listed until the first message is sent.",
        "operationId": "chat.spaces.list",
        "parameters": [
          {
            "description": "Optional. 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; values above 1000 are coerced to 1000. Negative values return an `INVALID_ARGUMENT` error.",
            "in": "query",
            "name": "pageSize",
            "schema": {
              "type": "integer"
            }
          },
          {
            "description": "Optional. A page token, received from a previous list spaces 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 may lead to unexpected results.",
            "in": "query",
            "name": "pageToken",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListSpacesResponse"
                }
              }
            },
            "description": "Successful response"
          }
        },
        "security": [
          {
            "Oauth2": [
              "https://www.googleapis.com/auth/chat.bot"
            ],
            "Oauth2c": [
              "https://www.googleapis.com/auth/chat.bot"
            ]
          },
          {
            "Oauth2": [
              "https://www.googleapis.com/auth/chat.spaces"
            ],
            "Oauth2c": [
              "https://www.googleapis.com/auth/chat.spaces"
            ]
          },
          {
            "Oauth2": [
              "https://www.googleapis.com/auth/chat.spaces.readonly"
            ],
            "Oauth2c": [
              "https://www.googleapis.com/auth/chat.spaces.readonly"
            ]
          }
        ],
        "tags": [
          "spaces"
        ]
      },
      "parameters": [
        {
          "$ref": "#/components/parameters/_.xgafv"
        },
        {
          "$ref": "#/components/parameters/access_token"
        },
        {
          "$ref": "#/components/parameters/alt"
        },
        {
          "$ref": "#/components/parameters/callback"
        },
        {
          "$ref": "#/components/parameters/fields"
        },
        {
          "$ref": "#/components/parameters/key"
        },
        {
          "$ref": "#/components/parameters/oauth_token"
        },
        {
          "$ref": "#/components/parameters/prettyPrint"
        },
        {
          "$ref": "#/components/parameters/quotaUser"
        },
        {
          "$ref": "#/components/parameters/upload_protocol"
        },
        {
          "$ref": "#/components/parameters/uploadType"
        }
      ]
    },
    "/v1/{name}": {
      "delete": {
        "description": "Deletes a message. For example usage, see [Delete a message](https://developers.google.com/chat/api/guides/crudl/messages#delete_a_message). Requires [authentication](https://developers.google.com/chat/api/guides/auth). Fully supports [service account authentication](https://developers.google.com/chat/api/guides/auth/service-accounts). Supports [user authentication](https://developers.google.com/chat/api/guides/auth/users) as part of the [Google Workspace Developer Preview Program](https://developers.google.com/workspace/preview), which grants early access to certain features. [User authentication](https://developers.google.com/chat/api/guides/auth/users) requires the `chat.messages` authorization scope.",
        "operationId": "chat.spaces.messages.delete",
        "parameters": [
          {
            "description": "Required. Resource name of the message to be deleted, in the form \"spaces/*/messages/*\" Example: spaces/AAAAAAAAAAA/messages/BBBBBBBBBBB.BBBBBBBBBBB",
            "in": "path",
            "name": "name",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Empty"
                }
              }
            },
            "description": "Successful response"
          }
        },
        "security": [
          {
            "Oauth2": [
              "https://www.googleapis.com/auth/chat.bot"
            ],
            "Oauth2c": [
              "https://www.googleapis.com/auth/chat.bot"
            ]
          },
          {
            "Oauth2": [
              "https://www.googleapis.com/auth/chat.messages"
            ],
            "Oauth2c": [
              "https://www.googleapis.com/auth/chat.messages"
            ]
          }
        ],
        "tags": [
          "spaces"
        ]
      },
      "get": {
        "description": "Gets the metadata of a message attachment. The attachment data is fetched using the [media API](https://developers.google.com/chat/api/reference/rest/v1/media/download). Requires [service account authentication](https://developers.google.com/chat/api/guides/auth/service-accounts).",
        "operationId": "chat.spaces.messages.attachments.get",
        "parameters": [
          {
            "description": "Required. Resource name of the attachment, in the form \"spaces/*/messages/*/attachments/*\".",
            "in": "path",
            "name": "name",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Attachment"
                }
              }
            },
            "description": "Successful response"
          }
        },
        "security": [
          {
            "Oauth2": [
              "https://www.googleapis.com/auth/chat.bot"
            ],
            "Oauth2c": [
              "https://www.googleapis.com/auth/chat.bot"
            ]
          },
          {
            "Oauth2": [
              "https://www.googleapis.com/auth/chat.messages"
            ],
            "Oauth2c": [
              "https://www.googleapis.com/auth/chat.messages"
            ]
          },
          {
            "Oauth2": [
              "https://www.googleapis.com/auth/chat.messages.readonly"
            ],
            "Oauth2c": [
              "https://www.googleapis.com/auth/chat.messages.readonly"
            ]
          }
        ],
        "tags": [
          "spaces"
        ]
      },
      "parameters": [
        {
          "$ref": "#/components/parameters/_.xgafv"
        },
        {
          "$ref": "#/components/parameters/access_token"
        },
        {
          "$ref": "#/components/parameters/alt"
        },
        {
          "$ref": "#/components/parameters/callback"
        },
        {
          "$ref": "#/components/parameters/fields"
        },
        {
          "$ref": "#/components/parameters/key"
        },
        {
          "$ref": "#/components/parameters/oauth_token"
        },
        {
          "$ref": "#/components/parameters/prettyPrint"
        },
        {
          "$ref": "#/components/parameters/quotaUser"
        },
        {
          "$ref": "#/components/parameters/upload_protocol"
        },
        {
          "$ref": "#/components/parameters/uploadType"
        }
      ],
      "patch": {
        "description": "Updates a message. There's a difference between `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 example usage, see [Update a message](https://developers.google.com/chat/api/guides/crudl/messages#update_a_message). Requires [authentication](https://developers.google.com/chat/api/guides/auth/). Fully supports [service account authentication](https://developers.google.com/chat/api/guides/auth/service-accounts). Supports [user authentication](https://developers.google.com/chat/api/guides/auth/users) as part of the [Google Workspace Developer Preview Program](https://developers.google.com/workspace/preview), which grants early access to certain features. [User authentication](https://developers.google.com/chat/api/guides/auth/users) requires the `chat.messages` authorization scope.",
        "operationId": "chat.spaces.messages.patch",
        "parameters": [
          {
            "description": "Resource name in the form `spaces/*/messages/*`. Example: `spaces/AAAAAAAAAAA/messages/BBBBBBBBBBB.BBBBBBBBBBB`",
            "in": "path",
            "name": "name",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Optional. If `true` and the message is not found, a new message is created and `updateMask` is ignored. The specified message ID must be [client-assigned](https://developers.google.com/chat/api/guides/crudl/messages#name_a_created_message) or the request fails.",
            "in": "query",
            "name": "allowMissing",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "description": "Required. The field paths to update. Separate multiple values with commas. Currently supported field paths: - text - cards (Requires [service account authentication](/chat/api/guides/auth/service-accounts).) - cards_v2 ",
            "in": "query",
            "name": "updateMask",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Message"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Message"
                }
              }
            },
            "description": "Successful response"
          }
        },
        "security": [
          {
            "Oauth2": [
              "https://www.googleapis.com/auth/chat.bot"
            ],
            "Oauth2c": [
              "https://www.googleapis.com/auth/chat.bot"
            ]
          },
          {
            "Oauth2": [
              "https://www.googleapis.com/auth/chat.messages"
            ],
            "Oauth2c": [
              "https://www.googleapis.com/auth/chat.messages"
            ]
          }
        ],
        "tags": [
          "spaces"
        ]
      },
      "put": {
        "description": "Updates a message. There's a difference between `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 example usage, see [Update a message](https://developers.google.com/chat/api/guides/crudl/messages#update_a_message). Requires [authentication](https://developers.google.com/chat/api/guides/auth/). Fully supports [service account authentication](https://developers.google.com/chat/api/guides/auth/service-accounts). Supports [user authentication](https://developers.google.com/chat/api/guides/auth/users) as part of the [Google Workspace Developer Preview Program](https://developers.google.com/workspace/preview), which grants early access to certain features. [User authentication](https://developers.google.com/chat/api/guides/auth/users) requires the `chat.messages` authorization scope.",
        "operationId": "chat.spaces.messages.update",
        "parameters": [
          {
            "description": "Resource name in the form `spaces/*/messages/*`. Example: `spaces/AAAAAAAAAAA/messages/BBBBBBBBBBB.BBBBBBBBBBB`",
            "in": "path",
            "name": "name",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Optional. If `true` and the message is not found, a new message is created and `updateMask` is ignored. The specified message ID must be [client-assigned](https://developers.google.com/chat/api/guides/crudl/messages#name_a_created_message) or the request fails.",
            "in": "query",
            "name": "allowMissing",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "description": "Required. The field paths to update. Separate multiple values with commas. Currently supported field paths: - text - cards (Requires [service account authentication](/chat/api/guides/auth/service-accounts).) - cards_v2 ",
            "in": "query",
            "name": "updateMask",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Message"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Message"
                }
              }
            },
            "description": "Successful response"
          }
        },
        "security": [
          {
            "Oauth2": [
              "https://www.googleapis.com/auth/chat.bot"
            ],
            "Oauth2c": [
              "https://www.googleapis.com/auth/chat.bot"
            ]
          },
          {
            "Oauth2": [
              "https://www.googleapis.com/auth/chat.messages"
            ],
            "Oauth2c": [
              "https://www.googleapis.com/auth/chat.messages"
            ]
          }
        ],
        "tags": [
          "spaces"
        ]
      }
    },
    "/v1/{parent}/members": {
      "get": {
        "description": "Lists memberships in a space. Requires [authentication](https://developers.google.com/chat/api/guides/auth/). Fully supports [service account authentication](https://developers.google.com/chat/api/guides/auth/service-accounts). Supports [user authentication](https://developers.google.com/chat/api/guides/auth/users) as part of the [Google Workspace Developer Preview Program](https://developers.google.com/workspace/preview), which grants early access to certain features. [User authentication](https://developers.google.com/chat/api/guides/auth/users) requires the `chat.memberships` or `chat.memberships.readonly` authorization scope.",
        "operationId": "chat.spaces.members.list",
        "parameters": [
          {
            "description": "Required. The resource name of the space for which to fetch a membership list. Format: spaces/{space}",
            "in": "path",
            "name": "parent",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "The maximum number of memberships to return. The service may return fewer than this value. If unspecified, at most 100 memberships are returned. The maximum value is 1000; values above 1000 are coerced to 1000. Negative values return an INVALID_ARGUMENT error.",
            "in": "query",
            "name": "pageSize",
            "schema": {
              "type": "integer"
            }
          },
          {
            "description": "A page token, received from a previous call to list memberships. Provide this 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 may lead to unexpected results.",
            "in": "query",
            "name": "pageToken",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListMembershipsResponse"
                }
              }
            },
            "description": "Successful response"
          }
        },
        "security": [
          {
            "Oauth2": [
              "https://www.googleapis.com/auth/chat.bot"
            ],
            "Oauth2c": [
              "https://www.googleapis.com/auth/chat.bot"
            ]
          },
          {
            "Oauth2": [
              "https://www.googleapis.com/auth/chat.memberships"
            ],
            "Oauth2c": [
              "https://www.googleapis.com/auth/chat.memberships"
            ]
          },
          {
            "Oauth2": [
              "https://www.googleapis.com/auth/chat.memberships.readonly"
            ],
            "Oauth2c": [
              "https://www.googleapis.com/auth/chat.memberships.readonly"
            ]
          }
        ],
        "tags": [
          "spaces"
        ]
      },
      "parameters": [
        {
          "$ref": "#/components/parameters/_.xgafv"
        },
        {
          "$ref": "#/components/parameters/access_token"
        },
        {
          "$ref": "#/components/parameters/alt"
        },
        {
          "$ref": "#/components/parameters/callback"
        },
        {
          "$ref": "#/components/parameters/fields"
        },
        {
          "$ref": "#/components/parameters/key"
        },
        {
          "$ref": "#/components/parameters/oauth_token"
        },
        {
          "$ref": "#/components/parameters/prettyPrint"
        },
        {
          "$ref": "#/components/parameters/quotaUser"
        },
        {
          "$ref": "#/components/parameters/upload_protocol"
        },
        {
          "$ref": "#/components/parameters/uploadType"
        }
      ]
    },
    "/v1/{parent}/messages": {
      "parameters": [
        {
          "$ref": "#/components/parameters/_.xgafv"
        },
        {
          "$ref": "#/components/parameters/access_token"
        },
        {
          "$ref": "#/components/parameters/alt"
        },
        {
          "$ref": "#/components/parameters/callback"
        },
        {
          "$ref": "#/components/parameters/fields"
        },
        {
          "$ref": "#/components/parameters/key"
        },
        {
          "$ref": "#/components/parameters/oauth_token"
        },
        {
          "$ref": "#/components/parameters/prettyPrint"
        },
        {
          "$ref": "#/components/parameters/quotaUser"
        },
        {
          "$ref": "#/components/parameters/upload_protocol"
        },
        {
          "$ref": "#/components/parameters/uploadType"
        }
      ],
      "post": {
        "description": "Creates a message. For example usage, see [Create a message](https://developers.google.com/chat/api/guides/crudl/messages#create_a_message). Requires [authentication](https://developers.google.com/chat/api/guides/auth). Fully supports [service account authentication](https://developers.google.com/chat/api/guides/auth/service-accounts). Supports [user authentication](https://developers.google.com/chat/api/guides/auth/users) as part of the [Google Workspace Developer Preview Program](https://developers.google.com/workspace/preview), which grants early access to certain features. [User authentication](https://developers.google.com/chat/api/guides/auth/users) requires the `chat.messages` or `chat.messages.create` authorization scope. Because Chat provides authentication for [webhooks](https://developers.google.com/chat/how-tos/webhooks) as part of the URL that's generated when a webhook is registered, webhooks can create messages without a service account or user authentication.",
        "operationId": "chat.spaces.messages.create",
        "parameters": [
          {
            "description": "Required. The resource name of the space in which to create a message. Format: spaces/{space}",
            "in": "path",
            "name": "parent",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Optional. A custom name for a Chat message assigned at creation. Must start with `client-` and contain only lowercase letters, numbers, and hyphens up to 63 characters in length. Specify this field to get, update, or delete the message with the specified value. For example usage, see [Name a created message](https://developers.google.com/chat/api/guides/crudl/messages#name_a_created_message).",
            "in": "query",
            "name": "messageId",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Optional. Specifies whether a message starts a thread or replies to one. Only supported in named spaces.",
            "in": "query",
            "name": "messageReplyOption",
            "schema": {
              "enum": [
                "MESSAGE_REPLY_OPTION_UNSPECIFIED",
                "REPLY_MESSAGE_FALLBACK_TO_NEW_THREAD",
                "REPLY_MESSAGE_OR_FAIL"
              ],
              "type": "string"
            }
          },
          {
            "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.",
            "in": "query",
            "name": "requestId",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Optional. Deprecated: Use thread.thread_key instead. Opaque thread identifier. 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/chat/api/guides/crudl/messages#start_or_reply_to_a_message_thread).",
            "in": "query",
            "name": "threadKey",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Message"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Message"
                }
              }
            },
            "description": "Successful response"
          }
        },
        "security": [
          {
            "Oauth2": [
              "https://www.googleapis.com/auth/chat.bot"
            ],
            "Oauth2c": [
              "https://www.googleapis.com/auth/chat.bot"
            ]
          },
          {
            "Oauth2": [
              "https://www.googleapis.com/auth/chat.messages"
            ],
            "Oauth2c": [
              "https://www.googleapis.com/auth/chat.messages"
            ]
          },
          {
            "Oauth2": [
              "https://www.googleapis.com/auth/chat.messages.create"
            ],
            "Oauth2c": [
              "https://www.googleapis.com/auth/chat.messages.create"
            ]
          }
        ],
        "tags": [
          "spaces"
        ]
      }
    }
  },
  "components": {
    "parameters": {
      "_.xgafv": {
        "description": "V1 error format.",
        "in": "query",
        "name": "$.xgafv",
        "schema": {
          "enum": [
            "1",
            "2"
          ],
          "type": "string"
        }
      },
      "access_token": {
        "description": "OAuth access token.",
        "in": "query",
        "name": "access_token",
        "schema": {
          "type": "string"
        }
      },
      "alt": {
        "description": "Data format for response.",
        "in": "query",
        "name": "alt",
        "schema": {
          "enum": [
            "json",
            "media",
            "proto"
          ],
          "type": "string"
        }
      },
      "callback": {
        "description": "JSONP",
        "in": "query",
        "name": "callback",
        "schema": {
          "type": "string"
        }
      },
      "fields": {
        "description": "Selector specifying which fields to include in a partial response.",
        "in": "query",
        "name": "fields",
        "schema": {
          "type": "string"
        }
      },
      "key": {
        "description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.",
        "in": "query",
        "name": "key",
        "schema": {
          "type": "string"
        }
      },
      "oauth_token": {
        "description": "OAuth 2.0 token for the current user.",
        "in": "query",
        "name": "oauth_token",
        "schema": {
          "type": "string"
        }
      },
      "prettyPrint": {
        "description": "Returns response with indentations and line breaks.",
        "in": "query",
        "name": "prettyPrint",
        "schema": {
          "type": "boolean"
        }
      },
      "quotaUser": {
        "description": "Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.",
        "in": "query",
        "name": "quotaUser",
        "schema": {
          "type": "string"
        }
      },
      "uploadType": {
        "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").",
        "in": "query",
        "name": "uploadType",
        "schema": {
          "type": "string"
        }
      },
      "upload_protocol": {
        "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").",
        "in": "query",
        "name": "upload_protocol",
        "schema": {
          "type": "string"
        }
      }
    },
    "schemas": {
      "ActionParameter": {
        "description": "List of string parameters to supply when the action method is invoked. For example, consider three snooze buttons: snooze now, snooze 1 day, snooze next week. You might use action method = snooze(), passing the snooze type and snooze time in the list of string parameters.",
        "properties": {
          "key": {
            "description": "The name of the parameter for the action script.",
            "type": "string"
          },
          "value": {
            "description": "The value of the parameter.",
            "type": "string"
          }
        },
        "type": "object"
      },
      "ActionResponse": {
        "description": "Parameters that a Chat app can use to configure how its response is posted.",
        "properties": {
          "dialogAction": {
            "$ref": "#/components/schemas/DialogAction",
            "description": "Input only. A response to an event related to a [dialog](https://developers.google.com/chat/how-tos/dialogs). Must be accompanied by `ResponseType.Dialog`."
          },
          "type": {
            "description": "Input only. The type of Chat app response.",
            "enum": [
              "TYPE_UNSPECIFIED",
              "NEW_MESSAGE",
              "UPDATE_MESSAGE",
              "UPDATE_USER_MESSAGE_CARDS",
              "REQUEST_CONFIG",
              "DIALOG"
            ],
            "type": "string"
          },
          "url": {
            "description": "Input only. URL for users to auth or config. (Only for REQUEST_CONFIG response types.)",
            "type": "string"
          }
        },
        "type": "object"
      },
      "ActionStatus": {
        "description": "Represents the status for a request to either invoke or submit a [dialog](https://developers.google.com/chat/how-tos/dialogs).",
        "properties": {
          "statusCode": {
            "description": "The status code.",
            "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"
            ],
            "type": "string"
          },
          "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"
          }
        },
        "type": "object"
      },
      "Annotation": {
        "description": "Annotations associated with the plain-text body of the message. 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\" } }] ```",
        "properties": {
          "length": {
            "description": "Length of the substring in the plain-text message body this annotation corresponds to.",
            "format": "int32",
            "type": "integer"
          },
          "slashCommand": {
            "$ref": "#/components/schemas/SlashCommandMetadata",
            "description": "The metadata for a slash command."
          },
          "startIndex": {
            "description": "Start index (0-based, inclusive) in the plain-text message body this annotation corresponds to.",
            "format": "int32",
            "type": "integer"
          },
          "type": {
            "description": "The type of this annotation.",
            "enum": [
              "ANNOTATION_TYPE_UNSPECIFIED",
              "USER_MENTION",
              "SLASH_COMMAND"
            ],
            "type": "string"
          },
          "userMention": {
            "$ref": "#/components/schemas/UserMentionMetadata",
            "description": "The metadata of user mention."
          }
        },
        "type": "object"
      },
      "Attachment": {
        "description": "An attachment in Google Chat.",
        "properties": {
          "attachmentDataRef": {
            "$ref": "#/components/schemas/AttachmentDataRef",
            "description": "A reference to the attachment data. This is used with the media API to download the attachment data."
          },
          "contentName": {
            "description": "The original file name for the content, not the full path.",
            "type": "string"
          },
          "contentType": {
            "description": "The content type (MIME type) of the file.",
            "type": "string"
          },
          "downloadUri": {
            "description": "Output only. The download URL which should be used to allow a human user to download the attachment. Chat apps should not use this URL to download attachment content.",
            "readOnly": true,
            "type": "string"
          },
          "driveDataRef": {
            "$ref": "#/components/schemas/DriveDataRef",
            "description": "A reference to the drive attachment. This is used with the Drive API."
          },
          "name": {
            "description": "Resource name of the attachment, in the form \"spaces/*/messages/*/attachments/*\".",
            "type": "string"
          },
          "source": {
            "description": "The source of the attachment.",
            "enum": [
              "SOURCE_UNSPECIFIED",
              "DRIVE_FILE",
              "UPLOADED_CONTENT"
            ],
            "type": "string"
          },
          "thumbnailUri": {
            "description": "Output only. The thumbnail URL which should be used to preview the attachment to a human user. Chat apps should not use this URL to download attachment content.",
            "readOnly": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "AttachmentDataRef": {
        "properties": {
          "resourceName": {
            "description": "The resource name of the attachment data. This is used with the media API to download the attachment data.",
            "type": "string"
          }
        },
        "type": "object"
      },
      "Button": {
        "description": "A button. Can be a text button or an image button.",
        "properties": {
          "imageButton": {
            "$ref": "#/components/schemas/ImageButton",
            "description": "A button with image and onclick action."
          },
          "textButton": {
            "$ref": "#/components/schemas/TextButton",
            "description": "A button with text and onclick action."
          }
        },
        "type": "object"
      },
      "Card": {
        "description": "A card is a UI element that can contain UI widgets such as texts, images.",
        "properties": {
          "cardActions": {
            "description": "The actions of this card.",
            "items": {
              "$ref": "#/components/schemas/CardAction"
            },
            "type": "array"
          },
          "header": {
            "$ref": "#/components/schemas/CardHeader",
            "description": "The header of the card. A header usually contains a title and an image."
          },
          "name": {
            "description": "Name of the card.",
            "type": "string"
          },
          "sections": {
            "description": "Sections are separated by a line divider.",
            "items": {
              "$ref": "#/components/schemas/Section"
            },
            "type": "array"
          }
        },
        "type": "object"
      },
      "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.",
        "properties": {
          "actionLabel": {
            "description": "The label used to be displayed in the action menu item.",
            "type": "string"
          },
          "onClick": {
            "$ref": "#/components/schemas/OnClick",
            "description": "The onclick action for this action item."
          }
        },
        "type": "object"
      },
      "CardHeader": {
        "properties": {
          "imageStyle": {
            "description": "The image's type (e.g. square border or circular border).",
            "enum": [
              "IMAGE_STYLE_UNSPECIFIED",
              "IMAGE",
              "AVATAR"
            ],
            "type": "string"
          },
          "imageUrl": {
            "description": "The URL of the image in the card header.",
            "type": "string"
          },
          "subtitle": {
            "description": "The subtitle of the card header.",
            "type": "string"
          },
          "title": {
            "description": "The title must be specified. The header has a fixed height: if both a title and subtitle is specified, each will take up 1 line. If only the title is specified, it will take up both lines.",
            "type": "string"
          }
        },
        "type": "object"
      },
      "CardWithId": {
        "description": "Widgets for Chat apps to specify.",
        "properties": {
          "card": {
            "$ref": "#/components/schemas/GoogleAppsCardV1Card",
            "description": "Cards support a defined layout, interactive UI elements like buttons, and rich media like images. Use this card to present detailed information, gather information from users, and guide users to take a next step."
          },
          "cardId": {
            "description": "Required for `cardsV2` messages. Chat app-specified identifier for this widget. Scoped within a message.",
            "type": "string"
          }
        },
        "type": "object"
      },
      "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).",
        "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"
          },
          "deploymentFunction": {
            "description": "The unencrypted `callback_method` name that was running when the error was encountered.",
            "type": "string"
          },
          "error": {
            "$ref": "#/components/schemas/Status",
            "description": "The error code and message."
          }
        },
        "type": "object"
      },
      "Color": {
        "description": "Represents a color in the RGBA color space. This representation is designed for simplicity of conversion to/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 carry information about the absolute color space that should be used to interpret the RGB value (e.g. sRGB, Adobe RGB, DCI-P3, BT.2020, etc.). 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 <= 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 << 16) | (green << 8) | blue); var hexString = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var resultBuilder = ['#']; for (var i = 0; i < missingZeros; i++) { resultBuilder.push('0'); } resultBuilder.push(hexString); return resultBuilder.join(''); }; // ...",
        "properties": {
          "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).",
            "format": "float",
            "type": "number"
          },
          "blue": {
            "description": "The amount of blue in the color as a value in the interval [0, 1].",
            "format": "float",
            "type": "number"
          },
          "green": {
            "description": "The amount of green in the color as a value in the interval [0, 1].",
            "format": "float",
            "type": "number"
          },
          "red": {
            "description": "The amount of red in the color as a value in the interval [0, 1].",
            "format": "float",
            "type": "number"
          }
        },
        "type": "object"
      },
      "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).",
        "properties": {
          "formInputs": {
            "additionalProperties": {
              "$ref": "#/components/schemas/Inputs"
            },
            "description": "A map containing the current values of the widgets in a card. The map keys are the string IDs assigned to each widget, and the values represent inputs to the widget. Depending on the input data type, a different object represents each input: For single-value widgets, `StringInput`. For multi-value widgets, an array of `StringInput` objects. For a date-time picker, a `DateTimeInput`. For a date-only picker, a `DateInput`. For a time-only picker, a `TimeInput`. Corresponds with the data entered by a user on a card in a [dialog](https://developers.google.com/chat/how-tos/dialogs).",
            "type": "object"
          },
          "hostApp": {
            "description": "The hostApp enum which indicates the app the add-on is invoked from. Always `CHAT` for Chat apps.",
            "enum": [
              "UNSPECIFIED_HOST_APP",
              "GMAIL",
              "CALENDAR",
              "DRIVE",
              "DEMO",
              "DOCS",
              "MEET",
              "SHEETS",
              "SLIDES",
              "DRAWINGS",
              "CHAT"
            ],
            "type": "string"
          },
          "invokedFunction": {
            "description": "Name of the invoked function associated with the widget. Only set for Chat apps.",
            "type": "string"
          },
          "parameters": {
            "additionalProperties": {
              "type": "string"
            },
            "description": "Custom [parameters](/chat/api/reference/rest/v1/cards#ActionParameter) passed to the invoked function. Both keys and values must be strings.",
            "type": "object"
          },
          "platform": {
            "description": "The platform enum which indicates the platform where the event originates (`WEB`, `IOS`, or `ANDROID`). Not supported by Chat apps.",
            "enum": [
              "UNKNOWN_PLATFORM",
              "WEB",
              "IOS",
              "ANDROID"
            ],
            "type": "string"
          },
          "timeZone": {
            "$ref": "#/components/schemas/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)."
          },
          "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"
          }
        },
        "type": "object"
      },
      "DateInput": {
        "description": "Date input values.",
        "properties": {
          "msSinceEpoch": {
            "description": "Time since epoch time, in milliseconds.",
            "format": "int64",
            "type": "string"
          }
        },
        "type": "object"
      },
      "DateTimeInput": {
        "description": "Date and time input values.",
        "properties": {
          "hasDate": {
            "description": "Whether the `datetime` input includes a calendar date.",
            "type": "boolean"
          },
          "hasTime": {
            "description": "Whether the `datetime` input includes a timestamp.",
            "type": "boolean"
          },
          "msSinceEpoch": {
            "description": "Time since epoch time, in milliseconds.",
            "format": "int64",
            "type": "string"
          }
        },
        "type": "object"
      },
      "DeprecatedEvent": {
        "description": "Google Chat events.",
        "properties": {
          "action": {
            "$ref": "#/components/schemas/FormAction",
            "description": "The form action data associated with an interactive card that was clicked. Only populated for CARD_CLICKED events. See the [Interactive Cards guide](/chat/how-tos/cards-onclick) for more information."
          },
          "common": {
            "$ref": "#/components/schemas/CommonEventObject",
            "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/chat/how-tos/dialogs), like data entered on a card."
          },
          "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/chat/how-tos/connect-web-services-tools).",
            "type": "string"
          },
          "dialogEventType": {
            "description": "The type of [dialog](https://developers.google.com/chat/how-tos/dialogs) event received.",
            "enum": [
              "TYPE_UNSPECIFIED",
              "REQUEST_DIALOG",
              "SUBMIT_DIALOG",
              "CANCEL_DIALOG"
            ],
            "type": "string"
          },
          "eventTime": {
            "description": "The timestamp indicating when the event occurred.",
            "format": "google-datetime",
            "type": "string"
          },
          "isDialogEvent": {
            "description": "True when the event is related to [dialogs](https://developers.google.com/chat/how-tos/dialogs).",
            "type": "boolean"
          },
          "message": {
            "$ref": "#/components/schemas/Message",
            "description": "The message that triggered the event, if applicable."
          },
          "space": {
            "$ref": "#/components/schemas/Space",
            "description": "The space in which the event occurred."
          },
          "threadKey": {
            "description": "The Chat app-defined key for the thread related to the event. See [`spaces.messages.thread.threadKey`](/chat/api/reference/rest/v1/spaces.messages#Thread.FIELDS.thread_key) for more information.",
            "type": "string"
          },
          "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"
          },
          "type": {
            "description": "The type of the event.",
            "enum": [
              "UNSPECIFIED",
              "MESSAGE",
              "ADDED_TO_SPACE",
              "REMOVED_FROM_SPACE",
              "CARD_CLICKED"
            ],
            "type": "string"
          },
          "user": {
            "$ref": "#/components/schemas/User",
            "description": "The user that triggered the event."
          }
        },
        "type": "object"
      },
      "Dialog": {
        "description": "Wrapper around the card body of the dialog.",
        "properties": {
          "body": {
            "$ref": "#/components/schemas/GoogleAppsCardV1Card",
            "description": "Input only. Body of the dialog, which is rendered in a modal. Google Chat apps do not support the following card entities: `DateTimePicker`, `OnChangeAction`."
          }
        },
        "type": "object"
      },
      "DialogAction": {
        "description": "Contains a [dialog](https://developers.google.com/chat/how-tos/dialogs) and request status code.",
        "properties": {
          "actionStatus": {
            "$ref": "#/components/schemas/ActionStatus",
            "description": "Input only. Status for a request to either invoke or submit a [dialog](https://developers.google.com/chat/how-tos/dialogs). Displays a status and message to users, if necessary. For example, in case of an error or success."
          },
          "dialog": {
            "$ref": "#/components/schemas/Dialog",
            "description": "Input only. [Dialog](https://developers.google.com/chat/how-tos/dialogs) for the request."
          }
        },
        "type": "object"
      },
      "DriveDataRef": {
        "description": "A reference to the data of a drive attachment.",
        "properties": {
          "driveFileId": {
            "description": "The id for the drive file, for use with the Drive API.",
            "type": "string"
          }
        },
        "type": "object"
      },
      "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); }",
        "properties": {},
        "type": "object"
      },
      "FormAction": {
        "description": "A form action describes the behavior when the form is submitted. For example, an Apps Script can be invoked to handle the form.",
        "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. The same method name can be used for several elements that trigger a common behavior if desired.",
            "type": "string"
          },
          "parameters": {
            "description": "List of action parameters.",
            "items": {
              "$ref": "#/components/schemas/ActionParameter"
            },
            "type": "array"
          }
        },
        "type": "object"
      },
      "GoogleAppsCardV1Action": {
        "description": "An action that describes the behavior when the form is submitted. For example, an Apps Script can be invoked to handle the form. If the action is triggered, the form values are sent to the server.",
        "properties": {
          "function": {
            "description": "A custom function to invoke when the containing element is clicked or othrwise activated. For example usage, see [Create interactive cards](https://developers.google.com/chat/how-tos/cards-onclick).",
            "type": "string"
          },
          "interaction": {
            "description": "Optional. Required when opening a [dialog](https://developers.google.com/chat/how-tos/dialogs). What to do in response to an interaction with a user, such as a user clicking button on 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/chat/how-tos/dialogs). When specified, a loading indicator is not shown. Supported by Chat apps, but not Google Workspace Add-ons. If specified for an add-on, the entire card is stripped and nothing is shown in the client.",
            "enum": [
              "INTERACTION_UNSPECIFIED",
              "OPEN_DIALOG"
            ],
            "type": "string"
          },
          "loadIndicator": {
            "description": "Specifies the loading indicator that the action displays while making the call to the action.",
            "enum": [
              "SPINNER",
              "NONE"
            ],
            "type": "string"
          },
          "parameters": {
            "description": "List of action parameters.",
            "items": {
              "$ref": "#/components/schemas/GoogleAppsCardV1ActionParameter"
            },
            "type": "array"
          },
          "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/chat/api/guides/message-formats/cards) in Chat apps, you must also set the action's [ResponseType](https://developers.google.com/chat/api/reference/rest/v1/spaces.messages#responsetype) to `UPDATE_MESSAGE` and use the same [`card_id`](https://developers.google.com/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"
          }
        },
        "type": "object"
      },
      "GoogleAppsCardV1ActionParameter": {
        "description": "List of string parameters to supply when the action method is invoked. For example, consider three snooze buttons: snooze now, snooze 1 day, 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/chat/api/reference/rest/v1/Event#commoneventobject).",
        "properties": {
          "key": {
            "description": "The name of the parameter for the action script.",
            "type": "string"
          },
          "value": {
            "description": "The value of the parameter.",
            "type": "string"
          }
        },
        "type": "object"
      },
      "GoogleAppsCardV1BorderStyle": {
        "description": "The style options for the border of a card or widget, including the border type and color.",
        "properties": {
          "cornerRadius": {
            "description": "The corner radius for the border.",
            "format": "int32",
            "type": "integer"
          },
          "strokeColor": {
            "$ref": "#/components/schemas/Color",
            "description": "The colors to use when the type is `BORDER_TYPE_STROKE`."
          },
          "type": {
            "description": "The border type.",
            "enum": [
              "BORDER_TYPE_UNSPECIFIED",
              "NO_BORDER",
              "STROKE"
            ],
            "type": "string"
          }
        },
        "type": "object"
      },
      "GoogleAppsCardV1Button": {
        "description": "A text, icon, or text + icon button that users can click. To make an image a clickable button, specify an Image (not an ImageComponent) and set an `onClick` action.",
        "properties": {
          "altText": {
            "description": "The alternative text 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/chat\".",
            "type": "string"
          },
          "color": {
            "$ref": "#/components/schemas/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 will likely result 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 can be expressed 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 } ```"
          },
          "disabled": {
            "description": "If `true`, the button is displayed in an inactive state and doesn't respond to user actions.",
            "type": "boolean"
          },
          "icon": {
            "$ref": "#/components/schemas/GoogleAppsCardV1Icon",
            "description": "The icon image. If both `icon` and `text` are set, then the icon appears before the text."
          },
          "onClick": {
            "$ref": "#/components/schemas/GoogleAppsCardV1OnClick",
            "description": "Required. The action to perform when the button is clicked, such as opening a hyperlink or running a custom function."
          },
          "text": {
            "description": "The text displayed inside the button.",
            "type": "string"
          }
        },
        "type": "object"
      },
      "GoogleAppsCardV1ButtonList": {
        "description": "A list of buttons layed out horizontally.",
        "properties": {
          "buttons": {
            "description": "An array of buttons.",
            "items": {
              "$ref": "#/components/schemas/GoogleAppsCardV1Button"
            },
            "type": "array"
          }
        },
        "type": "object"
      },
      "GoogleAppsCardV1Card": {
        "description": "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. In Google Chat, cards appear in several places: - As stand-alone messages. - Accompanying a text message, just beneath the text message. - As a [dialog](https://developers.google.com/chat/how-tos/dialogs). The following example JSON creates a \"contact card\" that features: - A header with the contact's name, job title, avatar picture. - A section with the contact information, including formatted text. - Buttons that users can click to share the contact or see more or less info. ![Example contact card](https://developers.google.com/chat/images/card_api_reference.png) ``` { \"cardsV2\": [ { \"cardId\": \"unique-card-id\", \"card\": { \"header\": { \"title\": \"Sasha\", \"subtitle\": \"Software Engineer\", \"imageUrl\": \"https://developers.google.com/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\", } ], } } }, ], } }, ], }, ], }, } ], } ```",
        "properties": {
          "cardActions": {
            "description": "The card's actions. Actions are added to the card's toolbar menu. Because Chat app cards have no toolbar, `cardActions[]` is not supported by Chat apps. 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\" } } } ] ```",
            "items": {
              "$ref": "#/components/schemas/GoogleAppsCardV1CardAction"
            },
            "type": "array"
          },
          "displayStyle": {
            "description": "In Google Workspace add-ons, sets the display properties of the `peekCardHeader`. Not supported by Chat apps.",
            "enum": [
              "DISPLAY_STYLE_UNSPECIFIED",
              "PEEK",
              "REPLACE"
            ],
            "type": "string"
          },
          "fixedFooter": {
            "$ref": "#/components/schemas/GoogleAppsCardV1CardFixedFooter",
            "description": "The fixed footer shown at the bottom of this card. Setting `fixedFooter` without specifying a `primaryButton` or a `secondaryButton` causes an error. Supported by Google Workspace Add-ons and Chat apps. For Chat apps, you can use fixed footers in [dialogs](https://developers.google.com/chat/how-tos/dialogs), but not [card messages](https://developers.google.com/chat/api/guides/message-formats/cards)."
          },
          "header": {
            "$ref": "#/components/schemas/GoogleAppsCardV1CardHeader",
            "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."
          },
          "name": {
            "description": "Name of the card. Used as a card identifier in card navigation. Because Chat apps don't support card navigation, they ignore this field.",
            "type": "string"
          },
          "peekCardHeader": {
            "$ref": "#/components/schemas/GoogleAppsCardV1CardHeader",
            "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. Not supported by Chat apps."
          },
          "sections": {
            "description": "Contains a collection of widgets. Each section has its own, optional header. Sections are visually separated by a line divider.",
            "items": {
              "$ref": "#/components/schemas/GoogleAppsCardV1Section"
            },
            "type": "array"
          }
        },
        "type": "object"
      },
      "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. Not supported by Chat apps.",
        "properties": {
          "actionLabel": {
            "description": "The label that displays as the action menu item.",
            "type": "string"
          },
          "onClick": {
            "$ref": "#/components/schemas/GoogleAppsCardV1OnClick",
            "description": "The `onClick` action for this action item."
          }
        },
        "type": "object"
      },
      "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. Supported by Google Workspace Add-ons and Chat apps. For Chat apps, you can use fixed footers in [dialogs](https://developers.google.com/chat/how-tos/dialogs), but not [card messages](https://developers.google.com/chat/api/guides/message-formats/cards).",
        "properties": {
          "primaryButton": {
            "$ref": "#/components/schemas/GoogleAppsCardV1Button",
            "description": "The primary button of the fixed footer. The button must be a text button with text and color set."
          },
          "secondaryButton": {
            "$ref": "#/components/schemas/GoogleAppsCardV1Button",
            "description": "The secondary button of the fixed footer. The button must be a text button with text and color set. `primaryButton` must be set if `secondaryButton` is set."
          }
        },
        "type": "object"
      },
      "GoogleAppsCardV1CardHeader": {
        "description": "Represents a card header.",
        "properties": {
          "imageAltText": {
            "description": "The alternative text of this image which is used for accessibility.",
            "type": "string"
          },
          "imageType": {
            "description": "The shape used to crop the image.",
            "enum": [
              "SQUARE",
              "CIRCLE"
            ],
            "type": "string"
          },
          "imageUrl": {
            "description": "The HTTPS URL of the image in the card header.",
            "type": "string"
          },
          "subtitle": {
            "description": "The subtitle of the card header. If specified, appears on its own line below the `title`.",
            "type": "string"
          },
          "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"
          }
        },
        "type": "object"
      },
      "GoogleAppsCardV1DateTimePicker": {
        "description": "Lets users specify a date, a time, or both a date and a time. Accepts text input from users, but features an interactive date and time selector that helps users enter correctly-formatted dates and times. If users enter a date or time incorrectly, the widget shows an error that prompts users to enter the correct format. Not supported by Chat apps. Support by Chat apps coming soon.",
        "properties": {
          "label": {
            "description": "The text that prompts users to enter a date, time, or datetime. Specify text that helps the user enter the information your app needs. For example, if users are setting an appointment, then a label like \"Appointment date\" or \"Appointment date and time\" might work well.",
            "type": "string"
          },
          "name": {
            "description": "The name by which the datetime picker is identified in a form input event. For details about working with form inputs, see [Receive form data](https://developers.google.com/chat/how-tos/dialogs#receive_form_data_from_dialogs).",
            "type": "string"
          },
          "onChangeAction": {
            "$ref": "#/components/schemas/GoogleAppsCardV1Action",
            "description": "Triggered when the user clicks **Save** or **Clear** from the datetime picker interface."
          },
          "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 not set, it uses the user's time zone setting on the client side.",
            "format": "int32",
            "type": "integer"
          },
          "type": {
            "description": "What kind of date and time input the datetime picker supports.",
            "enum": [
              "DATE_AND_TIME",
              "DATE_ONLY",
              "TIME_ONLY"
            ],
            "type": "string"
          },
          "valueMsEpoch": {
            "description": "The value displayed as the default value before user input or previous user input, represented in milliseconds ([Epoch time](https://en.wikipedia.org/wiki/Unix_time)). For `DATE_AND_TIME` type, the full epoch value is used. For `DATE_ONLY` type, only date of the epoch time is used. For `TIME_ONLY` type, only time of the epoch time is used. For example, to represent 3:00 AM, set epoch time to `3 * 60 * 60 * 1000`.",
            "format": "int64",
            "type": "string"
          }
        },
        "type": "object"
      },
      "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.",
        "properties": {
          "bottomLabel": {
            "description": "The text that appears below `text`. Always truncates.",
            "type": "string"
          },
          "button": {
            "$ref": "#/components/schemas/GoogleAppsCardV1Button",
            "description": "A button that can be clicked to trigger an action."
          },
          "endIcon": {
            "$ref": "#/components/schemas/GoogleAppsCardV1Icon",
            "description": "An icon displayed after the text. Supports [built-in](https://developers.google.com/chat/api/guides/message-formats/cards#builtinicons) and [custom](https://developers.google.com/chat/api/guides/message-formats/cards#customicons) icons."
          },
          "icon": {
            "$ref": "#/components/schemas/GoogleAppsCardV1Icon",
            "description": "Deprecated in favor of `startIcon`."
          },
          "onClick": {
            "$ref": "#/components/schemas/GoogleAppsCardV1OnClick",
            "description": "When users click on `topLabel` or `bottomLabel`, this action triggers."
          },
          "startIcon": {
            "$ref": "#/components/schemas/GoogleAppsCardV1Icon",
            "description": "The icon displayed in front of the text."
          },
          "switchControl": {
            "$ref": "#/components/schemas/GoogleAppsCardV1SwitchControl",
            "description": "A switch widget can be clicked to change its state and trigger an action."
          },
          "text": {
            "description": "Required. The primary text. Supports simple formatting. For more information about formatting text, see Formatting text in Google Chat apps and Formatting text in Google Workspace Add-ons.",
            "type": "string"
          },
          "topLabel": {
            "description": "The text that appears above `text`. Always truncates.",
            "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"
          }
        },
        "type": "object"
      },
      "GoogleAppsCardV1Divider": {
        "description": "Displays a divider between widgets, a horizontal line. For example, the following JSON creates a divider: ``` \"divider\": {} ```",
        "properties": {},
        "type": "object"
      },
      "GoogleAppsCardV1Grid": {
        "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 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. 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\" } } } ```",
        "properties": {
          "borderStyle": {
            "$ref": "#/components/schemas/GoogleAppsCardV1BorderStyle",
            "description": "The border style to apply to each grid item."
          },
          "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).",
            "format": "int32",
            "type": "integer"
          },
          "items": {
            "description": "The items to display in the grid.",
            "items": {
              "$ref": "#/components/schemas/GoogleAppsCardV1GridItem"
            },
            "type": "array"
          },
          "onClick": {
            "$ref": "#/components/schemas/GoogleAppsCardV1OnClick",
            "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."
          },
          "title": {
            "description": "The text that displays in the grid header.",
            "type": "string"
          }
        },
        "type": "object"
      },
      "GoogleAppsCardV1GridItem": {
        "description": "Represents a single item in the grid layout.",
        "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": {
            "$ref": "#/components/schemas/GoogleAppsCardV1ImageComponent",
            "description": "The image that displays in the grid item."
          },
          "layout": {
            "description": "The layout to use for the grid item.",
            "enum": [
              "GRID_ITEM_LAYOUT_UNSPECIFIED",
              "TEXT_BELOW",
              "TEXT_ABOVE"
            ],
            "type": "string"
          },
          "subtitle": {
            "description": "The grid item's subtitle.",
            "type": "string"
          },
          "title": {
            "description": "The grid item's title.",
            "type": "string"
          }
        },
        "type": "object"
      },
      "GoogleAppsCardV1Icon": {
        "description": "An icon displayed in a widget on a card. Supports [built-in](https://developers.google.com/chat/api/guides/message-formats/cards#builtinicons) and [custom](https://developers.google.com/chat/api/guides/message-formats/cards#customicons) icons.",
        "properties": {
          "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/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"
          },
          "iconUrl": {
            "description": "Display a custom icon hosted at an HTTPS URL. For example: ``` \"iconUrl\": \"https://developers.google.com/chat/images/quickstart-app-avatar.png\" ``` Supported file types include `.png` and `.jpg`.",
            "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.",
            "enum": [
              "SQUARE",
              "CIRCLE"
            ],
            "type": "string"
          },
          "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/chat/api/guides/message-formats/cards#builtinicons).",
            "type": "string"
          }
        },
        "type": "object"
      },
      "GoogleAppsCardV1Image": {
        "description": "An image that is specified by a URL and can have an `onClick` action.",
        "properties": {
          "altText": {
            "description": "The alternative text of this image, used for accessibility.",
            "type": "string"
          },
          "imageUrl": {
            "description": "The `https` URL that hosts the image. For example: ``` https://developers.google.com/chat/images/quickstart-app-avatar.png ```",
            "type": "string"
          },
          "onClick": {
            "$ref": "#/components/schemas/GoogleAppsCardV1OnClick",
            "description": "When a user clicks on the image, the click triggers this action."
          }
        },
        "type": "object"
      },
      "GoogleAppsCardV1ImageComponent": {
        "description": "Represents an image.",
        "properties": {
          "altText": {
            "description": "The accessibility label for the image.",
            "type": "string"
          },
          "borderStyle": {
            "$ref": "#/components/schemas/GoogleAppsCardV1BorderStyle",
            "description": "The border style to apply to the image."
          },
          "cropStyle": {
            "$ref": "#/components/schemas/GoogleAppsCardV1ImageCropStyle",
            "description": "The crop style to apply to the image."
          },
          "imageUri": {
            "description": "The image URL.",
            "type": "string"
          }
        },
        "type": "object"
      },
      "GoogleAppsCardV1ImageCropStyle": {
        "description": "Represents the crop style applied to an image. For example, here's how to apply a 16 by 9 aspect ratio: ``` cropStyle { \"type\": \"RECTANGLE_CUSTOM\", \"aspectRatio\": 16/9 } ```",
        "properties": {
          "aspectRatio": {
            "description": "The aspect ratio to use if the crop type is `RECTANGLE_CUSTOM`. For example, here's how to apply a 16 by 9 aspect ratio: ``` cropStyle { \"type\": \"RECTANGLE_CUSTOM\", \"aspectRatio\": 16/9 } ```",
            "format": "double",
            "type": "number"
          },
          "type": {
            "description": "The crop type.",
            "enum": [
              "IMAGE_CROP_TYPE_UNSPECIFIED",
              "SQUARE",
              "CIRCLE",
              "RECTANGLE_CUSTOM",
              "RECTANGLE_4_3"
            ],
            "type": "string"
          }
        },
        "type": "object"
      },
      "GoogleAppsCardV1OnClick": {
        "description": "Represents how to respond when users click an interactive element on a card, such as a button.",
        "properties": {
          "action": {
            "$ref": "#/components/schemas/GoogleAppsCardV1Action",
            "description": "If specified, an action is triggered by this `onClick`."
          },
          "card": {
            "$ref": "#/components/schemas/GoogleAppsCardV1Card",
            "description": "A new card is pushed to the card stack after clicking if specified. Supported by Google Workspace Add-ons, but not Chat apps."
          },
          "openDynamicLinkAction": {
            "$ref": "#/components/schemas/GoogleAppsCardV1Action",
            "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."
          },
          "openLink": {
            "$ref": "#/components/schemas/GoogleAppsCardV1OpenLink",
            "description": "If specified, this `onClick` triggers an open link action."
          }
        },
        "type": "object"
      },
      "GoogleAppsCardV1OpenLink": {
        "description": "Represents an `onClick` event that opens a hyperlink.",
        "properties": {
          "onClose": {
            "description": "Whether the client forgets about a link after opening it, or observes it until the window closes. Not supported by Chat apps.",
            "enum": [
              "NOTHING",
              "RELOAD"
            ],
            "type": "string"
          },
          "openAs": {
            "description": "How to open a link. Not supported by Chat apps.",
            "enum": [
              "FULL_SIZE",
              "OVERLAY"
            ],
            "type": "string"
          },
          "url": {
            "description": "The URL to open.",
            "type": "string"
          }
        },
        "type": "object"
      },
      "GoogleAppsCardV1Section": {
        "description": "A section contains a collection of widgets that are rendered vertically in the order that they are specified.",
        "properties": {
          "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"
          },
          "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 and Formatting text in Google Workspace Add-ons.",
            "type": "string"
          },
          "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`.",
            "format": "int32",
            "type": "integer"
          },
          "widgets": {
            "description": "All the widgets in the section. Must contain at least 1 widget.",
            "items": {
              "$ref": "#/components/schemas/GoogleAppsCardV1Widget"
            },
            "type": "array"
          }
        },
        "type": "object"
      },
      "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. 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/chat/how-tos/dialogs#receive_form_data_from_dialogs). To collect undefined or abstract data from users, use the TextInput widget.",
        "properties": {
          "items": {
            "description": "An array of selectable items. For example, an array of radio buttons or checkboxes. Supports up to 100 items.",
            "items": {
              "$ref": "#/components/schemas/GoogleAppsCardV1SelectionItem"
            },
            "type": "array"
          },
          "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"
          },
          "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/chat/how-tos/dialogs#receive_form_data_from_dialogs).",
            "type": "string"
          },
          "onChangeAction": {
            "$ref": "#/components/schemas/GoogleAppsCardV1Action",
            "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/chat/how-tos/dialogs#receive_form_data_from_dialogs)."
          },
          "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.",
            "enum": [
              "CHECK_BOX",
              "RADIO_BUTTON",
              "SWITCH",
              "DROPDOWN"
            ],
            "type": "string"
          }
        },
        "type": "object"
      },
      "GoogleAppsCardV1SelectionItem": {
        "description": "An item that users can select in a selection input, such as a checkbox or switch.",
        "properties": {
          "selected": {
            "description": "When `true`, more than one item is selected. If more than one item is selected for radio buttons and dropdown menus, the first selected item is received and the ones after are ignored.",
            "type": "boolean"
          },
          "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/chat/how-tos/dialogs#receive_form_data_from_dialogs).",
            "type": "string"
          }
        },
        "type": "object"
      },
      "GoogleAppsCardV1SuggestionItem": {
        "description": "One suggested value that users can enter in a text input field.",
        "properties": {
          "text": {
            "description": "The value of a suggested input to a text input field. This is equivalent to what users would enter themselves.",
            "type": "string"
          }
        },
        "type": "object"
      },
      "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 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 is set to `MULTIPLE_LINE`.",
        "properties": {
          "items": {
            "description": "A list of suggestions used for autocomplete recommendations in text input fields.",
            "items": {
              "$ref": "#/components/schemas/GoogleAppsCardV1SuggestionItem"
            },
            "type": "array"
          }
        },
        "type": "object"
      },
      "GoogleAppsCardV1SwitchControl": {
        "description": "Either a toggle-style switch or a checkbox inside a `decoratedText` widget. Only supported on the `decoratedText` widget.",
        "properties": {
          "controlType": {
            "description": "How the switch appears in the user interface.",
            "enum": [
              "SWITCH",
              "CHECKBOX",
              "CHECK_BOX"
            ],
            "type": "string"
          },
          "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/chat/how-tos/dialogs#receive_form_data_from_dialogs).",
            "type": "string"
          },
          "onChangeAction": {
            "$ref": "#/components/schemas/GoogleAppsCardV1Action",
            "description": "The action to perform when the switch state is changed, such as what function to run."
          },
          "selected": {
            "description": "When `true`, the switch is selected.",
            "type": "boolean"
          },
          "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/chat/how-tos/dialogs#receive_form_data_from_dialogs).",
            "type": "string"
          }
        },
        "type": "object"
      },
      "GoogleAppsCardV1TextInput": {
        "description": "A field in which users can enter text. Supports suggestions and on-change actions. 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/chat/how-tos/dialogs#receive_form_data_from_dialogs). 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.",
        "properties": {
          "autoCompleteAction": {
            "$ref": "#/components/schemas/GoogleAppsCardV1Action",
            "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. Supported by Google Workspace Add-ons, but not Chat apps."
          },
          "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"
          },
          "initialSuggestions": {
            "$ref": "#/components/schemas/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 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 is set to `MULTIPLE_LINE`."
          },
          "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"
          },
          "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/chat/how-tos/dialogs#receive_form_data_from_dialogs).",
            "type": "string"
          },
          "onChangeAction": {
            "$ref": "#/components/schemas/GoogleAppsCardV1Action",
            "description": "What to do when a change occurs in the text input field. Examples of changes include 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/chat/how-tos/dialogs) in Google Chat."
          },
          "type": {
            "description": "How a text input field appears in the user interface. For example, whether the field is single or multi-line.",
            "enum": [
              "SINGLE_LINE",
              "MULTIPLE_LINE"
            ],
            "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/chat/how-tos/dialogs#receive_form_data_from_dialogs).",
            "type": "string"
          }
        },
        "type": "object"
      },
      "GoogleAppsCardV1TextParagraph": {
        "description": "A paragraph of text that supports formatting. For more information about formatting text, see Formatting text in Google Chat apps and Formatting text in Google Workspace Add-ons.",
        "properties": {
          "text": {
            "description": "The text that's shown in the widget.",
            "type": "string"
          }
        },
        "type": "object"
      },
      "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.",
        "properties": {
          "buttonList": {
            "$ref": "#/components/schemas/GoogleAppsCardV1ButtonList",
            "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\" } } } ] } ```"
          },
          "dateTimePicker": {
            "$ref": "#/components/schemas/GoogleAppsCardV1DateTimePicker",
            "description": "Displays a selection/input widget for date, time, or date and time. Not supported by Chat apps. Support by Chat apps is coming soon. For example, the following JSON creates a datetime picker to schedule an appointment: ``` \"dateTimePicker\": { \"name\": \"appointment_time\", \"label\": \"Book your appointment at:\", \"type\": \"DATE_AND_TIME\", \"valueMsEpoch\": \"796435200000\" } ```"
          },
          "decoratedText": {
            "$ref": "#/components/schemas/GoogleAppsCardV1DecoratedText",
            "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\" } } ```"
          },
          "divider": {
            "$ref": "#/components/schemas/GoogleAppsCardV1Divider",
            "description": "Displays a horizontal line divider between widgets. For example, the following JSON creates a divider: ``` \"divider\": { } ```"
          },
          "grid": {
            "$ref": "#/components/schemas/GoogleAppsCardV1Grid",
            "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. 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\" } } } ```"
          },
          "image": {
            "$ref": "#/components/schemas/GoogleAppsCardV1Image",
            "description": "Displays an image. For example, the following JSON creates an image with alternative text: ``` \"image\": { \"imageUrl\": \"https://developers.google.com/chat/images/quickstart-app-avatar.png\", \"altText\": \"Chat app avatar\" } ```"
          },
          "selectionInput": {
            "$ref": "#/components/schemas/GoogleAppsCardV1SelectionInput",
            "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 } ] } ```"
          },
          "textInput": {
            "$ref": "#/components/schemas/GoogleAppsCardV1TextInput",
            "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\" } ] } } ```"
          },
          "textParagraph": {
            "$ref": "#/components/schemas/GoogleAppsCardV1TextParagraph",
            "description": "Displays a text paragraph. Supports simple HTML formatted text. For more information about formatting text, see Formatting text in Google Chat apps and Formatting text in Google Workspace Add-ons. For example, the following JSON creates a bolded text: ``` \"textParagraph\": { \"text\": \" *bold text*\" } ```"
          }
        },
        "type": "object"
      },
      "Image": {
        "description": "An image that is specified by a URL and can have an onclick action.",
        "properties": {
          "aspectRatio": {
            "description": "The aspect ratio of this image (width/height). This field allows clients to reserve the right height for the image while waiting for it to load. It's not meant to override the native aspect ratio of the image. If unset, the server fills it by prefetching the image.",
            "format": "double",
            "type": "number"
          },
          "imageUrl": {
            "description": "The URL of the image.",
            "type": "string"
          },
          "onClick": {
            "$ref": "#/components/schemas/OnClick",
            "description": "The onclick action."
          }
        },
        "type": "object"
      },
      "ImageButton": {
        "description": "An image button with an onclick action.",
        "properties": {
          "icon": {
            "description": "The icon specified by an enum that indices to an icon provided by Chat API.",
            "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"
            ],
            "type": "string"
          },
          "iconUrl": {
            "description": "The icon specified by a URL.",
            "type": "string"
          },
          "name": {
            "description": "The name of this image_button which will be used for accessibility. Default value will be provided if developers don't specify.",
            "type": "string"
          },
          "onClick": {
            "$ref": "#/components/schemas/OnClick",
            "description": "The onclick action."
          }
        },
        "type": "object"
      },
      "Inputs": {
        "description": "Types of data inputs for widgets. Users enter data with these inputs.",
        "properties": {
          "dateInput": {
            "$ref": "#/components/schemas/DateInput",
            "description": "Date input values."
          },
          "dateTimeInput": {
            "$ref": "#/components/schemas/DateTimeInput",
            "description": "Date and time input values."
          },
          "stringInputs": {
            "$ref": "#/components/schemas/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."
          },
          "timeInput": {
            "$ref": "#/components/schemas/TimeInput",
            "description": "Time input values."
          }
        },
        "type": "object"
      },
      "KeyValue": {
        "description": "A UI element contains a key (label) and a value (content). And this element may also contain some actions such as onclick button.",
        "properties": {
          "bottomLabel": {
            "description": "The text of the bottom label. Formatted text supported. For more information about formatting text, see Formatting text in Google Chat apps and Formatting text in Google Workspace Add-ons.",
            "type": "string"
          },
          "button": {
            "$ref": "#/components/schemas/Button",
            "description": "A button that can be clicked to trigger an action."
          },
          "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 and Formatting text in Google Workspace Add-ons.",
            "type": "string"
          },
          "contentMultiline": {
            "description": "If the content should be multiline.",
            "type": "boolean"
          },
          "icon": {
            "description": "An enum value that will be replaced by the Chat API with the corresponding icon image.",
            "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"
            ],
            "type": "string"
          },
          "iconUrl": {
            "description": "The icon specified by a URL.",
            "type": "string"
          },
          "onClick": {
            "$ref": "#/components/schemas/OnClick",
            "description": "The onclick action. Only the top label, bottom label and content region are clickable."
          },
          "topLabel": {
            "description": "The text of the top label. Formatted text supported. For more information about formatting text, see Formatting text in Google Chat apps and Formatting text in Google Workspace Add-ons.",
            "type": "string"
          }
        },
        "type": "object"
      },
      "ListMembershipsResponse": {
        "properties": {
          "memberships": {
            "description": "List of memberships in the requested (or first) page.",
            "items": {
              "$ref": "#/components/schemas/Membership"
            },
            "type": "array"
          },
          "nextPageToken": {
            "description": "A token that can be sent as `pageToken` to retrieve the next page of results. If empty, there are no subsequent pages.",
            "type": "string"
          }
        },
        "type": "object"
      },
      "ListSpacesResponse": {
        "properties": {
          "nextPageToken": {
            "description": "A token that can be sent as `pageToken` to retrieve the next page of results. If empty, there are no subsequent pages.",
            "type": "string"
          },
          "spaces": {
            "description": "List of spaces in the requested (or first) page.",
            "items": {
              "$ref": "#/components/schemas/Space"
            },
            "type": "array"
          }
        },
        "type": "object"
      },
      "MatchedUrl": {
        "description": "A matched url in a Chat message. Chat apps can preview matched URLs. For more information, refer to [Preview links](https://developers.google.com/chat/how-tos/preview-links).",
        "properties": {
          "url": {
            "description": "Output only. The url that was matched.",
            "readOnly": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "Media": {
        "description": "Media resource.",
        "properties": {
          "resourceName": {
            "description": "Name of the media resource.",
            "type": "string"
          }
        },
        "type": "object"
      },
      "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.",
        "properties": {
          "createTime": {
            "description": "Output only. The creation time of the membership, such as when a member joined or was invited to join a space.",
            "format": "google-datetime",
            "readOnly": true,
            "type": "string"
          },
          "member": {
            "$ref": "#/components/schemas/User",
            "description": "The Google Chat user or app the membership corresponds to."
          },
          "name": {
            "description": "Resource name of the membership, assigned by the server. Format: spaces/{space}/members/{member}",
            "type": "string"
          },
          "role": {
            "description": "Output only. User's role within a Chat space, which determines their permitted actions in the space.",
            "enum": [
              "MEMBERSHIP_ROLE_UNSPECIFIED",
              "ROLE_MEMBER",
              "ROLE_MANAGER"
            ],
            "readOnly": true,
            "type": "string"
          },
          "state": {
            "description": "Output only. State of the membership.",
            "enum": [
              "MEMBERSHIP_STATE_UNSPECIFIED",
              "JOINED",
              "INVITED",
              "NOT_A_MEMBER"
            ],
            "readOnly": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "Message": {
        "description": "A message in Google Chat.",
        "properties": {
          "actionResponse": {
            "$ref": "#/components/schemas/ActionResponse",
            "description": "Input only. Parameters that a Chat app can use to configure how its response is posted."
          },
          "annotations": {
            "description": "Output only. Annotations associated with the text in this message.",
            "items": {
              "$ref": "#/components/schemas/Annotation"
            },
            "readOnly": true,
            "type": "array"
          },
          "argumentText": {
            "description": "Output only. Plain-text body of the message with all Chat app mentions stripped out.",
            "readOnly": true,
            "type": "string"
          },
          "attachment": {
            "description": "User-uploaded attachment.",
            "items": {
              "$ref": "#/components/schemas/Attachment"
            },
            "type": "array"
          },
          "cards": {
            "description": "Deprecated: Use `cards_v2` instead. Rich, formatted and interactive cards that can be used to display UI elements such as: formatted texts, buttons, 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.",
            "items": {
              "$ref": "#/components/schemas/Card"
            },
            "type": "array"
          },
          "cardsV2": {
            "description": "Richly formatted and interactive cards that display UI elements and editable widgets, such as: - Formatted text - Buttons - Clickable images - Checkboxes - Radio buttons - Input widgets. Cards are usually displayed below the text body of a Chat message, but can situationally appear other places, such as [dialogs](https://developers.google.com/chat/how-tos/dialogs). Each card can have a maximum size of 32 KB. The `cardId` is a unique identifier among cards in the same message and for identifying user input values. Currently supported widgets include: - `TextParagraph` - `DecoratedText` - `Image` - `ButtonList` - `Divider` - `TextInput` - `SelectionInput` - `Grid`",
            "items": {
              "$ref": "#/components/schemas/CardWithId"
            },
            "type": "array"
          },
          "clientAssignedMessageId": {
            "description": "A custom name for a Chat message assigned at creation. Must start with `client-` and contain only lowercase letters, numbers, and hyphens up to 63 characters in length. Specify this field to get, update, or delete the message with the specified value. For example usage, see [Name a created message](https://developers.google.com/chat/api/guides/crudl/messages#name_a_created_message).",
            "type": "string"
          },
          "createTime": {
            "description": "Output only. The time at which the message was created in Google Chat server.",
            "format": "google-datetime",
            "readOnly": true,
            "type": "string"
          },
          "fallbackText": {
            "description": "A plain-text description of the message's cards, used when the actual cards cannot be displayed (e.g. mobile notifications).",
            "type": "string"
          },
          "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.",
            "format": "google-datetime",
            "readOnly": true,
            "type": "string"
          },
          "matchedUrl": {
            "$ref": "#/components/schemas/MatchedUrl",
            "description": "Output only. A URL in `spaces.messages.text` that matches a link preview pattern. For more information, refer to [Preview links](https://developers.google.com/chat/how-tos/preview-links).",
            "readOnly": true
          },
          "name": {
            "description": "Resource name in the form `spaces/*/messages/*`. Example: `spaces/AAAAAAAAAAA/messages/BBBBBBBBBBB.BBBBBBBBBBB`",
            "type": "string"
          },
          "sender": {
            "$ref": "#/components/schemas/User",
            "description": "Output only. The user who created the message. If your Chat app [authenticates as a user](https://developers.google.com/chat/api/guides/auth/users), the output populates the [user](https://developers.google.com/chat/api/reference/rest/v1/User) `name` and `type`.",
            "readOnly": true
          },
          "slashCommand": {
            "$ref": "#/components/schemas/SlashCommand",
            "description": "Output only. Slash command information, if applicable.",
            "readOnly": true
          },
          "space": {
            "$ref": "#/components/schemas/Space",
            "description": "If your Chat app [authenticates as a user](https://developers.google.com/chat/api/guides/auth/users), the output populates the [space](https://developers.google.com/chat/api/reference/rest/v1/spaces) `name`."
          },
          "text": {
            "description": "Plain-text body of the message. The first link to an image, video, web page, or other preview-able item generates a preview chip.",
            "type": "string"
          },
          "thread": {
            "$ref": "#/components/schemas/Thread",
            "description": "The thread the message belongs to. For example usage, see [Start or reply to a message thread](https://developers.google.com/chat/api/guides/crudl/messages#start_or_reply_to_a_message_thread)."
          },
          "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"
          }
        },
        "type": "object"
      },
      "OnClick": {
        "description": "An onclick action (e.g. open a link).",
        "properties": {
          "action": {
            "$ref": "#/components/schemas/FormAction",
            "description": "A form action will be triggered by this onclick if specified."
          },
          "openLink": {
            "$ref": "#/components/schemas/OpenLink",
            "description": "This onclick triggers an open link action if specified."
          }
        },
        "type": "object"
      },
      "OpenLink": {
        "description": "A link that opens a new window.",
        "properties": {
          "url": {
            "description": "The URL to open.",
            "type": "string"
          }
        },
        "type": "object"
      },
      "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 is currently no need for layout properties (e.g. float).",
        "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 and Formatting text in Google Workspace Add-ons.",
            "type": "string"
          },
          "widgets": {
            "description": "A section must contain at least 1 widget.",
            "items": {
              "$ref": "#/components/schemas/WidgetMarkup"
            },
            "type": "array"
          }
        },
        "type": "object"
      },
      "SlashCommand": {
        "description": "A [slash command](https://developers.google.com/chat/how-tos/slash-commands) in Google Chat.",
        "properties": {
          "commandId": {
            "description": "The id of the slash command invoked.",
            "format": "int64",
            "type": "string"
          }
        },
        "type": "object"
      },
      "SlashCommandMetadata": {
        "description": "Annotation metadata for slash commands (/).",
        "properties": {
          "bot": {
            "$ref": "#/components/schemas/User",
            "description": "The Chat app whose command was invoked."
          },
          "commandId": {
            "description": "The command id of the invoked slash command.",
            "format": "int64",
            "type": "string"
          },
          "commandName": {
            "description": "The name of the invoked slash command.",
            "type": "string"
          },
          "triggersDialog": {
            "description": "Indicating whether the slash command is for a dialog.",
            "type": "boolean"
          },
          "type": {
            "description": "The type of slash command.",
            "enum": [
              "TYPE_UNSPECIFIED",
              "ADD",
              "INVOKE"
            ],
            "type": "string"
          }
        },
        "type": "object"
      },
      "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.",
        "properties": {
          "adminInstalled": {
            "description": "Output only. Whether the Chat app was installed by a Google Workspace administrator. Administrators can install a Chat app for their domain, organizational unit, or a group of users. Administrators can only install Chat apps for direct messaging between users and the app. To support admin install, your app must feature direct messaging.",
            "readOnly": true,
            "type": "boolean"
          },
          "displayName": {
            "description": "The space's display name. Required when [creating a space](https://developers.google.com/chat/api/reference/rest/v1/spaces/create). For direct messages, this field may be empty. Supports up to 128 characters.",
            "type": "string"
          },
          "name": {
            "description": "Resource name of the space. Format: spaces/{space}",
            "type": "string"
          },
          "singleUserBotDm": {
            "description": "Optional. Whether the space is a DM between a Chat app and a single human.",
            "type": "boolean"
          },
          "spaceDetails": {
            "$ref": "#/components/schemas/SpaceDetails",
            "description": "Details about the space including description and rules."
          },
          "spaceThreadingState": {
            "description": "Output only. The threading state in the Chat space.",
            "enum": [
              "SPACE_THREADING_STATE_UNSPECIFIED",
              "THREADED_MESSAGES",
              "GROUPED_MESSAGES",
              "UNTHREADED_MESSAGES"
            ],
            "readOnly": true,
            "type": "string"
          },
          "threaded": {
            "description": "Output only. Deprecated: Use `spaceThreadingState` instead. Whether messages are threaded in this space.",
            "readOnly": true,
            "type": "boolean"
          },
          "type": {
            "description": "Output only. Deprecated: Use `singleUserBotDm` or `spaceType` (developer preview) instead. The type of a space.",
            "enum": [
              "TYPE_UNSPECIFIED",
              "ROOM",
              "DM"
            ],
            "readOnly": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "SpaceDetails": {
        "description": "Details about the space including description and rules.",
        "properties": {
          "description": {
            "description": "Optional. A description of the space. It could 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"
          }
        },
        "type": "object"
      },
      "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).",
        "properties": {
          "code": {
            "description": "The status code, which should be an enum value of google.rpc.Code.",
            "format": "int32",
            "type": "integer"
          },
          "details": {
            "description": "A list of messages that carry the error details. There is a common set of message types for APIs to use.",
            "items": {
              "additionalProperties": {
                "description": "Properties of the object. Contains field @type with type URL."
              },
              "type": "object"
            },
            "type": "array"
          },
          "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"
          }
        },
        "type": "object"
      },
      "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.",
        "properties": {
          "value": {
            "description": "An array of strings entered by the user.",
            "items": {
              "type": "string"
            },
            "type": "array"
          }
        },
        "type": "object"
      },
      "TextButton": {
        "description": "A button with text and onclick action.",
        "properties": {
          "onClick": {
            "$ref": "#/components/schemas/OnClick",
            "description": "The onclick action of the button."
          },
          "text": {
            "description": "The text of the button.",
            "type": "string"
          }
        },
        "type": "object"
      },
      "TextParagraph": {
        "description": "A paragraph of text. Formatted text supported. For more information about formatting text, see Formatting text in Google Chat apps and Formatting text in Google Workspace Add-ons.",
        "properties": {
          "text": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "Thread": {
        "description": "A thread in Google Chat.",
        "properties": {
          "name": {
            "description": "Resource name of the thread. Example: spaces/{space}/threads/{thread}",
            "type": "string"
          },
          "threadKey": {
            "description": "Optional. Opaque thread identifier. 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/chat/api/guides/crudl/messages#start_or_reply_to_a_message_thread). For other requests, this is an output only field.",
            "type": "string"
          }
        },
        "type": "object"
      },
      "TimeInput": {
        "description": "Time input values.",
        "properties": {
          "hours": {
            "description": "The hour on a 24-hour clock.",
            "format": "int32",
            "type": "integer"
          },
          "minutes": {
            "description": "The number of minutes past the hour. Valid values are 0 to 59.",
            "format": "int32",
            "type": "integer"
          }
        },
        "type": "object"
      },
      "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).",
        "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).",
            "format": "int32",
            "type": "integer"
          }
        },
        "type": "object"
      },
      "User": {
        "description": "A user in Google Chat.",
        "properties": {
          "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"
          },
          "isAnonymous": {
            "description": "Output only. When `true`, the user is deleted or their profile is not visible.",
            "readOnly": true,
            "type": "boolean"
          },
          "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 `{person_id`} for the [Person](https://developers.google.com/people/api/rest/v1/people) in the People API, where the Person `resource_name` is `people/{person_id}`. For example, `users/123456789` in Chat API represents the same person as `people/123456789` 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.",
            "type": "string"
          },
          "type": {
            "description": "User type.",
            "enum": [
              "TYPE_UNSPECIFIED",
              "HUMAN",
              "BOT"
            ],
            "type": "string"
          }
        },
        "type": "object"
      },
      "UserMentionMetadata": {
        "description": "Annotation metadata for user mentions (@).",
        "properties": {
          "type": {
            "description": "The type of user mention.",
            "enum": [
              "TYPE_UNSPECIFIED",
              "ADD",
              "MENTION"
            ],
            "type": "string"
          },
          "user": {
            "$ref": "#/components/schemas/User",
            "description": "The user mentioned."
          }
        },
        "type": "object"
      },
      "WidgetMarkup": {
        "description": "A widget is a UI element that presents texts, images, etc.",
        "properties": {
          "buttons": {
            "description": "A list of buttons. Buttons is also `oneof data` and only one of these fields should be set.",
            "items": {
              "$ref": "#/components/schemas/Button"
            },
            "type": "array"
          },
          "image": {
            "$ref": "#/components/schemas/Image",
            "description": "Display an image in this widget."
          },
          "keyValue": {
            "$ref": "#/components/schemas/KeyValue",
            "description": "Display a key value item in this widget."
          },
          "textParagraph": {
            "$ref": "#/components/schemas/TextParagraph",
            "description": "Display a text paragraph in this widget."
          }
        },
        "type": "object"
      }
    },
    "securitySchemes": {
      "Oauth2": {
        "description": "Oauth 2.0 implicit authentication",
        "flows": {
          "implicit": {
            "authorizationUrl": "https://accounts.google.com/o/oauth2/auth",
            "scopes": {
              "https://www.googleapis.com/auth/chat.bot": "Private Service: https://www.googleapis.com/auth/chat.bot",
              "https://www.googleapis.com/auth/chat.memberships": "View, add, and remove members from conversations in Google Chat",
              "https://www.googleapis.com/auth/chat.memberships.readonly": "View members in Google Chat conversations.",
              "https://www.googleapis.com/auth/chat.messages": "View, compose, send, update, and delete messages, and add, view, and delete reactions to messages.",
              "https://www.googleapis.com/auth/chat.messages.create": "Compose and send messages in Google Chat",
              "https://www.googleapis.com/auth/chat.messages.readonly": "View messages and reactions in Google Chat",
              "https://www.googleapis.com/auth/chat.spaces": "Create conversations and spaces and view or update metadata (including history settings) in Google Chat",
              "https://www.googleapis.com/auth/chat.spaces.readonly": "View chat and spaces in Google Chat"
            }
          }
        },
        "type": "oauth2"
      },
      "Oauth2c": {
        "description": "Oauth 2.0 authorizationCode authentication",
        "flows": {
          "authorizationCode": {
            "authorizationUrl": "https://accounts.google.com/o/oauth2/auth",
            "scopes": {
              "https://www.googleapis.com/auth/chat.bot": "Private Service: https://www.googleapis.com/auth/chat.bot",
              "https://www.googleapis.com/auth/chat.memberships": "View, add, and remove members from conversations in Google Chat",
              "https://www.googleapis.com/auth/chat.memberships.readonly": "View members in Google Chat conversations.",
              "https://www.googleapis.com/auth/chat.messages": "View, compose, send, update, and delete messages, and add, view, and delete reactions to messages.",
              "https://www.googleapis.com/auth/chat.messages.create": "Compose and send messages in Google Chat",
              "https://www.googleapis.com/auth/chat.messages.readonly": "View messages and reactions in Google Chat",
              "https://www.googleapis.com/auth/chat.spaces": "Create conversations and spaces and view or update metadata (including history settings) in Google Chat",
              "https://www.googleapis.com/auth/chat.spaces.readonly": "View chat and spaces in Google Chat"
            },
            "tokenUrl": "https://accounts.google.com/o/oauth2/token"
          }
        },
        "type": "oauth2"
      }
    }
  }
}