AWS SDK for C++

AWS SDK for C++ Version 1.11.612

Loading...
Searching...
No Matches
TargetGroup.h
1
6#pragma once
7#include <aws/elasticloadbalancingv2/ElasticLoadBalancingv2_EXPORTS.h>
8#include <aws/core/utils/memory/stl/AWSStreamFwd.h>
9#include <aws/core/utils/memory/stl/AWSString.h>
10#include <aws/elasticloadbalancingv2/model/ProtocolEnum.h>
11#include <aws/elasticloadbalancingv2/model/Matcher.h>
12#include <aws/core/utils/memory/stl/AWSVector.h>
13#include <aws/elasticloadbalancingv2/model/TargetTypeEnum.h>
14#include <aws/elasticloadbalancingv2/model/TargetGroupIpAddressTypeEnum.h>
15#include <utility>
16
17namespace Aws
18{
19namespace Utils
20{
21namespace Xml
22{
23 class XmlNode;
24} // namespace Xml
25} // namespace Utils
26namespace ElasticLoadBalancingv2
27{
28namespace Model
29{
30
37 {
38 public:
39 AWS_ELASTICLOADBALANCINGV2_API TargetGroup() = default;
40 AWS_ELASTICLOADBALANCINGV2_API TargetGroup(const Aws::Utils::Xml::XmlNode& xmlNode);
41 AWS_ELASTICLOADBALANCINGV2_API TargetGroup& operator=(const Aws::Utils::Xml::XmlNode& xmlNode);
42
43 AWS_ELASTICLOADBALANCINGV2_API void OutputToStream(Aws::OStream& ostream, const char* location, unsigned index, const char* locationValue) const;
44 AWS_ELASTICLOADBALANCINGV2_API void OutputToStream(Aws::OStream& oStream, const char* location) const;
45
46
48
51 inline const Aws::String& GetTargetGroupArn() const { return m_targetGroupArn; }
52 inline bool TargetGroupArnHasBeenSet() const { return m_targetGroupArnHasBeenSet; }
53 template<typename TargetGroupArnT = Aws::String>
54 void SetTargetGroupArn(TargetGroupArnT&& value) { m_targetGroupArnHasBeenSet = true; m_targetGroupArn = std::forward<TargetGroupArnT>(value); }
55 template<typename TargetGroupArnT = Aws::String>
56 TargetGroup& WithTargetGroupArn(TargetGroupArnT&& value) { SetTargetGroupArn(std::forward<TargetGroupArnT>(value)); return *this;}
58
60
63 inline const Aws::String& GetTargetGroupName() const { return m_targetGroupName; }
64 inline bool TargetGroupNameHasBeenSet() const { return m_targetGroupNameHasBeenSet; }
65 template<typename TargetGroupNameT = Aws::String>
66 void SetTargetGroupName(TargetGroupNameT&& value) { m_targetGroupNameHasBeenSet = true; m_targetGroupName = std::forward<TargetGroupNameT>(value); }
67 template<typename TargetGroupNameT = Aws::String>
68 TargetGroup& WithTargetGroupName(TargetGroupNameT&& value) { SetTargetGroupName(std::forward<TargetGroupNameT>(value)); return *this;}
70
72
75 inline ProtocolEnum GetProtocol() const { return m_protocol; }
76 inline bool ProtocolHasBeenSet() const { return m_protocolHasBeenSet; }
77 inline void SetProtocol(ProtocolEnum value) { m_protocolHasBeenSet = true; m_protocol = value; }
78 inline TargetGroup& WithProtocol(ProtocolEnum value) { SetProtocol(value); return *this;}
80
82
86 inline int GetPort() const { return m_port; }
87 inline bool PortHasBeenSet() const { return m_portHasBeenSet; }
88 inline void SetPort(int value) { m_portHasBeenSet = true; m_port = value; }
89 inline TargetGroup& WithPort(int value) { SetPort(value); return *this;}
91
93
96 inline const Aws::String& GetVpcId() const { return m_vpcId; }
97 inline bool VpcIdHasBeenSet() const { return m_vpcIdHasBeenSet; }
98 template<typename VpcIdT = Aws::String>
99 void SetVpcId(VpcIdT&& value) { m_vpcIdHasBeenSet = true; m_vpcId = std::forward<VpcIdT>(value); }
100 template<typename VpcIdT = Aws::String>
101 TargetGroup& WithVpcId(VpcIdT&& value) { SetVpcId(std::forward<VpcIdT>(value)); return *this;}
103
105
109 inline ProtocolEnum GetHealthCheckProtocol() const { return m_healthCheckProtocol; }
110 inline bool HealthCheckProtocolHasBeenSet() const { return m_healthCheckProtocolHasBeenSet; }
111 inline void SetHealthCheckProtocol(ProtocolEnum value) { m_healthCheckProtocolHasBeenSet = true; m_healthCheckProtocol = value; }
114
116
119 inline const Aws::String& GetHealthCheckPort() const { return m_healthCheckPort; }
120 inline bool HealthCheckPortHasBeenSet() const { return m_healthCheckPortHasBeenSet; }
121 template<typename HealthCheckPortT = Aws::String>
122 void SetHealthCheckPort(HealthCheckPortT&& value) { m_healthCheckPortHasBeenSet = true; m_healthCheckPort = std::forward<HealthCheckPortT>(value); }
123 template<typename HealthCheckPortT = Aws::String>
124 TargetGroup& WithHealthCheckPort(HealthCheckPortT&& value) { SetHealthCheckPort(std::forward<HealthCheckPortT>(value)); return *this;}
126
128
131 inline bool GetHealthCheckEnabled() const { return m_healthCheckEnabled; }
132 inline bool HealthCheckEnabledHasBeenSet() const { return m_healthCheckEnabledHasBeenSet; }
133 inline void SetHealthCheckEnabled(bool value) { m_healthCheckEnabledHasBeenSet = true; m_healthCheckEnabled = value; }
134 inline TargetGroup& WithHealthCheckEnabled(bool value) { SetHealthCheckEnabled(value); return *this;}
136
138
142 inline int GetHealthCheckIntervalSeconds() const { return m_healthCheckIntervalSeconds; }
143 inline bool HealthCheckIntervalSecondsHasBeenSet() const { return m_healthCheckIntervalSecondsHasBeenSet; }
144 inline void SetHealthCheckIntervalSeconds(int value) { m_healthCheckIntervalSecondsHasBeenSet = true; m_healthCheckIntervalSeconds = value; }
147
149
153 inline int GetHealthCheckTimeoutSeconds() const { return m_healthCheckTimeoutSeconds; }
154 inline bool HealthCheckTimeoutSecondsHasBeenSet() const { return m_healthCheckTimeoutSecondsHasBeenSet; }
155 inline void SetHealthCheckTimeoutSeconds(int value) { m_healthCheckTimeoutSecondsHasBeenSet = true; m_healthCheckTimeoutSeconds = value; }
158
160
164 inline int GetHealthyThresholdCount() const { return m_healthyThresholdCount; }
165 inline bool HealthyThresholdCountHasBeenSet() const { return m_healthyThresholdCountHasBeenSet; }
166 inline void SetHealthyThresholdCount(int value) { m_healthyThresholdCountHasBeenSet = true; m_healthyThresholdCount = value; }
167 inline TargetGroup& WithHealthyThresholdCount(int value) { SetHealthyThresholdCount(value); return *this;}
169
171
175 inline int GetUnhealthyThresholdCount() const { return m_unhealthyThresholdCount; }
176 inline bool UnhealthyThresholdCountHasBeenSet() const { return m_unhealthyThresholdCountHasBeenSet; }
177 inline void SetUnhealthyThresholdCount(int value) { m_unhealthyThresholdCountHasBeenSet = true; m_unhealthyThresholdCount = value; }
178 inline TargetGroup& WithUnhealthyThresholdCount(int value) { SetUnhealthyThresholdCount(value); return *this;}
180
182
185 inline const Aws::String& GetHealthCheckPath() const { return m_healthCheckPath; }
186 inline bool HealthCheckPathHasBeenSet() const { return m_healthCheckPathHasBeenSet; }
187 template<typename HealthCheckPathT = Aws::String>
188 void SetHealthCheckPath(HealthCheckPathT&& value) { m_healthCheckPathHasBeenSet = true; m_healthCheckPath = std::forward<HealthCheckPathT>(value); }
189 template<typename HealthCheckPathT = Aws::String>
190 TargetGroup& WithHealthCheckPath(HealthCheckPathT&& value) { SetHealthCheckPath(std::forward<HealthCheckPathT>(value)); return *this;}
192
194
198 inline const Matcher& GetMatcher() const { return m_matcher; }
199 inline bool MatcherHasBeenSet() const { return m_matcherHasBeenSet; }
200 template<typename MatcherT = Matcher>
201 void SetMatcher(MatcherT&& value) { m_matcherHasBeenSet = true; m_matcher = std::forward<MatcherT>(value); }
202 template<typename MatcherT = Matcher>
203 TargetGroup& WithMatcher(MatcherT&& value) { SetMatcher(std::forward<MatcherT>(value)); return *this;}
205
207
212 inline const Aws::Vector<Aws::String>& GetLoadBalancerArns() const { return m_loadBalancerArns; }
213 inline bool LoadBalancerArnsHasBeenSet() const { return m_loadBalancerArnsHasBeenSet; }
214 template<typename LoadBalancerArnsT = Aws::Vector<Aws::String>>
215 void SetLoadBalancerArns(LoadBalancerArnsT&& value) { m_loadBalancerArnsHasBeenSet = true; m_loadBalancerArns = std::forward<LoadBalancerArnsT>(value); }
216 template<typename LoadBalancerArnsT = Aws::Vector<Aws::String>>
217 TargetGroup& WithLoadBalancerArns(LoadBalancerArnsT&& value) { SetLoadBalancerArns(std::forward<LoadBalancerArnsT>(value)); return *this;}
218 template<typename LoadBalancerArnsT = Aws::String>
219 TargetGroup& AddLoadBalancerArns(LoadBalancerArnsT&& value) { m_loadBalancerArnsHasBeenSet = true; m_loadBalancerArns.emplace_back(std::forward<LoadBalancerArnsT>(value)); return *this; }
221
223
230 inline TargetTypeEnum GetTargetType() const { return m_targetType; }
231 inline bool TargetTypeHasBeenSet() const { return m_targetTypeHasBeenSet; }
232 inline void SetTargetType(TargetTypeEnum value) { m_targetTypeHasBeenSet = true; m_targetType = value; }
233 inline TargetGroup& WithTargetType(TargetTypeEnum value) { SetTargetType(value); return *this;}
235
237
241 inline const Aws::String& GetProtocolVersion() const { return m_protocolVersion; }
242 inline bool ProtocolVersionHasBeenSet() const { return m_protocolVersionHasBeenSet; }
243 template<typename ProtocolVersionT = Aws::String>
244 void SetProtocolVersion(ProtocolVersionT&& value) { m_protocolVersionHasBeenSet = true; m_protocolVersion = std::forward<ProtocolVersionT>(value); }
245 template<typename ProtocolVersionT = Aws::String>
246 TargetGroup& WithProtocolVersion(ProtocolVersionT&& value) { SetProtocolVersion(std::forward<ProtocolVersionT>(value)); return *this;}
248
250
253 inline TargetGroupIpAddressTypeEnum GetIpAddressType() const { return m_ipAddressType; }
254 inline bool IpAddressTypeHasBeenSet() const { return m_ipAddressTypeHasBeenSet; }
255 inline void SetIpAddressType(TargetGroupIpAddressTypeEnum value) { m_ipAddressTypeHasBeenSet = true; m_ipAddressType = value; }
258 private:
259
260 Aws::String m_targetGroupArn;
261 bool m_targetGroupArnHasBeenSet = false;
262
263 Aws::String m_targetGroupName;
264 bool m_targetGroupNameHasBeenSet = false;
265
267 bool m_protocolHasBeenSet = false;
268
269 int m_port{0};
270 bool m_portHasBeenSet = false;
271
272 Aws::String m_vpcId;
273 bool m_vpcIdHasBeenSet = false;
274
275 ProtocolEnum m_healthCheckProtocol{ProtocolEnum::NOT_SET};
276 bool m_healthCheckProtocolHasBeenSet = false;
277
278 Aws::String m_healthCheckPort;
279 bool m_healthCheckPortHasBeenSet = false;
280
281 bool m_healthCheckEnabled{false};
282 bool m_healthCheckEnabledHasBeenSet = false;
283
284 int m_healthCheckIntervalSeconds{0};
285 bool m_healthCheckIntervalSecondsHasBeenSet = false;
286
287 int m_healthCheckTimeoutSeconds{0};
288 bool m_healthCheckTimeoutSecondsHasBeenSet = false;
289
290 int m_healthyThresholdCount{0};
291 bool m_healthyThresholdCountHasBeenSet = false;
292
293 int m_unhealthyThresholdCount{0};
294 bool m_unhealthyThresholdCountHasBeenSet = false;
295
296 Aws::String m_healthCheckPath;
297 bool m_healthCheckPathHasBeenSet = false;
298
299 Matcher m_matcher;
300 bool m_matcherHasBeenSet = false;
301
302 Aws::Vector<Aws::String> m_loadBalancerArns;
303 bool m_loadBalancerArnsHasBeenSet = false;
304
306 bool m_targetTypeHasBeenSet = false;
307
308 Aws::String m_protocolVersion;
309 bool m_protocolVersionHasBeenSet = false;
310
312 bool m_ipAddressTypeHasBeenSet = false;
313 };
314
315} // namespace Model
316} // namespace ElasticLoadBalancingv2
317} // namespace Aws
TargetGroup & WithHealthCheckProtocol(ProtocolEnum value)
TargetGroup & WithTargetGroupArn(TargetGroupArnT &&value)
Definition TargetGroup.h:56
TargetGroup & WithHealthCheckEnabled(bool value)
TargetGroup & WithProtocol(ProtocolEnum value)
Definition TargetGroup.h:78
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:63
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:51
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:66
TargetGroup & WithHealthyThresholdCount(int value)
TargetGroup & WithTargetType(TargetTypeEnum value)
TargetGroup & WithTargetGroupName(TargetGroupNameT &&value)
Definition TargetGroup.h:68
TargetGroup & WithUnhealthyThresholdCount(int value)
void SetIpAddressType(TargetGroupIpAddressTypeEnum value)
void SetTargetGroupArn(TargetGroupArnT &&value)
Definition TargetGroup.h:54
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