AWS SDK for C++

AWS SDK for C++ Version 1.11.440

Loading...
Searching...
No Matches
SecurityGroupRule.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/ReferencedSecurityGroup.h>
11#include <aws/core/utils/memory/stl/AWSVector.h>
12#include <aws/ec2/model/Tag.h>
13#include <utility>
14
15namespace Aws
16{
17namespace Utils
18{
19namespace Xml
20{
21 class XmlNode;
22} // namespace Xml
23} // namespace Utils
24namespace EC2
25{
26namespace Model
27{
28
35 {
36 public:
37 AWS_EC2_API SecurityGroupRule();
38 AWS_EC2_API SecurityGroupRule(const Aws::Utils::Xml::XmlNode& xmlNode);
40
41 AWS_EC2_API void OutputToStream(Aws::OStream& ostream, const char* location, unsigned index, const char* locationValue) const;
42 AWS_EC2_API void OutputToStream(Aws::OStream& oStream, const char* location) const;
43
44
46
49 inline const Aws::String& GetSecurityGroupRuleId() const{ return m_securityGroupRuleId; }
50 inline bool SecurityGroupRuleIdHasBeenSet() const { return m_securityGroupRuleIdHasBeenSet; }
51 inline void SetSecurityGroupRuleId(const Aws::String& value) { m_securityGroupRuleIdHasBeenSet = true; m_securityGroupRuleId = value; }
52 inline void SetSecurityGroupRuleId(Aws::String&& value) { m_securityGroupRuleIdHasBeenSet = true; m_securityGroupRuleId = std::move(value); }
53 inline void SetSecurityGroupRuleId(const char* value) { m_securityGroupRuleIdHasBeenSet = true; m_securityGroupRuleId.assign(value); }
54 inline SecurityGroupRule& WithSecurityGroupRuleId(const Aws::String& value) { SetSecurityGroupRuleId(value); return *this;}
55 inline SecurityGroupRule& WithSecurityGroupRuleId(Aws::String&& value) { SetSecurityGroupRuleId(std::move(value)); return *this;}
56 inline SecurityGroupRule& WithSecurityGroupRuleId(const char* value) { SetSecurityGroupRuleId(value); return *this;}
58
60
63 inline const Aws::String& GetGroupId() const{ return m_groupId; }
64 inline bool GroupIdHasBeenSet() const { return m_groupIdHasBeenSet; }
65 inline void SetGroupId(const Aws::String& value) { m_groupIdHasBeenSet = true; m_groupId = value; }
66 inline void SetGroupId(Aws::String&& value) { m_groupIdHasBeenSet = true; m_groupId = std::move(value); }
67 inline void SetGroupId(const char* value) { m_groupIdHasBeenSet = true; m_groupId.assign(value); }
68 inline SecurityGroupRule& WithGroupId(const Aws::String& value) { SetGroupId(value); return *this;}
69 inline SecurityGroupRule& WithGroupId(Aws::String&& value) { SetGroupId(std::move(value)); return *this;}
70 inline SecurityGroupRule& WithGroupId(const char* value) { SetGroupId(value); return *this;}
72
74
77 inline const Aws::String& GetGroupOwnerId() const{ return m_groupOwnerId; }
78 inline bool GroupOwnerIdHasBeenSet() const { return m_groupOwnerIdHasBeenSet; }
79 inline void SetGroupOwnerId(const Aws::String& value) { m_groupOwnerIdHasBeenSet = true; m_groupOwnerId = value; }
80 inline void SetGroupOwnerId(Aws::String&& value) { m_groupOwnerIdHasBeenSet = true; m_groupOwnerId = std::move(value); }
81 inline void SetGroupOwnerId(const char* value) { m_groupOwnerIdHasBeenSet = true; m_groupOwnerId.assign(value); }
82 inline SecurityGroupRule& WithGroupOwnerId(const Aws::String& value) { SetGroupOwnerId(value); return *this;}
83 inline SecurityGroupRule& WithGroupOwnerId(Aws::String&& value) { SetGroupOwnerId(std::move(value)); return *this;}
84 inline SecurityGroupRule& WithGroupOwnerId(const char* value) { SetGroupOwnerId(value); return *this;}
86
88
91 inline bool GetIsEgress() const{ return m_isEgress; }
92 inline bool IsEgressHasBeenSet() const { return m_isEgressHasBeenSet; }
93 inline void SetIsEgress(bool value) { m_isEgressHasBeenSet = true; m_isEgress = value; }
94 inline SecurityGroupRule& WithIsEgress(bool value) { SetIsEgress(value); return *this;}
96
98
104 inline const Aws::String& GetIpProtocol() const{ return m_ipProtocol; }
105 inline bool IpProtocolHasBeenSet() const { return m_ipProtocolHasBeenSet; }
106 inline void SetIpProtocol(const Aws::String& value) { m_ipProtocolHasBeenSet = true; m_ipProtocol = value; }
107 inline void SetIpProtocol(Aws::String&& value) { m_ipProtocolHasBeenSet = true; m_ipProtocol = std::move(value); }
108 inline void SetIpProtocol(const char* value) { m_ipProtocolHasBeenSet = true; m_ipProtocol.assign(value); }
109 inline SecurityGroupRule& WithIpProtocol(const Aws::String& value) { SetIpProtocol(value); return *this;}
110 inline SecurityGroupRule& WithIpProtocol(Aws::String&& value) { SetIpProtocol(std::move(value)); return *this;}
111 inline SecurityGroupRule& WithIpProtocol(const char* value) { SetIpProtocol(value); return *this;}
113
115
119 inline int GetFromPort() const{ return m_fromPort; }
120 inline bool FromPortHasBeenSet() const { return m_fromPortHasBeenSet; }
121 inline void SetFromPort(int value) { m_fromPortHasBeenSet = true; m_fromPort = value; }
122 inline SecurityGroupRule& WithFromPort(int value) { SetFromPort(value); return *this;}
124
126
132 inline int GetToPort() const{ return m_toPort; }
133 inline bool ToPortHasBeenSet() const { return m_toPortHasBeenSet; }
134 inline void SetToPort(int value) { m_toPortHasBeenSet = true; m_toPort = value; }
135 inline SecurityGroupRule& WithToPort(int value) { SetToPort(value); return *this;}
137
139
142 inline const Aws::String& GetCidrIpv4() const{ return m_cidrIpv4; }
143 inline bool CidrIpv4HasBeenSet() const { return m_cidrIpv4HasBeenSet; }
144 inline void SetCidrIpv4(const Aws::String& value) { m_cidrIpv4HasBeenSet = true; m_cidrIpv4 = value; }
145 inline void SetCidrIpv4(Aws::String&& value) { m_cidrIpv4HasBeenSet = true; m_cidrIpv4 = std::move(value); }
146 inline void SetCidrIpv4(const char* value) { m_cidrIpv4HasBeenSet = true; m_cidrIpv4.assign(value); }
147 inline SecurityGroupRule& WithCidrIpv4(const Aws::String& value) { SetCidrIpv4(value); return *this;}
148 inline SecurityGroupRule& WithCidrIpv4(Aws::String&& value) { SetCidrIpv4(std::move(value)); return *this;}
149 inline SecurityGroupRule& WithCidrIpv4(const char* value) { SetCidrIpv4(value); return *this;}
151
153
156 inline const Aws::String& GetCidrIpv6() const{ return m_cidrIpv6; }
157 inline bool CidrIpv6HasBeenSet() const { return m_cidrIpv6HasBeenSet; }
158 inline void SetCidrIpv6(const Aws::String& value) { m_cidrIpv6HasBeenSet = true; m_cidrIpv6 = value; }
159 inline void SetCidrIpv6(Aws::String&& value) { m_cidrIpv6HasBeenSet = true; m_cidrIpv6 = std::move(value); }
160 inline void SetCidrIpv6(const char* value) { m_cidrIpv6HasBeenSet = true; m_cidrIpv6.assign(value); }
161 inline SecurityGroupRule& WithCidrIpv6(const Aws::String& value) { SetCidrIpv6(value); return *this;}
162 inline SecurityGroupRule& WithCidrIpv6(Aws::String&& value) { SetCidrIpv6(std::move(value)); return *this;}
163 inline SecurityGroupRule& WithCidrIpv6(const char* value) { SetCidrIpv6(value); return *this;}
165
167
170 inline const Aws::String& GetPrefixListId() const{ return m_prefixListId; }
171 inline bool PrefixListIdHasBeenSet() const { return m_prefixListIdHasBeenSet; }
172 inline void SetPrefixListId(const Aws::String& value) { m_prefixListIdHasBeenSet = true; m_prefixListId = value; }
173 inline void SetPrefixListId(Aws::String&& value) { m_prefixListIdHasBeenSet = true; m_prefixListId = std::move(value); }
174 inline void SetPrefixListId(const char* value) { m_prefixListIdHasBeenSet = true; m_prefixListId.assign(value); }
175 inline SecurityGroupRule& WithPrefixListId(const Aws::String& value) { SetPrefixListId(value); return *this;}
176 inline SecurityGroupRule& WithPrefixListId(Aws::String&& value) { SetPrefixListId(std::move(value)); return *this;}
177 inline SecurityGroupRule& WithPrefixListId(const char* value) { SetPrefixListId(value); return *this;}
179
181
184 inline const ReferencedSecurityGroup& GetReferencedGroupInfo() const{ return m_referencedGroupInfo; }
185 inline bool ReferencedGroupInfoHasBeenSet() const { return m_referencedGroupInfoHasBeenSet; }
186 inline void SetReferencedGroupInfo(const ReferencedSecurityGroup& value) { m_referencedGroupInfoHasBeenSet = true; m_referencedGroupInfo = value; }
187 inline void SetReferencedGroupInfo(ReferencedSecurityGroup&& value) { m_referencedGroupInfoHasBeenSet = true; m_referencedGroupInfo = std::move(value); }
191
193
196 inline const Aws::String& GetDescription() const{ return m_description; }
197 inline bool DescriptionHasBeenSet() const { return m_descriptionHasBeenSet; }
198 inline void SetDescription(const Aws::String& value) { m_descriptionHasBeenSet = true; m_description = value; }
199 inline void SetDescription(Aws::String&& value) { m_descriptionHasBeenSet = true; m_description = std::move(value); }
200 inline void SetDescription(const char* value) { m_descriptionHasBeenSet = true; m_description.assign(value); }
201 inline SecurityGroupRule& WithDescription(const Aws::String& value) { SetDescription(value); return *this;}
202 inline SecurityGroupRule& WithDescription(Aws::String&& value) { SetDescription(std::move(value)); return *this;}
203 inline SecurityGroupRule& WithDescription(const char* value) { SetDescription(value); return *this;}
205
207
210 inline const Aws::Vector<Tag>& GetTags() const{ return m_tags; }
211 inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; }
212 inline void SetTags(const Aws::Vector<Tag>& value) { m_tagsHasBeenSet = true; m_tags = value; }
213 inline void SetTags(Aws::Vector<Tag>&& value) { m_tagsHasBeenSet = true; m_tags = std::move(value); }
214 inline SecurityGroupRule& WithTags(const Aws::Vector<Tag>& value) { SetTags(value); return *this;}
215 inline SecurityGroupRule& WithTags(Aws::Vector<Tag>&& value) { SetTags(std::move(value)); return *this;}
216 inline SecurityGroupRule& AddTags(const Tag& value) { m_tagsHasBeenSet = true; m_tags.push_back(value); return *this; }
217 inline SecurityGroupRule& AddTags(Tag&& value) { m_tagsHasBeenSet = true; m_tags.push_back(std::move(value)); return *this; }
219
221
224 inline const Aws::String& GetSecurityGroupRuleArn() const{ return m_securityGroupRuleArn; }
225 inline bool SecurityGroupRuleArnHasBeenSet() const { return m_securityGroupRuleArnHasBeenSet; }
226 inline void SetSecurityGroupRuleArn(const Aws::String& value) { m_securityGroupRuleArnHasBeenSet = true; m_securityGroupRuleArn = value; }
227 inline void SetSecurityGroupRuleArn(Aws::String&& value) { m_securityGroupRuleArnHasBeenSet = true; m_securityGroupRuleArn = std::move(value); }
228 inline void SetSecurityGroupRuleArn(const char* value) { m_securityGroupRuleArnHasBeenSet = true; m_securityGroupRuleArn.assign(value); }
230 inline SecurityGroupRule& WithSecurityGroupRuleArn(Aws::String&& value) { SetSecurityGroupRuleArn(std::move(value)); return *this;}
231 inline SecurityGroupRule& WithSecurityGroupRuleArn(const char* value) { SetSecurityGroupRuleArn(value); return *this;}
233 private:
234
235 Aws::String m_securityGroupRuleId;
236 bool m_securityGroupRuleIdHasBeenSet = false;
237
238 Aws::String m_groupId;
239 bool m_groupIdHasBeenSet = false;
240
241 Aws::String m_groupOwnerId;
242 bool m_groupOwnerIdHasBeenSet = false;
243
244 bool m_isEgress;
245 bool m_isEgressHasBeenSet = false;
246
247 Aws::String m_ipProtocol;
248 bool m_ipProtocolHasBeenSet = false;
249
250 int m_fromPort;
251 bool m_fromPortHasBeenSet = false;
252
253 int m_toPort;
254 bool m_toPortHasBeenSet = false;
255
256 Aws::String m_cidrIpv4;
257 bool m_cidrIpv4HasBeenSet = false;
258
259 Aws::String m_cidrIpv6;
260 bool m_cidrIpv6HasBeenSet = false;
261
262 Aws::String m_prefixListId;
263 bool m_prefixListIdHasBeenSet = false;
264
265 ReferencedSecurityGroup m_referencedGroupInfo;
266 bool m_referencedGroupInfoHasBeenSet = false;
267
268 Aws::String m_description;
269 bool m_descriptionHasBeenSet = false;
270
271 Aws::Vector<Tag> m_tags;
272 bool m_tagsHasBeenSet = false;
273
274 Aws::String m_securityGroupRuleArn;
275 bool m_securityGroupRuleArnHasBeenSet = false;
276 };
277
278} // namespace Model
279} // namespace EC2
280} // namespace Aws
const Aws::String & GetGroupOwnerId() const
SecurityGroupRule & AddTags(const Tag &value)
void SetGroupOwnerId(const char *value)
SecurityGroupRule & WithSecurityGroupRuleId(const Aws::String &value)
SecurityGroupRule & WithDescription(const char *value)
void SetDescription(Aws::String &&value)
SecurityGroupRule & WithGroupOwnerId(Aws::String &&value)
SecurityGroupRule & WithFromPort(int value)
void SetSecurityGroupRuleArn(const Aws::String &value)
SecurityGroupRule & WithPrefixListId(Aws::String &&value)
void SetCidrIpv6(const Aws::String &value)
SecurityGroupRule & WithGroupId(Aws::String &&value)
void SetPrefixListId(Aws::String &&value)
void SetPrefixListId(const Aws::String &value)
const Aws::Vector< Tag > & GetTags() const
void SetIpProtocol(Aws::String &&value)
const Aws::String & GetDescription() const
SecurityGroupRule & WithToPort(int value)
SecurityGroupRule & WithReferencedGroupInfo(const ReferencedSecurityGroup &value)
const Aws::String & GetCidrIpv6() const
const Aws::String & GetPrefixListId() const
SecurityGroupRule & WithCidrIpv6(const Aws::String &value)
const ReferencedSecurityGroup & GetReferencedGroupInfo() const
SecurityGroupRule & WithPrefixListId(const Aws::String &value)
SecurityGroupRule & WithTags(Aws::Vector< Tag > &&value)
SecurityGroupRule & WithIpProtocol(const Aws::String &value)
SecurityGroupRule & WithIpProtocol(Aws::String &&value)
SecurityGroupRule & WithCidrIpv4(Aws::String &&value)
void SetGroupOwnerId(const Aws::String &value)
SecurityGroupRule & AddTags(Tag &&value)
AWS_EC2_API SecurityGroupRule(const Aws::Utils::Xml::XmlNode &xmlNode)
void SetSecurityGroupRuleArn(const char *value)
AWS_EC2_API SecurityGroupRule & operator=(const Aws::Utils::Xml::XmlNode &xmlNode)
SecurityGroupRule & WithTags(const Aws::Vector< Tag > &value)
void SetCidrIpv6(Aws::String &&value)
void SetDescription(const char *value)
SecurityGroupRule & WithSecurityGroupRuleArn(const Aws::String &value)
void SetSecurityGroupRuleId(const Aws::String &value)
SecurityGroupRule & WithIpProtocol(const char *value)
SecurityGroupRule & WithCidrIpv6(const char *value)
const Aws::String & GetSecurityGroupRuleId() const
void SetTags(const Aws::Vector< Tag > &value)
SecurityGroupRule & WithCidrIpv4(const Aws::String &value)
SecurityGroupRule & WithReferencedGroupInfo(ReferencedSecurityGroup &&value)
SecurityGroupRule & WithSecurityGroupRuleArn(Aws::String &&value)
SecurityGroupRule & WithDescription(const Aws::String &value)
void SetCidrIpv4(Aws::String &&value)
SecurityGroupRule & WithCidrIpv4(const char *value)
AWS_EC2_API void OutputToStream(Aws::OStream &ostream, const char *location, unsigned index, const char *locationValue) const
const Aws::String & GetCidrIpv4() const
void SetIpProtocol(const Aws::String &value)
SecurityGroupRule & WithSecurityGroupRuleId(const char *value)
void SetReferencedGroupInfo(const ReferencedSecurityGroup &value)
void SetCidrIpv4(const Aws::String &value)
SecurityGroupRule & WithIsEgress(bool value)
SecurityGroupRule & WithSecurityGroupRuleArn(const char *value)
void SetGroupId(const Aws::String &value)
SecurityGroupRule & WithGroupId(const Aws::String &value)
void SetGroupOwnerId(Aws::String &&value)
const Aws::String & GetGroupId() const
SecurityGroupRule & WithCidrIpv6(Aws::String &&value)
const Aws::String & GetSecurityGroupRuleArn() const
void SetSecurityGroupRuleId(const char *value)
void SetReferencedGroupInfo(ReferencedSecurityGroup &&value)
SecurityGroupRule & WithDescription(Aws::String &&value)
void SetDescription(const Aws::String &value)
SecurityGroupRule & WithGroupOwnerId(const Aws::String &value)
void SetIpProtocol(const char *value)
SecurityGroupRule & WithGroupId(const char *value)
SecurityGroupRule & WithGroupOwnerId(const char *value)
void SetPrefixListId(const char *value)
void SetGroupId(Aws::String &&value)
SecurityGroupRule & WithSecurityGroupRuleId(Aws::String &&value)
AWS_EC2_API void OutputToStream(Aws::OStream &oStream, const char *location) const
SecurityGroupRule & WithPrefixListId(const char *value)
void SetSecurityGroupRuleArn(Aws::String &&value)
const Aws::String & GetIpProtocol() const
void SetTags(Aws::Vector< Tag > &&value)
void SetSecurityGroupRuleId(Aws::String &&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