Interface MessageOrBuilder (0.11.0)

public interface MessageOrBuilder extends MessageOrBuilder

Implements

MessageOrBuilder

Methods

getAccessoryWidgets(int index)

public abstract AccessoryWidget getAccessoryWidgets(int index)

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.

repeated .google.chat.v1.AccessoryWidget accessory_widgets = 44;

Parameter
Name Description
index int
Returns
Type Description
AccessoryWidget

getAccessoryWidgetsCount()

public abstract int getAccessoryWidgetsCount()

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.

repeated .google.chat.v1.AccessoryWidget accessory_widgets = 44;

Returns
Type Description
int

getAccessoryWidgetsList()

public abstract List<AccessoryWidget> getAccessoryWidgetsList()

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.

repeated .google.chat.v1.AccessoryWidget accessory_widgets = 44;

Returns
Type Description
List<AccessoryWidget>

getAccessoryWidgetsOrBuilder(int index)

public abstract AccessoryWidgetOrBuilder getAccessoryWidgetsOrBuilder(int index)

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.

repeated .google.chat.v1.AccessoryWidget accessory_widgets = 44;

Parameter
Name Description
index int
Returns
Type Description
AccessoryWidgetOrBuilder

getAccessoryWidgetsOrBuilderList()

public abstract List<? extends AccessoryWidgetOrBuilder> getAccessoryWidgetsOrBuilderList()

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.

repeated .google.chat.v1.AccessoryWidget accessory_widgets = 44;

Returns
Type Description
List<? extends com.google.chat.v1.AccessoryWidgetOrBuilder>

getActionResponse()

public abstract ActionResponse getActionResponse()

Input only. Parameters that a Chat app can use to configure how its response is posted.

.google.chat.v1.ActionResponse action_response = 14 [(.google.api.field_behavior) = INPUT_ONLY];

Returns
Type Description
ActionResponse

The actionResponse.

getActionResponseOrBuilder()

public abstract ActionResponseOrBuilder getActionResponseOrBuilder()

Input only. Parameters that a Chat app can use to configure how its response is posted.

.google.chat.v1.ActionResponse action_response = 14 [(.google.api.field_behavior) = INPUT_ONLY];

Returns
Type Description
ActionResponseOrBuilder

getAnnotations(int index)

public abstract Annotation getAnnotations(int index)

Output only. Annotations associated with the text in this message.

repeated .google.chat.v1.Annotation annotations = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
index int
Returns
Type Description
Annotation

getAnnotationsCount()

public abstract int getAnnotationsCount()

Output only. Annotations associated with the text in this message.

repeated .google.chat.v1.Annotation annotations = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
int

getAnnotationsList()

public abstract List<Annotation> getAnnotationsList()

Output only. Annotations associated with the text in this message.

repeated .google.chat.v1.Annotation annotations = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
List<Annotation>

getAnnotationsOrBuilder(int index)

public abstract AnnotationOrBuilder getAnnotationsOrBuilder(int index)

Output only. Annotations associated with the text in this message.

repeated .google.chat.v1.Annotation annotations = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
index int
Returns
Type Description
AnnotationOrBuilder

getAnnotationsOrBuilderList()

public abstract List<? extends AnnotationOrBuilder> getAnnotationsOrBuilderList()

Output only. Annotations associated with the text in this message.

repeated .google.chat.v1.Annotation annotations = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
List<? extends com.google.chat.v1.AnnotationOrBuilder>

getArgumentText()

public abstract String getArgumentText()

Output only. Plain-text body of the message with all Chat app mentions stripped out.

string argument_text = 15 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
String

The argumentText.

getArgumentTextBytes()

public abstract ByteString getArgumentTextBytes()

Output only. Plain-text body of the message with all Chat app mentions stripped out.

string argument_text = 15 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
ByteString

The bytes for argumentText.

getAttachedGifs(int index)

public abstract AttachedGif getAttachedGifs(int index)

Output only. GIF images that are attached to the message.

repeated .google.chat.v1.AttachedGif attached_gifs = 42 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
index int
Returns
Type Description
AttachedGif

getAttachedGifsCount()

public abstract int getAttachedGifsCount()

Output only. GIF images that are attached to the message.

repeated .google.chat.v1.AttachedGif attached_gifs = 42 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
int

