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

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.

See Also:

AWS * API Reference

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

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

A Boolean that determines whether CloudFront includes the * includeSubDomains directive in the * Strict-Transport-Security HTTP response header.

*/ inline bool GetIncludeSubdomains() const{ return m_includeSubdomains; } /** *

A Boolean that determines whether CloudFront includes the * includeSubDomains directive in the * Strict-Transport-Security HTTP response header.

*/ inline bool IncludeSubdomainsHasBeenSet() const { return m_includeSubdomainsHasBeenSet; } /** *

A Boolean that determines whether CloudFront includes the * includeSubDomains directive in the * Strict-Transport-Security HTTP response header.

*/ inline void SetIncludeSubdomains(bool value) { m_includeSubdomainsHasBeenSet = true; m_includeSubdomains = value; } /** *

A Boolean that determines whether CloudFront includes the * includeSubDomains directive in the * Strict-Transport-Security HTTP response header.

*/ inline ResponseHeadersPolicyStrictTransportSecurity& WithIncludeSubdomains(bool value) { SetIncludeSubdomains(value); return *this;} /** *

A Boolean that determines whether CloudFront includes the * preload directive in the Strict-Transport-Security * HTTP response header.

*/ inline bool GetPreload() const{ return m_preload; } /** *

A Boolean that determines whether CloudFront includes the * preload directive in the Strict-Transport-Security * HTTP response header.

*/ inline bool PreloadHasBeenSet() const { return m_preloadHasBeenSet; } /** *

A Boolean that determines whether CloudFront includes the * preload directive in the Strict-Transport-Security * HTTP response header.

*/ inline void SetPreload(bool value) { m_preloadHasBeenSet = true; m_preload = value; } /** *

A Boolean that determines whether CloudFront includes the * preload directive in the Strict-Transport-Security * HTTP response header.

*/ inline ResponseHeadersPolicyStrictTransportSecurity& WithPreload(bool value) { SetPreload(value); return *this;} /** *

A number that CloudFront uses as the value for the max-age * directive in the Strict-Transport-Security HTTP response * header.

*/ inline int GetAccessControlMaxAgeSec() const{ return m_accessControlMaxAgeSec; } /** *

A number that CloudFront uses as the value for the max-age * directive in the Strict-Transport-Security HTTP response * header.

*/ inline bool AccessControlMaxAgeSecHasBeenSet() const { return m_accessControlMaxAgeSecHasBeenSet; } /** *

A number that CloudFront uses as the value for the max-age * directive in the Strict-Transport-Security HTTP response * header.

*/ inline void SetAccessControlMaxAgeSec(int value) { m_accessControlMaxAgeSecHasBeenSet = true; m_accessControlMaxAgeSec = value; } /** *

A number that CloudFront uses as the value for the max-age * directive in the Strict-Transport-Security HTTP response * header.

*/ inline ResponseHeadersPolicyStrictTransportSecurity& WithAccessControlMaxAgeSec(int value) { SetAccessControlMaxAgeSec(value); return *this;} private: bool m_override; bool m_overrideHasBeenSet = false; bool m_includeSubdomains; bool m_includeSubdomainsHasBeenSet = false; bool m_preload; bool m_preloadHasBeenSet = false; int m_accessControlMaxAgeSec; bool m_accessControlMaxAgeSecHasBeenSet = false; }; } // namespace Model } // namespace CloudFront } // namespace Aws