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

Determines whether CloudFront includes the Referrer-Policy HTTP * response header and the header's value.

For more information about the * Referrer-Policy HTTP response header, see Referrer-Policy * in the MDN Web Docs.

See Also:

AWS * API Reference

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

A Boolean that determines whether CloudFront overrides the * Referrer-Policy HTTP response header received from the origin with * the one specified in this response headers policy.

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

A Boolean that determines whether CloudFront overrides the * Referrer-Policy HTTP response header received from the origin with * the one specified in this response headers policy.

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

A Boolean that determines whether CloudFront overrides the * Referrer-Policy HTTP response header received from the origin with * the one specified in this response headers policy.

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

A Boolean that determines whether CloudFront overrides the * Referrer-Policy HTTP response header received from the origin with * the one specified in this response headers policy.

*/ inline ResponseHeadersPolicyReferrerPolicy& WithOverride(bool value) { SetOverride(value); return *this;} /** *

The value of the Referrer-Policy HTTP response header. Valid * values are:

  • no-referrer

  • * no-referrer-when-downgrade

  • origin *

  • origin-when-cross-origin

  • * same-origin

  • strict-origin

    *
  • strict-origin-when-cross-origin

  • * unsafe-url

For more information about these * values, see Referrer-Policy * in the MDN Web Docs.

*/ inline const ReferrerPolicyList& GetReferrerPolicy() const{ return m_referrerPolicy; } /** *

The value of the Referrer-Policy HTTP response header. Valid * values are:

  • no-referrer

  • * no-referrer-when-downgrade

  • origin *

  • origin-when-cross-origin

  • * same-origin

  • strict-origin

    *
  • strict-origin-when-cross-origin

  • * unsafe-url

For more information about these * values, see Referrer-Policy * in the MDN Web Docs.

*/ inline bool ReferrerPolicyHasBeenSet() const { return m_referrerPolicyHasBeenSet; } /** *

The value of the Referrer-Policy HTTP response header. Valid * values are:

  • no-referrer

  • * no-referrer-when-downgrade

  • origin *

  • origin-when-cross-origin

  • * same-origin

  • strict-origin

    *
  • strict-origin-when-cross-origin

  • * unsafe-url

For more information about these * values, see Referrer-Policy * in the MDN Web Docs.

*/ inline void SetReferrerPolicy(const ReferrerPolicyList& value) { m_referrerPolicyHasBeenSet = true; m_referrerPolicy = value; } /** *

The value of the Referrer-Policy HTTP response header. Valid * values are:

  • no-referrer

  • * no-referrer-when-downgrade

  • origin *

  • origin-when-cross-origin

  • * same-origin

  • strict-origin

    *
  • strict-origin-when-cross-origin

  • * unsafe-url

For more information about these * values, see Referrer-Policy * in the MDN Web Docs.

*/ inline void SetReferrerPolicy(ReferrerPolicyList&& value) { m_referrerPolicyHasBeenSet = true; m_referrerPolicy = std::move(value); } /** *

The value of the Referrer-Policy HTTP response header. Valid * values are:

  • no-referrer

  • * no-referrer-when-downgrade

  • origin *

  • origin-when-cross-origin

  • * same-origin

  • strict-origin

    *
  • strict-origin-when-cross-origin

  • * unsafe-url

For more information about these * values, see Referrer-Policy * in the MDN Web Docs.

*/ inline ResponseHeadersPolicyReferrerPolicy& WithReferrerPolicy(const ReferrerPolicyList& value) { SetReferrerPolicy(value); return *this;} /** *

The value of the Referrer-Policy HTTP response header. Valid * values are:

  • no-referrer

  • * no-referrer-when-downgrade

  • origin *

  • origin-when-cross-origin

  • * same-origin

  • strict-origin

    *
  • strict-origin-when-cross-origin

  • * unsafe-url

For more information about these * values, see Referrer-Policy * in the MDN Web Docs.

*/ inline ResponseHeadersPolicyReferrerPolicy& WithReferrerPolicy(ReferrerPolicyList&& value) { SetReferrerPolicy(std::move(value)); return *this;} private: bool m_override; bool m_overrideHasBeenSet = false; ReferrerPolicyList m_referrerPolicy; bool m_referrerPolicyHasBeenSet = false; }; } // namespace Model } // namespace CloudFront } // namespace Aws