AWS SDK for C++

AWS SDK for C++ Version 1.11.606

Loading...
Searching...
No Matches
Vpc.h
1
6#pragma once
7#include <aws/ec2/EC2_EXPORTS.h>
8#include <aws/core/utils/memory/stl/AWSStreamFwd.h>
9#include <aws/core/utils/memory/stl/AWSString.h>
10#include <aws/ec2/model/Tenancy.h>
11#include <aws/core/utils/memory/stl/AWSVector.h>
12#include <aws/ec2/model/VpcEncryptionControl.h>
13#include <aws/ec2/model/BlockPublicAccessStates.h>
14#include <aws/ec2/model/VpcState.h>
15#include <aws/ec2/model/VpcIpv6CidrBlockAssociation.h>
16#include <aws/ec2/model/VpcCidrBlockAssociation.h>
17#include <aws/ec2/model/Tag.h>
18#include <utility>
19
20namespace Aws
21{
22namespace Utils
23{
24namespace Xml
25{
26 class XmlNode;
27} // namespace Xml
28} // namespace Utils
29namespace EC2
30{
31namespace Model
32{
33
39 class Vpc
40 {
41 public:
42 AWS_EC2_API Vpc() = default;
43 AWS_EC2_API Vpc(const Aws::Utils::Xml::XmlNode& xmlNode);
44 AWS_EC2_API Vpc& operator=(const Aws::Utils::Xml::XmlNode& xmlNode);
45
46 AWS_EC2_API void OutputToStream(Aws::OStream& ostream, const char* location, unsigned index, const char* locationValue) const;
47 AWS_EC2_API void OutputToStream(Aws::OStream& oStream, const char* location) const;
48
49
51
54 inline const Aws::String& GetOwnerId() const { return m_ownerId; }
55 inline bool OwnerIdHasBeenSet() const { return m_ownerIdHasBeenSet; }
56 template<typename OwnerIdT = Aws::String>
57 void SetOwnerId(OwnerIdT&& value) { m_ownerIdHasBeenSet = true; m_ownerId = std::forward<OwnerIdT>(value); }
58 template<typename OwnerIdT = Aws::String>
59 Vpc& WithOwnerId(OwnerIdT&& value) { SetOwnerId(std::forward<OwnerIdT>(value)); return *this;}
61
63
66 inline Tenancy GetInstanceTenancy() const { return m_instanceTenancy; }
67 inline bool InstanceTenancyHasBeenSet() const { return m_instanceTenancyHasBeenSet; }
68 inline void SetInstanceTenancy(Tenancy value) { m_instanceTenancyHasBeenSet = true; m_instanceTenancy = value; }
69 inline Vpc& WithInstanceTenancy(Tenancy value) { SetInstanceTenancy(value); return *this;}
71
73
76 inline const Aws::Vector<VpcIpv6CidrBlockAssociation>& GetIpv6CidrBlockAssociationSet() const { return m_ipv6CidrBlockAssociationSet; }
77 inline bool Ipv6CidrBlockAssociationSetHasBeenSet() const { return m_ipv6CidrBlockAssociationSetHasBeenSet; }
78 template<typename Ipv6CidrBlockAssociationSetT = Aws::Vector<VpcIpv6CidrBlockAssociation>>
79 void SetIpv6CidrBlockAssociationSet(Ipv6CidrBlockAssociationSetT&& value) { m_ipv6CidrBlockAssociationSetHasBeenSet = true; m_ipv6CidrBlockAssociationSet = std::forward<Ipv6CidrBlockAssociationSetT>(value); }
80 template<typename Ipv6CidrBlockAssociationSetT = Aws::Vector<VpcIpv6CidrBlockAssociation>>
81 Vpc& WithIpv6CidrBlockAssociationSet(Ipv6CidrBlockAssociationSetT&& value) { SetIpv6CidrBlockAssociationSet(std::forward<Ipv6CidrBlockAssociationSetT>(value)); return *this;}
82 template<typename Ipv6CidrBlockAssociationSetT = VpcIpv6CidrBlockAssociation>
83 Vpc& AddIpv6CidrBlockAssociationSet(Ipv6CidrBlockAssociationSetT&& value) { m_ipv6CidrBlockAssociationSetHasBeenSet = true; m_ipv6CidrBlockAssociationSet.emplace_back(std::forward<Ipv6CidrBlockAssociationSetT>(value)); return *this; }
85
87
90 inline const Aws::Vector<VpcCidrBlockAssociation>& GetCidrBlockAssociationSet() const { return m_cidrBlockAssociationSet; }
91 inline bool CidrBlockAssociationSetHasBeenSet() const { return m_cidrBlockAssociationSetHasBeenSet; }
92 template<typename CidrBlockAssociationSetT = Aws::Vector<VpcCidrBlockAssociation>>
93 void SetCidrBlockAssociationSet(CidrBlockAssociationSetT&& value) { m_cidrBlockAssociationSetHasBeenSet = true; m_cidrBlockAssociationSet = std::forward<CidrBlockAssociationSetT>(value); }
94 template<typename CidrBlockAssociationSetT = Aws::Vector<VpcCidrBlockAssociation>>
95 Vpc& WithCidrBlockAssociationSet(CidrBlockAssociationSetT&& value) { SetCidrBlockAssociationSet(std::forward<CidrBlockAssociationSetT>(value)); return *this;}
96 template<typename CidrBlockAssociationSetT = VpcCidrBlockAssociation>
97 Vpc& AddCidrBlockAssociationSet(CidrBlockAssociationSetT&& value) { m_cidrBlockAssociationSetHasBeenSet = true; m_cidrBlockAssociationSet.emplace_back(std::forward<CidrBlockAssociationSetT>(value)); return *this; }
99
101
104 inline bool GetIsDefault() const { return m_isDefault; }
105 inline bool IsDefaultHasBeenSet() const { return m_isDefaultHasBeenSet; }
106 inline void SetIsDefault(bool value) { m_isDefaultHasBeenSet = true; m_isDefault = value; }
107 inline Vpc& WithIsDefault(bool value) { SetIsDefault(value); return *this;}
109
111
112 inline const VpcEncryptionControl& GetEncryptionControl() const { return m_encryptionControl; }
113 inline bool EncryptionControlHasBeenSet() const { return m_encryptionControlHasBeenSet; }
114 template<typename EncryptionControlT = VpcEncryptionControl>
115 void SetEncryptionControl(EncryptionControlT&& value) { m_encryptionControlHasBeenSet = true; m_encryptionControl = std::forward<EncryptionControlT>(value); }
116 template<typename EncryptionControlT = VpcEncryptionControl>
117 Vpc& WithEncryptionControl(EncryptionControlT&& value) { SetEncryptionControl(std::forward<EncryptionControlT>(value)); return *this;}
119
121
124 inline const Aws::Vector<Tag>& GetTags() const { return m_tags; }
125 inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; }
126 template<typename TagsT = Aws::Vector<Tag>>
127 void SetTags(TagsT&& value) { m_tagsHasBeenSet = true; m_tags = std::forward<TagsT>(value); }
128 template<typename TagsT = Aws::Vector<Tag>>
129 Vpc& WithTags(TagsT&& value) { SetTags(std::forward<TagsT>(value)); return *this;}
130 template<typename TagsT = Tag>
131 Vpc& AddTags(TagsT&& value) { m_tagsHasBeenSet = true; m_tags.emplace_back(std::forward<TagsT>(value)); return *this; }
133
135
138 inline const BlockPublicAccessStates& GetBlockPublicAccessStates() const { return m_blockPublicAccessStates; }
139 inline bool BlockPublicAccessStatesHasBeenSet() const { return m_blockPublicAccessStatesHasBeenSet; }
140 template<typename BlockPublicAccessStatesT = BlockPublicAccessStates>
141 void SetBlockPublicAccessStates(BlockPublicAccessStatesT&& value) { m_blockPublicAccessStatesHasBeenSet = true; m_blockPublicAccessStates = std::forward<BlockPublicAccessStatesT>(value); }
142 template<typename BlockPublicAccessStatesT = BlockPublicAccessStates>
143 Vpc& WithBlockPublicAccessStates(BlockPublicAccessStatesT&& value) { SetBlockPublicAccessStates(std::forward<BlockPublicAccessStatesT>(value)); return *this;}
145
147
150 inline const Aws::String& GetVpcId() const { return m_vpcId; }
151 inline bool VpcIdHasBeenSet() const { return m_vpcIdHasBeenSet; }
152 template<typename VpcIdT = Aws::String>
153 void SetVpcId(VpcIdT&& value) { m_vpcIdHasBeenSet = true; m_vpcId = std::forward<VpcIdT>(value); }
154 template<typename VpcIdT = Aws::String>
155 Vpc& WithVpcId(VpcIdT&& value) { SetVpcId(std::forward<VpcIdT>(value)); return *this;}
157
159
162 inline VpcState GetState() const { return m_state; }
163 inline bool StateHasBeenSet() const { return m_stateHasBeenSet; }
164 inline void SetState(VpcState value) { m_stateHasBeenSet = true; m_state = value; }
165 inline Vpc& WithState(VpcState value) { SetState(value); return *this;}
167
169
172 inline const Aws::String& GetCidrBlock() const { return m_cidrBlock; }
173 inline bool CidrBlockHasBeenSet() const { return m_cidrBlockHasBeenSet; }
174 template<typename CidrBlockT = Aws::String>
175 void SetCidrBlock(CidrBlockT&& value) { m_cidrBlockHasBeenSet = true; m_cidrBlock = std::forward<CidrBlockT>(value); }
176 template<typename CidrBlockT = Aws::String>
177 Vpc& WithCidrBlock(CidrBlockT&& value) { SetCidrBlock(std::forward<CidrBlockT>(value)); return *this;}
179
181
184 inline const Aws::String& GetDhcpOptionsId() const { return m_dhcpOptionsId; }
185 inline bool DhcpOptionsIdHasBeenSet() const { return m_dhcpOptionsIdHasBeenSet; }
186 template<typename DhcpOptionsIdT = Aws::String>
187 void SetDhcpOptionsId(DhcpOptionsIdT&& value) { m_dhcpOptionsIdHasBeenSet = true; m_dhcpOptionsId = std::forward<DhcpOptionsIdT>(value); }
188 template<typename DhcpOptionsIdT = Aws::String>
189 Vpc& WithDhcpOptionsId(DhcpOptionsIdT&& value) { SetDhcpOptionsId(std::forward<DhcpOptionsIdT>(value)); return *this;}
191 private:
192
193 Aws::String m_ownerId;
194 bool m_ownerIdHasBeenSet = false;
195
196 Tenancy m_instanceTenancy{Tenancy::NOT_SET};
197 bool m_instanceTenancyHasBeenSet = false;
198
199 Aws::Vector<VpcIpv6CidrBlockAssociation> m_ipv6CidrBlockAssociationSet;
200 bool m_ipv6CidrBlockAssociationSetHasBeenSet = false;
201
202 Aws::Vector<VpcCidrBlockAssociation> m_cidrBlockAssociationSet;
203 bool m_cidrBlockAssociationSetHasBeenSet = false;
204
205 bool m_isDefault{false};
206 bool m_isDefaultHasBeenSet = false;
207
208 VpcEncryptionControl m_encryptionControl;
209 bool m_encryptionControlHasBeenSet = false;
210
211 Aws::Vector<Tag> m_tags;
212 bool m_tagsHasBeenSet = false;
213
214 BlockPublicAccessStates m_blockPublicAccessStates;
215 bool m_blockPublicAccessStatesHasBeenSet = false;
216
217 Aws::String m_vpcId;
218 bool m_vpcIdHasBeenSet = false;
219
221 bool m_stateHasBeenSet = false;
222
223 Aws::String m_cidrBlock;
224 bool m_cidrBlockHasBeenSet = false;
225
226 Aws::String m_dhcpOptionsId;
227 bool m_dhcpOptionsIdHasBeenSet = false;
228 };
229
230} // namespace Model
231} // namespace EC2
232} // namespace Aws
void SetVpcId(VpcIdT &&value)
Definition Vpc.h:153
const Aws::String & GetVpcId() const
Definition Vpc.h:150
Vpc & WithEncryptionControl(EncryptionControlT &&value)
Definition Vpc.h:117
void SetTags(TagsT &&value)
Definition Vpc.h:127
bool TagsHasBeenSet() const
Definition Vpc.h:125
const Aws::String & GetCidrBlock() const
Definition Vpc.h:172
Vpc & WithIsDefault(bool value)
Definition Vpc.h:107
bool IsDefaultHasBeenSet() const
Definition Vpc.h:105
const VpcEncryptionControl & GetEncryptionControl() const
Definition Vpc.h:112
void SetIpv6CidrBlockAssociationSet(Ipv6CidrBlockAssociationSetT &&value)
Definition Vpc.h:79
void SetState(VpcState value)
Definition Vpc.h:164
Vpc & WithCidrBlockAssociationSet(CidrBlockAssociationSetT &&value)
Definition Vpc.h:95
const Aws::Vector< VpcIpv6CidrBlockAssociation > & GetIpv6CidrBlockAssociationSet() const
Definition Vpc.h:76
VpcState GetState() const
Definition Vpc.h:162
bool OwnerIdHasBeenSet() const
Definition Vpc.h:55
void SetIsDefault(bool value)
Definition Vpc.h:106
bool CidrBlockAssociationSetHasBeenSet() const
Definition Vpc.h:91
bool VpcIdHasBeenSet() const
Definition Vpc.h:151
const Aws::String & GetDhcpOptionsId() const
Definition Vpc.h:184
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:175
void SetEncryptionControl(EncryptionControlT &&value)
Definition Vpc.h:115
Vpc & WithCidrBlock(CidrBlockT &&value)
Definition Vpc.h:177
Vpc & WithDhcpOptionsId(DhcpOptionsIdT &&value)
Definition Vpc.h:189
const Aws::Vector< VpcCidrBlockAssociation > & GetCidrBlockAssociationSet() const
Definition Vpc.h:90
Vpc & WithBlockPublicAccessStates(BlockPublicAccessStatesT &&value)
Definition Vpc.h:143
Vpc & AddIpv6CidrBlockAssociationSet(Ipv6CidrBlockAssociationSetT &&value)
Definition Vpc.h:83
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:129
bool CidrBlockHasBeenSet() const
Definition Vpc.h:173
Vpc & AddCidrBlockAssociationSet(CidrBlockAssociationSetT &&value)
Definition Vpc.h:97
Vpc & AddTags(TagsT &&value)
Definition Vpc.h:131
Vpc & WithInstanceTenancy(Tenancy value)
Definition Vpc.h:69
Vpc & WithState(VpcState value)
Definition Vpc.h:165
Vpc & WithOwnerId(OwnerIdT &&value)
Definition Vpc.h:59
const BlockPublicAccessStates & GetBlockPublicAccessStates() const
Definition Vpc.h:138
bool Ipv6CidrBlockAssociationSetHasBeenSet() const
Definition Vpc.h:77
bool StateHasBeenSet() const
Definition Vpc.h:163
bool EncryptionControlHasBeenSet() const
Definition Vpc.h:113
const Aws::String & GetOwnerId() const
Definition Vpc.h:54
void SetCidrBlockAssociationSet(CidrBlockAssociationSetT &&value)
Definition Vpc.h:93
void SetDhcpOptionsId(DhcpOptionsIdT &&value)
Definition Vpc.h:187
AWS_EC2_API void OutputToStream(Aws::OStream &oStream, const char *location) const
bool GetIsDefault() const
Definition Vpc.h:104
Vpc & WithIpv6CidrBlockAssociationSet(Ipv6CidrBlockAssociationSetT &&value)
Definition Vpc.h:81
bool InstanceTenancyHasBeenSet() const
Definition Vpc.h:67
AWS_EC2_API Vpc()=default
bool BlockPublicAccessStatesHasBeenSet() const
Definition Vpc.h:139
Vpc & WithVpcId(VpcIdT &&value)
Definition Vpc.h:155
const Aws::Vector< Tag > & GetTags() const
Definition Vpc.h:124
void SetOwnerId(OwnerIdT &&value)
Definition Vpc.h:57
void SetBlockPublicAccessStates(BlockPublicAccessStatesT &&value)
Definition Vpc.h:141
void SetInstanceTenancy(Tenancy value)
Definition Vpc.h:68
bool DhcpOptionsIdHasBeenSet() const
Definition Vpc.h:185
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