@Generated(value="com.amazonaws:aws-java-sdk-code-generator") public class ActiveContext extends Object implements Serializable, Cloneable, StructuredPojo
A context is a variable that contains information about the current state of the conversation between a user and
Amazon Lex. Context can be set automatically by Amazon Lex when an intent is fulfilled, or it can be set at runtime
using the PutContent
, PutText
, or PutSession
operation.
Constructor and Description |
---|
ActiveContext() |
Modifier and Type | Method and Description |
---|---|
ActiveContext |
addParametersEntry(String key,
String value)
Add a single Parameters entry
|
ActiveContext |
clearParametersEntries()
Removes all the entries added into Parameters.
|
ActiveContext |
clone() |
boolean |
equals(Object obj) |
String |
getName()
The name of the context.
|
Map<String,String> |
getParameters()
State variables for the current context.
|
ActiveContextTimeToLive |
getTimeToLive()
The length of time or number of turns that a context remains active.
|
int |
hashCode() |
void |
marshall(ProtocolMarshaller protocolMarshaller)
Marshalls this structured data using the given
ProtocolMarshaller . |
void |
setName(String name)
The name of the context.
|
void |
setParameters(Map<String,String> parameters)
State variables for the current context.
|
void |
setTimeToLive(ActiveContextTimeToLive timeToLive)
The length of time or number of turns that a context remains active.
|
String |
toString()
Returns a string representation of this object.
|
ActiveContext |
withName(String name)
The name of the context.
|
ActiveContext |
withParameters(Map<String,String> parameters)
State variables for the current context.
|
ActiveContext |
withTimeToLive(ActiveContextTimeToLive timeToLive)
The length of time or number of turns that a context remains 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)
The length of time or number of turns that a context remains active.
timeToLive
- The length of time or number of turns that a context remains active.public ActiveContextTimeToLive getTimeToLive()
The length of time or number of turns that a context remains active.
public ActiveContext withTimeToLive(ActiveContextTimeToLive timeToLive)
The length of time or number of turns that a context remains active.
timeToLive
- The length of time or number of turns that a context remains active.public Map<String,String> getParameters()
State variables for the current context. You can use these values as default values for slots in subsequent events.
public void setParameters(Map<String,String> parameters)
State variables for the current context. You can use these values as default values for slots in subsequent events.
parameters
- State variables for the current context. You can use these values as default values for slots in
subsequent events.public ActiveContext withParameters(Map<String,String> parameters)
State variables for the current context. You can use these values as default values for slots in subsequent events.
parameters
- State variables for the current context. You can use these values as default values for slots in
subsequent events.public ActiveContext addParametersEntry(String key, String value)
public ActiveContext clearParametersEntries()
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.