AWS SDK for C++  1.9.107
AWS SDK for C++
InstancePortState.h
Go to the documentation of this file.
1 
6 #pragma once
12 #include <utility>
13 
14 namespace Aws
15 {
16 namespace Utils
17 {
18 namespace Json
19 {
20  class JsonValue;
21  class JsonView;
22 } // namespace Json
23 } // namespace Utils
24 namespace Lightsail
25 {
26 namespace Model
27 {
28 
36  {
37  public:
42 
43 
59  inline int GetFromPort() const{ return m_fromPort; }
60 
76  inline bool FromPortHasBeenSet() const { return m_fromPortHasBeenSet; }
77 
93  inline void SetFromPort(int value) { m_fromPortHasBeenSet = true; m_fromPort = value; }
94 
110  inline InstancePortState& WithFromPort(int value) { SetFromPort(value); return *this;}
111 
112 
128  inline int GetToPort() const{ return m_toPort; }
129 
145  inline bool ToPortHasBeenSet() const { return m_toPortHasBeenSet; }
146 
162  inline void SetToPort(int value) { m_toPortHasBeenSet = true; m_toPort = value; }
163 
179  inline InstancePortState& WithToPort(int value) { SetToPort(value); return *this;}
180 
181 
206  inline const NetworkProtocol& GetProtocol() const{ return m_protocol; }
207 
232  inline bool ProtocolHasBeenSet() const { return m_protocolHasBeenSet; }
233 
258  inline void SetProtocol(const NetworkProtocol& value) { m_protocolHasBeenSet = true; m_protocol = value; }
259 
284  inline void SetProtocol(NetworkProtocol&& value) { m_protocolHasBeenSet = true; m_protocol = std::move(value); }
285 
310  inline InstancePortState& WithProtocol(const NetworkProtocol& value) { SetProtocol(value); return *this;}
311 
336  inline InstancePortState& WithProtocol(NetworkProtocol&& value) { SetProtocol(std::move(value)); return *this;}
337 
338 
344  inline const PortState& GetState() const{ return m_state; }
345 
351  inline bool StateHasBeenSet() const { return m_stateHasBeenSet; }
352 
358  inline void SetState(const PortState& value) { m_stateHasBeenSet = true; m_state = value; }
359 
365  inline void SetState(PortState&& value) { m_stateHasBeenSet = true; m_state = std::move(value); }
366 
372  inline InstancePortState& WithState(const PortState& value) { SetState(value); return *this;}
373 
379  inline InstancePortState& WithState(PortState&& value) { SetState(std::move(value)); return *this;}
380 
381 
391  inline const Aws::Vector<Aws::String>& GetCidrs() const{ return m_cidrs; }
392 
402  inline bool CidrsHasBeenSet() const { return m_cidrsHasBeenSet; }
403 
413  inline void SetCidrs(const Aws::Vector<Aws::String>& value) { m_cidrsHasBeenSet = true; m_cidrs = value; }
414 
424  inline void SetCidrs(Aws::Vector<Aws::String>&& value) { m_cidrsHasBeenSet = true; m_cidrs = std::move(value); }
425 
435  inline InstancePortState& WithCidrs(const Aws::Vector<Aws::String>& value) { SetCidrs(value); return *this;}
436 
446  inline InstancePortState& WithCidrs(Aws::Vector<Aws::String>&& value) { SetCidrs(std::move(value)); return *this;}
447 
457  inline InstancePortState& AddCidrs(const Aws::String& value) { m_cidrsHasBeenSet = true; m_cidrs.push_back(value); return *this; }
458 
468  inline InstancePortState& AddCidrs(Aws::String&& value) { m_cidrsHasBeenSet = true; m_cidrs.push_back(std::move(value)); return *this; }
469 
479  inline InstancePortState& AddCidrs(const char* value) { m_cidrsHasBeenSet = true; m_cidrs.push_back(value); return *this; }
480 
481 
492  inline const Aws::Vector<Aws::String>& GetIpv6Cidrs() const{ return m_ipv6Cidrs; }
493 
504  inline bool Ipv6CidrsHasBeenSet() const { return m_ipv6CidrsHasBeenSet; }
505 
516  inline void SetIpv6Cidrs(const Aws::Vector<Aws::String>& value) { m_ipv6CidrsHasBeenSet = true; m_ipv6Cidrs = value; }
517 
528  inline void SetIpv6Cidrs(Aws::Vector<Aws::String>&& value) { m_ipv6CidrsHasBeenSet = true; m_ipv6Cidrs = std::move(value); }
529 
540  inline InstancePortState& WithIpv6Cidrs(const Aws::Vector<Aws::String>& value) { SetIpv6Cidrs(value); return *this;}
541 
552  inline InstancePortState& WithIpv6Cidrs(Aws::Vector<Aws::String>&& value) { SetIpv6Cidrs(std::move(value)); return *this;}
553 
564  inline InstancePortState& AddIpv6Cidrs(const Aws::String& value) { m_ipv6CidrsHasBeenSet = true; m_ipv6Cidrs.push_back(value); return *this; }
565 
576  inline InstancePortState& AddIpv6Cidrs(Aws::String&& value) { m_ipv6CidrsHasBeenSet = true; m_ipv6Cidrs.push_back(std::move(value)); return *this; }
577 
588  inline InstancePortState& AddIpv6Cidrs(const char* value) { m_ipv6CidrsHasBeenSet = true; m_ipv6Cidrs.push_back(value); return *this; }
589 
590 
597  inline const Aws::Vector<Aws::String>& GetCidrListAliases() const{ return m_cidrListAliases; }
598 
605  inline bool CidrListAliasesHasBeenSet() const { return m_cidrListAliasesHasBeenSet; }
606 
613  inline void SetCidrListAliases(const Aws::Vector<Aws::String>& value) { m_cidrListAliasesHasBeenSet = true; m_cidrListAliases = value; }
614 
621  inline void SetCidrListAliases(Aws::Vector<Aws::String>&& value) { m_cidrListAliasesHasBeenSet = true; m_cidrListAliases = std::move(value); }
622 
629  inline InstancePortState& WithCidrListAliases(const Aws::Vector<Aws::String>& value) { SetCidrListAliases(value); return *this;}
630 
637  inline InstancePortState& WithCidrListAliases(Aws::Vector<Aws::String>&& value) { SetCidrListAliases(std::move(value)); return *this;}
638 
645  inline InstancePortState& AddCidrListAliases(const Aws::String& value) { m_cidrListAliasesHasBeenSet = true; m_cidrListAliases.push_back(value); return *this; }
646 
653  inline InstancePortState& AddCidrListAliases(Aws::String&& value) { m_cidrListAliasesHasBeenSet = true; m_cidrListAliases.push_back(std::move(value)); return *this; }
654 
661  inline InstancePortState& AddCidrListAliases(const char* value) { m_cidrListAliasesHasBeenSet = true; m_cidrListAliases.push_back(value); return *this; }
662 
663  private:
664 
665  int m_fromPort;
666  bool m_fromPortHasBeenSet;
667 
668  int m_toPort;
669  bool m_toPortHasBeenSet;
670 
671  NetworkProtocol m_protocol;
672  bool m_protocolHasBeenSet;
673 
674  PortState m_state;
675  bool m_stateHasBeenSet;
676 
677  Aws::Vector<Aws::String> m_cidrs;
678  bool m_cidrsHasBeenSet;
679 
680  Aws::Vector<Aws::String> m_ipv6Cidrs;
681  bool m_ipv6CidrsHasBeenSet;
682 
683  Aws::Vector<Aws::String> m_cidrListAliases;
684  bool m_cidrListAliasesHasBeenSet;
685  };
686 
687 } // namespace Model
688 } // namespace Lightsail
689 } // namespace Aws
Aws::Lightsail::Model::InstancePortState::AddIpv6Cidrs
InstancePortState & AddIpv6Cidrs(const Aws::String &value)
Definition: InstancePortState.h:564
Aws::Lightsail::Model::InstancePortState::WithState
InstancePortState & WithState(const PortState &value)
Definition: InstancePortState.h:372
Aws::Lightsail::Model::InstancePortState::WithCidrs
InstancePortState & WithCidrs(const Aws::Vector< Aws::String > &value)
Definition: InstancePortState.h:435
Aws::Lightsail::Model::InstancePortState::SetProtocol
void SetProtocol(const NetworkProtocol &value)
Definition: InstancePortState.h:258
Aws::Lightsail::Model::InstancePortState::StateHasBeenSet
bool StateHasBeenSet() const
Definition: InstancePortState.h:351
Aws::Lightsail::Model::InstancePortState::AddIpv6Cidrs
InstancePortState & AddIpv6Cidrs(Aws::String &&value)
Definition: InstancePortState.h:576
Aws::Lightsail::Model::InstancePortState::AddCidrs
InstancePortState & AddCidrs(const char *value)
Definition: InstancePortState.h:479
Aws::Lightsail::Model::InstancePortState::Jsonize
Aws::Utils::Json::JsonValue Jsonize() const
PortState.h
Aws::Lightsail::Model::InstancePortState::GetProtocol
const NetworkProtocol & GetProtocol() const
Definition: InstancePortState.h:206
Aws::Lightsail::Model::InstancePortState::WithToPort
InstancePortState & WithToPort(int value)
Definition: InstancePortState.h:179
Aws::Lightsail::Model::InstancePortState::operator=
InstancePortState & operator=(Aws::Utils::Json::JsonView jsonValue)
Aws::Lightsail::Model::InstancePortState::SetState
void SetState(PortState &&value)
Definition: InstancePortState.h:365
Aws::Lightsail::Model::InstancePortState::SetCidrListAliases
void SetCidrListAliases(const Aws::Vector< Aws::String > &value)
Definition: InstancePortState.h:613
Aws::Lightsail::Model::InstancePortState::GetCidrListAliases
const Aws::Vector< Aws::String > & GetCidrListAliases() const
Definition: InstancePortState.h:597
Aws::Lightsail::Model::InstancePortState::GetCidrs
const Aws::Vector< Aws::String > & GetCidrs() const
Definition: InstancePortState.h:391
Aws::Lightsail::Model::InstancePortState::SetIpv6Cidrs
void SetIpv6Cidrs(Aws::Vector< Aws::String > &&value)
Definition: InstancePortState.h:528
Aws::Lightsail::Model::InstancePortState::ProtocolHasBeenSet
bool ProtocolHasBeenSet() const
Definition: InstancePortState.h:232
Aws::Vector
std::vector< T, Aws::Allocator< T > > Vector
Definition: AWSVector.h:17
Aws::Lightsail::Model::InstancePortState::GetIpv6Cidrs
const Aws::Vector< Aws::String > & GetIpv6Cidrs() const
Definition: InstancePortState.h:492
Aws::Lightsail::Model::InstancePortState::CidrListAliasesHasBeenSet
bool CidrListAliasesHasBeenSet() const
Definition: InstancePortState.h:605
AWSVector.h
Aws::Lightsail::Model::InstancePortState::AddCidrs
InstancePortState & AddCidrs(Aws::String &&value)
Definition: InstancePortState.h:468
Aws::Lightsail::Model::InstancePortState::GetToPort
int GetToPort() const
Definition: InstancePortState.h:128
Aws::Lightsail::Model::InstancePortState::WithCidrListAliases
InstancePortState & WithCidrListAliases(Aws::Vector< Aws::String > &&value)
Definition: InstancePortState.h:637
NetworkProtocol.h
Aws::Lightsail::Model::InstancePortState::WithIpv6Cidrs
InstancePortState & WithIpv6Cidrs(const Aws::Vector< Aws::String > &value)
Definition: InstancePortState.h:540
Aws::Lightsail::Model::NetworkProtocol
NetworkProtocol
Definition: NetworkProtocol.h:17
Aws::Lightsail::Model::InstancePortState::Ipv6CidrsHasBeenSet
bool Ipv6CidrsHasBeenSet() const
Definition: InstancePortState.h:504
Aws::Lightsail::Model::InstancePortState::AddCidrListAliases
InstancePortState & AddCidrListAliases(Aws::String &&value)
Definition: InstancePortState.h:653
Aws::Lightsail::Model::InstancePortState::FromPortHasBeenSet
bool FromPortHasBeenSet() const
Definition: InstancePortState.h:76
Aws::Lightsail::Model::InstancePortState::ToPortHasBeenSet
bool ToPortHasBeenSet() const
Definition: InstancePortState.h:145
Aws::Lightsail::Model::InstancePortState::CidrsHasBeenSet
bool CidrsHasBeenSet() const
Definition: InstancePortState.h:402
Aws::Lightsail::Model::InstancePortState::SetState
void SetState(const PortState &value)
Definition: InstancePortState.h:358
Aws::Lightsail::Model::InstancePortState::InstancePortState
InstancePortState()
Aws::Lightsail::Model::InstancePortState::SetCidrs
void SetCidrs(Aws::Vector< Aws::String > &&value)
Definition: InstancePortState.h:424
Aws::Lightsail::Model::InstancePortState
Definition: InstancePortState.h:36
Aws::Lightsail::Model::InstancePortState::WithState
InstancePortState & WithState(PortState &&value)
Definition: InstancePortState.h:379
Aws::Lightsail::Model::InstancePortState::SetFromPort
void SetFromPort(int value)
Definition: InstancePortState.h:93
Aws::Lightsail::Model::InstancePortState::SetProtocol
void SetProtocol(NetworkProtocol &&value)
Definition: InstancePortState.h:284
Aws::Lightsail::Model::InstancePortState::SetToPort
void SetToPort(int value)
Definition: InstancePortState.h:162
Aws::Lightsail::Model::InstancePortState::GetFromPort
int GetFromPort() const
Definition: InstancePortState.h:59
Aws::Utils::Json::JsonView
Definition: JsonSerializer.h:235
AWSString.h
Aws::Lightsail::Model::InstancePortState::WithProtocol
InstancePortState & WithProtocol(NetworkProtocol &&value)
Definition: InstancePortState.h:336
Aws::Utils::Json::JsonValue
Definition: JsonSerializer.h:33
Aws::Lightsail::Model::InstancePortState::SetIpv6Cidrs
void SetIpv6Cidrs(const Aws::Vector< Aws::String > &value)
Definition: InstancePortState.h:516
Lightsail_EXPORTS.h
Aws::Lightsail::Model::InstancePortState::WithFromPort
InstancePortState & WithFromPort(int value)
Definition: InstancePortState.h:110
Aws::Lightsail::Model::InstancePortState::WithCidrs
InstancePortState & WithCidrs(Aws::Vector< Aws::String > &&value)
Definition: InstancePortState.h:446
Aws::Lightsail::Model::InstancePortState::InstancePortState
InstancePortState(Aws::Utils::Json::JsonView jsonValue)
Aws
Definition: AccessManagementClient.h:15
Aws::Lightsail::Model::InstancePortState::GetState
const PortState & GetState() const
Definition: InstancePortState.h:344
Aws::Lightsail::Model::InstancePortState::AddCidrs
InstancePortState & AddCidrs(const Aws::String &value)
Definition: InstancePortState.h:457
Aws::String
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Definition: AWSString.h:97
Aws::Lightsail::Model::InstancePortState::AddCidrListAliases
InstancePortState & AddCidrListAliases(const Aws::String &value)
Definition: InstancePortState.h:645
Aws::Lightsail::Model::InstancePortState::WithProtocol
InstancePortState & WithProtocol(const NetworkProtocol &value)
Definition: InstancePortState.h:310
AWS_LIGHTSAIL_API
#define AWS_LIGHTSAIL_API
Definition: Lightsail_EXPORTS.h:28
Aws::Lightsail::Model::InstancePortState::AddCidrListAliases
InstancePortState & AddCidrListAliases(const char *value)
Definition: InstancePortState.h:661
Aws::Lightsail::Model::PortState
PortState
Definition: PortState.h:17
Aws::Lightsail::Model::InstancePortState::SetCidrListAliases
void SetCidrListAliases(Aws::Vector< Aws::String > &&value)
Definition: InstancePortState.h:621
Aws::Lightsail::Model::InstancePortState::WithIpv6Cidrs
InstancePortState & WithIpv6Cidrs(Aws::Vector< Aws::String > &&value)
Definition: InstancePortState.h:552
Aws::Lightsail::Model::InstancePortState::SetCidrs
void SetCidrs(const Aws::Vector< Aws::String > &value)
Definition: InstancePortState.h:413
Aws::Lightsail::Model::InstancePortState::AddIpv6Cidrs
InstancePortState & AddIpv6Cidrs(const char *value)
Definition: InstancePortState.h:588
Aws::Lightsail::Model::InstancePortState::WithCidrListAliases
InstancePortState & WithCidrListAliases(const Aws::Vector< Aws::String > &value)
Definition: InstancePortState.h:629