AWS SDK for C++

AWS SDK for C++ Version 1.11.440

Loading...
Searching...
No Matches
PortMapping.h
1
6#pragma once
7#include <aws/ecs/ECS_EXPORTS.h>
8#include <aws/ecs/model/TransportProtocol.h>
9#include <aws/core/utils/memory/stl/AWSString.h>
10#include <aws/ecs/model/ApplicationProtocol.h>
11#include <utility>
12
13namespace Aws
14{
15namespace Utils
16{
17namespace Json
18{
19 class JsonValue;
20 class JsonView;
21} // namespace Json
22} // namespace Utils
23namespace ECS
24{
25namespace Model
26{
27
51 {
52 public:
53 AWS_ECS_API PortMapping();
57
58
60
73 inline int GetContainerPort() const{ return m_containerPort; }
74 inline bool ContainerPortHasBeenSet() const { return m_containerPortHasBeenSet; }
75 inline void SetContainerPort(int value) { m_containerPortHasBeenSet = true; m_containerPort = value; }
76 inline PortMapping& WithContainerPort(int value) { SetContainerPort(value); return *this;}
78
80
115 inline int GetHostPort() const{ return m_hostPort; }
116 inline bool HostPortHasBeenSet() const { return m_hostPortHasBeenSet; }
117 inline void SetHostPort(int value) { m_hostPortHasBeenSet = true; m_hostPort = value; }
118 inline PortMapping& WithHostPort(int value) { SetHostPort(value); return *this;}
120
122
128 inline const TransportProtocol& GetProtocol() const{ return m_protocol; }
129 inline bool ProtocolHasBeenSet() const { return m_protocolHasBeenSet; }
130 inline void SetProtocol(const TransportProtocol& value) { m_protocolHasBeenSet = true; m_protocol = value; }
131 inline void SetProtocol(TransportProtocol&& value) { m_protocolHasBeenSet = true; m_protocol = std::move(value); }
132 inline PortMapping& WithProtocol(const TransportProtocol& value) { SetProtocol(value); return *this;}
133 inline PortMapping& WithProtocol(TransportProtocol&& value) { SetProtocol(std::move(value)); return *this;}
135
137
147 inline const Aws::String& GetName() const{ return m_name; }
148 inline bool NameHasBeenSet() const { return m_nameHasBeenSet; }
149 inline void SetName(const Aws::String& value) { m_nameHasBeenSet = true; m_name = value; }
150 inline void SetName(Aws::String&& value) { m_nameHasBeenSet = true; m_name = std::move(value); }
151 inline void SetName(const char* value) { m_nameHasBeenSet = true; m_name.assign(value); }
152 inline PortMapping& WithName(const Aws::String& value) { SetName(value); return *this;}
153 inline PortMapping& WithName(Aws::String&& value) { SetName(std::move(value)); return *this;}
154 inline PortMapping& WithName(const char* value) { SetName(value); return *this;}
156
158
177 inline const ApplicationProtocol& GetAppProtocol() const{ return m_appProtocol; }
178 inline bool AppProtocolHasBeenSet() const { return m_appProtocolHasBeenSet; }
179 inline void SetAppProtocol(const ApplicationProtocol& value) { m_appProtocolHasBeenSet = true; m_appProtocol = value; }
180 inline void SetAppProtocol(ApplicationProtocol&& value) { m_appProtocolHasBeenSet = true; m_appProtocol = std::move(value); }
181 inline PortMapping& WithAppProtocol(const ApplicationProtocol& value) { SetAppProtocol(value); return *this;}
182 inline PortMapping& WithAppProtocol(ApplicationProtocol&& value) { SetAppProtocol(std::move(value)); return *this;}
184
186
221 inline const Aws::String& GetContainerPortRange() const{ return m_containerPortRange; }
222 inline bool ContainerPortRangeHasBeenSet() const { return m_containerPortRangeHasBeenSet; }
223 inline void SetContainerPortRange(const Aws::String& value) { m_containerPortRangeHasBeenSet = true; m_containerPortRange = value; }
224 inline void SetContainerPortRange(Aws::String&& value) { m_containerPortRangeHasBeenSet = true; m_containerPortRange = std::move(value); }
225 inline void SetContainerPortRange(const char* value) { m_containerPortRangeHasBeenSet = true; m_containerPortRange.assign(value); }
226 inline PortMapping& WithContainerPortRange(const Aws::String& value) { SetContainerPortRange(value); return *this;}
227 inline PortMapping& WithContainerPortRange(Aws::String&& value) { SetContainerPortRange(std::move(value)); return *this;}
228 inline PortMapping& WithContainerPortRange(const char* value) { SetContainerPortRange(value); return *this;}
230 private:
231
232 int m_containerPort;
233 bool m_containerPortHasBeenSet = false;
234
235 int m_hostPort;
236 bool m_hostPortHasBeenSet = false;
237
238 TransportProtocol m_protocol;
239 bool m_protocolHasBeenSet = false;
240
241 Aws::String m_name;
242 bool m_nameHasBeenSet = false;
243
244 ApplicationProtocol m_appProtocol;
245 bool m_appProtocolHasBeenSet = false;
246
247 Aws::String m_containerPortRange;
248 bool m_containerPortRangeHasBeenSet = false;
249 };
250
251} // namespace Model
252} // namespace ECS
253} // namespace Aws
void SetName(const Aws::String &value)
PortMapping & WithContainerPortRange(Aws::String &&value)
AWS_ECS_API Aws::Utils::Json::JsonValue Jsonize() const
void SetName(Aws::String &&value)
void SetProtocol(const TransportProtocol &value)
AWS_ECS_API PortMapping & operator=(Aws::Utils::Json::JsonView jsonValue)
PortMapping & WithProtocol(TransportProtocol &&value)
PortMapping & WithContainerPortRange(const char *value)
PortMapping & WithName(Aws::String &&value)
PortMapping & WithContainerPortRange(const Aws::String &value)
void SetContainerPort(int value)
Definition PortMapping.h:75
PortMapping & WithContainerPort(int value)
Definition PortMapping.h:76
PortMapping & WithProtocol(const TransportProtocol &value)
AWS_ECS_API PortMapping(Aws::Utils::Json::JsonView jsonValue)
void SetAppProtocol(ApplicationProtocol &&value)
PortMapping & WithHostPort(int value)
const Aws::String & GetName() const
const ApplicationProtocol & GetAppProtocol() const
void SetContainerPortRange(const Aws::String &value)
void SetContainerPortRange(Aws::String &&value)
void SetAppProtocol(const ApplicationProtocol &value)
bool ContainerPortRangeHasBeenSet() const
const TransportProtocol & GetProtocol() const
bool ContainerPortHasBeenSet() const
Definition PortMapping.h:74
PortMapping & WithAppProtocol(const ApplicationProtocol &value)
PortMapping & WithName(const Aws::String &value)
const Aws::String & GetContainerPortRange() const
void SetProtocol(TransportProtocol &&value)
PortMapping & WithName(const char *value)
void SetName(const char *value)
PortMapping & WithAppProtocol(ApplicationProtocol &&value)
void SetContainerPortRange(const char *value)
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Aws::Utils::Json::JsonValue JsonValue