AWS SDK for C++

AWS SDK for C++ Version 1.11.608

Loading...
Searching...
No Matches
PortMapping.h
1
6#pragma once
7#include <aws/globalaccelerator/GlobalAccelerator_EXPORTS.h>
8#include <aws/core/utils/memory/stl/AWSString.h>
9#include <aws/globalaccelerator/model/SocketAddress.h>
10#include <aws/core/utils/memory/stl/AWSVector.h>
11#include <aws/globalaccelerator/model/CustomRoutingDestinationTrafficState.h>
12#include <aws/globalaccelerator/model/CustomRoutingProtocol.h>
13#include <utility>
14
15namespace Aws
16{
17namespace Utils
18{
19namespace Json
20{
21 class JsonValue;
22 class JsonView;
23} // namespace Json
24} // namespace Utils
25namespace GlobalAccelerator
26{
27namespace Model
28{
29
40 {
41 public:
42 AWS_GLOBALACCELERATOR_API PortMapping() = default;
43 AWS_GLOBALACCELERATOR_API PortMapping(Aws::Utils::Json::JsonView jsonValue);
44 AWS_GLOBALACCELERATOR_API PortMapping& operator=(Aws::Utils::Json::JsonView jsonValue);
45 AWS_GLOBALACCELERATOR_API Aws::Utils::Json::JsonValue Jsonize() const;
46
47
49
52 inline int GetAcceleratorPort() const { return m_acceleratorPort; }
53 inline bool AcceleratorPortHasBeenSet() const { return m_acceleratorPortHasBeenSet; }
54 inline void SetAcceleratorPort(int value) { m_acceleratorPortHasBeenSet = true; m_acceleratorPort = value; }
55 inline PortMapping& WithAcceleratorPort(int value) { SetAcceleratorPort(value); return *this;}
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) { m_endpointGroupArnHasBeenSet = true; m_endpointGroupArn = std::forward<EndpointGroupArnT>(value); }
66 template<typename EndpointGroupArnT = Aws::String>
67 PortMapping& WithEndpointGroupArn(EndpointGroupArnT&& value) { SetEndpointGroupArn(std::forward<EndpointGroupArnT>(value)); return *this;}
69
71
74 inline const Aws::String& GetEndpointId() const { return m_endpointId; }
75 inline bool EndpointIdHasBeenSet() const { return m_endpointIdHasBeenSet; }
76 template<typename EndpointIdT = Aws::String>
77 void SetEndpointId(EndpointIdT&& value) { m_endpointIdHasBeenSet = true; m_endpointId = std::forward<EndpointIdT>(value); }
78 template<typename EndpointIdT = Aws::String>
79 PortMapping& WithEndpointId(EndpointIdT&& value) { SetEndpointId(std::forward<EndpointIdT>(value)); return *this;}
81
83
87 inline const SocketAddress& GetDestinationSocketAddress() const { return m_destinationSocketAddress; }
88 inline bool DestinationSocketAddressHasBeenSet() const { return m_destinationSocketAddressHasBeenSet; }
89 template<typename DestinationSocketAddressT = SocketAddress>
90 void SetDestinationSocketAddress(DestinationSocketAddressT&& value) { m_destinationSocketAddressHasBeenSet = true; m_destinationSocketAddress = std::forward<DestinationSocketAddressT>(value); }
91 template<typename DestinationSocketAddressT = SocketAddress>
92 PortMapping& WithDestinationSocketAddress(DestinationSocketAddressT&& value) { SetDestinationSocketAddress(std::forward<DestinationSocketAddressT>(value)); return *this;}
94
96
99 inline const Aws::Vector<CustomRoutingProtocol>& GetProtocols() const { return m_protocols; }
100 inline bool ProtocolsHasBeenSet() const { return m_protocolsHasBeenSet; }
101 template<typename ProtocolsT = Aws::Vector<CustomRoutingProtocol>>
102 void SetProtocols(ProtocolsT&& value) { m_protocolsHasBeenSet = true; m_protocols = std::forward<ProtocolsT>(value); }
103 template<typename ProtocolsT = Aws::Vector<CustomRoutingProtocol>>
104 PortMapping& WithProtocols(ProtocolsT&& value) { SetProtocols(std::forward<ProtocolsT>(value)); return *this;}
105 inline PortMapping& AddProtocols(CustomRoutingProtocol value) { m_protocolsHasBeenSet = true; m_protocols.push_back(value); return *this; }
107
109
114 inline CustomRoutingDestinationTrafficState GetDestinationTrafficState() const { return m_destinationTrafficState; }
115 inline bool DestinationTrafficStateHasBeenSet() const { return m_destinationTrafficStateHasBeenSet; }
116 inline void SetDestinationTrafficState(CustomRoutingDestinationTrafficState value) { m_destinationTrafficStateHasBeenSet = true; m_destinationTrafficState = value; }
119 private:
120
121 int m_acceleratorPort{0};
122 bool m_acceleratorPortHasBeenSet = false;
123
124 Aws::String m_endpointGroupArn;
125 bool m_endpointGroupArnHasBeenSet = false;
126
127 Aws::String m_endpointId;
128 bool m_endpointIdHasBeenSet = false;
129
130 SocketAddress m_destinationSocketAddress;
131 bool m_destinationSocketAddressHasBeenSet = false;
132
134 bool m_protocolsHasBeenSet = false;
135
137 bool m_destinationTrafficStateHasBeenSet = false;
138 };
139
140} // namespace Model
141} // namespace GlobalAccelerator
142} // namespace Aws
AWS_GLOBALACCELERATOR_API Aws::Utils::Json::JsonValue Jsonize() const
void SetEndpointId(EndpointIdT &&value)
Definition PortMapping.h:77
const Aws::String & GetEndpointId() const
Definition PortMapping.h:74
PortMapping & AddProtocols(CustomRoutingProtocol value)
PortMapping & WithEndpointGroupArn(EndpointGroupArnT &&value)
Definition PortMapping.h:67
PortMapping & WithEndpointId(EndpointIdT &&value)
Definition PortMapping.h:79
const Aws::Vector< CustomRoutingProtocol > & GetProtocols() const
Definition PortMapping.h:99
AWS_GLOBALACCELERATOR_API PortMapping(Aws::Utils::Json::JsonView jsonValue)
void SetDestinationSocketAddress(DestinationSocketAddressT &&value)
Definition PortMapping.h:90
PortMapping & WithAcceleratorPort(int value)
Definition PortMapping.h:55
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:87
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)
Definition PortMapping.h:92
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector
Aws::Utils::Json::JsonValue JsonValue