AWS SDK for C++

AWS SDK for C++ Version 1.11.607

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
50 {
51 public:
52 AWS_ECS_API PortMapping() = default;
56
57
59
70 inline int GetContainerPort() const { return m_containerPort; }
71 inline bool ContainerPortHasBeenSet() const { return m_containerPortHasBeenSet; }
72 inline void SetContainerPort(int value) { m_containerPortHasBeenSet = true; m_containerPort = value; }
73 inline PortMapping& WithContainerPort(int value) { SetContainerPort(value); return *this;}
75
77
112 inline int GetHostPort() const { return m_hostPort; }
113 inline bool HostPortHasBeenSet() const { return m_hostPortHasBeenSet; }
114 inline void SetHostPort(int value) { m_hostPortHasBeenSet = true; m_hostPort = value; }
115 inline PortMapping& WithHostPort(int value) { SetHostPort(value); return *this;}
117
119
125 inline TransportProtocol GetProtocol() const { return m_protocol; }
126 inline bool ProtocolHasBeenSet() const { return m_protocolHasBeenSet; }
127 inline void SetProtocol(TransportProtocol value) { m_protocolHasBeenSet = true; m_protocol = value; }
128 inline PortMapping& WithProtocol(TransportProtocol value) { SetProtocol(value); return *this;}
130
132
139 inline const Aws::String& GetName() const { return m_name; }
140 inline bool NameHasBeenSet() const { return m_nameHasBeenSet; }
141 template<typename NameT = Aws::String>
142 void SetName(NameT&& value) { m_nameHasBeenSet = true; m_name = std::forward<NameT>(value); }
143 template<typename NameT = Aws::String>
144 PortMapping& WithName(NameT&& value) { SetName(std::forward<NameT>(value)); return *this;}
146
148
167 inline ApplicationProtocol GetAppProtocol() const { return m_appProtocol; }
168 inline bool AppProtocolHasBeenSet() const { return m_appProtocolHasBeenSet; }
169 inline void SetAppProtocol(ApplicationProtocol value) { m_appProtocolHasBeenSet = true; m_appProtocol = value; }
170 inline PortMapping& WithAppProtocol(ApplicationProtocol value) { SetAppProtocol(value); return *this;}
172
174
209 inline const Aws::String& GetContainerPortRange() const { return m_containerPortRange; }
210 inline bool ContainerPortRangeHasBeenSet() const { return m_containerPortRangeHasBeenSet; }
211 template<typename ContainerPortRangeT = Aws::String>
212 void SetContainerPortRange(ContainerPortRangeT&& value) { m_containerPortRangeHasBeenSet = true; m_containerPortRange = std::forward<ContainerPortRangeT>(value); }
213 template<typename ContainerPortRangeT = Aws::String>
214 PortMapping& WithContainerPortRange(ContainerPortRangeT&& value) { SetContainerPortRange(std::forward<ContainerPortRangeT>(value)); return *this;}
216 private:
217
218 int m_containerPort{0};
219 bool m_containerPortHasBeenSet = false;
220
221 int m_hostPort{0};
222 bool m_hostPortHasBeenSet = false;
223
225 bool m_protocolHasBeenSet = false;
226
227 Aws::String m_name;
228 bool m_nameHasBeenSet = false;
229
231 bool m_appProtocolHasBeenSet = false;
232
233 Aws::String m_containerPortRange;
234 bool m_containerPortRangeHasBeenSet = false;
235 };
236
237} // namespace Model
238} // namespace ECS
239} // namespace Aws
AWS_ECS_API Aws::Utils::Json::JsonValue Jsonize() const
TransportProtocol GetProtocol() const
PortMapping & WithName(NameT &&value)
AWS_ECS_API PortMapping & operator=(Aws::Utils::Json::JsonView jsonValue)
void SetProtocol(TransportProtocol value)
void SetContainerPort(int value)
Definition PortMapping.h:72
PortMapping & WithContainerPort(int value)
Definition PortMapping.h:73
AWS_ECS_API PortMapping(Aws::Utils::Json::JsonView jsonValue)
PortMapping & WithHostPort(int value)
const Aws::String & GetName() const
PortMapping & WithAppProtocol(ApplicationProtocol value)
PortMapping & WithContainerPortRange(ContainerPortRangeT &&value)
void SetContainerPortRange(ContainerPortRangeT &&value)
bool ContainerPortRangeHasBeenSet() const
bool ContainerPortHasBeenSet() const
Definition PortMapping.h:71
void SetName(NameT &&value)
PortMapping & WithProtocol(TransportProtocol value)
const Aws::String & GetContainerPortRange() const
void SetAppProtocol(ApplicationProtocol value)
AWS_ECS_API PortMapping()=default
ApplicationProtocol GetAppProtocol() const
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Aws::Utils::Json::JsonValue JsonValue