Reference documentation and code samples for the Google Chat V1 API class Google::Apps::Chat::V1::Annotation.
Output only. Annotations associated with the plain-text body of the message. 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"
}
}]
Inherits
- Object
Extended By
- Google::Protobuf::MessageExts::ClassMethods
Includes
- Google::Protobuf::MessageExts
Methods
#length
def length() -> ::Integer
- (::Integer) — Length of the substring in the plain-text message body this annotation corresponds to.
#length=
def length=(value) -> ::Integer
- value (::Integer) — Length of the substring in the plain-text message body this annotation corresponds to.
- (::Integer) — Length of the substring in the plain-text message body this annotation corresponds to.
#rich_link_metadata
def rich_link_metadata() -> ::Google::Apps::Chat::V1::RichLinkMetadata
- (::Google::Apps::Chat::V1::RichLinkMetadata) — The metadata for a rich link.
#rich_link_metadata=
def rich_link_metadata=(value) -> ::Google::Apps::Chat::V1::RichLinkMetadata
- value (::Google::Apps::Chat::V1::RichLinkMetadata) — The metadata for a rich link.
- (::Google::Apps::Chat::V1::RichLinkMetadata) — The metadata for a rich link.
#slash_command
def slash_command() -> ::Google::Apps::Chat::V1::SlashCommandMetadata
- (::Google::Apps::Chat::V1::SlashCommandMetadata) — The metadata for a slash command.
#slash_command=
def slash_command=(value) -> ::Google::Apps::Chat::V1::SlashCommandMetadata
- value (::Google::Apps::Chat::V1::SlashCommandMetadata) — The metadata for a slash command.
- (::Google::Apps::Chat::V1::SlashCommandMetadata) — The metadata for a slash command.
#start_index
def start_index() -> ::Integer
- (::Integer) — Start index (0-based, inclusive) in the plain-text message body this annotation corresponds to.
#start_index=
def start_index=(value) -> ::Integer
- value (::Integer) — Start index (0-based, inclusive) in the plain-text message body this annotation corresponds to.
- (::Integer) — Start index (0-based, inclusive) in the plain-text message body this annotation corresponds to.
#type
def type() -> ::Google::Apps::Chat::V1::AnnotationType
- (::Google::Apps::Chat::V1::AnnotationType) — The type of this annotation.
#type=
def type=(value) -> ::Google::Apps::Chat::V1::AnnotationType
- value (::Google::Apps::Chat::V1::AnnotationType) — The type of this annotation.
- (::Google::Apps::Chat::V1::AnnotationType) — The type of this annotation.
#user_mention
def user_mention() -> ::Google::Apps::Chat::V1::UserMentionMetadata
- (::Google::Apps::Chat::V1::UserMentionMetadata) — The metadata of user mention.
#user_mention=
def user_mention=(value) -> ::Google::Apps::Chat::V1::UserMentionMetadata
- value (::Google::Apps::Chat::V1::UserMentionMetadata) — The metadata of user mention.
- (::Google::Apps::Chat::V1::UserMentionMetadata) — The metadata of user mention.