/** * 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 Xml { class XmlNode; } // namespace Xml } // namespace Utils namespace ElasticLoadBalancingv2 { namespace Model { /** *

Information about the state of the load balancer.

See Also:

* AWS * API Reference

*/ class LoadBalancerState { public: AWS_ELASTICLOADBALANCINGV2_API LoadBalancerState(); AWS_ELASTICLOADBALANCINGV2_API LoadBalancerState(const Aws::Utils::Xml::XmlNode& xmlNode); AWS_ELASTICLOADBALANCINGV2_API LoadBalancerState& 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; /** *

The state code. The initial state of the load balancer is * provisioning. After the load balancer is fully set up and ready to * route traffic, its state is active. If load balancer is routing * traffic but does not have the resources it needs to scale, its state * isactive_impaired. If the load balancer could not be set up, its * state is failed.

*/ inline const LoadBalancerStateEnum& GetCode() const{ return m_code; } /** *

The state code. The initial state of the load balancer is * provisioning. After the load balancer is fully set up and ready to * route traffic, its state is active. If load balancer is routing * traffic but does not have the resources it needs to scale, its state * isactive_impaired. If the load balancer could not be set up, its * state is failed.

*/ inline bool CodeHasBeenSet() const { return m_codeHasBeenSet; } /** *

The state code. The initial state of the load balancer is * provisioning. After the load balancer is fully set up and ready to * route traffic, its state is active. If load balancer is routing * traffic but does not have the resources it needs to scale, its state * isactive_impaired. If the load balancer could not be set up, its * state is failed.

*/ inline void SetCode(const LoadBalancerStateEnum& value) { m_codeHasBeenSet = true; m_code = value; } /** *

The state code. The initial state of the load balancer is * provisioning. After the load balancer is fully set up and ready to * route traffic, its state is active. If load balancer is routing * traffic but does not have the resources it needs to scale, its state * isactive_impaired. If the load balancer could not be set up, its * state is failed.

*/ inline void SetCode(LoadBalancerStateEnum&& value) { m_codeHasBeenSet = true; m_code = std::move(value); } /** *

The state code. The initial state of the load balancer is * provisioning. After the load balancer is fully set up and ready to * route traffic, its state is active. If load balancer is routing * traffic but does not have the resources it needs to scale, its state * isactive_impaired. If the load balancer could not be set up, its * state is failed.

*/ inline LoadBalancerState& WithCode(const LoadBalancerStateEnum& value) { SetCode(value); return *this;} /** *

The state code. The initial state of the load balancer is * provisioning. After the load balancer is fully set up and ready to * route traffic, its state is active. If load balancer is routing * traffic but does not have the resources it needs to scale, its state * isactive_impaired. If the load balancer could not be set up, its * state is failed.

*/ inline LoadBalancerState& WithCode(LoadBalancerStateEnum&& value) { SetCode(std::move(value)); return *this;} /** *

A description of the state.

*/ inline const Aws::String& GetReason() const{ return m_reason; } /** *

A description of the state.

*/ inline bool ReasonHasBeenSet() const { return m_reasonHasBeenSet; } /** *

A description of the state.

*/ inline void SetReason(const Aws::String& value) { m_reasonHasBeenSet = true; m_reason = value; } /** *

A description of the state.

*/ inline void SetReason(Aws::String&& value) { m_reasonHasBeenSet = true; m_reason = std::move(value); } /** *

A description of the state.

*/ inline void SetReason(const char* value) { m_reasonHasBeenSet = true; m_reason.assign(value); } /** *

A description of the state.

*/ inline LoadBalancerState& WithReason(const Aws::String& value) { SetReason(value); return *this;} /** *

A description of the state.

*/ inline LoadBalancerState& WithReason(Aws::String&& value) { SetReason(std::move(value)); return *this;} /** *

A description of the state.

*/ inline LoadBalancerState& WithReason(const char* value) { SetReason(value); return *this;} private: LoadBalancerStateEnum m_code; bool m_codeHasBeenSet = false; Aws::String m_reason; bool m_reasonHasBeenSet = false; }; } // namespace Model } // namespace ElasticLoadBalancingv2 } // namespace Aws