Class: Google::Apis::DialogflowV2::GoogleCloudDialogflowV2IntentMessageBasicCard

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/dialogflow_v2/classes.rb,
lib/google/apis/dialogflow_v2/representations.rb,
lib/google/apis/dialogflow_v2/representations.rb

Overview

The basic card message. Useful for displaying information.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleCloudDialogflowV2IntentMessageBasicCard

Returns a new instance of GoogleCloudDialogflowV2IntentMessageBasicCard.



12342
12343
12344
# File 'lib/google/apis/dialogflow_v2/classes.rb', line 12342

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

Instance Attribute Details

#buttonsArray<Google::Apis::DialogflowV2::GoogleCloudDialogflowV2IntentMessageBasicCardButton>

Optional. The collection of card buttons. Corresponds to the JSON property buttons



12320
12321
12322
# File 'lib/google/apis/dialogflow_v2/classes.rb', line 12320

def buttons
  @buttons
end

#formatted_textString

Required, unless image is present. The body text of the card. Corresponds to the JSON property formattedText

Returns:

  • (String)


12325
12326
12327
# File 'lib/google/apis/dialogflow_v2/classes.rb', line 12325

def formatted_text
  @formatted_text
end

#imageGoogle::Apis::DialogflowV2::GoogleCloudDialogflowV2IntentMessageImage

The image response message. Corresponds to the JSON property image



12330
12331
12332
# File 'lib/google/apis/dialogflow_v2/classes.rb', line 12330

def image
  @image
end

#subtitleString

Optional. The subtitle of the card. Corresponds to the JSON property subtitle

Returns:

  • (String)


12335
12336
12337
# File 'lib/google/apis/dialogflow_v2/classes.rb', line 12335

def subtitle
  @subtitle
end

#titleString

Optional. The title of the card. Corresponds to the JSON property title

Returns:

  • (String)


12340
12341
12342
# File 'lib/google/apis/dialogflow_v2/classes.rb', line 12340

def title
  @title
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



12347
12348
12349
12350
12351
12352
12353
# File 'lib/google/apis/dialogflow_v2/classes.rb', line 12347

def update!(**args)
  @buttons = args[:buttons] if args.key?(:buttons)
  @formatted_text = args[:formatted_text] if args.key?(:formatted_text)
  @image = args[:image] if args.key?(:image)
  @subtitle = args[:subtitle] if args.key?(:subtitle)
  @title = args[:title] if args.key?(:title)
end