getAttachedGifsList()

public abstract List<AttachedGif> getAttachedGifsList()

Output only. GIF images that are attached to the message.

repeated .google.chat.v1.AttachedGif attached_gifs = 42 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
List<AttachedGif>

getAttachedGifsOrBuilder(int index)

public abstract AttachedGifOrBuilder getAttachedGifsOrBuilder(int index)

Output only. GIF images that are attached to the message.

repeated .google.chat.v1.AttachedGif attached_gifs = 42 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
index int
Returns
Type Description
AttachedGifOrBuilder

getAttachedGifsOrBuilderList()

public abstract List<? extends AttachedGifOrBuilder> getAttachedGifsOrBuilderList()

Output only. GIF images that are attached to the message.

repeated .google.chat.v1.AttachedGif attached_gifs = 42 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
List<? extends com.google.chat.v1.AttachedGifOrBuilder>

getAttachment(int index)

public abstract Attachment getAttachment(int index)

User-uploaded attachment.

repeated .google.chat.v1.Attachment attachment = 18;

Parameter
Name Description
index int
Returns
Type Description
Attachment

getAttachmentCount()

public abstract int getAttachmentCount()

User-uploaded attachment.

repeated .google.chat.v1.Attachment attachment = 18;

Returns
Type Description
int

getAttachmentList()

public abstract List<Attachment> getAttachmentList()

User-uploaded attachment.

repeated .google.chat.v1.Attachment attachment = 18;

Returns
Type Description
List<Attachment>

getAttachmentOrBuilder(int index)

public abstract AttachmentOrBuilder getAttachmentOrBuilder(int index)

User-uploaded attachment.

repeated .google.chat.v1.Attachment attachment = 18;

Parameter
Name Description
index int
Returns
Type Description
AttachmentOrBuilder

getAttachmentOrBuilderList()

public abstract List<? extends AttachmentOrBuilder> getAttachmentOrBuilderList()

User-uploaded attachment.

repeated .google.chat.v1.Attachment attachment = 18;

Returns
Type Description
List<? extends com.google.chat.v1.AttachmentOrBuilder>

getCards(int index) (deprecated)

public abstract ContextualAddOnMarkup.Card getCards(int index)

Deprecated: Use cards_v2 instead.

Rich, formatted, and interactive cards that you can use to display UI elements such as: formatted texts, buttons, and clickable images. Cards are normally displayed below the plain-text body of the message. cards and cards_v2 can have a maximum size of 32 KB.

repeated .google.chat.v1.ContextualAddOnMarkup.Card cards = 5 [deprecated = true];

Parameter
Name Description
index int
Returns
Type Description
ContextualAddOnMarkup.Card

getCardsCount() (deprecated)

public abstract int getCardsCount()

Deprecated: Use cards_v2 instead.

Rich, formatted, and interactive cards that you can use to display UI elements such as: formatted texts, buttons, and clickable images. Cards are normally displayed below the plain-text body of the message. cards and cards_v2 can have a maximum size of 32 KB.

repeated .google.chat.v1.ContextualAddOnMarkup.Card cards = 5 [deprecated = true];

Returns
Type Description
int

getCardsList() (deprecated)

public abstract List<ContextualAddOnMarkup.Card> getCardsList()

Deprecated: Use cards_v2 instead.

Rich, formatted, and interactive cards that you can use to display UI elements such as: formatted texts, buttons, and clickable images. Cards are normally displayed below the plain-text body of the message. cards and cards_v2 can have a maximum size of 32 KB.

repeated .google.chat.v1.ContextualAddOnMarkup.Card cards = 5 [deprecated = true];

Returns
Type Description
List<Card>

getCardsOrBuilder(int index) (deprecated)

public abstract ContextualAddOnMarkup.CardOrBuilder getCardsOrBuilder(int index)

Deprecated: Use cards_v2 instead.

Rich, formatted, and interactive cards that you can use to display UI elements such as: formatted texts, buttons, and clickable images. Cards are normally displayed below the plain-text body of the message. cards and cards_v2 can have a maximum size of 32 KB.

repeated .google.chat.v1.ContextualAddOnMarkup.Card cards = 5 [deprecated = true];

