AWS SDK for C++  0.12.9
AWS SDK for C++
Vpc.h
Go to the documentation of this file.
1 /*
2 * Copyright 2010-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License").
5 * You may not use this file except in compliance with the License.
6 * A copy of the License is located at
7 *
8 * http://aws.amazon.com/apache2.0
9 *
10 * or in the "license" file accompanying this file. This file is distributed
11 * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
12 * express or implied. See the License for the specific language governing
13 * permissions and limitations under the License.
14 */
15 #pragma once
16 #include <aws/ec2/EC2_EXPORTS.h>
19 #include <aws/ec2/model/VpcState.h>
21 #include <aws/ec2/model/Tenancy.h>
22 #include <aws/ec2/model/Tag.h>
23 
24 namespace Aws
25 {
26 namespace Utils
27 {
28 namespace Xml
29 {
30  class XmlNode;
31 } // namespace Xml
32 } // namespace Utils
33 namespace EC2
34 {
35 namespace Model
36 {
37 
42  {
43  public:
44  Vpc();
45  Vpc(const Aws::Utils::Xml::XmlNode& xmlNode);
46  Vpc& operator=(const Aws::Utils::Xml::XmlNode& xmlNode);
47 
48  void OutputToStream(Aws::OStream& ostream, const char* location, unsigned index, const char* locationValue) const;
49  void OutputToStream(Aws::OStream& oStream, const char* location) const;
50 
54  inline const Aws::String& GetVpcId() const{ return m_vpcId; }
55 
59  inline void SetVpcId(const Aws::String& value) { m_vpcIdHasBeenSet = true; m_vpcId = value; }
60 
64  inline void SetVpcId(Aws::String&& value) { m_vpcIdHasBeenSet = true; m_vpcId = value; }
65 
69  inline void SetVpcId(const char* value) { m_vpcIdHasBeenSet = true; m_vpcId.assign(value); }
70 
74  inline Vpc& WithVpcId(const Aws::String& value) { SetVpcId(value); return *this;}
75 
79  inline Vpc& WithVpcId(Aws::String&& value) { SetVpcId(value); return *this;}
80 
84  inline Vpc& WithVpcId(const char* value) { SetVpcId(value); return *this;}
85 
89  inline const VpcState& GetState() const{ return m_state; }
90 
94  inline void SetState(const VpcState& value) { m_stateHasBeenSet = true; m_state = value; }
95 
99  inline void SetState(VpcState&& value) { m_stateHasBeenSet = true; m_state = value; }
100 
104  inline Vpc& WithState(const VpcState& value) { SetState(value); return *this;}
105 
109  inline Vpc& WithState(VpcState&& value) { SetState(value); return *this;}
110 
114  inline const Aws::String& GetCidrBlock() const{ return m_cidrBlock; }
115 
119  inline void SetCidrBlock(const Aws::String& value) { m_cidrBlockHasBeenSet = true; m_cidrBlock = value; }
120 
124  inline void SetCidrBlock(Aws::String&& value) { m_cidrBlockHasBeenSet = true; m_cidrBlock = value; }
125 
129  inline void SetCidrBlock(const char* value) { m_cidrBlockHasBeenSet = true; m_cidrBlock.assign(value); }
130 
134  inline Vpc& WithCidrBlock(const Aws::String& value) { SetCidrBlock(value); return *this;}
135 
139  inline Vpc& WithCidrBlock(Aws::String&& value) { SetCidrBlock(value); return *this;}
140 
144  inline Vpc& WithCidrBlock(const char* value) { SetCidrBlock(value); return *this;}
145 
150  inline const Aws::String& GetDhcpOptionsId() const{ return m_dhcpOptionsId; }
151 
156  inline void SetDhcpOptionsId(const Aws::String& value) { m_dhcpOptionsIdHasBeenSet = true; m_dhcpOptionsId = value; }
157 
162  inline void SetDhcpOptionsId(Aws::String&& value) { m_dhcpOptionsIdHasBeenSet = true; m_dhcpOptionsId = value; }
163 
168  inline void SetDhcpOptionsId(const char* value) { m_dhcpOptionsIdHasBeenSet = true; m_dhcpOptionsId.assign(value); }
169 
174  inline Vpc& WithDhcpOptionsId(const Aws::String& value) { SetDhcpOptionsId(value); return *this;}
175 
180  inline Vpc& WithDhcpOptionsId(Aws::String&& value) { SetDhcpOptionsId(value); return *this;}
181 
186  inline Vpc& WithDhcpOptionsId(const char* value) { SetDhcpOptionsId(value); return *this;}
187 
191  inline const Aws::Vector<Tag>& GetTags() const{ return m_tags; }
192 
196  inline void SetTags(const Aws::Vector<Tag>& value) { m_tagsHasBeenSet = true; m_tags = value; }
197 
201  inline void SetTags(Aws::Vector<Tag>&& value) { m_tagsHasBeenSet = true; m_tags = value; }
202 
206  inline Vpc& WithTags(const Aws::Vector<Tag>& value) { SetTags(value); return *this;}
207 
211  inline Vpc& WithTags(Aws::Vector<Tag>&& value) { SetTags(value); return *this;}
212 
216  inline Vpc& AddTags(const Tag& value) { m_tagsHasBeenSet = true; m_tags.push_back(value); return *this; }
217 
221  inline Vpc& AddTags(Tag&& value) { m_tagsHasBeenSet = true; m_tags.push_back(value); return *this; }
222 
226  inline const Tenancy& GetInstanceTenancy() const{ return m_instanceTenancy; }
227 
231  inline void SetInstanceTenancy(const Tenancy& value) { m_instanceTenancyHasBeenSet = true; m_instanceTenancy = value; }
232 
236  inline void SetInstanceTenancy(Tenancy&& value) { m_instanceTenancyHasBeenSet = true; m_instanceTenancy = value; }
237 
241  inline Vpc& WithInstanceTenancy(const Tenancy& value) { SetInstanceTenancy(value); return *this;}
242 
246  inline Vpc& WithInstanceTenancy(Tenancy&& value) { SetInstanceTenancy(value); return *this;}
247 
251  inline bool GetIsDefault() const{ return m_isDefault; }
252 
256  inline void SetIsDefault(bool value) { m_isDefaultHasBeenSet = true; m_isDefault = value; }
257 
261  inline Vpc& WithIsDefault(bool value) { SetIsDefault(value); return *this;}
262 
263  private:
264  Aws::String m_vpcId;
265  bool m_vpcIdHasBeenSet;
266  VpcState m_state;
267  bool m_stateHasBeenSet;
268  Aws::String m_cidrBlock;
269  bool m_cidrBlockHasBeenSet;
270  Aws::String m_dhcpOptionsId;
271  bool m_dhcpOptionsIdHasBeenSet;
272  Aws::Vector<Tag> m_tags;
273  bool m_tagsHasBeenSet;
274  Tenancy m_instanceTenancy;
275  bool m_instanceTenancyHasBeenSet;
276  bool m_isDefault;
277  bool m_isDefaultHasBeenSet;
278  };
279 
280 } // namespace Model
281 } // namespace EC2
282 } // namespace Aws
void SetDhcpOptionsId(const Aws::String &value)
Definition: Vpc.h:156
const Aws::String & GetVpcId() const
Definition: Vpc.h:54
const VpcState & GetState() const
Definition: Vpc.h:89
Vpc & WithState(const VpcState &value)
Definition: Vpc.h:104
Vpc & WithState(VpcState &&value)
Definition: Vpc.h:109
Vpc & WithVpcId(const char *value)
Definition: Vpc.h:84
Vpc & WithCidrBlock(const char *value)
Definition: Vpc.h:144
Vpc & WithVpcId(Aws::String &&value)
Definition: Vpc.h:79
bool GetIsDefault() const
Definition: Vpc.h:251
void SetVpcId(const Aws::String &value)
Definition: Vpc.h:59
std::vector< T, Aws::Allocator< T > > Vector
Definition: AWSVector.h:27
void SetState(const VpcState &value)
Definition: Vpc.h:94
void SetCidrBlock(Aws::String &&value)
Definition: Vpc.h:124
Vpc & AddTags(Tag &&value)
Definition: Vpc.h:221
Vpc & WithInstanceTenancy(Tenancy &&value)
Definition: Vpc.h:246
Vpc & WithDhcpOptionsId(Aws::String &&value)
Definition: Vpc.h:180
const Aws::Vector< Tag > & GetTags() const
Definition: Vpc.h:191
Vpc & WithCidrBlock(const Aws::String &value)
Definition: Vpc.h:134
const Aws::String & GetCidrBlock() const
Definition: Vpc.h:114
Vpc & AddTags(const Tag &value)
Definition: Vpc.h:216
Vpc & WithTags(Aws::Vector< Tag > &&value)
Definition: Vpc.h:211
Vpc & WithVpcId(const Aws::String &value)
Definition: Vpc.h:74
Vpc & WithTags(const Aws::Vector< Tag > &value)
Definition: Vpc.h:206
std::basic_ostream< char, std::char_traits< char > > OStream
Definition: AWSStreamFwd.h:31
const Aws::String & GetDhcpOptionsId() const
Definition: Vpc.h:150
void SetDhcpOptionsId(Aws::String &&value)
Definition: Vpc.h:162
Vpc & WithIsDefault(bool value)
Definition: Vpc.h:261
Vpc & WithCidrBlock(Aws::String &&value)
Definition: Vpc.h:139
void SetVpcId(Aws::String &&value)
Definition: Vpc.h:64
void SetTags(Aws::Vector< Tag > &&value)
Definition: Vpc.h:201
void SetCidrBlock(const char *value)
Definition: Vpc.h:129
Vpc & WithDhcpOptionsId(const char *value)
Definition: Vpc.h:186
void SetTags(const Aws::Vector< Tag > &value)
Definition: Vpc.h:196
Vpc & WithDhcpOptionsId(const Aws::String &value)
Definition: Vpc.h:174
void SetDhcpOptionsId(const char *value)
Definition: Vpc.h:168
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Definition: AWSString.h:97
void SetInstanceTenancy(const Tenancy &value)
Definition: Vpc.h:231
void SetVpcId(const char *value)
Definition: Vpc.h:69
void SetCidrBlock(const Aws::String &value)
Definition: Vpc.h:119
Vpc & WithInstanceTenancy(const Tenancy &value)
Definition: Vpc.h:241
void SetIsDefault(bool value)
Definition: Vpc.h:256
#define AWS_EC2_API
Definition: EC2_EXPORTS.h:34
void SetInstanceTenancy(Tenancy &&value)
Definition: Vpc.h:236
void SetState(VpcState &&value)
Definition: Vpc.h:99
const Tenancy & GetInstanceTenancy() const
Definition: Vpc.h:226
JSON (JavaScript Object Notation).