Class: Google::Apis::ChatV1::Card

Inherits:
Object
  • Object
show all
Includes:
Google::Apis::Core::Hashable, Google::Apis::Core::JsonObjectSupport
Defined in:
generated/google/apis/chat_v1/classes.rb,
generated/google/apis/chat_v1/representations.rb,
generated/google/apis/chat_v1/representations.rb

Overview

A card is a UI element that can contain UI widgets such as texts, images.

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Google::Apis::Core::JsonObjectSupport

#to_json

Methods included from Google::Apis::Core::Hashable

process_value, #to_h

Constructor Details

#initialize(**args) ⇒ Card

Returns a new instance of Card.


256
257
258
# File 'generated/google/apis/chat_v1/classes.rb', line 256

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#card_actionsArray<Google::Apis::ChatV1::CardAction>

The actions of this card. Corresponds to the JSON property cardActions


239
240
241
# File 'generated/google/apis/chat_v1/classes.rb', line 239

def card_actions
  @card_actions
end

#headerGoogle::Apis::ChatV1::CardHeader

The header of the card. A header usually contains a title and an image. Corresponds to the JSON property header


244
245
246
# File 'generated/google/apis/chat_v1/classes.rb', line 244

def header
  @header
end

#nameString

Name of the card. Corresponds to the JSON property name

Returns:

  • (String)

249
250
251
# File 'generated/google/apis/chat_v1/classes.rb', line 249

def name
  @name
end

#sectionsArray<Google::Apis::ChatV1::Section>

Sections are separated by a line divider. Corresponds to the JSON property sections

Returns:


254
255
256
# File 'generated/google/apis/chat_v1/classes.rb', line 254

def sections
  @sections
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object


261
262
263
264
265
266
# File 'generated/google/apis/chat_v1/classes.rb', line 261

def update!(**args)
  @card_actions = args[:card_actions] if args.key?(:card_actions)
  @header = args[:header] if args.key?(:header)
  @name = args[:name] if args.key?(:name)
  @sections = args[:sections] if args.key?(:sections)
end