Class: AWSCDK::Lex::CfnBot::ButtonProperty

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
lex/cfn_bot.rb

Overview

Describes a button to use on a response card used to gather slot values from a user.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(text:, value:) ⇒ ButtonProperty

Returns a new instance of ButtonProperty.

Parameters:

  • text (String)

    The text that appears on the button.

  • value (String)

    The value returned to Amazon Lex when the user chooses this button.



1559
1560
1561
1562
1563
1564
# File 'lex/cfn_bot.rb', line 1559

def initialize(text:, value:)
  @text = text
  Jsii::Type.check_type(@text, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "text")
  @value = value
  Jsii::Type.check_type(@value, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "value")
end

Instance Attribute Details

#textString (readonly)

The text that appears on the button.

Use this to tell the user what value is returned when they choose this button.



1572
1573
1574
# File 'lex/cfn_bot.rb', line 1572

def text
  @text
end

#valueString (readonly)

The value returned to Amazon Lex when the user chooses this button.

This must be one of the slot values configured for the slot.



1579
1580
1581
# File 'lex/cfn_bot.rb', line 1579

def value
  @value
end

Class Method Details

.jsii_propertiesObject



1581
1582
1583
1584
1585
1586
# File 'lex/cfn_bot.rb', line 1581

def self.jsii_properties
  {
    :text => "text",
    :value => "value",
  }
end

Instance Method Details

#to_jsiiObject



1588
1589
1590
1591
1592
1593
1594
1595
# File 'lex/cfn_bot.rb', line 1588

def to_jsii
  result = {}
  result.merge!({
    "text" => @text,
    "value" => @value,
  })
  result.compact
end