AWS SDK for C++  0.14.3
AWS SDK for C++
TargetGroup.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
22 
23 namespace Aws
24 {
25 namespace Utils
26 {
27 namespace Xml
28 {
29  class XmlNode;
30 } // namespace Xml
31 } // namespace Utils
32 namespace ElasticLoadBalancingv2
33 {
34 namespace Model
35 {
36 
41  {
42  public:
43  TargetGroup();
44  TargetGroup(const Aws::Utils::Xml::XmlNode& xmlNode);
45  TargetGroup& operator=(const Aws::Utils::Xml::XmlNode& xmlNode);
46 
47  void OutputToStream(Aws::OStream& ostream, const char* location, unsigned index, const char* locationValue) const;
48  void OutputToStream(Aws::OStream& oStream, const char* location) const;
49 
53  inline const Aws::String& GetTargetGroupArn() const{ return m_targetGroupArn; }
54 
58  inline void SetTargetGroupArn(const Aws::String& value) { m_targetGroupArnHasBeenSet = true; m_targetGroupArn = value; }
59 
63  inline void SetTargetGroupArn(Aws::String&& value) { m_targetGroupArnHasBeenSet = true; m_targetGroupArn = value; }
64 
68  inline void SetTargetGroupArn(const char* value) { m_targetGroupArnHasBeenSet = true; m_targetGroupArn.assign(value); }
69 
73  inline TargetGroup& WithTargetGroupArn(const Aws::String& value) { SetTargetGroupArn(value); return *this;}
74 
78  inline TargetGroup& WithTargetGroupArn(Aws::String&& value) { SetTargetGroupArn(value); return *this;}
79 
83  inline TargetGroup& WithTargetGroupArn(const char* value) { SetTargetGroupArn(value); return *this;}
84 
88  inline const Aws::String& GetTargetGroupName() const{ return m_targetGroupName; }
89 
93  inline void SetTargetGroupName(const Aws::String& value) { m_targetGroupNameHasBeenSet = true; m_targetGroupName = value; }
94 
98  inline void SetTargetGroupName(Aws::String&& value) { m_targetGroupNameHasBeenSet = true; m_targetGroupName = value; }
99 
103  inline void SetTargetGroupName(const char* value) { m_targetGroupNameHasBeenSet = true; m_targetGroupName.assign(value); }
104 
108  inline TargetGroup& WithTargetGroupName(const Aws::String& value) { SetTargetGroupName(value); return *this;}
109 
113  inline TargetGroup& WithTargetGroupName(Aws::String&& value) { SetTargetGroupName(value); return *this;}
114 
118  inline TargetGroup& WithTargetGroupName(const char* value) { SetTargetGroupName(value); return *this;}
119 
123  inline const ProtocolEnum& GetProtocol() const{ return m_protocol; }
124 
128  inline void SetProtocol(const ProtocolEnum& value) { m_protocolHasBeenSet = true; m_protocol = value; }
129 
133  inline void SetProtocol(ProtocolEnum&& value) { m_protocolHasBeenSet = true; m_protocol = value; }
134 
138  inline TargetGroup& WithProtocol(const ProtocolEnum& value) { SetProtocol(value); return *this;}
139 
143  inline TargetGroup& WithProtocol(ProtocolEnum&& value) { SetProtocol(value); return *this;}
144 
148  inline int GetPort() const{ return m_port; }
149 
153  inline void SetPort(int value) { m_portHasBeenSet = true; m_port = value; }
154 
158  inline TargetGroup& WithPort(int value) { SetPort(value); return *this;}
159 
163  inline const Aws::String& GetVpcId() const{ return m_vpcId; }
164 
168  inline void SetVpcId(const Aws::String& value) { m_vpcIdHasBeenSet = true; m_vpcId = value; }
169 
173  inline void SetVpcId(Aws::String&& value) { m_vpcIdHasBeenSet = true; m_vpcId = value; }
174 
178  inline void SetVpcId(const char* value) { m_vpcIdHasBeenSet = true; m_vpcId.assign(value); }
179 
183  inline TargetGroup& WithVpcId(const Aws::String& value) { SetVpcId(value); return *this;}
184 
188  inline TargetGroup& WithVpcId(Aws::String&& value) { SetVpcId(value); return *this;}
189 
193  inline TargetGroup& WithVpcId(const char* value) { SetVpcId(value); return *this;}
194 
198  inline const ProtocolEnum& GetHealthCheckProtocol() const{ return m_healthCheckProtocol; }
199 
203  inline void SetHealthCheckProtocol(const ProtocolEnum& value) { m_healthCheckProtocolHasBeenSet = true; m_healthCheckProtocol = value; }
204 
208  inline void SetHealthCheckProtocol(ProtocolEnum&& value) { m_healthCheckProtocolHasBeenSet = true; m_healthCheckProtocol = value; }
209 
213  inline TargetGroup& WithHealthCheckProtocol(const ProtocolEnum& value) { SetHealthCheckProtocol(value); return *this;}
214 
218  inline TargetGroup& WithHealthCheckProtocol(ProtocolEnum&& value) { SetHealthCheckProtocol(value); return *this;}
219 
223  inline const Aws::String& GetHealthCheckPort() const{ return m_healthCheckPort; }
224 
228  inline void SetHealthCheckPort(const Aws::String& value) { m_healthCheckPortHasBeenSet = true; m_healthCheckPort = value; }
229 
233  inline void SetHealthCheckPort(Aws::String&& value) { m_healthCheckPortHasBeenSet = true; m_healthCheckPort = value; }
234 
238  inline void SetHealthCheckPort(const char* value) { m_healthCheckPortHasBeenSet = true; m_healthCheckPort.assign(value); }
239 
243  inline TargetGroup& WithHealthCheckPort(const Aws::String& value) { SetHealthCheckPort(value); return *this;}
244 
248  inline TargetGroup& WithHealthCheckPort(Aws::String&& value) { SetHealthCheckPort(value); return *this;}
249 
253  inline TargetGroup& WithHealthCheckPort(const char* value) { SetHealthCheckPort(value); return *this;}
254 
259  inline int GetHealthCheckIntervalSeconds() const{ return m_healthCheckIntervalSeconds; }
260 
265  inline void SetHealthCheckIntervalSeconds(int value) { m_healthCheckIntervalSecondsHasBeenSet = true; m_healthCheckIntervalSeconds = value; }
266 
271  inline TargetGroup& WithHealthCheckIntervalSeconds(int value) { SetHealthCheckIntervalSeconds(value); return *this;}
272 
277  inline int GetHealthCheckTimeoutSeconds() const{ return m_healthCheckTimeoutSeconds; }
278 
283  inline void SetHealthCheckTimeoutSeconds(int value) { m_healthCheckTimeoutSecondsHasBeenSet = true; m_healthCheckTimeoutSeconds = value; }
284 
289  inline TargetGroup& WithHealthCheckTimeoutSeconds(int value) { SetHealthCheckTimeoutSeconds(value); return *this;}
290 
295  inline int GetHealthyThresholdCount() const{ return m_healthyThresholdCount; }
296 
301  inline void SetHealthyThresholdCount(int value) { m_healthyThresholdCountHasBeenSet = true; m_healthyThresholdCount = value; }
302 
307  inline TargetGroup& WithHealthyThresholdCount(int value) { SetHealthyThresholdCount(value); return *this;}
308 
313  inline int GetUnhealthyThresholdCount() const{ return m_unhealthyThresholdCount; }
314 
319  inline void SetUnhealthyThresholdCount(int value) { m_unhealthyThresholdCountHasBeenSet = true; m_unhealthyThresholdCount = value; }
320 
325  inline TargetGroup& WithUnhealthyThresholdCount(int value) { SetUnhealthyThresholdCount(value); return *this;}
326 
330  inline const Aws::String& GetHealthCheckPath() const{ return m_healthCheckPath; }
331 
335  inline void SetHealthCheckPath(const Aws::String& value) { m_healthCheckPathHasBeenSet = true; m_healthCheckPath = value; }
336 
340  inline void SetHealthCheckPath(Aws::String&& value) { m_healthCheckPathHasBeenSet = true; m_healthCheckPath = value; }
341 
345  inline void SetHealthCheckPath(const char* value) { m_healthCheckPathHasBeenSet = true; m_healthCheckPath.assign(value); }
346 
350  inline TargetGroup& WithHealthCheckPath(const Aws::String& value) { SetHealthCheckPath(value); return *this;}
351 
355  inline TargetGroup& WithHealthCheckPath(Aws::String&& value) { SetHealthCheckPath(value); return *this;}
356 
360  inline TargetGroup& WithHealthCheckPath(const char* value) { SetHealthCheckPath(value); return *this;}
361 
366  inline const Matcher& GetMatcher() const{ return m_matcher; }
367 
372  inline void SetMatcher(const Matcher& value) { m_matcherHasBeenSet = true; m_matcher = value; }
373 
378  inline void SetMatcher(Matcher&& value) { m_matcherHasBeenSet = true; m_matcher = value; }
379 
384  inline TargetGroup& WithMatcher(const Matcher& value) { SetMatcher(value); return *this;}
385 
390  inline TargetGroup& WithMatcher(Matcher&& value) { SetMatcher(value); return *this;}
391 
396  inline const Aws::Vector<Aws::String>& GetLoadBalancerArns() const{ return m_loadBalancerArns; }
397 
402  inline void SetLoadBalancerArns(const Aws::Vector<Aws::String>& value) { m_loadBalancerArnsHasBeenSet = true; m_loadBalancerArns = value; }
403 
408  inline void SetLoadBalancerArns(Aws::Vector<Aws::String>&& value) { m_loadBalancerArnsHasBeenSet = true; m_loadBalancerArns = value; }
409 
414  inline TargetGroup& WithLoadBalancerArns(const Aws::Vector<Aws::String>& value) { SetLoadBalancerArns(value); return *this;}
415 
420  inline TargetGroup& WithLoadBalancerArns(Aws::Vector<Aws::String>&& value) { SetLoadBalancerArns(value); return *this;}
421 
426  inline TargetGroup& AddLoadBalancerArns(const Aws::String& value) { m_loadBalancerArnsHasBeenSet = true; m_loadBalancerArns.push_back(value); return *this; }
427 
432  inline TargetGroup& AddLoadBalancerArns(Aws::String&& value) { m_loadBalancerArnsHasBeenSet = true; m_loadBalancerArns.push_back(value); return *this; }
433 
438  inline TargetGroup& AddLoadBalancerArns(const char* value) { m_loadBalancerArnsHasBeenSet = true; m_loadBalancerArns.push_back(value); return *this; }
439 
440  private:
441  Aws::String m_targetGroupArn;
442  bool m_targetGroupArnHasBeenSet;
443  Aws::String m_targetGroupName;
444  bool m_targetGroupNameHasBeenSet;
445  ProtocolEnum m_protocol;
446  bool m_protocolHasBeenSet;
447  int m_port;
448  bool m_portHasBeenSet;
449  Aws::String m_vpcId;
450  bool m_vpcIdHasBeenSet;
451  ProtocolEnum m_healthCheckProtocol;
452  bool m_healthCheckProtocolHasBeenSet;
453  Aws::String m_healthCheckPort;
454  bool m_healthCheckPortHasBeenSet;
455  int m_healthCheckIntervalSeconds;
456  bool m_healthCheckIntervalSecondsHasBeenSet;
457  int m_healthCheckTimeoutSeconds;
458  bool m_healthCheckTimeoutSecondsHasBeenSet;
459  int m_healthyThresholdCount;
460  bool m_healthyThresholdCountHasBeenSet;
461  int m_unhealthyThresholdCount;
462  bool m_unhealthyThresholdCountHasBeenSet;
463  Aws::String m_healthCheckPath;
464  bool m_healthCheckPathHasBeenSet;
465  Matcher m_matcher;
466  bool m_matcherHasBeenSet;
467  Aws::Vector<Aws::String> m_loadBalancerArns;
468  bool m_loadBalancerArnsHasBeenSet;
469  };
470 
471 } // namespace Model
472 } // namespace ElasticLoadBalancingv2
473 } // namespace Aws
const Aws::String & GetTargetGroupName() const
Definition: TargetGroup.h:88
TargetGroup & WithVpcId(const Aws::String &value)
Definition: TargetGroup.h:183
TargetGroup & WithHealthCheckPath(Aws::String &&value)
Definition: TargetGroup.h:355
void SetTargetGroupArn(const Aws::String &value)
Definition: TargetGroup.h:58
void SetHealthCheckPort(const Aws::String &value)
Definition: TargetGroup.h:228
TargetGroup & AddLoadBalancerArns(const char *value)
Definition: TargetGroup.h:438
void SetLoadBalancerArns(const Aws::Vector< Aws::String > &value)
Definition: TargetGroup.h:402
TargetGroup & WithTargetGroupArn(Aws::String &&value)
Definition: TargetGroup.h:78
const Aws::Vector< Aws::String > & GetLoadBalancerArns() const
Definition: TargetGroup.h:396
TargetGroup & WithMatcher(const Matcher &value)
Definition: TargetGroup.h:384
void SetTargetGroupArn(Aws::String &&value)
Definition: TargetGroup.h:63
TargetGroup & WithHealthCheckPort(Aws::String &&value)
Definition: TargetGroup.h:248
const Aws::String & GetHealthCheckPath() const
Definition: TargetGroup.h:330
const ProtocolEnum & GetProtocol() const
Definition: TargetGroup.h:123
TargetGroup & WithTargetGroupName(Aws::String &&value)
Definition: TargetGroup.h:113
TargetGroup & WithVpcId(const char *value)
Definition: TargetGroup.h:193
std::vector< T, Aws::Allocator< T > > Vector
Definition: AWSVector.h:27
TargetGroup & WithHealthyThresholdCount(int value)
Definition: TargetGroup.h:307
TargetGroup & WithHealthCheckIntervalSeconds(int value)
Definition: TargetGroup.h:271
void SetTargetGroupName(Aws::String &&value)
Definition: TargetGroup.h:98
TargetGroup & WithProtocol(ProtocolEnum &&value)
Definition: TargetGroup.h:143
TargetGroup & WithHealthCheckPort(const char *value)
Definition: TargetGroup.h:253
TargetGroup & WithHealthCheckPort(const Aws::String &value)
Definition: TargetGroup.h:243
TargetGroup & WithProtocol(const ProtocolEnum &value)
Definition: TargetGroup.h:138
TargetGroup & WithTargetGroupName(const Aws::String &value)
Definition: TargetGroup.h:108
TargetGroup & WithHealthCheckTimeoutSeconds(int value)
Definition: TargetGroup.h:289
TargetGroup & AddLoadBalancerArns(const Aws::String &value)
Definition: TargetGroup.h:426
TargetGroup & WithLoadBalancerArns(const Aws::Vector< Aws::String > &value)
Definition: TargetGroup.h:414
TargetGroup & AddLoadBalancerArns(Aws::String &&value)
Definition: TargetGroup.h:432
TargetGroup & WithHealthCheckProtocol(ProtocolEnum &&value)
Definition: TargetGroup.h:218
void SetHealthCheckPath(Aws::String &&value)
Definition: TargetGroup.h:340
std::basic_ostream< char, std::char_traits< char > > OStream
Definition: AWSStreamFwd.h:31
void SetHealthCheckProtocol(const ProtocolEnum &value)
Definition: TargetGroup.h:203
TargetGroup & WithLoadBalancerArns(Aws::Vector< Aws::String > &&value)
Definition: TargetGroup.h:420
const ProtocolEnum & GetHealthCheckProtocol() const
Definition: TargetGroup.h:198
void SetHealthCheckPort(Aws::String &&value)
Definition: TargetGroup.h:233
void SetLoadBalancerArns(Aws::Vector< Aws::String > &&value)
Definition: TargetGroup.h:408
void SetTargetGroupName(const Aws::String &value)
Definition: TargetGroup.h:93
TargetGroup & WithMatcher(Matcher &&value)
Definition: TargetGroup.h:390
TargetGroup & WithTargetGroupArn(const Aws::String &value)
Definition: TargetGroup.h:73
const Aws::String & GetTargetGroupArn() const
Definition: TargetGroup.h:53
TargetGroup & WithHealthCheckPath(const char *value)
Definition: TargetGroup.h:360
const Aws::String & GetHealthCheckPort() const
Definition: TargetGroup.h:223
TargetGroup & WithHealthCheckPath(const Aws::String &value)
Definition: TargetGroup.h:350
void SetHealthCheckPath(const Aws::String &value)
Definition: TargetGroup.h:335
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Definition: AWSString.h:97
TargetGroup & WithTargetGroupName(const char *value)
Definition: TargetGroup.h:118
TargetGroup & WithHealthCheckProtocol(const ProtocolEnum &value)
Definition: TargetGroup.h:213
TargetGroup & WithUnhealthyThresholdCount(int value)
Definition: TargetGroup.h:325
TargetGroup & WithVpcId(Aws::String &&value)
Definition: TargetGroup.h:188
#define AWS_ELASTICLOADBALANCINGV2_API
void SetVpcId(const Aws::String &value)
Definition: TargetGroup.h:168
TargetGroup & WithTargetGroupArn(const char *value)
Definition: TargetGroup.h:83
void SetHealthCheckProtocol(ProtocolEnum &&value)
Definition: TargetGroup.h:208
void SetProtocol(const ProtocolEnum &value)
Definition: TargetGroup.h:128
JSON (JavaScript Object Notation).