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

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

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ Card

Returns a new instance of Card.



399
400
401
# File 'lib/google/apis/chat_v1/classes.rb', line 399

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



382
383
384
# File 'lib/google/apis/chat_v1/classes.rb', line 382

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



387
388
389
# File 'lib/google/apis/chat_v1/classes.rb', line 387

def header
  @header
end

#nameString

Name of the card. Corresponds to the JSON property name

Returns:

  • (String)


392
393
394
# File 'lib/google/apis/chat_v1/classes.rb', line 392

def name
  @name
end

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

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

Returns:



397
398
399
# File 'lib/google/apis/chat_v1/classes.rb', line 397

def sections
  @sections
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



404
405
406
407
408
409
# File 'lib/google/apis/chat_v1/classes.rb', line 404

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