AWS SDK for C++

AWS SDK for C++ Version 1.11.719

Loading...
Searching...
No Matches
LoadBalancer.h
1
6#pragma once
7#include <aws/core/utils/DateTime.h>
8#include <aws/core/utils/memory/stl/AWSStreamFwd.h>
9#include <aws/core/utils/memory/stl/AWSString.h>
10#include <aws/core/utils/memory/stl/AWSVector.h>
11#include <aws/elasticloadbalancingv2/ElasticLoadBalancingv2_EXPORTS.h>
12#include <aws/elasticloadbalancingv2/model/AvailabilityZone.h>
13#include <aws/elasticloadbalancingv2/model/EnablePrefixForIpv6SourceNatEnum.h>
14#include <aws/elasticloadbalancingv2/model/IpAddressType.h>
15#include <aws/elasticloadbalancingv2/model/IpamPools.h>
16#include <aws/elasticloadbalancingv2/model/LoadBalancerSchemeEnum.h>
17#include <aws/elasticloadbalancingv2/model/LoadBalancerState.h>
18#include <aws/elasticloadbalancingv2/model/LoadBalancerTypeEnum.h>
19
20#include <utility>
21
22namespace Aws {
23namespace Utils {
24namespace Xml {
25class XmlNode;
26} // namespace Xml
27} // namespace Utils
28namespace ElasticLoadBalancingv2 {
29namespace Model {
30
37 public:
38 AWS_ELASTICLOADBALANCINGV2_API LoadBalancer() = default;
39 AWS_ELASTICLOADBALANCINGV2_API LoadBalancer(const Aws::Utils::Xml::XmlNode& xmlNode);
40 AWS_ELASTICLOADBALANCINGV2_API LoadBalancer& operator=(const Aws::Utils::Xml::XmlNode& xmlNode);
41
42 AWS_ELASTICLOADBALANCINGV2_API void OutputToStream(Aws::OStream& ostream, const char* location, unsigned index,
43 const char* locationValue) const;
44 AWS_ELASTICLOADBALANCINGV2_API void OutputToStream(Aws::OStream& oStream, const char* location) const;
45
47
50 inline const Aws::String& GetLoadBalancerArn() const { return m_loadBalancerArn; }
51 inline bool LoadBalancerArnHasBeenSet() const { return m_loadBalancerArnHasBeenSet; }
52 template <typename LoadBalancerArnT = Aws::String>
53 void SetLoadBalancerArn(LoadBalancerArnT&& value) {
54 m_loadBalancerArnHasBeenSet = true;
55 m_loadBalancerArn = std::forward<LoadBalancerArnT>(value);
56 }
57 template <typename LoadBalancerArnT = Aws::String>
58 LoadBalancer& WithLoadBalancerArn(LoadBalancerArnT&& value) {
59 SetLoadBalancerArn(std::forward<LoadBalancerArnT>(value));
60 return *this;
61 }
63
65
68 inline const Aws::String& GetDNSName() const { return m_dNSName; }
69 inline bool DNSNameHasBeenSet() const { return m_dNSNameHasBeenSet; }
70 template <typename DNSNameT = Aws::String>
71 void SetDNSName(DNSNameT&& value) {
72 m_dNSNameHasBeenSet = true;
73 m_dNSName = std::forward<DNSNameT>(value);
74 }
75 template <typename DNSNameT = Aws::String>
76 LoadBalancer& WithDNSName(DNSNameT&& value) {
77 SetDNSName(std::forward<DNSNameT>(value));
78 return *this;
79 }
81
83
87 inline const Aws::String& GetCanonicalHostedZoneId() const { return m_canonicalHostedZoneId; }
88 inline bool CanonicalHostedZoneIdHasBeenSet() const { return m_canonicalHostedZoneIdHasBeenSet; }
89 template <typename CanonicalHostedZoneIdT = Aws::String>
90 void SetCanonicalHostedZoneId(CanonicalHostedZoneIdT&& value) {
91 m_canonicalHostedZoneIdHasBeenSet = true;
92 m_canonicalHostedZoneId = std::forward<CanonicalHostedZoneIdT>(value);
93 }
94 template <typename CanonicalHostedZoneIdT = Aws::String>
95 LoadBalancer& WithCanonicalHostedZoneId(CanonicalHostedZoneIdT&& value) {
96 SetCanonicalHostedZoneId(std::forward<CanonicalHostedZoneIdT>(value));
97 return *this;
98 }
100
102
105 inline const Aws::Utils::DateTime& GetCreatedTime() const { return m_createdTime; }
106 inline bool CreatedTimeHasBeenSet() const { return m_createdTimeHasBeenSet; }
107 template <typename CreatedTimeT = Aws::Utils::DateTime>
108 void SetCreatedTime(CreatedTimeT&& value) {
109 m_createdTimeHasBeenSet = true;
110 m_createdTime = std::forward<CreatedTimeT>(value);
111 }
112 template <typename CreatedTimeT = Aws::Utils::DateTime>
113 LoadBalancer& WithCreatedTime(CreatedTimeT&& value) {
114 SetCreatedTime(std::forward<CreatedTimeT>(value));
115 return *this;
116 }
118
120
123 inline const Aws::String& GetLoadBalancerName() const { return m_loadBalancerName; }
124 inline bool LoadBalancerNameHasBeenSet() const { return m_loadBalancerNameHasBeenSet; }
125 template <typename LoadBalancerNameT = Aws::String>
126 void SetLoadBalancerName(LoadBalancerNameT&& value) {
127 m_loadBalancerNameHasBeenSet = true;
128 m_loadBalancerName = std::forward<LoadBalancerNameT>(value);
129 }
130 template <typename LoadBalancerNameT = Aws::String>
131 LoadBalancer& WithLoadBalancerName(LoadBalancerNameT&& value) {
132 SetLoadBalancerName(std::forward<LoadBalancerNameT>(value));
133 return *this;
134 }
136
138
148 inline LoadBalancerSchemeEnum GetScheme() const { return m_scheme; }
149 inline bool SchemeHasBeenSet() const { return m_schemeHasBeenSet; }
151 m_schemeHasBeenSet = true;
152 m_scheme = value;
153 }
155 SetScheme(value);
156 return *this;
157 }
159
161
164 inline const Aws::String& GetVpcId() const { return m_vpcId; }
165 inline bool VpcIdHasBeenSet() const { return m_vpcIdHasBeenSet; }
166 template <typename VpcIdT = Aws::String>
167 void SetVpcId(VpcIdT&& value) {
168 m_vpcIdHasBeenSet = true;
169 m_vpcId = std::forward<VpcIdT>(value);
170 }
171 template <typename VpcIdT = Aws::String>
172 LoadBalancer& WithVpcId(VpcIdT&& value) {
173 SetVpcId(std::forward<VpcIdT>(value));
174 return *this;
175 }
177
179
182 inline const LoadBalancerState& GetState() const { return m_state; }
183 inline bool StateHasBeenSet() const { return m_stateHasBeenSet; }
184 template <typename StateT = LoadBalancerState>
185 void SetState(StateT&& value) {
186 m_stateHasBeenSet = true;
187 m_state = std::forward<StateT>(value);
188 }
189 template <typename StateT = LoadBalancerState>
190 LoadBalancer& WithState(StateT&& value) {
191 SetState(std::forward<StateT>(value));
192 return *this;
193 }
195
197
200 inline LoadBalancerTypeEnum GetType() const { return m_type; }
201 inline bool TypeHasBeenSet() const { return m_typeHasBeenSet; }
202 inline void SetType(LoadBalancerTypeEnum value) {
203 m_typeHasBeenSet = true;
204 m_type = value;
205 }
207 SetType(value);
208 return *this;
209 }
211
213
216 inline const Aws::Vector<AvailabilityZone>& GetAvailabilityZones() const { return m_availabilityZones; }
217 inline bool AvailabilityZonesHasBeenSet() const { return m_availabilityZonesHasBeenSet; }
218 template <typename AvailabilityZonesT = Aws::Vector<AvailabilityZone>>
219 void SetAvailabilityZones(AvailabilityZonesT&& value) {
220 m_availabilityZonesHasBeenSet = true;
221 m_availabilityZones = std::forward<AvailabilityZonesT>(value);
222 }
223 template <typename AvailabilityZonesT = Aws::Vector<AvailabilityZone>>
224 LoadBalancer& WithAvailabilityZones(AvailabilityZonesT&& value) {
225 SetAvailabilityZones(std::forward<AvailabilityZonesT>(value));
226 return *this;
227 }
228 template <typename AvailabilityZonesT = AvailabilityZone>
229 LoadBalancer& AddAvailabilityZones(AvailabilityZonesT&& value) {
230 m_availabilityZonesHasBeenSet = true;
231 m_availabilityZones.emplace_back(std::forward<AvailabilityZonesT>(value));
232 return *this;
233 }
235
237
240 inline const Aws::Vector<Aws::String>& GetSecurityGroups() const { return m_securityGroups; }
241 inline bool SecurityGroupsHasBeenSet() const { return m_securityGroupsHasBeenSet; }
242 template <typename SecurityGroupsT = Aws::Vector<Aws::String>>
243 void SetSecurityGroups(SecurityGroupsT&& value) {
244 m_securityGroupsHasBeenSet = true;
245 m_securityGroups = std::forward<SecurityGroupsT>(value);
246 }
247 template <typename SecurityGroupsT = Aws::Vector<Aws::String>>
248 LoadBalancer& WithSecurityGroups(SecurityGroupsT&& value) {
249 SetSecurityGroups(std::forward<SecurityGroupsT>(value));
250 return *this;
251 }
252 template <typename SecurityGroupsT = Aws::String>
253 LoadBalancer& AddSecurityGroups(SecurityGroupsT&& value) {
254 m_securityGroupsHasBeenSet = true;
255 m_securityGroups.emplace_back(std::forward<SecurityGroupsT>(value));
256 return *this;
257 }
259
261
271 inline IpAddressType GetIpAddressType() const { return m_ipAddressType; }
272 inline bool IpAddressTypeHasBeenSet() const { return m_ipAddressTypeHasBeenSet; }
273 inline void SetIpAddressType(IpAddressType value) {
274 m_ipAddressTypeHasBeenSet = true;
275 m_ipAddressType = value;
276 }
278 SetIpAddressType(value);
279 return *this;
280 }
282
284
288 inline const Aws::String& GetCustomerOwnedIpv4Pool() const { return m_customerOwnedIpv4Pool; }
289 inline bool CustomerOwnedIpv4PoolHasBeenSet() const { return m_customerOwnedIpv4PoolHasBeenSet; }
290 template <typename CustomerOwnedIpv4PoolT = Aws::String>
291 void SetCustomerOwnedIpv4Pool(CustomerOwnedIpv4PoolT&& value) {
292 m_customerOwnedIpv4PoolHasBeenSet = true;
293 m_customerOwnedIpv4Pool = std::forward<CustomerOwnedIpv4PoolT>(value);
294 }
295 template <typename CustomerOwnedIpv4PoolT = Aws::String>
296 LoadBalancer& WithCustomerOwnedIpv4Pool(CustomerOwnedIpv4PoolT&& value) {
297 SetCustomerOwnedIpv4Pool(std::forward<CustomerOwnedIpv4PoolT>(value));
298 return *this;
299 }
301
303
308 return m_enforceSecurityGroupInboundRulesOnPrivateLinkTraffic;
309 }
311 return m_enforceSecurityGroupInboundRulesOnPrivateLinkTrafficHasBeenSet;
312 }
313 template <typename EnforceSecurityGroupInboundRulesOnPrivateLinkTrafficT = Aws::String>
314 void SetEnforceSecurityGroupInboundRulesOnPrivateLinkTraffic(EnforceSecurityGroupInboundRulesOnPrivateLinkTrafficT&& value) {
315 m_enforceSecurityGroupInboundRulesOnPrivateLinkTrafficHasBeenSet = true;
316 m_enforceSecurityGroupInboundRulesOnPrivateLinkTraffic = std::forward<EnforceSecurityGroupInboundRulesOnPrivateLinkTrafficT>(value);
317 }
318 template <typename EnforceSecurityGroupInboundRulesOnPrivateLinkTrafficT = Aws::String>
319 LoadBalancer& WithEnforceSecurityGroupInboundRulesOnPrivateLinkTraffic(EnforceSecurityGroupInboundRulesOnPrivateLinkTrafficT&& value) {
320 SetEnforceSecurityGroupInboundRulesOnPrivateLinkTraffic(std::forward<EnforceSecurityGroupInboundRulesOnPrivateLinkTrafficT>(value));
321 return *this;
322 }
324
326
331 inline EnablePrefixForIpv6SourceNatEnum GetEnablePrefixForIpv6SourceNat() const { return m_enablePrefixForIpv6SourceNat; }
332 inline bool EnablePrefixForIpv6SourceNatHasBeenSet() const { return m_enablePrefixForIpv6SourceNatHasBeenSet; }
334 m_enablePrefixForIpv6SourceNatHasBeenSet = true;
335 m_enablePrefixForIpv6SourceNat = value;
336 }
339 return *this;
340 }
342
344
348 inline const IpamPools& GetIpamPools() const { return m_ipamPools; }
349 inline bool IpamPoolsHasBeenSet() const { return m_ipamPoolsHasBeenSet; }
350 template <typename IpamPoolsT = IpamPools>
351 void SetIpamPools(IpamPoolsT&& value) {
352 m_ipamPoolsHasBeenSet = true;
353 m_ipamPools = std::forward<IpamPoolsT>(value);
354 }
355 template <typename IpamPoolsT = IpamPools>
356 LoadBalancer& WithIpamPools(IpamPoolsT&& value) {
357 SetIpamPools(std::forward<IpamPoolsT>(value));
358 return *this;
359 }
361 private:
362 Aws::String m_loadBalancerArn;
363
364 Aws::String m_dNSName;
365
366 Aws::String m_canonicalHostedZoneId;
367
368 Aws::Utils::DateTime m_createdTime{};
369
370 Aws::String m_loadBalancerName;
371
373
374 Aws::String m_vpcId;
375
376 LoadBalancerState m_state;
377
379
380 Aws::Vector<AvailabilityZone> m_availabilityZones;
381
382 Aws::Vector<Aws::String> m_securityGroups;
383
384 IpAddressType m_ipAddressType{IpAddressType::NOT_SET};
385
386 Aws::String m_customerOwnedIpv4Pool;
387
388 Aws::String m_enforceSecurityGroupInboundRulesOnPrivateLinkTraffic;
389
391
392 IpamPools m_ipamPools;
393 bool m_loadBalancerArnHasBeenSet = false;
394 bool m_dNSNameHasBeenSet = false;
395 bool m_canonicalHostedZoneIdHasBeenSet = false;
396 bool m_createdTimeHasBeenSet = false;
397 bool m_loadBalancerNameHasBeenSet = false;
398 bool m_schemeHasBeenSet = false;
399 bool m_vpcIdHasBeenSet = false;
400 bool m_stateHasBeenSet = false;
401 bool m_typeHasBeenSet = false;
402 bool m_availabilityZonesHasBeenSet = false;
403 bool m_securityGroupsHasBeenSet = false;
404 bool m_ipAddressTypeHasBeenSet = false;
405 bool m_customerOwnedIpv4PoolHasBeenSet = false;
406 bool m_enforceSecurityGroupInboundRulesOnPrivateLinkTrafficHasBeenSet = false;
407 bool m_enablePrefixForIpv6SourceNatHasBeenSet = false;
408 bool m_ipamPoolsHasBeenSet = false;
409};
410
411} // namespace Model
412} // namespace ElasticLoadBalancingv2
413} // namespace Aws
LoadBalancer & WithIpamPools(IpamPoolsT &&value)
AWS_ELASTICLOADBALANCINGV2_API LoadBalancer & operator=(const Aws::Utils::Xml::XmlNode &xmlNode)
LoadBalancer & AddAvailabilityZones(AvailabilityZonesT &&value)
const Aws::Utils::DateTime & GetCreatedTime() const
const Aws::String & GetEnforceSecurityGroupInboundRulesOnPrivateLinkTraffic() const
void SetSecurityGroups(SecurityGroupsT &&value)
const Aws::Vector< Aws::String > & GetSecurityGroups() const
const Aws::String & GetLoadBalancerName() const
void SetCustomerOwnedIpv4Pool(CustomerOwnedIpv4PoolT &&value)
void SetEnforceSecurityGroupInboundRulesOnPrivateLinkTraffic(EnforceSecurityGroupInboundRulesOnPrivateLinkTrafficT &&value)
AWS_ELASTICLOADBALANCINGV2_API void OutputToStream(Aws::OStream &ostream, const char *location, unsigned index, const char *locationValue) const
LoadBalancer & WithAvailabilityZones(AvailabilityZonesT &&value)
LoadBalancer & WithLoadBalancerArn(LoadBalancerArnT &&value)
void SetLoadBalancerName(LoadBalancerNameT &&value)
void SetCanonicalHostedZoneId(CanonicalHostedZoneIdT &&value)
LoadBalancer & WithScheme(LoadBalancerSchemeEnum value)
void SetScheme(LoadBalancerSchemeEnum value)
AWS_ELASTICLOADBALANCINGV2_API LoadBalancer()=default
LoadBalancer & WithSecurityGroups(SecurityGroupsT &&value)
const Aws::String & GetCustomerOwnedIpv4Pool() const
LoadBalancer & WithIpAddressType(IpAddressType value)
void SetEnablePrefixForIpv6SourceNat(EnablePrefixForIpv6SourceNatEnum value)
const LoadBalancerState & GetState() const
LoadBalancer & WithCreatedTime(CreatedTimeT &&value)
LoadBalancer & WithType(LoadBalancerTypeEnum value)
LoadBalancer & WithEnablePrefixForIpv6SourceNat(EnablePrefixForIpv6SourceNatEnum value)
AWS_ELASTICLOADBALANCINGV2_API void OutputToStream(Aws::OStream &oStream, const char *location) const
void SetType(LoadBalancerTypeEnum value)
const Aws::Vector< AvailabilityZone > & GetAvailabilityZones() const
const Aws::String & GetLoadBalancerArn() const
const Aws::String & GetCanonicalHostedZoneId() const
AWS_ELASTICLOADBALANCINGV2_API LoadBalancer(const Aws::Utils::Xml::XmlNode &xmlNode)
LoadBalancer & WithCanonicalHostedZoneId(CanonicalHostedZoneIdT &&value)
LoadBalancer & WithCustomerOwnedIpv4Pool(CustomerOwnedIpv4PoolT &&value)
LoadBalancer & WithEnforceSecurityGroupInboundRulesOnPrivateLinkTraffic(EnforceSecurityGroupInboundRulesOnPrivateLinkTrafficT &&value)
LoadBalancer & AddSecurityGroups(SecurityGroupsT &&value)
LoadBalancer & WithDNSName(DNSNameT &&value)
void SetLoadBalancerArn(LoadBalancerArnT &&value)
LoadBalancer & WithLoadBalancerName(LoadBalancerNameT &&value)
void SetAvailabilityZones(AvailabilityZonesT &&value)
EnablePrefixForIpv6SourceNatEnum GetEnablePrefixForIpv6SourceNat() const
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