Class: AWSCDK::Lex::CfnBot::SlotValueElicitationSettingProperty

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

Overview

Specifies the elicitation setting details eliciting a slot.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(slot_constraint:, default_value_specification: nil, prompt_specification: nil, sample_utterances: nil, slot_capture_setting: nil, wait_and_continue_specification: nil) ⇒ SlotValueElicitationSettingProperty

Returns a new instance of SlotValueElicitationSettingProperty.

Parameters:



5754
5755
5756
5757
5758
5759
5760
5761
5762
5763
5764
5765
5766
5767
# File 'lex/cfn_bot.rb', line 5754

def initialize(slot_constraint:, default_value_specification: nil, prompt_specification: nil, sample_utterances: nil, slot_capture_setting: nil, wait_and_continue_specification: nil)
  @slot_constraint = slot_constraint
  Jsii::Type.check_type(@slot_constraint, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "slotConstraint")
  @default_value_specification = default_value_specification.is_a?(Hash) ? ::AWSCDK::Lex::CfnBot::SlotDefaultValueSpecificationProperty.new(**default_value_specification.transform_keys(&:to_sym)) : default_value_specification
  Jsii::Type.check_type(@default_value_specification, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19sZXguQ2ZuQm90LlNsb3REZWZhdWx0VmFsdWVTcGVjaWZpY2F0aW9uUHJvcGVydHkifV19fQ==")), "defaultValueSpecification") unless @default_value_specification.nil?
  @prompt_specification = prompt_specification.is_a?(Hash) ? ::AWSCDK::Lex::CfnBot::PromptSpecificationProperty.new(**prompt_specification.transform_keys(&:to_sym)) : prompt_specification
  Jsii::Type.check_type(@prompt_specification, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19sZXguQ2ZuQm90LlByb21wdFNwZWNpZmljYXRpb25Qcm9wZXJ0eSJ9XX19")), "promptSpecification") unless @prompt_specification.nil?
  @sample_utterances = sample_utterances
  Jsii::Type.check_type(@sample_utterances, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImNvbGxlY3Rpb24iOnsiZWxlbWVudHR5cGUiOnsidW5pb24iOnsidHlwZXMiOlt7ImZxbiI6ImF3cy1jZGstbGliLklSZXNvbHZhYmxlIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfbGV4LkNmbkJvdC5TYW1wbGVVdHRlcmFuY2VQcm9wZXJ0eSJ9XX19LCJraW5kIjoiYXJyYXkifX1dfX0=")), "sampleUtterances") unless @sample_utterances.nil?
  @slot_capture_setting = slot_capture_setting.is_a?(Hash) ? ::AWSCDK::Lex::CfnBot::SlotCaptureSettingProperty.new(**slot_capture_setting.transform_keys(&:to_sym)) : slot_capture_setting
  Jsii::Type.check_type(@slot_capture_setting, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19sZXguQ2ZuQm90LlNsb3RDYXB0dXJlU2V0dGluZ1Byb3BlcnR5In1dfX0=")), "slotCaptureSetting") unless @slot_capture_setting.nil?
  @wait_and_continue_specification = wait_and_continue_specification.is_a?(Hash) ? ::AWSCDK::Lex::CfnBot::WaitAndContinueSpecificationProperty.new(**wait_and_continue_specification.transform_keys(&:to_sym)) : wait_and_continue_specification
  Jsii::Type.check_type(@wait_and_continue_specification, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19sZXguQ2ZuQm90LldhaXRBbmRDb250aW51ZVNwZWNpZmljYXRpb25Qcm9wZXJ0eSJ9XX19")), "waitAndContinueSpecification") unless @wait_and_continue_specification.nil?
end

Instance Attribute Details

#default_value_specificationAWSCDK::IResolvable, ... (readonly)

A list of default values for a slot.

Default values are used when Amazon Lex hasn't determined a value for a slot. You can specify default values from context variables, session attributes, and defined values.



5780
5781
5782
# File 'lex/cfn_bot.rb', line 5780

def default_value_specification
  @default_value_specification
end

#prompt_specificationAWSCDK::IResolvable, ... (readonly)

The prompt that Amazon Lex uses to elicit the slot value from the user.



5785
5786
5787
# File 'lex/cfn_bot.rb', line 5785

def prompt_specification
  @prompt_specification
end

#sample_utterancesAWSCDK::IResolvable, ... (readonly)

If you know a specific pattern that users might respond to an Amazon Lex request for a slot value, you can provide those utterances to improve accuracy.

This is optional. In most cases, Amazon Lex is capable of understanding user utterances.



5792
5793
5794
# File 'lex/cfn_bot.rb', line 5792

def sample_utterances
  @sample_utterances
end

#slot_capture_settingAWSCDK::IResolvable, ... (readonly)

Specifies the settings that Amazon Lex uses when a slot value is successfully entered by a user.



5797
5798
5799
# File 'lex/cfn_bot.rb', line 5797

def slot_capture_setting
  @slot_capture_setting
end

#slot_constraintString (readonly)

Specifies whether the slot is required or optional.



5773
5774
5775
# File 'lex/cfn_bot.rb', line 5773

def slot_constraint
  @slot_constraint
end

#wait_and_continue_specificationAWSCDK::IResolvable, ... (readonly)

Specifies the prompts that Amazon Lex uses while a bot is waiting for customer input.



5802
5803
5804
# File 'lex/cfn_bot.rb', line 5802

def wait_and_continue_specification
  @wait_and_continue_specification
end

Class Method Details

.jsii_propertiesObject



5804
5805
5806
5807
5808
5809
5810
5811
5812
5813
# File 'lex/cfn_bot.rb', line 5804

def self.jsii_properties
  {
    :slot_constraint => "slotConstraint",
    :default_value_specification => "defaultValueSpecification",
    :prompt_specification => "promptSpecification",
    :sample_utterances => "sampleUtterances",
    :slot_capture_setting => "slotCaptureSetting",
    :wait_and_continue_specification => "waitAndContinueSpecification",
  }
end

Instance Method Details

#to_jsiiObject



5815
5816
5817
5818
5819
5820
5821
5822
5823
5824
5825
5826
# File 'lex/cfn_bot.rb', line 5815

def to_jsii
  result = {}
  result.merge!({
    "slotConstraint" => @slot_constraint,
    "defaultValueSpecification" => @default_value_specification,
    "promptSpecification" => @prompt_specification,
    "sampleUtterances" => @sample_utterances,
    "slotCaptureSetting" => @slot_capture_setting,
    "waitAndContinueSpecification" => @wait_and_continue_specification,
  })
  result.compact
end