Class: AWSCDK::Lex::CfnBot::SlotTypeProperty
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::Lex::CfnBot::SlotTypeProperty
- Defined in:
- lex/cfn_bot.rb
Overview
Describes a slot type.
Instance Attribute Summary collapse
- #composite_slot_type_setting ⇒ AWSCDK::IResolvable, ... readonly
-
#description ⇒ String?
readonly
A description of the slot type.
-
#external_source_setting ⇒ AWSCDK::IResolvable, ...
readonly
Sets the type of external information used to create the slot type.
-
#name ⇒ String
readonly
The name of the slot type.
-
#parent_slot_type_signature ⇒ String?
readonly
The built-in slot type used as a parent of this slot type.
-
#slot_type_values ⇒ AWSCDK::IResolvable, ...
readonly
A list of SlotTypeValue objects that defines the values that the slot type can take.
-
#value_selection_setting ⇒ AWSCDK::IResolvable, ...
readonly
Determines the slot resolution strategy that Amazon Lex uses to return slot type values.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(name:, composite_slot_type_setting: nil, description: nil, external_source_setting: nil, parent_slot_type_signature: nil, slot_type_values: nil, value_selection_setting: nil) ⇒ SlotTypeProperty
constructor
A new instance of SlotTypeProperty.
- #to_jsii ⇒ Object
Constructor Details
#initialize(name:, composite_slot_type_setting: nil, description: nil, external_source_setting: nil, parent_slot_type_signature: nil, slot_type_values: nil, value_selection_setting: nil) ⇒ SlotTypeProperty
Returns a new instance of SlotTypeProperty.
5602 5603 5604 5605 5606 5607 5608 5609 5610 5611 5612 5613 5614 5615 5616 5617 |
# File 'lex/cfn_bot.rb', line 5602 def initialize(name:, composite_slot_type_setting: nil, description: nil, external_source_setting: nil, parent_slot_type_signature: nil, slot_type_values: nil, value_selection_setting: nil) @name = name Jsii::Type.check_type(@name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "name") @composite_slot_type_setting = composite_slot_type_setting.is_a?(Hash) ? ::AWSCDK::Lex::CfnBot::CompositeSlotTypeSettingProperty.new(**composite_slot_type_setting.transform_keys(&:to_sym)) : composite_slot_type_setting Jsii::Type.check_type(@composite_slot_type_setting, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19sZXguQ2ZuQm90LkNvbXBvc2l0ZVNsb3RUeXBlU2V0dGluZ1Byb3BlcnR5In1dfX0=")), "compositeSlotTypeSetting") unless @composite_slot_type_setting.nil? @description = description Jsii::Type.check_type(@description, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "description") unless @description.nil? @external_source_setting = external_source_setting.is_a?(Hash) ? ::AWSCDK::Lex::CfnBot::ExternalSourceSettingProperty.new(**external_source_setting.transform_keys(&:to_sym)) : external_source_setting Jsii::Type.check_type(@external_source_setting, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19sZXguQ2ZuQm90LkV4dGVybmFsU291cmNlU2V0dGluZ1Byb3BlcnR5In1dfX0=")), "externalSourceSetting") unless @external_source_setting.nil? @parent_slot_type_signature = parent_slot_type_signature Jsii::Type.check_type(@parent_slot_type_signature, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "parentSlotTypeSignature") unless @parent_slot_type_signature.nil? @slot_type_values = slot_type_values Jsii::Type.check_type(@slot_type_values, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImNvbGxlY3Rpb24iOnsiZWxlbWVudHR5cGUiOnsidW5pb24iOnsidHlwZXMiOlt7ImZxbiI6ImF3cy1jZGstbGliLklSZXNvbHZhYmxlIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfbGV4LkNmbkJvdC5TbG90VHlwZVZhbHVlUHJvcGVydHkifV19fSwia2luZCI6ImFycmF5In19XX19")), "slotTypeValues") unless @slot_type_values.nil? @value_selection_setting = value_selection_setting.is_a?(Hash) ? ::AWSCDK::Lex::CfnBot::SlotValueSelectionSettingProperty.new(**value_selection_setting.transform_keys(&:to_sym)) : value_selection_setting Jsii::Type.check_type(@value_selection_setting, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19sZXguQ2ZuQm90LlNsb3RWYWx1ZVNlbGVjdGlvblNldHRpbmdQcm9wZXJ0eSJ9XX19")), "valueSelectionSetting") unless @value_selection_setting.nil? end |
Instance Attribute Details
#composite_slot_type_setting ⇒ AWSCDK::IResolvable, ... (readonly)
5628 5629 5630 |
# File 'lex/cfn_bot.rb', line 5628 def composite_slot_type_setting @composite_slot_type_setting end |
#description ⇒ String? (readonly)
A description of the slot type.
Use the description to help identify the slot type in lists.
5635 5636 5637 |
# File 'lex/cfn_bot.rb', line 5635 def description @description end |
#external_source_setting ⇒ AWSCDK::IResolvable, ... (readonly)
Sets the type of external information used to create the slot type.
5640 5641 5642 |
# File 'lex/cfn_bot.rb', line 5640 def external_source_setting @external_source_setting end |
#name ⇒ String (readonly)
The name of the slot type.
A slot type name must be unique withing the account.
5625 5626 5627 |
# File 'lex/cfn_bot.rb', line 5625 def name @name end |
#parent_slot_type_signature ⇒ String? (readonly)
The built-in slot type used as a parent of this slot type.
When you define a parent slot type, the new slot type has the configuration of the parent lot type.
Only AMAZON.AlphaNumeric is supported.
5649 5650 5651 |
# File 'lex/cfn_bot.rb', line 5649 def parent_slot_type_signature @parent_slot_type_signature end |
#slot_type_values ⇒ AWSCDK::IResolvable, ... (readonly)
A list of SlotTypeValue objects that defines the values that the slot type can take.
Each value can have a list of synonyms, additional values that help train the machine learning model about the values that it resolves for the slot.
5656 5657 5658 |
# File 'lex/cfn_bot.rb', line 5656 def slot_type_values @slot_type_values end |
#value_selection_setting ⇒ AWSCDK::IResolvable, ... (readonly)
Determines the slot resolution strategy that Amazon Lex uses to return slot type values.
The field can be set to one of the following values:
ORIGINAL_VALUE- Returns the value entered by the user, if the user value is similar to the slot value.TOP_RESOLUTION- If there is a resolution list for the slot, return the first value in the resolution list as the slot type value. If there is no resolution list, null is returned.
If you don't specify the value_selection_strategy , the default is ORIGINAL_VALUE .
5668 5669 5670 |
# File 'lex/cfn_bot.rb', line 5668 def value_selection_setting @value_selection_setting end |
Class Method Details
.jsii_properties ⇒ Object
5670 5671 5672 5673 5674 5675 5676 5677 5678 5679 5680 |
# File 'lex/cfn_bot.rb', line 5670 def self.jsii_properties { :name => "name", :composite_slot_type_setting => "compositeSlotTypeSetting", :description => "description", :external_source_setting => "externalSourceSetting", :parent_slot_type_signature => "parentSlotTypeSignature", :slot_type_values => "slotTypeValues", :value_selection_setting => "valueSelectionSetting", } end |
Instance Method Details
#to_jsii ⇒ Object
5682 5683 5684 5685 5686 5687 5688 5689 5690 5691 5692 5693 5694 |
# File 'lex/cfn_bot.rb', line 5682 def to_jsii result = {} result.merge!({ "name" => @name, "compositeSlotTypeSetting" => @composite_slot_type_setting, "description" => @description, "externalSourceSetting" => @external_source_setting, "parentSlotTypeSignature" => @parent_slot_type_signature, "slotTypeValues" => @slot_type_values, "valueSelectionSetting" => @value_selection_setting, }) result.compact end |