AWS SDK for C++  0.14.3
AWS SDK for C++
TargetHealth.h
Go to the documentation of this file.
1 /*
2 * Copyright 2010-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License").
5 * You may not use this file except in compliance with the License.
6 * A copy of the License is located at
7 *
8 * http://aws.amazon.com/apache2.0
9 *
10 * or in the "license" file accompanying this file. This file is distributed
11 * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
12 * express or implied. See the License for the specific language governing
13 * permissions and limitations under the License.
14 */
15 #pragma once
21 
22 namespace Aws
23 {
24 namespace Utils
25 {
26 namespace Xml
27 {
28  class XmlNode;
29 } // namespace Xml
30 } // namespace Utils
31 namespace ElasticLoadBalancingv2
32 {
33 namespace Model
34 {
35 
40  {
41  public:
42  TargetHealth();
43  TargetHealth(const Aws::Utils::Xml::XmlNode& xmlNode);
44  TargetHealth& operator=(const Aws::Utils::Xml::XmlNode& xmlNode);
45 
46  void OutputToStream(Aws::OStream& ostream, const char* location, unsigned index, const char* locationValue) const;
47  void OutputToStream(Aws::OStream& oStream, const char* location) const;
48 
52  inline const TargetHealthStateEnum& GetState() const{ return m_state; }
53 
57  inline void SetState(const TargetHealthStateEnum& value) { m_stateHasBeenSet = true; m_state = value; }
58 
62  inline void SetState(TargetHealthStateEnum&& value) { m_stateHasBeenSet = true; m_state = value; }
63 
67  inline TargetHealth& WithState(const TargetHealthStateEnum& value) { SetState(value); return *this;}
68 
72  inline TargetHealth& WithState(TargetHealthStateEnum&& value) { SetState(value); return *this;}
73 
104  inline const TargetHealthReasonEnum& GetReason() const{ return m_reason; }
105 
136  inline void SetReason(const TargetHealthReasonEnum& value) { m_reasonHasBeenSet = true; m_reason = value; }
137 
168  inline void SetReason(TargetHealthReasonEnum&& value) { m_reasonHasBeenSet = true; m_reason = value; }
169 
200  inline TargetHealth& WithReason(const TargetHealthReasonEnum& value) { SetReason(value); return *this;}
201 
232  inline TargetHealth& WithReason(TargetHealthReasonEnum&& value) { SetReason(value); return *this;}
233 
238  inline const Aws::String& GetDescription() const{ return m_description; }
239 
244  inline void SetDescription(const Aws::String& value) { m_descriptionHasBeenSet = true; m_description = value; }
245 
250  inline void SetDescription(Aws::String&& value) { m_descriptionHasBeenSet = true; m_description = value; }
251 
256  inline void SetDescription(const char* value) { m_descriptionHasBeenSet = true; m_description.assign(value); }
257 
262  inline TargetHealth& WithDescription(const Aws::String& value) { SetDescription(value); return *this;}
263 
268  inline TargetHealth& WithDescription(Aws::String&& value) { SetDescription(value); return *this;}
269 
274  inline TargetHealth& WithDescription(const char* value) { SetDescription(value); return *this;}
275 
276  private:
277  TargetHealthStateEnum m_state;
278  bool m_stateHasBeenSet;
279  TargetHealthReasonEnum m_reason;
280  bool m_reasonHasBeenSet;
281  Aws::String m_description;
282  bool m_descriptionHasBeenSet;
283  };
284 
285 } // namespace Model
286 } // namespace ElasticLoadBalancingv2
287 } // namespace Aws
TargetHealth & WithDescription(Aws::String &&value)
Definition: TargetHealth.h:268
TargetHealth & WithReason(TargetHealthReasonEnum &&value)
Definition: TargetHealth.h:232
void SetReason(const TargetHealthReasonEnum &value)
Definition: TargetHealth.h:136
void SetDescription(const Aws::String &value)
Definition: TargetHealth.h:244
TargetHealth & WithReason(const TargetHealthReasonEnum &value)
Definition: TargetHealth.h:200
const TargetHealthStateEnum & GetState() const
Definition: TargetHealth.h:52
TargetHealth & WithState(TargetHealthStateEnum &&value)
Definition: TargetHealth.h:72
void SetState(const TargetHealthStateEnum &value)
Definition: TargetHealth.h:57
std::basic_ostream< char, std::char_traits< char > > OStream
Definition: AWSStreamFwd.h:31
TargetHealth & WithDescription(const char *value)
Definition: TargetHealth.h:274
TargetHealth & WithState(const TargetHealthStateEnum &value)
Definition: TargetHealth.h:67
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Definition: AWSString.h:97
const Aws::String & GetDescription() const
Definition: TargetHealth.h:238
const TargetHealthReasonEnum & GetReason() const
Definition: TargetHealth.h:104
#define AWS_ELASTICLOADBALANCINGV2_API
TargetHealth & WithDescription(const Aws::String &value)
Definition: TargetHealth.h:262
void SetState(TargetHealthStateEnum &&value)
Definition: TargetHealth.h:62
void SetReason(TargetHealthReasonEnum &&value)
Definition: TargetHealth.h:168
JSON (JavaScript Object Notation).