AWS SDK for C++

AWS SDK for C++ Version 1.11.440

Loading...
Searching...
No Matches
InstancePortState.h
1
6#pragma once
7#include <aws/lightsail/Lightsail_EXPORTS.h>
8#include <aws/lightsail/model/NetworkProtocol.h>
9#include <aws/lightsail/model/PortState.h>
10#include <aws/core/utils/memory/stl/AWSVector.h>
11#include <aws/core/utils/memory/stl/AWSString.h>
12#include <utility>
13
14namespace Aws
15{
16namespace Utils
17{
18namespace Json
19{
20 class JsonValue;
21 class JsonView;
22} // namespace Json
23} // namespace Utils
24namespace Lightsail
25{
26namespace Model
27{
28
36 {
37 public:
38 AWS_LIGHTSAIL_API InstancePortState();
39 AWS_LIGHTSAIL_API InstancePortState(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 InstancePortState& 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 InstancePortState& 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 InstancePortState& WithProtocol(const NetworkProtocol& value) { SetProtocol(value); return *this;}
122 inline InstancePortState& WithProtocol(NetworkProtocol&& value) { SetProtocol(std::move(value)); return *this;}
124
126
131 inline const PortState& GetState() const{ return m_state; }
132 inline bool StateHasBeenSet() const { return m_stateHasBeenSet; }
133 inline void SetState(const PortState& value) { m_stateHasBeenSet = true; m_state = value; }
134 inline void SetState(PortState&& value) { m_stateHasBeenSet = true; m_state = std::move(value); }
135 inline InstancePortState& WithState(const PortState& value) { SetState(value); return *this;}
136 inline InstancePortState& WithState(PortState&& value) { SetState(std::move(value)); return *this;}
138
140
149 inline const Aws::Vector<Aws::String>& GetCidrs() const{ return m_cidrs; }
150 inline bool CidrsHasBeenSet() const { return m_cidrsHasBeenSet; }
151 inline void SetCidrs(const Aws::Vector<Aws::String>& value) { m_cidrsHasBeenSet = true; m_cidrs = value; }
152 inline void SetCidrs(Aws::Vector<Aws::String>&& value) { m_cidrsHasBeenSet = true; m_cidrs = std::move(value); }
153 inline InstancePortState& WithCidrs(const Aws::Vector<Aws::String>& value) { SetCidrs(value); return *this;}
154 inline InstancePortState& WithCidrs(Aws::Vector<Aws::String>&& value) { SetCidrs(std::move(value)); return *this;}
155 inline InstancePortState& AddCidrs(const Aws::String& value) { m_cidrsHasBeenSet = true; m_cidrs.push_back(value); return *this; }
156 inline InstancePortState& AddCidrs(Aws::String&& value) { m_cidrsHasBeenSet = true; m_cidrs.push_back(std::move(value)); return *this; }
157 inline InstancePortState& AddCidrs(const char* value) { m_cidrsHasBeenSet = true; m_cidrs.push_back(value); return *this; }
159
161
171 inline const Aws::Vector<Aws::String>& GetIpv6Cidrs() const{ return m_ipv6Cidrs; }
172 inline bool Ipv6CidrsHasBeenSet() const { return m_ipv6CidrsHasBeenSet; }
173 inline void SetIpv6Cidrs(const Aws::Vector<Aws::String>& value) { m_ipv6CidrsHasBeenSet = true; m_ipv6Cidrs = value; }
174 inline void SetIpv6Cidrs(Aws::Vector<Aws::String>&& value) { m_ipv6CidrsHasBeenSet = true; m_ipv6Cidrs = std::move(value); }
175 inline InstancePortState& WithIpv6Cidrs(const Aws::Vector<Aws::String>& value) { SetIpv6Cidrs(value); return *this;}
176 inline InstancePortState& WithIpv6Cidrs(Aws::Vector<Aws::String>&& value) { SetIpv6Cidrs(std::move(value)); return *this;}
177 inline InstancePortState& AddIpv6Cidrs(const Aws::String& value) { m_ipv6CidrsHasBeenSet = true; m_ipv6Cidrs.push_back(value); return *this; }
178 inline InstancePortState& AddIpv6Cidrs(Aws::String&& value) { m_ipv6CidrsHasBeenSet = true; m_ipv6Cidrs.push_back(std::move(value)); return *this; }
179 inline InstancePortState& AddIpv6Cidrs(const char* value) { m_ipv6CidrsHasBeenSet = true; m_ipv6Cidrs.push_back(value); return *this; }
181
183
189 inline const Aws::Vector<Aws::String>& GetCidrListAliases() const{ return m_cidrListAliases; }
190 inline bool CidrListAliasesHasBeenSet() const { return m_cidrListAliasesHasBeenSet; }
191 inline void SetCidrListAliases(const Aws::Vector<Aws::String>& value) { m_cidrListAliasesHasBeenSet = true; m_cidrListAliases = value; }
192 inline void SetCidrListAliases(Aws::Vector<Aws::String>&& value) { m_cidrListAliasesHasBeenSet = true; m_cidrListAliases = std::move(value); }
194 inline InstancePortState& WithCidrListAliases(Aws::Vector<Aws::String>&& value) { SetCidrListAliases(std::move(value)); return *this;}
195 inline InstancePortState& AddCidrListAliases(const Aws::String& value) { m_cidrListAliasesHasBeenSet = true; m_cidrListAliases.push_back(value); return *this; }
196 inline InstancePortState& AddCidrListAliases(Aws::String&& value) { m_cidrListAliasesHasBeenSet = true; m_cidrListAliases.push_back(std::move(value)); return *this; }
197 inline InstancePortState& AddCidrListAliases(const char* value) { m_cidrListAliasesHasBeenSet = true; m_cidrListAliases.push_back(value); return *this; }
199 private:
200
201 int m_fromPort;
202 bool m_fromPortHasBeenSet = false;
203
204 int m_toPort;
205 bool m_toPortHasBeenSet = false;
206
207 NetworkProtocol m_protocol;
208 bool m_protocolHasBeenSet = false;
209
210 PortState m_state;
211 bool m_stateHasBeenSet = false;
212
214 bool m_cidrsHasBeenSet = false;
215
216 Aws::Vector<Aws::String> m_ipv6Cidrs;
217 bool m_ipv6CidrsHasBeenSet = false;
218
219 Aws::Vector<Aws::String> m_cidrListAliases;
220 bool m_cidrListAliasesHasBeenSet = false;
221 };
222
223} // namespace Model
224} // namespace Lightsail
225} // namespace Aws
void SetCidrs(Aws::Vector< Aws::String > &&value)
InstancePortState & WithCidrListAliases(const Aws::Vector< Aws::String > &value)
InstancePortState & WithCidrListAliases(Aws::Vector< Aws::String > &&value)
InstancePortState & WithFromPort(int value)
void SetProtocol(NetworkProtocol &&value)
InstancePortState & WithIpv6Cidrs(const Aws::Vector< Aws::String > &value)
const Aws::Vector< Aws::String > & GetIpv6Cidrs() const
InstancePortState & WithProtocol(const NetworkProtocol &value)
InstancePortState & WithCidrs(Aws::Vector< Aws::String > &&value)
InstancePortState & AddCidrListAliases(Aws::String &&value)
void SetIpv6Cidrs(Aws::Vector< Aws::String > &&value)
InstancePortState & WithIpv6Cidrs(Aws::Vector< Aws::String > &&value)
InstancePortState & AddCidrListAliases(const char *value)
InstancePortState & WithState(PortState &&value)
void SetIpv6Cidrs(const Aws::Vector< Aws::String > &value)
InstancePortState & WithState(const PortState &value)
const Aws::Vector< Aws::String > & GetCidrs() const
InstancePortState & WithCidrs(const Aws::Vector< Aws::String > &value)
InstancePortState & AddCidrs(const char *value)
AWS_LIGHTSAIL_API Aws::Utils::Json::JsonValue Jsonize() const
void SetCidrs(const Aws::Vector< Aws::String > &value)
InstancePortState & WithProtocol(NetworkProtocol &&value)
void SetProtocol(const NetworkProtocol &value)
InstancePortState & AddIpv6Cidrs(const char *value)
AWS_LIGHTSAIL_API InstancePortState(Aws::Utils::Json::JsonView jsonValue)
InstancePortState & AddCidrs(const Aws::String &value)
void SetCidrListAliases(const Aws::Vector< Aws::String > &value)
InstancePortState & AddCidrs(Aws::String &&value)
const NetworkProtocol & GetProtocol() const
const Aws::Vector< Aws::String > & GetCidrListAliases() const
InstancePortState & AddCidrListAliases(const Aws::String &value)
InstancePortState & WithToPort(int value)
void SetCidrListAliases(Aws::Vector< Aws::String > &&value)
AWS_LIGHTSAIL_API InstancePortState & operator=(Aws::Utils::Json::JsonView jsonValue)
InstancePortState & AddIpv6Cidrs(const Aws::String &value)
InstancePortState & AddIpv6Cidrs(Aws::String &&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