Google Chat V1 API - Class Google::Apps::Chat::V1::Annotation (v0.4.0)

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
Returns
  • (::Integer) — Length of the substring in the plain-text message body this annotation corresponds to.

#length=

def length=(value) -> ::Integer
Parameter
  • value (::Integer) — Length of the substring in the plain-text message body this annotation corresponds to.
Returns
  • (::Integer) — Length of the substring in the plain-text message body this annotation corresponds to.
def rich_link_metadata() -> ::Google::Apps::Chat::V1::RichLinkMetadata
Returns
def rich_link_metadata=(value) -> ::Google::Apps::Chat::V1::RichLinkMetadata
Parameter
Returns

#slash_command

def slash_command() -> ::Google::Apps::Chat::V1::SlashCommandMetadata
Returns

#slash_command=

def slash_command=(value) -> ::Google::Apps::Chat::V1::SlashCommandMetadata
Parameter
Returns

#start_index

def start_index() -> ::Integer
Returns
  • (::Integer) — Start index (0-based, inclusive) in the plain-text message body this annotation corresponds to.

#start_index=

def start_index=(value) -> ::Integer
Parameter
  • value (::Integer) — Start index (0-based, inclusive) in the plain-text message body this annotation corresponds to.
Returns
  • (::Integer) — Start index (0-based, inclusive) in the plain-text message body this annotation corresponds to.

#type

def type() -> ::Google::Apps::Chat::V1::AnnotationType
Returns

#type=

def type=(value) -> ::Google::Apps::Chat::V1::AnnotationType
Parameter
Returns

#user_mention

def user_mention() -> ::Google::Apps::Chat::V1::UserMentionMetadata
Returns

#user_mention=

def user_mention=(value) -> ::Google::Apps::Chat::V1::UserMentionMetadata
Parameter
Returns