@Generated(value="software.amazon.awssdk:codegen") public final class Prompt extends Object implements SdkPojo, Serializable, ToCopyableBuilder<Prompt.Builder,Prompt>
Obtains information from the user. To define a prompt, provide one or more messages and specify the number of attempts to get information from the user. If you provide more than one message, Amazon Lex chooses one of the messages to use to prompt the user. For more information, see how-it-works.
| Modifier and Type | Class and Description |
|---|---|
static interface |
Prompt.Builder |
| Modifier and Type | Method and Description |
|---|---|
static Prompt.Builder |
builder() |
boolean |
equals(Object obj) |
boolean |
equalsBySdkFields(Object obj) |
<T> Optional<T> |
getValueForField(String fieldName,
Class<T> clazz) |
int |
hashCode() |
boolean |
hasMessages()
For responses, this returns true if the service returned a value for the Messages property.
|
Integer |
maxAttempts()
The number of times to prompt the user for information.
|
List<Message> |
messages()
An array of objects, each of which provides a message string and its type.
|
String |
responseCard()
A response card.
|
List<SdkField<?>> |
sdkFields() |
static Class<? extends Prompt.Builder> |
serializableBuilderClass() |
Prompt.Builder |
toBuilder() |
String |
toString()
Returns a string representation of this object.
|
clone, finalize, getClass, notify, notifyAll, wait, wait, waitcopypublic final boolean hasMessages()
isEmpty() method on the property). This is
useful because the SDK will never return a null collection or map, but you may need to differentiate between the
service returning nothing (or null) and the service returning an empty collection or map. For requests, this
returns true if a value for the property was specified in the request builder, and false if a value was not
specified.public final List<Message> messages()
An array of objects, each of which provides a message string and its type. You can specify the message string in plain text or in Speech Synthesis Markup Language (SSML).
Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
This method will never return null. If you would like to know whether the service returned this field (so that
you can differentiate between null and empty), you can use the hasMessages() method.
public final Integer maxAttempts()
The number of times to prompt the user for information.
public final String responseCard()
A response card. Amazon Lex uses this prompt at runtime, in the PostText API response. It
substitutes session attributes and slot values for placeholders in the response card. For more information, see
ex-resp-card.
PostText API response. It
substitutes session attributes and slot values for placeholders in the response card. For more
information, see ex-resp-card.public Prompt.Builder toBuilder()
toBuilder in interface ToCopyableBuilder<Prompt.Builder,Prompt>public static Prompt.Builder builder()
public static Class<? extends Prompt.Builder> serializableBuilderClass()
public final boolean equalsBySdkFields(Object obj)
equalsBySdkFields in interface SdkPojopublic final String toString()
Copyright © 2022. All rights reserved.