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

An HTTP response header name and its value. CloudFront includes this header * in HTTP responses that it sends for requests that match a cache behavior that's * associated with this response headers policy.

See Also:

AWS * API Reference

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

The HTTP response header name.

*/ inline const Aws::String& GetHeader() const{ return m_header; } /** *

The HTTP response header name.

*/ inline bool HeaderHasBeenSet() const { return m_headerHasBeenSet; } /** *

The HTTP response header name.

*/ inline void SetHeader(const Aws::String& value) { m_headerHasBeenSet = true; m_header = value; } /** *

The HTTP response header name.

*/ inline void SetHeader(Aws::String&& value) { m_headerHasBeenSet = true; m_header = std::move(value); } /** *

The HTTP response header name.

*/ inline void SetHeader(const char* value) { m_headerHasBeenSet = true; m_header.assign(value); } /** *

The HTTP response header name.

*/ inline ResponseHeadersPolicyCustomHeader& WithHeader(const Aws::String& value) { SetHeader(value); return *this;} /** *

The HTTP response header name.

*/ inline ResponseHeadersPolicyCustomHeader& WithHeader(Aws::String&& value) { SetHeader(std::move(value)); return *this;} /** *

The HTTP response header name.

*/ inline ResponseHeadersPolicyCustomHeader& WithHeader(const char* value) { SetHeader(value); return *this;} /** *

The value for the HTTP response header.

*/ inline const Aws::String& GetValue() const{ return m_value; } /** *

The value for the HTTP response header.

*/ inline bool ValueHasBeenSet() const { return m_valueHasBeenSet; } /** *

The value for the HTTP response header.

*/ inline void SetValue(const Aws::String& value) { m_valueHasBeenSet = true; m_value = value; } /** *

The value for the HTTP response header.

*/ inline void SetValue(Aws::String&& value) { m_valueHasBeenSet = true; m_value = std::move(value); } /** *

The value for the HTTP response header.

*/ inline void SetValue(const char* value) { m_valueHasBeenSet = true; m_value.assign(value); } /** *

The value for the HTTP response header.

*/ inline ResponseHeadersPolicyCustomHeader& WithValue(const Aws::String& value) { SetValue(value); return *this;} /** *

The value for the HTTP response header.

*/ inline ResponseHeadersPolicyCustomHeader& WithValue(Aws::String&& value) { SetValue(std::move(value)); return *this;} /** *

The value for the HTTP response header.

*/ inline ResponseHeadersPolicyCustomHeader& WithValue(const char* value) { SetValue(value); return *this;} /** *

A Boolean that determines whether CloudFront overrides a response header with * the same name received from the origin with the header specified here.

*/ inline bool GetOverride() const{ return m_override; } /** *

A Boolean that determines whether CloudFront overrides a response header with * the same name received from the origin with the header specified here.

*/ inline bool OverrideHasBeenSet() const { return m_overrideHasBeenSet; } /** *

A Boolean that determines whether CloudFront overrides a response header with * the same name received from the origin with the header specified here.

*/ inline void SetOverride(bool value) { m_overrideHasBeenSet = true; m_override = value; } /** *

A Boolean that determines whether CloudFront overrides a response header with * the same name received from the origin with the header specified here.

*/ inline ResponseHeadersPolicyCustomHeader& WithOverride(bool value) { SetOverride(value); return *this;} private: Aws::String m_header; bool m_headerHasBeenSet = false; Aws::String m_value; bool m_valueHasBeenSet = false; bool m_override; bool m_overrideHasBeenSet = false; }; } // namespace Model } // namespace CloudFront } // namespace Aws