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

The ApiCache object.

See Also:

AWS * API Reference

*/ class ApiCache { public: AWS_APPSYNC_API ApiCache(); AWS_APPSYNC_API ApiCache(Aws::Utils::Json::JsonView jsonValue); AWS_APPSYNC_API ApiCache& operator=(Aws::Utils::Json::JsonView jsonValue); AWS_APPSYNC_API Aws::Utils::Json::JsonValue Jsonize() const; /** *

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 ApiCache& 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 ApiCache& 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 ApiCache& WithApiCachingBehavior(ApiCachingBehavior&& value) { SetApiCachingBehavior(std::move(value)); return *this;} /** *

Transit encryption flag when connecting to cache. You cannot update this * setting after creation.

*/ inline bool GetTransitEncryptionEnabled() const{ return m_transitEncryptionEnabled; } /** *

Transit encryption flag when connecting to cache. You cannot update this * setting after creation.

*/ inline bool TransitEncryptionEnabledHasBeenSet() const { return m_transitEncryptionEnabledHasBeenSet; } /** *

Transit encryption flag when connecting to cache. You cannot update this * setting after creation.

*/ inline void SetTransitEncryptionEnabled(bool value) { m_transitEncryptionEnabledHasBeenSet = true; m_transitEncryptionEnabled = value; } /** *

Transit encryption flag when connecting to cache. You cannot update this * setting after creation.

*/ inline ApiCache& WithTransitEncryptionEnabled(bool value) { SetTransitEncryptionEnabled(value); return *this;} /** *

At-rest encryption flag for cache. You cannot update this setting after * creation.

*/ inline bool GetAtRestEncryptionEnabled() const{ return m_atRestEncryptionEnabled; } /** *

At-rest encryption flag for cache. You cannot update this setting after * creation.

*/ inline bool AtRestEncryptionEnabledHasBeenSet() const { return m_atRestEncryptionEnabledHasBeenSet; } /** *

At-rest encryption flag for cache. You cannot update this setting after * creation.

*/ inline void SetAtRestEncryptionEnabled(bool value) { m_atRestEncryptionEnabledHasBeenSet = true; m_atRestEncryptionEnabled = value; } /** *

At-rest encryption flag for cache. You cannot update this setting after * creation.

*/ inline ApiCache& WithAtRestEncryptionEnabled(bool value) { SetAtRestEncryptionEnabled(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 ApiCache& 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 ApiCache& WithType(ApiCacheType&& value) { SetType(std::move(value)); return *this;} /** *

The cache instance status.

  • AVAILABLE: The instance * is available for use.

  • CREATING: The instance is * currently creating.

  • DELETING: The instance is * currently deleting.

  • MODIFYING: The instance is * currently modifying.

  • FAILED: The instance has failed * creation.

*/ inline const ApiCacheStatus& GetStatus() const{ return m_status; } /** *

The cache instance status.

  • AVAILABLE: The instance * is available for use.

  • CREATING: The instance is * currently creating.

  • DELETING: The instance is * currently deleting.

  • MODIFYING: The instance is * currently modifying.

  • FAILED: The instance has failed * creation.

*/ inline bool StatusHasBeenSet() const { return m_statusHasBeenSet; } /** *

The cache instance status.

  • AVAILABLE: The instance * is available for use.

  • CREATING: The instance is * currently creating.

  • DELETING: The instance is * currently deleting.

  • MODIFYING: The instance is * currently modifying.

  • FAILED: The instance has failed * creation.

*/ inline void SetStatus(const ApiCacheStatus& value) { m_statusHasBeenSet = true; m_status = value; } /** *

The cache instance status.

  • AVAILABLE: The instance * is available for use.

  • CREATING: The instance is * currently creating.

  • DELETING: The instance is * currently deleting.

  • MODIFYING: The instance is * currently modifying.

  • FAILED: The instance has failed * creation.

*/ inline void SetStatus(ApiCacheStatus&& value) { m_statusHasBeenSet = true; m_status = std::move(value); } /** *

The cache instance status.

  • AVAILABLE: The instance * is available for use.

  • CREATING: The instance is * currently creating.

  • DELETING: The instance is * currently deleting.

  • MODIFYING: The instance is * currently modifying.

  • FAILED: The instance has failed * creation.

*/ inline ApiCache& WithStatus(const ApiCacheStatus& value) { SetStatus(value); return *this;} /** *

The cache instance status.

  • AVAILABLE: The instance * is available for use.

  • CREATING: The instance is * currently creating.

  • DELETING: The instance is * currently deleting.

  • MODIFYING: The instance is * currently modifying.

  • FAILED: The instance has failed * creation.

*/ inline ApiCache& WithStatus(ApiCacheStatus&& value) { SetStatus(std::move(value)); return *this;} private: long long m_ttl; bool m_ttlHasBeenSet = false; ApiCachingBehavior m_apiCachingBehavior; bool m_apiCachingBehaviorHasBeenSet = false; bool m_transitEncryptionEnabled; bool m_transitEncryptionEnabledHasBeenSet = false; bool m_atRestEncryptionEnabled; bool m_atRestEncryptionEnabledHasBeenSet = false; ApiCacheType m_type; bool m_typeHasBeenSet = false; ApiCacheStatus m_status; bool m_statusHasBeenSet = false; }; } // namespace Model } // namespace AppSync } // namespace Aws