Class: AWSCDK::Lex::CfnBot::SlotValueOverrideProperty

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

Overview

The slot values that Amazon Lex uses when it sets slot values in a dialog step.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(shape: nil, value: nil, values: nil) ⇒ SlotValueOverrideProperty

Returns a new instance of SlotValueOverrideProperty.

Parameters:



5881
5882
5883
5884
5885
5886
5887
5888
# File 'lex/cfn_bot.rb', line 5881

def initialize(shape: nil, value: nil, values: nil)
  @shape = shape
  Jsii::Type.check_type(@shape, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "shape") unless @shape.nil?
  @value = value.is_a?(Hash) ? ::AWSCDK::Lex::CfnBot::SlotValueProperty.new(**value.transform_keys(&:to_sym)) : value
  Jsii::Type.check_type(@value, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19sZXguQ2ZuQm90LlNsb3RWYWx1ZVByb3BlcnR5In1dfX0=")), "value") unless @value.nil?
  @values = values
  Jsii::Type.check_type(@values, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImNvbGxlY3Rpb24iOnsiZWxlbWVudHR5cGUiOnsidW5pb24iOnsidHlwZXMiOlt7ImZxbiI6ImF3cy1jZGstbGliLklSZXNvbHZhYmxlIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfbGV4LkNmbkJvdC5TbG90VmFsdWVPdmVycmlkZVByb3BlcnR5In1dfX0sImtpbmQiOiJhcnJheSJ9fV19fQ==")), "values") unless @values.nil?
end

Instance Attribute Details

#shapeString? (readonly)

When the shape value is List , it indicates that the values field contains a list of slot values.

When the value is Scalar , it indicates that the value field contains a single value.



5896
5897
5898
# File 'lex/cfn_bot.rb', line 5896

def shape
  @shape
end

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

The current value of the slot.



5901
5902
5903
# File 'lex/cfn_bot.rb', line 5901

def value
  @value
end

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

A list of one or more values that the user provided for the slot.

For example, for a slot that elicits pizza toppings, the values might be "pepperoni" and "pineapple."



5908
5909
5910
# File 'lex/cfn_bot.rb', line 5908

def values
  @values
end

Class Method Details

.jsii_propertiesObject



5910
5911
5912
5913
5914
5915
5916
# File 'lex/cfn_bot.rb', line 5910

def self.jsii_properties
  {
    :shape => "shape",
    :value => "value",
    :values => "values",
  }
end

Instance Method Details

#to_jsiiObject



5918
5919
5920
5921
5922
5923
5924
5925
5926
# File 'lex/cfn_bot.rb', line 5918

def to_jsii
  result = {}
  result.merge!({
    "shape" => @shape,
    "value" => @value,
    "values" => @values,
  })
  result.compact
end