Parameter
Name Description
index int
Returns
Type Description
ContextualAddOnMarkup.CardOrBuilder

getCardsOrBuilderList() (deprecated)

public abstract List<? extends ContextualAddOnMarkup.CardOrBuilder> getCardsOrBuilderList()

Deprecated: Use cards_v2 instead.

Rich, formatted, and interactive cards that you can use to display UI elements such as: formatted texts, buttons, and clickable images. Cards are normally displayed below the plain-text body of the message. cards and cards_v2 can have a maximum size of 32 KB.

repeated .google.chat.v1.ContextualAddOnMarkup.Card cards = 5 [deprecated = true];

Returns
Type Description
List<? extends com.google.chat.v1.ContextualAddOnMarkup.CardOrBuilder>

getCardsV2(int index)

public abstract CardWithId getCardsV2(int index)

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 about cards and how to create them, see Send card messages.

Card builder

repeated .google.chat.v1.CardWithId cards_v2 = 22;

Parameter
Name Description
index int
Returns
Type Description
CardWithId

getCardsV2Count()

public abstract int getCardsV2Count()

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 about cards and how to create them, see Send card messages.

Card builder

repeated .google.chat.v1.CardWithId cards_v2 = 22;

Returns
Type Description
int

getCardsV2List()

public abstract List<CardWithId> getCardsV2List()

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 about cards and how to create them, see Send card messages.

Card builder

repeated .google.chat.v1.CardWithId cards_v2 = 22;

Returns
Type Description
List<CardWithId>

getCardsV2OrBuilder(int index)

public abstract CardWithIdOrBuilder getCardsV2OrBuilder(int index)

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 about cards and how to create them, see Send card messages.

Card builder

repeated .google.chat.v1.CardWithId cards_v2 = 22;

Parameter
Name Description
index int
Returns
Type Description
CardWithIdOrBuilder

getCardsV2OrBuilderList()

public abstract List<? extends CardWithIdOrBuilder> getCardsV2OrBuilderList()

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 about cards and how to create them, see Send card messages.

Card builder

repeated .google.chat.v1.CardWithId cards_v2 = 22;

Returns
Type Description
List<? extends com.google.chat.v1.CardWithIdOrBuilder>

getClientAssignedMessageId()

public abstract String getClientAssignedMessageId()

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 field when you create the message. For details, see Name a message.

string client_assigned_message_id = 32;

Returns
Type Description
String

The clientAssignedMessageId.

getClientAssignedMessageIdBytes()

public abstract ByteString getClientAssignedMessageIdBytes()

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 field when you create the message. For details, see Name a message.

string client_assigned_message_id = 32;

Returns
Type Description
ByteString

The bytes for clientAssignedMessageId.

getCreateTime()

public abstract Timestamp getCreateTime()

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.

.google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
Timestamp

The createTime.

getCreateTimeOrBuilder()

public abstract TimestampOrBuilder getCreateTimeOrBuilder()

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.

.google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
TimestampOrBuilder

getDeleteTime()

public abstract Timestamp getDeleteTime()

Output only. The time at which the message was deleted in Google Chat. If the message is never deleted, this field is empty.

.google.protobuf.Timestamp delete_time = 26 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Timestamp

The deleteTime.

getDeleteTimeOrBuilder()

public abstract TimestampOrBuilder getDeleteTimeOrBuilder()

Output only. The time at which the message was deleted in Google Chat. If the message is never deleted, this field is empty.

.google.protobuf.Timestamp delete_time = 26 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
TimestampOrBuilder

getDeletionMetadata()

public abstract DeletionMetadata getDeletionMetadata()

Output only. Information about a deleted message. A message is deleted when delete_time is set.

.google.chat.v1.DeletionMetadata deletion_metadata = 38 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
DeletionMetadata

The deletionMetadata.

getDeletionMetadataOrBuilder()

public abstract DeletionMetadataOrBuilder getDeletionMetadataOrBuilder()

Output only. Information about a deleted message. A message is deleted when delete_time is set.

.google.chat.v1.DeletionMetadata deletion_metadata = 38 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
DeletionMetadataOrBuilder

getEmojiReactionSummaries(int index)

public abstract EmojiReactionSummary getEmojiReactionSummaries(int index)

Output only. The list of emoji reaction summaries on the message.

