Class: Google::Apps::Chat::V1::Annotation
- Inherits:
-
Object
- Object
- Google::Apps::Chat::V1::Annotation
- Extended by:
- Protobuf::MessageExts::ClassMethods
- Includes:
- Protobuf::MessageExts
- Defined in:
- proto_docs/google/chat/v1/annotation.rb
Overview
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"
}
}]
Instance Attribute Summary collapse
-
#length ⇒ ::Integer
Length of the substring in the plain-text message body this annotation corresponds to.
-
#rich_link_metadata ⇒ ::Google::Apps::Chat::V1::RichLinkMetadata
The metadata for a rich link.
-
#slash_command ⇒ ::Google::Apps::Chat::V1::SlashCommandMetadata
The metadata for a slash command.
-
#start_index ⇒ ::Integer
Start index (0-based, inclusive) in the plain-text message body this annotation corresponds to.
-
#type ⇒ ::Google::Apps::Chat::V1::AnnotationType
The type of this annotation.
-
#user_mention ⇒ ::Google::Apps::Chat::V1::UserMentionMetadata
The metadata of user mention.
Instance Attribute Details
#length ⇒ ::Integer
Returns Length of the substring in the plain-text message body this annotation corresponds to.
71 72 73 74 |
# File 'proto_docs/google/chat/v1/annotation.rb', line 71 class Annotation include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end |
#rich_link_metadata ⇒ ::Google::Apps::Chat::V1::RichLinkMetadata
Returns The metadata for a rich link.
71 72 73 74 |
# File 'proto_docs/google/chat/v1/annotation.rb', line 71 class Annotation include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end |
#slash_command ⇒ ::Google::Apps::Chat::V1::SlashCommandMetadata
Returns The metadata for a slash command.
71 72 73 74 |
# File 'proto_docs/google/chat/v1/annotation.rb', line 71 class Annotation include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end |
#start_index ⇒ ::Integer
Returns Start index (0-based, inclusive) in the plain-text message body this annotation corresponds to.
71 72 73 74 |
# File 'proto_docs/google/chat/v1/annotation.rb', line 71 class Annotation include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end |
#type ⇒ ::Google::Apps::Chat::V1::AnnotationType
Returns The type of this annotation.
71 72 73 74 |
# File 'proto_docs/google/chat/v1/annotation.rb', line 71 class Annotation include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end |
#user_mention ⇒ ::Google::Apps::Chat::V1::UserMentionMetadata
Returns The metadata of user mention.
71 72 73 74 |
# File 'proto_docs/google/chat/v1/annotation.rb', line 71 class Annotation include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end |