AWS SDK for C++  1.9.16
AWS SDK for C++
InstancePortInfo.h
Go to the documentation of this file.
1 
6 #pragma once
13 #include <utility>
14 
15 namespace Aws
16 {
17 namespace Utils
18 {
19 namespace Json
20 {
21  class JsonValue;
22  class JsonView;
23 } // namespace Json
24 } // namespace Utils
25 namespace Lightsail
26 {
27 namespace Model
28 {
29 
37  {
38  public:
43 
44 
60  inline int GetFromPort() const{ return m_fromPort; }
61 
77  inline bool FromPortHasBeenSet() const { return m_fromPortHasBeenSet; }
78 
94  inline void SetFromPort(int value) { m_fromPortHasBeenSet = true; m_fromPort = value; }
95 
111  inline InstancePortInfo& WithFromPort(int value) { SetFromPort(value); return *this;}
112 
113 
129  inline int GetToPort() const{ return m_toPort; }
130 
146  inline bool ToPortHasBeenSet() const { return m_toPortHasBeenSet; }
147 
163  inline void SetToPort(int value) { m_toPortHasBeenSet = true; m_toPort = value; }
164 
180  inline InstancePortInfo& WithToPort(int value) { SetToPort(value); return *this;}
181 
182 
207  inline const NetworkProtocol& GetProtocol() const{ return m_protocol; }
208 
233  inline bool ProtocolHasBeenSet() const { return m_protocolHasBeenSet; }
234 
259  inline void SetProtocol(const NetworkProtocol& value) { m_protocolHasBeenSet = true; m_protocol = value; }
260 
285  inline void SetProtocol(NetworkProtocol&& value) { m_protocolHasBeenSet = true; m_protocol = std::move(value); }
286 
311  inline InstancePortInfo& WithProtocol(const NetworkProtocol& value) { SetProtocol(value); return *this;}
312 
337  inline InstancePortInfo& WithProtocol(NetworkProtocol&& value) { SetProtocol(std::move(value)); return *this;}
338 
339 
345  inline const Aws::String& GetAccessFrom() const{ return m_accessFrom; }
346 
352  inline bool AccessFromHasBeenSet() const { return m_accessFromHasBeenSet; }
353 
359  inline void SetAccessFrom(const Aws::String& value) { m_accessFromHasBeenSet = true; m_accessFrom = value; }
360 
366  inline void SetAccessFrom(Aws::String&& value) { m_accessFromHasBeenSet = true; m_accessFrom = std::move(value); }
367 
373  inline void SetAccessFrom(const char* value) { m_accessFromHasBeenSet = true; m_accessFrom.assign(value); }
374 
380  inline InstancePortInfo& WithAccessFrom(const Aws::String& value) { SetAccessFrom(value); return *this;}
381 
387  inline InstancePortInfo& WithAccessFrom(Aws::String&& value) { SetAccessFrom(std::move(value)); return *this;}
388 
394  inline InstancePortInfo& WithAccessFrom(const char* value) { SetAccessFrom(value); return *this;}
395 
396 
400  inline const PortAccessType& GetAccessType() const{ return m_accessType; }
401 
405  inline bool AccessTypeHasBeenSet() const { return m_accessTypeHasBeenSet; }
406 
410  inline void SetAccessType(const PortAccessType& value) { m_accessTypeHasBeenSet = true; m_accessType = value; }
411 
415  inline void SetAccessType(PortAccessType&& value) { m_accessTypeHasBeenSet = true; m_accessType = std::move(value); }
416 
420  inline InstancePortInfo& WithAccessType(const PortAccessType& value) { SetAccessType(value); return *this;}
421 
425  inline InstancePortInfo& WithAccessType(PortAccessType&& value) { SetAccessType(std::move(value)); return *this;}
426 
427 
431  inline const Aws::String& GetCommonName() const{ return m_commonName; }
432 
436  inline bool CommonNameHasBeenSet() const { return m_commonNameHasBeenSet; }
437 
441  inline void SetCommonName(const Aws::String& value) { m_commonNameHasBeenSet = true; m_commonName = value; }
442 
446  inline void SetCommonName(Aws::String&& value) { m_commonNameHasBeenSet = true; m_commonName = std::move(value); }
447 
451  inline void SetCommonName(const char* value) { m_commonNameHasBeenSet = true; m_commonName.assign(value); }
452 
456  inline InstancePortInfo& WithCommonName(const Aws::String& value) { SetCommonName(value); return *this;}
457 
461  inline InstancePortInfo& WithCommonName(Aws::String&& value) { SetCommonName(std::move(value)); return *this;}
462 
466  inline InstancePortInfo& WithCommonName(const char* value) { SetCommonName(value); return *this;}
467 
468 
474  inline const AccessDirection& GetAccessDirection() const{ return m_accessDirection; }
475 
481  inline bool AccessDirectionHasBeenSet() const { return m_accessDirectionHasBeenSet; }
482 
488  inline void SetAccessDirection(const AccessDirection& value) { m_accessDirectionHasBeenSet = true; m_accessDirection = value; }
489 
495  inline void SetAccessDirection(AccessDirection&& value) { m_accessDirectionHasBeenSet = true; m_accessDirection = std::move(value); }
496 
502  inline InstancePortInfo& WithAccessDirection(const AccessDirection& value) { SetAccessDirection(value); return *this;}
503 
509  inline InstancePortInfo& WithAccessDirection(AccessDirection&& value) { SetAccessDirection(std::move(value)); return *this;}
510 
511 
521  inline const Aws::Vector<Aws::String>& GetCidrs() const{ return m_cidrs; }
522 
532  inline bool CidrsHasBeenSet() const { return m_cidrsHasBeenSet; }
533 
543  inline void SetCidrs(const Aws::Vector<Aws::String>& value) { m_cidrsHasBeenSet = true; m_cidrs = value; }
544 
554  inline void SetCidrs(Aws::Vector<Aws::String>&& value) { m_cidrsHasBeenSet = true; m_cidrs = std::move(value); }
555 
565  inline InstancePortInfo& WithCidrs(const Aws::Vector<Aws::String>& value) { SetCidrs(value); return *this;}
566 
576  inline InstancePortInfo& WithCidrs(Aws::Vector<Aws::String>&& value) { SetCidrs(std::move(value)); return *this;}
577 
587  inline InstancePortInfo& AddCidrs(const Aws::String& value) { m_cidrsHasBeenSet = true; m_cidrs.push_back(value); return *this; }
588 
598  inline InstancePortInfo& AddCidrs(Aws::String&& value) { m_cidrsHasBeenSet = true; m_cidrs.push_back(std::move(value)); return *this; }
599 
609  inline InstancePortInfo& AddCidrs(const char* value) { m_cidrsHasBeenSet = true; m_cidrs.push_back(value); return *this; }
610 
611 
622  inline const Aws::Vector<Aws::String>& GetIpv6Cidrs() const{ return m_ipv6Cidrs; }
623 
634  inline bool Ipv6CidrsHasBeenSet() const { return m_ipv6CidrsHasBeenSet; }
635 
646  inline void SetIpv6Cidrs(const Aws::Vector<Aws::String>& value) { m_ipv6CidrsHasBeenSet = true; m_ipv6Cidrs = value; }
647 
658  inline void SetIpv6Cidrs(Aws::Vector<Aws::String>&& value) { m_ipv6CidrsHasBeenSet = true; m_ipv6Cidrs = std::move(value); }
659 
670  inline InstancePortInfo& WithIpv6Cidrs(const Aws::Vector<Aws::String>& value) { SetIpv6Cidrs(value); return *this;}
671 
682  inline InstancePortInfo& WithIpv6Cidrs(Aws::Vector<Aws::String>&& value) { SetIpv6Cidrs(std::move(value)); return *this;}
683 
694  inline InstancePortInfo& AddIpv6Cidrs(const Aws::String& value) { m_ipv6CidrsHasBeenSet = true; m_ipv6Cidrs.push_back(value); return *this; }
695 
706  inline InstancePortInfo& AddIpv6Cidrs(Aws::String&& value) { m_ipv6CidrsHasBeenSet = true; m_ipv6Cidrs.push_back(std::move(value)); return *this; }
707 
718  inline InstancePortInfo& AddIpv6Cidrs(const char* value) { m_ipv6CidrsHasBeenSet = true; m_ipv6Cidrs.push_back(value); return *this; }
719 
720 
727  inline const Aws::Vector<Aws::String>& GetCidrListAliases() const{ return m_cidrListAliases; }
728 
735  inline bool CidrListAliasesHasBeenSet() const { return m_cidrListAliasesHasBeenSet; }
736 
743  inline void SetCidrListAliases(const Aws::Vector<Aws::String>& value) { m_cidrListAliasesHasBeenSet = true; m_cidrListAliases = value; }
744 
751  inline void SetCidrListAliases(Aws::Vector<Aws::String>&& value) { m_cidrListAliasesHasBeenSet = true; m_cidrListAliases = std::move(value); }
752 
759  inline InstancePortInfo& WithCidrListAliases(const Aws::Vector<Aws::String>& value) { SetCidrListAliases(value); return *this;}
760 
767  inline InstancePortInfo& WithCidrListAliases(Aws::Vector<Aws::String>&& value) { SetCidrListAliases(std::move(value)); return *this;}
768 
775  inline InstancePortInfo& AddCidrListAliases(const Aws::String& value) { m_cidrListAliasesHasBeenSet = true; m_cidrListAliases.push_back(value); return *this; }
776 
783  inline InstancePortInfo& AddCidrListAliases(Aws::String&& value) { m_cidrListAliasesHasBeenSet = true; m_cidrListAliases.push_back(std::move(value)); return *this; }
784 
791  inline InstancePortInfo& AddCidrListAliases(const char* value) { m_cidrListAliasesHasBeenSet = true; m_cidrListAliases.push_back(value); return *this; }
792 
793  private:
794 
795  int m_fromPort;
796  bool m_fromPortHasBeenSet;
797 
798  int m_toPort;
799  bool m_toPortHasBeenSet;
800 
801  NetworkProtocol m_protocol;
802  bool m_protocolHasBeenSet;
803 
804  Aws::String m_accessFrom;
805  bool m_accessFromHasBeenSet;
806 
807  PortAccessType m_accessType;
808  bool m_accessTypeHasBeenSet;
809 
810  Aws::String m_commonName;
811  bool m_commonNameHasBeenSet;
812 
813  AccessDirection m_accessDirection;
814  bool m_accessDirectionHasBeenSet;
815 
816  Aws::Vector<Aws::String> m_cidrs;
817  bool m_cidrsHasBeenSet;
818 
819  Aws::Vector<Aws::String> m_ipv6Cidrs;
820  bool m_ipv6CidrsHasBeenSet;
821 
822  Aws::Vector<Aws::String> m_cidrListAliases;
823  bool m_cidrListAliasesHasBeenSet;
824  };
825 
826 } // namespace Model
827 } // namespace Lightsail
828 } // namespace Aws
Aws::Lightsail::Model::InstancePortInfo::WithCommonName
InstancePortInfo & WithCommonName(const Aws::String &value)
Definition: InstancePortInfo.h:456
Aws::Lightsail::Model::InstancePortInfo::SetIpv6Cidrs
void SetIpv6Cidrs(const Aws::Vector< Aws::String > &value)
Definition: InstancePortInfo.h:646
Aws::Lightsail::Model::InstancePortInfo::SetAccessDirection
void SetAccessDirection(const AccessDirection &value)
Definition: InstancePortInfo.h:488
Aws::Lightsail::Model::InstancePortInfo::WithAccessType
InstancePortInfo & WithAccessType(PortAccessType &&value)
Definition: InstancePortInfo.h:425
Aws::Lightsail::Model::InstancePortInfo::SetCommonName
void SetCommonName(const char *value)
Definition: InstancePortInfo.h:451
Aws::Lightsail::Model::InstancePortInfo::WithIpv6Cidrs
InstancePortInfo & WithIpv6Cidrs(Aws::Vector< Aws::String > &&value)
Definition: InstancePortInfo.h:682
Aws::Lightsail::Model::InstancePortInfo::WithAccessDirection
InstancePortInfo & WithAccessDirection(const AccessDirection &value)
Definition: InstancePortInfo.h:502
Aws::Lightsail::Model::InstancePortInfo::WithCommonName
InstancePortInfo & WithCommonName(Aws::String &&value)
Definition: InstancePortInfo.h:461
Aws::Lightsail::Model::InstancePortInfo::WithCidrs
InstancePortInfo & WithCidrs(const Aws::Vector< Aws::String > &value)
Definition: InstancePortInfo.h:565
Aws::Lightsail::Model::InstancePortInfo::WithToPort
InstancePortInfo & WithToPort(int value)
Definition: InstancePortInfo.h:180
Aws::Lightsail::Model::InstancePortInfo::SetIpv6Cidrs
void SetIpv6Cidrs(Aws::Vector< Aws::String > &&value)
Definition: InstancePortInfo.h:658
AccessDirection.h
Aws::Lightsail::Model::InstancePortInfo::SetAccessFrom
void SetAccessFrom(Aws::String &&value)
Definition: InstancePortInfo.h:366
Aws::Lightsail::Model::InstancePortInfo::WithAccessFrom
InstancePortInfo & WithAccessFrom(const Aws::String &value)
Definition: InstancePortInfo.h:380
Aws::Lightsail::Model::InstancePortInfo::GetFromPort
int GetFromPort() const
Definition: InstancePortInfo.h:60
Aws::Lightsail::Model::InstancePortInfo::SetCidrs
void SetCidrs(const Aws::Vector< Aws::String > &value)
Definition: InstancePortInfo.h:543
Aws::Vector
std::vector< T, Aws::Allocator< T > > Vector
Definition: AWSVector.h:17
Aws::Lightsail::Model::InstancePortInfo::CidrListAliasesHasBeenSet
bool CidrListAliasesHasBeenSet() const
Definition: InstancePortInfo.h:735
Aws::Lightsail::Model::InstancePortInfo::WithCidrs
InstancePortInfo & WithCidrs(Aws::Vector< Aws::String > &&value)
Definition: InstancePortInfo.h:576
PortAccessType.h
AWSVector.h
Aws::Lightsail::Model::InstancePortInfo::CidrsHasBeenSet
bool CidrsHasBeenSet() const
Definition: InstancePortInfo.h:532
Aws::Lightsail::Model::InstancePortInfo::WithFromPort
InstancePortInfo & WithFromPort(int value)
Definition: InstancePortInfo.h:111
Aws::Lightsail::Model::InstancePortInfo::GetAccessFrom
const Aws::String & GetAccessFrom() const
Definition: InstancePortInfo.h:345
Aws::Lightsail::Model::InstancePortInfo::GetCidrs
const Aws::Vector< Aws::String > & GetCidrs() const
Definition: InstancePortInfo.h:521
Aws::Lightsail::Model::InstancePortInfo::SetAccessFrom
void SetAccessFrom(const Aws::String &value)
Definition: InstancePortInfo.h:359
NetworkProtocol.h
Aws::Lightsail::Model::InstancePortInfo::Jsonize
Aws::Utils::Json::JsonValue Jsonize() const
Aws::Lightsail::Model::InstancePortInfo::AddIpv6Cidrs
InstancePortInfo & AddIpv6Cidrs(Aws::String &&value)
Definition: InstancePortInfo.h:706
Aws::Lightsail::Model::NetworkProtocol
NetworkProtocol
Definition: NetworkProtocol.h:17
Aws::Lightsail::Model::InstancePortInfo::WithAccessDirection
InstancePortInfo & WithAccessDirection(AccessDirection &&value)
Definition: InstancePortInfo.h:509
Aws::Lightsail::Model::InstancePortInfo::CommonNameHasBeenSet
bool CommonNameHasBeenSet() const
Definition: InstancePortInfo.h:436
Aws::Lightsail::Model::InstancePortInfo::WithCommonName
InstancePortInfo & WithCommonName(const char *value)
Definition: InstancePortInfo.h:466
Aws::Lightsail::Model::InstancePortInfo::GetAccessType
const PortAccessType & GetAccessType() const
Definition: InstancePortInfo.h:400
Aws::Lightsail::Model::InstancePortInfo::SetToPort
void SetToPort(int value)
Definition: InstancePortInfo.h:163
Aws::Lightsail::Model::InstancePortInfo::ProtocolHasBeenSet
bool ProtocolHasBeenSet() const
Definition: InstancePortInfo.h:233
Aws::Lightsail::Model::InstancePortInfo::SetAccessDirection
void SetAccessDirection(AccessDirection &&value)
Definition: InstancePortInfo.h:495
Aws::Lightsail::Model::InstancePortInfo::SetAccessType
void SetAccessType(PortAccessType &&value)
Definition: InstancePortInfo.h:415
Aws::Lightsail::Model::InstancePortInfo::InstancePortInfo
InstancePortInfo()
Aws::Lightsail::Model::InstancePortInfo::AccessDirectionHasBeenSet
bool AccessDirectionHasBeenSet() const
Definition: InstancePortInfo.h:481
Aws::Lightsail::Model::InstancePortInfo::SetAccessType
void SetAccessType(const PortAccessType &value)
Definition: InstancePortInfo.h:410
Aws::Lightsail::Model::InstancePortInfo::Ipv6CidrsHasBeenSet
bool Ipv6CidrsHasBeenSet() const
Definition: InstancePortInfo.h:634
Aws::Lightsail::Model::InstancePortInfo::SetFromPort
void SetFromPort(int value)
Definition: InstancePortInfo.h:94
Aws::Lightsail::Model::InstancePortInfo::WithCidrListAliases
InstancePortInfo & WithCidrListAliases(Aws::Vector< Aws::String > &&value)
Definition: InstancePortInfo.h:767
Aws::Utils::Json::JsonView
Definition: JsonSerializer.h:222
Aws::Lightsail::Model::PortAccessType
PortAccessType
Definition: PortAccessType.h:17
AWSString.h
Aws::Utils::Json::JsonValue
Definition: JsonSerializer.h:30
Aws::Lightsail::Model::InstancePortInfo::SetCidrListAliases
void SetCidrListAliases(Aws::Vector< Aws::String > &&value)
Definition: InstancePortInfo.h:751
Aws::Lightsail::Model::AccessDirection
AccessDirection
Definition: AccessDirection.h:17
Aws::Lightsail::Model::InstancePortInfo::SetAccessFrom
void SetAccessFrom(const char *value)
Definition: InstancePortInfo.h:373
Aws::Lightsail::Model::InstancePortInfo::AccessFromHasBeenSet
bool AccessFromHasBeenSet() const
Definition: InstancePortInfo.h:352
Aws::Lightsail::Model::InstancePortInfo::SetCommonName
void SetCommonName(Aws::String &&value)
Definition: InstancePortInfo.h:446
Aws::Lightsail::Model::InstancePortInfo::SetProtocol
void SetProtocol(const NetworkProtocol &value)
Definition: InstancePortInfo.h:259
Aws::Lightsail::Model::InstancePortInfo::SetProtocol
void SetProtocol(NetworkProtocol &&value)
Definition: InstancePortInfo.h:285
Aws::Lightsail::Model::InstancePortInfo::WithAccessFrom
InstancePortInfo & WithAccessFrom(const char *value)
Definition: InstancePortInfo.h:394
Aws::Lightsail::Model::InstancePortInfo::AddCidrs
InstancePortInfo & AddCidrs(const Aws::String &value)
Definition: InstancePortInfo.h:587
Lightsail_EXPORTS.h
Aws::Lightsail::Model::InstancePortInfo::InstancePortInfo
InstancePortInfo(Aws::Utils::Json::JsonView jsonValue)
Aws::Lightsail::Model::InstancePortInfo::operator=
InstancePortInfo & operator=(Aws::Utils::Json::JsonView jsonValue)
Aws::Lightsail::Model::InstancePortInfo::GetToPort
int GetToPort() const
Definition: InstancePortInfo.h:129
Aws::Lightsail::Model::InstancePortInfo::WithProtocol
InstancePortInfo & WithProtocol(NetworkProtocol &&value)
Definition: InstancePortInfo.h:337
Aws::Lightsail::Model::InstancePortInfo::AddCidrListAliases
InstancePortInfo & AddCidrListAliases(const char *value)
Definition: InstancePortInfo.h:791
Aws::Lightsail::Model::InstancePortInfo::FromPortHasBeenSet
bool FromPortHasBeenSet() const
Definition: InstancePortInfo.h:77
Aws::Lightsail::Model::InstancePortInfo::WithAccessType
InstancePortInfo & WithAccessType(const PortAccessType &value)
Definition: InstancePortInfo.h:420
Aws::Lightsail::Model::InstancePortInfo::WithAccessFrom
InstancePortInfo & WithAccessFrom(Aws::String &&value)
Definition: InstancePortInfo.h:387
Aws
Definition: AccessManagementClient.h:15
Aws::Lightsail::Model::InstancePortInfo::AddCidrListAliases
InstancePortInfo & AddCidrListAliases(const Aws::String &value)
Definition: InstancePortInfo.h:775
Aws::Lightsail::Model::InstancePortInfo::GetAccessDirection
const AccessDirection & GetAccessDirection() const
Definition: InstancePortInfo.h:474
Aws::Lightsail::Model::InstancePortInfo::WithProtocol
InstancePortInfo & WithProtocol(const NetworkProtocol &value)
Definition: InstancePortInfo.h:311
Aws::Lightsail::Model::InstancePortInfo::SetCidrs
void SetCidrs(Aws::Vector< Aws::String > &&value)
Definition: InstancePortInfo.h:554
Aws::Lightsail::Model::InstancePortInfo::AccessTypeHasBeenSet
bool AccessTypeHasBeenSet() const
Definition: InstancePortInfo.h:405
Aws::Lightsail::Model::InstancePortInfo
Definition: InstancePortInfo.h:37
Aws::String
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Definition: AWSString.h:97
Aws::Lightsail::Model::InstancePortInfo::SetCidrListAliases
void SetCidrListAliases(const Aws::Vector< Aws::String > &value)
Definition: InstancePortInfo.h:743
Aws::Lightsail::Model::InstancePortInfo::GetIpv6Cidrs
const Aws::Vector< Aws::String > & GetIpv6Cidrs() const
Definition: InstancePortInfo.h:622
Aws::Lightsail::Model::InstancePortInfo::AddCidrs
InstancePortInfo & AddCidrs(Aws::String &&value)
Definition: InstancePortInfo.h:598
Aws::Lightsail::Model::InstancePortInfo::GetCommonName
const Aws::String & GetCommonName() const
Definition: InstancePortInfo.h:431
Aws::Lightsail::Model::InstancePortInfo::AddIpv6Cidrs
InstancePortInfo & AddIpv6Cidrs(const Aws::String &value)
Definition: InstancePortInfo.h:694
AWS_LIGHTSAIL_API
#define AWS_LIGHTSAIL_API
Definition: Lightsail_EXPORTS.h:28
Aws::Lightsail::Model::InstancePortInfo::WithIpv6Cidrs
InstancePortInfo & WithIpv6Cidrs(const Aws::Vector< Aws::String > &value)
Definition: InstancePortInfo.h:670
Aws::Lightsail::Model::InstancePortInfo::GetProtocol
const NetworkProtocol & GetProtocol() const
Definition: InstancePortInfo.h:207
Aws::Lightsail::Model::InstancePortInfo::ToPortHasBeenSet
bool ToPortHasBeenSet() const
Definition: InstancePortInfo.h:146
Aws::Lightsail::Model::InstancePortInfo::AddIpv6Cidrs
InstancePortInfo & AddIpv6Cidrs(const char *value)
Definition: InstancePortInfo.h:718
Aws::Lightsail::Model::InstancePortInfo::GetCidrListAliases
const Aws::Vector< Aws::String > & GetCidrListAliases() const
Definition: InstancePortInfo.h:727
Aws::Lightsail::Model::InstancePortInfo::AddCidrListAliases
InstancePortInfo & AddCidrListAliases(Aws::String &&value)
Definition: InstancePortInfo.h:783
Aws::Lightsail::Model::InstancePortInfo::AddCidrs
InstancePortInfo & AddCidrs(const char *value)
Definition: InstancePortInfo.h:609
Aws::Lightsail::Model::InstancePortInfo::SetCommonName
void SetCommonName(const Aws::String &value)
Definition: InstancePortInfo.h:441
Aws::Lightsail::Model::InstancePortInfo::WithCidrListAliases
InstancePortInfo & WithCidrListAliases(const Aws::Vector< Aws::String > &value)
Definition: InstancePortInfo.h:759