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

Describes whether an Amazon Lightsail content delivery network (CDN) * distribution forwards cookies to the origin and, if so, which ones.

For * the cookies that you specify, your distribution caches separate versions of the * specified content based on the cookie values in viewer requests.

See * Also:

AWS * API Reference

*/ class CookieObject { public: AWS_LIGHTSAIL_API CookieObject(); AWS_LIGHTSAIL_API CookieObject(Aws::Utils::Json::JsonView jsonValue); AWS_LIGHTSAIL_API CookieObject& operator=(Aws::Utils::Json::JsonView jsonValue); AWS_LIGHTSAIL_API Aws::Utils::Json::JsonValue Jsonize() const; /** *

Specifies which cookies to forward to the distribution's origin for a cache * behavior: all, none, or allow-list to * forward only the cookies specified in the cookiesAllowList * parameter.

*/ inline const ForwardValues& GetOption() const{ return m_option; } /** *

Specifies which cookies to forward to the distribution's origin for a cache * behavior: all, none, or allow-list to * forward only the cookies specified in the cookiesAllowList * parameter.

*/ inline bool OptionHasBeenSet() const { return m_optionHasBeenSet; } /** *

Specifies which cookies to forward to the distribution's origin for a cache * behavior: all, none, or allow-list to * forward only the cookies specified in the cookiesAllowList * parameter.

*/ inline void SetOption(const ForwardValues& value) { m_optionHasBeenSet = true; m_option = value; } /** *

Specifies which cookies to forward to the distribution's origin for a cache * behavior: all, none, or allow-list to * forward only the cookies specified in the cookiesAllowList * parameter.

*/ inline void SetOption(ForwardValues&& value) { m_optionHasBeenSet = true; m_option = std::move(value); } /** *

Specifies which cookies to forward to the distribution's origin for a cache * behavior: all, none, or allow-list to * forward only the cookies specified in the cookiesAllowList * parameter.

*/ inline CookieObject& WithOption(const ForwardValues& value) { SetOption(value); return *this;} /** *

Specifies which cookies to forward to the distribution's origin for a cache * behavior: all, none, or allow-list to * forward only the cookies specified in the cookiesAllowList * parameter.

*/ inline CookieObject& WithOption(ForwardValues&& value) { SetOption(std::move(value)); return *this;} /** *

The specific cookies to forward to your distribution's origin.

*/ inline const Aws::Vector& GetCookiesAllowList() const{ return m_cookiesAllowList; } /** *

The specific cookies to forward to your distribution's origin.

*/ inline bool CookiesAllowListHasBeenSet() const { return m_cookiesAllowListHasBeenSet; } /** *

The specific cookies to forward to your distribution's origin.

*/ inline void SetCookiesAllowList(const Aws::Vector& value) { m_cookiesAllowListHasBeenSet = true; m_cookiesAllowList = value; } /** *

The specific cookies to forward to your distribution's origin.

*/ inline void SetCookiesAllowList(Aws::Vector&& value) { m_cookiesAllowListHasBeenSet = true; m_cookiesAllowList = std::move(value); } /** *

The specific cookies to forward to your distribution's origin.

*/ inline CookieObject& WithCookiesAllowList(const Aws::Vector& value) { SetCookiesAllowList(value); return *this;} /** *

The specific cookies to forward to your distribution's origin.

*/ inline CookieObject& WithCookiesAllowList(Aws::Vector&& value) { SetCookiesAllowList(std::move(value)); return *this;} /** *

The specific cookies to forward to your distribution's origin.

*/ inline CookieObject& AddCookiesAllowList(const Aws::String& value) { m_cookiesAllowListHasBeenSet = true; m_cookiesAllowList.push_back(value); return *this; } /** *

The specific cookies to forward to your distribution's origin.

*/ inline CookieObject& AddCookiesAllowList(Aws::String&& value) { m_cookiesAllowListHasBeenSet = true; m_cookiesAllowList.push_back(std::move(value)); return *this; } /** *

The specific cookies to forward to your distribution's origin.

*/ inline CookieObject& AddCookiesAllowList(const char* value) { m_cookiesAllowListHasBeenSet = true; m_cookiesAllowList.push_back(value); return *this; } private: ForwardValues m_option; bool m_optionHasBeenSet = false; Aws::Vector m_cookiesAllowList; bool m_cookiesAllowListHasBeenSet = false; }; } // namespace Model } // namespace Lightsail } // namespace Aws