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 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()
Content type of the response.
|
List<GenericAttachment> |
getGenericAttachments()
An array of attachment objects representing options.
|
String |
getVersion()
Version of response card format.
|
int |
hashCode() |
void |
setContentType(ContentType contentType)
Content type of the response.
|
void |
setContentType(String contentType)
Content type of the response.
|
void |
setGenericAttachments(Collection<GenericAttachment> genericAttachments)
An array of attachment objects representing options.
|
void |
setVersion(String version)
Version of response card format.
|
String |
toString()
Returns a string representation of this object; useful for testing and
debugging.
|
ResponseCard |
withContentType(ContentType contentType)
Content type of the response.
|
ResponseCard |
withContentType(String contentType)
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)
Version of response card format.
|
public String getVersion()
Version of response card format.
Version of response card format.
public void setVersion(String version)
Version of response card format.
version - Version of response card format.
public ResponseCard withVersion(String version)
Version of response card format.
Returns a reference to this object so that method calls can be chained together.
version - Version of response card format.
public String getContentType()
Content type of the response.
Constraints:
Allowed Values: application/vnd.amazonaws.card.generic
Content type of the response.
ContentTypepublic void setContentType(String contentType)
Content type of the response.
Constraints:
Allowed Values: application/vnd.amazonaws.card.generic
contentType - Content type of the response.
ContentTypepublic ResponseCard withContentType(String contentType)
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 - Content type of the response.
ContentTypepublic void setContentType(ContentType contentType)
Content type of the response.
Constraints:
Allowed Values: application/vnd.amazonaws.card.generic
contentType - Content type of the response.
ContentTypepublic ResponseCard withContentType(ContentType contentType)
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 - 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 © 2017. All rights reserved.