AWS SDK for C++  1.9.155
AWS SDK for C++
PortMapping.h
Go to the documentation of this file.
1 
6 #pragma once
7 #include <aws/ecs/ECS_EXPORTS.h>
9 #include <utility>
10 
11 namespace Aws
12 {
13 namespace Utils
14 {
15 namespace Json
16 {
17  class JsonValue;
18  class JsonView;
19 } // namespace Json
20 } // namespace Utils
21 namespace ECS
22 {
23 namespace Model
24 {
25 
42  {
43  public:
48 
49 
61  inline int GetContainerPort() const{ return m_containerPort; }
62 
74  inline bool ContainerPortHasBeenSet() const { return m_containerPortHasBeenSet; }
75 
87  inline void SetContainerPort(int value) { m_containerPortHasBeenSet = true; m_containerPort = value; }
88 
100  inline PortMapping& WithContainerPort(int value) { SetContainerPort(value); return *this;}
101 
102 
131  inline int GetHostPort() const{ return m_hostPort; }
132 
161  inline bool HostPortHasBeenSet() const { return m_hostPortHasBeenSet; }
162 
191  inline void SetHostPort(int value) { m_hostPortHasBeenSet = true; m_hostPort = value; }
192 
221  inline PortMapping& WithHostPort(int value) { SetHostPort(value); return *this;}
222 
223 
228  inline const TransportProtocol& GetProtocol() const{ return m_protocol; }
229 
234  inline bool ProtocolHasBeenSet() const { return m_protocolHasBeenSet; }
235 
240  inline void SetProtocol(const TransportProtocol& value) { m_protocolHasBeenSet = true; m_protocol = value; }
241 
246  inline void SetProtocol(TransportProtocol&& value) { m_protocolHasBeenSet = true; m_protocol = std::move(value); }
247 
252  inline PortMapping& WithProtocol(const TransportProtocol& value) { SetProtocol(value); return *this;}
253 
258  inline PortMapping& WithProtocol(TransportProtocol&& value) { SetProtocol(std::move(value)); return *this;}
259 
260  private:
261 
262  int m_containerPort;
263  bool m_containerPortHasBeenSet;
264 
265  int m_hostPort;
266  bool m_hostPortHasBeenSet;
267 
268  TransportProtocol m_protocol;
269  bool m_protocolHasBeenSet;
270  };
271 
272 } // namespace Model
273 } // namespace ECS
274 } // namespace Aws
Aws::ECS::Model::TransportProtocol
TransportProtocol
Definition: TransportProtocol.h:17
Aws::ECS::Model::PortMapping::WithProtocol
PortMapping & WithProtocol(const TransportProtocol &value)
Definition: PortMapping.h:252
Aws::CodeDeploy::Model::ComputePlatform::NOT_SET
@ NOT_SET
Aws::ECS::Model::PortMapping::HostPortHasBeenSet
bool HostPortHasBeenSet() const
Definition: PortMapping.h:161
Aws::ECS::Model::PortMapping::ProtocolHasBeenSet
bool ProtocolHasBeenSet() const
Definition: PortMapping.h:234
Aws::ECS::Model::PortMapping::GetHostPort
int GetHostPort() const
Definition: PortMapping.h:131
Aws::ECS::Model::PortMapping::ContainerPortHasBeenSet
bool ContainerPortHasBeenSet() const
Definition: PortMapping.h:74
Aws::ECS::Model::PortMapping::SetProtocol
void SetProtocol(TransportProtocol &&value)
Definition: PortMapping.h:246
Aws::ECS::Model::PortMapping::GetProtocol
const TransportProtocol & GetProtocol() const
Definition: PortMapping.h:228
AWS_ECS_API
#define AWS_ECS_API
Definition: ECS_EXPORTS.h:28
Aws::ECS::Model::PortMapping
Definition: PortMapping.h:42
Aws::ECS::Model::PortMapping::SetProtocol
void SetProtocol(const TransportProtocol &value)
Definition: PortMapping.h:240
Aws::ECS::Model::PortMapping::PortMapping
PortMapping()
Aws::ECS::Model::PortMapping::GetContainerPort
int GetContainerPort() const
Definition: PortMapping.h:61
Aws::Utils::Json::JsonView
Definition: JsonSerializer.h:235
Aws::ECS::Model::PortMapping::SetHostPort
void SetHostPort(int value)
Definition: PortMapping.h:191
Aws::Utils::Json::JsonValue
Definition: JsonSerializer.h:33
Aws::ECS::Model::PortMapping::SetContainerPort
void SetContainerPort(int value)
Definition: PortMapping.h:87
Aws::ECS::Model::PortMapping::PortMapping
PortMapping(Aws::Utils::Json::JsonView jsonValue)
Aws::ECS::Model::PortMapping::operator=
PortMapping & operator=(Aws::Utils::Json::JsonView jsonValue)
Aws::MigrationHubStrategyRecommendations::Model::OutputFormat::NOT_SET
@ NOT_SET
Aws
Definition: AccessManagementClient.h:15
Aws::ECS::Model::PortMapping::Jsonize
Aws::Utils::Json::JsonValue Jsonize() const
Aws::ECS::Model::PortMapping::WithContainerPort
PortMapping & WithContainerPort(int value)
Definition: PortMapping.h:100
TransportProtocol.h
Aws::ECS::Model::PortMapping::WithProtocol
PortMapping & WithProtocol(TransportProtocol &&value)
Definition: PortMapping.h:258
Aws::ECS::Model::PortMapping::WithHostPort
PortMapping & WithHostPort(int value)
Definition: PortMapping.h:221
ECS_EXPORTS.h