AWS SDK for C++

AWS SDK for C++ Version 1.11.440

Loading...
Searching...
No Matches
PortInfo.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/AWSVector.h>
10#include <aws/core/utils/memory/stl/AWSString.h>
11#include <utility>
12
13namespace Aws
14{
15namespace Utils
16{
17namespace Json
18{
19 class JsonValue;
20 class JsonView;
21} // namespace Json
22} // namespace Utils
23namespace Lightsail
24{
25namespace Model
26{
27
36 {
37 public:
38 AWS_LIGHTSAIL_API PortInfo();
39 AWS_LIGHTSAIL_API PortInfo(Aws::Utils::Json::JsonView jsonValue);
40 AWS_LIGHTSAIL_API PortInfo& operator=(Aws::Utils::Json::JsonView jsonValue);
41 AWS_LIGHTSAIL_API Aws::Utils::Json::JsonValue Jsonize() const;
42
43
45
60 inline int GetFromPort() const{ return m_fromPort; }
61 inline bool FromPortHasBeenSet() const { return m_fromPortHasBeenSet; }
62 inline void SetFromPort(int value) { m_fromPortHasBeenSet = true; m_fromPort = value; }
63 inline PortInfo& WithFromPort(int value) { SetFromPort(value); return *this;}
65
67
82 inline int GetToPort() const{ return m_toPort; }
83 inline bool ToPortHasBeenSet() const { return m_toPortHasBeenSet; }
84 inline void SetToPort(int value) { m_toPortHasBeenSet = true; m_toPort = value; }
85 inline PortInfo& WithToPort(int value) { SetToPort(value); return *this;}
87
89
117 inline const NetworkProtocol& GetProtocol() const{ return m_protocol; }
118 inline bool ProtocolHasBeenSet() const { return m_protocolHasBeenSet; }
119 inline void SetProtocol(const NetworkProtocol& value) { m_protocolHasBeenSet = true; m_protocol = value; }
120 inline void SetProtocol(NetworkProtocol&& value) { m_protocolHasBeenSet = true; m_protocol = std::move(value); }
121 inline PortInfo& WithProtocol(const NetworkProtocol& value) { SetProtocol(value); return *this;}
122 inline PortInfo& WithProtocol(NetworkProtocol&& value) { SetProtocol(std::move(value)); return *this;}
124
126
139 inline const Aws::Vector<Aws::String>& GetCidrs() const{ return m_cidrs; }
140 inline bool CidrsHasBeenSet() const { return m_cidrsHasBeenSet; }
141 inline void SetCidrs(const Aws::Vector<Aws::String>& value) { m_cidrsHasBeenSet = true; m_cidrs = value; }
142 inline void SetCidrs(Aws::Vector<Aws::String>&& value) { m_cidrsHasBeenSet = true; m_cidrs = std::move(value); }
143 inline PortInfo& WithCidrs(const Aws::Vector<Aws::String>& value) { SetCidrs(value); return *this;}
144 inline PortInfo& WithCidrs(Aws::Vector<Aws::String>&& value) { SetCidrs(std::move(value)); return *this;}
145 inline PortInfo& AddCidrs(const Aws::String& value) { m_cidrsHasBeenSet = true; m_cidrs.push_back(value); return *this; }
146 inline PortInfo& AddCidrs(Aws::String&& value) { m_cidrsHasBeenSet = true; m_cidrs.push_back(std::move(value)); return *this; }
147 inline PortInfo& AddCidrs(const char* value) { m_cidrsHasBeenSet = true; m_cidrs.push_back(value); return *this; }
149
151
161 inline const Aws::Vector<Aws::String>& GetIpv6Cidrs() const{ return m_ipv6Cidrs; }
162 inline bool Ipv6CidrsHasBeenSet() const { return m_ipv6CidrsHasBeenSet; }
163 inline void SetIpv6Cidrs(const Aws::Vector<Aws::String>& value) { m_ipv6CidrsHasBeenSet = true; m_ipv6Cidrs = value; }
164 inline void SetIpv6Cidrs(Aws::Vector<Aws::String>&& value) { m_ipv6CidrsHasBeenSet = true; m_ipv6Cidrs = std::move(value); }
165 inline PortInfo& WithIpv6Cidrs(const Aws::Vector<Aws::String>& value) { SetIpv6Cidrs(value); return *this;}
166 inline PortInfo& WithIpv6Cidrs(Aws::Vector<Aws::String>&& value) { SetIpv6Cidrs(std::move(value)); return *this;}
167 inline PortInfo& AddIpv6Cidrs(const Aws::String& value) { m_ipv6CidrsHasBeenSet = true; m_ipv6Cidrs.push_back(value); return *this; }
168 inline PortInfo& AddIpv6Cidrs(Aws::String&& value) { m_ipv6CidrsHasBeenSet = true; m_ipv6Cidrs.push_back(std::move(value)); return *this; }
169 inline PortInfo& AddIpv6Cidrs(const char* value) { m_ipv6CidrsHasBeenSet = true; m_ipv6Cidrs.push_back(value); return *this; }
171
173
179 inline const Aws::Vector<Aws::String>& GetCidrListAliases() const{ return m_cidrListAliases; }
180 inline bool CidrListAliasesHasBeenSet() const { return m_cidrListAliasesHasBeenSet; }
181 inline void SetCidrListAliases(const Aws::Vector<Aws::String>& value) { m_cidrListAliasesHasBeenSet = true; m_cidrListAliases = value; }
182 inline void SetCidrListAliases(Aws::Vector<Aws::String>&& value) { m_cidrListAliasesHasBeenSet = true; m_cidrListAliases = std::move(value); }
183 inline PortInfo& WithCidrListAliases(const Aws::Vector<Aws::String>& value) { SetCidrListAliases(value); return *this;}
184 inline PortInfo& WithCidrListAliases(Aws::Vector<Aws::String>&& value) { SetCidrListAliases(std::move(value)); return *this;}
185 inline PortInfo& AddCidrListAliases(const Aws::String& value) { m_cidrListAliasesHasBeenSet = true; m_cidrListAliases.push_back(value); return *this; }
186 inline PortInfo& AddCidrListAliases(Aws::String&& value) { m_cidrListAliasesHasBeenSet = true; m_cidrListAliases.push_back(std::move(value)); return *this; }
187 inline PortInfo& AddCidrListAliases(const char* value) { m_cidrListAliasesHasBeenSet = true; m_cidrListAliases.push_back(value); return *this; }
189 private:
190
191 int m_fromPort;
192 bool m_fromPortHasBeenSet = false;
193
194 int m_toPort;
195 bool m_toPortHasBeenSet = false;
196
197 NetworkProtocol m_protocol;
198 bool m_protocolHasBeenSet = false;
199
201 bool m_cidrsHasBeenSet = false;
202
203 Aws::Vector<Aws::String> m_ipv6Cidrs;
204 bool m_ipv6CidrsHasBeenSet = false;
205
206 Aws::Vector<Aws::String> m_cidrListAliases;
207 bool m_cidrListAliasesHasBeenSet = false;
208 };
209
210} // namespace Model
211} // namespace Lightsail
212} // namespace Aws
PortInfo & AddCidrs(Aws::String &&value)
Definition PortInfo.h:146
PortInfo & WithFromPort(int value)
Definition PortInfo.h:63
PortInfo & AddCidrListAliases(const Aws::String &value)
Definition PortInfo.h:185
PortInfo & AddCidrs(const Aws::String &value)
Definition PortInfo.h:145
void SetCidrListAliases(Aws::Vector< Aws::String > &&value)
Definition PortInfo.h:182
PortInfo & WithCidrListAliases(Aws::Vector< Aws::String > &&value)
Definition PortInfo.h:184
AWS_LIGHTSAIL_API PortInfo & operator=(Aws::Utils::Json::JsonView jsonValue)
void SetCidrs(Aws::Vector< Aws::String > &&value)
Definition PortInfo.h:142
PortInfo & AddIpv6Cidrs(const Aws::String &value)
Definition PortInfo.h:167
PortInfo & WithProtocol(const NetworkProtocol &value)
Definition PortInfo.h:121
PortInfo & AddCidrListAliases(Aws::String &&value)
Definition PortInfo.h:186
PortInfo & WithToPort(int value)
Definition PortInfo.h:85
AWS_LIGHTSAIL_API PortInfo()
PortInfo & AddCidrs(const char *value)
Definition PortInfo.h:147
void SetIpv6Cidrs(const Aws::Vector< Aws::String > &value)
Definition PortInfo.h:163
const Aws::Vector< Aws::String > & GetCidrs() const
Definition PortInfo.h:139
PortInfo & AddIpv6Cidrs(Aws::String &&value)
Definition PortInfo.h:168
void SetCidrs(const Aws::Vector< Aws::String > &value)
Definition PortInfo.h:141
void SetFromPort(int value)
Definition PortInfo.h:62
void SetProtocol(NetworkProtocol &&value)
Definition PortInfo.h:120
const Aws::Vector< Aws::String > & GetIpv6Cidrs() const
Definition PortInfo.h:161
const Aws::Vector< Aws::String > & GetCidrListAliases() const
Definition PortInfo.h:179
PortInfo & WithCidrs(Aws::Vector< Aws::String > &&value)
Definition PortInfo.h:144
bool CidrListAliasesHasBeenSet() const
Definition PortInfo.h:180
void SetProtocol(const NetworkProtocol &value)
Definition PortInfo.h:119
AWS_LIGHTSAIL_API Aws::Utils::Json::JsonValue Jsonize() const
PortInfo & WithCidrs(const Aws::Vector< Aws::String > &value)
Definition PortInfo.h:143
void SetIpv6Cidrs(Aws::Vector< Aws::String > &&value)
Definition PortInfo.h:164
PortInfo & AddIpv6Cidrs(const char *value)
Definition PortInfo.h:169
void SetCidrListAliases(const Aws::Vector< Aws::String > &value)
Definition PortInfo.h:181
PortInfo & WithIpv6Cidrs(Aws::Vector< Aws::String > &&value)
Definition PortInfo.h:166
PortInfo & AddCidrListAliases(const char *value)
Definition PortInfo.h:187
PortInfo & WithCidrListAliases(const Aws::Vector< Aws::String > &value)
Definition PortInfo.h:183
AWS_LIGHTSAIL_API PortInfo(Aws::Utils::Json::JsonView jsonValue)
const NetworkProtocol & GetProtocol() const
Definition PortInfo.h:117
PortInfo & WithIpv6Cidrs(const Aws::Vector< Aws::String > &value)
Definition PortInfo.h:165
PortInfo & WithProtocol(NetworkProtocol &&value)
Definition PortInfo.h:122
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector
Aws::Utils::Json::JsonValue JsonValue