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/appsync/AppSync_EXPORTS.h> 8 #include <aws/appsync/AppSyncRequest.h> 9 #include <aws/core/utils/memory/stl/AWSString.h> 10 #include <aws/appsync/model/ApiCachingBehavior.h> 11 #include <aws/appsync/model/ApiCacheType.h> 12 #include <utility> 13 14 namespace Aws 15 { 16 namespace AppSync 17 { 18 namespace Model 19 { 20 21 /** 22 * <p>Represents the input of a <code>CreateApiCache</code> 23 * operation.</p><p><h3>See Also:</h3> <a 24 * href="http://docs.aws.amazon.com/goto/WebAPI/appsync-2017-07-25/CreateApiCacheRequest">AWS 25 * API Reference</a></p> 26 */ 27 class AWS_APPSYNC_API CreateApiCacheRequest : public AppSyncRequest 28 { 29 public: 30 CreateApiCacheRequest(); 31 32 // Service request name is the Operation name which will send this request out, 33 // each operation should has unique request name, so that we can get operation's name from this request. 34 // Note: this is not true for response, multiple operations may have the same response name, 35 // so we can not get operation's name from response. GetServiceRequestName()36 inline virtual const char* GetServiceRequestName() const override { return "CreateApiCache"; } 37 38 Aws::String SerializePayload() const override; 39 40 41 /** 42 * <p>The GraphQL API Id.</p> 43 */ GetApiId()44 inline const Aws::String& GetApiId() const{ return m_apiId; } 45 46 /** 47 * <p>The GraphQL API Id.</p> 48 */ ApiIdHasBeenSet()49 inline bool ApiIdHasBeenSet() const { return m_apiIdHasBeenSet; } 50 51 /** 52 * <p>The GraphQL API Id.</p> 53 */ SetApiId(const Aws::String & value)54 inline void SetApiId(const Aws::String& value) { m_apiIdHasBeenSet = true; m_apiId = value; } 55 56 /** 57 * <p>The GraphQL API Id.</p> 58 */ SetApiId(Aws::String && value)59 inline void SetApiId(Aws::String&& value) { m_apiIdHasBeenSet = true; m_apiId = std::move(value); } 60 61 /** 62 * <p>The GraphQL API Id.</p> 63 */ SetApiId(const char * value)64 inline void SetApiId(const char* value) { m_apiIdHasBeenSet = true; m_apiId.assign(value); } 65 66 /** 67 * <p>The GraphQL API Id.</p> 68 */ WithApiId(const Aws::String & value)69 inline CreateApiCacheRequest& WithApiId(const Aws::String& value) { SetApiId(value); return *this;} 70 71 /** 72 * <p>The GraphQL API Id.</p> 73 */ WithApiId(Aws::String && value)74 inline CreateApiCacheRequest& WithApiId(Aws::String&& value) { SetApiId(std::move(value)); return *this;} 75 76 /** 77 * <p>The GraphQL API Id.</p> 78 */ WithApiId(const char * value)79 inline CreateApiCacheRequest& WithApiId(const char* value) { SetApiId(value); return *this;} 80 81 82 /** 83 * <p>TTL in seconds for cache entries.</p> <p>Valid values are between 1 and 3600 84 * seconds.</p> 85 */ GetTtl()86 inline long long GetTtl() const{ return m_ttl; } 87 88 /** 89 * <p>TTL in seconds for cache entries.</p> <p>Valid values are between 1 and 3600 90 * seconds.</p> 91 */ TtlHasBeenSet()92 inline bool TtlHasBeenSet() const { return m_ttlHasBeenSet; } 93 94 /** 95 * <p>TTL in seconds for cache entries.</p> <p>Valid values are between 1 and 3600 96 * seconds.</p> 97 */ SetTtl(long long value)98 inline void SetTtl(long long value) { m_ttlHasBeenSet = true; m_ttl = value; } 99 100 /** 101 * <p>TTL in seconds for cache entries.</p> <p>Valid values are between 1 and 3600 102 * seconds.</p> 103 */ WithTtl(long long value)104 inline CreateApiCacheRequest& WithTtl(long long value) { SetTtl(value); return *this;} 105 106 107 /** 108 * <p>Transit encryption flag when connecting to cache. This setting cannot be 109 * updated after creation.</p> 110 */ GetTransitEncryptionEnabled()111 inline bool GetTransitEncryptionEnabled() const{ return m_transitEncryptionEnabled; } 112 113 /** 114 * <p>Transit encryption flag when connecting to cache. This setting cannot be 115 * updated after creation.</p> 116 */ TransitEncryptionEnabledHasBeenSet()117 inline bool TransitEncryptionEnabledHasBeenSet() const { return m_transitEncryptionEnabledHasBeenSet; } 118 119 /** 120 * <p>Transit encryption flag when connecting to cache. This setting cannot be 121 * updated after creation.</p> 122 */ SetTransitEncryptionEnabled(bool value)123 inline void SetTransitEncryptionEnabled(bool value) { m_transitEncryptionEnabledHasBeenSet = true; m_transitEncryptionEnabled = value; } 124 125 /** 126 * <p>Transit encryption flag when connecting to cache. This setting cannot be 127 * updated after creation.</p> 128 */ WithTransitEncryptionEnabled(bool value)129 inline CreateApiCacheRequest& WithTransitEncryptionEnabled(bool value) { SetTransitEncryptionEnabled(value); return *this;} 130 131 132 /** 133 * <p>At rest encryption flag for cache. This setting cannot be updated after 134 * creation.</p> 135 */ GetAtRestEncryptionEnabled()136 inline bool GetAtRestEncryptionEnabled() const{ return m_atRestEncryptionEnabled; } 137 138 /** 139 * <p>At rest encryption flag for cache. This setting cannot be updated after 140 * creation.</p> 141 */ AtRestEncryptionEnabledHasBeenSet()142 inline bool AtRestEncryptionEnabledHasBeenSet() const { return m_atRestEncryptionEnabledHasBeenSet; } 143 144 /** 145 * <p>At rest encryption flag for cache. This setting cannot be updated after 146 * creation.</p> 147 */ SetAtRestEncryptionEnabled(bool value)148 inline void SetAtRestEncryptionEnabled(bool value) { m_atRestEncryptionEnabledHasBeenSet = true; m_atRestEncryptionEnabled = value; } 149 150 /** 151 * <p>At rest encryption flag for cache. This setting cannot be updated after 152 * creation.</p> 153 */ WithAtRestEncryptionEnabled(bool value)154 inline CreateApiCacheRequest& WithAtRestEncryptionEnabled(bool value) { SetAtRestEncryptionEnabled(value); return *this;} 155 156 157 /** 158 * <p>Caching behavior.</p> <ul> <li> <p> <b>FULL_REQUEST_CACHING</b>: All requests 159 * are fully cached.</p> </li> <li> <p> <b>PER_RESOLVER_CACHING</b>: Individual 160 * resolvers that you specify are cached.</p> </li> </ul> 161 */ GetApiCachingBehavior()162 inline const ApiCachingBehavior& GetApiCachingBehavior() const{ return m_apiCachingBehavior; } 163 164 /** 165 * <p>Caching behavior.</p> <ul> <li> <p> <b>FULL_REQUEST_CACHING</b>: All requests 166 * are fully cached.</p> </li> <li> <p> <b>PER_RESOLVER_CACHING</b>: Individual 167 * resolvers that you specify are cached.</p> </li> </ul> 168 */ ApiCachingBehaviorHasBeenSet()169 inline bool ApiCachingBehaviorHasBeenSet() const { return m_apiCachingBehaviorHasBeenSet; } 170 171 /** 172 * <p>Caching behavior.</p> <ul> <li> <p> <b>FULL_REQUEST_CACHING</b>: All requests 173 * are fully cached.</p> </li> <li> <p> <b>PER_RESOLVER_CACHING</b>: Individual 174 * resolvers that you specify are cached.</p> </li> </ul> 175 */ SetApiCachingBehavior(const ApiCachingBehavior & value)176 inline void SetApiCachingBehavior(const ApiCachingBehavior& value) { m_apiCachingBehaviorHasBeenSet = true; m_apiCachingBehavior = value; } 177 178 /** 179 * <p>Caching behavior.</p> <ul> <li> <p> <b>FULL_REQUEST_CACHING</b>: All requests 180 * are fully cached.</p> </li> <li> <p> <b>PER_RESOLVER_CACHING</b>: Individual 181 * resolvers that you specify are cached.</p> </li> </ul> 182 */ SetApiCachingBehavior(ApiCachingBehavior && value)183 inline void SetApiCachingBehavior(ApiCachingBehavior&& value) { m_apiCachingBehaviorHasBeenSet = true; m_apiCachingBehavior = std::move(value); } 184 185 /** 186 * <p>Caching behavior.</p> <ul> <li> <p> <b>FULL_REQUEST_CACHING</b>: All requests 187 * are fully cached.</p> </li> <li> <p> <b>PER_RESOLVER_CACHING</b>: Individual 188 * resolvers that you specify are cached.</p> </li> </ul> 189 */ WithApiCachingBehavior(const ApiCachingBehavior & value)190 inline CreateApiCacheRequest& WithApiCachingBehavior(const ApiCachingBehavior& value) { SetApiCachingBehavior(value); return *this;} 191 192 /** 193 * <p>Caching behavior.</p> <ul> <li> <p> <b>FULL_REQUEST_CACHING</b>: All requests 194 * are fully cached.</p> </li> <li> <p> <b>PER_RESOLVER_CACHING</b>: Individual 195 * resolvers that you specify are cached.</p> </li> </ul> 196 */ WithApiCachingBehavior(ApiCachingBehavior && value)197 inline CreateApiCacheRequest& WithApiCachingBehavior(ApiCachingBehavior&& value) { SetApiCachingBehavior(std::move(value)); return *this;} 198 199 200 /** 201 * <p>The cache instance type. Valid values are </p> <ul> <li> <p> 202 * <code>SMALL</code> </p> </li> <li> <p> <code>MEDIUM</code> </p> </li> <li> <p> 203 * <code>LARGE</code> </p> </li> <li> <p> <code>XLARGE</code> </p> </li> <li> <p> 204 * <code>LARGE_2X</code> </p> </li> <li> <p> <code>LARGE_4X</code> </p> </li> <li> 205 * <p> <code>LARGE_8X</code> (not available in all regions)</p> </li> <li> <p> 206 * <code>LARGE_12X</code> </p> </li> </ul> <p>Historically, instance types were 207 * identified by an EC2-style value. As of July 2020, this is deprecated, and the 208 * generic identifiers above should be used.</p> <p>The following legacy instance 209 * types are available, but their use is discouraged:</p> <ul> <li> <p> 210 * <b>T2_SMALL</b>: A t2.small instance type.</p> </li> <li> <p> <b>T2_MEDIUM</b>: 211 * A t2.medium instance type.</p> </li> <li> <p> <b>R4_LARGE</b>: A r4.large 212 * instance type.</p> </li> <li> <p> <b>R4_XLARGE</b>: A r4.xlarge instance 213 * type.</p> </li> <li> <p> <b>R4_2XLARGE</b>: A r4.2xlarge instance type.</p> 214 * </li> <li> <p> <b>R4_4XLARGE</b>: A r4.4xlarge instance type.</p> </li> <li> <p> 215 * <b>R4_8XLARGE</b>: A r4.8xlarge instance type.</p> </li> </ul> 216 */ GetType()217 inline const ApiCacheType& GetType() const{ return m_type; } 218 219 /** 220 * <p>The cache instance type. Valid values are </p> <ul> <li> <p> 221 * <code>SMALL</code> </p> </li> <li> <p> <code>MEDIUM</code> </p> </li> <li> <p> 222 * <code>LARGE</code> </p> </li> <li> <p> <code>XLARGE</code> </p> </li> <li> <p> 223 * <code>LARGE_2X</code> </p> </li> <li> <p> <code>LARGE_4X</code> </p> </li> <li> 224 * <p> <code>LARGE_8X</code> (not available in all regions)</p> </li> <li> <p> 225 * <code>LARGE_12X</code> </p> </li> </ul> <p>Historically, instance types were 226 * identified by an EC2-style value. As of July 2020, this is deprecated, and the 227 * generic identifiers above should be used.</p> <p>The following legacy instance 228 * types are available, but their use is discouraged:</p> <ul> <li> <p> 229 * <b>T2_SMALL</b>: A t2.small instance type.</p> </li> <li> <p> <b>T2_MEDIUM</b>: 230 * A t2.medium instance type.</p> </li> <li> <p> <b>R4_LARGE</b>: A r4.large 231 * instance type.</p> </li> <li> <p> <b>R4_XLARGE</b>: A r4.xlarge instance 232 * type.</p> </li> <li> <p> <b>R4_2XLARGE</b>: A r4.2xlarge instance type.</p> 233 * </li> <li> <p> <b>R4_4XLARGE</b>: A r4.4xlarge instance type.</p> </li> <li> <p> 234 * <b>R4_8XLARGE</b>: A r4.8xlarge instance type.</p> </li> </ul> 235 */ TypeHasBeenSet()236 inline bool TypeHasBeenSet() const { return m_typeHasBeenSet; } 237 238 /** 239 * <p>The cache instance type. Valid values are </p> <ul> <li> <p> 240 * <code>SMALL</code> </p> </li> <li> <p> <code>MEDIUM</code> </p> </li> <li> <p> 241 * <code>LARGE</code> </p> </li> <li> <p> <code>XLARGE</code> </p> </li> <li> <p> 242 * <code>LARGE_2X</code> </p> </li> <li> <p> <code>LARGE_4X</code> </p> </li> <li> 243 * <p> <code>LARGE_8X</code> (not available in all regions)</p> </li> <li> <p> 244 * <code>LARGE_12X</code> </p> </li> </ul> <p>Historically, instance types were 245 * identified by an EC2-style value. As of July 2020, this is deprecated, and the 246 * generic identifiers above should be used.</p> <p>The following legacy instance 247 * types are available, but their use is discouraged:</p> <ul> <li> <p> 248 * <b>T2_SMALL</b>: A t2.small instance type.</p> </li> <li> <p> <b>T2_MEDIUM</b>: 249 * A t2.medium instance type.</p> </li> <li> <p> <b>R4_LARGE</b>: A r4.large 250 * instance type.</p> </li> <li> <p> <b>R4_XLARGE</b>: A r4.xlarge instance 251 * type.</p> </li> <li> <p> <b>R4_2XLARGE</b>: A r4.2xlarge instance type.</p> 252 * </li> <li> <p> <b>R4_4XLARGE</b>: A r4.4xlarge instance type.</p> </li> <li> <p> 253 * <b>R4_8XLARGE</b>: A r4.8xlarge instance type.</p> </li> </ul> 254 */ SetType(const ApiCacheType & value)255 inline void SetType(const ApiCacheType& value) { m_typeHasBeenSet = true; m_type = value; } 256 257 /** 258 * <p>The cache instance type. Valid values are </p> <ul> <li> <p> 259 * <code>SMALL</code> </p> </li> <li> <p> <code>MEDIUM</code> </p> </li> <li> <p> 260 * <code>LARGE</code> </p> </li> <li> <p> <code>XLARGE</code> </p> </li> <li> <p> 261 * <code>LARGE_2X</code> </p> </li> <li> <p> <code>LARGE_4X</code> </p> </li> <li> 262 * <p> <code>LARGE_8X</code> (not available in all regions)</p> </li> <li> <p> 263 * <code>LARGE_12X</code> </p> </li> </ul> <p>Historically, instance types were 264 * identified by an EC2-style value. As of July 2020, this is deprecated, and the 265 * generic identifiers above should be used.</p> <p>The following legacy instance 266 * types are available, but their use is discouraged:</p> <ul> <li> <p> 267 * <b>T2_SMALL</b>: A t2.small instance type.</p> </li> <li> <p> <b>T2_MEDIUM</b>: 268 * A t2.medium instance type.</p> </li> <li> <p> <b>R4_LARGE</b>: A r4.large 269 * instance type.</p> </li> <li> <p> <b>R4_XLARGE</b>: A r4.xlarge instance 270 * type.</p> </li> <li> <p> <b>R4_2XLARGE</b>: A r4.2xlarge instance type.</p> 271 * </li> <li> <p> <b>R4_4XLARGE</b>: A r4.4xlarge instance type.</p> </li> <li> <p> 272 * <b>R4_8XLARGE</b>: A r4.8xlarge instance type.</p> </li> </ul> 273 */ SetType(ApiCacheType && value)274 inline void SetType(ApiCacheType&& value) { m_typeHasBeenSet = true; m_type = std::move(value); } 275 276 /** 277 * <p>The cache instance type. Valid values are </p> <ul> <li> <p> 278 * <code>SMALL</code> </p> </li> <li> <p> <code>MEDIUM</code> </p> </li> <li> <p> 279 * <code>LARGE</code> </p> </li> <li> <p> <code>XLARGE</code> </p> </li> <li> <p> 280 * <code>LARGE_2X</code> </p> </li> <li> <p> <code>LARGE_4X</code> </p> </li> <li> 281 * <p> <code>LARGE_8X</code> (not available in all regions)</p> </li> <li> <p> 282 * <code>LARGE_12X</code> </p> </li> </ul> <p>Historically, instance types were 283 * identified by an EC2-style value. As of July 2020, this is deprecated, and the 284 * generic identifiers above should be used.</p> <p>The following legacy instance 285 * types are available, but their use is discouraged:</p> <ul> <li> <p> 286 * <b>T2_SMALL</b>: A t2.small instance type.</p> </li> <li> <p> <b>T2_MEDIUM</b>: 287 * A t2.medium instance type.</p> </li> <li> <p> <b>R4_LARGE</b>: A r4.large 288 * instance type.</p> </li> <li> <p> <b>R4_XLARGE</b>: A r4.xlarge instance 289 * type.</p> </li> <li> <p> <b>R4_2XLARGE</b>: A r4.2xlarge instance type.</p> 290 * </li> <li> <p> <b>R4_4XLARGE</b>: A r4.4xlarge instance type.</p> </li> <li> <p> 291 * <b>R4_8XLARGE</b>: A r4.8xlarge instance type.</p> </li> </ul> 292 */ WithType(const ApiCacheType & value)293 inline CreateApiCacheRequest& WithType(const ApiCacheType& value) { SetType(value); return *this;} 294 295 /** 296 * <p>The cache instance type. Valid values are </p> <ul> <li> <p> 297 * <code>SMALL</code> </p> </li> <li> <p> <code>MEDIUM</code> </p> </li> <li> <p> 298 * <code>LARGE</code> </p> </li> <li> <p> <code>XLARGE</code> </p> </li> <li> <p> 299 * <code>LARGE_2X</code> </p> </li> <li> <p> <code>LARGE_4X</code> </p> </li> <li> 300 * <p> <code>LARGE_8X</code> (not available in all regions)</p> </li> <li> <p> 301 * <code>LARGE_12X</code> </p> </li> </ul> <p>Historically, instance types were 302 * identified by an EC2-style value. As of July 2020, this is deprecated, and the 303 * generic identifiers above should be used.</p> <p>The following legacy instance 304 * types are available, but their use is discouraged:</p> <ul> <li> <p> 305 * <b>T2_SMALL</b>: A t2.small instance type.</p> </li> <li> <p> <b>T2_MEDIUM</b>: 306 * A t2.medium instance type.</p> </li> <li> <p> <b>R4_LARGE</b>: A r4.large 307 * instance type.</p> </li> <li> <p> <b>R4_XLARGE</b>: A r4.xlarge instance 308 * type.</p> </li> <li> <p> <b>R4_2XLARGE</b>: A r4.2xlarge instance type.</p> 309 * </li> <li> <p> <b>R4_4XLARGE</b>: A r4.4xlarge instance type.</p> </li> <li> <p> 310 * <b>R4_8XLARGE</b>: A r4.8xlarge instance type.</p> </li> </ul> 311 */ WithType(ApiCacheType && value)312 inline CreateApiCacheRequest& WithType(ApiCacheType&& value) { SetType(std::move(value)); return *this;} 313 314 private: 315 316 Aws::String m_apiId; 317 bool m_apiIdHasBeenSet; 318 319 long long m_ttl; 320 bool m_ttlHasBeenSet; 321 322 bool m_transitEncryptionEnabled; 323 bool m_transitEncryptionEnabledHasBeenSet; 324 325 bool m_atRestEncryptionEnabled; 326 bool m_atRestEncryptionEnabledHasBeenSet; 327 328 ApiCachingBehavior m_apiCachingBehavior; 329 bool m_apiCachingBehaviorHasBeenSet; 330 331 ApiCacheType m_type; 332 bool m_typeHasBeenSet; 333 }; 334 335 } // namespace Model 336 } // namespace AppSync 337 } // namespace Aws 338