1 /** 2 * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 * SPDX-License-Identifier: Apache-2.0. 4 */ 5 6 #pragma once 7 #include <aws/lex/LexRuntimeService_EXPORTS.h> 8 #include <aws/core/utils/memory/stl/AWSString.h> 9 #include <aws/lex/model/ContentType.h> 10 #include <aws/core/utils/memory/stl/AWSVector.h> 11 #include <aws/lex/model/GenericAttachment.h> 12 #include <utility> 13 14 namespace Aws 15 { 16 namespace Utils 17 { 18 namespace Json 19 { 20 class JsonValue; 21 class JsonView; 22 } // namespace Json 23 } // namespace Utils 24 namespace LexRuntimeService 25 { 26 namespace Model 27 { 28 29 /** 30 * <p>If you configure a response card when creating your bots, Amazon Lex 31 * substitutes the session attributes and slot values that are available, and then 32 * returns it. The response card can also come from a Lambda function ( 33 * <code>dialogCodeHook</code> and <code>fulfillmentActivity</code> on an 34 * intent).</p><p><h3>See Also:</h3> <a 35 * href="http://docs.aws.amazon.com/goto/WebAPI/runtime.lex-2016-11-28/ResponseCard">AWS 36 * API Reference</a></p> 37 */ 38 class AWS_LEXRUNTIMESERVICE_API ResponseCard 39 { 40 public: 41 ResponseCard(); 42 ResponseCard(Aws::Utils::Json::JsonView jsonValue); 43 ResponseCard& operator=(Aws::Utils::Json::JsonView jsonValue); 44 Aws::Utils::Json::JsonValue Jsonize() const; 45 46 47 /** 48 * <p>The version of the response card format.</p> 49 */ GetVersion()50 inline const Aws::String& GetVersion() const{ return m_version; } 51 52 /** 53 * <p>The version of the response card format.</p> 54 */ VersionHasBeenSet()55 inline bool VersionHasBeenSet() const { return m_versionHasBeenSet; } 56 57 /** 58 * <p>The version of the response card format.</p> 59 */ SetVersion(const Aws::String & value)60 inline void SetVersion(const Aws::String& value) { m_versionHasBeenSet = true; m_version = value; } 61 62 /** 63 * <p>The version of the response card format.</p> 64 */ SetVersion(Aws::String && value)65 inline void SetVersion(Aws::String&& value) { m_versionHasBeenSet = true; m_version = std::move(value); } 66 67 /** 68 * <p>The version of the response card format.</p> 69 */ SetVersion(const char * value)70 inline void SetVersion(const char* value) { m_versionHasBeenSet = true; m_version.assign(value); } 71 72 /** 73 * <p>The version of the response card format.</p> 74 */ WithVersion(const Aws::String & value)75 inline ResponseCard& WithVersion(const Aws::String& value) { SetVersion(value); return *this;} 76 77 /** 78 * <p>The version of the response card format.</p> 79 */ WithVersion(Aws::String && value)80 inline ResponseCard& WithVersion(Aws::String&& value) { SetVersion(std::move(value)); return *this;} 81 82 /** 83 * <p>The version of the response card format.</p> 84 */ WithVersion(const char * value)85 inline ResponseCard& WithVersion(const char* value) { SetVersion(value); return *this;} 86 87 88 /** 89 * <p>The content type of the response.</p> 90 */ GetContentType()91 inline const ContentType& GetContentType() const{ return m_contentType; } 92 93 /** 94 * <p>The content type of the response.</p> 95 */ ContentTypeHasBeenSet()96 inline bool ContentTypeHasBeenSet() const { return m_contentTypeHasBeenSet; } 97 98 /** 99 * <p>The content type of the response.</p> 100 */ SetContentType(const ContentType & value)101 inline void SetContentType(const ContentType& value) { m_contentTypeHasBeenSet = true; m_contentType = value; } 102 103 /** 104 * <p>The content type of the response.</p> 105 */ SetContentType(ContentType && value)106 inline void SetContentType(ContentType&& value) { m_contentTypeHasBeenSet = true; m_contentType = std::move(value); } 107 108 /** 109 * <p>The content type of the response.</p> 110 */ WithContentType(const ContentType & value)111 inline ResponseCard& WithContentType(const ContentType& value) { SetContentType(value); return *this;} 112 113 /** 114 * <p>The content type of the response.</p> 115 */ WithContentType(ContentType && value)116 inline ResponseCard& WithContentType(ContentType&& value) { SetContentType(std::move(value)); return *this;} 117 118 119 /** 120 * <p>An array of attachment objects representing options.</p> 121 */ GetGenericAttachments()122 inline const Aws::Vector<GenericAttachment>& GetGenericAttachments() const{ return m_genericAttachments; } 123 124 /** 125 * <p>An array of attachment objects representing options.</p> 126 */ GenericAttachmentsHasBeenSet()127 inline bool GenericAttachmentsHasBeenSet() const { return m_genericAttachmentsHasBeenSet; } 128 129 /** 130 * <p>An array of attachment objects representing options.</p> 131 */ SetGenericAttachments(const Aws::Vector<GenericAttachment> & value)132 inline void SetGenericAttachments(const Aws::Vector<GenericAttachment>& value) { m_genericAttachmentsHasBeenSet = true; m_genericAttachments = value; } 133 134 /** 135 * <p>An array of attachment objects representing options.</p> 136 */ SetGenericAttachments(Aws::Vector<GenericAttachment> && value)137 inline void SetGenericAttachments(Aws::Vector<GenericAttachment>&& value) { m_genericAttachmentsHasBeenSet = true; m_genericAttachments = std::move(value); } 138 139 /** 140 * <p>An array of attachment objects representing options.</p> 141 */ WithGenericAttachments(const Aws::Vector<GenericAttachment> & value)142 inline ResponseCard& WithGenericAttachments(const Aws::Vector<GenericAttachment>& value) { SetGenericAttachments(value); return *this;} 143 144 /** 145 * <p>An array of attachment objects representing options.</p> 146 */ WithGenericAttachments(Aws::Vector<GenericAttachment> && value)147 inline ResponseCard& WithGenericAttachments(Aws::Vector<GenericAttachment>&& value) { SetGenericAttachments(std::move(value)); return *this;} 148 149 /** 150 * <p>An array of attachment objects representing options.</p> 151 */ AddGenericAttachments(const GenericAttachment & value)152 inline ResponseCard& AddGenericAttachments(const GenericAttachment& value) { m_genericAttachmentsHasBeenSet = true; m_genericAttachments.push_back(value); return *this; } 153 154 /** 155 * <p>An array of attachment objects representing options.</p> 156 */ AddGenericAttachments(GenericAttachment && value)157 inline ResponseCard& AddGenericAttachments(GenericAttachment&& value) { m_genericAttachmentsHasBeenSet = true; m_genericAttachments.push_back(std::move(value)); return *this; } 158 159 private: 160 161 Aws::String m_version; 162 bool m_versionHasBeenSet; 163 164 ContentType m_contentType; 165 bool m_contentTypeHasBeenSet; 166 167 Aws::Vector<GenericAttachment> m_genericAttachments; 168 bool m_genericAttachmentsHasBeenSet; 169 }; 170 171 } // namespace Model 172 } // namespace LexRuntimeService 173 } // namespace Aws 174