/** * 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 Xml { class XmlNode; } // namespace Xml } // namespace Utils namespace CloudFront { namespace Model { /** *

Contains a cache policy.

See Also:

AWS * API Reference

*/ class CachePolicySummary { public: AWS_CLOUDFRONT_API CachePolicySummary(); AWS_CLOUDFRONT_API CachePolicySummary(const Aws::Utils::Xml::XmlNode& xmlNode); AWS_CLOUDFRONT_API CachePolicySummary& operator=(const Aws::Utils::Xml::XmlNode& xmlNode); AWS_CLOUDFRONT_API void AddToNode(Aws::Utils::Xml::XmlNode& parentNode) const; /** *

The type of cache policy, either managed (created by Amazon Web * Services) or custom (created in this Amazon Web Services * account).

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

The type of cache policy, either managed (created by Amazon Web * Services) or custom (created in this Amazon Web Services * account).

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

The type of cache policy, either managed (created by Amazon Web * Services) or custom (created in this Amazon Web Services * account).

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

The type of cache policy, either managed (created by Amazon Web * Services) or custom (created in this Amazon Web Services * account).

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

The type of cache policy, either managed (created by Amazon Web * Services) or custom (created in this Amazon Web Services * account).

*/ inline CachePolicySummary& WithType(const CachePolicyType& value) { SetType(value); return *this;} /** *

The type of cache policy, either managed (created by Amazon Web * Services) or custom (created in this Amazon Web Services * account).

*/ inline CachePolicySummary& WithType(CachePolicyType&& value) { SetType(std::move(value)); return *this;} /** *

The cache policy.

*/ inline const CachePolicy& GetCachePolicy() const{ return m_cachePolicy; } /** *

The cache policy.

*/ inline bool CachePolicyHasBeenSet() const { return m_cachePolicyHasBeenSet; } /** *

The cache policy.

*/ inline void SetCachePolicy(const CachePolicy& value) { m_cachePolicyHasBeenSet = true; m_cachePolicy = value; } /** *

The cache policy.

*/ inline void SetCachePolicy(CachePolicy&& value) { m_cachePolicyHasBeenSet = true; m_cachePolicy = std::move(value); } /** *

The cache policy.

*/ inline CachePolicySummary& WithCachePolicy(const CachePolicy& value) { SetCachePolicy(value); return *this;} /** *

The cache policy.

*/ inline CachePolicySummary& WithCachePolicy(CachePolicy&& value) { SetCachePolicy(std::move(value)); return *this;} private: CachePolicyType m_type; bool m_typeHasBeenSet = false; CachePolicy m_cachePolicy; bool m_cachePolicyHasBeenSet = false; }; } // namespace Model } // namespace CloudFront } // namespace Aws