Class: Aws::Lex::Conversation::Type::SlotValue

Inherits:
Object
  • Object
show all
Includes:
Base
Defined in:
lib/aws/lex/conversation/type/slot_value.rb

Instance Method Summary collapse

Methods included from Base

included

Instance Method Details

#resolvable?Boolean

Returns:

  • (Boolean)


33
34
35
# File 'lib/aws/lex/conversation/type/slot_value.rb', line 33

def resolvable?
  resolved_values.any?
end

#resolve!(index: 0) ⇒ Object



25
26
27
# File 'lib/aws/lex/conversation/type/slot_value.rb', line 25

def resolve!(index: 0)
  self.interpreted_value = resolved(index: index)
end

#resolved(index: 0) ⇒ Object



29
30
31
# File 'lib/aws/lex/conversation/type/slot_value.rb', line 29

def resolved(index: 0)
  resolved_values.fetch(index) { interpreted_value }
end

#to_lexObject



17
18
19
20
21
22
23
# File 'lib/aws/lex/conversation/type/slot_value.rb', line 17

def to_lex
  {
    interpretedValue: interpreted_value,
    originalValue: original_value,
    resolvedValues: resolved_values
  }
end