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

The policy directives and their values that CloudFront includes as values for * the Content-Security-Policy HTTP response header.

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

See Also:

AWS * API Reference

*/ class ResponseHeadersPolicyContentSecurityPolicy { public: AWS_CLOUDFRONT_API ResponseHeadersPolicyContentSecurityPolicy(); AWS_CLOUDFRONT_API ResponseHeadersPolicyContentSecurityPolicy(const Aws::Utils::Xml::XmlNode& xmlNode); AWS_CLOUDFRONT_API ResponseHeadersPolicyContentSecurityPolicy& 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 * Content-Security-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 * Content-Security-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 * Content-Security-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 * Content-Security-Policy HTTP response header received from the * origin with the one specified in this response headers policy.

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

The policy directives and their values that CloudFront includes as values for * the Content-Security-Policy HTTP response header.

*/ inline const Aws::String& GetContentSecurityPolicy() const{ return m_contentSecurityPolicy; } /** *

The policy directives and their values that CloudFront includes as values for * the Content-Security-Policy HTTP response header.

*/ inline bool ContentSecurityPolicyHasBeenSet() const { return m_contentSecurityPolicyHasBeenSet; } /** *

The policy directives and their values that CloudFront includes as values for * the Content-Security-Policy HTTP response header.

*/ inline void SetContentSecurityPolicy(const Aws::String& value) { m_contentSecurityPolicyHasBeenSet = true; m_contentSecurityPolicy = value; } /** *

The policy directives and their values that CloudFront includes as values for * the Content-Security-Policy HTTP response header.

*/ inline void SetContentSecurityPolicy(Aws::String&& value) { m_contentSecurityPolicyHasBeenSet = true; m_contentSecurityPolicy = std::move(value); } /** *

The policy directives and their values that CloudFront includes as values for * the Content-Security-Policy HTTP response header.

*/ inline void SetContentSecurityPolicy(const char* value) { m_contentSecurityPolicyHasBeenSet = true; m_contentSecurityPolicy.assign(value); } /** *

The policy directives and their values that CloudFront includes as values for * the Content-Security-Policy HTTP response header.

*/ inline ResponseHeadersPolicyContentSecurityPolicy& WithContentSecurityPolicy(const Aws::String& value) { SetContentSecurityPolicy(value); return *this;} /** *

The policy directives and their values that CloudFront includes as values for * the Content-Security-Policy HTTP response header.

*/ inline ResponseHeadersPolicyContentSecurityPolicy& WithContentSecurityPolicy(Aws::String&& value) { SetContentSecurityPolicy(std::move(value)); return *this;} /** *

The policy directives and their values that CloudFront includes as values for * the Content-Security-Policy HTTP response header.

*/ inline ResponseHeadersPolicyContentSecurityPolicy& WithContentSecurityPolicy(const char* value) { SetContentSecurityPolicy(value); return *this;} private: bool m_override; bool m_overrideHasBeenSet = false; Aws::String m_contentSecurityPolicy; bool m_contentSecurityPolicyHasBeenSet = false; }; } // namespace Model } // namespace CloudFront } // namespace Aws