AWS SDK for C++

AWS SDK for C++ Version 1.11.717

Loading...
Searching...
No Matches
SecurityGroupRuleRequest.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/ec2/EC2_EXPORTS.h>
10
11#include <utility>
12
13namespace Aws {
14namespace Utils {
15namespace Xml {
16class XmlNode;
17} // namespace Xml
18} // namespace Utils
19namespace EC2 {
20namespace Model {
21
42 public:
43 AWS_EC2_API SecurityGroupRuleRequest() = default;
46
47 AWS_EC2_API void OutputToStream(Aws::OStream& ostream, const char* location, unsigned index, const char* locationValue) const;
48 AWS_EC2_API void OutputToStream(Aws::OStream& oStream, const char* location) const;
49
51
57 inline const Aws::String& GetIpProtocol() const { return m_ipProtocol; }
58 inline bool IpProtocolHasBeenSet() const { return m_ipProtocolHasBeenSet; }
59 template <typename IpProtocolT = Aws::String>
60 void SetIpProtocol(IpProtocolT&& value) {
61 m_ipProtocolHasBeenSet = true;
62 m_ipProtocol = std::forward<IpProtocolT>(value);
63 }
64 template <typename IpProtocolT = Aws::String>
66 SetIpProtocol(std::forward<IpProtocolT>(value));
67 return *this;
68 }
70
72
76 inline int GetFromPort() const { return m_fromPort; }
77 inline bool FromPortHasBeenSet() const { return m_fromPortHasBeenSet; }
78 inline void SetFromPort(int value) {
79 m_fromPortHasBeenSet = true;
80 m_fromPort = value;
81 }
83 SetFromPort(value);
84 return *this;
85 }
87
89
95 inline int GetToPort() const { return m_toPort; }
96 inline bool ToPortHasBeenSet() const { return m_toPortHasBeenSet; }
97 inline void SetToPort(int value) {
98 m_toPortHasBeenSet = true;
99 m_toPort = value;
100 }
102 SetToPort(value);
103 return *this;
104 }
106
108
112 inline const Aws::String& GetCidrIpv4() const { return m_cidrIpv4; }
113 inline bool CidrIpv4HasBeenSet() const { return m_cidrIpv4HasBeenSet; }
114 template <typename CidrIpv4T = Aws::String>
115 void SetCidrIpv4(CidrIpv4T&& value) {
116 m_cidrIpv4HasBeenSet = true;
117 m_cidrIpv4 = std::forward<CidrIpv4T>(value);
118 }
119 template <typename CidrIpv4T = Aws::String>
121 SetCidrIpv4(std::forward<CidrIpv4T>(value));
122 return *this;
123 }
125
127
131 inline const Aws::String& GetCidrIpv6() const { return m_cidrIpv6; }
132 inline bool CidrIpv6HasBeenSet() const { return m_cidrIpv6HasBeenSet; }
133 template <typename CidrIpv6T = Aws::String>
134 void SetCidrIpv6(CidrIpv6T&& value) {
135 m_cidrIpv6HasBeenSet = true;
136 m_cidrIpv6 = std::forward<CidrIpv6T>(value);
137 }
138 template <typename CidrIpv6T = Aws::String>
140 SetCidrIpv6(std::forward<CidrIpv6T>(value));
141 return *this;
142 }
144
146
149 inline const Aws::String& GetPrefixListId() const { return m_prefixListId; }
150 inline bool PrefixListIdHasBeenSet() const { return m_prefixListIdHasBeenSet; }
151 template <typename PrefixListIdT = Aws::String>
152 void SetPrefixListId(PrefixListIdT&& value) {
153 m_prefixListIdHasBeenSet = true;
154 m_prefixListId = std::forward<PrefixListIdT>(value);
155 }
156 template <typename PrefixListIdT = Aws::String>
158 SetPrefixListId(std::forward<PrefixListIdT>(value));
159 return *this;
160 }
162
164
168 inline const Aws::String& GetReferencedGroupId() const { return m_referencedGroupId; }
169 inline bool ReferencedGroupIdHasBeenSet() const { return m_referencedGroupIdHasBeenSet; }
170 template <typename ReferencedGroupIdT = Aws::String>
171 void SetReferencedGroupId(ReferencedGroupIdT&& value) {
172 m_referencedGroupIdHasBeenSet = true;
173 m_referencedGroupId = std::forward<ReferencedGroupIdT>(value);
174 }
175 template <typename ReferencedGroupIdT = Aws::String>
176 SecurityGroupRuleRequest& WithReferencedGroupId(ReferencedGroupIdT&& value) {
177 SetReferencedGroupId(std::forward<ReferencedGroupIdT>(value));
178 return *this;
179 }
181
183
186 inline const Aws::String& GetDescription() const { return m_description; }
187 inline bool DescriptionHasBeenSet() const { return m_descriptionHasBeenSet; }
188 template <typename DescriptionT = Aws::String>
189 void SetDescription(DescriptionT&& value) {
190 m_descriptionHasBeenSet = true;
191 m_description = std::forward<DescriptionT>(value);
192 }
193 template <typename DescriptionT = Aws::String>
195 SetDescription(std::forward<DescriptionT>(value));
196 return *this;
197 }
199 private:
200 Aws::String m_ipProtocol;
201
202 int m_fromPort{0};
203
204 int m_toPort{0};
205
206 Aws::String m_cidrIpv4;
207
208 Aws::String m_cidrIpv6;
209
210 Aws::String m_prefixListId;
211
212 Aws::String m_referencedGroupId;
213
214 Aws::String m_description;
215 bool m_ipProtocolHasBeenSet = false;
216 bool m_fromPortHasBeenSet = false;
217 bool m_toPortHasBeenSet = false;
218 bool m_cidrIpv4HasBeenSet = false;
219 bool m_cidrIpv6HasBeenSet = false;
220 bool m_prefixListIdHasBeenSet = false;
221 bool m_referencedGroupIdHasBeenSet = false;
222 bool m_descriptionHasBeenSet = false;
223};
224
225} // namespace Model
226} // namespace EC2
227} // namespace Aws
SecurityGroupRuleRequest & WithCidrIpv6(CidrIpv6T &&value)
SecurityGroupRuleRequest & WithIpProtocol(IpProtocolT &&value)
SecurityGroupRuleRequest & WithReferencedGroupId(ReferencedGroupIdT &&value)
AWS_EC2_API SecurityGroupRuleRequest(const Aws::Utils::Xml::XmlNode &xmlNode)
SecurityGroupRuleRequest & WithDescription(DescriptionT &&value)
AWS_EC2_API SecurityGroupRuleRequest()=default
SecurityGroupRuleRequest & WithFromPort(int value)
AWS_EC2_API void OutputToStream(Aws::OStream &ostream, const char *location, unsigned index, const char *locationValue) const
SecurityGroupRuleRequest & WithToPort(int value)
SecurityGroupRuleRequest & WithCidrIpv4(CidrIpv4T &&value)
SecurityGroupRuleRequest & WithPrefixListId(PrefixListIdT &&value)
AWS_EC2_API SecurityGroupRuleRequest & operator=(const Aws::Utils::Xml::XmlNode &xmlNode)
AWS_EC2_API void OutputToStream(Aws::OStream &oStream, const char *location) const
void SetReferencedGroupId(ReferencedGroupIdT &&value)
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::basic_ostream< char, std::char_traits< char > > OStream