/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include #include #include #include namespace Aws { namespace AppSync { namespace Model { /** *

Represents the input of a UpdateApiCache * operation.

See Also:

AWS * API Reference

*/ class UpdateApiCacheRequest : public AppSyncRequest { public: AWS_APPSYNC_API UpdateApiCacheRequest(); // Service request name is the Operation name which will send this request out, // each operation should has unique request name, so that we can get operation's name from this request. // Note: this is not true for response, multiple operations may have the same response name, // so we can not get operation's name from response. inline virtual const char* GetServiceRequestName() const override { return "UpdateApiCache"; } AWS_APPSYNC_API Aws::String SerializePayload() const override; /** *

The GraphQL API ID.

*/ inline const Aws::String& GetApiId() const{ return m_apiId; } /** *

The GraphQL API ID.

*/ inline bool ApiIdHasBeenSet() const { return m_apiIdHasBeenSet; } /** *

The GraphQL API ID.

*/ inline void SetApiId(const Aws::String& value) { m_apiIdHasBeenSet = true; m_apiId = value; } /** *

The GraphQL API ID.

*/ inline void SetApiId(Aws::String&& value) { m_apiIdHasBeenSet = true; m_apiId = std::move(value); } /** *

The GraphQL API ID.

*/ inline void SetApiId(const char* value) { m_apiIdHasBeenSet = true; m_apiId.assign(value); } /** *

The GraphQL API ID.

*/ inline UpdateApiCacheRequest& WithApiId(const Aws::String& value) { SetApiId(value); return *this;} /** *

The GraphQL API ID.

*/ inline UpdateApiCacheRequest& WithApiId(Aws::String&& value) { SetApiId(std::move(value)); return *this;} /** *

The GraphQL API ID.

*/ inline UpdateApiCacheRequest& WithApiId(const char* value) { SetApiId(value); return *this;} /** *

TTL in seconds for cache entries.

Valid values are 1–3,600 * seconds.

*/ inline long long GetTtl() const{ return m_ttl; } /** *

TTL in seconds for cache entries.

Valid values are 1–3,600 * seconds.

*/ inline bool TtlHasBeenSet() const { return m_ttlHasBeenSet; } /** *

TTL in seconds for cache entries.

Valid values are 1–3,600 * seconds.

*/ inline void SetTtl(long long value) { m_ttlHasBeenSet = true; m_ttl = value; } /** *

TTL in seconds for cache entries.

Valid values are 1–3,600 * seconds.

*/ inline UpdateApiCacheRequest& WithTtl(long long value) { SetTtl(value); return *this;} /** *

Caching behavior.

  • FULL_REQUEST_CACHING: All requests * are fully cached.

  • PER_RESOLVER_CACHING: Individual * resolvers that you specify are cached.

*/ inline const ApiCachingBehavior& GetApiCachingBehavior() const{ return m_apiCachingBehavior; } /** *

Caching behavior.

  • FULL_REQUEST_CACHING: All requests * are fully cached.

  • PER_RESOLVER_CACHING: Individual * resolvers that you specify are cached.

*/ inline bool ApiCachingBehaviorHasBeenSet() const { return m_apiCachingBehaviorHasBeenSet; } /** *

Caching behavior.

  • FULL_REQUEST_CACHING: All requests * are fully cached.

  • PER_RESOLVER_CACHING: Individual * resolvers that you specify are cached.

*/ inline void SetApiCachingBehavior(const ApiCachingBehavior& value) { m_apiCachingBehaviorHasBeenSet = true; m_apiCachingBehavior = value; } /** *

Caching behavior.

  • FULL_REQUEST_CACHING: All requests * are fully cached.

  • PER_RESOLVER_CACHING: Individual * resolvers that you specify are cached.

*/ inline void SetApiCachingBehavior(ApiCachingBehavior&& value) { m_apiCachingBehaviorHasBeenSet = true; m_apiCachingBehavior = std::move(value); } /** *

Caching behavior.

  • FULL_REQUEST_CACHING: All requests * are fully cached.

  • PER_RESOLVER_CACHING: Individual * resolvers that you specify are cached.

*/ inline UpdateApiCacheRequest& WithApiCachingBehavior(const ApiCachingBehavior& value) { SetApiCachingBehavior(value); return *this;} /** *

Caching behavior.

  • FULL_REQUEST_CACHING: All requests * are fully cached.

  • PER_RESOLVER_CACHING: Individual * resolvers that you specify are cached.

*/ inline UpdateApiCacheRequest& WithApiCachingBehavior(ApiCachingBehavior&& value) { SetApiCachingBehavior(std::move(value)); return *this;} /** *

The cache instance type. Valid values are

  • * SMALL

  • MEDIUM

  • * LARGE

  • XLARGE

  • * LARGE_2X

  • LARGE_4X

  • *

    LARGE_8X (not available in all regions)

  • * LARGE_12X

Historically, instance types were * identified by an EC2-style value. As of July 2020, this is deprecated, and the * generic identifiers above should be used.

The following legacy instance * types are available, but their use is discouraged:

  • * T2_SMALL: A t2.small instance type.

  • T2_MEDIUM: * A t2.medium instance type.

  • R4_LARGE: A r4.large * instance type.

  • R4_XLARGE: A r4.xlarge instance * type.

  • R4_2XLARGE: A r4.2xlarge instance type.

    *
  • R4_4XLARGE: A r4.4xlarge instance type.

  • * R4_8XLARGE: A r4.8xlarge instance type.

*/ inline const ApiCacheType& GetType() const{ return m_type; } /** *

The cache instance type. Valid values are

  • * SMALL

  • MEDIUM

  • * LARGE

  • XLARGE

  • * LARGE_2X

  • LARGE_4X

  • *

    LARGE_8X (not available in all regions)

  • * LARGE_12X

Historically, instance types were * identified by an EC2-style value. As of July 2020, this is deprecated, and the * generic identifiers above should be used.

The following legacy instance * types are available, but their use is discouraged:

  • * T2_SMALL: A t2.small instance type.

  • T2_MEDIUM: * A t2.medium instance type.

  • R4_LARGE: A r4.large * instance type.

  • R4_XLARGE: A r4.xlarge instance * type.

  • R4_2XLARGE: A r4.2xlarge instance type.

    *
  • R4_4XLARGE: A r4.4xlarge instance type.

  • * R4_8XLARGE: A r4.8xlarge instance type.

*/ inline bool TypeHasBeenSet() const { return m_typeHasBeenSet; } /** *

The cache instance type. Valid values are

  • * SMALL

  • MEDIUM

  • * LARGE

  • XLARGE

  • * LARGE_2X

  • LARGE_4X

  • *

    LARGE_8X (not available in all regions)

  • * LARGE_12X

Historically, instance types were * identified by an EC2-style value. As of July 2020, this is deprecated, and the * generic identifiers above should be used.

The following legacy instance * types are available, but their use is discouraged:

  • * T2_SMALL: A t2.small instance type.

  • T2_MEDIUM: * A t2.medium instance type.

  • R4_LARGE: A r4.large * instance type.

  • R4_XLARGE: A r4.xlarge instance * type.

  • R4_2XLARGE: A r4.2xlarge instance type.

    *
  • R4_4XLARGE: A r4.4xlarge instance type.

  • * R4_8XLARGE: A r4.8xlarge instance type.

*/ inline void SetType(const ApiCacheType& value) { m_typeHasBeenSet = true; m_type = value; } /** *

The cache instance type. Valid values are

  • * SMALL

  • MEDIUM

  • * LARGE

  • XLARGE

  • * LARGE_2X

  • LARGE_4X

  • *

    LARGE_8X (not available in all regions)

  • * LARGE_12X

Historically, instance types were * identified by an EC2-style value. As of July 2020, this is deprecated, and the * generic identifiers above should be used.

The following legacy instance * types are available, but their use is discouraged:

  • * T2_SMALL: A t2.small instance type.

  • T2_MEDIUM: * A t2.medium instance type.

  • R4_LARGE: A r4.large * instance type.

  • R4_XLARGE: A r4.xlarge instance * type.

  • R4_2XLARGE: A r4.2xlarge instance type.

    *
  • R4_4XLARGE: A r4.4xlarge instance type.

  • * R4_8XLARGE: A r4.8xlarge instance type.

*/ inline void SetType(ApiCacheType&& value) { m_typeHasBeenSet = true; m_type = std::move(value); } /** *

The cache instance type. Valid values are

  • * SMALL

  • MEDIUM

  • * LARGE

  • XLARGE

  • * LARGE_2X

  • LARGE_4X

  • *

    LARGE_8X (not available in all regions)

  • * LARGE_12X

Historically, instance types were * identified by an EC2-style value. As of July 2020, this is deprecated, and the * generic identifiers above should be used.

The following legacy instance * types are available, but their use is discouraged:

  • * T2_SMALL: A t2.small instance type.

  • T2_MEDIUM: * A t2.medium instance type.

  • R4_LARGE: A r4.large * instance type.

  • R4_XLARGE: A r4.xlarge instance * type.

  • R4_2XLARGE: A r4.2xlarge instance type.

    *
  • R4_4XLARGE: A r4.4xlarge instance type.

  • * R4_8XLARGE: A r4.8xlarge instance type.

*/ inline UpdateApiCacheRequest& WithType(const ApiCacheType& value) { SetType(value); return *this;} /** *

The cache instance type. Valid values are

  • * SMALL

  • MEDIUM

  • * LARGE

  • XLARGE

  • * LARGE_2X

  • LARGE_4X

  • *

    LARGE_8X (not available in all regions)

  • * LARGE_12X

Historically, instance types were * identified by an EC2-style value. As of July 2020, this is deprecated, and the * generic identifiers above should be used.

The following legacy instance * types are available, but their use is discouraged:

  • * T2_SMALL: A t2.small instance type.

  • T2_MEDIUM: * A t2.medium instance type.

  • R4_LARGE: A r4.large * instance type.

  • R4_XLARGE: A r4.xlarge instance * type.

  • R4_2XLARGE: A r4.2xlarge instance type.

    *
  • R4_4XLARGE: A r4.4xlarge instance type.

  • * R4_8XLARGE: A r4.8xlarge instance type.

*/ inline UpdateApiCacheRequest& WithType(ApiCacheType&& value) { SetType(std::move(value)); return *this;} private: Aws::String m_apiId; bool m_apiIdHasBeenSet = false; long long m_ttl; bool m_ttlHasBeenSet = false; ApiCachingBehavior m_apiCachingBehavior; bool m_apiCachingBehaviorHasBeenSet = false; ApiCacheType m_type; bool m_typeHasBeenSet = false; }; } // namespace Model } // namespace AppSync } // namespace Aws