Class: AWSCDK::Lex::CfnBot::SlotValueSelectionSettingProperty
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::Lex::CfnBot::SlotValueSelectionSettingProperty
- Defined in:
- lex/cfn_bot.rb
Overview
Contains settings used by Amazon Lex to select a slot value.
Instance Attribute Summary collapse
-
#advanced_recognition_setting ⇒ AWSCDK::IResolvable, ...
readonly
Provides settings that enable advanced recognition settings for slot values.
-
#regex_filter ⇒ AWSCDK::IResolvable, ...
readonly
A regular expression used to validate the value of a slot.
-
#resolution_strategy ⇒ String
readonly
Determines the slot resolution strategy that Amazon Lex uses to return slot type values.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(resolution_strategy:, advanced_recognition_setting: nil, regex_filter: nil) ⇒ SlotValueSelectionSettingProperty
constructor
A new instance of SlotValueSelectionSettingProperty.
- #to_jsii ⇒ Object
Constructor Details
#initialize(resolution_strategy:, advanced_recognition_setting: nil, regex_filter: nil) ⇒ SlotValueSelectionSettingProperty
Returns a new instance of SlotValueSelectionSettingProperty.
6019 6020 6021 6022 6023 6024 6025 6026 |
# File 'lex/cfn_bot.rb', line 6019 def initialize(resolution_strategy:, advanced_recognition_setting: nil, regex_filter: nil) @resolution_strategy = resolution_strategy Jsii::Type.check_type(@resolution_strategy, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "resolutionStrategy") @advanced_recognition_setting = advanced_recognition_setting.is_a?(Hash) ? ::AWSCDK::Lex::CfnBot::AdvancedRecognitionSettingProperty.new(**advanced_recognition_setting.transform_keys(&:to_sym)) : advanced_recognition_setting Jsii::Type.check_type(@advanced_recognition_setting, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19sZXguQ2ZuQm90LkFkdmFuY2VkUmVjb2duaXRpb25TZXR0aW5nUHJvcGVydHkifV19fQ==")), "advancedRecognitionSetting") unless @advanced_recognition_setting.nil? @regex_filter = regex_filter.is_a?(Hash) ? ::AWSCDK::Lex::CfnBot::SlotValueRegexFilterProperty.new(**regex_filter.transform_keys(&:to_sym)) : regex_filter Jsii::Type.check_type(@regex_filter, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19sZXguQ2ZuQm90LlNsb3RWYWx1ZVJlZ2V4RmlsdGVyUHJvcGVydHkifV19fQ==")), "regexFilter") unless @regex_filter.nil? end |
Instance Attribute Details
#advanced_recognition_setting ⇒ AWSCDK::IResolvable, ... (readonly)
Provides settings that enable advanced recognition settings for slot values.
You can use this to enable using slot values as a custom vocabulary for recognizing user utterances.
6046 6047 6048 |
# File 'lex/cfn_bot.rb', line 6046 def advanced_recognition_setting @advanced_recognition_setting end |
#regex_filter ⇒ AWSCDK::IResolvable, ... (readonly)
A regular expression used to validate the value of a slot.
6051 6052 6053 |
# File 'lex/cfn_bot.rb', line 6051 def regex_filter @regex_filter end |
#resolution_strategy ⇒ String (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 .
6039 6040 6041 |
# File 'lex/cfn_bot.rb', line 6039 def resolution_strategy @resolution_strategy end |
Class Method Details
.jsii_properties ⇒ Object
6053 6054 6055 6056 6057 6058 6059 |
# File 'lex/cfn_bot.rb', line 6053 def self.jsii_properties { :resolution_strategy => "resolutionStrategy", :advanced_recognition_setting => "advancedRecognitionSetting", :regex_filter => "regexFilter", } end |
Instance Method Details
#to_jsii ⇒ Object
6061 6062 6063 6064 6065 6066 6067 6068 6069 |
# File 'lex/cfn_bot.rb', line 6061 def to_jsii result = {} result.merge!({ "resolutionStrategy" => @resolution_strategy, "advancedRecognitionSetting" => @advanced_recognition_setting, "regexFilter" => @regex_filter, }) result.compact end |