AWS SDK for C++

AWS SDK for C++ Version 1.11.944

Loading...
Searching...
No Matches
PortMapping.h
1
6#pragma once
7#include <aws/core/utils/memory/stl/AWSString.h>
8#include <aws/core/utils/memory/stl/AWSVector.h>
9#include <aws/globalaccelerator/GlobalAccelerator_EXPORTS.h>
10#include <aws/globalaccelerator/model/CustomRoutingDestinationTrafficState.h>
11#include <aws/globalaccelerator/model/CustomRoutingProtocol.h>
12#include <aws/globalaccelerator/model/SocketAddress.h>
13
14#include <utility>
15
16namespace Aws {
17namespace Utils {
18namespace Json {
19class JsonValue;
20class JsonView;
21} // namespace Json
22} // namespace Utils
23namespace GlobalAccelerator {
24namespace Model {
25
36 public:
37 AWS_GLOBALACCELERATOR_API PortMapping() = default;
38 AWS_GLOBALACCELERATOR_API PortMapping(Aws::Utils::Json::JsonView jsonValue);
39 AWS_GLOBALACCELERATOR_API PortMapping& operator=(Aws::Utils::Json::JsonView jsonValue);
40 AWS_GLOBALACCELERATOR_API Aws::Utils::Json::JsonValue Jsonize() const;
41
43
46 inline int GetAcceleratorPort() const { return m_acceleratorPort; }
47 inline bool AcceleratorPortHasBeenSet() const { return m_acceleratorPortHasBeenSet; }
48 inline void SetAcceleratorPort(int value) {
49 m_acceleratorPortHasBeenSet = true;
50 m_acceleratorPort = value;
51 }
52 inline PortMapping& WithAcceleratorPort(int value) {
53 SetAcceleratorPort(value);
54 return *this;
55 }
57
59
62 inline const Aws::String& GetEndpointGroupArn() const { return m_endpointGroupArn; }
63 inline bool EndpointGroupArnHasBeenSet() const { return m_endpointGroupArnHasBeenSet; }
64 template <typename EndpointGroupArnT = Aws::String>
65 void SetEndpointGroupArn(EndpointGroupArnT&& value) {
66 m_endpointGroupArnHasBeenSet = true;
67 m_endpointGroupArn = std::forward<EndpointGroupArnT>(value);
68 }
69 template <typename EndpointGroupArnT = Aws::String>
70 PortMapping& WithEndpointGroupArn(EndpointGroupArnT&& value) {
71 SetEndpointGroupArn(std::forward<EndpointGroupArnT>(value));
72 return *this;
73 }
75
77
80 inline const Aws::String& GetEndpointId() const { return m_endpointId; }
81 inline bool EndpointIdHasBeenSet() const { return m_endpointIdHasBeenSet; }
82 template <typename EndpointIdT = Aws::String>
83 void SetEndpointId(EndpointIdT&& value) {
84 m_endpointIdHasBeenSet = true;
85 m_endpointId = std::forward<EndpointIdT>(value);
86 }
87 template <typename EndpointIdT = Aws::String>
88 PortMapping& WithEndpointId(EndpointIdT&& value) {
89 SetEndpointId(std::forward<EndpointIdT>(value));
90 return *this;
91 }
93
95
99 inline const SocketAddress& GetDestinationSocketAddress() const { return m_destinationSocketAddress; }
100 inline bool DestinationSocketAddressHasBeenSet() const { return m_destinationSocketAddressHasBeenSet; }
101 template <typename DestinationSocketAddressT = SocketAddress>
102 void SetDestinationSocketAddress(DestinationSocketAddressT&& value) {
103 m_destinationSocketAddressHasBeenSet = true;
104 m_destinationSocketAddress = std::forward<DestinationSocketAddressT>(value);
105 }
106 template <typename DestinationSocketAddressT = SocketAddress>
107 PortMapping& WithDestinationSocketAddress(DestinationSocketAddressT&& value) {
108 SetDestinationSocketAddress(std::forward<DestinationSocketAddressT>(value));
109 return *this;
110 }
112
114
117 inline const Aws::Vector<CustomRoutingProtocol>& GetProtocols() const { return m_protocols; }
118 inline bool ProtocolsHasBeenSet() const { return m_protocolsHasBeenSet; }
119 template <typename ProtocolsT = Aws::Vector<CustomRoutingProtocol>>
120 void SetProtocols(ProtocolsT&& value) {
121 m_protocolsHasBeenSet = true;
122 m_protocols = std::forward<ProtocolsT>(value);
123 }
124 template <typename ProtocolsT = Aws::Vector<CustomRoutingProtocol>>
125 PortMapping& WithProtocols(ProtocolsT&& value) {
126 SetProtocols(std::forward<ProtocolsT>(value));
127 return *this;
128 }
130 m_protocolsHasBeenSet = true;
131 m_protocols.push_back(value);
132 return *this;
133 }
135
137
142 inline CustomRoutingDestinationTrafficState GetDestinationTrafficState() const { return m_destinationTrafficState; }
143 inline bool DestinationTrafficStateHasBeenSet() const { return m_destinationTrafficStateHasBeenSet; }
145 m_destinationTrafficStateHasBeenSet = true;
146 m_destinationTrafficState = value;
147 }
153 private:
154 int m_acceleratorPort{0};
155
156 Aws::String m_endpointGroupArn;
157
158 Aws::String m_endpointId;
159
160 SocketAddress m_destinationSocketAddress;
161
163
165 bool m_acceleratorPortHasBeenSet = false;
166 bool m_endpointGroupArnHasBeenSet = false;
167 bool m_endpointIdHasBeenSet = false;
168 bool m_destinationSocketAddressHasBeenSet = false;
169 bool m_protocolsHasBeenSet = false;
170 bool m_destinationTrafficStateHasBeenSet = false;
171};
172
173} // namespace Model
174} // namespace GlobalAccelerator
175} // namespace Aws
AWS_GLOBALACCELERATOR_API Aws::Utils::Json::JsonValue Jsonize() const
void SetEndpointId(EndpointIdT &&value)
Definition PortMapping.h:83
const Aws::String & GetEndpointId() const
Definition PortMapping.h:80
PortMapping & AddProtocols(CustomRoutingProtocol value)
PortMapping & WithEndpointGroupArn(EndpointGroupArnT &&value)
Definition PortMapping.h:70
PortMapping & WithEndpointId(EndpointIdT &&value)
Definition PortMapping.h:88
const Aws::Vector< CustomRoutingProtocol > & GetProtocols() const
AWS_GLOBALACCELERATOR_API PortMapping(Aws::Utils::Json::JsonView jsonValue)
void SetDestinationSocketAddress(DestinationSocketAddressT &&value)
PortMapping & WithAcceleratorPort(int value)
Definition PortMapping.h:52
const Aws::String & GetEndpointGroupArn() const
Definition PortMapping.h:62
PortMapping & WithProtocols(ProtocolsT &&value)
AWS_GLOBALACCELERATOR_API PortMapping & operator=(Aws::Utils::Json::JsonView jsonValue)
const SocketAddress & GetDestinationSocketAddress() const
Definition PortMapping.h:99
PortMapping & WithDestinationTrafficState(CustomRoutingDestinationTrafficState value)
CustomRoutingDestinationTrafficState GetDestinationTrafficState() const
void SetDestinationTrafficState(CustomRoutingDestinationTrafficState value)
void SetEndpointGroupArn(EndpointGroupArnT &&value)
Definition PortMapping.h:65
AWS_GLOBALACCELERATOR_API PortMapping()=default
PortMapping & WithDestinationSocketAddress(DestinationSocketAddressT &&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