@Generated(value="com.amazonaws:aws-java-sdk-code-generator") public class ActiveContext extends Object implements Serializable, Cloneable, StructuredPojo
Contains information about the contexts that a user is using in a session. You can configure Amazon Lex V2 to set a context when an intent is fulfilled, or you can set a context using the , , or operations.
Use a context to indicate to Amazon Lex V2 intents that should be used as follow-up intents. For example, if the
active context is order-fulfilled
, only intents that have order-fulfilled
configured as a
trigger are considered for follow up.
Constructor and Description |
---|
ActiveContext() |
Modifier and Type | Method and Description |
---|---|
ActiveContext |
addContextAttributesEntry(String key,
String value)
Add a single ContextAttributes entry
|
ActiveContext |
clearContextAttributesEntries()
Removes all the entries added into ContextAttributes.
|
ActiveContext |
clone() |
boolean |
equals(Object obj) |
Map<String,String> |
getContextAttributes()
A list of contexts active for the request.
|
String |
getName()
The name of the context.
|
ActiveContextTimeToLive |
getTimeToLive()
Indicates the number of turns or seconds that the context is active.
|
int |
hashCode() |
void |
marshall(ProtocolMarshaller protocolMarshaller)
Marshalls this structured data using the given
ProtocolMarshaller . |
void |
setContextAttributes(Map<String,String> contextAttributes)
A list of contexts active for the request.
|
void |
setName(String name)
The name of the context.
|
void |
setTimeToLive(ActiveContextTimeToLive timeToLive)
Indicates the number of turns or seconds that the context is active.
|
String |
toString()
Returns a string representation of this object.
|
ActiveContext |
withContextAttributes(Map<String,String> contextAttributes)
A list of contexts active for the request.
|
ActiveContext |
withName(String name)
The name of the context.
|
ActiveContext |
withTimeToLive(ActiveContextTimeToLive timeToLive)
Indicates the number of turns or seconds that the context is active.
|
public void setName(String name)
The name of the context.
name
- The name of the context.public String getName()
The name of the context.
public ActiveContext withName(String name)
The name of the context.
name
- The name of the context.public void setTimeToLive(ActiveContextTimeToLive timeToLive)
Indicates the number of turns or seconds that the context is active. Once the time to live expires, the context is no longer returned in a response.
timeToLive
- Indicates the number of turns or seconds that the context is active. Once the time to live expires, the
context is no longer returned in a response.public ActiveContextTimeToLive getTimeToLive()
Indicates the number of turns or seconds that the context is active. Once the time to live expires, the context is no longer returned in a response.
public ActiveContext withTimeToLive(ActiveContextTimeToLive timeToLive)
Indicates the number of turns or seconds that the context is active. Once the time to live expires, the context is no longer returned in a response.
timeToLive
- Indicates the number of turns or seconds that the context is active. Once the time to live expires, the
context is no longer returned in a response.public Map<String,String> getContextAttributes()
A list of contexts active for the request. A context can be activated when a previous intent is fulfilled, or by including the context in the request.
If you don't specify a list of contexts, Amazon Lex V2 will use the current list of contexts for the session. If you specify an empty list, all contexts for the session are cleared.
If you don't specify a list of contexts, Amazon Lex V2 will use the current list of contexts for the session. If you specify an empty list, all contexts for the session are cleared.
public void setContextAttributes(Map<String,String> contextAttributes)
A list of contexts active for the request. A context can be activated when a previous intent is fulfilled, or by including the context in the request.
If you don't specify a list of contexts, Amazon Lex V2 will use the current list of contexts for the session. If you specify an empty list, all contexts for the session are cleared.
contextAttributes
- A list of contexts active for the request. A context can be activated when a previous intent is fulfilled,
or by including the context in the request.
If you don't specify a list of contexts, Amazon Lex V2 will use the current list of contexts for the session. If you specify an empty list, all contexts for the session are cleared.
public ActiveContext withContextAttributes(Map<String,String> contextAttributes)
A list of contexts active for the request. A context can be activated when a previous intent is fulfilled, or by including the context in the request.
If you don't specify a list of contexts, Amazon Lex V2 will use the current list of contexts for the session. If you specify an empty list, all contexts for the session are cleared.
contextAttributes
- A list of contexts active for the request. A context can be activated when a previous intent is fulfilled,
or by including the context in the request.
If you don't specify a list of contexts, Amazon Lex V2 will use the current list of contexts for the session. If you specify an empty list, all contexts for the session are cleared.
public ActiveContext addContextAttributesEntry(String key, String value)
public ActiveContext clearContextAttributesEntries()
public String toString()
toString
in class Object
Object.toString()
public ActiveContext clone()
public void marshall(ProtocolMarshaller protocolMarshaller)
StructuredPojo
ProtocolMarshaller
.marshall
in interface StructuredPojo
protocolMarshaller
- Implementation of ProtocolMarshaller
used to marshall this object's data.