Types for Google Apps Chat v1 API¶
- class google.apps.chat_v1.types.AccessoryWidget(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.MessageOne or more interactive widgets that appear at the bottom of a message. For details, see Add interactive widgets at the bottom of a message.
- class google.apps.chat_v1.types.ActionResponse(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.MessageParameters that a Chat app can use to configure how its response is posted.
- type_¶
Input only. The type of Chat app response.
- url¶
Input only. URL for users to authenticate or configure. (Only for
REQUEST_CONFIGresponse types.)- Type
- dialog_action¶
Input only. A response to an interaction event related to a dialog. Must be accompanied by
ResponseType.Dialog.
- updated_widget¶
Input only. The response of the updated widget.
- class ResponseType(value)[source]¶
Bases:
proto.enums.EnumThe type of Chat app response.
- Values:
- TYPE_UNSPECIFIED (0):
Default type that’s handled as
NEW_MESSAGE.- NEW_MESSAGE (1):
Post as a new message in the topic.
- UPDATE_MESSAGE (2):
Update the Chat app’s message. This is only permitted on a
CARD_CLICKEDevent where the message sender type isBOT.- UPDATE_USER_MESSAGE_CARDS (6):
Update the cards on a user’s message. This is only permitted as a response to a
MESSAGEevent with a matched url, or aCARD_CLICKEDevent where the message sender type isHUMAN. Text is ignored.- REQUEST_CONFIG (3):
Privately ask the user for additional authentication or configuration.
- DIALOG (4):
Presents a dialog.
- UPDATE_WIDGET (7):
Widget text autocomplete options query.
- class SelectionItems(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.MessageList of widget autocomplete results.
- items¶
An array of the SelectionItem objects.
- Type
MutableSequence[google.apps.card_v1.types.SelectionInput.SelectionItem]
- class UpdatedWidget(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.MessageFor
selectionInputwidgets, returns autocomplete suggestions for a multiselect menu.
- class google.apps.chat_v1.types.ActionStatus(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.MessageRepresents the status for a request to either invoke or submit a dialog.
- status_code¶
The status code.
- Type
google.rpc.code_pb2.Code
- class google.apps.chat_v1.types.Annotation(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.MessageOutput only. Annotations can be associated with the plain-text body of the message or with chips that link to Google Workspace resources like Google Docs or Sheets with
start_indexandlengthof 0. To add basic formatting to a text message, see Format text messages.Example plain-text message body:
Hello @FooBot how are you!"
The corresponding annotations metadata:
"annotations":[{ "type":"USER_MENTION", "startIndex":6, "length":7, "userMention": { "user": { "name":"users/{user}", "displayName":"FooBot", "avatarUrl":"https://goo.gl/aeDtrS", "type":"BOT" }, "type":"MENTION" } }]
This message has oneof fields (mutually exclusive fields). For each oneof, at most one member field can be set at the same time. Setting any member of the oneof automatically clears all other members.
- type_¶
The type of this annotation.
- start_index¶
Start index (0-based, inclusive) in the plain-text message body this annotation corresponds to.
This field is a member of oneof
_start_index.- Type
- length¶
Length of the substring in the plain-text message body this annotation corresponds to. If not present, indicates a length of 0.
- Type
- class google.apps.chat_v1.types.AnnotationType(value)[source]¶
Bases:
proto.enums.EnumType of the annotation.
- Values:
- ANNOTATION_TYPE_UNSPECIFIED (0):
Default value for the enum. Don’t use.
- USER_MENTION (1):
A user is mentioned.
- SLASH_COMMAND (2):
A slash command is invoked.
- RICH_LINK (3):
A rich link annotation.
- CUSTOM_EMOJI (4):
A custom emoji annotation.
- class google.apps.chat_v1.types.AttachedGif(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.MessageA GIF image that’s specified by a URL.
- class google.apps.chat_v1.types.Attachment(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.MessageAn attachment in Google Chat.
This message has oneof fields (mutually exclusive fields). For each oneof, at most one member field can be set at the same time. Setting any member of the oneof automatically clears all other members.
- name¶
Optional. Resource name of the attachment, in the form
spaces/{space}/messages/{message}/attachments/{attachment}.- Type
- attachment_data_ref¶
Optional. A reference to the attachment data. This field is used to create or update messages with attachments, or with the media API to download the attachment data.
This field is a member of oneof
data_ref.
- drive_data_ref¶
Output only. A reference to the Google Drive attachment. This field is used with the Google Drive API.
This field is a member of oneof
data_ref.
- thumbnail_uri¶
Output only. The thumbnail URL which should be used to preview the attachment to a human user. Chat apps shouldn’t use this URL to download attachment content.
- Type
- download_uri¶
Output only. The download URL which should be used to allow a human user to download the attachment. Chat apps shouldn’t use this URL to download attachment content.
- Type
- source¶
Output only. The source of the attachment.
- class Source(value)[source]¶
Bases:
proto.enums.EnumThe source of the attachment.
- Values:
- SOURCE_UNSPECIFIED (0):
Reserved.
- DRIVE_FILE (1):
The file is a Google Drive file.
- UPLOADED_CONTENT (2):
The file is uploaded to Chat.
- class google.apps.chat_v1.types.AttachmentDataRef(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.MessageA reference to the attachment data.
- resource_name¶
Optional. The resource name of the attachment data. This field is used with the media API to download the attachment data.
- Type
- class google.apps.chat_v1.types.CalendarEventLinkData(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.MessageData for Calendar event links.
- calendar_id¶
The Calendar identifier of the linked Calendar.
- Type
- event_id¶
The Event identifier of the linked Calendar event.
- Type
- class google.apps.chat_v1.types.CardWithId(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.MessageA card in a Google Chat message.
Only Chat apps can create cards. If your Chat app authenticates as a user, the message can’t contain cards.
- card_id¶
Required if the message contains multiple cards. A unique identifier for a card in a message.
- Type
- card¶
A card. Maximum size is 32 KB.
- Type
google.apps.card_v1.types.Card
- class google.apps.chat_v1.types.ChatSpaceLinkData(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.MessageData for Chat space links.
- thread¶
The thread of the linked Chat space resource.
Format:
spaces/{space}/threads/{thread}- Type
- class google.apps.chat_v1.types.CompleteImportSpaceRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.MessageRequest message for completing the import process for a space.
- class google.apps.chat_v1.types.CompleteImportSpaceResponse(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.MessageResponse message for completing the import process for a space.
- space¶
The import mode space.
- class google.apps.chat_v1.types.ContextualAddOnMarkup(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.MessageThe markup for developers to specify the contents of a contextual AddOn.
- class Card(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.MessageA card is a UI element that can contain UI widgets such as text and images.
- header¶
The header of the card. A header usually contains a title and an image.
- sections¶
Sections are separated by a line divider.
- Type
MutableSequence[google.apps.chat_v1.types.ContextualAddOnMarkup.Card.Section]
- card_actions¶
The actions of this card.
- Type
MutableSequence[google.apps.chat_v1.types.ContextualAddOnMarkup.Card.CardAction]
- class CardAction(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.MessageA 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.
- on_click¶
The onclick action for this action item.
- class CardHeader(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message- title¶
The title must be specified. The header has a fixed height: if both a title and subtitle is specified, each takes up one line. If only the title is specified, it takes up both lines.
- Type
- image_style¶
The image’s type (for example, square border or circular border).
- class ImageStyle(value)[source]¶
Bases:
proto.enums.Enum- Values:
- IMAGE_STYLE_UNSPECIFIED (0):
No description available.
- IMAGE (1):
Square border.
- AVATAR (2):
Circular border.
- class Section(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.MessageA section contains a collection of widgets that are rendered (vertically) in the order that they are specified. Across all platforms, cards have a narrow fixed width, so there’s currently no need for layout properties (for example, float).
- header¶
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
- widgets¶
A section must contain at least one widget.
- Type
MutableSequence[google.apps.chat_v1.types.WidgetMarkup]
- class google.apps.chat_v1.types.CreateCustomEmojiRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.MessageA request to create a custom emoji.
- custom_emoji¶
Required. The custom emoji to create.
- class google.apps.chat_v1.types.CreateMembershipRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.MessageRequest message for creating a membership.
- parent¶
Required. The resource name of the space for which to create the membership.
Format: spaces/{space}
- Type
- membership¶
Required. The membership relation to create.
The
memberTypefield must contain a user with theuser.nameanduser.typefields populated. The server will assign a resource name and overwrite anything specified.When a Chat app creates a membership relation for a human user, it must use certain authorization scopes and set specific values for certain fields:
When authenticating as a user, the
chat.membershipsauthorization scope is required.When authenticating as an app, the
chat.app.membershipsauthorization scope is required.Set
user.typetoHUMAN, and setuser.namewith formatusers/{user}, where{user}can be the email address for the user. For users in the same Workspace organization{user}can also be theidof the person from the People API, or theidfor the user in the Directory API. For example, if the People API Person profile ID foruser@example.comis123456789, you can add the user to the space by setting themembership.member.nametousers/user@example.comorusers/123456789.
Inviting users external to the Workspace organization that owns the space requires user authentication.
When a Chat app creates a membership relation for itself, it must authenticate as a user and use the
chat.memberships.appscope, setuser.typetoBOT, and setuser.nametousers/app.
- use_admin_access¶
Optional. When
true, the method runs using the user’s Google Workspace administrator privileges.The calling user must be a Google Workspace administrator with the manage chat and spaces conversations privilege.
Requires the
chat.admin.membershipsOAuth 2.0 scope.Creating app memberships or creating memberships for users outside the administrator’s Google Workspace organization isn’t supported using admin access.
- Type
- class google.apps.chat_v1.types.CreateMessageRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.MessageCreates a message.
- parent¶
Required. The resource name of the space in which to create a message.
Format:
spaces/{space}- Type
- message¶
Required. Message body.
- thread_key¶
Optional. Deprecated: Use [thread.thread_key][google.chat.v1.Thread.thread_key] instead. ID for the thread. Supports up to 4000 characters. To start or add to a thread, create a message and specify a
threadKeyor the [thread.name][google.chat.v1.Thread.name]. For example usage, see Start or reply to a message thread.- Type
- request_id¶
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.
- Type
- message_reply_option¶
Optional. Specifies whether a message starts a thread or replies to one. Only supported in named spaces.
When responding to user interactions, this field is ignored. For interactions within a thread, the reply is created in the same thread. Otherwise, the reply is created as a new thread.
- message_id¶
Optional. A custom ID for a message. Lets Chat apps get, update, or delete a message without needing to store the system-assigned ID in the message’s resource name (represented in the message
namefield).The value for this field must meet the following requirements:
Begins with
client-. For example,client-custom-nameis a valid custom ID, butcustom-nameis not.Contains up to 63 characters and only lowercase letters, numbers, and hyphens.
Is unique within a space. A Chat app can’t use the same custom ID for different messages.
For details, see Name a message.
- Type
- class MessageReplyOption(value)[source]¶
Bases:
proto.enums.EnumSpecifies how to reply to a message. More states might be added in the future.
- Values:
- MESSAGE_REPLY_OPTION_UNSPECIFIED (0):
Default. Starts a new thread. Using this option ignores any [thread ID][google.chat.v1.Thread.name] or [
thread_key][google.chat.v1.Thread.thread_key] that’s included.- REPLY_MESSAGE_FALLBACK_TO_NEW_THREAD (1):
Creates the message as a reply to the thread specified by [thread ID][google.chat.v1.Thread.name] or [
thread_key][google.chat.v1.Thread.thread_key]. If it fails, the message starts a new thread instead.- REPLY_MESSAGE_OR_FAIL (2):
Creates the message as a reply to the thread specified by [thread ID][google.chat.v1.Thread.name] or [
thread_key][google.chat.v1.Thread.thread_key]. If a newthread_keyis used, a new thread is created. If the message creation fails, aNOT_FOUNDerror is returned instead.
- class google.apps.chat_v1.types.CreateReactionRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.MessageCreates a reaction to a message.
- parent¶
Required. The message where the reaction is created.
Format:
spaces/{space}/messages/{message}- Type
- reaction¶
Required. The reaction to create.
- class google.apps.chat_v1.types.CreateSpaceRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.MessageA request to create a named space with no members.
- space¶
Required. The
displayNameandspaceTypefields must be populated. OnlySpaceType.SPACEandSpaceType.GROUP_CHATare supported.SpaceType.GROUP_CHATcan only be used ifimportModeis set to true.If you receive the error message
ALREADY_EXISTS, try a differentdisplayName. An existing space within the Google Workspace organization might already use this display name.The space
nameis assigned on the server so anything specified in this field will be ignored.
- request_id¶
Optional. A unique identifier for this request. A random UUID is recommended. Specifying an existing request ID returns the space created with that ID instead of creating a new space. Specifying an existing request ID from the same Chat app with a different authenticated user returns an error.
- Type
- class google.apps.chat_v1.types.CustomEmoji(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.MessageRepresents a custom emoji.
- name¶
Identifier. The resource name of the custom emoji, assigned by the server.
Format:
customEmojis/{customEmoji}- Type
- emoji_name¶
Optional. Immutable. User-provided name for the custom emoji, which is unique within the organization.
Required when the custom emoji is created, output only otherwise.
Emoji names must start and end with colons, must be lowercase and can only contain alphanumeric characters, hyphens, and underscores. Hyphens and underscores should be used to separate words and cannot be used consecutively.
Example:
:valid-emoji-name:- Type
- temporary_image_uri¶
Output only. A temporary image URL for the custom emoji, valid for at least 10 minutes. Note that this is not populated in the response when the custom emoji is created.
- Type
- payload¶
Optional. Input only. Payload data. Required when the custom emoji is created.
- class CustomEmojiPayload(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.MessagePayload data for the custom emoji.
- file_content¶
Required. Input only. The image used for the custom emoji. The payload must be under 256 KB and the dimension of the image must be square and between 64 and 500 pixels. The restrictions are subject to change.
- Type
- class google.apps.chat_v1.types.CustomEmojiMetadata(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.MessageAnnotation metadata for custom emoji.
- custom_emoji¶
The custom emoji.
- class google.apps.chat_v1.types.DeleteCustomEmojiRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.MessageRequest for deleting a custom emoji.
- class google.apps.chat_v1.types.DeleteMembershipRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.MessageRequest to delete a membership in a space.
- name¶
Required. Resource name of the membership to delete. Chat apps can delete human users’ or their own memberships. Chat apps can’t delete other apps’ memberships.
When deleting a human membership, requires the
chat.membershipsscope with user authentication or thechat.memberships.appscope with app authentication and thespaces/{space}/members/{member}format. You can use the email as an alias for{member}. For example,spaces/{space}/members/example@gmail.comwhereexample@gmail.comis the email of the Google Chat user.When deleting an app membership, requires the
chat.memberships.appscope andspaces/{space}/members/appformat.Format:
spaces/{space}/members/{member}orspaces/{space}/members/app.- Type
- use_admin_access¶
Optional. When
true, the method runs using the user’s Google Workspace administrator privileges.The calling user must be a Google Workspace administrator with the manage chat and spaces conversations privilege.
Requires the
chat.admin.membershipsOAuth 2.0 scope.Deleting app memberships in a space isn’t supported using admin access.
- Type
- class google.apps.chat_v1.types.DeleteMessageRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.MessageRequest to delete a message.
- name¶
Required. Resource name of the message.
Format:
spaces/{space}/messages/{message}If you’ve set a custom ID for your message, you can use the value from the
clientAssignedMessageIdfield for{message}. For details, see [Name a message] (https://developers.google.com/workspace/chat/create-messages#name_a_created_message).- Type
- force¶
Optional. When
true, deleting a message also deletes its threaded replies. Whenfalse, if a message has threaded replies, deletion fails.Only applies when authenticating as a user. Has no effect when [authenticating as a Chat app] (https://developers.google.com/workspace/chat/authenticate-authorize-chat-app).
- Type
- class google.apps.chat_v1.types.DeleteReactionRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.MessageDeletes a reaction to a message.
- class google.apps.chat_v1.types.DeleteSpaceRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.MessageRequest for deleting a space.
- use_admin_access¶
Optional. When
true, the method runs using the user’s Google Workspace administrator privileges.The calling user must be a Google Workspace administrator with the manage chat and spaces conversations privilege.
Requires the
chat.admin.deleteOAuth 2.0 scope.- Type
- class google.apps.chat_v1.types.DeletionMetadata(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.MessageInformation about a deleted message. A message is deleted when
delete_timeis set.- deletion_type¶
Indicates who deleted the message.
- class DeletionType(value)[source]¶
Bases:
proto.enums.EnumWho deleted the message and how it was deleted. More values may be added in the future. See Edit or delete a message in Google Chat for details on when messages can be deleted.
- Values:
- DELETION_TYPE_UNSPECIFIED (0):
This value is unused.
- CREATOR (1):
User deleted their own message.
- SPACE_OWNER (2):
An owner or manager deleted the message.
- ADMIN (3):
A Google Workspace administrator deleted the message. Administrators can delete any message in the space, including messages sent by any space member or Chat app.
- APP_MESSAGE_EXPIRY (4):
A Chat app deleted its own message when it expired.
- CREATOR_VIA_APP (5):
A Chat app deleted the message on behalf of the creator (using user authentication).
- SPACE_OWNER_VIA_APP (6):
A Chat app deleted the message on behalf of a space manager (using user authentication).
- SPACE_MEMBER (7):
A member of the space deleted the message. Users can delete messages sent by apps.
- class google.apps.chat_v1.types.Dialog(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.MessageWrapper around the card body of the dialog.
- body¶
Input only. Body of the dialog, which is rendered in a modal. Google Chat apps don’t support the following card entities:
DateTimePicker,OnChangeAction.- Type
google.apps.card_v1.types.Card
- class google.apps.chat_v1.types.DialogAction(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.MessageContains a dialog and request status code.
- class google.apps.chat_v1.types.DriveDataRef(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.MessageA reference to the data of a drive attachment.
- class google.apps.chat_v1.types.DriveLinkData(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.MessageData for Google Drive links.
- drive_data_ref¶
A DriveDataRef which references a Google Drive file.
- class google.apps.chat_v1.types.Emoji(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.MessageAn emoji that is used as a reaction to a message.
This message has oneof fields (mutually exclusive fields). For each oneof, at most one member field can be set at the same time. Setting any member of the oneof automatically clears all other members.
- unicode¶
Optional. A basic emoji represented by a unicode string.
This field is a member of oneof
content.- Type
- class google.apps.chat_v1.types.EmojiReactionSummary(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.MessageThe number of people who reacted to a message with a specific emoji.
- emoji¶
Output only. Emoji associated with the reactions.
- class google.apps.chat_v1.types.FindDirectMessageRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.MessageA request to get direct message space based on the user resource.
- name¶
Required. Resource name of the user to find direct message with.
Format:
users/{user}, where{user}is either theidfor the person from the People API, or theidfor the user in the Directory API. For example, if the People API profile ID is123456789, you can find a direct message with that person by usingusers/123456789as thename. When authenticated as a user, you can use the email as an alias for{user}. For example,users/example@gmail.comwhereexample@gmail.comis the email of the Google Chat user.- Type
- class google.apps.chat_v1.types.GetAttachmentRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.MessageRequest to get an attachment.
- class google.apps.chat_v1.types.GetCustomEmojiRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.MessageA request to return a single custom emoji.
- class google.apps.chat_v1.types.GetMembershipRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.MessageRequest to get a membership of a space.
- name¶
Required. Resource name of the membership to retrieve.
To get the app’s own membership by using user authentication, you can optionally use
spaces/{space}/members/app.Format:
spaces/{space}/members/{member}orspaces/{space}/members/appYou can use the user’s email as an alias for
{member}. For example,spaces/{space}/members/example@gmail.comwhereexample@gmail.comis the email of the Google Chat user.- Type
- use_admin_access¶
Optional. When
true, the method runs using the user’s Google Workspace administrator privileges.The calling user must be a Google Workspace administrator with the manage chat and spaces conversations privilege.
Requires the
chat.admin.membershipsorchat.admin.memberships.readonlyOAuth 2.0 scopes.Getting app memberships in a space isn’t supported when using admin access.
- Type
- class google.apps.chat_v1.types.GetMessageRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.MessageRequest to get a message.
- name¶
Required. Resource name of the message.
Format:
spaces/{space}/messages/{message}If you’ve set a custom ID for your message, you can use the value from the
clientAssignedMessageIdfield for{message}. For details, see [Name a message] (https://developers.google.com/workspace/chat/create-messages#name_a_created_message).- Type
- class google.apps.chat_v1.types.GetSpaceEventRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.MessageRequest message for getting a space event.
- class google.apps.chat_v1.types.GetSpaceNotificationSettingRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.MessageRequest message to get space notification setting. Only supports getting notification setting for the calling user.
- name¶
Required. Format: users/{user}/spaces/{space}/spaceNotificationSetting
users/me/spaces/{space}/spaceNotificationSetting, ORusers/user@example.com/spaces/{space}/spaceNotificationSetting, ORusers/123456789/spaces/{space}/spaceNotificationSetting. Note: Only the caller’s user id or email is allowed in the path.
- Type
- class google.apps.chat_v1.types.GetSpaceReadStateRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.MessageRequest message for GetSpaceReadState API.
- name¶
Required. Resource name of the space read state to retrieve.
Only supports getting read state for the calling user.
To refer to the calling user, set one of the following:
The
mealias. For example,users/me/spaces/{space}/spaceReadState.Their Workspace email address. For example,
users/user@example.com/spaces/{space}/spaceReadState.Their user id. For example,
users/123456789/spaces/{space}/spaceReadState.
Format: users/{user}/spaces/{space}/spaceReadState
- Type
- class google.apps.chat_v1.types.GetSpaceRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.MessageA request to return a single space.
- name¶
Required. Resource name of the space, in the form
spaces/{space}.Format:
spaces/{space}- Type
- use_admin_access¶
Optional. When
true, the method runs using the user’s Google Workspace administrator privileges.The calling user must be a Google Workspace administrator with the manage chat and spaces conversations privilege.
Requires the
chat.admin.spacesorchat.admin.spaces.readonlyOAuth 2.0 scopes.- Type
- class google.apps.chat_v1.types.GetThreadReadStateRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.MessageRequest message for GetThreadReadStateRequest API.
- name¶
Required. Resource name of the thread read state to retrieve.
Only supports getting read state for the calling user.
To refer to the calling user, set one of the following:
The
mealias. For example,users/me/spaces/{space}/threads/{thread}/threadReadState.Their Workspace email address. For example,
users/user@example.com/spaces/{space}/threads/{thread}/threadReadState.Their user id. For example,
users/123456789/spaces/{space}/threads/{thread}/threadReadState.
Format: users/{user}/spaces/{space}/threads/{thread}/threadReadState
- Type
- class google.apps.chat_v1.types.Group(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.MessageA Google Group in Google Chat.
- class google.apps.chat_v1.types.HistoryState(value)[source]¶
Bases:
proto.enums.EnumThe history state for messages and spaces. Specifies how long messages and conversation threads are kept after creation.
- Values:
- HISTORY_STATE_UNSPECIFIED (0):
Default value. Do not use.
- HISTORY_OFF (1):
History off. Messages and threads are kept for 24 hours.
- HISTORY_ON (2):
History on. The organization’s Vault retention rules specify for how long messages and threads are kept.
- class google.apps.chat_v1.types.ListCustomEmojisRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.MessageA request to return a list of custom emojis.
- page_size¶
Optional. The maximum number of custom emojis returned. The service can return fewer custom emojis than this value. If unspecified, the default value is 25. The maximum value is 200; values above 200 are changed to 200.
- Type
- page_token¶
Optional. (If resuming from a previous query.) A page token received from a previous list custom emoji call. Provide this to retrieve the subsequent page.
When paginating, the filter value should match the call that provided the page token. Passing a different value might lead to unexpected results.
- Type
- filter¶
Optional. A query filter.
Supports filtering by creator.
To filter by creator, you must specify a valid value. Currently only
creator("users/me")andNOT creator("users/me")are accepted to filter custom emojis by whether they were created by the calling user or not.For example, the following query returns custom emojis created by the caller:
creator("users/me")
Invalid queries are rejected with an
INVALID_ARGUMENTerror.- Type
- class google.apps.chat_v1.types.ListCustomEmojisResponse(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.MessageA response to list custom emojis.
- custom_emojis¶
Unordered list. List of custom emojis.
- Type
MutableSequence[google.apps.chat_v1.types.CustomEmoji]
- class google.apps.chat_v1.types.ListMembershipsRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.MessageRequest message for listing memberships.
- parent¶
Required. The resource name of the space for which to fetch a membership list.
Format: spaces/{space}
- Type
- page_size¶
Optional. The maximum number of memberships to return. The service might return fewer than this value.
If unspecified, at most 100 memberships are returned.
The maximum value is 1000. If you use a value more than 1000, it’s automatically changed to 1000.
Negative values return an
INVALID_ARGUMENTerror.- Type
- page_token¶
Optional. A page token, received from a previous call to list memberships. Provide this parameter to retrieve the subsequent page.
When paginating, all other parameters provided should match the call that provided the page token. Passing different values to the other parameters might lead to unexpected results.
- Type
- filter¶
Optional. A query filter.
You can filter memberships by a member’s role (
`role<https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.members#membershiprole>`__) and type (`member.type<https://developers.google.com/workspace/chat/api/reference/rest/v1/User#type>`__).To filter by role, set
roletoROLE_MEMBERorROLE_MANAGER.To filter by type, set
member.typetoHUMANorBOT. You can also filter formember.typeusing the!=operator.To filter by both role and type, use the
ANDoperator. To filter by either role or type, use theORoperator.Either
member.type = "HUMAN"ormember.type != "BOT"is required whenuse_admin_accessis set to true. Other member type filters will be rejected.For example, the following queries are valid:
role = "ROLE_MANAGER" OR role = "ROLE_MEMBER" member.type = "HUMAN" AND role = "ROLE_MANAGER" member.type != "BOT"
The following queries are invalid:
member.type = "HUMAN" AND member.type = "BOT" role = "ROLE_MANAGER" AND role = "ROLE_MEMBER"
Invalid queries are rejected by the server with an
INVALID_ARGUMENTerror.- Type
- show_groups¶
Optional. When
true, also returns memberships associated with a [Google Group][google.chat.v1.Membership.group_member], in addition to other types of memberships. If a [filter][google.chat.v1.ListMembershipsRequest.filter] is set, [Google Group][google.chat.v1.Membership.group_member] memberships that don’t match the filter criteria aren’t returned.- Type
- show_invited¶
Optional. When
true, also returns memberships associated with [invited][google.chat.v1.Membership.MembershipState.INVITED] members, in addition to other types of memberships. If a filter is set, [invited][google.chat.v1.Membership.MembershipState.INVITED] memberships that don’t match the filter criteria aren’t returned.Currently requires user authentication.
- Type
- use_admin_access¶
Optional. When
true, the method runs using the user’s Google Workspace administrator privileges.The calling user must be a Google Workspace administrator with the manage chat and spaces conversations privilege.
Requires either the
chat.admin.memberships.readonlyorchat.admin.membershipsOAuth 2.0 scope.Listing app memberships in a space isn’t supported when using admin access.
- Type
- class google.apps.chat_v1.types.ListMembershipsResponse(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.MessageResponse to list memberships of the space.
- memberships¶
Unordered list. List of memberships in the requested (or first) page.
- Type
MutableSequence[google.apps.chat_v1.types.Membership]
- class google.apps.chat_v1.types.ListMessagesRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.MessageLists messages in the specified space, that the user is a member of.
- parent¶
Required. The resource name of the space to list messages from.
Format:
spaces/{space}- Type
- page_size¶
Optional. The maximum number of messages returned. The service might return fewer messages than this value.
If unspecified, at most 25 are returned.
The maximum value is 1000. If you use a value more than 1000, it’s automatically changed to 1000.
Negative values return an
INVALID_ARGUMENTerror.- Type
- page_token¶
Optional. A page token received from a previous list messages call. Provide this parameter to retrieve the subsequent page.
When paginating, all other parameters provided should match the call that provided the page token. Passing different values to the other parameters might lead to unexpected results.
- Type
- filter¶
Optional. A query filter.
You can filter messages by date (
create_time) and thread (thread.name).To filter messages by the date they were created, specify the
create_timewith a timestamp in RFC-3339 format and double quotation marks. For example,"2023-04-21T11:30:00-04:00". You can use the greater than operator>to list messages that were created after a timestamp, or the less than operator<to list messages that were created before a timestamp. To filter messages within a time interval, use theANDoperator between two timestamps.To filter by thread, specify the
thread.name, formatted asspaces/{space}/threads/{thread}. You can only specify onethread.nameper query.To filter by both thread and date, use the
ANDoperator in your query.For example, the following queries are valid:
create_time > "2012-04-21T11:30:00-04:00" create_time > "2012-04-21T11:30:00-04:00" AND thread.name = spaces/AAAAAAAAAAA/threads/123 create_time > "2012-04-21T11:30:00+00:00" AND create_time < "2013-01-01T00:00:00+00:00" AND thread.name = spaces/AAAAAAAAAAA/threads/123 thread.name = spaces/AAAAAAAAAAA/threads/123
Invalid queries are rejected by the server with an
INVALID_ARGUMENTerror.- Type
- order_by¶
Optional. How the list of messages is ordered. Specify a value to order by an ordering operation. Valid ordering operation values are as follows:
ASCfor ascending.DESCfor descending.
The default ordering is
create_time ASC.- Type
- class google.apps.chat_v1.types.ListMessagesResponse(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.MessageResponse message for listing messages.
- messages¶
List of messages.
- Type
MutableSequence[google.apps.chat_v1.types.Message]
- class google.apps.chat_v1.types.ListReactionsRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.MessageLists reactions to a message.
- page_size¶
Optional. The maximum number of reactions returned. The service can return fewer reactions than this value. If unspecified, the default value is 25. The maximum value is 200; values above 200 are changed to 200.
- Type
- page_token¶
Optional. (If resuming from a previous query.) A page token received from a previous list reactions call. Provide this to retrieve the subsequent page.
When paginating, the filter value should match the call that provided the page token. Passing a different value might lead to unexpected results.
- Type
- filter¶
Optional. A query filter.
You can filter reactions by emoji (either
emoji.unicodeoremoji.custom_emoji.uid) and user (user.name).To filter reactions for multiple emojis or users, join similar fields with the
ORoperator, such asemoji.unicode = "🙂" OR emoji.unicode = "👍"anduser.name = "users/AAAAAA" OR user.name = "users/BBBBBB".To filter reactions by emoji and user, use the
ANDoperator, such asemoji.unicode = "🙂" AND user.name = "users/AAAAAA".If your query uses both
ANDandOR, group them with parentheses.For example, the following queries are valid:
user.name = "users/{user}" emoji.unicode = "🙂" emoji.custom_emoji.uid = "{uid}" emoji.unicode = "🙂" OR emoji.unicode = "👍" emoji.unicode = "🙂" OR emoji.custom_emoji.uid = "{uid}" emoji.unicode = "🙂" AND user.name = "users/{user}" (emoji.unicode = "🙂" OR emoji.custom_emoji.uid = "{uid}") AND user.name = "users/{user}"
The following queries are invalid:
emoji.unicode = "🙂" AND emoji.unicode = "👍" emoji.unicode = "🙂" AND emoji.custom_emoji.uid = "{uid}" emoji.unicode = "🙂" OR user.name = "users/{user}" emoji.unicode = "🙂" OR emoji.custom_emoji.uid = "{uid}" OR user.name = "users/{user}" emoji.unicode = "🙂" OR emoji.custom_emoji.uid = "{uid}" AND user.name = "users/{user}"
Invalid queries are rejected with an
INVALID_ARGUMENTerror.- Type
- class google.apps.chat_v1.types.ListReactionsResponse(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.MessageResponse to a list reactions request.
- reactions¶
List of reactions in the requested (or first) page.
- Type
MutableSequence[google.apps.chat_v1.types.Reaction]
- class google.apps.chat_v1.types.ListSpaceEventsRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.MessageRequest message for listing space events.
- parent¶
Required. Resource name of the Google Chat space where the events occurred.
Format:
spaces/{space}.- Type
- page_size¶
Optional. The maximum number of space events returned. The service might return fewer than this value.
Negative values return an
INVALID_ARGUMENTerror.- Type
- page_token¶
Optional. A page token, received from a previous list space events call. Provide this to retrieve the subsequent page.
When paginating, all other parameters provided to list space events must match the call that provided the page token. Passing different values to the other parameters might lead to unexpected results.
- Type
- filter¶
Required. A query filter.
You must specify at least one event type (
event_type) using the has:operator. To filter by multiple event types, use theORoperator. Omit batch event types in your filter. The request automatically returns any related batch events. For example, if you filter by new reactions (google.workspace.chat.reaction.v1.created), the server also returns batch new reactions events (google.workspace.chat.reaction.v1.batchCreated). For a list of supported event types, see the`SpaceEventsreference documentation <https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.spaceEvents#SpaceEvent.FIELDS.event_type>`__.Optionally, you can also filter by start time (
start_time) and end time (end_time):start_time: Exclusive timestamp from which to start listing space events. You can list events that occurred up to 28 days ago. If unspecified, lists space events from the past 28 days.end_time: Inclusive timestamp until which space events are listed. If unspecified, lists events up to the time of the request.
To specify a start or end time, use the equals
=operator and format in RFC-3339. To filter by bothstart_timeandend_time, use theANDoperator.For example, the following queries are valid:
start_time="2023-08-23T19:20:33+00:00" AND end_time="2023-08-23T19:21:54+00:00"
start_time="2023-08-23T19:20:33+00:00" AND (event_types:"google.workspace.chat.space.v1.updated" OR event_types:"google.workspace.chat.message.v1.created")
The following queries are invalid:
start_time="2023-08-23T19:20:33+00:00" OR end_time="2023-08-23T19:21:54+00:00"
event_types:"google.workspace.chat.space.v1.updated" AND event_types:"google.workspace.chat.message.v1.created"
Invalid queries are rejected by the server with an
INVALID_ARGUMENTerror.- Type
- class google.apps.chat_v1.types.ListSpaceEventsResponse(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.MessageResponse message for listing space events.
- space_events¶
Results are returned in chronological order (oldest event first). Note: The
permissionSettingsfield is not returned in the Space object for list requests.- Type
MutableSequence[google.apps.chat_v1.types.SpaceEvent]
- class google.apps.chat_v1.types.ListSpacesRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.MessageA request to list the spaces the caller is a member of.
- page_size¶
Optional. The maximum number of spaces to return. The service might return fewer than this value.
If unspecified, at most 100 spaces are returned.
The maximum value is 1000. If you use a value more than 1000, it’s automatically changed to 1000.
Negative values return an
INVALID_ARGUMENTerror.- Type
- page_token¶
Optional. A page token, received from a previous list spaces call. Provide this parameter to retrieve the subsequent page.
When paginating, the filter value should match the call that provided the page token. Passing a different value may lead to unexpected results.
- Type
- filter¶
Optional. A query filter.
You can filter spaces by the space type (
`space_type<https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces#spacetype>`__).To filter by space type, you must specify valid enum value, such as
SPACEorGROUP_CHAT(thespace_typecan’t beSPACE_TYPE_UNSPECIFIED). To query for multiple space types, use theORoperator.For example, the following queries are valid:
space_type = "SPACE" spaceType = "GROUP_CHAT" OR spaceType = "DIRECT_MESSAGE"
Invalid queries are rejected by the server with an
INVALID_ARGUMENTerror.- Type
- class google.apps.chat_v1.types.ListSpacesResponse(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.MessageThe response for a list spaces request.
- spaces¶
List of spaces in the requested (or first) page. Note: The
permissionSettingsfield is not returned in the Space object for list requests.- Type
MutableSequence[google.apps.chat_v1.types.Space]
- class google.apps.chat_v1.types.MatchedUrl(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.MessageA matched URL in a Chat message. Chat apps can preview matched URLs. For more information, see Preview links.
- class google.apps.chat_v1.types.MeetSpaceLinkData(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.MessageData for Meet space links.
- type_¶
Indicates the type of the Meet space.
- huddle_status¶
Optional. Output only. If the Meet is a Huddle, indicates the status of the huddle. Otherwise, this is unset.
- class HuddleStatus(value)[source]¶
Bases:
proto.enums.EnumThe status of the huddle
- Values:
- HUDDLE_STATUS_UNSPECIFIED (0):
Default value for the enum. Don’t use.
- STARTED (1):
The huddle has started.
- ENDED (2):
The huddle has ended. In this case the Meet space URI and identifiers will no longer be valid.
- MISSED (3):
The huddle has been missed. In this case the Meet space URI and identifiers will no longer be valid.
- class Type(value)[source]¶
Bases:
proto.enums.EnumThe type of the Meet space.
- Values:
- TYPE_UNSPECIFIED (0):
Default value for the enum. Don’t use.
- MEETING (1):
The Meet space is a meeting.
- HUDDLE (2):
The Meet space is a huddle.
- class google.apps.chat_v1.types.Membership(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.MessageRepresents a membership relation in Google Chat, such as whether a user or Chat app is invited to, part of, or absent from a space.
This message has oneof fields (mutually exclusive fields). For each oneof, at most one member field can be set at the same time. Setting any member of the oneof automatically clears all other members.
- name¶
Identifier. Resource name of the membership, assigned by the server.
Format:
spaces/{space}/members/{member}- Type
- state¶
Output only. State of the membership.
- role¶
Optional. User’s role within a Chat space, which determines their permitted actions in the space.
This field can only be used as input in
UpdateMembership.
- member¶
Optional. The Google Chat user or app the membership corresponds to. If your Chat app authenticates as a user, the output populates the user
nameandtype.This field is a member of oneof
memberType.
- group_member¶
Optional. The Google Group the membership corresponds to.
Reading or mutating memberships for Google Groups requires user authentication.
This field is a member of oneof
memberType.
- create_time¶
Optional. Immutable. The creation time of the membership, such as when a member joined or was invited to join a space. This field is output only, except when used to import historical memberships in import mode spaces.
- delete_time¶
Optional. Immutable. The deletion time of the membership, such as when a member left or was removed from a space. This field is output only, except when used to import historical memberships in import mode spaces.
- class MembershipRole(value)[source]¶
Bases:
proto.enums.EnumRepresents a user’s permitted actions in a Chat space. More enum values might be added in the future.
- Values:
- MEMBERSHIP_ROLE_UNSPECIFIED (0):
Default value. For [users][google.chat.v1.Membership.member]: they aren’t a member of the space, but can be invited. For [Google Groups][google.chat.v1.Membership.group_member]: they’re always assigned this role (other enum values might be used in the future).
- ROLE_MEMBER (1):
A member of the space. In the Chat UI, this role is called Member.
The user has basic permissions, like sending messages to the space. Managers and owners can grant members additional permissions in a space, including:
Add or remove members.
Modify space details.
Turn history on or off.
Mention everyone in the space with
@all.Manage Chat apps and webhooks installed in the space.
In direct messages and unnamed group conversations, everyone has this role.
- ROLE_MANAGER (2):
A space owner. In the Chat UI, this role is called Owner.
The user has the complete set of space permissions to manage the space, including:
Change the role of other members in the space to member, manager, or owner.
Delete the space.
Only supported in [SpaceType.SPACE][google.chat.v1.Space.SpaceType] (named spaces).
To learn more, see Learn more about your role as a space owner or manager.
- ROLE_ASSISTANT_MANAGER (4):
A space manager. In the Chat UI, this role is called Manager.
The user has all basic permissions of
ROLE_MEMBER, and can be granted a subset of administrative permissions by an owner. By default, managers have all the permissions of an owner except for the ability to:Delete the space.
Make another space member an owner.
Change an owner’s role.
By default, managers permissions include but aren’t limited to:
Make another member a manager.
Delete messages in the space.
Manage space permissions.
Receive notifications for requests to join the space if the manager has the “manage members” permission in the space settings.
Make a space discoverable.
Only supported in [SpaceType.SPACE][google.chat.v1.Space.SpaceType] (named spaces).
To learn more, see Manage space settings.
- class MembershipState(value)[source]¶
Bases:
proto.enums.EnumSpecifies the member’s relationship with a space. Other membership states might be supported in the future.
- Values:
- MEMBERSHIP_STATE_UNSPECIFIED (0):
Default value. Don’t use.
- JOINED (1):
The user is added to the space, and can participate in the space.
- INVITED (2):
The user is invited to join the space, but hasn’t joined it.
- NOT_A_MEMBER (3):
The user doesn’t belong to the space and doesn’t have a pending invitation to join the space.
- class google.apps.chat_v1.types.MembershipBatchCreatedEventData(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.MessageEvent payload for multiple new memberships.
Event type:
google.workspace.chat.membership.v1.batchCreated- memberships¶
A list of new memberships.
- Type
MutableSequence[google.apps.chat_v1.types.MembershipCreatedEventData]
- class google.apps.chat_v1.types.MembershipBatchDeletedEventData(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.MessageEvent payload for multiple deleted memberships.
Event type:
google.workspace.chat.membership.v1.batchDeleted- memberships¶
A list of deleted memberships.
- Type
MutableSequence[google.apps.chat_v1.types.MembershipDeletedEventData]
- class google.apps.chat_v1.types.MembershipBatchUpdatedEventData(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.MessageEvent payload for multiple updated memberships.
Event type:
google.workspace.chat.membership.v1.batchUpdated- memberships¶
A list of updated memberships.
- Type
MutableSequence[google.apps.chat_v1.types.MembershipUpdatedEventData]
- class google.apps.chat_v1.types.MembershipCreatedEventData(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.MessageEvent payload for a new membership.
Event type:
google.workspace.chat.membership.v1.created.- membership¶
The new membership.
- class google.apps.chat_v1.types.MembershipDeletedEventData(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.MessageEvent payload for a deleted membership.
Event type:
google.workspace.chat.membership.v1.deleted- membership¶
The deleted membership. Only the
nameandstatefields are populated.
- class google.apps.chat_v1.types.MembershipUpdatedEventData(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.MessageEvent payload for an updated membership.
Event type:
google.workspace.chat.membership.v1.updated- membership¶
The updated membership.
- class google.apps.chat_v1.types.Message(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.MessageA message in a Google Chat space.
- name¶
Identifier. Resource name of the message.
Format:
spaces/{space}/messages/{message}Where
{space}is the ID of the space where the message is posted and{message}is a system-assigned ID for the message. For example,spaces/AAAAAAAAAAA/messages/BBBBBBBBBBB.BBBBBBBBBBB.If you set a custom ID when you create a message, you can use this ID to specify the message in a request by replacing
{message}with the value from theclientAssignedMessageIdfield. For example,spaces/AAAAAAAAAAA/messages/client-custom-name. For details, see Name a message.- Type
- sender¶
Output only. The user who created the message. If your Chat app authenticates as a user, the output populates the user
nameandtype.
- create_time¶
Optional. Immutable. For spaces created in Chat, the time at which the message was created. This field is output only, except when used in import mode spaces.
For import mode spaces, set this field to the historical timestamp at which the message was created in the source in order to preserve the original creation time.
- last_update_time¶
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.
- delete_time¶
Output only. The time at which the message was deleted in Google Chat. If the message is never deleted, this field is empty.
- text¶
Optional. Plain-text body of the message. The first link to an image, video, or web page generates a preview chip. You can also @mention a Google Chat user, or everyone in the space.
To learn about creating text messages, see Send a message.
- Type
- formatted_text¶
Output only. Contains the message
textwith markups added to communicate formatting. This field might not capture all formatting visible in the UI, but includes the following:Markup syntax for bold, italic, strikethrough, monospace, monospace block, and bulleted list.
User mentions using the format
<users/{user}>.Custom hyperlinks using the format
<{url}|{rendered_text}>where the first string is the URL and the second is the rendered text—for example,<http://example.com|custom text>.Custom emoji using the format
:{emoji_name}:—for example,:smile:. This doesn’t apply to Unicode emoji, such asU+1F600for a grinning face emoji.
For more information, see View text formatting sent in a message
- Type
- cards¶
Deprecated: Use
cards_v2instead.Rich, formatted, and interactive cards that you can use to display UI elements such as: formatted texts, buttons, and clickable images. Cards are normally displayed below the plain-text body of the message.
cardsandcards_v2can have a maximum size of 32 KB.- Type
MutableSequence[google.apps.chat_v1.types.ContextualAddOnMarkup.Card]
- cards_v2¶
Optional. An array of cards.
Only Chat apps can create cards. If your Chat app authenticates as a user, the messages can’t contain cards.
To learn how to create a message that contains cards, see Send a message.
- Type
MutableSequence[google.apps.chat_v1.types.CardWithId]
- annotations¶
Output only. Annotations can be associated with the plain-text body of the message or with chips that link to Google Workspace resources like Google Docs or Sheets with
start_indexandlengthof 0.- Type
MutableSequence[google.apps.chat_v1.types.Annotation]
- thread¶
The thread the message belongs to. For example usage, see Start or reply to a message thread.
- space¶
Output only. If your Chat app authenticates as a user, the output only populates the space
name.
- fallback_text¶
Optional. A plain-text description of the message’s cards, used when the actual cards can’t be displayed—for example, mobile notifications.
- Type
- action_response¶
Input only. Parameters that a Chat app can use to configure how its response is posted.
- argument_text¶
Output only. Plain-text body of the message with all Chat app mentions stripped out.
- Type
- slash_command¶
Output only. Slash command information, if applicable.
- attachment¶
Optional. User-uploaded attachment.
- Type
MutableSequence[google.apps.chat_v1.types.Attachment]
- matched_url¶
Output only. A URL in
spaces.messages.textthat matches a link preview pattern. For more information, see Preview links.
- thread_reply¶
Output only. When
true, the message is a response in a reply thread. Whenfalse, 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.- Type
- client_assigned_message_id¶
Optional. A custom ID for the message. You can use field to identify a message, or to get, delete, or update a message. To set a custom ID, specify the
`messageId<https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.messages/create#body.QUERY_PARAMETERS.message_id>`__ field when you create the message. For details, see Name a message.- Type
- emoji_reaction_summaries¶
Output only. The list of emoji reaction summaries on the message.
- Type
MutableSequence[google.apps.chat_v1.types.EmojiReactionSummary]
- private_message_viewer¶
Optional. Immutable. Input for creating a message, otherwise output only. The user that can view the message. When set, the message is private and only visible to the specified user and the Chat app. To include this field in your request, you must call the Chat API using app authentication and omit the following:
For details, see Send a message privately.
- deletion_metadata¶
Output only. Information about a deleted message. A message is deleted when
delete_timeis set.
- quoted_message_metadata¶
Optional. Information about a message that another message quotes.
When you create a message, you can quote messages within the same thread, or quote a root message to create a new root message. However, you can’t quote a message reply from a different thread.
When you update a message, you can’t add or replace the
quotedMessageMetadatafield, but you can remove it.For example usage, see Quote another message.
- attached_gifs¶
Output only. GIF images that are attached to the message.
- Type
MutableSequence[google.apps.chat_v1.types.AttachedGif]
- accessory_widgets¶
Optional. One or more interactive widgets that appear at the bottom of a message. You can add accessory widgets to messages that contain text, cards, or both text and cards. Not supported for messages that contain dialogs. For details, see Add interactive widgets at the bottom of a message.
Creating a message with accessory widgets requires [app authentication] (https://developers.google.com/workspace/chat/authenticate-authorize-chat-app).
- Type
MutableSequence[google.apps.chat_v1.types.AccessoryWidget]
- class google.apps.chat_v1.types.MessageBatchCreatedEventData(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.MessageEvent payload for multiple new messages.
Event type:
google.workspace.chat.message.v1.batchCreated- messages¶
A list of new messages.
- Type
MutableSequence[google.apps.chat_v1.types.MessageCreatedEventData]
- class google.apps.chat_v1.types.MessageBatchDeletedEventData(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.MessageEvent payload for multiple deleted messages.
Event type:
google.workspace.chat.message.v1.batchDeleted- messages¶
A list of deleted messages.
- Type
MutableSequence[google.apps.chat_v1.types.MessageDeletedEventData]
- class google.apps.chat_v1.types.MessageBatchUpdatedEventData(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.MessageEvent payload for multiple updated messages.
Event type:
google.workspace.chat.message.v1.batchUpdated- messages¶
A list of updated messages.
- Type
MutableSequence[google.apps.chat_v1.types.MessageUpdatedEventData]
- class google.apps.chat_v1.types.MessageCreatedEventData(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.MessageEvent payload for a new message.
Event type:
google.workspace.chat.message.v1.created- message¶
The new message.
- class google.apps.chat_v1.types.MessageDeletedEventData(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.MessageEvent payload for a deleted message.
Event type:
google.workspace.chat.message.v1.deleted- message¶
The deleted message. Only the
name,createTime,deleteTime, anddeletionMetadatafields are populated.
- class google.apps.chat_v1.types.MessageUpdatedEventData(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.MessageEvent payload for an updated message.
Event type:
google.workspace.chat.message.v1.updated- message¶
The updated message.
- class google.apps.chat_v1.types.QuotedMessageMetadata(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.MessageInformation about a message that another message quotes.
When you create a message, you can quote messages within the same thread, or quote a root message to create a new root message. However, you can’t quote a message reply from a different thread.
When you update a message, you can’t add or replace the
quotedMessageMetadatafield, but you can remove it.For example usage, see Quote another message.
- name¶
Required. Resource name of the message that is quoted.
Format:
spaces/{space}/messages/{message}- Type
- last_update_time¶
Required. The timestamp when the quoted message was created or when the quoted message was last updated.
If the message was edited, use this field,
last_update_time. If the message was never edited, usecreate_time.If
last_update_timedoesn’t match the latest version of the quoted message, the request fails.
- class google.apps.chat_v1.types.Reaction(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.MessageA reaction to a message.
- name¶
Identifier. The resource name of the reaction.
Format:
spaces/{space}/messages/{message}/reactions/{reaction}- Type
- user¶
Output only. The user who created the reaction.
- emoji¶
Required. The emoji used in the reaction.
- class google.apps.chat_v1.types.ReactionBatchCreatedEventData(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.MessageEvent payload for multiple new reactions.
Event type:
google.workspace.chat.reaction.v1.batchCreated- reactions¶
A list of new reactions.
- Type
MutableSequence[google.apps.chat_v1.types.ReactionCreatedEventData]
- class google.apps.chat_v1.types.ReactionBatchDeletedEventData(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.MessageEvent payload for multiple deleted reactions.
Event type:
google.workspace.chat.reaction.v1.batchDeleted- reactions¶
A list of deleted reactions.
- Type
MutableSequence[google.apps.chat_v1.types.ReactionDeletedEventData]
- class google.apps.chat_v1.types.ReactionCreatedEventData(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.MessageEvent payload for a new reaction.
Event type:
google.workspace.chat.reaction.v1.created- reaction¶
The new reaction.
- class google.apps.chat_v1.types.ReactionDeletedEventData(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.MessageEvent payload for a deleted reaction.
Type:
google.workspace.chat.reaction.v1.deleted- reaction¶
The deleted reaction.
- class google.apps.chat_v1.types.RichLinkMetadata(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.MessageA rich link to a resource. Rich links can be associated with the plain-text body of the message or represent chips that link to Google Workspace resources like Google Docs or Sheets with
start_indexandlengthof 0.This message has oneof fields (mutually exclusive fields). For each oneof, at most one member field can be set at the same time. Setting any member of the oneof automatically clears all other members.
- rich_link_type¶
The rich link type.
- class RichLinkType(value)[source]¶
Bases:
proto.enums.EnumThe rich link type. More types might be added in the future.
- Values:
- RICH_LINK_TYPE_UNSPECIFIED (0):
Default value for the enum. Don’t use.
- DRIVE_FILE (1):
A Google Drive rich link type.
- CHAT_SPACE (2):
A Chat space rich link type. For example, a space smart chip.
- MEET_SPACE (4):
A Meet message rich link type. For example, a Meet chip.
- CALENDAR_EVENT (5):
A Calendar message rich link type. For example, a Calendar chip.
- class google.apps.chat_v1.types.SearchSpacesRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.MessageRequest to search for a list of spaces based on a query.
- use_admin_access¶
When
true, the method runs using the user’s Google Workspace administrator privileges.The calling user must be a Google Workspace administrator with the manage chat and spaces conversations privilege.
Requires either the
chat.admin.spaces.readonlyorchat.admin.spacesOAuth 2.0 scope.This method currently only supports admin access, thus only
trueis accepted for this field.- Type
- page_size¶
The maximum number of spaces to return. The service may return fewer than this value.
If unspecified, at most 100 spaces are returned.
The maximum value is 1000. If you use a value more than 1000, it’s automatically changed to 1000.
- Type
- page_token¶
A token, received from the previous search spaces call. Provide this parameter to retrieve the subsequent page.
When paginating, all other parameters provided should match the call that provided the page token. Passing different values to the other parameters might lead to unexpected results.
- Type
- query¶
Required. A search query.
You can search by using the following parameters:
create_timecustomerdisplay_nameexternal_user_allowedlast_active_timespace_history_statespace_type
create_timeandlast_active_timeaccept a timestamp in RFC-3339 format and the supported comparison operators are:=,<,>,<=,>=.customeris required and is used to indicate which customer to fetch spaces from.customers/my_customeris the only supported value.display_nameonly accepts theHAS(:) operator. The text to match is first tokenized into tokens and each token is prefix-matched case-insensitively and independently as a substring anywhere in the space’sdisplay_name. For example,Fun EvematchesFun eventorThe evening was fun, but notnotFun eventoreven.external_user_allowedaccepts eithertrueorfalse.space_history_stateonly accepts values from the [historyState] (https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces#Space.HistoryState) field of aspaceresource.space_typeis required and the only valid value isSPACE.Across different fields, only
ANDoperators are supported. A valid example isspace_type = "SPACE" AND display_name:"Hello"and an invalid example isspace_type = "SPACE" OR display_name:"Hello".Among the same field,
space_typedoesn’t supportANDorORoperators.display_name, ‘space_history_state’, and ‘external_user_allowed’ only supportORoperators.last_active_timeandcreate_timesupport bothANDandORoperators.ANDcan only be used to represent an interval, such aslast_active_time < "2022-01-01T00:00:00+00:00" AND last_active_time > "2023-01-01T00:00:00+00:00".The following example queries are valid:
customer = "customers/my_customer" AND space_type = "SPACE" customer = "customers/my_customer" AND space_type = "SPACE" AND display_name:"Hello World" customer = "customers/my_customer" AND space_type = "SPACE" AND (last_active_time < "2020-01-01T00:00:00+00:00" OR last_active_time > "2022-01-01T00:00:00+00:00") customer = "customers/my_customer" AND space_type = "SPACE" AND (display_name:"Hello World" OR display_name:"Fun event") AND (last_active_time > "2020-01-01T00:00:00+00:00" AND last_active_time < "2022-01-01T00:00:00+00:00") customer = "customers/my_customer" AND space_type = "SPACE" AND (create_time > "2019-01-01T00:00:00+00:00" AND create_time < "2020-01-01T00:00:00+00:00") AND (external_user_allowed = "true") AND (space_history_state = "HISTORY_ON" OR space_history_state = "HISTORY_OFF")
- Type
- order_by¶
Optional. How the list of spaces is ordered.
Supported attributes to order by are:
membership_count.joined_direct_human_user_count— Denotes the count of human users that have directly joined a space.last_active_time— Denotes the time when last eligible item is added to any topic of this space.create_time— Denotes the time of the space creation.
Valid ordering operation values are:
ASCfor ascending. Default value.DESCfor descending.
The supported syntax are:
membership_count.joined_direct_human_user_count DESCmembership_count.joined_direct_human_user_count ASClast_active_time DESClast_active_time ASCcreate_time DESCcreate_time ASC
- Type
- class google.apps.chat_v1.types.SearchSpacesResponse(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.MessageResponse with a list of spaces corresponding to the search spaces request.
- spaces¶
A page of the requested spaces.
- Type
MutableSequence[google.apps.chat_v1.types.Space]
- next_page_token¶
A token that can be used to retrieve the next page. If this field is empty, there are no subsequent pages.
- Type
- class google.apps.chat_v1.types.SetUpSpaceRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.MessageRequest to create a space and add specified users to it.
- space¶
Required. The
Space.spaceTypefield is required.To create a space, set
Space.spaceTypetoSPACEand setSpace.displayName. If you receive the error messageALREADY_EXISTSwhen setting up a space, try a differentdisplayName. An existing space within the Google Workspace organization might already use this display name.To create a group chat, set
Space.spaceTypetoGROUP_CHAT. Don’t setSpace.displayName.To create a 1:1 conversation between humans, set
Space.spaceTypetoDIRECT_MESSAGEand setSpace.singleUserBotDmtofalse. Don’t setSpace.displayNameorSpace.spaceDetails.To create an 1:1 conversation between a human and the calling Chat app, set
Space.spaceTypetoDIRECT_MESSAGEandSpace.singleUserBotDmtotrue. Don’t setSpace.displayNameorSpace.spaceDetails.If a
DIRECT_MESSAGEspace already exists, that space is returned instead of creating a new space.
- request_id¶
Optional. A unique identifier for this request. A random UUID is recommended. Specifying an existing request ID returns the space created with that ID instead of creating a new space. Specifying an existing request ID from the same Chat app with a different authenticated user returns an error.
- Type
- memberships¶
Optional. The Google Chat users or groups to invite to join the space. Omit the calling user, as they are added automatically.
The set currently allows up to 49 memberships (in addition to the caller).
For human membership, the
Membership.memberfield must contain auserwithnamepopulated (format:users/{user}) andtypeset toUser.Type.HUMAN. You can only add human users when setting up a space (adding Chat apps is only supported for direct message setup with the calling app). You can also add members using the user’s email as an alias for {user}. For example, theuser.namecan beusers/example@gmail.com. To invite Gmail users or users from external Google Workspace domains, user’s email must be used for{user}.For Google group membership, the
Membership.group_memberfield must contain agroupwithnamepopulated (formatgroups/{group}). You can only add Google groups when settingSpace.spaceTypetoSPACE.Optional when setting
Space.spaceTypetoSPACE.Required when setting
Space.spaceTypetoGROUP_CHAT, along with at least two memberships.Required when setting
Space.spaceTypetoDIRECT_MESSAGEwith a human user, along with exactly one membership.Must be empty when creating a 1:1 conversation between a human and the calling Chat app (when setting
Space.spaceTypetoDIRECT_MESSAGEandSpace.singleUserBotDmtotrue).- Type
MutableSequence[google.apps.chat_v1.types.Membership]
- class google.apps.chat_v1.types.SlashCommand(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.MessageMetadata about a slash command in Google Chat.
- class google.apps.chat_v1.types.SlashCommandMetadata(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.MessageAnnotation metadata for slash commands (/).
- bot¶
The Chat app whose command was invoked.
- type_¶
The type of slash command.
- class Type(value)[source]¶
Bases:
proto.enums.Enum- Values:
- TYPE_UNSPECIFIED (0):
Default value for the enum. Don’t use.
- ADD (1):
Add Chat app to space.
- INVOKE (2):
Invoke slash command in space.
- class google.apps.chat_v1.types.Space(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.MessageA space in Google Chat. Spaces are conversations between two or more users or 1:1 messages between a user and a Chat app.
This message has oneof fields (mutually exclusive fields). For each oneof, at most one member field can be set at the same time. Setting any member of the oneof automatically clears all other members.
- name¶
Identifier. Resource name of the space.
Format:
spaces/{space}Where
{space}represents the system-assigned ID for the space. You can obtain the space ID by calling the`spaces.list()<https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces/list>`__ method or from the space URL. For example, if the space URL ishttps://mail.google.com/mail/u/0/#chat/space/AAAAAAAAA, the space ID isAAAAAAAAA.- Type
- type_¶
Output only. Deprecated: Use
space_typeinstead. The type of a space.
- space_type¶
Optional. The type of space. Required when creating a space or updating the space type of a space. Output only for other usage.
- single_user_bot_dm¶
Optional. Whether the space is a DM between a Chat app and a single human.
- Type
- threaded¶
Output only. Deprecated: Use
spaceThreadingStateinstead. Whether messages are threaded in this space.- Type
- display_name¶
Optional. The space’s display name. Required when creating a space with a
spaceTypeofSPACE. If you receive the error messageALREADY_EXISTSwhen creating a space or updating thedisplayName, try a differentdisplayName. An existing space within the Google Workspace organization might already use this display name.For direct messages, this field might be empty.
Supports up to 128 characters.
- Type
- external_user_allowed¶
Optional. Immutable. Whether this space permits any Google Chat user as a member. Input when creating a space in a Google Workspace organization. Omit this field when creating spaces in the following conditions:
The authenticated user uses a consumer account (unmanaged user account). By default, a space created by a consumer account permits any Google Chat user.
For existing spaces, this field is output only.
- Type
- space_threading_state¶
Output only. The threading state in the Chat space.
- space_details¶
Optional. Details about the space including description and rules.
- space_history_state¶
Optional. The message history state for messages and threads in this space.
- import_mode¶
Optional. Whether this space is created in
Import Modeas part of a data migration into Google Workspace. While spaces are being imported, they aren’t visible to users until the import is complete.Creating a space in
Import Moderequires user authentication.- Type
- create_time¶
Optional. Immutable. For spaces created in Chat, the time the space was created. This field is output only, except when used in import mode spaces.
For import mode spaces, set this field to the historical timestamp at which the space was created in the source in order to preserve the original creation time.
Only populated in the output when
spaceTypeisGROUP_CHATorSPACE.
- last_active_time¶
Output only. Timestamp of the last message in the space.
- admin_installed¶
Output only. For direct message (DM) spaces with a Chat app, whether the space was created by a Google Workspace administrator. Administrators can install and set up a direct message with a Chat app on behalf of users in their organization.
To support admin install, your Chat app must feature direct messaging.
- Type
- membership_count¶
Output only. The count of joined memberships grouped by member type. Populated when the
space_typeisSPACE,DIRECT_MESSAGEorGROUP_CHAT.
- access_settings¶
Optional. Specifies the access setting of the space. Only populated when the
space_typeisSPACE.
- customer¶
Optional. Immutable. The customer id of the domain of the space. Required only when creating a space with app authentication and
SpaceTypeisSPACE, otherwise should not be set.In the format
customers/{customer}, wherecustomeris theidfrom the Admin SDK customer resource. Private apps can also use thecustomers/my_customeralias to create the space in the same Google Workspace organization as the app.For DMs, this field isn’t populated.
This field is a member of oneof
_customer.- Type
- predefined_permission_settings¶
Optional. Input only. Predefined space permission settings, input only when creating a space. If the field is not set, a collaboration space is created. After you create the space, settings are populated in the
PermissionSettingsfield.Setting predefined permission settings supports:
App authentication with administrator approval with the
chat.app.spacesorchat.app.spaces.createscopes.
This field is a member of oneof
space_permission_settings.
- permission_settings¶
Optional. Space permission settings for existing spaces. Input for updating exact space permission settings, where existing permission settings are replaced. Output lists current permission settings.
Reading and updating permission settings supports:
App authentication with administrator approval with the
chat.app.spacesscope. Only populated and settable when the Chat app created the space.
This field is a member of oneof
space_permission_settings.
- import_mode_expire_time¶
Output only. The time when the space will be automatically deleted by the system if it remains in import mode.
Each space created in import mode must exit this mode before this expire time using
spaces.completeImport.This field is only populated for spaces that were created with import mode.
- class AccessSettings(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.MessageRepresents the access setting of the space.
- access_state¶
Output only. Indicates the access state of the space.
- audience¶
Optional. The resource name of the target audience who can discover the space, join the space, and preview the messages in the space. If unset, only users or Google Groups who have been individually invited or added to the space can access it. For details, see Make a space discoverable to a target audience.
Format:
audiences/{audience}To use the default target audience for the Google Workspace organization, set to
audiences/default.Reading the target audience supports:
App authentication with administrator approval with the
chat.app.spacesscope.
This field is not populated when using the
chat.botscope with app authentication.Setting the target audience requires user authentication.
- Type
- class AccessState(value)[source]¶
Bases:
proto.enums.EnumRepresents the access state of the space.
- Values:
- ACCESS_STATE_UNSPECIFIED (0):
Access state is unknown or not supported in this API.
- PRIVATE (1):
Only users or Google Groups that have been individually added or invited by other users or Google Workspace administrators can discover and access the space.
- DISCOVERABLE (2):
A space manager has granted a target audience access to the space. Users or Google Groups that have been individually added or invited to the space can also discover and access the space. To learn more, see Make a space discoverable to specific users.
Creating discoverable spaces requires user authentication.
- class MembershipCount(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.MessageRepresents the count of memberships of a space, grouped into categories.
- joined_direct_human_user_count¶
Output only. Count of human users that have directly joined the space, not counting users joined by having membership in a joined group.
- Type
- class PermissionSetting(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.MessageRepresents a space permission setting.
- managers_allowed¶
Optional. Whether space owners ([
ROLE_MANAGER][google.chat.v1.Membership.MembershipRole.ROLE_MANAGER]) have this permission.- Type
- class PermissionSettings(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.MessagePermission settings that you can specify when updating an existing named space.
To set permission settings when creating a space, specify the
PredefinedPermissionSettingsfield in your request.- manage_members_and_groups¶
Optional. Setting for managing members and groups in a space.
This field is a member of oneof
_manage_members_and_groups.
- modify_space_details¶
Optional. Setting for updating space name, avatar, description and guidelines.
This field is a member of oneof
_modify_space_details.
- toggle_history¶
Optional. Setting for toggling space history on and off.
This field is a member of oneof
_toggle_history.
- use_at_mention_all¶
Optional. Setting for using @all in a space.
This field is a member of oneof
_use_at_mention_all.
- manage_apps¶
Optional. Setting for managing apps in a space.
This field is a member of oneof
_manage_apps.
- manage_webhooks¶
Optional. Setting for managing webhooks in a space.
This field is a member of oneof
_manage_webhooks.
- post_messages¶
Output only. Setting for posting messages in a space.
This field is a member of oneof
_post_messages.
- class PredefinedPermissionSettings(value)[source]¶
Bases:
proto.enums.EnumPredefined permission settings that you can only specify when creating a named space. More settings might be added in the future. For details about permission settings for named spaces, see Learn about spaces.
- Values:
- PREDEFINED_PERMISSION_SETTINGS_UNSPECIFIED (0):
Unspecified. Don’t use.
- COLLABORATION_SPACE (1):
Setting to make the space a collaboration space where all members can post messages.
- ANNOUNCEMENT_SPACE (2):
Setting to make the space an announcement space where only space managers can post messages.
- class SpaceDetails(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.MessageDetails about the space including description and rules.
- description¶
Optional. A description of the space. For example, describe the space’s discussion topic, functional purpose, or participants.
Supports up to 150 characters.
- Type
- class SpaceThreadingState(value)[source]¶
Bases:
proto.enums.EnumSpecifies the type of threading state in the Chat space.
- Values:
- SPACE_THREADING_STATE_UNSPECIFIED (0):
Reserved.
- THREADED_MESSAGES (2):
Named spaces that support message threads. When users respond to a message, they can reply in-thread, which keeps their response in the context of the original message.
- GROUPED_MESSAGES (3):
Named spaces where the conversation is organized by topic. Topics and their replies are grouped together.
- UNTHREADED_MESSAGES (4):
Direct messages (DMs) between two people and group conversations between 3 or more people.
- class SpaceType(value)[source]¶
Bases:
proto.enums.EnumThe type of space. Required when creating or updating a space. Output only for other usage.
- Values:
- SPACE_TYPE_UNSPECIFIED (0):
Reserved.
- SPACE (1):
A place where people send messages, share files, and collaborate. A
SPACEcan include Chat apps.- GROUP_CHAT (2):
Group conversations between 3 or more people. A
GROUP_CHATcan include Chat apps.- DIRECT_MESSAGE (3):
1:1 messages between two humans or a human and a Chat app.
- class Type(value)[source]¶
Bases:
proto.enums.EnumDeprecated: Use
SpaceTypeinstead.- Values:
- TYPE_UNSPECIFIED (0):
Reserved.
- ROOM (1):
Conversations between two or more humans.
- DM (2):
1:1 Direct Message between a human and a Chat app, where all messages are flat. Note that this doesn’t include direct messages between two humans.
- class google.apps.chat_v1.types.SpaceBatchUpdatedEventData(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.MessageEvent payload for multiple updates to a space.
Event type:
google.workspace.chat.space.v1.batchUpdated- spaces¶
A list of updated spaces.
- Type
MutableSequence[google.apps.chat_v1.types.SpaceUpdatedEventData]
- class google.apps.chat_v1.types.SpaceEvent(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.MessageAn event that represents a change or activity in a Google Chat space. To learn more, see Work with events from Google Chat.
This message has oneof fields (mutually exclusive fields). For each oneof, at most one member field can be set at the same time. Setting any member of the oneof automatically clears all other members.
- event_time¶
Time when the event occurred.
- event_type¶
Type of space event. Each event type has a batch version, which represents multiple instances of the event type that occur in a short period of time. For
spaceEvents.list()requests, omit batch event types in your query filter. By default, the server returns both event type and its batch version.Supported event types for messages:
* New message: `google.workspace.chat.message.v1.created` * Updated message: `google.workspace.chat.message.v1.updated` * Deleted message: `google.workspace.chat.message.v1.deleted` * Multiple new messages: `google.workspace.chat.message.v1.batchCreated` * Multiple updated messages: `google.workspace.chat.message.v1.batchUpdated` * Multiple deleted messages: `google.workspace.chat.message.v1.batchDeleted`
Supported event types for memberships:
New membership:
google.workspace.chat.membership.v1.createdUpdated membership:
google.workspace.chat.membership.v1.updatedDeleted membership:
google.workspace.chat.membership.v1.deletedMultiple new memberships:
google.workspace.chat.membership.v1.batchCreatedMultiple updated memberships:
google.workspace.chat.membership.v1.batchUpdatedMultiple deleted memberships:
google.workspace.chat.membership.v1.batchDeleted
Supported event types for reactions:
New reaction:
google.workspace.chat.reaction.v1.createdDeleted reaction:
google.workspace.chat.reaction.v1.deletedMultiple new reactions:
google.workspace.chat.reaction.v1.batchCreatedMultiple deleted reactions:
google.workspace.chat.reaction.v1.batchDeleted
Supported event types about the space:
Updated space:
google.workspace.chat.space.v1.updatedMultiple space updates:
google.workspace.chat.space.v1.batchUpdated
- Type
- message_created_event_data¶
Event payload for a new message.
Event type:
google.workspace.chat.message.v1.createdThis field is a member of oneof
payload.
- message_updated_event_data¶
Event payload for an updated message.
Event type:
google.workspace.chat.message.v1.updatedThis field is a member of oneof
payload.
- message_deleted_event_data¶
Event payload for a deleted message.
Event type:
google.workspace.chat.message.v1.deletedThis field is a member of oneof
payload.
- message_batch_created_event_data¶
Event payload for multiple new messages.
Event type:
google.workspace.chat.message.v1.batchCreatedThis field is a member of oneof
payload.
- message_batch_updated_event_data¶
Event payload for multiple updated messages.
Event type:
google.workspace.chat.message.v1.batchUpdatedThis field is a member of oneof
payload.
- message_batch_deleted_event_data¶
Event payload for multiple deleted messages.
Event type:
google.workspace.chat.message.v1.batchDeletedThis field is a member of oneof
payload.
- space_updated_event_data¶
Event payload for a space update.
Event type:
google.workspace.chat.space.v1.updatedThis field is a member of oneof
payload.
- space_batch_updated_event_data¶
Event payload for multiple updates to a space.
Event type:
google.workspace.chat.space.v1.batchUpdatedThis field is a member of oneof
payload.
- membership_created_event_data¶
Event payload for a new membership.
Event type:
google.workspace.chat.membership.v1.createdThis field is a member of oneof
payload.
- membership_updated_event_data¶
Event payload for an updated membership.
Event type:
google.workspace.chat.membership.v1.updatedThis field is a member of oneof
payload.
- membership_deleted_event_data¶
Event payload for a deleted membership.
Event type:
google.workspace.chat.membership.v1.deletedThis field is a member of oneof
payload.
- membership_batch_created_event_data¶
Event payload for multiple new memberships.
Event type:
google.workspace.chat.membership.v1.batchCreatedThis field is a member of oneof
payload.
- membership_batch_updated_event_data¶
Event payload for multiple updated memberships.
Event type:
google.workspace.chat.membership.v1.batchUpdatedThis field is a member of oneof
payload.
- membership_batch_deleted_event_data¶
Event payload for multiple deleted memberships.
Event type:
google.workspace.chat.membership.v1.batchDeletedThis field is a member of oneof
payload.
- reaction_created_event_data¶
Event payload for a new reaction.
Event type:
google.workspace.chat.reaction.v1.createdThis field is a member of oneof
payload.
- reaction_deleted_event_data¶
Event payload for a deleted reaction.
Event type:
google.workspace.chat.reaction.v1.deletedThis field is a member of oneof
payload.
- reaction_batch_created_event_data¶
Event payload for multiple new reactions.
Event type:
google.workspace.chat.reaction.v1.batchCreatedThis field is a member of oneof
payload.
- class google.apps.chat_v1.types.SpaceNotificationSetting(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.MessageThe notification setting of a user in a space.
- name¶
Identifier. The resource name of the space notification setting. Format:
users/{user}/spaces/{space}/spaceNotificationSetting.- Type
- notification_setting¶
The notification setting.
This field is a member of oneof
_notification_setting.
- class MuteSetting(value)[source]¶
Bases:
proto.enums.EnumThe space notification mute setting types.
- Values:
- MUTE_SETTING_UNSPECIFIED (0):
Reserved.
- UNMUTED (1):
The user will receive notifications for the space based on the notification setting.
- MUTED (2):
The user will not receive any notifications for the space, regardless of the notification setting.
- class NotificationSetting(value)[source]¶
Bases:
proto.enums.EnumThe notification setting types. Other types might be supported in the future.
- Values:
- NOTIFICATION_SETTING_UNSPECIFIED (0):
Reserved.
- ALL (1):
Notifications are triggered by @mentions, followed threads, first message of new threads. All new threads are automatically followed, unless manually unfollowed by the user.
- MAIN_CONVERSATIONS (2):
The notification is triggered by @mentions, followed threads, first message of new threads. Not available for 1:1 direct messages.
- FOR_YOU (3):
The notification is triggered by @mentions, followed threads. Not available for 1:1 direct messages.
- OFF (4):
Notification is off.
- class google.apps.chat_v1.types.SpaceReadState(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.MessageA user’s read state within a space, used to identify read and unread messages.
- name¶
Resource name of the space read state.
Format:
users/{user}/spaces/{space}/spaceReadState- Type
- last_read_time¶
Optional. The time when the user’s space read state was updated. Usually this corresponds with either the timestamp of the last read message, or a timestamp specified by the user to mark the last read position in a space.
- class google.apps.chat_v1.types.SpaceUpdatedEventData(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.MessageEvent payload for an updated space.
Event type:
google.workspace.chat.space.v1.updated- space¶
The updated space.
- class google.apps.chat_v1.types.Thread(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.MessageA thread in a Google Chat space. For example usage, see Start or reply to a message thread.
If you specify a thread when creating a message, you can set the
`messageReplyOption<https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.messages/create#messagereplyoption>`__ field to determine what happens if no matching thread is found.- thread_key¶
Optional. Input for creating or updating a thread. Otherwise, output only. ID for the thread. Supports up to 4000 characters.
This ID is unique to the Chat app that sets it. For example, if multiple Chat apps create a message using the same thread key, the messages are posted in different threads. To reply in a thread created by a person or another Chat app, specify the thread
namefield instead.- Type
- class google.apps.chat_v1.types.ThreadReadState(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.MessageA user’s read state within a thread, used to identify read and unread messages.
- name¶
Resource name of the thread read state.
Format:
users/{user}/spaces/{space}/threads/{thread}/threadReadState- Type
- last_read_time¶
The time when the user’s thread read state was updated. Usually this corresponds with the timestamp of the last read message in a thread.
- class google.apps.chat_v1.types.UpdateMembershipRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.MessageRequest message for updating a membership.
- membership¶
Required. The membership to update. Only fields specified by
update_maskare updated.
- update_mask¶
Required. The field paths to update. Separate multiple values with commas or use
*to update all field paths.Currently supported field paths:
role
- use_admin_access¶
Optional. When
true, the method runs using the user’s Google Workspace administrator privileges.The calling user must be a Google Workspace administrator with the manage chat and spaces conversations privilege.
Requires the
chat.admin.membershipsOAuth 2.0 scope.- Type
- class google.apps.chat_v1.types.UpdateMessageRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.MessageRequest to update a message.
- message¶
Required. Message with fields updated.
- update_mask¶
Required. The field paths to update. Separate multiple values with commas or use
*to update all field paths.Currently supported field paths:
textattachmentcards(Requires app authentication.)cards_v2(Requires app authentication.)accessory_widgets(Requires app authentication.)quoted_message_metadata(Only allows removal of the quoted message.)
- allow_missing¶
Optional. If
trueand the message isn’t found, a new message is created andupdateMaskis ignored. The specified message ID must be client-assigned or the request fails.- Type
- class google.apps.chat_v1.types.UpdateSpaceNotificationSettingRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.MessageRequest to update the space notification settings. Only supports updating notification setting for the calling user.
- space_notification_setting¶
Required. The resource name for the space notification settings must be populated in the form of
users/{user}/spaces/{space}/spaceNotificationSetting. Only fields specified byupdate_maskare updated.
- update_mask¶
Required. Supported field paths:
notification_settingmute_setting
- class google.apps.chat_v1.types.UpdateSpaceReadStateRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.MessageRequest message for UpdateSpaceReadState API.
- space_read_state¶
Required. The space read state and fields to update.
Only supports updating read state for the calling user.
To refer to the calling user, set one of the following:
The
mealias. For example,users/me/spaces/{space}/spaceReadState.Their Workspace email address. For example,
users/user@example.com/spaces/{space}/spaceReadState.Their user id. For example,
users/123456789/spaces/{space}/spaceReadState.
Format: users/{user}/spaces/{space}/spaceReadState
- update_mask¶
Required. The field paths to update. Currently supported field paths:
last_read_time
When the
last_read_timeis before the latest message create time, the space appears as unread in the UI.To mark the space as read, set
last_read_timeto any value later (larger) than the latest message create time. Thelast_read_timeis coerced to match the latest message create time. Note that the space read state only affects the read state of messages that are visible in the space’s top-level conversation. Replies in threads are unaffected by this timestamp, and instead rely on the thread read state.
- class google.apps.chat_v1.types.UpdateSpaceRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.MessageA request to update a single space.
- space¶
Required. Space with fields to be updated.
Space.namemust be populated in the form ofspaces/{space}. Only fields specified byupdate_maskare updated.
- update_mask¶
Required. The updated field paths, comma separated if there are multiple.
You can update the following fields for a space:
space_details: Updates the space’s description. Supports up to 150 characters.display_name: Only supports updating the display name for spaces wherespaceTypefield isSPACE. If you receive the error messageALREADY_EXISTS, try a different value. An existing space within the Google Workspace organization might already use this display name.space_type: Only supports changing aGROUP_CHATspace type toSPACE. Includedisplay_nametogether withspace_typein the update mask and ensure that the specified space has a non-empty display name and theSPACEspace type. Including thespace_typemask and theSPACEtype in the specified space when updating the display name is optional if the existing space already has theSPACEtype. Trying to update the space type in other ways results in an invalid argument error.space_typeis not supported withuseAdminAccess.space_history_state: Updates space history settings by turning history on or off for the space. Only supported if history settings are enabled for the Google Workspace organization. To update the space history state, you must omit all other field masks in your request.space_history_stateis not supported withuseAdminAccess.access_settings.audience: Updates the access setting of who can discover the space, join the space, and preview the messages in named space wherespaceTypefield isSPACE. If the existing space has a target audience, you can remove the audience and restrict space access by omitting a value for this field mask. To update access settings for a space, the authenticating user must be a space manager and omit all other field masks in your request. You can’t update this field if the space is in import mode. To learn more, see Make a space discoverable to specific users.access_settings.audienceis not supported withuseAdminAccess.permission_settings: Supports changing the permission settings of a space. When updating permission settings, you can only specifypermissionSettingsfield masks; you cannot update other field masks at the same time.permissionSettingsis not supported withuseAdminAccess. The supported field masks include:permission_settings.manageMembersAndGroupspermission_settings.modifySpaceDetailspermission_settings.toggleHistorypermission_settings.useAtMentionAllpermission_settings.manageAppspermission_settings.manageWebhookspermission_settings.replyMessages
- use_admin_access¶
Optional. When
true, the method runs using the user’s Google Workspace administrator privileges.The calling user must be a Google Workspace administrator with the manage chat and spaces conversations privilege.
Requires the
chat.admin.spacesOAuth 2.0 scope.Some
FieldMaskvalues are not supported using admin access. For details, see the description ofupdate_mask.- Type
- class google.apps.chat_v1.types.UploadAttachmentRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.MessageRequest to upload an attachment.
- parent¶
Required. Resource name of the Chat space in which the attachment is uploaded. Format “spaces/{space}”.
- Type
- class google.apps.chat_v1.types.UploadAttachmentResponse(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.MessageResponse of uploading an attachment.
- attachment_data_ref¶
Reference to the uploaded attachment.
- class google.apps.chat_v1.types.User(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.MessageA user in Google Chat. When returned as an output from a request, if your Chat app authenticates as a user, the output for a
Userresource only populates the user’snameandtype.- name¶
Resource name for a Google Chat [user][google.chat.v1.User].
Format:
users/{user}.users/appcan be used as an alias for the calling app [bot][google.chat.v1.User.Type.BOT] user.For [human users][google.chat.v1.User.Type.HUMAN],
{user}is the same user identifier as:the
idfor the Person in the People API. For example,users/123456789in Chat API represents the same person as the123456789Person profile ID in People API.the
idfor a user in the Admin SDK Directory API.the user’s email address can be used as an alias for
{user}in API requests. For example, if the People API Person profile ID foruser@example.comis123456789, you can useusers/user@example.comas an alias to referenceusers/123456789. Only the canonical resource name (for exampleusers/123456789) will be returned from the API.
- Type
- type_¶
User type.
- is_anonymous¶
Output only. When
true, the user is deleted or their profile is not visible.- Type
- class Type(value)[source]¶
Bases:
proto.enums.Enum- Values:
- TYPE_UNSPECIFIED (0):
Default value for the enum. DO NOT USE.
- HUMAN (1):
Human user.
- BOT (2):
Chat app user.
- class google.apps.chat_v1.types.UserMentionMetadata(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.MessageAnnotation metadata for user mentions (@).
- user¶
The user mentioned.
- type_¶
The type of user mention.
- class Type(value)[source]¶
Bases:
proto.enums.Enum- Values:
- TYPE_UNSPECIFIED (0):
Default value for the enum. Don’t use.
- ADD (1):
Add user to space.
- MENTION (2):
Mention user in space.
- class google.apps.chat_v1.types.WidgetMarkup(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.MessageA widget is a UI element that presents text and images.
This message has oneof fields (mutually exclusive fields). For each oneof, at most one member field can be set at the same time. Setting any member of the oneof automatically clears all other members.
- buttons¶
A list of buttons. Buttons is also
oneof dataand only one of these fields should be set.- Type
MutableSequence[google.apps.chat_v1.types.WidgetMarkup.Button]
- class Button(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.MessageA button. Can be a text button or an image button.
This message has oneof fields (mutually exclusive fields). For each oneof, at most one member field can be set at the same time. Setting any member of the oneof automatically clears all other members.
- class FormAction(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.MessageA form action describes the behavior when the form is submitted. For example, you can invoke Apps Script to handle the form.
- action_method_name¶
The method name is used to identify which part of the form triggered the form submission. This information is echoed back to the Chat app as part of the card click event. You can use the same method name for several elements that trigger a common behavior.
- Type
- parameters¶
List of action parameters.
- Type
MutableSequence[google.apps.chat_v1.types.WidgetMarkup.FormAction.ActionParameter]
- class ActionParameter(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.MessageList of string parameters to supply when the action method is invoked. For example, consider three snooze buttons: snooze now, snooze one day, snooze next week. You might use
action method = snooze(), passing the snooze type and snooze time in the list of string parameters.
- class Icon(value)[source]¶
Bases:
proto.enums.EnumThe set of supported icons.
- Values:
- ICON_UNSPECIFIED (0):
No description available.
- AIRPLANE (1):
No description available.
- BOOKMARK (26):
No description available.
- BUS (25):
No description available.
- CAR (9):
No description available.
- CLOCK (2):
No description available.
- CONFIRMATION_NUMBER_ICON (12):
No description available.
- DOLLAR (14):
No description available.
- DESCRIPTION (27):
No description available.
- EMAIL (10):
No description available.
- EVENT_PERFORMER (20):
No description available.
- EVENT_SEAT (21):
No description available.
- FLIGHT_ARRIVAL (16):
No description available.
- FLIGHT_DEPARTURE (15):
No description available.
- HOTEL (6):
No description available.
- HOTEL_ROOM_TYPE (17):
No description available.
- INVITE (19):
No description available.
- MAP_PIN (3):
No description available.
- MEMBERSHIP (24):
No description available.
- MULTIPLE_PEOPLE (18):
No description available.
- OFFER (30):
No description available.
- PERSON (11):
No description available.
- PHONE (13):
No description available.
- RESTAURANT_ICON (7):
No description available.
- SHOPPING_CART (8):
No description available.
- STAR (5):
No description available.
- STORE (22):
No description available.
- TICKET (4):
No description available.
- TRAIN (23):
No description available.
- VIDEO_CAMERA (28):
No description available.
- VIDEO_PLAY (29):
No description available.
- class Image(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.MessageAn image that’s specified by a URL and can have an
onclickaction.- on_click¶
The
onclickaction.
- class ImageButton(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.MessageAn image button with an
onclickaction.This message has oneof fields (mutually exclusive fields). For each oneof, at most one member field can be set at the same time. Setting any member of the oneof automatically clears all other members.
- icon¶
The icon specified by an
enumthat indices to an icon provided by Chat API.This field is a member of oneof
icons.
- on_click¶
The
onclickaction.
- class KeyValue(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.MessageA UI element contains a key (label) and a value (content). This element can also contain some actions such as
onclickbutton.This message has oneof fields (mutually exclusive fields). For each oneof, at most one member field can be set at the same time. Setting any member of the oneof automatically clears all other members.
- icon¶
An enum value that’s replaced by the Chat API with the corresponding icon image.
This field is a member of oneof
icons.
- top_label¶
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
- content¶
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
- bottom_label¶
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
- on_click¶
The
onclickaction. Only the top label, bottom label, and content region are clickable.
- class OnClick(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.MessageAn
onclickaction (for example, open a link).This message has oneof fields (mutually exclusive fields). For each oneof, at most one member field can be set at the same time. Setting any member of the oneof automatically clears all other members.
- action¶
A form action is triggered by this
onclickaction if specified.This field is a member of oneof
data.
- class OpenLink(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.MessageA link that opens a new window.
- class TextButton(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.MessageA button with text and
onclickaction.- on_click¶
The
onclickaction of the button.
- class TextParagraph(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.MessageA 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.