Class: AWSCDK::Lex::CfnBot::ButtonProperty
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::Lex::CfnBot::ButtonProperty
- 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
-
#text ⇒ String
readonly
The text that appears on the button.
-
#value ⇒ String
readonly
The value returned to Amazon Lex when the user chooses this button.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(text:, value:) ⇒ ButtonProperty
constructor
A new instance of ButtonProperty.
- #to_jsii ⇒ Object
Constructor Details
#initialize(text:, value:) ⇒ ButtonProperty
Returns a new instance of ButtonProperty.
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
#text ⇒ String (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 |
#value ⇒ String (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_properties ⇒ Object
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_jsii ⇒ Object
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 |