repeated .google.chat.v1.EmojiReactionSummary emoji_reaction_summaries = 33 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
index int
Returns
Type Description
EmojiReactionSummary

getEmojiReactionSummariesCount()

public abstract int getEmojiReactionSummariesCount()

Output only. The list of emoji reaction summaries on the message.

repeated .google.chat.v1.EmojiReactionSummary emoji_reaction_summaries = 33 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
int

getEmojiReactionSummariesList()

public abstract List<EmojiReactionSummary> getEmojiReactionSummariesList()

Output only. The list of emoji reaction summaries on the message.

repeated .google.chat.v1.EmojiReactionSummary emoji_reaction_summaries = 33 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
List<EmojiReactionSummary>

getEmojiReactionSummariesOrBuilder(int index)

public abstract EmojiReactionSummaryOrBuilder getEmojiReactionSummariesOrBuilder(int index)

Output only. The list of emoji reaction summaries on the message.

repeated .google.chat.v1.EmojiReactionSummary emoji_reaction_summaries = 33 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
index int
Returns
Type Description
EmojiReactionSummaryOrBuilder

getEmojiReactionSummariesOrBuilderList()

public abstract List<? extends EmojiReactionSummaryOrBuilder> getEmojiReactionSummariesOrBuilderList()

Output only. The list of emoji reaction summaries on the message.

repeated .google.chat.v1.EmojiReactionSummary emoji_reaction_summaries = 33 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
List<? extends com.google.chat.v1.EmojiReactionSummaryOrBuilder>

getFallbackText()

public abstract String getFallbackText()

A plain-text description of the message's cards, used when the actual cards can't be displayed—for example, mobile notifications.

string fallback_text = 13;

Returns
Type Description
String

The fallbackText.

getFallbackTextBytes()

public abstract ByteString getFallbackTextBytes()

A plain-text description of the message's cards, used when the actual cards can't be displayed—for example, mobile notifications.

string fallback_text = 13;

Returns
Type Description
ByteString

The bytes for fallbackText.

getFormattedText()

public abstract String getFormattedText()

Output only. Contains the message text with markups added to communicate formatting. This field might not capture all formatting visible in the UI, but includes the following:

  • Markup syntax 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, 😄. This doesn't apply to Unicode emoji, such as U+1F600 for a grinning face emoji.

    For more information, see View text formatting sent in a message

string formatted_text = 43 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
String

The formattedText.

getFormattedTextBytes()

public abstract ByteString getFormattedTextBytes()

Output only. Contains the message text with markups added to communicate formatting. This field might not capture all formatting visible in the UI, but includes the following:

  • Markup syntax 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, 😄. This doesn't apply to Unicode emoji, such as U+1F600 for a grinning face emoji.

    For more information, see View text formatting sent in a message

string formatted_text = 43 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
ByteString

The bytes for formattedText.

getLastUpdateTime()

public abstract Timestamp getLastUpdateTime()

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.

.google.protobuf.Timestamp last_update_time = 23 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Timestamp

The lastUpdateTime.

getLastUpdateTimeOrBuilder()

public abstract TimestampOrBuilder getLastUpdateTimeOrBuilder()

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.

.google.protobuf.Timestamp last_update_time = 23 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
TimestampOrBuilder

getMatchedUrl()

public abstract MatchedUrl getMatchedUrl()

Output only. A URL in spaces.messages.text that matches a link preview pattern. For more information, see Preview links.

.google.chat.v1.MatchedUrl matched_url = 20 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
MatchedUrl

The matchedUrl.

getMatchedUrlOrBuilder()

public abstract MatchedUrlOrBuilder getMatchedUrlOrBuilder()

Output only. A URL in spaces.messages.text that matches a link preview pattern. For more information, see Preview links.

.google.chat.v1.MatchedUrl matched_url = 20 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
MatchedUrlOrBuilder

getName()

public abstract String getName()

Resource name of the message.

Format: spaces/{space}/messages/{message}

Where {space} is the ID of the space where the message is posted and {message} is a system-assigned ID for the message. For example, spaces/AAAAAAAAAAA/messages/BBBBBBBBBBB.BBBBBBBBBBB.

