AWS SDK for C++  0.14.3
AWS SDK for C++
NetworkAcl.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>
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  NetworkAcl();
45  NetworkAcl(const Aws::Utils::Xml::XmlNode& xmlNode);
46  NetworkAcl& 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& GetNetworkAclId() const{ return m_networkAclId; }
55 
59  inline void SetNetworkAclId(const Aws::String& value) { m_networkAclIdHasBeenSet = true; m_networkAclId = value; }
60 
64  inline void SetNetworkAclId(Aws::String&& value) { m_networkAclIdHasBeenSet = true; m_networkAclId = value; }
65 
69  inline void SetNetworkAclId(const char* value) { m_networkAclIdHasBeenSet = true; m_networkAclId.assign(value); }
70 
74  inline NetworkAcl& WithNetworkAclId(const Aws::String& value) { SetNetworkAclId(value); return *this;}
75 
79  inline NetworkAcl& WithNetworkAclId(Aws::String&& value) { SetNetworkAclId(value); return *this;}
80 
84  inline NetworkAcl& WithNetworkAclId(const char* value) { SetNetworkAclId(value); return *this;}
85 
89  inline const Aws::String& GetVpcId() const{ return m_vpcId; }
90 
94  inline void SetVpcId(const Aws::String& value) { m_vpcIdHasBeenSet = true; m_vpcId = value; }
95 
99  inline void SetVpcId(Aws::String&& value) { m_vpcIdHasBeenSet = true; m_vpcId = value; }
100 
104  inline void SetVpcId(const char* value) { m_vpcIdHasBeenSet = true; m_vpcId.assign(value); }
105 
109  inline NetworkAcl& WithVpcId(const Aws::String& value) { SetVpcId(value); return *this;}
110 
114  inline NetworkAcl& WithVpcId(Aws::String&& value) { SetVpcId(value); return *this;}
115 
119  inline NetworkAcl& WithVpcId(const char* value) { SetVpcId(value); return *this;}
120 
124  inline bool GetIsDefault() const{ return m_isDefault; }
125 
129  inline void SetIsDefault(bool value) { m_isDefaultHasBeenSet = true; m_isDefault = value; }
130 
134  inline NetworkAcl& WithIsDefault(bool value) { SetIsDefault(value); return *this;}
135 
139  inline const Aws::Vector<NetworkAclEntry>& GetEntries() const{ return m_entries; }
140 
144  inline void SetEntries(const Aws::Vector<NetworkAclEntry>& value) { m_entriesHasBeenSet = true; m_entries = value; }
145 
149  inline void SetEntries(Aws::Vector<NetworkAclEntry>&& value) { m_entriesHasBeenSet = true; m_entries = value; }
150 
154  inline NetworkAcl& WithEntries(const Aws::Vector<NetworkAclEntry>& value) { SetEntries(value); return *this;}
155 
159  inline NetworkAcl& WithEntries(Aws::Vector<NetworkAclEntry>&& value) { SetEntries(value); return *this;}
160 
164  inline NetworkAcl& AddEntries(const NetworkAclEntry& value) { m_entriesHasBeenSet = true; m_entries.push_back(value); return *this; }
165 
169  inline NetworkAcl& AddEntries(NetworkAclEntry&& value) { m_entriesHasBeenSet = true; m_entries.push_back(value); return *this; }
170 
174  inline const Aws::Vector<NetworkAclAssociation>& GetAssociations() const{ return m_associations; }
175 
179  inline void SetAssociations(const Aws::Vector<NetworkAclAssociation>& value) { m_associationsHasBeenSet = true; m_associations = value; }
180 
184  inline void SetAssociations(Aws::Vector<NetworkAclAssociation>&& value) { m_associationsHasBeenSet = true; m_associations = value; }
185 
189  inline NetworkAcl& WithAssociations(const Aws::Vector<NetworkAclAssociation>& value) { SetAssociations(value); return *this;}
190 
194  inline NetworkAcl& WithAssociations(Aws::Vector<NetworkAclAssociation>&& value) { SetAssociations(value); return *this;}
195 
199  inline NetworkAcl& AddAssociations(const NetworkAclAssociation& value) { m_associationsHasBeenSet = true; m_associations.push_back(value); return *this; }
200 
204  inline NetworkAcl& AddAssociations(NetworkAclAssociation&& value) { m_associationsHasBeenSet = true; m_associations.push_back(value); return *this; }
205 
209  inline const Aws::Vector<Tag>& GetTags() const{ return m_tags; }
210 
214  inline void SetTags(const Aws::Vector<Tag>& value) { m_tagsHasBeenSet = true; m_tags = value; }
215 
219  inline void SetTags(Aws::Vector<Tag>&& value) { m_tagsHasBeenSet = true; m_tags = value; }
220 
224  inline NetworkAcl& WithTags(const Aws::Vector<Tag>& value) { SetTags(value); return *this;}
225 
229  inline NetworkAcl& WithTags(Aws::Vector<Tag>&& value) { SetTags(value); return *this;}
230 
234  inline NetworkAcl& AddTags(const Tag& value) { m_tagsHasBeenSet = true; m_tags.push_back(value); return *this; }
235 
239  inline NetworkAcl& AddTags(Tag&& value) { m_tagsHasBeenSet = true; m_tags.push_back(value); return *this; }
240 
241  private:
242  Aws::String m_networkAclId;
243  bool m_networkAclIdHasBeenSet;
244  Aws::String m_vpcId;
245  bool m_vpcIdHasBeenSet;
246  bool m_isDefault;
247  bool m_isDefaultHasBeenSet;
249  bool m_entriesHasBeenSet;
250  Aws::Vector<NetworkAclAssociation> m_associations;
251  bool m_associationsHasBeenSet;
252  Aws::Vector<Tag> m_tags;
253  bool m_tagsHasBeenSet;
254  };
255 
256 } // namespace Model
257 } // namespace EC2
258 } // namespace Aws
void SetNetworkAclId(Aws::String &&value)
Definition: NetworkAcl.h:64
NetworkAcl & AddEntries(NetworkAclEntry &&value)
Definition: NetworkAcl.h:169
const Aws::Vector< Tag > & GetTags() const
Definition: NetworkAcl.h:209
bool GetIsDefault() const
Definition: NetworkAcl.h:124
void SetAssociations(Aws::Vector< NetworkAclAssociation > &&value)
Definition: NetworkAcl.h:184
void SetEntries(Aws::Vector< NetworkAclEntry > &&value)
Definition: NetworkAcl.h:149
const Aws::String & GetNetworkAclId() const
Definition: NetworkAcl.h:54
NetworkAcl & AddEntries(const NetworkAclEntry &value)
Definition: NetworkAcl.h:164
NetworkAcl & WithEntries(const Aws::Vector< NetworkAclEntry > &value)
Definition: NetworkAcl.h:154
NetworkAcl & WithEntries(Aws::Vector< NetworkAclEntry > &&value)
Definition: NetworkAcl.h:159
const Aws::String & GetVpcId() const
Definition: NetworkAcl.h:89
void SetIsDefault(bool value)
Definition: NetworkAcl.h:129
std::vector< T, Aws::Allocator< T > > Vector
Definition: AWSVector.h:27
const Aws::Vector< NetworkAclAssociation > & GetAssociations() const
Definition: NetworkAcl.h:174
NetworkAcl & WithNetworkAclId(const Aws::String &value)
Definition: NetworkAcl.h:74
NetworkAcl & WithVpcId(Aws::String &&value)
Definition: NetworkAcl.h:114
NetworkAcl & AddAssociations(NetworkAclAssociation &&value)
Definition: NetworkAcl.h:204
void SetAssociations(const Aws::Vector< NetworkAclAssociation > &value)
Definition: NetworkAcl.h:179
void SetEntries(const Aws::Vector< NetworkAclEntry > &value)
Definition: NetworkAcl.h:144
NetworkAcl & WithTags(Aws::Vector< Tag > &&value)
Definition: NetworkAcl.h:229
void SetNetworkAclId(const char *value)
Definition: NetworkAcl.h:69
NetworkAcl & WithVpcId(const char *value)
Definition: NetworkAcl.h:119
std::basic_ostream< char, std::char_traits< char > > OStream
Definition: AWSStreamFwd.h:31
void SetTags(Aws::Vector< Tag > &&value)
Definition: NetworkAcl.h:219
void SetVpcId(const Aws::String &value)
Definition: NetworkAcl.h:94
void SetTags(const Aws::Vector< Tag > &value)
Definition: NetworkAcl.h:214
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Definition: AWSString.h:97
NetworkAcl & AddAssociations(const NetworkAclAssociation &value)
Definition: NetworkAcl.h:199
void SetVpcId(Aws::String &&value)
Definition: NetworkAcl.h:99
NetworkAcl & WithAssociations(Aws::Vector< NetworkAclAssociation > &&value)
Definition: NetworkAcl.h:194
NetworkAcl & WithAssociations(const Aws::Vector< NetworkAclAssociation > &value)
Definition: NetworkAcl.h:189
NetworkAcl & WithVpcId(const Aws::String &value)
Definition: NetworkAcl.h:109
const Aws::Vector< NetworkAclEntry > & GetEntries() const
Definition: NetworkAcl.h:139
NetworkAcl & WithTags(const Aws::Vector< Tag > &value)
Definition: NetworkAcl.h:224
NetworkAcl & AddTags(const Tag &value)
Definition: NetworkAcl.h:234
#define AWS_EC2_API
Definition: EC2_EXPORTS.h:37
void SetNetworkAclId(const Aws::String &value)
Definition: NetworkAcl.h:59
NetworkAcl & WithNetworkAclId(Aws::String &&value)
Definition: NetworkAcl.h:79
void SetVpcId(const char *value)
Definition: NetworkAcl.h:104
NetworkAcl & AddTags(Tag &&value)
Definition: NetworkAcl.h:239
JSON (JavaScript Object Notation).
NetworkAcl & WithNetworkAclId(const char *value)
Definition: NetworkAcl.h:84
NetworkAcl & WithIsDefault(bool value)
Definition: NetworkAcl.h:134