class Google::Apis::ChatV1::Message

A message in Hangouts Chat.

Attributes

action_response[RW]

Parameters that a bot can use to configure how it's response is posted. Corresponds to the JSON property `actionResponse` @return [Google::Apis::ChatV1::ActionResponse]

annotations[RW]

Output only. Annotations associated with the text in this message. Corresponds to the JSON property `annotations` @return [Array<Google::Apis::ChatV1::Annotation>]

argument_text[RW]

Plain-text body of the message with all bot mentions stripped out. Corresponds to the JSON property `argumentText` @return [String]

attachment[RW]

User uploaded attachment. Corresponds to the JSON property `attachment` @return [Array<Google::Apis::ChatV1::Attachment>]

cards[RW]

Rich, formatted and interactive cards that can be used to display UI elements such as: formatted texts, buttons, clickable images. Cards are normally displayed below the plain-text body of the message. Corresponds to the JSON property `cards` @return [Array<Google::Apis::ChatV1::Card>]

create_time[RW]

Output only. The time at which the message was created in Hangouts Chat server. Corresponds to the JSON property `createTime` @return [String]

fallback_text[RW]

A plain-text description of the message's cards, used when the actual cards cannot be displayed (e.g. mobile notifications). Corresponds to the JSON property `fallbackText` @return [String]

last_update_time[RW]

Output only. The time at which the message was last updated in Hangouts Chat server. If the message was never updated, this field will be same as create_time. Corresponds to the JSON property `lastUpdateTime` @return [String]

name[RW]

Corresponds to the JSON property `name` @return [String]

preview_text[RW]

Text for generating preview chips. This text will not be displayed to the user, but any links to images, web pages, videos, etc. included here will generate preview chips. Corresponds to the JSON property `previewText` @return [String]

sender[RW]

A user in Google Chat. Corresponds to the JSON property `sender` @return [Google::Apis::ChatV1::User]

slash_command[RW]

A Slash Command in Chat. Corresponds to the JSON property `slashCommand` @return [Google::Apis::ChatV1::SlashCommand]

space[RW]

A room or DM in Hangouts Chat. Corresponds to the JSON property `space` @return [Google::Apis::ChatV1::Space]

text[RW]

Plain-text body of the message. Corresponds to the JSON property `text` @return [String]

thread[RW]

A thread in Hangouts Chat. Corresponds to the JSON property `thread` @return [Google::Apis::ChatV1::Thread]

Public Class Methods

new(**args) click to toggle source
# File lib/google/apis/chat_v1/classes.rb, line 2455
def initialize(**args)
   update!(**args)
end

Public Instance Methods

update!(**args) click to toggle source

Update properties of this object

# File lib/google/apis/chat_v1/classes.rb, line 2460
def update!(**args)
  @action_response = args[:action_response] if args.key?(:action_response)
  @annotations = args[:annotations] if args.key?(:annotations)
  @argument_text = args[:argument_text] if args.key?(:argument_text)
  @attachment = args[:attachment] if args.key?(:attachment)
  @cards = args[:cards] if args.key?(:cards)
  @create_time = args[:create_time] if args.key?(:create_time)
  @fallback_text = args[:fallback_text] if args.key?(:fallback_text)
  @last_update_time = args[:last_update_time] if args.key?(:last_update_time)
  @name = args[:name] if args.key?(:name)
  @preview_text = args[:preview_text] if args.key?(:preview_text)
  @sender = args[:sender] if args.key?(:sender)
  @slash_command = args[:slash_command] if args.key?(:slash_command)
  @space = args[:space] if args.key?(:space)
  @text = args[:text] if args.key?(:text)
  @thread = args[:thread] if args.key?(:thread)
end