public static interface Slot.Builder extends CopyableBuilder<Slot.Builder,Slot>
Modifier and Type | Method and Description |
---|---|
Slot.Builder |
description(String description)
A description of the slot.
|
Slot.Builder |
name(String name)
The name of the slot.
|
Slot.Builder |
priority(Integer priority)
Directs Lex the order in which to elicit this slot value from the user.
|
Slot.Builder |
responseCard(String responseCard)
A set of possible responses for the slot type used by text-based clients.
|
Slot.Builder |
sampleUtterances(Collection<String> sampleUtterances)
If you know a specific pattern with which users might respond to an Amazon Lex request for a slot value, you
can provide those utterances to improve accuracy.
|
Slot.Builder |
sampleUtterances(String... sampleUtterances)
If you know a specific pattern with which users might respond to an Amazon Lex request for a slot value, you
can provide those utterances to improve accuracy.
|
Slot.Builder |
slotConstraint(SlotConstraint slotConstraint)
Specifies whether the slot is required or optional.
|
Slot.Builder |
slotConstraint(String slotConstraint)
Specifies whether the slot is required or optional.
|
Slot.Builder |
slotType(String slotType)
The type of the slot, either a custom slot type that you defined or one of the built-in slot types.
|
Slot.Builder |
slotTypeVersion(String slotTypeVersion)
The version of the slot type.
|
default Slot.Builder |
valueElicitationPrompt(Consumer<Prompt.Builder> valueElicitationPrompt)
The prompt that Amazon Lex uses to elicit the slot value from the user.
|
Slot.Builder |
valueElicitationPrompt(Prompt valueElicitationPrompt)
The prompt that Amazon Lex uses to elicit the slot value from the user.
|
copy
apply, build
Slot.Builder name(String name)
The name of the slot.
name
- The name of the slot.Slot.Builder description(String description)
A description of the slot.
description
- A description of the slot.Slot.Builder slotConstraint(String slotConstraint)
Specifies whether the slot is required or optional.
slotConstraint
- Specifies whether the slot is required or optional.SlotConstraint
,
SlotConstraint
Slot.Builder slotConstraint(SlotConstraint slotConstraint)
Specifies whether the slot is required or optional.
slotConstraint
- Specifies whether the slot is required or optional.SlotConstraint
,
SlotConstraint
Slot.Builder slotType(String slotType)
The type of the slot, either a custom slot type that you defined or one of the built-in slot types.
slotType
- The type of the slot, either a custom slot type that you defined or one of the built-in slot types.Slot.Builder slotTypeVersion(String slotTypeVersion)
The version of the slot type.
slotTypeVersion
- The version of the slot type.Slot.Builder valueElicitationPrompt(Prompt valueElicitationPrompt)
The prompt that Amazon Lex uses to elicit the slot value from the user.
valueElicitationPrompt
- The prompt that Amazon Lex uses to elicit the slot value from the user.default Slot.Builder valueElicitationPrompt(Consumer<Prompt.Builder> valueElicitationPrompt)
The prompt that Amazon Lex uses to elicit the slot value from the user.
This is a convenience that creates an instance of thePrompt.Builder
avoiding the need to create one
manually via Prompt.builder()
.
When the Consumer
completes, SdkBuilder.build()
is called immediately and its result is
passed to valueElicitationPrompt(Prompt)
.valueElicitationPrompt
- a consumer that will call methods on Prompt.Builder
valueElicitationPrompt(Prompt)
Slot.Builder priority(Integer priority)
Directs Lex the order in which to elicit this slot value from the user. For example, if the intent has two slots with priorities 1 and 2, AWS Lex first elicits a value for the slot with priority 1.
If multiple slots share the same priority, the order in which Lex elicits values is arbitrary.
priority
- Directs Lex the order in which to elicit this slot value from the user. For example, if the intent has
two slots with priorities 1 and 2, AWS Lex first elicits a value for the slot with priority 1.
If multiple slots share the same priority, the order in which Lex elicits values is arbitrary.
Slot.Builder sampleUtterances(Collection<String> sampleUtterances)
If you know a specific pattern with which 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.
sampleUtterances
- If you know a specific pattern with which 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.Slot.Builder sampleUtterances(String... sampleUtterances)
If you know a specific pattern with which 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.
sampleUtterances
- If you know a specific pattern with which 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.Slot.Builder responseCard(String responseCard)
A set of possible responses for the slot type used by text-based clients. A user chooses an option from the response card, instead of using text to reply.
responseCard
- A set of possible responses for the slot type used by text-based clients. A user chooses an option
from the response card, instead of using text to reply.Copyright © 2017 Amazon Web Services, Inc. All Rights Reserved.