public
final
class
Message
extends
GeneratedMessageV3
implements
MessageOrBuilder
A message in a Google Chat space.
Protobuf type google.chat.v1.Message
Inheritance
Object > AbstractMessageLite<MessageType,BuilderType> > AbstractMessage > GeneratedMessageV3 > MessageImplements
MessageOrBuilderStatic Fields
ACCESSORY_WIDGETS_FIELD_NUMBER
public
static
final
int
ACCESSORY_WIDGETS_FIELD_NUMBER
ACTION_RESPONSE_FIELD_NUMBER
public
static
final
int
ACTION_RESPONSE_FIELD_NUMBER
ANNOTATIONS_FIELD_NUMBER
public
static
final
int
ANNOTATIONS_FIELD_NUMBER
ARGUMENT_TEXT_FIELD_NUMBER
public
static
final
int
ARGUMENT_TEXT_FIELD_NUMBER
ATTACHED_GIFS_FIELD_NUMBER
public
static
final
int
ATTACHED_GIFS_FIELD_NUMBER
ATTACHMENT_FIELD_NUMBER
public
static
final
int
ATTACHMENT_FIELD_NUMBER
CARDS_FIELD_NUMBER
public
static
final
int
CARDS_FIELD_NUMBER
CARDS_V2_FIELD_NUMBER
public
static
final
int
CARDS_V2_FIELD_NUMBER
CLIENT_ASSIGNED_MESSAGE_ID_FIELD_NUMBER
public
static
final
int
CLIENT_ASSIGNED_MESSAGE_ID_FIELD_NUMBER
CREATE_TIME_FIELD_NUMBER
public
static
final
int
CREATE_TIME_FIELD_NUMBER
DELETE_TIME_FIELD_NUMBER
public
static
final
int
DELETE_TIME_FIELD_NUMBER
DELETION_METADATA_FIELD_NUMBER
public
static
final
int
DELETION_METADATA_FIELD_NUMBER
EMOJI_REACTION_SUMMARIES_FIELD_NUMBER
public
static
final
int
EMOJI_REACTION_SUMMARIES_FIELD_NUMBER
FALLBACK_TEXT_FIELD_NUMBER
public
static
final
int
FALLBACK_TEXT_FIELD_NUMBER
FORMATTED_TEXT_FIELD_NUMBER
public
static
final
int
FORMATTED_TEXT_FIELD_NUMBER
LAST_UPDATE_TIME_FIELD_NUMBER
public
static
final
int
LAST_UPDATE_TIME_FIELD_NUMBER
MATCHED_URL_FIELD_NUMBER
public
static
final
int
MATCHED_URL_FIELD_NUMBER
NAME_FIELD_NUMBER
public
static
final
int
NAME_FIELD_NUMBER
PRIVATE_MESSAGE_VIEWER_FIELD_NUMBER
public
static
final
int
PRIVATE_MESSAGE_VIEWER_FIELD_NUMBER
QUOTED_MESSAGE_METADATA_FIELD_NUMBER
public
static
final
int
QUOTED_MESSAGE_METADATA_FIELD_NUMBER
SENDER_FIELD_NUMBER
public
static
final
int
SENDER_FIELD_NUMBER
SLASH_COMMAND_FIELD_NUMBER
public
static
final
int
SLASH_COMMAND_FIELD_NUMBER
SPACE_FIELD_NUMBER
public
static
final
int
SPACE_FIELD_NUMBER
TEXT_FIELD_NUMBER
public
static
final
int
TEXT_FIELD_NUMBER
THREAD_FIELD_NUMBER
public
static
final
int
THREAD_FIELD_NUMBER
THREAD_REPLY_FIELD_NUMBER
public
static
final
int
THREAD_REPLY_FIELD_NUMBER
Static Methods
getDefaultInstance()
public
static
Message
getDefaultInstance
()
getDescriptor()
public
static
final
Descriptors
.
Descriptor
getDescriptor
()
newBuilder()
public
static
Message
.
Builder
newBuilder
()
newBuilder(Message prototype)
public
static
Message
.
Builder
newBuilder
(
Message
prototype
)
parseDelimitedFrom(InputStream input)
public
static
Message
parseDelimitedFrom
(
InputStream
input
)
parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
public
static
Message
parseDelimitedFrom
(
InputStream
input
,
ExtensionRegistryLite
extensionRegistry
)
parseFrom(byte[] data)
public
static
Message
parseFrom
(
byte
[]
data
)
data
byte
[]
parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
public
static
Message
parseFrom
(
byte
[]
data
,
ExtensionRegistryLite
extensionRegistry
)
parseFrom(ByteString data)
public
static
Message
parseFrom
(
ByteString
data
)
parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
public
static
Message
parseFrom
(
ByteString
data
,
ExtensionRegistryLite
extensionRegistry
)
parseFrom(CodedInputStream input)
public
static
Message
parseFrom
(
CodedInputStream
input
)
parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
public
static
Message
parseFrom
(
CodedInputStream
input
,
ExtensionRegistryLite
extensionRegistry
)
parseFrom(InputStream input)
public
static
Message
parseFrom
(
InputStream
input
)
parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
public
static
Message
parseFrom
(
InputStream
input
,
ExtensionRegistryLite
extensionRegistry
)
parseFrom(ByteBuffer data)
public
static
Message
parseFrom
(
ByteBuffer
data
)
parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
public
static
Message
parseFrom
(
ByteBuffer
data
,
ExtensionRegistryLite
extensionRegistry
)
parser()
public
static
Parser<Message>
parser
()
Methods
equals(Object obj)
public
boolean
equals
(
Object
obj
)
getAccessoryWidgets(int index)
public
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;
getAccessoryWidgetsCount()
public
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;
getAccessoryWidgetsList()
public
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;
getAccessoryWidgetsOrBuilder(int index)
public
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;
getAccessoryWidgetsOrBuilderList()
public
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;
getActionResponse()
public
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];
getActionResponseOrBuilder()
public
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];
getAnnotations(int index)
public
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];
getAnnotationsCount()
public
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];
getAnnotationsList()
public
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];
getAnnotationsOrBuilder(int index)
public
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];
getAnnotationsOrBuilderList()
public
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];
getArgumentText()
public
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];
getArgumentTextBytes()
public
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];
getAttachedGifs(int index)
public
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];
getAttachedGifsCount()
public
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];
getAttachedGifsList()
public
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];
getAttachedGifsOrBuilder(int index)
public
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];
getAttachedGifsOrBuilderList()
public
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];
getAttachment(int index)
public
Attachment
getAttachment
(
int
index
)
User-uploaded attachment.
repeated .google.chat.v1.Attachment attachment = 18;
getAttachmentCount()
public
int
getAttachmentCount
()
User-uploaded attachment.
repeated .google.chat.v1.Attachment attachment = 18;
getAttachmentList()
public
List<Attachment>
getAttachmentList
()
User-uploaded attachment.
repeated .google.chat.v1.Attachment attachment = 18;
getAttachmentOrBuilder(int index)
public
AttachmentOrBuilder
getAttachmentOrBuilder
(
int
index
)
User-uploaded attachment.
repeated .google.chat.v1.Attachment attachment = 18;
getAttachmentOrBuilderList()
public
List
< ?
extends
AttachmentOrBuilder
>
getAttachmentOrBuilderList
()
User-uploaded attachment.
repeated .google.chat.v1.Attachment attachment = 18;
getCards(int index) (deprecated)
public
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];
getCardsCount() (deprecated)
public
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];
getCardsList() (deprecated)
public
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];
getCardsOrBuilder(int index) (deprecated)
public
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];
getCardsOrBuilderList() (deprecated)
public
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];
getCardsV2(int index)
public
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 how to create a message that contains cards, see Send a message .
repeated .google.chat.v1.CardWithId cards_v2 = 22;
getCardsV2Count()
public
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 how to create a message that contains cards, see Send a message .
repeated .google.chat.v1.CardWithId cards_v2 = 22;
getCardsV2List()
public
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 how to create a message that contains cards, see Send a message .
repeated .google.chat.v1.CardWithId cards_v2 = 22;
getCardsV2OrBuilder(int index)
public
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 how to create a message that contains cards, see Send a message .
repeated .google.chat.v1.CardWithId cards_v2 = 22;
getCardsV2OrBuilderList()
public
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 how to create a message that contains cards, see Send a message .
repeated .google.chat.v1.CardWithId cards_v2 = 22;
getClientAssignedMessageId()
public
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;
getClientAssignedMessageIdBytes()
public
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;
getCreateTime()
public
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];
getCreateTimeOrBuilder()
public
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];
getDefaultInstanceForType()
public
Message
getDefaultInstanceForType
()
getDeleteTime()
public
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];
getDeleteTimeOrBuilder()
public
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];
getDeletionMetadata()
public
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];
getDeletionMetadataOrBuilder()
public
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];
getEmojiReactionSummaries(int index)
public
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];
getEmojiReactionSummariesCount()
public
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];
getEmojiReactionSummariesList()
public
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];
getEmojiReactionSummariesOrBuilder(int index)
public
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];
getEmojiReactionSummariesOrBuilderList()
public
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];
getFallbackText()
public
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;
getFallbackTextBytes()
public
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;
getFormattedText()
public
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 asU+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];
getFormattedTextBytes()
public
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 asU+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];
getLastUpdateTime()
public
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];
getLastUpdateTimeOrBuilder()
public
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];
getMatchedUrl()
public
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];
getMatchedUrlOrBuilder()
public
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];
getName()
public
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;
getNameBytes()
public
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;
getParserForType()
public
Parser<Message>
getParserForType
()
getPrivateMessageViewer()
public
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. To include this field in your request, you must call the Chat API using app authentication and omit the following:
- Attachments
-
For details, see Send a message privately .
.google.chat.v1.User private_message_viewer = 36 [(.google.api.field_behavior) = IMMUTABLE];
getPrivateMessageViewerOrBuilder()
public
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. To include this field in your request, you must call the Chat API using app authentication and omit the following:
- Attachments
-
For details, see Send a message privately .
.google.chat.v1.User private_message_viewer = 36 [(.google.api.field_behavior) = IMMUTABLE];
getQuotedMessageMetadata()
public
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];
getQuotedMessageMetadataOrBuilder()
public
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];
getSender()
public
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];
getSenderOrBuilder()
public
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];
getSerializedSize()
public
int
getSerializedSize
()
getSlashCommand()
public
SlashCommand
getSlashCommand
()
Output only. Slash command information, if applicable.
.google.chat.v1.SlashCommand slash_command = 17 [(.google.api.field_behavior) = OUTPUT_ONLY];
getSlashCommandOrBuilder()
public
SlashCommandOrBuilder
getSlashCommandOrBuilder
()
Output only. Slash command information, if applicable.
.google.chat.v1.SlashCommand slash_command = 17 [(.google.api.field_behavior) = OUTPUT_ONLY];
getSpace()
public
Space
getSpace
()
If your Chat app authenticates as a
user
,
the output populates the space
name
.
.google.chat.v1.Space space = 12;
getSpaceOrBuilder()
public
SpaceOrBuilder
getSpaceOrBuilder
()
If your Chat app authenticates as a
user
,
the output populates the space
name
.
.google.chat.v1.Space space = 12;
getText()
public
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 message .
string text = 4;
getTextBytes()
public
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 message .
string text = 4;
getThread()
public
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;
getThreadOrBuilder()
public
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;
getThreadReply()
public
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];
hasActionResponse()
public
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];
hasCreateTime()
public
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];
hasDeleteTime()
public
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];
hasDeletionMetadata()
public
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];
hasLastUpdateTime()
public
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];
hasMatchedUrl()
public
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];
hasPrivateMessageViewer()
public
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. To include this field in your request, you must call the Chat API using app authentication and omit the following:
- Attachments
-
For details, see Send a message privately .
.google.chat.v1.User private_message_viewer = 36 [(.google.api.field_behavior) = IMMUTABLE];
hasQuotedMessageMetadata()
public
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];
hasSender()
public
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];
hasSlashCommand()
public
boolean
hasSlashCommand
()
Output only. Slash command information, if applicable.
.google.chat.v1.SlashCommand slash_command = 17 [(.google.api.field_behavior) = OUTPUT_ONLY];
hasSpace()
public
boolean
hasSpace
()
If your Chat app authenticates as a
user
,
the output populates the space
name
.
.google.chat.v1.Space space = 12;
hasThread()
public
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;
hashCode()
public
int
hashCode
()
internalGetFieldAccessorTable()
protected
GeneratedMessageV3
.
FieldAccessorTable
internalGetFieldAccessorTable
()
isInitialized()
public
final
boolean
isInitialized
()
newBuilderForType()
public
Message
.
Builder
newBuilderForType
()
newBuilderForType(GeneratedMessageV3.BuilderParent parent)
protected
Message
.
Builder
newBuilderForType
(
GeneratedMessageV3
.
BuilderParent
parent
)
newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
protected
Object
newInstance
(
GeneratedMessageV3
.
UnusedPrivateParameter
unused
)
toBuilder()
public
Message
.
Builder
toBuilder
()
writeTo(CodedOutputStream output)
public
void
writeTo
(
CodedOutputStream
output
)