AWS SDK for C++

AWS SDK for C++ Version 1.11.440

Loading...
Searching...
No Matches
InstancePortInfo.h
1
6#pragma once
7#include <aws/lightsail/Lightsail_EXPORTS.h>
8#include <aws/lightsail/model/NetworkProtocol.h>
9#include <aws/core/utils/memory/stl/AWSString.h>
10#include <aws/lightsail/model/PortAccessType.h>
11#include <aws/lightsail/model/AccessDirection.h>
12#include <aws/core/utils/memory/stl/AWSVector.h>
13#include <utility>
14
15namespace Aws
16{
17namespace Utils
18{
19namespace Json
20{
21 class JsonValue;
22 class JsonView;
23} // namespace Json
24} // namespace Utils
25namespace Lightsail
26{
27namespace Model
28{
29
37 {
38 public:
39 AWS_LIGHTSAIL_API InstancePortInfo();
40 AWS_LIGHTSAIL_API InstancePortInfo(Aws::Utils::Json::JsonView jsonValue);
42 AWS_LIGHTSAIL_API Aws::Utils::Json::JsonValue Jsonize() const;
43
44
46
61 inline int GetFromPort() const{ return m_fromPort; }
62 inline bool FromPortHasBeenSet() const { return m_fromPortHasBeenSet; }
63 inline void SetFromPort(int value) { m_fromPortHasBeenSet = true; m_fromPort = value; }
64 inline InstancePortInfo& WithFromPort(int value) { SetFromPort(value); return *this;}
66
68
83 inline int GetToPort() const{ return m_toPort; }
84 inline bool ToPortHasBeenSet() const { return m_toPortHasBeenSet; }
85 inline void SetToPort(int value) { m_toPortHasBeenSet = true; m_toPort = value; }
86 inline InstancePortInfo& WithToPort(int value) { SetToPort(value); return *this;}
88
90
118 inline const NetworkProtocol& GetProtocol() const{ return m_protocol; }
119 inline bool ProtocolHasBeenSet() const { return m_protocolHasBeenSet; }
120 inline void SetProtocol(const NetworkProtocol& value) { m_protocolHasBeenSet = true; m_protocol = value; }
121 inline void SetProtocol(NetworkProtocol&& value) { m_protocolHasBeenSet = true; m_protocol = std::move(value); }
122 inline InstancePortInfo& WithProtocol(const NetworkProtocol& value) { SetProtocol(value); return *this;}
123 inline InstancePortInfo& WithProtocol(NetworkProtocol&& value) { SetProtocol(std::move(value)); return *this;}
125
127
132 inline const Aws::String& GetAccessFrom() const{ return m_accessFrom; }
133 inline bool AccessFromHasBeenSet() const { return m_accessFromHasBeenSet; }
134 inline void SetAccessFrom(const Aws::String& value) { m_accessFromHasBeenSet = true; m_accessFrom = value; }
135 inline void SetAccessFrom(Aws::String&& value) { m_accessFromHasBeenSet = true; m_accessFrom = std::move(value); }
136 inline void SetAccessFrom(const char* value) { m_accessFromHasBeenSet = true; m_accessFrom.assign(value); }
137 inline InstancePortInfo& WithAccessFrom(const Aws::String& value) { SetAccessFrom(value); return *this;}
138 inline InstancePortInfo& WithAccessFrom(Aws::String&& value) { SetAccessFrom(std::move(value)); return *this;}
139 inline InstancePortInfo& WithAccessFrom(const char* value) { SetAccessFrom(value); return *this;}
141
143
146 inline const PortAccessType& GetAccessType() const{ return m_accessType; }
147 inline bool AccessTypeHasBeenSet() const { return m_accessTypeHasBeenSet; }
148 inline void SetAccessType(const PortAccessType& value) { m_accessTypeHasBeenSet = true; m_accessType = value; }
149 inline void SetAccessType(PortAccessType&& value) { m_accessTypeHasBeenSet = true; m_accessType = std::move(value); }
150 inline InstancePortInfo& WithAccessType(const PortAccessType& value) { SetAccessType(value); return *this;}
151 inline InstancePortInfo& WithAccessType(PortAccessType&& value) { SetAccessType(std::move(value)); return *this;}
153
155
158 inline const Aws::String& GetCommonName() const{ return m_commonName; }
159 inline bool CommonNameHasBeenSet() const { return m_commonNameHasBeenSet; }
160 inline void SetCommonName(const Aws::String& value) { m_commonNameHasBeenSet = true; m_commonName = value; }
161 inline void SetCommonName(Aws::String&& value) { m_commonNameHasBeenSet = true; m_commonName = std::move(value); }
162 inline void SetCommonName(const char* value) { m_commonNameHasBeenSet = true; m_commonName.assign(value); }
163 inline InstancePortInfo& WithCommonName(const Aws::String& value) { SetCommonName(value); return *this;}
164 inline InstancePortInfo& WithCommonName(Aws::String&& value) { SetCommonName(std::move(value)); return *this;}
165 inline InstancePortInfo& WithCommonName(const char* value) { SetCommonName(value); return *this;}
167
169
174 inline const AccessDirection& GetAccessDirection() const{ return m_accessDirection; }
175 inline bool AccessDirectionHasBeenSet() const { return m_accessDirectionHasBeenSet; }
176 inline void SetAccessDirection(const AccessDirection& value) { m_accessDirectionHasBeenSet = true; m_accessDirection = value; }
177 inline void SetAccessDirection(AccessDirection&& value) { m_accessDirectionHasBeenSet = true; m_accessDirection = std::move(value); }
178 inline InstancePortInfo& WithAccessDirection(const AccessDirection& value) { SetAccessDirection(value); return *this;}
179 inline InstancePortInfo& WithAccessDirection(AccessDirection&& value) { SetAccessDirection(std::move(value)); return *this;}
181
183
192 inline const Aws::Vector<Aws::String>& GetCidrs() const{ return m_cidrs; }
193 inline bool CidrsHasBeenSet() const { return m_cidrsHasBeenSet; }
194 inline void SetCidrs(const Aws::Vector<Aws::String>& value) { m_cidrsHasBeenSet = true; m_cidrs = value; }
195 inline void SetCidrs(Aws::Vector<Aws::String>&& value) { m_cidrsHasBeenSet = true; m_cidrs = std::move(value); }
196 inline InstancePortInfo& WithCidrs(const Aws::Vector<Aws::String>& value) { SetCidrs(value); return *this;}
197 inline InstancePortInfo& WithCidrs(Aws::Vector<Aws::String>&& value) { SetCidrs(std::move(value)); return *this;}
198 inline InstancePortInfo& AddCidrs(const Aws::String& value) { m_cidrsHasBeenSet = true; m_cidrs.push_back(value); return *this; }
199 inline InstancePortInfo& AddCidrs(Aws::String&& value) { m_cidrsHasBeenSet = true; m_cidrs.push_back(std::move(value)); return *this; }
200 inline InstancePortInfo& AddCidrs(const char* value) { m_cidrsHasBeenSet = true; m_cidrs.push_back(value); return *this; }
202
204
214 inline const Aws::Vector<Aws::String>& GetIpv6Cidrs() const{ return m_ipv6Cidrs; }
215 inline bool Ipv6CidrsHasBeenSet() const { return m_ipv6CidrsHasBeenSet; }
216 inline void SetIpv6Cidrs(const Aws::Vector<Aws::String>& value) { m_ipv6CidrsHasBeenSet = true; m_ipv6Cidrs = value; }
217 inline void SetIpv6Cidrs(Aws::Vector<Aws::String>&& value) { m_ipv6CidrsHasBeenSet = true; m_ipv6Cidrs = std::move(value); }
218 inline InstancePortInfo& WithIpv6Cidrs(const Aws::Vector<Aws::String>& value) { SetIpv6Cidrs(value); return *this;}
219 inline InstancePortInfo& WithIpv6Cidrs(Aws::Vector<Aws::String>&& value) { SetIpv6Cidrs(std::move(value)); return *this;}
220 inline InstancePortInfo& AddIpv6Cidrs(const Aws::String& value) { m_ipv6CidrsHasBeenSet = true; m_ipv6Cidrs.push_back(value); return *this; }
221 inline InstancePortInfo& AddIpv6Cidrs(Aws::String&& value) { m_ipv6CidrsHasBeenSet = true; m_ipv6Cidrs.push_back(std::move(value)); return *this; }
222 inline InstancePortInfo& AddIpv6Cidrs(const char* value) { m_ipv6CidrsHasBeenSet = true; m_ipv6Cidrs.push_back(value); return *this; }
224
226
232 inline const Aws::Vector<Aws::String>& GetCidrListAliases() const{ return m_cidrListAliases; }
233 inline bool CidrListAliasesHasBeenSet() const { return m_cidrListAliasesHasBeenSet; }
234 inline void SetCidrListAliases(const Aws::Vector<Aws::String>& value) { m_cidrListAliasesHasBeenSet = true; m_cidrListAliases = value; }
235 inline void SetCidrListAliases(Aws::Vector<Aws::String>&& value) { m_cidrListAliasesHasBeenSet = true; m_cidrListAliases = std::move(value); }
237 inline InstancePortInfo& WithCidrListAliases(Aws::Vector<Aws::String>&& value) { SetCidrListAliases(std::move(value)); return *this;}
238 inline InstancePortInfo& AddCidrListAliases(const Aws::String& value) { m_cidrListAliasesHasBeenSet = true; m_cidrListAliases.push_back(value); return *this; }
239 inline InstancePortInfo& AddCidrListAliases(Aws::String&& value) { m_cidrListAliasesHasBeenSet = true; m_cidrListAliases.push_back(std::move(value)); return *this; }
240 inline InstancePortInfo& AddCidrListAliases(const char* value) { m_cidrListAliasesHasBeenSet = true; m_cidrListAliases.push_back(value); return *this; }
242 private:
243
244 int m_fromPort;
245 bool m_fromPortHasBeenSet = false;
246
247 int m_toPort;
248 bool m_toPortHasBeenSet = false;
249
250 NetworkProtocol m_protocol;
251 bool m_protocolHasBeenSet = false;
252
253 Aws::String m_accessFrom;
254 bool m_accessFromHasBeenSet = false;
255
256 PortAccessType m_accessType;
257 bool m_accessTypeHasBeenSet = false;
258
259 Aws::String m_commonName;
260 bool m_commonNameHasBeenSet = false;
261
262 AccessDirection m_accessDirection;
263 bool m_accessDirectionHasBeenSet = false;
264
266 bool m_cidrsHasBeenSet = false;
267
268 Aws::Vector<Aws::String> m_ipv6Cidrs;
269 bool m_ipv6CidrsHasBeenSet = false;
270
271 Aws::Vector<Aws::String> m_cidrListAliases;
272 bool m_cidrListAliasesHasBeenSet = false;
273 };
274
275} // namespace Model
276} // namespace Lightsail
277} // namespace Aws
void SetCommonName(const Aws::String &value)
InstancePortInfo & AddIpv6Cidrs(Aws::String &&value)
const Aws::Vector< Aws::String > & GetCidrListAliases() const
void SetProtocol(const NetworkProtocol &value)
const NetworkProtocol & GetProtocol() const
AWS_LIGHTSAIL_API InstancePortInfo(Aws::Utils::Json::JsonView jsonValue)
const AccessDirection & GetAccessDirection() const
InstancePortInfo & WithAccessType(const PortAccessType &value)
InstancePortInfo & WithCommonName(const Aws::String &value)
void SetCidrListAliases(Aws::Vector< Aws::String > &&value)
InstancePortInfo & WithCidrs(const Aws::Vector< Aws::String > &value)
void SetIpv6Cidrs(Aws::Vector< Aws::String > &&value)
InstancePortInfo & WithAccessFrom(const Aws::String &value)
InstancePortInfo & WithProtocol(NetworkProtocol &&value)
InstancePortInfo & WithCidrs(Aws::Vector< Aws::String > &&value)
void SetCidrs(Aws::Vector< Aws::String > &&value)
void SetCidrs(const Aws::Vector< Aws::String > &value)
InstancePortInfo & WithIpv6Cidrs(const Aws::Vector< Aws::String > &value)
InstancePortInfo & AddIpv6Cidrs(const Aws::String &value)
InstancePortInfo & WithAccessFrom(const char *value)
void SetCidrListAliases(const Aws::Vector< Aws::String > &value)
InstancePortInfo & WithIpv6Cidrs(Aws::Vector< Aws::String > &&value)
const Aws::String & GetAccessFrom() const
InstancePortInfo & WithAccessType(PortAccessType &&value)
InstancePortInfo & WithCidrListAliases(Aws::Vector< Aws::String > &&value)
InstancePortInfo & AddCidrListAliases(Aws::String &&value)
InstancePortInfo & WithAccessDirection(AccessDirection &&value)
const Aws::Vector< Aws::String > & GetIpv6Cidrs() const
InstancePortInfo & WithCommonName(Aws::String &&value)
InstancePortInfo & AddIpv6Cidrs(const char *value)
InstancePortInfo & AddCidrListAliases(const Aws::String &value)
void SetAccessDirection(AccessDirection &&value)
InstancePortInfo & WithAccessFrom(Aws::String &&value)
void SetAccessType(PortAccessType &&value)
const PortAccessType & GetAccessType() const
void SetAccessDirection(const AccessDirection &value)
const Aws::Vector< Aws::String > & GetCidrs() const
InstancePortInfo & WithProtocol(const NetworkProtocol &value)
void SetAccessType(const PortAccessType &value)
void SetIpv6Cidrs(const Aws::Vector< Aws::String > &value)
const Aws::String & GetCommonName() const
AWS_LIGHTSAIL_API InstancePortInfo & operator=(Aws::Utils::Json::JsonView jsonValue)
InstancePortInfo & WithCommonName(const char *value)
InstancePortInfo & AddCidrListAliases(const char *value)
InstancePortInfo & AddCidrs(Aws::String &&value)
AWS_LIGHTSAIL_API Aws::Utils::Json::JsonValue Jsonize() const
InstancePortInfo & WithAccessDirection(const AccessDirection &value)
InstancePortInfo & WithFromPort(int value)
void SetAccessFrom(const Aws::String &value)
InstancePortInfo & AddCidrs(const char *value)
InstancePortInfo & AddCidrs(const Aws::String &value)
void SetProtocol(NetworkProtocol &&value)
InstancePortInfo & WithCidrListAliases(const Aws::Vector< Aws::String > &value)
InstancePortInfo & WithToPort(int value)
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector
Aws::Utils::Json::JsonValue JsonValue