AWS SDK for C++  0.14.3
AWS SDK for C++
HealthCheck.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
19 
20 namespace Aws
21 {
22 namespace Utils
23 {
24 namespace Xml
25 {
26  class XmlNode;
27 } // namespace Xml
28 } // namespace Utils
29 namespace ElasticLoadBalancing
30 {
31 namespace Model
32 {
33 
38  {
39  public:
40  HealthCheck();
41  HealthCheck(const Aws::Utils::Xml::XmlNode& xmlNode);
42  HealthCheck& operator=(const Aws::Utils::Xml::XmlNode& xmlNode);
43 
44  void OutputToStream(Aws::OStream& ostream, const char* location, unsigned index, const char* locationValue) const;
45  void OutputToStream(Aws::OStream& oStream, const char* location) const;
46 
61  inline const Aws::String& GetTarget() const{ return m_target; }
62 
77  inline void SetTarget(const Aws::String& value) { m_targetHasBeenSet = true; m_target = value; }
78 
93  inline void SetTarget(Aws::String&& value) { m_targetHasBeenSet = true; m_target = value; }
94 
109  inline void SetTarget(const char* value) { m_targetHasBeenSet = true; m_target.assign(value); }
110 
125  inline HealthCheck& WithTarget(const Aws::String& value) { SetTarget(value); return *this;}
126 
141  inline HealthCheck& WithTarget(Aws::String&& value) { SetTarget(value); return *this;}
142 
157  inline HealthCheck& WithTarget(const char* value) { SetTarget(value); return *this;}
158 
163  inline int GetInterval() const{ return m_interval; }
164 
169  inline void SetInterval(int value) { m_intervalHasBeenSet = true; m_interval = value; }
170 
175  inline HealthCheck& WithInterval(int value) { SetInterval(value); return *this;}
176 
182  inline int GetTimeout() const{ return m_timeout; }
183 
189  inline void SetTimeout(int value) { m_timeoutHasBeenSet = true; m_timeout = value; }
190 
196  inline HealthCheck& WithTimeout(int value) { SetTimeout(value); return *this;}
197 
202  inline int GetUnhealthyThreshold() const{ return m_unhealthyThreshold; }
203 
208  inline void SetUnhealthyThreshold(int value) { m_unhealthyThresholdHasBeenSet = true; m_unhealthyThreshold = value; }
209 
214  inline HealthCheck& WithUnhealthyThreshold(int value) { SetUnhealthyThreshold(value); return *this;}
215 
220  inline int GetHealthyThreshold() const{ return m_healthyThreshold; }
221 
226  inline void SetHealthyThreshold(int value) { m_healthyThresholdHasBeenSet = true; m_healthyThreshold = value; }
227 
232  inline HealthCheck& WithHealthyThreshold(int value) { SetHealthyThreshold(value); return *this;}
233 
234  private:
235  Aws::String m_target;
236  bool m_targetHasBeenSet;
237  int m_interval;
238  bool m_intervalHasBeenSet;
239  int m_timeout;
240  bool m_timeoutHasBeenSet;
241  int m_unhealthyThreshold;
242  bool m_unhealthyThresholdHasBeenSet;
243  int m_healthyThreshold;
244  bool m_healthyThresholdHasBeenSet;
245  };
246 
247 } // namespace Model
248 } // namespace ElasticLoadBalancing
249 } // namespace Aws
HealthCheck & WithHealthyThreshold(int value)
Definition: HealthCheck.h:232
void SetTarget(const Aws::String &value)
Definition: HealthCheck.h:77
const Aws::String & GetTarget() const
Definition: HealthCheck.h:61
std::basic_ostream< char, std::char_traits< char > > OStream
Definition: AWSStreamFwd.h:31
HealthCheck & WithTarget(const Aws::String &value)
Definition: HealthCheck.h:125
HealthCheck & WithTarget(const char *value)
Definition: HealthCheck.h:157
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Definition: AWSString.h:97
HealthCheck & WithUnhealthyThreshold(int value)
Definition: HealthCheck.h:214
#define AWS_ELASTICLOADBALANCING_API
HealthCheck & WithTarget(Aws::String &&value)
Definition: HealthCheck.h:141
JSON (JavaScript Object Notation).