If you set a custom ID when you create a message, you can use this ID to specify the message in a request by replacing {message} with the value from the clientAssignedMessageId field. For example, spaces/AAAAAAAAAAA/messages/client-custom-name. For details, see Name a message.

string name = 1;

Returns
Type Description
String

The name.

getNameBytes()

public abstract ByteString getNameBytes()

Resource name of the message.

Format: spaces/{space}/messages/{message}

Where {space} is the ID of the space where the message is posted and {message} is a system-assigned ID for the message. For example, spaces/AAAAAAAAAAA/messages/BBBBBBBBBBB.BBBBBBBBBBB.

If you set a custom ID when you create a message, you can use this ID to specify the message in a request by replacing {message} with the value from the clientAssignedMessageId field. For example, spaces/AAAAAAAAAAA/messages/client-custom-name. For details, see Name a message.

string name = 1;

Returns
Type Description
ByteString

The bytes for name.

getPrivateMessageViewer()

public abstract User getPrivateMessageViewer()

Immutable. Input for creating a message, otherwise output only. The user that can view the message. When set, the message is private and only visible to the specified user and the Chat app. Link previews and attachments aren't supported for private messages.

Only Chat apps can send private messages. If your Chat app authenticates as a user to send a message, the message can't be private and must omit this field.

For details, see Send private messages to Google Chat users.

.google.chat.v1.User private_message_viewer = 36 [(.google.api.field_behavior) = IMMUTABLE];

Returns
Type Description
User

The privateMessageViewer.

getPrivateMessageViewerOrBuilder()

public abstract UserOrBuilder getPrivateMessageViewerOrBuilder()

Immutable. Input for creating a message, otherwise output only. The user that can view the message. When set, the message is private and only visible to the specified user and the Chat app. Link previews and attachments aren't supported for private messages.

Only Chat apps can send private messages. If your Chat app authenticates as a user to send a message, the message can't be private and must omit this field.

For details, see Send private messages to Google Chat users.

.google.chat.v1.User private_message_viewer = 36 [(.google.api.field_behavior) = IMMUTABLE];

Returns
Type Description
UserOrBuilder

getQuotedMessageMetadata()

public abstract QuotedMessageMetadata getQuotedMessageMetadata()

Output only. Information about a message that's quoted by a Google Chat user in a space. Google Chat users can quote a message to reply to it.

.google.chat.v1.QuotedMessageMetadata quoted_message_metadata = 39 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
QuotedMessageMetadata

The quotedMessageMetadata.

getQuotedMessageMetadataOrBuilder()

public abstract QuotedMessageMetadataOrBuilder getQuotedMessageMetadataOrBuilder()

Output only. Information about a message that's quoted by a Google Chat user in a space. Google Chat users can quote a message to reply to it.

.google.chat.v1.QuotedMessageMetadata quoted_message_metadata = 39 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
QuotedMessageMetadataOrBuilder

getSender()

public abstract User getSender()

Output only. The user who created the message. If your Chat app authenticates as a user, the output populates the user name and type.

.google.chat.v1.User sender = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
User

The sender.

getSenderOrBuilder()

public abstract UserOrBuilder getSenderOrBuilder()

Output only. The user who created the message. If your Chat app authenticates as a user, the output populates the user name and type.

.google.chat.v1.User sender = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
UserOrBuilder

getSlashCommand()

public abstract SlashCommand getSlashCommand()

Output only. Slash command information, if applicable.

.google.chat.v1.SlashCommand slash_command = 17 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
SlashCommand

The slashCommand.

getSlashCommandOrBuilder()

public abstract SlashCommandOrBuilder getSlashCommandOrBuilder()

Output only. Slash command information, if applicable.

.google.chat.v1.SlashCommand slash_command = 17 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
SlashCommandOrBuilder

getSpace()

public abstract Space getSpace()

If your Chat app authenticates as a user, the output populates the space name.

.google.chat.v1.Space space = 12;

Returns
Type Description
Space

The space.

getSpaceOrBuilder()

public abstract SpaceOrBuilder getSpaceOrBuilder()

If your Chat app authenticates as a user, the output populates the space name.

.google.chat.v1.Space space = 12;

Returns
Type Description
SpaceOrBuilder

getText()

public abstract String getText()

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 text message.

string text = 4;

Returns
Type Description
String

