AWS SDK for C++

AWS SDK for C++ Version 1.11.717

Loading...
Searching...
No Matches
Vpc.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/ec2/EC2_EXPORTS.h>
11#include <aws/ec2/model/BlockPublicAccessStates.h>
12#include <aws/ec2/model/Tag.h>
13#include <aws/ec2/model/Tenancy.h>
14#include <aws/ec2/model/VpcCidrBlockAssociation.h>
15#include <aws/ec2/model/VpcEncryptionControl.h>
16#include <aws/ec2/model/VpcIpv6CidrBlockAssociation.h>
17#include <aws/ec2/model/VpcState.h>
18
19#include <utility>
20
21namespace Aws {
22namespace Utils {
23namespace Xml {
24class XmlNode;
25} // namespace Xml
26} // namespace Utils
27namespace EC2 {
28namespace Model {
29
35class Vpc {
36 public:
37 AWS_EC2_API Vpc() = default;
38 AWS_EC2_API Vpc(const Aws::Utils::Xml::XmlNode& xmlNode);
39 AWS_EC2_API Vpc& operator=(const Aws::Utils::Xml::XmlNode& xmlNode);
40
41 AWS_EC2_API void OutputToStream(Aws::OStream& ostream, const char* location, unsigned index, const char* locationValue) const;
42 AWS_EC2_API void OutputToStream(Aws::OStream& oStream, const char* location) const;
43
45
48 inline const Aws::String& GetOwnerId() const { return m_ownerId; }
49 inline bool OwnerIdHasBeenSet() const { return m_ownerIdHasBeenSet; }
50 template <typename OwnerIdT = Aws::String>
51 void SetOwnerId(OwnerIdT&& value) {
52 m_ownerIdHasBeenSet = true;
53 m_ownerId = std::forward<OwnerIdT>(value);
54 }
55 template <typename OwnerIdT = Aws::String>
56 Vpc& WithOwnerId(OwnerIdT&& value) {
57 SetOwnerId(std::forward<OwnerIdT>(value));
58 return *this;
59 }
61
63
66 inline Tenancy GetInstanceTenancy() const { return m_instanceTenancy; }
67 inline bool InstanceTenancyHasBeenSet() const { return m_instanceTenancyHasBeenSet; }
68 inline void SetInstanceTenancy(Tenancy value) {
69 m_instanceTenancyHasBeenSet = true;
70 m_instanceTenancy = value;
71 }
73 SetInstanceTenancy(value);
74 return *this;
75 }
77
79
82 inline const Aws::Vector<VpcIpv6CidrBlockAssociation>& GetIpv6CidrBlockAssociationSet() const { return m_ipv6CidrBlockAssociationSet; }
83 inline bool Ipv6CidrBlockAssociationSetHasBeenSet() const { return m_ipv6CidrBlockAssociationSetHasBeenSet; }
84 template <typename Ipv6CidrBlockAssociationSetT = Aws::Vector<VpcIpv6CidrBlockAssociation>>
85 void SetIpv6CidrBlockAssociationSet(Ipv6CidrBlockAssociationSetT&& value) {
86 m_ipv6CidrBlockAssociationSetHasBeenSet = true;
87 m_ipv6CidrBlockAssociationSet = std::forward<Ipv6CidrBlockAssociationSetT>(value);
88 }
89 template <typename Ipv6CidrBlockAssociationSetT = Aws::Vector<VpcIpv6CidrBlockAssociation>>
90 Vpc& WithIpv6CidrBlockAssociationSet(Ipv6CidrBlockAssociationSetT&& value) {
91 SetIpv6CidrBlockAssociationSet(std::forward<Ipv6CidrBlockAssociationSetT>(value));
92 return *this;
93 }
94 template <typename Ipv6CidrBlockAssociationSetT = VpcIpv6CidrBlockAssociation>
95 Vpc& AddIpv6CidrBlockAssociationSet(Ipv6CidrBlockAssociationSetT&& value) {
96 m_ipv6CidrBlockAssociationSetHasBeenSet = true;
97 m_ipv6CidrBlockAssociationSet.emplace_back(std::forward<Ipv6CidrBlockAssociationSetT>(value));
98 return *this;
99 }
101
103
106 inline const Aws::Vector<VpcCidrBlockAssociation>& GetCidrBlockAssociationSet() const { return m_cidrBlockAssociationSet; }
107 inline bool CidrBlockAssociationSetHasBeenSet() const { return m_cidrBlockAssociationSetHasBeenSet; }
108 template <typename CidrBlockAssociationSetT = Aws::Vector<VpcCidrBlockAssociation>>
109 void SetCidrBlockAssociationSet(CidrBlockAssociationSetT&& value) {
110 m_cidrBlockAssociationSetHasBeenSet = true;
111 m_cidrBlockAssociationSet = std::forward<CidrBlockAssociationSetT>(value);
112 }
113 template <typename CidrBlockAssociationSetT = Aws::Vector<VpcCidrBlockAssociation>>
114 Vpc& WithCidrBlockAssociationSet(CidrBlockAssociationSetT&& value) {
115 SetCidrBlockAssociationSet(std::forward<CidrBlockAssociationSetT>(value));
116 return *this;
117 }
118 template <typename CidrBlockAssociationSetT = VpcCidrBlockAssociation>
119 Vpc& AddCidrBlockAssociationSet(CidrBlockAssociationSetT&& value) {
120 m_cidrBlockAssociationSetHasBeenSet = true;
121 m_cidrBlockAssociationSet.emplace_back(std::forward<CidrBlockAssociationSetT>(value));
122 return *this;
123 }
125
127
130 inline bool GetIsDefault() const { return m_isDefault; }
131 inline bool IsDefaultHasBeenSet() const { return m_isDefaultHasBeenSet; }
132 inline void SetIsDefault(bool value) {
133 m_isDefaultHasBeenSet = true;
134 m_isDefault = value;
135 }
136 inline Vpc& WithIsDefault(bool value) {
137 SetIsDefault(value);
138 return *this;
139 }
141
143
144 inline const VpcEncryptionControl& GetEncryptionControl() const { return m_encryptionControl; }
145 inline bool EncryptionControlHasBeenSet() const { return m_encryptionControlHasBeenSet; }
146 template <typename EncryptionControlT = VpcEncryptionControl>
147 void SetEncryptionControl(EncryptionControlT&& value) {
148 m_encryptionControlHasBeenSet = true;
149 m_encryptionControl = std::forward<EncryptionControlT>(value);
150 }
151 template <typename EncryptionControlT = VpcEncryptionControl>
152 Vpc& WithEncryptionControl(EncryptionControlT&& value) {
153 SetEncryptionControl(std::forward<EncryptionControlT>(value));
154 return *this;
155 }
157
159
162 inline const Aws::Vector<Tag>& GetTags() const { return m_tags; }
163 inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; }
164 template <typename TagsT = Aws::Vector<Tag>>
165 void SetTags(TagsT&& value) {
166 m_tagsHasBeenSet = true;
167 m_tags = std::forward<TagsT>(value);
168 }
169 template <typename TagsT = Aws::Vector<Tag>>
170 Vpc& WithTags(TagsT&& value) {
171 SetTags(std::forward<TagsT>(value));
172 return *this;
173 }
174 template <typename TagsT = Tag>
175 Vpc& AddTags(TagsT&& value) {
176 m_tagsHasBeenSet = true;
177 m_tags.emplace_back(std::forward<TagsT>(value));
178 return *this;
179 }
181
183
186 inline const BlockPublicAccessStates& GetBlockPublicAccessStates() const { return m_blockPublicAccessStates; }
187 inline bool BlockPublicAccessStatesHasBeenSet() const { return m_blockPublicAccessStatesHasBeenSet; }
188 template <typename BlockPublicAccessStatesT = BlockPublicAccessStates>
189 void SetBlockPublicAccessStates(BlockPublicAccessStatesT&& value) {
190 m_blockPublicAccessStatesHasBeenSet = true;
191 m_blockPublicAccessStates = std::forward<BlockPublicAccessStatesT>(value);
192 }
193 template <typename BlockPublicAccessStatesT = BlockPublicAccessStates>
194 Vpc& WithBlockPublicAccessStates(BlockPublicAccessStatesT&& value) {
195 SetBlockPublicAccessStates(std::forward<BlockPublicAccessStatesT>(value));
196 return *this;
197 }
199
201
204 inline const Aws::String& GetVpcId() const { return m_vpcId; }
205 inline bool VpcIdHasBeenSet() const { return m_vpcIdHasBeenSet; }
206 template <typename VpcIdT = Aws::String>
207 void SetVpcId(VpcIdT&& value) {
208 m_vpcIdHasBeenSet = true;
209 m_vpcId = std::forward<VpcIdT>(value);
210 }
211 template <typename VpcIdT = Aws::String>
212 Vpc& WithVpcId(VpcIdT&& value) {
213 SetVpcId(std::forward<VpcIdT>(value));
214 return *this;
215 }
217
219
222 inline VpcState GetState() const { return m_state; }
223 inline bool StateHasBeenSet() const { return m_stateHasBeenSet; }
224 inline void SetState(VpcState value) {
225 m_stateHasBeenSet = true;
226 m_state = value;
227 }
228 inline Vpc& WithState(VpcState value) {
229 SetState(value);
230 return *this;
231 }
233
235
238 inline const Aws::String& GetCidrBlock() const { return m_cidrBlock; }
239 inline bool CidrBlockHasBeenSet() const { return m_cidrBlockHasBeenSet; }
240 template <typename CidrBlockT = Aws::String>
241 void SetCidrBlock(CidrBlockT&& value) {
242 m_cidrBlockHasBeenSet = true;
243 m_cidrBlock = std::forward<CidrBlockT>(value);
244 }
245 template <typename CidrBlockT = Aws::String>
246 Vpc& WithCidrBlock(CidrBlockT&& value) {
247 SetCidrBlock(std::forward<CidrBlockT>(value));
248 return *this;
249 }
251
253
256 inline const Aws::String& GetDhcpOptionsId() const { return m_dhcpOptionsId; }
257 inline bool DhcpOptionsIdHasBeenSet() const { return m_dhcpOptionsIdHasBeenSet; }
258 template <typename DhcpOptionsIdT = Aws::String>
259 void SetDhcpOptionsId(DhcpOptionsIdT&& value) {
260 m_dhcpOptionsIdHasBeenSet = true;
261 m_dhcpOptionsId = std::forward<DhcpOptionsIdT>(value);
262 }
263 template <typename DhcpOptionsIdT = Aws::String>
264 Vpc& WithDhcpOptionsId(DhcpOptionsIdT&& value) {
265 SetDhcpOptionsId(std::forward<DhcpOptionsIdT>(value));
266 return *this;
267 }
269 private:
270 Aws::String m_ownerId;
271
272 Tenancy m_instanceTenancy{Tenancy::NOT_SET};
273
274 Aws::Vector<VpcIpv6CidrBlockAssociation> m_ipv6CidrBlockAssociationSet;
275
276 Aws::Vector<VpcCidrBlockAssociation> m_cidrBlockAssociationSet;
277
278 bool m_isDefault{false};
279
280 VpcEncryptionControl m_encryptionControl;
281
282 Aws::Vector<Tag> m_tags;
283
284 BlockPublicAccessStates m_blockPublicAccessStates;
285
286 Aws::String m_vpcId;
287
289
290 Aws::String m_cidrBlock;
291
292 Aws::String m_dhcpOptionsId;
293 bool m_ownerIdHasBeenSet = false;
294 bool m_instanceTenancyHasBeenSet = false;
295 bool m_ipv6CidrBlockAssociationSetHasBeenSet = false;
296 bool m_cidrBlockAssociationSetHasBeenSet = false;
297 bool m_isDefaultHasBeenSet = false;
298 bool m_encryptionControlHasBeenSet = false;
299 bool m_tagsHasBeenSet = false;
300 bool m_blockPublicAccessStatesHasBeenSet = false;
301 bool m_vpcIdHasBeenSet = false;
302 bool m_stateHasBeenSet = false;
303 bool m_cidrBlockHasBeenSet = false;
304 bool m_dhcpOptionsIdHasBeenSet = false;
305};
306
307} // namespace Model
308} // namespace EC2
309} // namespace Aws
void SetVpcId(VpcIdT &&value)
Definition Vpc.h:207
const Aws::String & GetVpcId() const
Definition Vpc.h:204
Vpc & WithEncryptionControl(EncryptionControlT &&value)
Definition Vpc.h:152
void SetTags(TagsT &&value)
Definition Vpc.h:165
bool TagsHasBeenSet() const
Definition Vpc.h:163
const Aws::String & GetCidrBlock() const
Definition Vpc.h:238
Vpc & WithIsDefault(bool value)
Definition Vpc.h:136
bool IsDefaultHasBeenSet() const
Definition Vpc.h:131
const VpcEncryptionControl & GetEncryptionControl() const
Definition Vpc.h:144
void SetIpv6CidrBlockAssociationSet(Ipv6CidrBlockAssociationSetT &&value)
Definition Vpc.h:85
void SetState(VpcState value)
Definition Vpc.h:224
Vpc & WithCidrBlockAssociationSet(CidrBlockAssociationSetT &&value)
Definition Vpc.h:114
const Aws::Vector< VpcIpv6CidrBlockAssociation > & GetIpv6CidrBlockAssociationSet() const
Definition Vpc.h:82
VpcState GetState() const
Definition Vpc.h:222
bool OwnerIdHasBeenSet() const
Definition Vpc.h:49
void SetIsDefault(bool value)
Definition Vpc.h:132
bool CidrBlockAssociationSetHasBeenSet() const
Definition Vpc.h:107
bool VpcIdHasBeenSet() const
Definition Vpc.h:205
const Aws::String & GetDhcpOptionsId() const
Definition Vpc.h:256
Tenancy GetInstanceTenancy() const
Definition Vpc.h:66
AWS_EC2_API void OutputToStream(Aws::OStream &ostream, const char *location, unsigned index, const char *locationValue) const
void SetCidrBlock(CidrBlockT &&value)
Definition Vpc.h:241
void SetEncryptionControl(EncryptionControlT &&value)
Definition Vpc.h:147
Vpc & WithCidrBlock(CidrBlockT &&value)
Definition Vpc.h:246
Vpc & WithDhcpOptionsId(DhcpOptionsIdT &&value)
Definition Vpc.h:264
const Aws::Vector< VpcCidrBlockAssociation > & GetCidrBlockAssociationSet() const
Definition Vpc.h:106
Vpc & WithBlockPublicAccessStates(BlockPublicAccessStatesT &&value)
Definition Vpc.h:194
Vpc & AddIpv6CidrBlockAssociationSet(Ipv6CidrBlockAssociationSetT &&value)
Definition Vpc.h:95
AWS_EC2_API Vpc & operator=(const Aws::Utils::Xml::XmlNode &xmlNode)
AWS_EC2_API Vpc(const Aws::Utils::Xml::XmlNode &xmlNode)
Vpc & WithTags(TagsT &&value)
Definition Vpc.h:170
bool CidrBlockHasBeenSet() const
Definition Vpc.h:239
Vpc & AddCidrBlockAssociationSet(CidrBlockAssociationSetT &&value)
Definition Vpc.h:119
Vpc & AddTags(TagsT &&value)
Definition Vpc.h:175
Vpc & WithInstanceTenancy(Tenancy value)
Definition Vpc.h:72
Vpc & WithState(VpcState value)
Definition Vpc.h:228
Vpc & WithOwnerId(OwnerIdT &&value)
Definition Vpc.h:56
const BlockPublicAccessStates & GetBlockPublicAccessStates() const
Definition Vpc.h:186
bool Ipv6CidrBlockAssociationSetHasBeenSet() const
Definition Vpc.h:83
bool StateHasBeenSet() const
Definition Vpc.h:223
bool EncryptionControlHasBeenSet() const
Definition Vpc.h:145
const Aws::String & GetOwnerId() const
Definition Vpc.h:48
void SetCidrBlockAssociationSet(CidrBlockAssociationSetT &&value)
Definition Vpc.h:109
void SetDhcpOptionsId(DhcpOptionsIdT &&value)
Definition Vpc.h:259
AWS_EC2_API void OutputToStream(Aws::OStream &oStream, const char *location) const
bool GetIsDefault() const
Definition Vpc.h:130
Vpc & WithIpv6CidrBlockAssociationSet(Ipv6CidrBlockAssociationSetT &&value)
Definition Vpc.h:90
bool InstanceTenancyHasBeenSet() const
Definition Vpc.h:67
AWS_EC2_API Vpc()=default
bool BlockPublicAccessStatesHasBeenSet() const
Definition Vpc.h:187
Vpc & WithVpcId(VpcIdT &&value)
Definition Vpc.h:212
const Aws::Vector< Tag > & GetTags() const
Definition Vpc.h:162
void SetOwnerId(OwnerIdT &&value)
Definition Vpc.h:51
void SetBlockPublicAccessStates(BlockPublicAccessStatesT &&value)
Definition Vpc.h:189
void SetInstanceTenancy(Tenancy value)
Definition Vpc.h:68
bool DhcpOptionsIdHasBeenSet() const
Definition Vpc.h:257
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