/** * 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 ElasticLoadBalancing { namespace Model { /** *

Information about a policy for duration-based session * stickiness.

See Also:

AWS * API Reference

*/ class LBCookieStickinessPolicy { public: AWS_ELASTICLOADBALANCING_API LBCookieStickinessPolicy(); AWS_ELASTICLOADBALANCING_API LBCookieStickinessPolicy(const Aws::Utils::Xml::XmlNode& xmlNode); AWS_ELASTICLOADBALANCING_API LBCookieStickinessPolicy& operator=(const Aws::Utils::Xml::XmlNode& xmlNode); AWS_ELASTICLOADBALANCING_API void OutputToStream(Aws::OStream& ostream, const char* location, unsigned index, const char* locationValue) const; AWS_ELASTICLOADBALANCING_API void OutputToStream(Aws::OStream& oStream, const char* location) const; /** *

The name of the policy. This name must be unique within the set of policies * for this load balancer.

*/ inline const Aws::String& GetPolicyName() const{ return m_policyName; } /** *

The name of the policy. This name must be unique within the set of policies * for this load balancer.

*/ inline bool PolicyNameHasBeenSet() const { return m_policyNameHasBeenSet; } /** *

The name of the policy. This name must be unique within the set of policies * for this load balancer.

*/ inline void SetPolicyName(const Aws::String& value) { m_policyNameHasBeenSet = true; m_policyName = value; } /** *

The name of the policy. This name must be unique within the set of policies * for this load balancer.

*/ inline void SetPolicyName(Aws::String&& value) { m_policyNameHasBeenSet = true; m_policyName = std::move(value); } /** *

The name of the policy. This name must be unique within the set of policies * for this load balancer.

*/ inline void SetPolicyName(const char* value) { m_policyNameHasBeenSet = true; m_policyName.assign(value); } /** *

The name of the policy. This name must be unique within the set of policies * for this load balancer.

*/ inline LBCookieStickinessPolicy& WithPolicyName(const Aws::String& value) { SetPolicyName(value); return *this;} /** *

The name of the policy. This name must be unique within the set of policies * for this load balancer.

*/ inline LBCookieStickinessPolicy& WithPolicyName(Aws::String&& value) { SetPolicyName(std::move(value)); return *this;} /** *

The name of the policy. This name must be unique within the set of policies * for this load balancer.

*/ inline LBCookieStickinessPolicy& WithPolicyName(const char* value) { SetPolicyName(value); return *this;} /** *

The time period, in seconds, after which the cookie should be considered * stale. If this parameter is not specified, the stickiness session lasts for the * duration of the browser session.

*/ inline long long GetCookieExpirationPeriod() const{ return m_cookieExpirationPeriod; } /** *

The time period, in seconds, after which the cookie should be considered * stale. If this parameter is not specified, the stickiness session lasts for the * duration of the browser session.

*/ inline bool CookieExpirationPeriodHasBeenSet() const { return m_cookieExpirationPeriodHasBeenSet; } /** *

The time period, in seconds, after which the cookie should be considered * stale. If this parameter is not specified, the stickiness session lasts for the * duration of the browser session.

*/ inline void SetCookieExpirationPeriod(long long value) { m_cookieExpirationPeriodHasBeenSet = true; m_cookieExpirationPeriod = value; } /** *

The time period, in seconds, after which the cookie should be considered * stale. If this parameter is not specified, the stickiness session lasts for the * duration of the browser session.

*/ inline LBCookieStickinessPolicy& WithCookieExpirationPeriod(long long value) { SetCookieExpirationPeriod(value); return *this;} private: Aws::String m_policyName; bool m_policyNameHasBeenSet = false; long long m_cookieExpirationPeriod; bool m_cookieExpirationPeriodHasBeenSet = false; }; } // namespace Model } // namespace ElasticLoadBalancing } // namespace Aws