1 /**
2  * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3  * SPDX-License-Identifier: Apache-2.0.
4  */
5 
6 #pragma once
7 #include <aws/autoscaling/AutoScaling_EXPORTS.h>
8 #include <aws/core/utils/memory/stl/AWSStreamFwd.h>
9 #include <aws/core/utils/memory/stl/AWSString.h>
10 #include <utility>
11 
12 namespace Aws
13 {
14 namespace Utils
15 {
16 namespace Xml
17 {
18   class XmlNode;
19 } // namespace Xml
20 } // namespace Utils
21 namespace AutoScaling
22 {
23 namespace Model
24 {
25 
26   /**
27    * <p>Describes the state of a target group.</p><p><h3>See Also:</h3>   <a
28    * href="http://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/LoadBalancerTargetGroupState">AWS
29    * API Reference</a></p>
30    */
31   class AWS_AUTOSCALING_API LoadBalancerTargetGroupState
32   {
33   public:
34     LoadBalancerTargetGroupState();
35     LoadBalancerTargetGroupState(const Aws::Utils::Xml::XmlNode& xmlNode);
36     LoadBalancerTargetGroupState& operator=(const Aws::Utils::Xml::XmlNode& xmlNode);
37 
38     void OutputToStream(Aws::OStream& ostream, const char* location, unsigned index, const char* locationValue) const;
39     void OutputToStream(Aws::OStream& oStream, const char* location) const;
40 
41 
42     /**
43      * <p>The Amazon Resource Name (ARN) of the target group.</p>
44      */
GetLoadBalancerTargetGroupARN()45     inline const Aws::String& GetLoadBalancerTargetGroupARN() const{ return m_loadBalancerTargetGroupARN; }
46 
47     /**
48      * <p>The Amazon Resource Name (ARN) of the target group.</p>
49      */
LoadBalancerTargetGroupARNHasBeenSet()50     inline bool LoadBalancerTargetGroupARNHasBeenSet() const { return m_loadBalancerTargetGroupARNHasBeenSet; }
51 
52     /**
53      * <p>The Amazon Resource Name (ARN) of the target group.</p>
54      */
SetLoadBalancerTargetGroupARN(const Aws::String & value)55     inline void SetLoadBalancerTargetGroupARN(const Aws::String& value) { m_loadBalancerTargetGroupARNHasBeenSet = true; m_loadBalancerTargetGroupARN = value; }
56 
57     /**
58      * <p>The Amazon Resource Name (ARN) of the target group.</p>
59      */
SetLoadBalancerTargetGroupARN(Aws::String && value)60     inline void SetLoadBalancerTargetGroupARN(Aws::String&& value) { m_loadBalancerTargetGroupARNHasBeenSet = true; m_loadBalancerTargetGroupARN = std::move(value); }
61 
62     /**
63      * <p>The Amazon Resource Name (ARN) of the target group.</p>
64      */
SetLoadBalancerTargetGroupARN(const char * value)65     inline void SetLoadBalancerTargetGroupARN(const char* value) { m_loadBalancerTargetGroupARNHasBeenSet = true; m_loadBalancerTargetGroupARN.assign(value); }
66 
67     /**
68      * <p>The Amazon Resource Name (ARN) of the target group.</p>
69      */
WithLoadBalancerTargetGroupARN(const Aws::String & value)70     inline LoadBalancerTargetGroupState& WithLoadBalancerTargetGroupARN(const Aws::String& value) { SetLoadBalancerTargetGroupARN(value); return *this;}
71 
72     /**
73      * <p>The Amazon Resource Name (ARN) of the target group.</p>
74      */
WithLoadBalancerTargetGroupARN(Aws::String && value)75     inline LoadBalancerTargetGroupState& WithLoadBalancerTargetGroupARN(Aws::String&& value) { SetLoadBalancerTargetGroupARN(std::move(value)); return *this;}
76 
77     /**
78      * <p>The Amazon Resource Name (ARN) of the target group.</p>
79      */
WithLoadBalancerTargetGroupARN(const char * value)80     inline LoadBalancerTargetGroupState& WithLoadBalancerTargetGroupARN(const char* value) { SetLoadBalancerTargetGroupARN(value); return *this;}
81 
82 
83     /**
84      * <p>The state of the target group.</p> <ul> <li> <p> <code>Adding</code> - The
85      * Auto Scaling instances are being registered with the target group.</p> </li>
86      * <li> <p> <code>Added</code> - All Auto Scaling instances are registered with the
87      * target group.</p> </li> <li> <p> <code>InService</code> - At least one Auto
88      * Scaling instance passed an <code>ELB</code> health check.</p> </li> <li> <p>
89      * <code>Removing</code> - The Auto Scaling instances are being deregistered from
90      * the target group. If connection draining is enabled, Elastic Load Balancing
91      * waits for in-flight requests to complete before deregistering the instances.</p>
92      * </li> <li> <p> <code>Removed</code> - All Auto Scaling instances are
93      * deregistered from the target group.</p> </li> </ul>
94      */
GetState()95     inline const Aws::String& GetState() const{ return m_state; }
96 
97     /**
98      * <p>The state of the target group.</p> <ul> <li> <p> <code>Adding</code> - The
99      * Auto Scaling instances are being registered with the target group.</p> </li>
100      * <li> <p> <code>Added</code> - All Auto Scaling instances are registered with the
101      * target group.</p> </li> <li> <p> <code>InService</code> - At least one Auto
102      * Scaling instance passed an <code>ELB</code> health check.</p> </li> <li> <p>
103      * <code>Removing</code> - The Auto Scaling instances are being deregistered from
104      * the target group. If connection draining is enabled, Elastic Load Balancing
105      * waits for in-flight requests to complete before deregistering the instances.</p>
106      * </li> <li> <p> <code>Removed</code> - All Auto Scaling instances are
107      * deregistered from the target group.</p> </li> </ul>
108      */
StateHasBeenSet()109     inline bool StateHasBeenSet() const { return m_stateHasBeenSet; }
110 
111     /**
112      * <p>The state of the target group.</p> <ul> <li> <p> <code>Adding</code> - The
113      * Auto Scaling instances are being registered with the target group.</p> </li>
114      * <li> <p> <code>Added</code> - All Auto Scaling instances are registered with the
115      * target group.</p> </li> <li> <p> <code>InService</code> - At least one Auto
116      * Scaling instance passed an <code>ELB</code> health check.</p> </li> <li> <p>
117      * <code>Removing</code> - The Auto Scaling instances are being deregistered from
118      * the target group. If connection draining is enabled, Elastic Load Balancing
119      * waits for in-flight requests to complete before deregistering the instances.</p>
120      * </li> <li> <p> <code>Removed</code> - All Auto Scaling instances are
121      * deregistered from the target group.</p> </li> </ul>
122      */
SetState(const Aws::String & value)123     inline void SetState(const Aws::String& value) { m_stateHasBeenSet = true; m_state = value; }
124 
125     /**
126      * <p>The state of the target group.</p> <ul> <li> <p> <code>Adding</code> - The
127      * Auto Scaling instances are being registered with the target group.</p> </li>
128      * <li> <p> <code>Added</code> - All Auto Scaling instances are registered with the
129      * target group.</p> </li> <li> <p> <code>InService</code> - At least one Auto
130      * Scaling instance passed an <code>ELB</code> health check.</p> </li> <li> <p>
131      * <code>Removing</code> - The Auto Scaling instances are being deregistered from
132      * the target group. If connection draining is enabled, Elastic Load Balancing
133      * waits for in-flight requests to complete before deregistering the instances.</p>
134      * </li> <li> <p> <code>Removed</code> - All Auto Scaling instances are
135      * deregistered from the target group.</p> </li> </ul>
136      */
SetState(Aws::String && value)137     inline void SetState(Aws::String&& value) { m_stateHasBeenSet = true; m_state = std::move(value); }
138 
139     /**
140      * <p>The state of the target group.</p> <ul> <li> <p> <code>Adding</code> - The
141      * Auto Scaling instances are being registered with the target group.</p> </li>
142      * <li> <p> <code>Added</code> - All Auto Scaling instances are registered with the
143      * target group.</p> </li> <li> <p> <code>InService</code> - At least one Auto
144      * Scaling instance passed an <code>ELB</code> health check.</p> </li> <li> <p>
145      * <code>Removing</code> - The Auto Scaling instances are being deregistered from
146      * the target group. If connection draining is enabled, Elastic Load Balancing
147      * waits for in-flight requests to complete before deregistering the instances.</p>
148      * </li> <li> <p> <code>Removed</code> - All Auto Scaling instances are
149      * deregistered from the target group.</p> </li> </ul>
150      */
SetState(const char * value)151     inline void SetState(const char* value) { m_stateHasBeenSet = true; m_state.assign(value); }
152 
153     /**
154      * <p>The state of the target group.</p> <ul> <li> <p> <code>Adding</code> - The
155      * Auto Scaling instances are being registered with the target group.</p> </li>
156      * <li> <p> <code>Added</code> - All Auto Scaling instances are registered with the
157      * target group.</p> </li> <li> <p> <code>InService</code> - At least one Auto
158      * Scaling instance passed an <code>ELB</code> health check.</p> </li> <li> <p>
159      * <code>Removing</code> - The Auto Scaling instances are being deregistered from
160      * the target group. If connection draining is enabled, Elastic Load Balancing
161      * waits for in-flight requests to complete before deregistering the instances.</p>
162      * </li> <li> <p> <code>Removed</code> - All Auto Scaling instances are
163      * deregistered from the target group.</p> </li> </ul>
164      */
WithState(const Aws::String & value)165     inline LoadBalancerTargetGroupState& WithState(const Aws::String& value) { SetState(value); return *this;}
166 
167     /**
168      * <p>The state of the target group.</p> <ul> <li> <p> <code>Adding</code> - The
169      * Auto Scaling instances are being registered with the target group.</p> </li>
170      * <li> <p> <code>Added</code> - All Auto Scaling instances are registered with the
171      * target group.</p> </li> <li> <p> <code>InService</code> - At least one Auto
172      * Scaling instance passed an <code>ELB</code> health check.</p> </li> <li> <p>
173      * <code>Removing</code> - The Auto Scaling instances are being deregistered from
174      * the target group. If connection draining is enabled, Elastic Load Balancing
175      * waits for in-flight requests to complete before deregistering the instances.</p>
176      * </li> <li> <p> <code>Removed</code> - All Auto Scaling instances are
177      * deregistered from the target group.</p> </li> </ul>
178      */
WithState(Aws::String && value)179     inline LoadBalancerTargetGroupState& WithState(Aws::String&& value) { SetState(std::move(value)); return *this;}
180 
181     /**
182      * <p>The state of the target group.</p> <ul> <li> <p> <code>Adding</code> - The
183      * Auto Scaling instances are being registered with the target group.</p> </li>
184      * <li> <p> <code>Added</code> - All Auto Scaling instances are registered with the
185      * target group.</p> </li> <li> <p> <code>InService</code> - At least one Auto
186      * Scaling instance passed an <code>ELB</code> health check.</p> </li> <li> <p>
187      * <code>Removing</code> - The Auto Scaling instances are being deregistered from
188      * the target group. If connection draining is enabled, Elastic Load Balancing
189      * waits for in-flight requests to complete before deregistering the instances.</p>
190      * </li> <li> <p> <code>Removed</code> - All Auto Scaling instances are
191      * deregistered from the target group.</p> </li> </ul>
192      */
WithState(const char * value)193     inline LoadBalancerTargetGroupState& WithState(const char* value) { SetState(value); return *this;}
194 
195   private:
196 
197     Aws::String m_loadBalancerTargetGroupARN;
198     bool m_loadBalancerTargetGroupARNHasBeenSet;
199 
200     Aws::String m_state;
201     bool m_stateHasBeenSet;
202   };
203 
204 } // namespace Model
205 } // namespace AutoScaling
206 } // namespace Aws
207