| { |
| "batchPath": "batch", |
| "basePath": "", |
| "ownerDomain": "google.com", |
| "servicePath": "", |
| "protocol": "rest", |
| "version": "v1", |
| "kind": "discovery#restDescription", |
| "canonicalName": "Hangouts Chat", |
| "rootUrl": "https://chat.googleapis.com/", |
| "fullyEncodeReservedExpansion": true, |
| "revision": "20201028", |
| "ownerName": "Google", |
| "version_module": true, |
| "name": "chat", |
| "icons": { |
| "x16": "http://www.google.com/images/icons/product/search-16.gif", |
| "x32": "http://www.google.com/images/icons/product/search-32.gif" |
| }, |
| "discoveryVersion": "v1", |
| "resources": { |
| "spaces": { |
| "resources": { |
| "members": { |
| "methods": { |
| "get": { |
| "path": "v1/{+name}", |
| "parameterOrder": [ |
| "name" |
| ], |
| "httpMethod": "GET", |
| "id": "chat.spaces.members.get", |
| "flatPath": "v1/spaces/{spacesId}/members/{membersId}", |
| "description": "Returns a membership.", |
| "response": { |
| "$ref": "Membership" |
| }, |
| "parameters": { |
| "name": { |
| "type": "string", |
| "location": "path", |
| "description": "Required. Resource name of the membership to be retrieved, in the form \"spaces/*/members/*\". Example: spaces/AAAAMpdlehY/members/105115627578887013105", |
| "required": true, |
| "pattern": "^spaces/[^/]+/members/[^/]+$" |
| } |
| } |
| }, |
| "list": { |
| "response": { |
| "$ref": "ListMembershipsResponse" |
| }, |
| "id": "chat.spaces.members.list", |
| "flatPath": "v1/spaces/{spacesId}/members", |
| "path": "v1/{+parent}/members", |
| "httpMethod": "GET", |
| "parameterOrder": [ |
| "parent" |
| ], |
| "parameters": { |
| "pageToken": { |
| "location": "query", |
| "description": "A token identifying a page of results the server should return.", |
| "type": "string" |
| }, |
| "parent": { |
| "location": "path", |
| "description": "Required. The resource name of the space for which membership list is to be fetched, in the form \"spaces/*\". Example: spaces/AAAAMpdlehY", |
| "type": "string", |
| "required": true, |
| "pattern": "^spaces/[^/]+$" |
| }, |
| "pageSize": { |
| "description": "Requested page size. The value is capped at 1000. Server may return fewer results than requested. If unspecified, server will default to 100.", |
| "format": "int32", |
| "type": "integer", |
| "location": "query" |
| } |
| }, |
| "description": "Lists human memberships in a space." |
| } |
| } |
| }, |
| "messages": { |
| "resources": { |
| "attachments": { |
| "methods": { |
| "get": { |
| "parameterOrder": [ |
| "name" |
| ], |
| "httpMethod": "GET", |
| "parameters": { |
| "name": { |
| "type": "string", |
| "pattern": "^spaces/[^/]+/messages/[^/]+/attachments/[^/]+$", |
| "description": "Resource name of the attachment, in the form \"spaces/*/messages/*/attachments/*\".", |
| "required": true, |
| "location": "path" |
| } |
| }, |
| "response": { |
| "$ref": "Attachment" |
| }, |
| "description": "Gets the metadata of a message attachment. The attachment data is fetched using the media API.", |
| "flatPath": "v1/spaces/{spacesId}/messages/{messagesId}/attachments/{attachmentsId}", |
| "path": "v1/{+name}", |
| "id": "chat.spaces.messages.attachments.get" |
| } |
| } |
| } |
| }, |
| "methods": { |
| "get": { |
| "flatPath": "v1/spaces/{spacesId}/messages/{messagesId}", |
| "response": { |
| "$ref": "Message" |
| }, |
| "parameters": { |
| "name": { |
| "pattern": "^spaces/[^/]+/messages/[^/]+$", |
| "description": "Required. Resource name of the message to be retrieved, in the form \"spaces/*/messages/*\". Example: spaces/AAAAMpdlehY/messages/UMxbHmzDlr4.UMxbHmzDlr4", |
| "required": true, |
| "type": "string", |
| "location": "path" |
| } |
| }, |
| "description": "Returns a message.", |
| "id": "chat.spaces.messages.get", |
| "httpMethod": "GET", |
| "parameterOrder": [ |
| "name" |
| ], |
| "path": "v1/{+name}" |
| }, |
| "update": { |
| "request": { |
| "$ref": "Message" |
| }, |
| "parameters": { |
| "updateMask": { |
| "type": "string", |
| "format": "google-fieldmask", |
| "location": "query", |
| "description": "Required. The field paths to be updated, comma separated if there are multiple. Currently supported field paths: * text * cards" |
| }, |
| "name": { |
| "required": true, |
| "location": "path", |
| "pattern": "^spaces/[^/]+/messages/[^/]+$", |
| "type": "string", |
| "description": "Resource name, in the form \"spaces/*/messages/*\". Example: spaces/AAAAMpdlehY/messages/UMxbHmzDlr4.UMxbHmzDlr4" |
| } |
| }, |
| "flatPath": "v1/spaces/{spacesId}/messages/{messagesId}", |
| "httpMethod": "PUT", |
| "id": "chat.spaces.messages.update", |
| "description": "Updates a message.", |
| "parameterOrder": [ |
| "name" |
| ], |
| "response": { |
| "$ref": "Message" |
| }, |
| "path": "v1/{+name}" |
| }, |
| "delete": { |
| "httpMethod": "DELETE", |
| "description": "Deletes a message.", |
| "path": "v1/{+name}", |
| "parameterOrder": [ |
| "name" |
| ], |
| "parameters": { |
| "name": { |
| "type": "string", |
| "description": "Required. Resource name of the message to be deleted, in the form \"spaces/*/messages/*\" Example: spaces/AAAAMpdlehY/messages/UMxbHmzDlr4.UMxbHmzDlr4", |
| "required": true, |
| "location": "path", |
| "pattern": "^spaces/[^/]+/messages/[^/]+$" |
| } |
| }, |
| "response": { |
| "$ref": "Empty" |
| }, |
| "id": "chat.spaces.messages.delete", |
| "flatPath": "v1/spaces/{spacesId}/messages/{messagesId}" |
| }, |
| "create": { |
| "parameters": { |
| "threadKey": { |
| "type": "string", |
| "description": "Opaque thread identifier string that can be specified to group messages into a single thread. If this is the first message with a given thread identifier, a new thread is created. Subsequent messages with the same thread identifier will be posted into the same thread. This relieves bots and webhooks from having to store the Hangouts Chat thread ID of a thread (created earlier by them) to post further updates to it. Has no effect if thread field, corresponding to an existing thread, is set in message.", |
| "location": "query" |
| }, |
| "parent": { |
| "pattern": "^spaces/[^/]+$", |
| "description": "Required. Space resource name, in the form \"spaces/*\". Example: spaces/AAAAMpdlehY", |
| "location": "path", |
| "type": "string", |
| "required": true |
| } |
| }, |
| "httpMethod": "POST", |
| "description": "Creates a message.", |
| "id": "chat.spaces.messages.create", |
| "path": "v1/{+parent}/messages", |
| "response": { |
| "$ref": "Message" |
| }, |
| "request": { |
| "$ref": "Message" |
| }, |
| "parameterOrder": [ |
| "parent" |
| ], |
| "flatPath": "v1/spaces/{spacesId}/messages" |
| } |
| } |
| } |
| }, |
| "methods": { |
| "get": { |
| "parameters": { |
| "name": { |
| "type": "string", |
| "description": "Required. Resource name of the space, in the form \"spaces/*\". Example: spaces/AAAAMpdlehY", |
| "location": "path", |
| "pattern": "^spaces/[^/]+$", |
| "required": true |
| } |
| }, |
| "httpMethod": "GET", |
| "path": "v1/{+name}", |
| "parameterOrder": [ |
| "name" |
| ], |
| "response": { |
| "$ref": "Space" |
| }, |
| "flatPath": "v1/spaces/{spacesId}", |
| "id": "chat.spaces.get", |
| "description": "Returns a space." |
| }, |
| "list": { |
| "id": "chat.spaces.list", |
| "flatPath": "v1/spaces", |
| "path": "v1/spaces", |
| "httpMethod": "GET", |
| "response": { |
| "$ref": "ListSpacesResponse" |
| }, |
| "parameterOrder": [], |
| "description": "Lists spaces the caller is a member of.", |
| "parameters": { |
| "pageToken": { |
| "location": "query", |
| "description": "A token identifying a page of results the server should return.", |
| "type": "string" |
| }, |
| "pageSize": { |
| "location": "query", |
| "type": "integer", |
| "description": "Requested page size. The value is capped at 1000. Server may return fewer results than requested. If unspecified, server will default to 100.", |
| "format": "int32" |
| } |
| } |
| } |
| } |
| }, |
| "media": { |
| "methods": { |
| "download": { |
| "parameterOrder": [ |
| "resourceName" |
| ], |
| "response": { |
| "$ref": "Media" |
| }, |
| "path": "v1/media/{+resourceName}", |
| "httpMethod": "GET", |
| "flatPath": "v1/media/{mediaId}", |
| "id": "chat.media.download", |
| "supportsMediaDownload": true, |
| "parameters": { |
| "resourceName": { |
| "pattern": "^.*$", |
| "type": "string", |
| "required": true, |
| "location": "path", |
| "description": "Name of the media that is being downloaded. See ReadRequest.resource_name." |
| } |
| }, |
| "description": "Downloads media. Download is supported on the URI `/v1/media/{+name}?alt=media`." |
| } |
| } |
| } |
| }, |
| "title": "Hangouts Chat API", |
| "baseUrl": "https://chat.googleapis.com/", |
| "mtlsRootUrl": "https://chat.mtls.googleapis.com/", |
| "parameters": { |
| "oauth_token": { |
| "location": "query", |
| "type": "string", |
| "description": "OAuth 2.0 token for the current user." |
| }, |
| "prettyPrint": { |
| "description": "Returns response with indentations and line breaks.", |
| "type": "boolean", |
| "default": "true", |
| "location": "query" |
| }, |
| "upload_protocol": { |
| "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", |
| "location": "query", |
| "type": "string" |
| }, |
| "$.xgafv": { |
| "enum": [ |
| "1", |
| "2" |
| ], |
| "type": "string", |
| "enumDescriptions": [ |
| "v1 error format", |
| "v2 error format" |
| ], |
| "location": "query", |
| "description": "V1 error format." |
| }, |
| "fields": { |
| "type": "string", |
| "location": "query", |
| "description": "Selector specifying which fields to include in a partial response." |
| }, |
| "quotaUser": { |
| "description": "Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.", |
| "location": "query", |
| "type": "string" |
| }, |
| "alt": { |
| "location": "query", |
| "enumDescriptions": [ |
| "Responses with Content-Type of application/json", |
| "Media download with context-dependent Content-Type", |
| "Responses with Content-Type of application/x-protobuf" |
| ], |
| "type": "string", |
| "enum": [ |
| "json", |
| "media", |
| "proto" |
| ], |
| "default": "json", |
| "description": "Data format for response." |
| }, |
| "key": { |
| "type": "string", |
| "location": "query", |
| "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." |
| }, |
| "uploadType": { |
| "location": "query", |
| "type": "string", |
| "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\")." |
| }, |
| "access_token": { |
| "description": "OAuth access token.", |
| "type": "string", |
| "location": "query" |
| }, |
| "callback": { |
| "description": "JSONP", |
| "type": "string", |
| "location": "query" |
| } |
| }, |
| "description": "Enables bots to fetch information and perform actions in Hangouts Chat.", |
| "schemas": { |
| "ListMembershipsResponse": { |
| "properties": { |
| "nextPageToken": { |
| "description": "Continuation token to retrieve the next page of results. It will be empty for the last page of results.", |
| "type": "string" |
| }, |
| "memberships": { |
| "items": { |
| "$ref": "Membership" |
| }, |
| "description": "List of memberships in the requested (or first) page.", |
| "type": "array" |
| } |
| }, |
| "type": "object", |
| "id": "ListMembershipsResponse" |
| }, |
| "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); } The JSON representation for `Empty` is empty JSON object `{}`.", |
| "id": "Empty", |
| "properties": {}, |
| "type": "object" |
| }, |
| "Message": { |
| "properties": { |
| "actionResponse": { |
| "$ref": "ActionResponse", |
| "description": "Input only. Parameters that a bot can use to configure how its response is posted." |
| }, |
| "space": { |
| "$ref": "Space", |
| "description": "The space the message belongs to." |
| }, |
| "sender": { |
| "description": "The user who created the message.", |
| "$ref": "User" |
| }, |
| "slashCommand": { |
| "$ref": "SlashCommand", |
| "description": "Slash command information, if applicable." |
| }, |
| "attachment": { |
| "description": "User uploaded attachment.", |
| "items": { |
| "$ref": "Attachment" |
| }, |
| "type": "array" |
| }, |
| "thread": { |
| "description": "The thread the message belongs to.", |
| "$ref": "Thread" |
| }, |
| "fallbackText": { |
| "type": "string", |
| "description": "A plain-text description of the message's cards, used when the actual cards cannot be displayed (e.g. mobile notifications)." |
| }, |
| "name": { |
| "type": "string", |
| "description": "Resource name, in the form \"spaces/*/messages/*\". Example: spaces/AAAAMpdlehY/messages/UMxbHmzDlr4.UMxbHmzDlr4" |
| }, |
| "previewText": { |
| "description": "Text for generating preview chips. This text will not be displayed to the user, but any links to images, web pages, videos, etc. included here will generate preview chips.", |
| "type": "string" |
| }, |
| "createTime": { |
| "format": "google-datetime", |
| "type": "string", |
| "description": "Output only. The time at which the message was created in Hangouts Chat server." |
| }, |
| "annotations": { |
| "type": "array", |
| "description": "Output only. Annotations associated with the text in this message.", |
| "items": { |
| "$ref": "Annotation" |
| } |
| }, |
| "text": { |
| "description": "Plain-text body of the message.", |
| "type": "string" |
| }, |
| "cards": { |
| "items": { |
| "$ref": "Card" |
| }, |
| "type": "array", |
| "description": "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." |
| }, |
| "argumentText": { |
| "description": "Plain-text body of the message with all bot mentions stripped out.", |
| "type": "string" |
| } |
| }, |
| "id": "Message", |
| "type": "object", |
| "description": "A message in Hangouts Chat." |
| }, |
| "KeyValue": { |
| "type": "object", |
| "id": "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": { |
| "content": { |
| "description": "The text of the content. Formatted text supported and always required.", |
| "type": "string" |
| }, |
| "onClick": { |
| "$ref": "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.", |
| "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", |
| "enumDescriptions": [ |
| "", |
| "", |
| "", |
| "", |
| "", |
| "", |
| "", |
| "", |
| "", |
| "", |
| "", |
| "", |
| "", |
| "", |
| "", |
| "", |
| "", |
| "", |
| "", |
| "", |
| "", |
| "", |
| "", |
| "", |
| "", |
| "", |
| "", |
| "", |
| "", |
| "", |
| "" |
| ] |
| }, |
| "bottomLabel": { |
| "type": "string", |
| "description": "The text of the bottom label. Formatted text supported." |
| }, |
| "iconUrl": { |
| "type": "string", |
| "description": "The icon specified by a URL." |
| }, |
| "button": { |
| "$ref": "Button", |
| "description": "A button that can be clicked to trigger an action." |
| } |
| } |
| }, |
| "ImageButton": { |
| "description": "An image button with an onclick action.", |
| "properties": { |
| "icon": { |
| "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", |
| "enumDescriptions": [ |
| "", |
| "", |
| "", |
| "", |
| "", |
| "", |
| "", |
| "", |
| "", |
| "", |
| "", |
| "", |
| "", |
| "", |
| "", |
| "", |
| "", |
| "", |
| "", |
| "", |
| "", |
| "", |
| "", |
| "", |
| "", |
| "", |
| "", |
| "", |
| "", |
| "", |
| "" |
| ], |
| "description": "The icon specified by an enum that indices to an icon provided by Chat API." |
| }, |
| "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": { |
| "description": "The onclick action.", |
| "$ref": "OnClick" |
| }, |
| "iconUrl": { |
| "description": "The icon specified by a URL.", |
| "type": "string" |
| } |
| }, |
| "id": "ImageButton", |
| "type": "object" |
| }, |
| "Card": { |
| "type": "object", |
| "id": "Card", |
| "description": "A card is a UI element that can contain UI widgets such as texts, images.", |
| "properties": { |
| "name": { |
| "description": "Name of the card.", |
| "type": "string" |
| }, |
| "header": { |
| "description": "The header of the card. A header usually contains a title and an image.", |
| "$ref": "CardHeader" |
| }, |
| "cardActions": { |
| "items": { |
| "$ref": "CardAction" |
| }, |
| "type": "array", |
| "description": "The actions of this card." |
| }, |
| "sections": { |
| "description": "Sections are separated by a line divider.", |
| "type": "array", |
| "items": { |
| "$ref": "Section" |
| } |
| } |
| } |
| }, |
| "Membership": { |
| "id": "Membership", |
| "properties": { |
| "state": { |
| "type": "string", |
| "enum": [ |
| "MEMBERSHIP_STATE_UNSPECIFIED", |
| "JOINED", |
| "INVITED", |
| "NOT_A_MEMBER" |
| ], |
| "description": "State of the membership.", |
| "enumDescriptions": [ |
| "Default, do not use.", |
| "The user has joined the space.", |
| "The user has been invited, is able to join the space, but currently has not joined.", |
| "The user is not a member of the space, has not been invited and is not able to join the space." |
| ] |
| }, |
| "member": { |
| "description": "A User in Hangout Chat", |
| "$ref": "User" |
| }, |
| "name": { |
| "type": "string" |
| }, |
| "createTime": { |
| "format": "google-datetime", |
| "description": "The creation time of the membership a.k.a the time at which the member joined the space, if applicable.", |
| "type": "string" |
| } |
| }, |
| "type": "object", |
| "description": "Represents a membership relation in Hangouts Chat." |
| }, |
| "Annotation": { |
| "type": "object", |
| "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/107946847022116401880\", \"displayName\":\"FooBot\", \"avatarUrl\":\"https://goo.gl/aeDtrS\", \"type\":\"BOT\" }, \"type\":\"MENTION\" } }] ```", |
| "id": "Annotation", |
| "properties": { |
| "type": { |
| "enumDescriptions": [ |
| "Default value for the enum. DO NOT USE.", |
| "A user is mentioned.", |
| "A slash command is invoked." |
| ], |
| "enum": [ |
| "ANNOTATION_TYPE_UNSPECIFIED", |
| "USER_MENTION", |
| "SLASH_COMMAND" |
| ], |
| "type": "string", |
| "description": "The type of this annotation." |
| }, |
| "startIndex": { |
| "format": "int32", |
| "type": "integer", |
| "description": "Start index (0-based, inclusive) in the plain-text message body this annotation corresponds to." |
| }, |
| "length": { |
| "description": "Length of the substring in the plain-text message body this annotation corresponds to.", |
| "format": "int32", |
| "type": "integer" |
| }, |
| "slashCommand": { |
| "description": "The metadata for a slash command.", |
| "$ref": "SlashCommandMetadata" |
| }, |
| "userMention": { |
| "$ref": "UserMentionMetadata", |
| "description": "The metadata of user mention." |
| } |
| } |
| }, |
| "TextButton": { |
| "properties": { |
| "text": { |
| "type": "string", |
| "description": "The text of the button." |
| }, |
| "onClick": { |
| "$ref": "OnClick", |
| "description": "The onclick action of the button." |
| } |
| }, |
| "type": "object", |
| "id": "TextButton", |
| "description": "A button with text and onclick action." |
| }, |
| "AttachmentDataRef": { |
| "description": "A reference to the data of an attachment.", |
| "id": "AttachmentDataRef", |
| "properties": { |
| "resourceName": { |
| "type": "string", |
| "description": "The resource name of the attachment data. This is used with the media API to download the attachment data." |
| } |
| }, |
| "type": "object" |
| }, |
| "TextParagraph": { |
| "description": "A paragraph of text. Formatted text supported.", |
| "type": "object", |
| "id": "TextParagraph", |
| "properties": { |
| "text": { |
| "type": "string" |
| } |
| } |
| }, |
| "FormAction": { |
| "type": "object", |
| "description": "A form action describes the behavior when the form is submitted. For example, an Apps Script can be invoked to handle the form.", |
| "id": "FormAction", |
| "properties": { |
| "parameters": { |
| "items": { |
| "$ref": "ActionParameter" |
| }, |
| "description": "List of action parameters.", |
| "type": "array" |
| }, |
| "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 bot 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" |
| } |
| } |
| }, |
| "Thread": { |
| "properties": { |
| "name": { |
| "type": "string", |
| "description": "Resource name, in the form \"spaces/*/threads/*\". Example: spaces/AAAAMpdlehY/threads/UMxbHmzDlr4" |
| } |
| }, |
| "id": "Thread", |
| "type": "object", |
| "description": "A thread in Hangouts Chat." |
| }, |
| "DriveDataRef": { |
| "type": "object", |
| "description": "A reference to the data of a drive attachment.", |
| "properties": { |
| "driveFileId": { |
| "type": "string", |
| "description": "The id for the drive file, for use with the Drive API." |
| } |
| }, |
| "id": "DriveDataRef" |
| }, |
| "WidgetMarkup": { |
| "type": "object", |
| "properties": { |
| "buttons": { |
| "description": "A list of buttons. Buttons is also oneof data and only one of these fields should be set.", |
| "items": { |
| "$ref": "Button" |
| }, |
| "type": "array" |
| }, |
| "keyValue": { |
| "description": "Display a key value item in this widget.", |
| "$ref": "KeyValue" |
| }, |
| "image": { |
| "$ref": "Image", |
| "description": "Display an image in this widget." |
| }, |
| "textParagraph": { |
| "$ref": "TextParagraph", |
| "description": "Display a text paragraph in this widget." |
| } |
| }, |
| "description": "A widget is a UI element that presents texts, images, etc.", |
| "id": "WidgetMarkup" |
| }, |
| "OpenLink": { |
| "id": "OpenLink", |
| "description": "A link that opens a new window.", |
| "type": "object", |
| "properties": { |
| "url": { |
| "description": "The URL to open.", |
| "type": "string" |
| } |
| } |
| }, |
| "Button": { |
| "properties": { |
| "textButton": { |
| "$ref": "TextButton", |
| "description": "A button with text and onclick action." |
| }, |
| "imageButton": { |
| "description": "A button with image and onclick action.", |
| "$ref": "ImageButton" |
| } |
| }, |
| "description": "A button. Can be a text button or an image button.", |
| "type": "object", |
| "id": "Button" |
| }, |
| "ActionResponse": { |
| "id": "ActionResponse", |
| "description": "Parameters that a bot can use to configure how it's response is posted.", |
| "type": "object", |
| "properties": { |
| "url": { |
| "description": "URL for users to auth or config. (Only for REQUEST_CONFIG response types.)", |
| "type": "string" |
| }, |
| "type": { |
| "enum": [ |
| "TYPE_UNSPECIFIED", |
| "NEW_MESSAGE", |
| "UPDATE_MESSAGE", |
| "REQUEST_CONFIG" |
| ], |
| "description": "The type of bot response.", |
| "enumDescriptions": [ |
| "Default type; will be handled as NEW_MESSAGE.", |
| "Post as a new message in the topic.", |
| "Update the bot's own message. (Only after CARD_CLICKED events.)", |
| "Privately ask the user for additional auth or config." |
| ], |
| "type": "string" |
| } |
| } |
| }, |
| "OnClick": { |
| "type": "object", |
| "description": "An onclick action (e.g. open a link).", |
| "properties": { |
| "action": { |
| "$ref": "FormAction", |
| "description": "A form action will be triggered by this onclick if specified." |
| }, |
| "openLink": { |
| "description": "This onclick triggers an open link action if specified.", |
| "$ref": "OpenLink" |
| } |
| }, |
| "id": "OnClick" |
| }, |
| "SlashCommandMetadata": { |
| "properties": { |
| "bot": { |
| "$ref": "User", |
| "description": "The bot whose command was invoked." |
| }, |
| "triggersDialog": { |
| "type": "boolean", |
| "description": "Indicating whether the slash command is for a dialog." |
| }, |
| "type": { |
| "type": "string", |
| "enum": [ |
| "TYPE_UNSPECIFIED", |
| "ADD", |
| "INVOKE" |
| ], |
| "enumDescriptions": [ |
| "Default value for the enum. DO NOT USE.", |
| "Add bot to space.", |
| "Invoke slash command in space." |
| ], |
| "description": "The type of slash command." |
| }, |
| "commandId": { |
| "description": "The command id of the invoked slash command.", |
| "type": "string", |
| "format": "int64" |
| }, |
| "commandName": { |
| "type": "string", |
| "description": "The name of the invoked slash command." |
| } |
| }, |
| "type": "object", |
| "id": "SlashCommandMetadata", |
| "description": "Annotation metadata for slash commands (/)." |
| }, |
| "Attachment": { |
| "type": "object", |
| "description": "An attachment in Hangouts Chat.", |
| "properties": { |
| "contentName": { |
| "description": "The original file name for the content, not the full path.", |
| "type": "string" |
| }, |
| "source": { |
| "type": "string", |
| "enumDescriptions": [ |
| "", |
| "", |
| "" |
| ], |
| "enum": [ |
| "SOURCE_UNSPECIFIED", |
| "DRIVE_FILE", |
| "UPLOADED_CONTENT" |
| ], |
| "description": "The source of the attachment." |
| }, |
| "downloadUri": { |
| "description": "Output only. The download URL which should be used to allow a human user to download the attachment. Bots should not use this URL to download attachment content.", |
| "type": "string" |
| }, |
| "contentType": { |
| "type": "string", |
| "description": "The content type (MIME type) of the file." |
| }, |
| "driveDataRef": { |
| "$ref": "DriveDataRef", |
| "description": "A reference to the drive attachment. This is used with the Drive API." |
| }, |
| "name": { |
| "type": "string", |
| "description": "Resource name of the attachment, in the form \"spaces/*/messages/*/attachments/*\"." |
| }, |
| "attachmentDataRef": { |
| "description": "A reference to the attachment data. This is used with the media API to download the attachment data.", |
| "$ref": "AttachmentDataRef" |
| }, |
| "thumbnailUri": { |
| "type": "string", |
| "description": "Output only. The thumbnail URL which should be used to preview the attachment to a human user. Bots should not use this URL to download attachment content." |
| } |
| }, |
| "id": "Attachment" |
| }, |
| "Space": { |
| "properties": { |
| "type": { |
| "enum": [ |
| "TYPE_UNSPECIFIED", |
| "ROOM", |
| "DM" |
| ], |
| "enumDescriptions": [ |
| "", |
| "Multi-user spaces such as rooms and DMs between humans.", |
| "1:1 Direct Message between a human and a bot, where all messages are flat." |
| ], |
| "description": "Output only. The type of a space. This is deprecated. Use `single_user_bot_dm` instead.", |
| "type": "string" |
| }, |
| "displayName": { |
| "type": "string", |
| "description": "Output only. The display name (only if the space is a room). Please note that this field might not be populated in direct messages between humans." |
| }, |
| "singleUserBotDm": { |
| "type": "boolean", |
| "description": "Whether the space is a DM between a bot and a single human." |
| }, |
| "name": { |
| "type": "string", |
| "description": "Resource name of the space, in the form \"spaces/*\". Example: spaces/AAAAMpdlehYs" |
| }, |
| "threaded": { |
| "description": "Whether the messages are threaded in this space.", |
| "type": "boolean" |
| } |
| }, |
| "description": "A room or DM in Hangouts Chat.", |
| "type": "object", |
| "id": "Space" |
| }, |
| "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.", |
| "id": "CardAction", |
| "properties": { |
| "onClick": { |
| "description": "The onclick action for this action item.", |
| "$ref": "OnClick" |
| }, |
| "actionLabel": { |
| "type": "string", |
| "description": "The label used to be displayed in the action menu item." |
| } |
| }, |
| "type": "object" |
| }, |
| "CardHeader": { |
| "id": "CardHeader", |
| "type": "object", |
| "properties": { |
| "imageStyle": { |
| "enumDescriptions": [ |
| "", |
| "Square border.", |
| "Circular border." |
| ], |
| "type": "string", |
| "enum": [ |
| "IMAGE_STYLE_UNSPECIFIED", |
| "IMAGE", |
| "AVATAR" |
| ], |
| "description": "The image's type (e.g. square border or circular border)." |
| }, |
| "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" |
| }, |
| "subtitle": { |
| "description": "The subtitle of the card header.", |
| "type": "string" |
| }, |
| "imageUrl": { |
| "type": "string", |
| "description": "The URL of the image in the card header." |
| } |
| } |
| }, |
| "ActionParameter": { |
| "id": "ActionParameter", |
| "type": "object", |
| "properties": { |
| "key": { |
| "description": "The name of the parameter for the action script.", |
| "type": "string" |
| }, |
| "value": { |
| "description": "The value of the parameter.", |
| "type": "string" |
| } |
| }, |
| "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." |
| }, |
| "Section": { |
| "id": "Section", |
| "type": "object", |
| "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": { |
| "type": "string", |
| "description": "The header of the section, text formatted supported." |
| }, |
| "widgets": { |
| "items": { |
| "$ref": "WidgetMarkup" |
| }, |
| "type": "array", |
| "description": "A section must contain at least 1 widget." |
| } |
| } |
| }, |
| "Media": { |
| "description": "Media resource.", |
| "type": "object", |
| "id": "Media", |
| "properties": { |
| "resourceName": { |
| "description": "Name of the media resource.", |
| "type": "string" |
| } |
| } |
| }, |
| "DeprecatedEvent": { |
| "properties": { |
| "message": { |
| "$ref": "Message", |
| "description": "The message that triggered the event, if applicable." |
| }, |
| "threadKey": { |
| "type": "string", |
| "description": "The bot-defined key for the thread related to the event. See the thread_key field of the `spaces.message.create` request for more information." |
| }, |
| "user": { |
| "description": "The user that triggered the event.", |
| "$ref": "User" |
| }, |
| "space": { |
| "$ref": "Space", |
| "description": "The room or DM in which the event occurred." |
| }, |
| "token": { |
| "description": "A secret value that bots can use to verify if a request is from Google. The token is randomly generated by Google, remains static, and can be obtained from the Google Chat API configuration page in the Cloud Console. Developers can revoke/regenerate it if needed from the same page.", |
| "type": "string" |
| }, |
| "type": { |
| "enum": [ |
| "UNSPECIFIED", |
| "MESSAGE", |
| "ADDED_TO_SPACE", |
| "REMOVED_FROM_SPACE", |
| "CARD_CLICKED" |
| ], |
| "enumDescriptions": [ |
| "Default value for the enum. DO NOT USE.", |
| "A message was sent in a room or direct message.", |
| "The bot was added to a room or DM.", |
| "The bot was removed from a room or DM.", |
| "The bot's interactive card was clicked." |
| ], |
| "description": "The type of the event.", |
| "type": "string" |
| }, |
| "configCompleteRedirectUrl": { |
| "description": "The URL the bot should redirect the user to after they have completed an authorization or configuration flow outside of Google Chat. See the [Authorizing access to 3p services guide](/hangouts/chat/how-tos/auth-3p) for more information.", |
| "type": "string" |
| }, |
| "eventTime": { |
| "format": "google-datetime", |
| "type": "string", |
| "description": "The timestamp indicating when the event was dispatched." |
| }, |
| "action": { |
| "$ref": "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](/hangouts/chat/how-tos/cards-onclick) for more information." |
| } |
| }, |
| "description": "Google Chat events.", |
| "type": "object", |
| "id": "DeprecatedEvent" |
| }, |
| "User": { |
| "properties": { |
| "type": { |
| "description": "User type.", |
| "type": "string", |
| "enumDescriptions": [ |
| "Default value for the enum. DO NOT USE.", |
| "Human user.", |
| "Bot user." |
| ], |
| "enum": [ |
| "TYPE_UNSPECIFIED", |
| "HUMAN", |
| "BOT" |
| ] |
| }, |
| "domainId": { |
| "type": "string", |
| "description": "Obfuscated domain information." |
| }, |
| "name": { |
| "type": "string", |
| "description": "Resource name, in the format \"users/*\"." |
| }, |
| "displayName": { |
| "description": "The user's display name.", |
| "type": "string" |
| }, |
| "isAnonymous": { |
| "type": "boolean", |
| "description": "True when the user is deleted or the user's proifle is not visible." |
| } |
| }, |
| "id": "User", |
| "type": "object", |
| "description": "A user in Hangouts Chat." |
| }, |
| "ListSpacesResponse": { |
| "type": "object", |
| "id": "ListSpacesResponse", |
| "properties": { |
| "spaces": { |
| "description": "List of spaces in the requested (or first) page.", |
| "items": { |
| "$ref": "Space" |
| }, |
| "type": "array" |
| }, |
| "nextPageToken": { |
| "type": "string", |
| "description": "Continuation token to retrieve the next page of results. It will be empty for the last page of results. Tokens expire in an hour. An error is thrown if an expired token is passed." |
| } |
| } |
| }, |
| "Image": { |
| "id": "Image", |
| "description": "An image that is specified by a URL and can have an onclick action.", |
| "type": "object", |
| "properties": { |
| "imageUrl": { |
| "type": "string", |
| "description": "The URL of the image." |
| }, |
| "onClick": { |
| "$ref": "OnClick", |
| "description": "The onclick action." |
| }, |
| "aspectRatio": { |
| "type": "number", |
| "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" |
| } |
| } |
| }, |
| "SlashCommand": { |
| "id": "SlashCommand", |
| "type": "object", |
| "description": "A Slash Command in Hangouts Chat.", |
| "properties": { |
| "commandId": { |
| "description": "The id of the slash command invoked.", |
| "type": "string", |
| "format": "int64" |
| } |
| } |
| }, |
| "UserMentionMetadata": { |
| "id": "UserMentionMetadata", |
| "properties": { |
| "type": { |
| "description": "The type of user mention.", |
| "enumDescriptions": [ |
| "Default value for the enum. DO NOT USE.", |
| "Add user to space.", |
| "Mention user in space." |
| ], |
| "type": "string", |
| "enum": [ |
| "TYPE_UNSPECIFIED", |
| "ADD", |
| "MENTION" |
| ] |
| }, |
| "user": { |
| "description": "The user mentioned.", |
| "$ref": "User" |
| } |
| }, |
| "description": "Annotation metadata for user mentions (@).", |
| "type": "object" |
| } |
| }, |
| "documentationLink": "https://developers.google.com/hangouts/chat", |
| "id": "chat:v1" |
| } |