/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include A cache policy. When it's attached to a cache behavior, the cache
* policy determines the following: The values that CloudFront
* includes in the cache key. These values can include HTTP headers, cookies, and
* URL query strings. CloudFront uses the cache key to find an object in its cache
* that it can return to the viewer. The default, minimum, and
* maximum time to live (TTL) values that you want objects to stay in the
* CloudFront cache. The headers, cookies, and query strings
* that are included in the cache key are also included in requests that CloudFront
* sends to the origin. CloudFront sends a request when it can't find a valid
* object in its cache that matches the request's cache key. If you want to send
* values to the origin but not include them in the cache key, use
*
OriginRequestPolicy
.See Also:
AWS
* API Reference
The unique identifier for the cache policy.
*/ inline const Aws::String& GetId() const{ return m_id; } /** *The unique identifier for the cache policy.
*/ inline bool IdHasBeenSet() const { return m_idHasBeenSet; } /** *The unique identifier for the cache policy.
*/ inline void SetId(const Aws::String& value) { m_idHasBeenSet = true; m_id = value; } /** *The unique identifier for the cache policy.
*/ inline void SetId(Aws::String&& value) { m_idHasBeenSet = true; m_id = std::move(value); } /** *The unique identifier for the cache policy.
*/ inline void SetId(const char* value) { m_idHasBeenSet = true; m_id.assign(value); } /** *The unique identifier for the cache policy.
*/ inline CachePolicy& WithId(const Aws::String& value) { SetId(value); return *this;} /** *The unique identifier for the cache policy.
*/ inline CachePolicy& WithId(Aws::String&& value) { SetId(std::move(value)); return *this;} /** *The unique identifier for the cache policy.
*/ inline CachePolicy& WithId(const char* value) { SetId(value); return *this;} /** *The date and time when the cache policy was last modified.
*/ inline const Aws::Utils::DateTime& GetLastModifiedTime() const{ return m_lastModifiedTime; } /** *The date and time when the cache policy was last modified.
*/ inline bool LastModifiedTimeHasBeenSet() const { return m_lastModifiedTimeHasBeenSet; } /** *The date and time when the cache policy was last modified.
*/ inline void SetLastModifiedTime(const Aws::Utils::DateTime& value) { m_lastModifiedTimeHasBeenSet = true; m_lastModifiedTime = value; } /** *The date and time when the cache policy was last modified.
*/ inline void SetLastModifiedTime(Aws::Utils::DateTime&& value) { m_lastModifiedTimeHasBeenSet = true; m_lastModifiedTime = std::move(value); } /** *The date and time when the cache policy was last modified.
*/ inline CachePolicy& WithLastModifiedTime(const Aws::Utils::DateTime& value) { SetLastModifiedTime(value); return *this;} /** *The date and time when the cache policy was last modified.
*/ inline CachePolicy& WithLastModifiedTime(Aws::Utils::DateTime&& value) { SetLastModifiedTime(std::move(value)); return *this;} /** *The cache policy configuration.
*/ inline const CachePolicyConfig& GetCachePolicyConfig() const{ return m_cachePolicyConfig; } /** *The cache policy configuration.
*/ inline bool CachePolicyConfigHasBeenSet() const { return m_cachePolicyConfigHasBeenSet; } /** *The cache policy configuration.
*/ inline void SetCachePolicyConfig(const CachePolicyConfig& value) { m_cachePolicyConfigHasBeenSet = true; m_cachePolicyConfig = value; } /** *The cache policy configuration.
*/ inline void SetCachePolicyConfig(CachePolicyConfig&& value) { m_cachePolicyConfigHasBeenSet = true; m_cachePolicyConfig = std::move(value); } /** *The cache policy configuration.
*/ inline CachePolicy& WithCachePolicyConfig(const CachePolicyConfig& value) { SetCachePolicyConfig(value); return *this;} /** *The cache policy configuration.
*/ inline CachePolicy& WithCachePolicyConfig(CachePolicyConfig&& value) { SetCachePolicyConfig(std::move(value)); return *this;} private: Aws::String m_id; bool m_idHasBeenSet = false; Aws::Utils::DateTime m_lastModifiedTime; bool m_lastModifiedTimeHasBeenSet = false; CachePolicyConfig m_cachePolicyConfig; bool m_cachePolicyConfigHasBeenSet = false; }; } // namespace Model } // namespace CloudFront } // namespace Aws