AWS SDK for C++

AWS SDK for C++ Version 1.11.719

Loading...
Searching...
No Matches
TargetGroup.h
1
6#pragma once
7#include <aws/core/utils/memory/stl/AWSStreamFwd.h>
8#include <aws/core/utils/memory/stl/AWSString.h>
9#include <aws/core/utils/memory/stl/AWSVector.h>
10#include <aws/elasticloadbalancingv2/ElasticLoadBalancingv2_EXPORTS.h>
11#include <aws/elasticloadbalancingv2/model/Matcher.h>
12#include <aws/elasticloadbalancingv2/model/ProtocolEnum.h>
13#include <aws/elasticloadbalancingv2/model/TargetGroupIpAddressTypeEnum.h>
14#include <aws/elasticloadbalancingv2/model/TargetTypeEnum.h>
15
16#include <utility>
17
18namespace Aws {
19namespace Utils {
20namespace Xml {
21class XmlNode;
22} // namespace Xml
23} // namespace Utils
24namespace ElasticLoadBalancingv2 {
25namespace Model {
26
33 public:
34 AWS_ELASTICLOADBALANCINGV2_API TargetGroup() = default;
35 AWS_ELASTICLOADBALANCINGV2_API TargetGroup(const Aws::Utils::Xml::XmlNode& xmlNode);
36 AWS_ELASTICLOADBALANCINGV2_API TargetGroup& operator=(const Aws::Utils::Xml::XmlNode& xmlNode);
37
38 AWS_ELASTICLOADBALANCINGV2_API void OutputToStream(Aws::OStream& ostream, const char* location, unsigned index,
39 const char* locationValue) const;
40 AWS_ELASTICLOADBALANCINGV2_API void OutputToStream(Aws::OStream& oStream, const char* location) const;
41
43
46 inline const Aws::String& GetTargetGroupArn() const { return m_targetGroupArn; }
47 inline bool TargetGroupArnHasBeenSet() const { return m_targetGroupArnHasBeenSet; }
48 template <typename TargetGroupArnT = Aws::String>
49 void SetTargetGroupArn(TargetGroupArnT&& value) {
50 m_targetGroupArnHasBeenSet = true;
51 m_targetGroupArn = std::forward<TargetGroupArnT>(value);
52 }
53 template <typename TargetGroupArnT = Aws::String>
54 TargetGroup& WithTargetGroupArn(TargetGroupArnT&& value) {
55 SetTargetGroupArn(std::forward<TargetGroupArnT>(value));
56 return *this;
57 }
59
61
64 inline const Aws::String& GetTargetGroupName() const { return m_targetGroupName; }
65 inline bool TargetGroupNameHasBeenSet() const { return m_targetGroupNameHasBeenSet; }
66 template <typename TargetGroupNameT = Aws::String>
67 void SetTargetGroupName(TargetGroupNameT&& value) {
68 m_targetGroupNameHasBeenSet = true;
69 m_targetGroupName = std::forward<TargetGroupNameT>(value);
70 }
71 template <typename TargetGroupNameT = Aws::String>
72 TargetGroup& WithTargetGroupName(TargetGroupNameT&& value) {
73 SetTargetGroupName(std::forward<TargetGroupNameT>(value));
74 return *this;
75 }
77
79
82 inline ProtocolEnum GetProtocol() const { return m_protocol; }
83 inline bool ProtocolHasBeenSet() const { return m_protocolHasBeenSet; }
84 inline void SetProtocol(ProtocolEnum value) {
85 m_protocolHasBeenSet = true;
86 m_protocol = value;
87 }
89 SetProtocol(value);
90 return *this;
91 }
93
95
99 inline int GetPort() const { return m_port; }
100 inline bool PortHasBeenSet() const { return m_portHasBeenSet; }
101 inline void SetPort(int value) {
102 m_portHasBeenSet = true;
103 m_port = value;
104 }
105 inline TargetGroup& WithPort(int value) {
106 SetPort(value);
107 return *this;
108 }
110
112
115 inline const Aws::String& GetVpcId() const { return m_vpcId; }
116 inline bool VpcIdHasBeenSet() const { return m_vpcIdHasBeenSet; }
117 template <typename VpcIdT = Aws::String>
118 void SetVpcId(VpcIdT&& value) {
119 m_vpcIdHasBeenSet = true;
120 m_vpcId = std::forward<VpcIdT>(value);
121 }
122 template <typename VpcIdT = Aws::String>
123 TargetGroup& WithVpcId(VpcIdT&& value) {
124 SetVpcId(std::forward<VpcIdT>(value));
125 return *this;
126 }
128
130
134 inline ProtocolEnum GetHealthCheckProtocol() const { return m_healthCheckProtocol; }
135 inline bool HealthCheckProtocolHasBeenSet() const { return m_healthCheckProtocolHasBeenSet; }
137 m_healthCheckProtocolHasBeenSet = true;
138 m_healthCheckProtocol = value;
139 }
142 return *this;
143 }
145
147
150 inline const Aws::String& GetHealthCheckPort() const { return m_healthCheckPort; }
151 inline bool HealthCheckPortHasBeenSet() const { return m_healthCheckPortHasBeenSet; }
152 template <typename HealthCheckPortT = Aws::String>
153 void SetHealthCheckPort(HealthCheckPortT&& value) {
154 m_healthCheckPortHasBeenSet = true;
155 m_healthCheckPort = std::forward<HealthCheckPortT>(value);
156 }
157 template <typename HealthCheckPortT = Aws::String>
158 TargetGroup& WithHealthCheckPort(HealthCheckPortT&& value) {
159 SetHealthCheckPort(std::forward<HealthCheckPortT>(value));
160 return *this;
161 }
163
165
168 inline bool GetHealthCheckEnabled() const { return m_healthCheckEnabled; }
169 inline bool HealthCheckEnabledHasBeenSet() const { return m_healthCheckEnabledHasBeenSet; }
170 inline void SetHealthCheckEnabled(bool value) {
171 m_healthCheckEnabledHasBeenSet = true;
172 m_healthCheckEnabled = value;
173 }
176 return *this;
177 }
179
181
185 inline int GetHealthCheckIntervalSeconds() const { return m_healthCheckIntervalSeconds; }
186 inline bool HealthCheckIntervalSecondsHasBeenSet() const { return m_healthCheckIntervalSecondsHasBeenSet; }
187 inline void SetHealthCheckIntervalSeconds(int value) {
188 m_healthCheckIntervalSecondsHasBeenSet = true;
189 m_healthCheckIntervalSeconds = value;
190 }
193 return *this;
194 }
196
198
202 inline int GetHealthCheckTimeoutSeconds() const { return m_healthCheckTimeoutSeconds; }
203 inline bool HealthCheckTimeoutSecondsHasBeenSet() const { return m_healthCheckTimeoutSecondsHasBeenSet; }
204 inline void SetHealthCheckTimeoutSeconds(int value) {
205 m_healthCheckTimeoutSecondsHasBeenSet = true;
206 m_healthCheckTimeoutSeconds = value;
207 }
210 return *this;
211 }
213
215
219 inline int GetHealthyThresholdCount() const { return m_healthyThresholdCount; }
220 inline bool HealthyThresholdCountHasBeenSet() const { return m_healthyThresholdCountHasBeenSet; }
221 inline void SetHealthyThresholdCount(int value) {
222 m_healthyThresholdCountHasBeenSet = true;
223 m_healthyThresholdCount = value;
224 }
227 return *this;
228 }
230
232
236 inline int GetUnhealthyThresholdCount() const { return m_unhealthyThresholdCount; }
237 inline bool UnhealthyThresholdCountHasBeenSet() const { return m_unhealthyThresholdCountHasBeenSet; }
238 inline void SetUnhealthyThresholdCount(int value) {
239 m_unhealthyThresholdCountHasBeenSet = true;
240 m_unhealthyThresholdCount = value;
241 }
244 return *this;
245 }
247
249
252 inline const Aws::String& GetHealthCheckPath() const { return m_healthCheckPath; }
253 inline bool HealthCheckPathHasBeenSet() const { return m_healthCheckPathHasBeenSet; }
254 template <typename HealthCheckPathT = Aws::String>
255 void SetHealthCheckPath(HealthCheckPathT&& value) {
256 m_healthCheckPathHasBeenSet = true;
257 m_healthCheckPath = std::forward<HealthCheckPathT>(value);
258 }
259 template <typename HealthCheckPathT = Aws::String>
260 TargetGroup& WithHealthCheckPath(HealthCheckPathT&& value) {
261 SetHealthCheckPath(std::forward<HealthCheckPathT>(value));
262 return *this;
263 }
265
267
271 inline const Matcher& GetMatcher() const { return m_matcher; }
272 inline bool MatcherHasBeenSet() const { return m_matcherHasBeenSet; }
273 template <typename MatcherT = Matcher>
274 void SetMatcher(MatcherT&& value) {
275 m_matcherHasBeenSet = true;
276 m_matcher = std::forward<MatcherT>(value);
277 }
278 template <typename MatcherT = Matcher>
279 TargetGroup& WithMatcher(MatcherT&& value) {
280 SetMatcher(std::forward<MatcherT>(value));
281 return *this;
282 }
284
286
291 inline const Aws::Vector<Aws::String>& GetLoadBalancerArns() const { return m_loadBalancerArns; }
292 inline bool LoadBalancerArnsHasBeenSet() const { return m_loadBalancerArnsHasBeenSet; }
293 template <typename LoadBalancerArnsT = Aws::Vector<Aws::String>>
294 void SetLoadBalancerArns(LoadBalancerArnsT&& value) {
295 m_loadBalancerArnsHasBeenSet = true;
296 m_loadBalancerArns = std::forward<LoadBalancerArnsT>(value);
297 }
298 template <typename LoadBalancerArnsT = Aws::Vector<Aws::String>>
299 TargetGroup& WithLoadBalancerArns(LoadBalancerArnsT&& value) {
300 SetLoadBalancerArns(std::forward<LoadBalancerArnsT>(value));
301 return *this;
302 }
303 template <typename LoadBalancerArnsT = Aws::String>
304 TargetGroup& AddLoadBalancerArns(LoadBalancerArnsT&& value) {
305 m_loadBalancerArnsHasBeenSet = true;
306 m_loadBalancerArns.emplace_back(std::forward<LoadBalancerArnsT>(value));
307 return *this;
308 }
310
312
319 inline TargetTypeEnum GetTargetType() const { return m_targetType; }
320 inline bool TargetTypeHasBeenSet() const { return m_targetTypeHasBeenSet; }
321 inline void SetTargetType(TargetTypeEnum value) {
322 m_targetTypeHasBeenSet = true;
323 m_targetType = value;
324 }
326 SetTargetType(value);
327 return *this;
328 }
330
332
336 inline const Aws::String& GetProtocolVersion() const { return m_protocolVersion; }
337 inline bool ProtocolVersionHasBeenSet() const { return m_protocolVersionHasBeenSet; }
338 template <typename ProtocolVersionT = Aws::String>
339 void SetProtocolVersion(ProtocolVersionT&& value) {
340 m_protocolVersionHasBeenSet = true;
341 m_protocolVersion = std::forward<ProtocolVersionT>(value);
342 }
343 template <typename ProtocolVersionT = Aws::String>
344 TargetGroup& WithProtocolVersion(ProtocolVersionT&& value) {
345 SetProtocolVersion(std::forward<ProtocolVersionT>(value));
346 return *this;
347 }
349
351
354 inline TargetGroupIpAddressTypeEnum GetIpAddressType() const { return m_ipAddressType; }
355 inline bool IpAddressTypeHasBeenSet() const { return m_ipAddressTypeHasBeenSet; }
357 m_ipAddressTypeHasBeenSet = true;
358 m_ipAddressType = value;
359 }
361 SetIpAddressType(value);
362 return *this;
363 }
365
367
371 inline int GetTargetControlPort() const { return m_targetControlPort; }
372 inline bool TargetControlPortHasBeenSet() const { return m_targetControlPortHasBeenSet; }
373 inline void SetTargetControlPort(int value) {
374 m_targetControlPortHasBeenSet = true;
375 m_targetControlPort = value;
376 }
379 return *this;
380 }
382 private:
383 Aws::String m_targetGroupArn;
384
385 Aws::String m_targetGroupName;
386
388
389 int m_port{0};
390
391 Aws::String m_vpcId;
392
393 ProtocolEnum m_healthCheckProtocol{ProtocolEnum::NOT_SET};
394
395 Aws::String m_healthCheckPort;
396
397 bool m_healthCheckEnabled{false};
398
399 int m_healthCheckIntervalSeconds{0};
400
401 int m_healthCheckTimeoutSeconds{0};
402
403 int m_healthyThresholdCount{0};
404
405 int m_unhealthyThresholdCount{0};
406
407 Aws::String m_healthCheckPath;
408
409 Matcher m_matcher;
410
411 Aws::Vector<Aws::String> m_loadBalancerArns;
412
414
415 Aws::String m_protocolVersion;
416
418
419 int m_targetControlPort{0};
420 bool m_targetGroupArnHasBeenSet = false;
421 bool m_targetGroupNameHasBeenSet = false;
422 bool m_protocolHasBeenSet = false;
423 bool m_portHasBeenSet = false;
424 bool m_vpcIdHasBeenSet = false;
425 bool m_healthCheckProtocolHasBeenSet = false;
426 bool m_healthCheckPortHasBeenSet = false;
427 bool m_healthCheckEnabledHasBeenSet = false;
428 bool m_healthCheckIntervalSecondsHasBeenSet = false;
429 bool m_healthCheckTimeoutSecondsHasBeenSet = false;
430 bool m_healthyThresholdCountHasBeenSet = false;
431 bool m_unhealthyThresholdCountHasBeenSet = false;
432 bool m_healthCheckPathHasBeenSet = false;
433 bool m_matcherHasBeenSet = false;
434 bool m_loadBalancerArnsHasBeenSet = false;
435 bool m_targetTypeHasBeenSet = false;
436 bool m_protocolVersionHasBeenSet = false;
437 bool m_ipAddressTypeHasBeenSet = false;
438 bool m_targetControlPortHasBeenSet = false;
439};
440
441} // namespace Model
442} // namespace ElasticLoadBalancingv2
443} // namespace Aws
TargetGroup & WithHealthCheckProtocol(ProtocolEnum value)
TargetGroup & WithTargetGroupArn(TargetGroupArnT &&value)
Definition TargetGroup.h:54
TargetGroup & WithHealthCheckEnabled(bool value)
TargetGroup & WithProtocol(ProtocolEnum value)
Definition TargetGroup.h:88
AWS_ELASTICLOADBALANCINGV2_API TargetGroup & operator=(const Aws::Utils::Xml::XmlNode &xmlNode)
AWS_ELASTICLOADBALANCINGV2_API void OutputToStream(Aws::OStream &oStream, const char *location) const
AWS_ELASTICLOADBALANCINGV2_API TargetGroup(const Aws::Utils::Xml::XmlNode &xmlNode)
TargetGroup & WithVpcId(VpcIdT &&value)
const Aws::String & GetTargetGroupName() const
Definition TargetGroup.h:64
void SetHealthCheckPort(HealthCheckPortT &&value)
AWS_ELASTICLOADBALANCINGV2_API TargetGroup()=default
TargetGroupIpAddressTypeEnum GetIpAddressType() const
AWS_ELASTICLOADBALANCINGV2_API void OutputToStream(Aws::OStream &ostream, const char *location, unsigned index, const char *locationValue) const
TargetGroup & WithMatcher(MatcherT &&value)
const Aws::String & GetTargetGroupArn() const
Definition TargetGroup.h:46
TargetGroup & WithProtocolVersion(ProtocolVersionT &&value)
TargetGroup & WithHealthCheckPort(HealthCheckPortT &&value)
TargetGroup & AddLoadBalancerArns(LoadBalancerArnsT &&value)
const Aws::Vector< Aws::String > & GetLoadBalancerArns() const
void SetProtocolVersion(ProtocolVersionT &&value)
const Aws::String & GetHealthCheckPort() const
TargetGroup & WithHealthCheckIntervalSeconds(int value)
TargetGroup & WithHealthCheckPath(HealthCheckPathT &&value)
void SetTargetGroupName(TargetGroupNameT &&value)
Definition TargetGroup.h:67
TargetGroup & WithHealthyThresholdCount(int value)
TargetGroup & WithTargetType(TargetTypeEnum value)
TargetGroup & WithTargetGroupName(TargetGroupNameT &&value)
Definition TargetGroup.h:72
TargetGroup & WithUnhealthyThresholdCount(int value)
void SetIpAddressType(TargetGroupIpAddressTypeEnum value)
void SetTargetGroupArn(TargetGroupArnT &&value)
Definition TargetGroup.h:49
const Aws::String & GetProtocolVersion() const
void SetLoadBalancerArns(LoadBalancerArnsT &&value)
TargetGroup & WithIpAddressType(TargetGroupIpAddressTypeEnum value)
void SetHealthCheckPath(HealthCheckPathT &&value)
TargetGroup & WithLoadBalancerArns(LoadBalancerArnsT &&value)
const Aws::String & GetHealthCheckPath() const
TargetGroup & WithHealthCheckTimeoutSeconds(int value)
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector
std::basic_ostream< char, std::char_traits< char > > OStream