AWS SDK for C++

AWS SDK for C++ Version 1.11.717

Loading...
Searching...
No Matches
NetworkAcl.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/NetworkAclAssociation.h>
12#include <aws/ec2/model/NetworkAclEntry.h>
13#include <aws/ec2/model/Tag.h>
14
15#include <utility>
16
17namespace Aws {
18namespace Utils {
19namespace Xml {
20class XmlNode;
21} // namespace Xml
22} // namespace Utils
23namespace EC2 {
24namespace Model {
25
32 public:
33 AWS_EC2_API NetworkAcl() = default;
34 AWS_EC2_API NetworkAcl(const Aws::Utils::Xml::XmlNode& xmlNode);
35 AWS_EC2_API NetworkAcl& operator=(const Aws::Utils::Xml::XmlNode& xmlNode);
36
37 AWS_EC2_API void OutputToStream(Aws::OStream& ostream, const char* location, unsigned index, const char* locationValue) const;
38 AWS_EC2_API void OutputToStream(Aws::OStream& oStream, const char* location) const;
39
41
44 inline const Aws::Vector<NetworkAclAssociation>& GetAssociations() const { return m_associations; }
45 inline bool AssociationsHasBeenSet() const { return m_associationsHasBeenSet; }
46 template <typename AssociationsT = Aws::Vector<NetworkAclAssociation>>
47 void SetAssociations(AssociationsT&& value) {
48 m_associationsHasBeenSet = true;
49 m_associations = std::forward<AssociationsT>(value);
50 }
51 template <typename AssociationsT = Aws::Vector<NetworkAclAssociation>>
52 NetworkAcl& WithAssociations(AssociationsT&& value) {
53 SetAssociations(std::forward<AssociationsT>(value));
54 return *this;
55 }
56 template <typename AssociationsT = NetworkAclAssociation>
57 NetworkAcl& AddAssociations(AssociationsT&& value) {
58 m_associationsHasBeenSet = true;
59 m_associations.emplace_back(std::forward<AssociationsT>(value));
60 return *this;
61 }
63
65
68 inline const Aws::Vector<NetworkAclEntry>& GetEntries() const { return m_entries; }
69 inline bool EntriesHasBeenSet() const { return m_entriesHasBeenSet; }
70 template <typename EntriesT = Aws::Vector<NetworkAclEntry>>
71 void SetEntries(EntriesT&& value) {
72 m_entriesHasBeenSet = true;
73 m_entries = std::forward<EntriesT>(value);
74 }
75 template <typename EntriesT = Aws::Vector<NetworkAclEntry>>
76 NetworkAcl& WithEntries(EntriesT&& value) {
77 SetEntries(std::forward<EntriesT>(value));
78 return *this;
79 }
80 template <typename EntriesT = NetworkAclEntry>
81 NetworkAcl& AddEntries(EntriesT&& value) {
82 m_entriesHasBeenSet = true;
83 m_entries.emplace_back(std::forward<EntriesT>(value));
84 return *this;
85 }
87
89
92 inline bool GetIsDefault() const { return m_isDefault; }
93 inline bool IsDefaultHasBeenSet() const { return m_isDefaultHasBeenSet; }
94 inline void SetIsDefault(bool value) {
95 m_isDefaultHasBeenSet = true;
96 m_isDefault = value;
97 }
98 inline NetworkAcl& WithIsDefault(bool value) {
99 SetIsDefault(value);
100 return *this;
101 }
103
105
108 inline const Aws::String& GetNetworkAclId() const { return m_networkAclId; }
109 inline bool NetworkAclIdHasBeenSet() const { return m_networkAclIdHasBeenSet; }
110 template <typename NetworkAclIdT = Aws::String>
111 void SetNetworkAclId(NetworkAclIdT&& value) {
112 m_networkAclIdHasBeenSet = true;
113 m_networkAclId = std::forward<NetworkAclIdT>(value);
114 }
115 template <typename NetworkAclIdT = Aws::String>
116 NetworkAcl& WithNetworkAclId(NetworkAclIdT&& value) {
117 SetNetworkAclId(std::forward<NetworkAclIdT>(value));
118 return *this;
119 }
121
123
126 inline const Aws::Vector<Tag>& GetTags() const { return m_tags; }
127 inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; }
128 template <typename TagsT = Aws::Vector<Tag>>
129 void SetTags(TagsT&& value) {
130 m_tagsHasBeenSet = true;
131 m_tags = std::forward<TagsT>(value);
132 }
133 template <typename TagsT = Aws::Vector<Tag>>
134 NetworkAcl& WithTags(TagsT&& value) {
135 SetTags(std::forward<TagsT>(value));
136 return *this;
137 }
138 template <typename TagsT = Tag>
139 NetworkAcl& AddTags(TagsT&& value) {
140 m_tagsHasBeenSet = true;
141 m_tags.emplace_back(std::forward<TagsT>(value));
142 return *this;
143 }
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) {
154 m_vpcIdHasBeenSet = true;
155 m_vpcId = std::forward<VpcIdT>(value);
156 }
157 template <typename VpcIdT = Aws::String>
158 NetworkAcl& WithVpcId(VpcIdT&& value) {
159 SetVpcId(std::forward<VpcIdT>(value));
160 return *this;
161 }
163
165
168 inline const Aws::String& GetOwnerId() const { return m_ownerId; }
169 inline bool OwnerIdHasBeenSet() const { return m_ownerIdHasBeenSet; }
170 template <typename OwnerIdT = Aws::String>
171 void SetOwnerId(OwnerIdT&& value) {
172 m_ownerIdHasBeenSet = true;
173 m_ownerId = std::forward<OwnerIdT>(value);
174 }
175 template <typename OwnerIdT = Aws::String>
176 NetworkAcl& WithOwnerId(OwnerIdT&& value) {
177 SetOwnerId(std::forward<OwnerIdT>(value));
178 return *this;
179 }
181 private:
183
185
186 bool m_isDefault{false};
187
188 Aws::String m_networkAclId;
189
190 Aws::Vector<Tag> m_tags;
191
192 Aws::String m_vpcId;
193
194 Aws::String m_ownerId;
195 bool m_associationsHasBeenSet = false;
196 bool m_entriesHasBeenSet = false;
197 bool m_isDefaultHasBeenSet = false;
198 bool m_networkAclIdHasBeenSet = false;
199 bool m_tagsHasBeenSet = false;
200 bool m_vpcIdHasBeenSet = false;
201 bool m_ownerIdHasBeenSet = false;
202};
203
204} // namespace Model
205} // namespace EC2
206} // namespace Aws
bool AssociationsHasBeenSet() const
Definition NetworkAcl.h:45
void SetNetworkAclId(NetworkAclIdT &&value)
Definition NetworkAcl.h:111
AWS_EC2_API void OutputToStream(Aws::OStream &ostream, const char *location, unsigned index, const char *locationValue) const
AWS_EC2_API NetworkAcl()=default
NetworkAcl & WithIsDefault(bool value)
Definition NetworkAcl.h:98
AWS_EC2_API void OutputToStream(Aws::OStream &oStream, const char *location) const
const Aws::Vector< NetworkAclEntry > & GetEntries() const
Definition NetworkAcl.h:68
const Aws::Vector< NetworkAclAssociation > & GetAssociations() const
Definition NetworkAcl.h:44
const Aws::Vector< Tag > & GetTags() const
Definition NetworkAcl.h:126
NetworkAcl & AddEntries(EntriesT &&value)
Definition NetworkAcl.h:81
NetworkAcl & AddAssociations(AssociationsT &&value)
Definition NetworkAcl.h:57
NetworkAcl & WithEntries(EntriesT &&value)
Definition NetworkAcl.h:76
void SetIsDefault(bool value)
Definition NetworkAcl.h:94
NetworkAcl & WithVpcId(VpcIdT &&value)
Definition NetworkAcl.h:158
void SetAssociations(AssociationsT &&value)
Definition NetworkAcl.h:47
const Aws::String & GetOwnerId() const
Definition NetworkAcl.h:168
NetworkAcl & WithOwnerId(OwnerIdT &&value)
Definition NetworkAcl.h:176
void SetTags(TagsT &&value)
Definition NetworkAcl.h:129
NetworkAcl & AddTags(TagsT &&value)
Definition NetworkAcl.h:139
const Aws::String & GetVpcId() const
Definition NetworkAcl.h:150
AWS_EC2_API NetworkAcl(const Aws::Utils::Xml::XmlNode &xmlNode)
NetworkAcl & WithNetworkAclId(NetworkAclIdT &&value)
Definition NetworkAcl.h:116
bool NetworkAclIdHasBeenSet() const
Definition NetworkAcl.h:109
NetworkAcl & WithTags(TagsT &&value)
Definition NetworkAcl.h:134
const Aws::String & GetNetworkAclId() const
Definition NetworkAcl.h:108
NetworkAcl & WithAssociations(AssociationsT &&value)
Definition NetworkAcl.h:52
AWS_EC2_API NetworkAcl & operator=(const Aws::Utils::Xml::XmlNode &xmlNode)
bool EntriesHasBeenSet() const
Definition NetworkAcl.h:69
void SetVpcId(VpcIdT &&value)
Definition NetworkAcl.h:153
void SetOwnerId(OwnerIdT &&value)
Definition NetworkAcl.h:171
bool IsDefaultHasBeenSet() const
Definition NetworkAcl.h:93
void SetEntries(EntriesT &&value)
Definition NetworkAcl.h:71
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