Class: Google::Apps::Chat::V1::Annotation

Inherits:
Object
  • Object
show all
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

Instance Attribute Details

#length::Integer

Returns 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.



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

Returns The metadata for a rich link.

Returns:



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.

Returns:



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.

Returns:

  • (::Integer)

    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.

Returns:



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.

Returns:



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