/** * 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 response headers policy configuration.

A response headers policy * configuration contains metadata about the response headers policy, and * configurations for sets of HTTP response headers.

See Also:

AWS * API Reference

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

A comment to describe the response headers policy.

The comment cannot * be longer than 128 characters.

*/ inline const Aws::String& GetComment() const{ return m_comment; } /** *

A comment to describe the response headers policy.

The comment cannot * be longer than 128 characters.

*/ inline bool CommentHasBeenSet() const { return m_commentHasBeenSet; } /** *

A comment to describe the response headers policy.

The comment cannot * be longer than 128 characters.

*/ inline void SetComment(const Aws::String& value) { m_commentHasBeenSet = true; m_comment = value; } /** *

A comment to describe the response headers policy.

The comment cannot * be longer than 128 characters.

*/ inline void SetComment(Aws::String&& value) { m_commentHasBeenSet = true; m_comment = std::move(value); } /** *

A comment to describe the response headers policy.

The comment cannot * be longer than 128 characters.

*/ inline void SetComment(const char* value) { m_commentHasBeenSet = true; m_comment.assign(value); } /** *

A comment to describe the response headers policy.

The comment cannot * be longer than 128 characters.

*/ inline ResponseHeadersPolicyConfig& WithComment(const Aws::String& value) { SetComment(value); return *this;} /** *

A comment to describe the response headers policy.

The comment cannot * be longer than 128 characters.

*/ inline ResponseHeadersPolicyConfig& WithComment(Aws::String&& value) { SetComment(std::move(value)); return *this;} /** *

A comment to describe the response headers policy.

The comment cannot * be longer than 128 characters.

*/ inline ResponseHeadersPolicyConfig& WithComment(const char* value) { SetComment(value); return *this;} /** *

A name to identify the response headers policy.

The name must be * unique for response headers policies in this Amazon Web Services account.

*/ inline const Aws::String& GetName() const{ return m_name; } /** *

A name to identify the response headers policy.

The name must be * unique for response headers policies in this Amazon Web Services account.

*/ inline bool NameHasBeenSet() const { return m_nameHasBeenSet; } /** *

A name to identify the response headers policy.

The name must be * unique for response headers policies in this Amazon Web Services account.

*/ inline void SetName(const Aws::String& value) { m_nameHasBeenSet = true; m_name = value; } /** *

A name to identify the response headers policy.

The name must be * unique for response headers policies in this Amazon Web Services account.

*/ inline void SetName(Aws::String&& value) { m_nameHasBeenSet = true; m_name = std::move(value); } /** *

A name to identify the response headers policy.

The name must be * unique for response headers policies in this Amazon Web Services account.

*/ inline void SetName(const char* value) { m_nameHasBeenSet = true; m_name.assign(value); } /** *

A name to identify the response headers policy.

The name must be * unique for response headers policies in this Amazon Web Services account.

*/ inline ResponseHeadersPolicyConfig& WithName(const Aws::String& value) { SetName(value); return *this;} /** *

A name to identify the response headers policy.

The name must be * unique for response headers policies in this Amazon Web Services account.

*/ inline ResponseHeadersPolicyConfig& WithName(Aws::String&& value) { SetName(std::move(value)); return *this;} /** *

A name to identify the response headers policy.

The name must be * unique for response headers policies in this Amazon Web Services account.

*/ inline ResponseHeadersPolicyConfig& WithName(const char* value) { SetName(value); return *this;} /** *

A configuration for a set of HTTP response headers that are used for * cross-origin resource sharing (CORS).

*/ inline const ResponseHeadersPolicyCorsConfig& GetCorsConfig() const{ return m_corsConfig; } /** *

A configuration for a set of HTTP response headers that are used for * cross-origin resource sharing (CORS).

*/ inline bool CorsConfigHasBeenSet() const { return m_corsConfigHasBeenSet; } /** *

A configuration for a set of HTTP response headers that are used for * cross-origin resource sharing (CORS).

*/ inline void SetCorsConfig(const ResponseHeadersPolicyCorsConfig& value) { m_corsConfigHasBeenSet = true; m_corsConfig = value; } /** *

A configuration for a set of HTTP response headers that are used for * cross-origin resource sharing (CORS).

*/ inline void SetCorsConfig(ResponseHeadersPolicyCorsConfig&& value) { m_corsConfigHasBeenSet = true; m_corsConfig = std::move(value); } /** *

A configuration for a set of HTTP response headers that are used for * cross-origin resource sharing (CORS).

*/ inline ResponseHeadersPolicyConfig& WithCorsConfig(const ResponseHeadersPolicyCorsConfig& value) { SetCorsConfig(value); return *this;} /** *

A configuration for a set of HTTP response headers that are used for * cross-origin resource sharing (CORS).

*/ inline ResponseHeadersPolicyConfig& WithCorsConfig(ResponseHeadersPolicyCorsConfig&& value) { SetCorsConfig(std::move(value)); return *this;} /** *

A configuration for a set of security-related HTTP response headers.

*/ inline const ResponseHeadersPolicySecurityHeadersConfig& GetSecurityHeadersConfig() const{ return m_securityHeadersConfig; } /** *

A configuration for a set of security-related HTTP response headers.

*/ inline bool SecurityHeadersConfigHasBeenSet() const { return m_securityHeadersConfigHasBeenSet; } /** *

A configuration for a set of security-related HTTP response headers.

*/ inline void SetSecurityHeadersConfig(const ResponseHeadersPolicySecurityHeadersConfig& value) { m_securityHeadersConfigHasBeenSet = true; m_securityHeadersConfig = value; } /** *

A configuration for a set of security-related HTTP response headers.

*/ inline void SetSecurityHeadersConfig(ResponseHeadersPolicySecurityHeadersConfig&& value) { m_securityHeadersConfigHasBeenSet = true; m_securityHeadersConfig = std::move(value); } /** *

A configuration for a set of security-related HTTP response headers.

*/ inline ResponseHeadersPolicyConfig& WithSecurityHeadersConfig(const ResponseHeadersPolicySecurityHeadersConfig& value) { SetSecurityHeadersConfig(value); return *this;} /** *

A configuration for a set of security-related HTTP response headers.

*/ inline ResponseHeadersPolicyConfig& WithSecurityHeadersConfig(ResponseHeadersPolicySecurityHeadersConfig&& value) { SetSecurityHeadersConfig(std::move(value)); return *this;} /** *

A configuration for enabling the Server-Timing header in HTTP * responses sent from CloudFront.

*/ inline const ResponseHeadersPolicyServerTimingHeadersConfig& GetServerTimingHeadersConfig() const{ return m_serverTimingHeadersConfig; } /** *

A configuration for enabling the Server-Timing header in HTTP * responses sent from CloudFront.

*/ inline bool ServerTimingHeadersConfigHasBeenSet() const { return m_serverTimingHeadersConfigHasBeenSet; } /** *

A configuration for enabling the Server-Timing header in HTTP * responses sent from CloudFront.

*/ inline void SetServerTimingHeadersConfig(const ResponseHeadersPolicyServerTimingHeadersConfig& value) { m_serverTimingHeadersConfigHasBeenSet = true; m_serverTimingHeadersConfig = value; } /** *

A configuration for enabling the Server-Timing header in HTTP * responses sent from CloudFront.

*/ inline void SetServerTimingHeadersConfig(ResponseHeadersPolicyServerTimingHeadersConfig&& value) { m_serverTimingHeadersConfigHasBeenSet = true; m_serverTimingHeadersConfig = std::move(value); } /** *

A configuration for enabling the Server-Timing header in HTTP * responses sent from CloudFront.

*/ inline ResponseHeadersPolicyConfig& WithServerTimingHeadersConfig(const ResponseHeadersPolicyServerTimingHeadersConfig& value) { SetServerTimingHeadersConfig(value); return *this;} /** *

A configuration for enabling the Server-Timing header in HTTP * responses sent from CloudFront.

*/ inline ResponseHeadersPolicyConfig& WithServerTimingHeadersConfig(ResponseHeadersPolicyServerTimingHeadersConfig&& value) { SetServerTimingHeadersConfig(std::move(value)); return *this;} /** *

A configuration for a set of custom HTTP response headers.

*/ inline const ResponseHeadersPolicyCustomHeadersConfig& GetCustomHeadersConfig() const{ return m_customHeadersConfig; } /** *

A configuration for a set of custom HTTP response headers.

*/ inline bool CustomHeadersConfigHasBeenSet() const { return m_customHeadersConfigHasBeenSet; } /** *

A configuration for a set of custom HTTP response headers.

*/ inline void SetCustomHeadersConfig(const ResponseHeadersPolicyCustomHeadersConfig& value) { m_customHeadersConfigHasBeenSet = true; m_customHeadersConfig = value; } /** *

A configuration for a set of custom HTTP response headers.

*/ inline void SetCustomHeadersConfig(ResponseHeadersPolicyCustomHeadersConfig&& value) { m_customHeadersConfigHasBeenSet = true; m_customHeadersConfig = std::move(value); } /** *

A configuration for a set of custom HTTP response headers.

*/ inline ResponseHeadersPolicyConfig& WithCustomHeadersConfig(const ResponseHeadersPolicyCustomHeadersConfig& value) { SetCustomHeadersConfig(value); return *this;} /** *

A configuration for a set of custom HTTP response headers.

*/ inline ResponseHeadersPolicyConfig& WithCustomHeadersConfig(ResponseHeadersPolicyCustomHeadersConfig&& value) { SetCustomHeadersConfig(std::move(value)); return *this;} /** *

A configuration for a set of HTTP headers to remove from the HTTP * response.

*/ inline const ResponseHeadersPolicyRemoveHeadersConfig& GetRemoveHeadersConfig() const{ return m_removeHeadersConfig; } /** *

A configuration for a set of HTTP headers to remove from the HTTP * response.

*/ inline bool RemoveHeadersConfigHasBeenSet() const { return m_removeHeadersConfigHasBeenSet; } /** *

A configuration for a set of HTTP headers to remove from the HTTP * response.

*/ inline void SetRemoveHeadersConfig(const ResponseHeadersPolicyRemoveHeadersConfig& value) { m_removeHeadersConfigHasBeenSet = true; m_removeHeadersConfig = value; } /** *

A configuration for a set of HTTP headers to remove from the HTTP * response.

*/ inline void SetRemoveHeadersConfig(ResponseHeadersPolicyRemoveHeadersConfig&& value) { m_removeHeadersConfigHasBeenSet = true; m_removeHeadersConfig = std::move(value); } /** *

A configuration for a set of HTTP headers to remove from the HTTP * response.

*/ inline ResponseHeadersPolicyConfig& WithRemoveHeadersConfig(const ResponseHeadersPolicyRemoveHeadersConfig& value) { SetRemoveHeadersConfig(value); return *this;} /** *

A configuration for a set of HTTP headers to remove from the HTTP * response.

*/ inline ResponseHeadersPolicyConfig& WithRemoveHeadersConfig(ResponseHeadersPolicyRemoveHeadersConfig&& value) { SetRemoveHeadersConfig(std::move(value)); return *this;} private: Aws::String m_comment; bool m_commentHasBeenSet = false; Aws::String m_name; bool m_nameHasBeenSet = false; ResponseHeadersPolicyCorsConfig m_corsConfig; bool m_corsConfigHasBeenSet = false; ResponseHeadersPolicySecurityHeadersConfig m_securityHeadersConfig; bool m_securityHeadersConfigHasBeenSet = false; ResponseHeadersPolicyServerTimingHeadersConfig m_serverTimingHeadersConfig; bool m_serverTimingHeadersConfigHasBeenSet = false; ResponseHeadersPolicyCustomHeadersConfig m_customHeadersConfig; bool m_customHeadersConfigHasBeenSet = false; ResponseHeadersPolicyRemoveHeadersConfig m_removeHeadersConfig; bool m_removeHeadersConfigHasBeenSet = false; }; } // namespace Model } // namespace CloudFront } // namespace Aws