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

The caching configuration for a resolver that has caching * activated.

See Also:

AWS * API Reference

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

The TTL in seconds for a resolver that has caching activated.

Valid * values are 1–3,600 seconds.

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

The TTL in seconds for a resolver that has caching activated.

Valid * values are 1–3,600 seconds.

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

The TTL in seconds for a resolver that has caching activated.

Valid * values are 1–3,600 seconds.

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

The TTL in seconds for a resolver that has caching activated.

Valid * values are 1–3,600 seconds.

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

The caching keys for a resolver that has caching activated.

Valid * values are entries from the $context.arguments, * $context.source, and $context.identity maps.

*/ inline const Aws::Vector& GetCachingKeys() const{ return m_cachingKeys; } /** *

The caching keys for a resolver that has caching activated.

Valid * values are entries from the $context.arguments, * $context.source, and $context.identity maps.

*/ inline bool CachingKeysHasBeenSet() const { return m_cachingKeysHasBeenSet; } /** *

The caching keys for a resolver that has caching activated.

Valid * values are entries from the $context.arguments, * $context.source, and $context.identity maps.

*/ inline void SetCachingKeys(const Aws::Vector& value) { m_cachingKeysHasBeenSet = true; m_cachingKeys = value; } /** *

The caching keys for a resolver that has caching activated.

Valid * values are entries from the $context.arguments, * $context.source, and $context.identity maps.

*/ inline void SetCachingKeys(Aws::Vector&& value) { m_cachingKeysHasBeenSet = true; m_cachingKeys = std::move(value); } /** *

The caching keys for a resolver that has caching activated.

Valid * values are entries from the $context.arguments, * $context.source, and $context.identity maps.

*/ inline CachingConfig& WithCachingKeys(const Aws::Vector& value) { SetCachingKeys(value); return *this;} /** *

The caching keys for a resolver that has caching activated.

Valid * values are entries from the $context.arguments, * $context.source, and $context.identity maps.

*/ inline CachingConfig& WithCachingKeys(Aws::Vector&& value) { SetCachingKeys(std::move(value)); return *this;} /** *

The caching keys for a resolver that has caching activated.

Valid * values are entries from the $context.arguments, * $context.source, and $context.identity maps.

*/ inline CachingConfig& AddCachingKeys(const Aws::String& value) { m_cachingKeysHasBeenSet = true; m_cachingKeys.push_back(value); return *this; } /** *

The caching keys for a resolver that has caching activated.

Valid * values are entries from the $context.arguments, * $context.source, and $context.identity maps.

*/ inline CachingConfig& AddCachingKeys(Aws::String&& value) { m_cachingKeysHasBeenSet = true; m_cachingKeys.push_back(std::move(value)); return *this; } /** *

The caching keys for a resolver that has caching activated.

Valid * values are entries from the $context.arguments, * $context.source, and $context.identity maps.

*/ inline CachingConfig& AddCachingKeys(const char* value) { m_cachingKeysHasBeenSet = true; m_cachingKeys.push_back(value); return *this; } private: long long m_ttl; bool m_ttlHasBeenSet = false; Aws::Vector m_cachingKeys; bool m_cachingKeysHasBeenSet = false; }; } // namespace Model } // namespace AppSync } // namespace Aws