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

An object that determines whether any cookies in viewer requests (and if so, * which cookies) are included in requests that CloudFront sends to the * origin.

See Also:

AWS * API Reference

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

Determines whether cookies in viewer requests are included in requests that * CloudFront sends to the origin. Valid values are:

  • * none – No cookies in viewer requests are included in requests that * CloudFront sends to the origin. Even when this field is set to * none, any cookies that are listed in a CachePolicy * are included in origin requests.

  • * whitelist – Only the cookies in viewer requests that are listed in * the CookieNames type are included in requests that CloudFront sends * to the origin.

  • all – All cookies in viewer * requests are included in requests that CloudFront sends to the origin.

  • *
  • allExcept – All cookies in viewer requests are included in * requests that CloudFront sends to the origin, except for those * listed in the CookieNames type, which are not included.

  • *
*/ inline const OriginRequestPolicyCookieBehavior& GetCookieBehavior() const{ return m_cookieBehavior; } /** *

Determines whether cookies in viewer requests are included in requests that * CloudFront sends to the origin. Valid values are:

  • * none – No cookies in viewer requests are included in requests that * CloudFront sends to the origin. Even when this field is set to * none, any cookies that are listed in a CachePolicy * are included in origin requests.

  • * whitelist – Only the cookies in viewer requests that are listed in * the CookieNames type are included in requests that CloudFront sends * to the origin.

  • all – All cookies in viewer * requests are included in requests that CloudFront sends to the origin.

  • *
  • allExcept – All cookies in viewer requests are included in * requests that CloudFront sends to the origin, except for those * listed in the CookieNames type, which are not included.

  • *
*/ inline bool CookieBehaviorHasBeenSet() const { return m_cookieBehaviorHasBeenSet; } /** *

Determines whether cookies in viewer requests are included in requests that * CloudFront sends to the origin. Valid values are:

  • * none – No cookies in viewer requests are included in requests that * CloudFront sends to the origin. Even when this field is set to * none, any cookies that are listed in a CachePolicy * are included in origin requests.

  • * whitelist – Only the cookies in viewer requests that are listed in * the CookieNames type are included in requests that CloudFront sends * to the origin.

  • all – All cookies in viewer * requests are included in requests that CloudFront sends to the origin.

  • *
  • allExcept – All cookies in viewer requests are included in * requests that CloudFront sends to the origin, except for those * listed in the CookieNames type, which are not included.

  • *
*/ inline void SetCookieBehavior(const OriginRequestPolicyCookieBehavior& value) { m_cookieBehaviorHasBeenSet = true; m_cookieBehavior = value; } /** *

Determines whether cookies in viewer requests are included in requests that * CloudFront sends to the origin. Valid values are:

  • * none – No cookies in viewer requests are included in requests that * CloudFront sends to the origin. Even when this field is set to * none, any cookies that are listed in a CachePolicy * are included in origin requests.

  • * whitelist – Only the cookies in viewer requests that are listed in * the CookieNames type are included in requests that CloudFront sends * to the origin.

  • all – All cookies in viewer * requests are included in requests that CloudFront sends to the origin.

  • *
  • allExcept – All cookies in viewer requests are included in * requests that CloudFront sends to the origin, except for those * listed in the CookieNames type, which are not included.

  • *
*/ inline void SetCookieBehavior(OriginRequestPolicyCookieBehavior&& value) { m_cookieBehaviorHasBeenSet = true; m_cookieBehavior = std::move(value); } /** *

Determines whether cookies in viewer requests are included in requests that * CloudFront sends to the origin. Valid values are:

  • * none – No cookies in viewer requests are included in requests that * CloudFront sends to the origin. Even when this field is set to * none, any cookies that are listed in a CachePolicy * are included in origin requests.

  • * whitelist – Only the cookies in viewer requests that are listed in * the CookieNames type are included in requests that CloudFront sends * to the origin.

  • all – All cookies in viewer * requests are included in requests that CloudFront sends to the origin.

  • *
  • allExcept – All cookies in viewer requests are included in * requests that CloudFront sends to the origin, except for those * listed in the CookieNames type, which are not included.

  • *
*/ inline OriginRequestPolicyCookiesConfig& WithCookieBehavior(const OriginRequestPolicyCookieBehavior& value) { SetCookieBehavior(value); return *this;} /** *

Determines whether cookies in viewer requests are included in requests that * CloudFront sends to the origin. Valid values are:

  • * none – No cookies in viewer requests are included in requests that * CloudFront sends to the origin. Even when this field is set to * none, any cookies that are listed in a CachePolicy * are included in origin requests.

  • * whitelist – Only the cookies in viewer requests that are listed in * the CookieNames type are included in requests that CloudFront sends * to the origin.

  • all – All cookies in viewer * requests are included in requests that CloudFront sends to the origin.

  • *
  • allExcept – All cookies in viewer requests are included in * requests that CloudFront sends to the origin, except for those * listed in the CookieNames type, which are not included.

  • *
*/ inline OriginRequestPolicyCookiesConfig& WithCookieBehavior(OriginRequestPolicyCookieBehavior&& value) { SetCookieBehavior(std::move(value)); return *this;} inline const CookieNames& GetCookies() const{ return m_cookies; } inline bool CookiesHasBeenSet() const { return m_cookiesHasBeenSet; } inline void SetCookies(const CookieNames& value) { m_cookiesHasBeenSet = true; m_cookies = value; } inline void SetCookies(CookieNames&& value) { m_cookiesHasBeenSet = true; m_cookies = std::move(value); } inline OriginRequestPolicyCookiesConfig& WithCookies(const CookieNames& value) { SetCookies(value); return *this;} inline OriginRequestPolicyCookiesConfig& WithCookies(CookieNames&& value) { SetCookies(std::move(value)); return *this;} private: OriginRequestPolicyCookieBehavior m_cookieBehavior; bool m_cookieBehaviorHasBeenSet = false; CookieNames m_cookies; bool m_cookiesHasBeenSet = false; }; } // namespace Model } // namespace CloudFront } // namespace Aws