Class: AWSCDK::Lex::CfnBot::BotLocaleProperty
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::Lex::CfnBot::BotLocaleProperty
- Defined in:
- lex/cfn_bot.rb
Overview
Provides configuration information for a locale.
Instance Attribute Summary collapse
- #audio_filler_settings ⇒ AWSCDK::IResolvable, ... readonly
-
#custom_vocabulary ⇒ AWSCDK::IResolvable, ...
readonly
Specifies a custom vocabulary to use with a specific locale.
-
#description ⇒ String?
readonly
A description of the bot locale.
- #generative_ai_settings ⇒ AWSCDK::IResolvable, ... readonly
-
#intents ⇒ AWSCDK::IResolvable, ...
readonly
One or more intents defined for the locale.
-
#locale_id ⇒ String
readonly
The identifier of the language and locale that the bot will be used in.
-
#nlu_confidence_threshold ⇒ Numeric
readonly
Determines the threshold where Amazon Lex will insert the
AMAZON.FallbackIntent,AMAZON.KendraSearchIntent, or both when returning alternative intents. -
#slot_types ⇒ AWSCDK::IResolvable, ...
readonly
One or more slot types defined for the locale.
- #speech_detection_sensitivity ⇒ String? readonly
- #speech_recognition_settings ⇒ AWSCDK::IResolvable, ... readonly
- #unified_speech_settings ⇒ AWSCDK::IResolvable, ... readonly
-
#voice_settings ⇒ AWSCDK::IResolvable, ...
readonly
Defines settings for using an Amazon Polly voice to communicate with a user.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(locale_id:, nlu_confidence_threshold:, audio_filler_settings: nil, custom_vocabulary: nil, description: nil, generative_ai_settings: nil, intents: nil, slot_types: nil, speech_detection_sensitivity: nil, speech_recognition_settings: nil, unified_speech_settings: nil, voice_settings: nil) ⇒ BotLocaleProperty
constructor
A new instance of BotLocaleProperty.
- #to_jsii ⇒ Object
Constructor Details
#initialize(locale_id:, nlu_confidence_threshold:, audio_filler_settings: nil, custom_vocabulary: nil, description: nil, generative_ai_settings: nil, intents: nil, slot_types: nil, speech_detection_sensitivity: nil, speech_recognition_settings: nil, unified_speech_settings: nil, voice_settings: nil) ⇒ BotLocaleProperty
Returns a new instance of BotLocaleProperty.
1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 |
# File 'lex/cfn_bot.rb', line 1386 def initialize(locale_id:, nlu_confidence_threshold:, audio_filler_settings: nil, custom_vocabulary: nil, description: nil, generative_ai_settings: nil, intents: nil, slot_types: nil, speech_detection_sensitivity: nil, speech_recognition_settings: nil, unified_speech_settings: nil, voice_settings: nil) @locale_id = locale_id Jsii::Type.check_type(@locale_id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "localeId") @nlu_confidence_threshold = nlu_confidence_threshold Jsii::Type.check_type(@nlu_confidence_threshold, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "nluConfidenceThreshold") @audio_filler_settings = audio_filler_settings.is_a?(Hash) ? ::AWSCDK::Lex::CfnBot::AudioFillerSettingsProperty.new(**audio_filler_settings.transform_keys(&:to_sym)) : audio_filler_settings Jsii::Type.check_type(@audio_filler_settings, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19sZXguQ2ZuQm90LkF1ZGlvRmlsbGVyU2V0dGluZ3NQcm9wZXJ0eSJ9XX19")), "audioFillerSettings") unless @audio_filler_settings.nil? @custom_vocabulary = custom_vocabulary.is_a?(Hash) ? ::AWSCDK::Lex::CfnBot::CustomVocabularyProperty.new(**custom_vocabulary.transform_keys(&:to_sym)) : custom_vocabulary Jsii::Type.check_type(@custom_vocabulary, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19sZXguQ2ZuQm90LkN1c3RvbVZvY2FidWxhcnlQcm9wZXJ0eSJ9XX19")), "customVocabulary") unless @custom_vocabulary.nil? @description = description Jsii::Type.check_type(@description, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "description") unless @description.nil? @generative_ai_settings = generative_ai_settings.is_a?(Hash) ? ::AWSCDK::Lex::CfnBot::GenerativeAISettingsProperty.new(**generative_ai_settings.transform_keys(&:to_sym)) : generative_ai_settings Jsii::Type.check_type(@generative_ai_settings, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19sZXguQ2ZuQm90LkdlbmVyYXRpdmVBSVNldHRpbmdzUHJvcGVydHkifV19fQ==")), "generativeAiSettings") unless @generative_ai_settings.nil? @intents = intents Jsii::Type.check_type(@intents, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImNvbGxlY3Rpb24iOnsiZWxlbWVudHR5cGUiOnsidW5pb24iOnsidHlwZXMiOlt7ImZxbiI6ImF3cy1jZGstbGliLklSZXNvbHZhYmxlIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfbGV4LkNmbkJvdC5JbnRlbnRQcm9wZXJ0eSJ9XX19LCJraW5kIjoiYXJyYXkifX1dfX0=")), "intents") unless @intents.nil? @slot_types = slot_types Jsii::Type.check_type(@slot_types, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImNvbGxlY3Rpb24iOnsiZWxlbWVudHR5cGUiOnsidW5pb24iOnsidHlwZXMiOlt7ImZxbiI6ImF3cy1jZGstbGliLklSZXNvbHZhYmxlIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfbGV4LkNmbkJvdC5TbG90VHlwZVByb3BlcnR5In1dfX0sImtpbmQiOiJhcnJheSJ9fV19fQ==")), "slotTypes") unless @slot_types.nil? @speech_detection_sensitivity = speech_detection_sensitivity Jsii::Type.check_type(@speech_detection_sensitivity, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "speechDetectionSensitivity") unless @speech_detection_sensitivity.nil? @speech_recognition_settings = speech_recognition_settings.is_a?(Hash) ? ::AWSCDK::Lex::CfnBot::SpeechRecognitionSettingsProperty.new(**speech_recognition_settings.transform_keys(&:to_sym)) : speech_recognition_settings Jsii::Type.check_type(@speech_recognition_settings, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19sZXguQ2ZuQm90LlNwZWVjaFJlY29nbml0aW9uU2V0dGluZ3NQcm9wZXJ0eSJ9XX19")), "speechRecognitionSettings") unless @speech_recognition_settings.nil? @unified_speech_settings = unified_speech_settings.is_a?(Hash) ? ::AWSCDK::Lex::CfnBot::UnifiedSpeechSettingsProperty.new(**unified_speech_settings.transform_keys(&:to_sym)) : unified_speech_settings Jsii::Type.check_type(@unified_speech_settings, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19sZXguQ2ZuQm90LlVuaWZpZWRTcGVlY2hTZXR0aW5nc1Byb3BlcnR5In1dfX0=")), "unifiedSpeechSettings") unless @unified_speech_settings.nil? @voice_settings = voice_settings.is_a?(Hash) ? ::AWSCDK::Lex::CfnBot::VoiceSettingsProperty.new(**voice_settings.transform_keys(&:to_sym)) : voice_settings Jsii::Type.check_type(@voice_settings, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19sZXguQ2ZuQm90LlZvaWNlU2V0dGluZ3NQcm9wZXJ0eSJ9XX19")), "voiceSettings") unless @voice_settings.nil? end |
Instance Attribute Details
#audio_filler_settings ⇒ AWSCDK::IResolvable, ... (readonly)
1427 1428 1429 |
# File 'lex/cfn_bot.rb', line 1427 def audio_filler_settings @audio_filler_settings end |
#custom_vocabulary ⇒ AWSCDK::IResolvable, ... (readonly)
Specifies a custom vocabulary to use with a specific locale.
1432 1433 1434 |
# File 'lex/cfn_bot.rb', line 1432 def custom_vocabulary @custom_vocabulary end |
#description ⇒ String? (readonly)
A description of the bot locale.
Use this to help identify the bot locale in lists.
1439 1440 1441 |
# File 'lex/cfn_bot.rb', line 1439 def description @description end |
#generative_ai_settings ⇒ AWSCDK::IResolvable, ... (readonly)
1442 1443 1444 |
# File 'lex/cfn_bot.rb', line 1442 def generative_ai_settings @generative_ai_settings end |
#intents ⇒ AWSCDK::IResolvable, ... (readonly)
One or more intents defined for the locale.
1447 1448 1449 |
# File 'lex/cfn_bot.rb', line 1447 def intents @intents end |
#locale_id ⇒ String (readonly)
The identifier of the language and locale that the bot will be used in.
The string must match one of the supported locales.
1419 1420 1421 |
# File 'lex/cfn_bot.rb', line 1419 def locale_id @locale_id end |
#nlu_confidence_threshold ⇒ Numeric (readonly)
Determines the threshold where Amazon Lex will insert the AMAZON.FallbackIntent , AMAZON.KendraSearchIntent , or both when returning alternative intents. You must configure an AMAZON.FallbackIntent . AMAZON.KendraSearchIntent is only inserted if it is configured for the bot.
1424 1425 1426 |
# File 'lex/cfn_bot.rb', line 1424 def nlu_confidence_threshold @nlu_confidence_threshold end |
#slot_types ⇒ AWSCDK::IResolvable, ... (readonly)
One or more slot types defined for the locale.
1452 1453 1454 |
# File 'lex/cfn_bot.rb', line 1452 def slot_types @slot_types end |
#speech_detection_sensitivity ⇒ String? (readonly)
1455 1456 1457 |
# File 'lex/cfn_bot.rb', line 1455 def speech_detection_sensitivity @speech_detection_sensitivity end |
#speech_recognition_settings ⇒ AWSCDK::IResolvable, ... (readonly)
1458 1459 1460 |
# File 'lex/cfn_bot.rb', line 1458 def speech_recognition_settings @speech_recognition_settings end |
#unified_speech_settings ⇒ AWSCDK::IResolvable, ... (readonly)
1461 1462 1463 |
# File 'lex/cfn_bot.rb', line 1461 def unified_speech_settings @unified_speech_settings end |
#voice_settings ⇒ AWSCDK::IResolvable, ... (readonly)
Defines settings for using an Amazon Polly voice to communicate with a user.
Valid values include:
standardneurallong-formgenerative
1473 1474 1475 |
# File 'lex/cfn_bot.rb', line 1473 def voice_settings @voice_settings end |
Class Method Details
.jsii_properties ⇒ Object
1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 |
# File 'lex/cfn_bot.rb', line 1475 def self.jsii_properties { :locale_id => "localeId", :nlu_confidence_threshold => "nluConfidenceThreshold", :audio_filler_settings => "audioFillerSettings", :custom_vocabulary => "customVocabulary", :description => "description", :generative_ai_settings => "generativeAiSettings", :intents => "intents", :slot_types => "slotTypes", :speech_detection_sensitivity => "speechDetectionSensitivity", :speech_recognition_settings => "speechRecognitionSettings", :unified_speech_settings => "unifiedSpeechSettings", :voice_settings => "voiceSettings", } end |
Instance Method Details
#to_jsii ⇒ Object
1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 |
# File 'lex/cfn_bot.rb', line 1492 def to_jsii result = {} result.merge!({ "localeId" => @locale_id, "nluConfidenceThreshold" => @nlu_confidence_threshold, "audioFillerSettings" => @audio_filler_settings, "customVocabulary" => @custom_vocabulary, "description" => @description, "generativeAiSettings" => @generative_ai_settings, "intents" => @intents, "slotTypes" => @slot_types, "speechDetectionSensitivity" => @speech_detection_sensitivity, "speechRecognitionSettings" => @speech_recognition_settings, "unifiedSpeechSettings" => @unified_speech_settings, "voiceSettings" => @voice_settings, }) result.compact end |