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

Information about the target group stickiness for a rule.

See * Also:

AWS * API Reference

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

Indicates whether target group stickiness is enabled.

*/ inline bool GetEnabled() const{ return m_enabled; } /** *

Indicates whether target group stickiness is enabled.

*/ inline bool EnabledHasBeenSet() const { return m_enabledHasBeenSet; } /** *

Indicates whether target group stickiness is enabled.

*/ inline void SetEnabled(bool value) { m_enabledHasBeenSet = true; m_enabled = value; } /** *

Indicates whether target group stickiness is enabled.

*/ inline TargetGroupStickinessConfig& WithEnabled(bool value) { SetEnabled(value); return *this;} /** *

The time period, in seconds, during which requests from a client should be * routed to the same target group. The range is 1-604800 seconds (7 days).

*/ inline int GetDurationSeconds() const{ return m_durationSeconds; } /** *

The time period, in seconds, during which requests from a client should be * routed to the same target group. The range is 1-604800 seconds (7 days).

*/ inline bool DurationSecondsHasBeenSet() const { return m_durationSecondsHasBeenSet; } /** *

The time period, in seconds, during which requests from a client should be * routed to the same target group. The range is 1-604800 seconds (7 days).

*/ inline void SetDurationSeconds(int value) { m_durationSecondsHasBeenSet = true; m_durationSeconds = value; } /** *

The time period, in seconds, during which requests from a client should be * routed to the same target group. The range is 1-604800 seconds (7 days).

*/ inline TargetGroupStickinessConfig& WithDurationSeconds(int value) { SetDurationSeconds(value); return *this;} private: bool m_enabled; bool m_enabledHasBeenSet = false; int m_durationSeconds; bool m_durationSecondsHasBeenSet = false; }; } // namespace Model } // namespace ElasticLoadBalancingv2 } // namespace Aws