AWS SDK for C++  1.9.109
AWS SDK for C++
PortInfo.h
Go to the documentation of this file.
1 
6 #pragma once
11 #include <utility>
12 
13 namespace Aws
14 {
15 namespace Utils
16 {
17 namespace Json
18 {
19  class JsonValue;
20  class JsonView;
21 } // namespace Json
22 } // namespace Utils
23 namespace Lightsail
24 {
25 namespace Model
26 {
27 
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 PortInfo& 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 PortInfo& 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 PortInfo& WithProtocol(const NetworkProtocol& value) { SetProtocol(value); return *this;}
311 
336  inline PortInfo& WithProtocol(NetworkProtocol&& value) { SetProtocol(std::move(value)); return *this;}
337 
338 
352  inline const Aws::Vector<Aws::String>& GetCidrs() const{ return m_cidrs; }
353 
367  inline bool CidrsHasBeenSet() const { return m_cidrsHasBeenSet; }
368 
382  inline void SetCidrs(const Aws::Vector<Aws::String>& value) { m_cidrsHasBeenSet = true; m_cidrs = value; }
383 
397  inline void SetCidrs(Aws::Vector<Aws::String>&& value) { m_cidrsHasBeenSet = true; m_cidrs = std::move(value); }
398 
412  inline PortInfo& WithCidrs(const Aws::Vector<Aws::String>& value) { SetCidrs(value); return *this;}
413 
427  inline PortInfo& WithCidrs(Aws::Vector<Aws::String>&& value) { SetCidrs(std::move(value)); return *this;}
428 
442  inline PortInfo& AddCidrs(const Aws::String& value) { m_cidrsHasBeenSet = true; m_cidrs.push_back(value); return *this; }
443 
457  inline PortInfo& AddCidrs(Aws::String&& value) { m_cidrsHasBeenSet = true; m_cidrs.push_back(std::move(value)); return *this; }
458 
472  inline PortInfo& AddCidrs(const char* value) { m_cidrsHasBeenSet = true; m_cidrs.push_back(value); return *this; }
473 
474 
485  inline const Aws::Vector<Aws::String>& GetIpv6Cidrs() const{ return m_ipv6Cidrs; }
486 
497  inline bool Ipv6CidrsHasBeenSet() const { return m_ipv6CidrsHasBeenSet; }
498 
509  inline void SetIpv6Cidrs(const Aws::Vector<Aws::String>& value) { m_ipv6CidrsHasBeenSet = true; m_ipv6Cidrs = value; }
510 
521  inline void SetIpv6Cidrs(Aws::Vector<Aws::String>&& value) { m_ipv6CidrsHasBeenSet = true; m_ipv6Cidrs = std::move(value); }
522 
533  inline PortInfo& WithIpv6Cidrs(const Aws::Vector<Aws::String>& value) { SetIpv6Cidrs(value); return *this;}
534 
545  inline PortInfo& WithIpv6Cidrs(Aws::Vector<Aws::String>&& value) { SetIpv6Cidrs(std::move(value)); return *this;}
546 
557  inline PortInfo& AddIpv6Cidrs(const Aws::String& value) { m_ipv6CidrsHasBeenSet = true; m_ipv6Cidrs.push_back(value); return *this; }
558 
569  inline PortInfo& AddIpv6Cidrs(Aws::String&& value) { m_ipv6CidrsHasBeenSet = true; m_ipv6Cidrs.push_back(std::move(value)); return *this; }
570 
581  inline PortInfo& AddIpv6Cidrs(const char* value) { m_ipv6CidrsHasBeenSet = true; m_ipv6Cidrs.push_back(value); return *this; }
582 
583 
590  inline const Aws::Vector<Aws::String>& GetCidrListAliases() const{ return m_cidrListAliases; }
591 
598  inline bool CidrListAliasesHasBeenSet() const { return m_cidrListAliasesHasBeenSet; }
599 
606  inline void SetCidrListAliases(const Aws::Vector<Aws::String>& value) { m_cidrListAliasesHasBeenSet = true; m_cidrListAliases = value; }
607 
614  inline void SetCidrListAliases(Aws::Vector<Aws::String>&& value) { m_cidrListAliasesHasBeenSet = true; m_cidrListAliases = std::move(value); }
615 
622  inline PortInfo& WithCidrListAliases(const Aws::Vector<Aws::String>& value) { SetCidrListAliases(value); return *this;}
623 
630  inline PortInfo& WithCidrListAliases(Aws::Vector<Aws::String>&& value) { SetCidrListAliases(std::move(value)); return *this;}
631 
638  inline PortInfo& AddCidrListAliases(const Aws::String& value) { m_cidrListAliasesHasBeenSet = true; m_cidrListAliases.push_back(value); return *this; }
639 
646  inline PortInfo& AddCidrListAliases(Aws::String&& value) { m_cidrListAliasesHasBeenSet = true; m_cidrListAliases.push_back(std::move(value)); return *this; }
647 
654  inline PortInfo& AddCidrListAliases(const char* value) { m_cidrListAliasesHasBeenSet = true; m_cidrListAliases.push_back(value); return *this; }
655 
656  private:
657 
658  int m_fromPort;
659  bool m_fromPortHasBeenSet;
660 
661  int m_toPort;
662  bool m_toPortHasBeenSet;
663 
664  NetworkProtocol m_protocol;
665  bool m_protocolHasBeenSet;
666 
667  Aws::Vector<Aws::String> m_cidrs;
668  bool m_cidrsHasBeenSet;
669 
670  Aws::Vector<Aws::String> m_ipv6Cidrs;
671  bool m_ipv6CidrsHasBeenSet;
672 
673  Aws::Vector<Aws::String> m_cidrListAliases;
674  bool m_cidrListAliasesHasBeenSet;
675  };
676 
677 } // namespace Model
678 } // namespace Lightsail
679 } // namespace Aws
Aws::Lightsail::Model::PortInfo::ProtocolHasBeenSet
bool ProtocolHasBeenSet() const
Definition: PortInfo.h:232
Aws::Lightsail::Model::PortInfo::GetCidrListAliases
const Aws::Vector< Aws::String > & GetCidrListAliases() const
Definition: PortInfo.h:590
Aws::Lightsail::Model::PortInfo::AddIpv6Cidrs
PortInfo & AddIpv6Cidrs(Aws::String &&value)
Definition: PortInfo.h:569
Aws::Lightsail::Model::PortInfo::SetCidrs
void SetCidrs(const Aws::Vector< Aws::String > &value)
Definition: PortInfo.h:382
Aws::Lightsail::Model::PortInfo::AddIpv6Cidrs
PortInfo & AddIpv6Cidrs(const char *value)
Definition: PortInfo.h:581
Aws::Lightsail::Model::PortInfo::SetCidrListAliases
void SetCidrListAliases(Aws::Vector< Aws::String > &&value)
Definition: PortInfo.h:614
Aws::Lightsail::Model::PortInfo::WithCidrs
PortInfo & WithCidrs(Aws::Vector< Aws::String > &&value)
Definition: PortInfo.h:427
Aws::Lightsail::Model::PortInfo::AddCidrListAliases
PortInfo & AddCidrListAliases(Aws::String &&value)
Definition: PortInfo.h:646
Aws::Lightsail::Model::PortInfo::SetFromPort
void SetFromPort(int value)
Definition: PortInfo.h:93
Aws::Lightsail::Model::PortInfo::PortInfo
PortInfo()
Aws::Lightsail::Model::PortInfo::AddCidrs
PortInfo & AddCidrs(Aws::String &&value)
Definition: PortInfo.h:457
Aws::Vector
std::vector< T, Aws::Allocator< T > > Vector
Definition: AWSVector.h:17
Aws::Lightsail::Model::PortInfo::CidrsHasBeenSet
bool CidrsHasBeenSet() const
Definition: PortInfo.h:367
AWSVector.h
Aws::Lightsail::Model::PortInfo::AddCidrListAliases
PortInfo & AddCidrListAliases(const char *value)
Definition: PortInfo.h:654
Aws::Lightsail::Model::PortInfo::SetIpv6Cidrs
void SetIpv6Cidrs(const Aws::Vector< Aws::String > &value)
Definition: PortInfo.h:509
Aws::Lightsail::Model::PortInfo::WithCidrs
PortInfo & WithCidrs(const Aws::Vector< Aws::String > &value)
Definition: PortInfo.h:412
NetworkProtocol.h
Aws::Lightsail::Model::PortInfo::GetToPort
int GetToPort() const
Definition: PortInfo.h:128
Aws::Lightsail::Model::PortInfo::WithFromPort
PortInfo & WithFromPort(int value)
Definition: PortInfo.h:110
Aws::Lightsail::Model::PortInfo::WithIpv6Cidrs
PortInfo & WithIpv6Cidrs(const Aws::Vector< Aws::String > &value)
Definition: PortInfo.h:533
Aws::Lightsail::Model::NetworkProtocol
NetworkProtocol
Definition: NetworkProtocol.h:17
Aws::Lightsail::Model::PortInfo::GetIpv6Cidrs
const Aws::Vector< Aws::String > & GetIpv6Cidrs() const
Definition: PortInfo.h:485
Aws::Lightsail::Model::PortInfo::WithProtocol
PortInfo & WithProtocol(const NetworkProtocol &value)
Definition: PortInfo.h:310
Aws::Lightsail::Model::PortInfo::AddCidrs
PortInfo & AddCidrs(const char *value)
Definition: PortInfo.h:472
Aws::Lightsail::Model::PortInfo::WithProtocol
PortInfo & WithProtocol(NetworkProtocol &&value)
Definition: PortInfo.h:336
Aws::Lightsail::Model::PortInfo::SetToPort
void SetToPort(int value)
Definition: PortInfo.h:162
Aws::Lightsail::Model::PortInfo::GetFromPort
int GetFromPort() const
Definition: PortInfo.h:59
Aws::Lightsail::Model::PortInfo::WithCidrListAliases
PortInfo & WithCidrListAliases(const Aws::Vector< Aws::String > &value)
Definition: PortInfo.h:622
Aws::Lightsail::Model::PortInfo::WithIpv6Cidrs
PortInfo & WithIpv6Cidrs(Aws::Vector< Aws::String > &&value)
Definition: PortInfo.h:545
Aws::Utils::Json::JsonView
Definition: JsonSerializer.h:235
AWSString.h
Aws::Lightsail::Model::PortInfo::Ipv6CidrsHasBeenSet
bool Ipv6CidrsHasBeenSet() const
Definition: PortInfo.h:497
Aws::Utils::Json::JsonValue
Definition: JsonSerializer.h:33
Aws::Lightsail::Model::PortInfo::FromPortHasBeenSet
bool FromPortHasBeenSet() const
Definition: PortInfo.h:76
Aws::Lightsail::Model::PortInfo::SetCidrListAliases
void SetCidrListAliases(const Aws::Vector< Aws::String > &value)
Definition: PortInfo.h:606
Aws::Lightsail::Model::PortInfo::AddCidrListAliases
PortInfo & AddCidrListAliases(const Aws::String &value)
Definition: PortInfo.h:638
Aws::Lightsail::Model::PortInfo::AddCidrs
PortInfo & AddCidrs(const Aws::String &value)
Definition: PortInfo.h:442
Lightsail_EXPORTS.h
Aws::Lightsail::Model::PortInfo::Jsonize
Aws::Utils::Json::JsonValue Jsonize() const
Aws::Lightsail::Model::PortInfo::AddIpv6Cidrs
PortInfo & AddIpv6Cidrs(const Aws::String &value)
Definition: PortInfo.h:557
Aws::Lightsail::Model::PortInfo::WithToPort
PortInfo & WithToPort(int value)
Definition: PortInfo.h:179
Aws::Lightsail::Model::PortInfo::PortInfo
PortInfo(Aws::Utils::Json::JsonView jsonValue)
Aws::Lightsail::Model::PortInfo::SetIpv6Cidrs
void SetIpv6Cidrs(Aws::Vector< Aws::String > &&value)
Definition: PortInfo.h:521
Aws::Lightsail::Model::PortInfo::operator=
PortInfo & operator=(Aws::Utils::Json::JsonView jsonValue)
Aws
Definition: AccessManagementClient.h:15
Aws::Lightsail::Model::PortInfo::SetProtocol
void SetProtocol(const NetworkProtocol &value)
Definition: PortInfo.h:258
Aws::String
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Definition: AWSString.h:97
Aws::Lightsail::Model::PortInfo
Definition: PortInfo.h:36
Aws::Lightsail::Model::PortInfo::ToPortHasBeenSet
bool ToPortHasBeenSet() const
Definition: PortInfo.h:145
Aws::Lightsail::Model::PortInfo::GetProtocol
const NetworkProtocol & GetProtocol() const
Definition: PortInfo.h:206
AWS_LIGHTSAIL_API
#define AWS_LIGHTSAIL_API
Definition: Lightsail_EXPORTS.h:28
Aws::Lightsail::Model::PortInfo::WithCidrListAliases
PortInfo & WithCidrListAliases(Aws::Vector< Aws::String > &&value)
Definition: PortInfo.h:630
Aws::Lightsail::Model::PortInfo::CidrListAliasesHasBeenSet
bool CidrListAliasesHasBeenSet() const
Definition: PortInfo.h:598
Aws::Lightsail::Model::PortInfo::GetCidrs
const Aws::Vector< Aws::String > & GetCidrs() const
Definition: PortInfo.h:352
Aws::Lightsail::Model::PortInfo::SetCidrs
void SetCidrs(Aws::Vector< Aws::String > &&value)
Definition: PortInfo.h:397
Aws::Lightsail::Model::PortInfo::SetProtocol
void SetProtocol(NetworkProtocol &&value)
Definition: PortInfo.h:284