public class ResponseCard extends Object implements Serializable
If you configure a response card when creating your bots, Amazon Lex
substitutes the session attributes and slot values that are available, and
then returns it. The response card can also come from a Lambda function (
dialogCodeHook and fulfillmentActivity on an
intent).
| Constructor and Description |
|---|
ResponseCard() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj) |
String |
getContentType()
The content type of the response.
|
List<GenericAttachment> |
getGenericAttachments()
An array of attachment objects representing options.
|
String |
getVersion()
The version of the response card format.
|
int |
hashCode() |
void |
setContentType(ContentType contentType)
The content type of the response.
|
void |
setContentType(String contentType)
The content type of the response.
|
void |
setGenericAttachments(Collection<GenericAttachment> genericAttachments)
An array of attachment objects representing options.
|
void |
setVersion(String version)
The version of the response card format.
|
String |
toString()
Returns a string representation of this object; useful for testing and
debugging.
|
ResponseCard |
withContentType(ContentType contentType)
The content type of the response.
|
ResponseCard |
withContentType(String contentType)
The content type of the response.
|
ResponseCard |
withGenericAttachments(Collection<GenericAttachment> genericAttachments)
An array of attachment objects representing options.
|
ResponseCard |
withGenericAttachments(GenericAttachment... genericAttachments)
An array of attachment objects representing options.
|
ResponseCard |
withVersion(String version)
The version of the response card format.
|
public String getVersion()
The version of the response card format.
The version of the response card format.
public void setVersion(String version)
The version of the response card format.
version - The version of the response card format.
public ResponseCard withVersion(String version)
The version of the response card format.
Returns a reference to this object so that method calls can be chained together.
version - The version of the response card format.
public String getContentType()
The content type of the response.
Constraints:
Allowed Values: application/vnd.amazonaws.card.generic
The content type of the response.
ContentTypepublic void setContentType(String contentType)
The content type of the response.
Constraints:
Allowed Values: application/vnd.amazonaws.card.generic
contentType - The content type of the response.
ContentTypepublic ResponseCard withContentType(String contentType)
The content type of the response.
Returns a reference to this object so that method calls can be chained together.
Constraints:
Allowed Values: application/vnd.amazonaws.card.generic
contentType - The content type of the response.
ContentTypepublic void setContentType(ContentType contentType)
The content type of the response.
Constraints:
Allowed Values: application/vnd.amazonaws.card.generic
contentType - The content type of the response.
ContentTypepublic ResponseCard withContentType(ContentType contentType)
The content type of the response.
Returns a reference to this object so that method calls can be chained together.
Constraints:
Allowed Values: application/vnd.amazonaws.card.generic
contentType - The content type of the response.
ContentTypepublic List<GenericAttachment> getGenericAttachments()
An array of attachment objects representing options.
An array of attachment objects representing options.
public void setGenericAttachments(Collection<GenericAttachment> genericAttachments)
An array of attachment objects representing options.
genericAttachments - An array of attachment objects representing options.
public ResponseCard withGenericAttachments(GenericAttachment... genericAttachments)
An array of attachment objects representing options.
Returns a reference to this object so that method calls can be chained together.
genericAttachments - An array of attachment objects representing options.
public ResponseCard withGenericAttachments(Collection<GenericAttachment> genericAttachments)
An array of attachment objects representing options.
Returns a reference to this object so that method calls can be chained together.
genericAttachments - An array of attachment objects representing options.
public String toString()
toString in class ObjectObject.toString()Copyright © 2018. All rights reserved.