AWS SDK for C++

AWS SDK for C++ Version 1.11.717

Loading...
Searching...
No Matches
SecurityGroup.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/IpPermission.h>
12#include <aws/ec2/model/Tag.h>
13
14#include <utility>
15
16namespace Aws {
17namespace Utils {
18namespace Xml {
19class XmlNode;
20} // namespace Xml
21} // namespace Utils
22namespace EC2 {
23namespace Model {
24
31 public:
32 AWS_EC2_API SecurityGroup() = default;
33 AWS_EC2_API SecurityGroup(const Aws::Utils::Xml::XmlNode& xmlNode);
34 AWS_EC2_API SecurityGroup& operator=(const Aws::Utils::Xml::XmlNode& xmlNode);
35
36 AWS_EC2_API void OutputToStream(Aws::OStream& ostream, const char* location, unsigned index, const char* locationValue) const;
37 AWS_EC2_API void OutputToStream(Aws::OStream& oStream, const char* location) const;
38
40
43 inline const Aws::String& GetGroupId() const { return m_groupId; }
44 inline bool GroupIdHasBeenSet() const { return m_groupIdHasBeenSet; }
45 template <typename GroupIdT = Aws::String>
46 void SetGroupId(GroupIdT&& value) {
47 m_groupIdHasBeenSet = true;
48 m_groupId = std::forward<GroupIdT>(value);
49 }
50 template <typename GroupIdT = Aws::String>
51 SecurityGroup& WithGroupId(GroupIdT&& value) {
52 SetGroupId(std::forward<GroupIdT>(value));
53 return *this;
54 }
56
58
61 inline const Aws::Vector<IpPermission>& GetIpPermissionsEgress() const { return m_ipPermissionsEgress; }
62 inline bool IpPermissionsEgressHasBeenSet() const { return m_ipPermissionsEgressHasBeenSet; }
63 template <typename IpPermissionsEgressT = Aws::Vector<IpPermission>>
64 void SetIpPermissionsEgress(IpPermissionsEgressT&& value) {
65 m_ipPermissionsEgressHasBeenSet = true;
66 m_ipPermissionsEgress = std::forward<IpPermissionsEgressT>(value);
67 }
68 template <typename IpPermissionsEgressT = Aws::Vector<IpPermission>>
69 SecurityGroup& WithIpPermissionsEgress(IpPermissionsEgressT&& value) {
70 SetIpPermissionsEgress(std::forward<IpPermissionsEgressT>(value));
71 return *this;
72 }
73 template <typename IpPermissionsEgressT = IpPermission>
74 SecurityGroup& AddIpPermissionsEgress(IpPermissionsEgressT&& value) {
75 m_ipPermissionsEgressHasBeenSet = true;
76 m_ipPermissionsEgress.emplace_back(std::forward<IpPermissionsEgressT>(value));
77 return *this;
78 }
80
82
85 inline const Aws::Vector<Tag>& GetTags() const { return m_tags; }
86 inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; }
87 template <typename TagsT = Aws::Vector<Tag>>
88 void SetTags(TagsT&& value) {
89 m_tagsHasBeenSet = true;
90 m_tags = std::forward<TagsT>(value);
91 }
92 template <typename TagsT = Aws::Vector<Tag>>
93 SecurityGroup& WithTags(TagsT&& value) {
94 SetTags(std::forward<TagsT>(value));
95 return *this;
96 }
97 template <typename TagsT = Tag>
98 SecurityGroup& AddTags(TagsT&& value) {
99 m_tagsHasBeenSet = true;
100 m_tags.emplace_back(std::forward<TagsT>(value));
101 return *this;
102 }
104
106
109 inline const Aws::String& GetVpcId() const { return m_vpcId; }
110 inline bool VpcIdHasBeenSet() const { return m_vpcIdHasBeenSet; }
111 template <typename VpcIdT = Aws::String>
112 void SetVpcId(VpcIdT&& value) {
113 m_vpcIdHasBeenSet = true;
114 m_vpcId = std::forward<VpcIdT>(value);
115 }
116 template <typename VpcIdT = Aws::String>
117 SecurityGroup& WithVpcId(VpcIdT&& value) {
118 SetVpcId(std::forward<VpcIdT>(value));
119 return *this;
120 }
122
124
127 inline const Aws::String& GetSecurityGroupArn() const { return m_securityGroupArn; }
128 inline bool SecurityGroupArnHasBeenSet() const { return m_securityGroupArnHasBeenSet; }
129 template <typename SecurityGroupArnT = Aws::String>
130 void SetSecurityGroupArn(SecurityGroupArnT&& value) {
131 m_securityGroupArnHasBeenSet = true;
132 m_securityGroupArn = std::forward<SecurityGroupArnT>(value);
133 }
134 template <typename SecurityGroupArnT = Aws::String>
135 SecurityGroup& WithSecurityGroupArn(SecurityGroupArnT&& value) {
136 SetSecurityGroupArn(std::forward<SecurityGroupArnT>(value));
137 return *this;
138 }
140
142
145 inline const Aws::String& GetOwnerId() const { return m_ownerId; }
146 inline bool OwnerIdHasBeenSet() const { return m_ownerIdHasBeenSet; }
147 template <typename OwnerIdT = Aws::String>
148 void SetOwnerId(OwnerIdT&& value) {
149 m_ownerIdHasBeenSet = true;
150 m_ownerId = std::forward<OwnerIdT>(value);
151 }
152 template <typename OwnerIdT = Aws::String>
153 SecurityGroup& WithOwnerId(OwnerIdT&& value) {
154 SetOwnerId(std::forward<OwnerIdT>(value));
155 return *this;
156 }
158
160
163 inline const Aws::String& GetGroupName() const { return m_groupName; }
164 inline bool GroupNameHasBeenSet() const { return m_groupNameHasBeenSet; }
165 template <typename GroupNameT = Aws::String>
166 void SetGroupName(GroupNameT&& value) {
167 m_groupNameHasBeenSet = true;
168 m_groupName = std::forward<GroupNameT>(value);
169 }
170 template <typename GroupNameT = Aws::String>
171 SecurityGroup& WithGroupName(GroupNameT&& value) {
172 SetGroupName(std::forward<GroupNameT>(value));
173 return *this;
174 }
176
178
181 inline const Aws::String& GetDescription() const { return m_description; }
182 inline bool DescriptionHasBeenSet() const { return m_descriptionHasBeenSet; }
183 template <typename DescriptionT = Aws::String>
184 void SetDescription(DescriptionT&& value) {
185 m_descriptionHasBeenSet = true;
186 m_description = std::forward<DescriptionT>(value);
187 }
188 template <typename DescriptionT = Aws::String>
189 SecurityGroup& WithDescription(DescriptionT&& value) {
190 SetDescription(std::forward<DescriptionT>(value));
191 return *this;
192 }
194
196
199 inline const Aws::Vector<IpPermission>& GetIpPermissions() const { return m_ipPermissions; }
200 inline bool IpPermissionsHasBeenSet() const { return m_ipPermissionsHasBeenSet; }
201 template <typename IpPermissionsT = Aws::Vector<IpPermission>>
202 void SetIpPermissions(IpPermissionsT&& value) {
203 m_ipPermissionsHasBeenSet = true;
204 m_ipPermissions = std::forward<IpPermissionsT>(value);
205 }
206 template <typename IpPermissionsT = Aws::Vector<IpPermission>>
207 SecurityGroup& WithIpPermissions(IpPermissionsT&& value) {
208 SetIpPermissions(std::forward<IpPermissionsT>(value));
209 return *this;
210 }
211 template <typename IpPermissionsT = IpPermission>
212 SecurityGroup& AddIpPermissions(IpPermissionsT&& value) {
213 m_ipPermissionsHasBeenSet = true;
214 m_ipPermissions.emplace_back(std::forward<IpPermissionsT>(value));
215 return *this;
216 }
218 private:
219 Aws::String m_groupId;
220
221 Aws::Vector<IpPermission> m_ipPermissionsEgress;
222
223 Aws::Vector<Tag> m_tags;
224
225 Aws::String m_vpcId;
226
227 Aws::String m_securityGroupArn;
228
229 Aws::String m_ownerId;
230
231 Aws::String m_groupName;
232
233 Aws::String m_description;
234
235 Aws::Vector<IpPermission> m_ipPermissions;
236 bool m_groupIdHasBeenSet = false;
237 bool m_ipPermissionsEgressHasBeenSet = false;
238 bool m_tagsHasBeenSet = false;
239 bool m_vpcIdHasBeenSet = false;
240 bool m_securityGroupArnHasBeenSet = false;
241 bool m_ownerIdHasBeenSet = false;
242 bool m_groupNameHasBeenSet = false;
243 bool m_descriptionHasBeenSet = false;
244 bool m_ipPermissionsHasBeenSet = false;
245};
246
247} // namespace Model
248} // namespace EC2
249} // namespace Aws
const Aws::Vector< IpPermission > & GetIpPermissionsEgress() const
void SetTags(TagsT &&value)
const Aws::Vector< IpPermission > & GetIpPermissions() const
AWS_EC2_API SecurityGroup & operator=(const Aws::Utils::Xml::XmlNode &xmlNode)
void SetIpPermissions(IpPermissionsT &&value)
void SetIpPermissionsEgress(IpPermissionsEgressT &&value)
void SetVpcId(VpcIdT &&value)
AWS_EC2_API void OutputToStream(Aws::OStream &oStream, const char *location) const
const Aws::String & GetSecurityGroupArn() const
void SetSecurityGroupArn(SecurityGroupArnT &&value)
SecurityGroup & WithSecurityGroupArn(SecurityGroupArnT &&value)
void SetGroupName(GroupNameT &&value)
const Aws::String & GetGroupName() const
void SetOwnerId(OwnerIdT &&value)
SecurityGroup & WithIpPermissions(IpPermissionsT &&value)
SecurityGroup & WithTags(TagsT &&value)
AWS_EC2_API SecurityGroup(const Aws::Utils::Xml::XmlNode &xmlNode)
const Aws::String & GetDescription() const
SecurityGroup & WithGroupName(GroupNameT &&value)
const Aws::String & GetOwnerId() const
SecurityGroup & AddTags(TagsT &&value)
SecurityGroup & WithDescription(DescriptionT &&value)
AWS_EC2_API void OutputToStream(Aws::OStream &ostream, const char *location, unsigned index, const char *locationValue) const
SecurityGroup & AddIpPermissionsEgress(IpPermissionsEgressT &&value)
void SetGroupId(GroupIdT &&value)
SecurityGroup & AddIpPermissions(IpPermissionsT &&value)
const Aws::String & GetVpcId() const
const Aws::Vector< Tag > & GetTags() const
void SetDescription(DescriptionT &&value)
bool IpPermissionsEgressHasBeenSet() const
const Aws::String & GetGroupId() const
SecurityGroup & WithOwnerId(OwnerIdT &&value)
SecurityGroup & WithIpPermissionsEgress(IpPermissionsEgressT &&value)
SecurityGroup & WithGroupId(GroupIdT &&value)
AWS_EC2_API SecurityGroup()=default
SecurityGroup & WithVpcId(VpcIdT &&value)
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