class Google::Apis::ChatV1::Annotation
Annotations associated with the plain-text body of the message. 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/107946847022116401880“, ”displayName“:”FooBot“, ”avatarUrl“:”goo.gl/aeDtrS“, ”type“:”BOT“ `, ” type“:”MENTION“ ` `] “`
Attributes
Length of the substring in the plain-text message body this annotation corresponds to. Corresponds to the JSON property `length` @return [Fixnum]
Annotation
metadata for slash commands (/). Corresponds to the JSON property `slashCommand` @return [Google::Apis::ChatV1::SlashCommandMetadata]
Start index (0-based, inclusive) in the plain-text message body this annotation corresponds to. Corresponds to the JSON property `startIndex` @return [Fixnum]
The type of this annotation. Corresponds to the JSON property `type` @return [String]
Annotation
metadata for user mentions (@). Corresponds to the JSON property `userMention` @return [Google::Apis::ChatV1::UserMentionMetadata]
Public Class Methods
# File lib/google/apis/chat_v1/classes.rb, line 152 def initialize(**args) update!(**args) end
Public Instance Methods
Update properties of this object
# File lib/google/apis/chat_v1/classes.rb, line 157 def update!(**args) @length = args[:length] if args.key?(:length) @slash_command = args[:slash_command] if args.key?(:slash_command) @start_index = args[:start_index] if args.key?(:start_index) @type = args[:type] if args.key?(:type) @user_mention = args[:user_mention] if args.key?(:user_mention) end