Struct aws_sdk_lexruntimev2::types::Slot
source · #[non_exhaustive]pub struct Slot {
pub value: Option<Value>,
pub shape: Option<Shape>,
pub values: Option<Vec<Slot>>,
pub sub_slots: Option<HashMap<String, Slot>>,
}
Expand description
A value that Amazon Lex V2 uses to fulfill an intent.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. }
syntax; cannot be matched against without a wildcard ..
; and struct update syntax will not work.value: Option<Value>
The current value of the slot.
shape: Option<Shape>
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.
values: Option<Vec<Slot>>
A list of one or more values that the user provided for the slot. For example, if a for a slot that elicits pizza toppings, the values might be "pepperoni" and "pineapple."
sub_slots: Option<HashMap<String, Slot>>
The constituent sub slots of a composite slot.
Implementations§
source§impl Slot
impl Slot
sourcepub fn shape(&self) -> Option<&Shape>
pub fn shape(&self) -> Option<&Shape>
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.
sourcepub fn values(&self) -> &[Slot]
pub fn values(&self) -> &[Slot]
A list of one or more values that the user provided for the slot. For example, if a for a slot that elicits pizza toppings, the values might be "pepperoni" and "pineapple."
If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use .values.is_none()
.