/** * 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 { /** *

An object that determines whether any HTTP headers (and if so, which headers) * are included in the cache key and automatically included in requests that * CloudFront sends to the origin.

See Also:

AWS * API Reference

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

Determines whether any HTTP headers are included in the cache key and * automatically included in requests that CloudFront sends to the origin. Valid * values are:

  • none – HTTP headers are not included * in the cache key and are not automatically included in requests that CloudFront * sends to the origin. Even when this field is set to none, any * headers that are listed in an OriginRequestPolicy are * included in origin requests.

  • whitelist – The * HTTP headers that are listed in the Headers type are included in * the cache key and are automatically included in requests that CloudFront sends * to the origin.

*/ inline const CachePolicyHeaderBehavior& GetHeaderBehavior() const{ return m_headerBehavior; } /** *

Determines whether any HTTP headers are included in the cache key and * automatically included in requests that CloudFront sends to the origin. Valid * values are:

  • none – HTTP headers are not included * in the cache key and are not automatically included in requests that CloudFront * sends to the origin. Even when this field is set to none, any * headers that are listed in an OriginRequestPolicy are * included in origin requests.

  • whitelist – The * HTTP headers that are listed in the Headers type are included in * the cache key and are automatically included in requests that CloudFront sends * to the origin.

*/ inline bool HeaderBehaviorHasBeenSet() const { return m_headerBehaviorHasBeenSet; } /** *

Determines whether any HTTP headers are included in the cache key and * automatically included in requests that CloudFront sends to the origin. Valid * values are:

  • none – HTTP headers are not included * in the cache key and are not automatically included in requests that CloudFront * sends to the origin. Even when this field is set to none, any * headers that are listed in an OriginRequestPolicy are * included in origin requests.

  • whitelist – The * HTTP headers that are listed in the Headers type are included in * the cache key and are automatically included in requests that CloudFront sends * to the origin.

*/ inline void SetHeaderBehavior(const CachePolicyHeaderBehavior& value) { m_headerBehaviorHasBeenSet = true; m_headerBehavior = value; } /** *

Determines whether any HTTP headers are included in the cache key and * automatically included in requests that CloudFront sends to the origin. Valid * values are:

  • none – HTTP headers are not included * in the cache key and are not automatically included in requests that CloudFront * sends to the origin. Even when this field is set to none, any * headers that are listed in an OriginRequestPolicy are * included in origin requests.

  • whitelist – The * HTTP headers that are listed in the Headers type are included in * the cache key and are automatically included in requests that CloudFront sends * to the origin.

*/ inline void SetHeaderBehavior(CachePolicyHeaderBehavior&& value) { m_headerBehaviorHasBeenSet = true; m_headerBehavior = std::move(value); } /** *

Determines whether any HTTP headers are included in the cache key and * automatically included in requests that CloudFront sends to the origin. Valid * values are:

  • none – HTTP headers are not included * in the cache key and are not automatically included in requests that CloudFront * sends to the origin. Even when this field is set to none, any * headers that are listed in an OriginRequestPolicy are * included in origin requests.

  • whitelist – The * HTTP headers that are listed in the Headers type are included in * the cache key and are automatically included in requests that CloudFront sends * to the origin.

*/ inline CachePolicyHeadersConfig& WithHeaderBehavior(const CachePolicyHeaderBehavior& value) { SetHeaderBehavior(value); return *this;} /** *

Determines whether any HTTP headers are included in the cache key and * automatically included in requests that CloudFront sends to the origin. Valid * values are:

  • none – HTTP headers are not included * in the cache key and are not automatically included in requests that CloudFront * sends to the origin. Even when this field is set to none, any * headers that are listed in an OriginRequestPolicy are * included in origin requests.

  • whitelist – The * HTTP headers that are listed in the Headers type are included in * the cache key and are automatically included in requests that CloudFront sends * to the origin.

*/ inline CachePolicyHeadersConfig& WithHeaderBehavior(CachePolicyHeaderBehavior&& value) { SetHeaderBehavior(std::move(value)); return *this;} inline const Headers& GetHeaders() const{ return m_headers; } inline bool HeadersHasBeenSet() const { return m_headersHasBeenSet; } inline void SetHeaders(const Headers& value) { m_headersHasBeenSet = true; m_headers = value; } inline void SetHeaders(Headers&& value) { m_headersHasBeenSet = true; m_headers = std::move(value); } inline CachePolicyHeadersConfig& WithHeaders(const Headers& value) { SetHeaders(value); return *this;} inline CachePolicyHeadersConfig& WithHeaders(Headers&& value) { SetHeaders(std::move(value)); return *this;} private: CachePolicyHeaderBehavior m_headerBehavior; bool m_headerBehaviorHasBeenSet; Headers m_headers; bool m_headersHasBeenSet; }; } // namespace Model } // namespace CloudFront } // namespace Aws