Class: Google::Apis::ChatV1::Card
- Inherits:
-
Object
- Object
- Google::Apis::ChatV1::Card
- Includes:
- Google::Apis::Core::Hashable, Google::Apis::Core::JsonObjectSupport
- Defined in:
- lib/google/apis/chat_v1/classes.rb,
lib/google/apis/chat_v1/representations.rb,
lib/google/apis/chat_v1/representations.rb
Overview
A card is a UI element that can contain UI widgets such as text and images.
Instance Attribute Summary collapse
-
#card_actions ⇒ Array<Google::Apis::ChatV1::CardAction>
The actions of this card.
-
#header ⇒ Google::Apis::ChatV1::CardHeader
The header of the card.
-
#name ⇒ String
Name of the card.
-
#sections ⇒ Array<Google::Apis::ChatV1::Section>
Sections are separated by a line divider.
Instance Method Summary collapse
-
#initialize(**args) ⇒ Card
constructor
A new instance of Card.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ Card
Returns a new instance of Card.
364 365 366 |
# File 'lib/google/apis/chat_v1/classes.rb', line 364 def initialize(**args) update!(**args) end |
Instance Attribute Details
#card_actions ⇒ Array<Google::Apis::ChatV1::CardAction>
The actions of this card.
Corresponds to the JSON property cardActions
347 348 349 |
# File 'lib/google/apis/chat_v1/classes.rb', line 347 def card_actions @card_actions end |
#header ⇒ Google::Apis::ChatV1::CardHeader
The header of the card. A header usually contains a title and an image.
Corresponds to the JSON property header
352 353 354 |
# File 'lib/google/apis/chat_v1/classes.rb', line 352 def header @header end |
#name ⇒ String
Name of the card.
Corresponds to the JSON property name
357 358 359 |
# File 'lib/google/apis/chat_v1/classes.rb', line 357 def name @name end |
#sections ⇒ Array<Google::Apis::ChatV1::Section>
Sections are separated by a line divider.
Corresponds to the JSON property sections
362 363 364 |
# File 'lib/google/apis/chat_v1/classes.rb', line 362 def sections @sections end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
369 370 371 372 373 374 |
# File 'lib/google/apis/chat_v1/classes.rb', line 369 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 |