AWS SDK for C++  0.12.9
AWS SDK for C++
PortMapping.h
Go to the documentation of this file.
1 /*
2 * Copyright 2010-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License").
5 * You may not use this file except in compliance with the License.
6 * A copy of the License is located at
7 *
8 * http://aws.amazon.com/apache2.0
9 *
10 * or in the "license" file accompanying this file. This file is distributed
11 * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
12 * express or implied. See the License for the specific language governing
13 * permissions and limitations under the License.
14 */
15 #pragma once
16 #include <aws/ecs/ECS_EXPORTS.h>
18 
19 namespace Aws
20 {
21 namespace Utils
22 {
23 namespace Json
24 {
25  class JsonValue;
26 } // namespace Json
27 } // namespace Utils
28 namespace ECS
29 {
30 namespace Model
31 {
32 
41  {
42  public:
43  PortMapping();
44  PortMapping(const Aws::Utils::Json::JsonValue& jsonValue);
45  PortMapping& operator=(const Aws::Utils::Json::JsonValue& jsonValue);
46  Aws::Utils::Json::JsonValue Jsonize() const;
47 
56  inline long GetContainerPort() const{ return m_containerPort; }
57 
66  inline void SetContainerPort(long value) { m_containerPortHasBeenSet = true; m_containerPort = value; }
67 
76  inline PortMapping& WithContainerPort(long value) { SetContainerPort(value); return *this;}
77 
101  inline long GetHostPort() const{ return m_hostPort; }
102 
126  inline void SetHostPort(long value) { m_hostPortHasBeenSet = true; m_hostPort = value; }
127 
151  inline PortMapping& WithHostPort(long value) { SetHostPort(value); return *this;}
152 
157  inline const TransportProtocol& GetProtocol() const{ return m_protocol; }
158 
163  inline void SetProtocol(const TransportProtocol& value) { m_protocolHasBeenSet = true; m_protocol = value; }
164 
169  inline void SetProtocol(TransportProtocol&& value) { m_protocolHasBeenSet = true; m_protocol = value; }
170 
175  inline PortMapping& WithProtocol(const TransportProtocol& value) { SetProtocol(value); return *this;}
176 
181  inline PortMapping& WithProtocol(TransportProtocol&& value) { SetProtocol(value); return *this;}
182 
183  private:
184  long m_containerPort;
185  bool m_containerPortHasBeenSet;
186  long m_hostPort;
187  bool m_hostPortHasBeenSet;
188  TransportProtocol m_protocol;
189  bool m_protocolHasBeenSet;
190  };
191 
192 } // namespace Model
193 } // namespace ECS
194 } // namespace Aws
const TransportProtocol & GetProtocol() const
Definition: PortMapping.h:157
PortMapping & WithProtocol(TransportProtocol &&value)
Definition: PortMapping.h:181
void SetContainerPort(long value)
Definition: PortMapping.h:66
long GetContainerPort() const
Definition: PortMapping.h:56
void SetProtocol(TransportProtocol &&value)
Definition: PortMapping.h:169
#define AWS_ECS_API
Definition: ECS_EXPORTS.h:34
PortMapping & WithContainerPort(long value)
Definition: PortMapping.h:76
void SetHostPort(long value)
Definition: PortMapping.h:126
PortMapping & WithHostPort(long value)
Definition: PortMapping.h:151
void SetProtocol(const TransportProtocol &value)
Definition: PortMapping.h:163
PortMapping & WithProtocol(const TransportProtocol &value)
Definition: PortMapping.h:175
JSON (JavaScript Object Notation).