AWS SDK for C++

AWS SDK for C++ Version 1.11.607

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() = default;
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 NetworkProtocol GetProtocol() const { return m_protocol; }
118 inline bool ProtocolHasBeenSet() const { return m_protocolHasBeenSet; }
119 inline void SetProtocol(NetworkProtocol value) { m_protocolHasBeenSet = true; m_protocol = value; }
120 inline InstancePortState& WithProtocol(NetworkProtocol value) { SetProtocol(value); return *this;}
122
124
129 inline PortState GetState() const { return m_state; }
130 inline bool StateHasBeenSet() const { return m_stateHasBeenSet; }
131 inline void SetState(PortState value) { m_stateHasBeenSet = true; m_state = value; }
132 inline InstancePortState& WithState(PortState value) { SetState(value); return *this;}
134
136
145 inline const Aws::Vector<Aws::String>& GetCidrs() const { return m_cidrs; }
146 inline bool CidrsHasBeenSet() const { return m_cidrsHasBeenSet; }
147 template<typename CidrsT = Aws::Vector<Aws::String>>
148 void SetCidrs(CidrsT&& value) { m_cidrsHasBeenSet = true; m_cidrs = std::forward<CidrsT>(value); }
149 template<typename CidrsT = Aws::Vector<Aws::String>>
150 InstancePortState& WithCidrs(CidrsT&& value) { SetCidrs(std::forward<CidrsT>(value)); return *this;}
151 template<typename CidrsT = Aws::String>
152 InstancePortState& AddCidrs(CidrsT&& value) { m_cidrsHasBeenSet = true; m_cidrs.emplace_back(std::forward<CidrsT>(value)); return *this; }
154
156
166 inline const Aws::Vector<Aws::String>& GetIpv6Cidrs() const { return m_ipv6Cidrs; }
167 inline bool Ipv6CidrsHasBeenSet() const { return m_ipv6CidrsHasBeenSet; }
168 template<typename Ipv6CidrsT = Aws::Vector<Aws::String>>
169 void SetIpv6Cidrs(Ipv6CidrsT&& value) { m_ipv6CidrsHasBeenSet = true; m_ipv6Cidrs = std::forward<Ipv6CidrsT>(value); }
170 template<typename Ipv6CidrsT = Aws::Vector<Aws::String>>
171 InstancePortState& WithIpv6Cidrs(Ipv6CidrsT&& value) { SetIpv6Cidrs(std::forward<Ipv6CidrsT>(value)); return *this;}
172 template<typename Ipv6CidrsT = Aws::String>
173 InstancePortState& AddIpv6Cidrs(Ipv6CidrsT&& value) { m_ipv6CidrsHasBeenSet = true; m_ipv6Cidrs.emplace_back(std::forward<Ipv6CidrsT>(value)); return *this; }
175
177
183 inline const Aws::Vector<Aws::String>& GetCidrListAliases() const { return m_cidrListAliases; }
184 inline bool CidrListAliasesHasBeenSet() const { return m_cidrListAliasesHasBeenSet; }
185 template<typename CidrListAliasesT = Aws::Vector<Aws::String>>
186 void SetCidrListAliases(CidrListAliasesT&& value) { m_cidrListAliasesHasBeenSet = true; m_cidrListAliases = std::forward<CidrListAliasesT>(value); }
187 template<typename CidrListAliasesT = Aws::Vector<Aws::String>>
188 InstancePortState& WithCidrListAliases(CidrListAliasesT&& value) { SetCidrListAliases(std::forward<CidrListAliasesT>(value)); return *this;}
189 template<typename CidrListAliasesT = Aws::String>
190 InstancePortState& AddCidrListAliases(CidrListAliasesT&& value) { m_cidrListAliasesHasBeenSet = true; m_cidrListAliases.emplace_back(std::forward<CidrListAliasesT>(value)); return *this; }
192 private:
193
194 int m_fromPort{0};
195 bool m_fromPortHasBeenSet = false;
196
197 int m_toPort{0};
198 bool m_toPortHasBeenSet = false;
199
201 bool m_protocolHasBeenSet = false;
202
204 bool m_stateHasBeenSet = false;
205
207 bool m_cidrsHasBeenSet = false;
208
209 Aws::Vector<Aws::String> m_ipv6Cidrs;
210 bool m_ipv6CidrsHasBeenSet = false;
211
212 Aws::Vector<Aws::String> m_cidrListAliases;
213 bool m_cidrListAliasesHasBeenSet = false;
214 };
215
216} // namespace Model
217} // namespace Lightsail
218} // namespace Aws
InstancePortState & WithFromPort(int value)
const Aws::Vector< Aws::String > & GetIpv6Cidrs() const
InstancePortState & AddIpv6Cidrs(Ipv6CidrsT &&value)
InstancePortState & WithProtocol(NetworkProtocol value)
InstancePortState & WithIpv6Cidrs(Ipv6CidrsT &&value)
InstancePortState & AddCidrs(CidrsT &&value)
const Aws::Vector< Aws::String > & GetCidrs() const
AWS_LIGHTSAIL_API Aws::Utils::Json::JsonValue Jsonize() const
InstancePortState & WithCidrListAliases(CidrListAliasesT &&value)
InstancePortState & WithState(PortState value)
AWS_LIGHTSAIL_API InstancePortState(Aws::Utils::Json::JsonView jsonValue)
void SetCidrListAliases(CidrListAliasesT &&value)
InstancePortState & WithCidrs(CidrsT &&value)
const Aws::Vector< Aws::String > & GetCidrListAliases() const
AWS_LIGHTSAIL_API InstancePortState()=default
InstancePortState & WithToPort(int value)
AWS_LIGHTSAIL_API InstancePortState & operator=(Aws::Utils::Json::JsonView jsonValue)
InstancePortState & AddCidrListAliases(CidrListAliasesT &&value)
std::vector< T, Aws::Allocator< T > > Vector
Aws::Utils::Json::JsonValue JsonValue