The text.

getTextBytes()

public abstract ByteString getTextBytes()

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 text message.

string text = 4;

Returns
Type Description
ByteString

The bytes for text.

getThread()

public abstract Thread getThread()

The thread the message belongs to. For example usage, see Start or reply to a message thread.

.google.chat.v1.Thread thread = 11;

Returns
Type Description
Thread

The thread.

getThreadOrBuilder()

public abstract ThreadOrBuilder getThreadOrBuilder()

The thread the message belongs to. For example usage, see Start or reply to a message thread.

.google.chat.v1.Thread thread = 11;

Returns
Type Description
ThreadOrBuilder

getThreadReply()

public abstract boolean getThreadReply()

Output only. When true, the message is a response in a reply thread. When false, the message is visible in the space's top-level conversation as either the first message of a thread or a message with no threaded replies.

If the space doesn't support reply in threads, this field is always false.

bool thread_reply = 25 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
boolean

The threadReply.

hasActionResponse()

public abstract boolean hasActionResponse()

Input only. Parameters that a Chat app can use to configure how its response is posted.

.google.chat.v1.ActionResponse action_response = 14 [(.google.api.field_behavior) = INPUT_ONLY];

Returns
Type Description
boolean

Whether the actionResponse field is set.

hasCreateTime()

public abstract boolean hasCreateTime()

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.

.google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
boolean

Whether the createTime field is set.

hasDeleteTime()

public abstract boolean hasDeleteTime()

Output only. The time at which the message was deleted in Google Chat. If the message is never deleted, this field is empty.

.google.protobuf.Timestamp delete_time = 26 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
boolean

Whether the deleteTime field is set.

hasDeletionMetadata()

public abstract boolean hasDeletionMetadata()

Output only. Information about a deleted message. A message is deleted when delete_time is set.

.google.chat.v1.DeletionMetadata deletion_metadata = 38 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
boolean

Whether the deletionMetadata field is set.

hasLastUpdateTime()

public abstract boolean hasLastUpdateTime()

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.

.google.protobuf.Timestamp last_update_time = 23 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
boolean

Whether the lastUpdateTime field is set.

hasMatchedUrl()

public abstract boolean hasMatchedUrl()

Output only. A URL in spaces.messages.text that matches a link preview pattern. For more information, see Preview links.

.google.chat.v1.MatchedUrl matched_url = 20 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
boolean

Whether the matchedUrl field is set.

hasPrivateMessageViewer()

public abstract boolean hasPrivateMessageViewer()

Immutable. Input for creating a message, otherwise output only. The user that can view the message. When set, the message is private and only visible to the specified user and the Chat app. Link previews and attachments aren't supported for private messages.

Only Chat apps can send private messages. If your Chat app authenticates as a user to send a message, the message can't be private and must omit this field.

For details, see Send private messages to Google Chat users.

.google.chat.v1.User private_message_viewer = 36 [(.google.api.field_behavior) = IMMUTABLE];

Returns
Type Description
boolean

Whether the privateMessageViewer field is set.

hasQuotedMessageMetadata()

public abstract boolean hasQuotedMessageMetadata()

Output only. Information about a message that's quoted by a Google Chat user in a space. Google Chat users can quote a message to reply to it.

.google.chat.v1.QuotedMessageMetadata quoted_message_metadata = 39 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
boolean

Whether the quotedMessageMetadata field is set.

hasSender()

public abstract boolean hasSender()

Output only. The user who created the message. If your Chat app authenticates as a user, the output populates the user name and type.

.google.chat.v1.User sender = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
boolean

Whether the sender field is set.

hasSlashCommand()

public abstract boolean hasSlashCommand()

Output only. Slash command information, if applicable.

.google.chat.v1.SlashCommand slash_command = 17 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
boolean

Whether the slashCommand field is set.

hasSpace()

public abstract boolean hasSpace()

If your Chat app authenticates as a user, the output populates the space name.

.google.chat.v1.Space space = 12;

Returns
Type Description
boolean

Whether the space field is set.

hasThread()

public abstract boolean hasThread()

The thread the message belongs to. For example usage, see Start or reply to a message thread.

.google.chat.v1.Thread thread = 11;

Returns
Type Description
boolean

Whether the thread field is set.