/* * Copyright 2010-2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ package com.amazonaws.services.lexrts.model; import java.io.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).
*
* The version of the response card format. *
*/ private String version; /** ** The content type of the response. *
*
* Constraints:
* Allowed Values: application/vnd.amazonaws.card.generic
*/
private String contentType;
/**
*
* An array of attachment objects representing options. *
*/ private java.util.List* The version of the response card format. *
* * @return* The version of the response card format. *
*/ public String getVersion() { return version; } /** ** The version of the response card format. *
* * @param version* The version of the response card format. *
*/ public void setVersion(String version) { this.version = version; } /** ** The version of the response card format. *
** Returns a reference to this object so that method calls can be chained * together. * * @param version
* The version of the response card format. *
* @return A reference to this updated object so that method calls can be * chained together. */ public ResponseCard withVersion(String version) { this.version = version; return this; } /** ** The content type of the response. *
*
* Constraints:
* Allowed Values: application/vnd.amazonaws.card.generic
*
* @return
* The content type of the response. *
* @see ContentType */ public String getContentType() { return contentType; } /** ** The content type of the response. *
*
* Constraints:
* Allowed Values: application/vnd.amazonaws.card.generic
*
* @param contentType
* The content type of the response. *
* @see ContentType */ public void setContentType(String contentType) { this.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
*
* @param contentType
* The content type of the response. *
* @return A reference to this updated object so that method calls can be * chained together. * @see ContentType */ public ResponseCard withContentType(String contentType) { this.contentType = contentType; return this; } /** ** The content type of the response. *
*
* Constraints:
* Allowed Values: application/vnd.amazonaws.card.generic
*
* @param contentType
* The content type of the response. *
* @see ContentType */ public void setContentType(ContentType contentType) { this.contentType = contentType.toString(); } /** ** 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
*
* @param contentType
* The content type of the response. *
* @return A reference to this updated object so that method calls can be * chained together. * @see ContentType */ public ResponseCard withContentType(ContentType contentType) { this.contentType = contentType.toString(); return this; } /** ** An array of attachment objects representing options. *
* * @return* An array of attachment objects representing options. *
*/ public java.util.List* An array of attachment objects representing options. *
* * @param genericAttachments* An array of attachment objects representing options. *
*/ public void setGenericAttachments(java.util.Collection* An array of attachment objects representing options. *
** Returns a reference to this object so that method calls can be chained * together. * * @param genericAttachments
* An array of attachment objects representing options. *
* @return A reference to this updated object so that method calls can be * chained together. */ public ResponseCard withGenericAttachments(GenericAttachment... genericAttachments) { if (getGenericAttachments() == null) { this.genericAttachments = new java.util.ArrayList* An array of attachment objects representing options. *
** Returns a reference to this object so that method calls can be chained * together. * * @param genericAttachments
* An array of attachment objects representing options. *
* @return A reference to this updated object so that method calls can be * chained together. */ public ResponseCard withGenericAttachments( java.util.Collection