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

A configuration for a set of security-related HTTP response headers. * CloudFront adds these headers to HTTP responses that it sends for requests that * match a cache behavior associated with this response headers * policy.

See Also:

AWS * API Reference

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

Determines whether CloudFront includes the X-XSS-Protection HTTP * response header and the header's value.

For more information about the * X-XSS-Protection HTTP response header, see X-XSS-Protection * in the MDN Web Docs.

*/ inline const ResponseHeadersPolicyXSSProtection& GetXSSProtection() const{ return m_xSSProtection; } /** *

Determines whether CloudFront includes the X-XSS-Protection HTTP * response header and the header's value.

For more information about the * X-XSS-Protection HTTP response header, see X-XSS-Protection * in the MDN Web Docs.

*/ inline bool XSSProtectionHasBeenSet() const { return m_xSSProtectionHasBeenSet; } /** *

Determines whether CloudFront includes the X-XSS-Protection HTTP * response header and the header's value.

For more information about the * X-XSS-Protection HTTP response header, see X-XSS-Protection * in the MDN Web Docs.

*/ inline void SetXSSProtection(const ResponseHeadersPolicyXSSProtection& value) { m_xSSProtectionHasBeenSet = true; m_xSSProtection = value; } /** *

Determines whether CloudFront includes the X-XSS-Protection HTTP * response header and the header's value.

For more information about the * X-XSS-Protection HTTP response header, see X-XSS-Protection * in the MDN Web Docs.

*/ inline void SetXSSProtection(ResponseHeadersPolicyXSSProtection&& value) { m_xSSProtectionHasBeenSet = true; m_xSSProtection = std::move(value); } /** *

Determines whether CloudFront includes the X-XSS-Protection HTTP * response header and the header's value.

For more information about the * X-XSS-Protection HTTP response header, see X-XSS-Protection * in the MDN Web Docs.

*/ inline ResponseHeadersPolicySecurityHeadersConfig& WithXSSProtection(const ResponseHeadersPolicyXSSProtection& value) { SetXSSProtection(value); return *this;} /** *

Determines whether CloudFront includes the X-XSS-Protection HTTP * response header and the header's value.

For more information about the * X-XSS-Protection HTTP response header, see X-XSS-Protection * in the MDN Web Docs.

*/ inline ResponseHeadersPolicySecurityHeadersConfig& WithXSSProtection(ResponseHeadersPolicyXSSProtection&& value) { SetXSSProtection(std::move(value)); return *this;} /** *

Determines whether CloudFront includes the X-Frame-Options HTTP * response header and the header's value.

For more information about the * X-Frame-Options HTTP response header, see X-Frame-Options * in the MDN Web Docs.

*/ inline const ResponseHeadersPolicyFrameOptions& GetFrameOptions() const{ return m_frameOptions; } /** *

Determines whether CloudFront includes the X-Frame-Options HTTP * response header and the header's value.

For more information about the * X-Frame-Options HTTP response header, see X-Frame-Options * in the MDN Web Docs.

*/ inline bool FrameOptionsHasBeenSet() const { return m_frameOptionsHasBeenSet; } /** *

Determines whether CloudFront includes the X-Frame-Options HTTP * response header and the header's value.

For more information about the * X-Frame-Options HTTP response header, see X-Frame-Options * in the MDN Web Docs.

*/ inline void SetFrameOptions(const ResponseHeadersPolicyFrameOptions& value) { m_frameOptionsHasBeenSet = true; m_frameOptions = value; } /** *

Determines whether CloudFront includes the X-Frame-Options HTTP * response header and the header's value.

For more information about the * X-Frame-Options HTTP response header, see X-Frame-Options * in the MDN Web Docs.

*/ inline void SetFrameOptions(ResponseHeadersPolicyFrameOptions&& value) { m_frameOptionsHasBeenSet = true; m_frameOptions = std::move(value); } /** *

Determines whether CloudFront includes the X-Frame-Options HTTP * response header and the header's value.

For more information about the * X-Frame-Options HTTP response header, see X-Frame-Options * in the MDN Web Docs.

*/ inline ResponseHeadersPolicySecurityHeadersConfig& WithFrameOptions(const ResponseHeadersPolicyFrameOptions& value) { SetFrameOptions(value); return *this;} /** *

Determines whether CloudFront includes the X-Frame-Options HTTP * response header and the header's value.

For more information about the * X-Frame-Options HTTP response header, see X-Frame-Options * in the MDN Web Docs.

*/ inline ResponseHeadersPolicySecurityHeadersConfig& WithFrameOptions(ResponseHeadersPolicyFrameOptions&& value) { SetFrameOptions(std::move(value)); return *this;} /** *

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.

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

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.

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

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.

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

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.

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

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.

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

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.

*/ inline ResponseHeadersPolicySecurityHeadersConfig& WithReferrerPolicy(ResponseHeadersPolicyReferrerPolicy&& value) { SetReferrerPolicy(std::move(value)); return *this;} /** *

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.

*/ inline const ResponseHeadersPolicyContentSecurityPolicy& GetContentSecurityPolicy() const{ return m_contentSecurityPolicy; } /** *

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.

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

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

*/ inline void SetContentSecurityPolicy(const ResponseHeadersPolicyContentSecurityPolicy& 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.

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

*/ inline void SetContentSecurityPolicy(ResponseHeadersPolicyContentSecurityPolicy&& 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.

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

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

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.

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

Determines whether CloudFront includes the * X-Content-Type-Options HTTP response header with its value set to * nosniff.

For more information about the * X-Content-Type-Options HTTP response header, see X-Content-Type-Options * in the MDN Web Docs.

*/ inline const ResponseHeadersPolicyContentTypeOptions& GetContentTypeOptions() const{ return m_contentTypeOptions; } /** *

Determines whether CloudFront includes the * X-Content-Type-Options HTTP response header with its value set to * nosniff.

For more information about the * X-Content-Type-Options HTTP response header, see X-Content-Type-Options * in the MDN Web Docs.

*/ inline bool ContentTypeOptionsHasBeenSet() const { return m_contentTypeOptionsHasBeenSet; } /** *

Determines whether CloudFront includes the * X-Content-Type-Options HTTP response header with its value set to * nosniff.

For more information about the * X-Content-Type-Options HTTP response header, see X-Content-Type-Options * in the MDN Web Docs.

*/ inline void SetContentTypeOptions(const ResponseHeadersPolicyContentTypeOptions& value) { m_contentTypeOptionsHasBeenSet = true; m_contentTypeOptions = value; } /** *

Determines whether CloudFront includes the * X-Content-Type-Options HTTP response header with its value set to * nosniff.

For more information about the * X-Content-Type-Options HTTP response header, see X-Content-Type-Options * in the MDN Web Docs.

*/ inline void SetContentTypeOptions(ResponseHeadersPolicyContentTypeOptions&& value) { m_contentTypeOptionsHasBeenSet = true; m_contentTypeOptions = std::move(value); } /** *

Determines whether CloudFront includes the * X-Content-Type-Options HTTP response header with its value set to * nosniff.

For more information about the * X-Content-Type-Options HTTP response header, see X-Content-Type-Options * in the MDN Web Docs.

*/ inline ResponseHeadersPolicySecurityHeadersConfig& WithContentTypeOptions(const ResponseHeadersPolicyContentTypeOptions& value) { SetContentTypeOptions(value); return *this;} /** *

Determines whether CloudFront includes the * X-Content-Type-Options HTTP response header with its value set to * nosniff.

For more information about the * X-Content-Type-Options HTTP response header, see X-Content-Type-Options * in the MDN Web Docs.

*/ inline ResponseHeadersPolicySecurityHeadersConfig& WithContentTypeOptions(ResponseHeadersPolicyContentTypeOptions&& value) { SetContentTypeOptions(std::move(value)); return *this;} /** *

Determines whether CloudFront includes the * Strict-Transport-Security HTTP response header and the header's * value.

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

*/ inline const ResponseHeadersPolicyStrictTransportSecurity& GetStrictTransportSecurity() const{ return m_strictTransportSecurity; } /** *

Determines whether CloudFront includes the * Strict-Transport-Security HTTP response header and the header's * value.

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

*/ inline bool StrictTransportSecurityHasBeenSet() const { return m_strictTransportSecurityHasBeenSet; } /** *

Determines whether CloudFront includes the * Strict-Transport-Security HTTP response header and the header's * value.

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

*/ inline void SetStrictTransportSecurity(const ResponseHeadersPolicyStrictTransportSecurity& value) { m_strictTransportSecurityHasBeenSet = true; m_strictTransportSecurity = value; } /** *

Determines whether CloudFront includes the * Strict-Transport-Security HTTP response header and the header's * value.

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

*/ inline void SetStrictTransportSecurity(ResponseHeadersPolicyStrictTransportSecurity&& value) { m_strictTransportSecurityHasBeenSet = true; m_strictTransportSecurity = std::move(value); } /** *

Determines whether CloudFront includes the * Strict-Transport-Security HTTP response header and the header's * value.

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

*/ inline ResponseHeadersPolicySecurityHeadersConfig& WithStrictTransportSecurity(const ResponseHeadersPolicyStrictTransportSecurity& value) { SetStrictTransportSecurity(value); return *this;} /** *

Determines whether CloudFront includes the * Strict-Transport-Security HTTP response header and the header's * value.

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

*/ inline ResponseHeadersPolicySecurityHeadersConfig& WithStrictTransportSecurity(ResponseHeadersPolicyStrictTransportSecurity&& value) { SetStrictTransportSecurity(std::move(value)); return *this;} private: ResponseHeadersPolicyXSSProtection m_xSSProtection; bool m_xSSProtectionHasBeenSet = false; ResponseHeadersPolicyFrameOptions m_frameOptions; bool m_frameOptionsHasBeenSet = false; ResponseHeadersPolicyReferrerPolicy m_referrerPolicy; bool m_referrerPolicyHasBeenSet = false; ResponseHeadersPolicyContentSecurityPolicy m_contentSecurityPolicy; bool m_contentSecurityPolicyHasBeenSet = false; ResponseHeadersPolicyContentTypeOptions m_contentTypeOptions; bool m_contentTypeOptionsHasBeenSet = false; ResponseHeadersPolicyStrictTransportSecurity m_strictTransportSecurity; bool m_strictTransportSecurityHasBeenSet = false; }; } // namespace Model } // namespace CloudFront } // namespace Aws