AWS SDK for C++

AWS SDK for C++ Version 1.11.743

Loading...
Searching...
No Matches
NetworkBinding.h
1
6#pragma once
7#include <aws/core/utils/memory/stl/AWSString.h>
8#include <aws/ecs/ECS_EXPORTS.h>
9#include <aws/ecs/model/TransportProtocol.h>
10
11#include <utility>
12
13namespace Aws {
14namespace Utils {
15namespace Json {
16class JsonValue;
17class JsonView;
18} // namespace Json
19} // namespace Utils
20namespace ECS {
21namespace Model {
22
34 public:
35 AWS_ECS_API NetworkBinding() = default;
39
41
44 inline const Aws::String& GetBindIP() const { return m_bindIP; }
45 inline bool BindIPHasBeenSet() const { return m_bindIPHasBeenSet; }
46 template <typename BindIPT = Aws::String>
47 void SetBindIP(BindIPT&& value) {
48 m_bindIPHasBeenSet = true;
49 m_bindIP = std::forward<BindIPT>(value);
50 }
51 template <typename BindIPT = Aws::String>
52 NetworkBinding& WithBindIP(BindIPT&& value) {
53 SetBindIP(std::forward<BindIPT>(value));
54 return *this;
55 }
57
59
62 inline int GetContainerPort() const { return m_containerPort; }
63 inline bool ContainerPortHasBeenSet() const { return m_containerPortHasBeenSet; }
64 inline void SetContainerPort(int value) {
65 m_containerPortHasBeenSet = true;
66 m_containerPort = value;
67 }
68 inline NetworkBinding& WithContainerPort(int value) {
69 SetContainerPort(value);
70 return *this;
71 }
73
75
78 inline int GetHostPort() const { return m_hostPort; }
79 inline bool HostPortHasBeenSet() const { return m_hostPortHasBeenSet; }
80 inline void SetHostPort(int value) {
81 m_hostPortHasBeenSet = true;
82 m_hostPort = value;
83 }
84 inline NetworkBinding& WithHostPort(int value) {
85 SetHostPort(value);
86 return *this;
87 }
89
91
94 inline TransportProtocol GetProtocol() const { return m_protocol; }
95 inline bool ProtocolHasBeenSet() const { return m_protocolHasBeenSet; }
96 inline void SetProtocol(TransportProtocol value) {
97 m_protocolHasBeenSet = true;
98 m_protocol = value;
99 }
101 SetProtocol(value);
102 return *this;
103 }
105
107
142 inline const Aws::String& GetContainerPortRange() const { return m_containerPortRange; }
143 inline bool ContainerPortRangeHasBeenSet() const { return m_containerPortRangeHasBeenSet; }
144 template <typename ContainerPortRangeT = Aws::String>
145 void SetContainerPortRange(ContainerPortRangeT&& value) {
146 m_containerPortRangeHasBeenSet = true;
147 m_containerPortRange = std::forward<ContainerPortRangeT>(value);
148 }
149 template <typename ContainerPortRangeT = Aws::String>
150 NetworkBinding& WithContainerPortRange(ContainerPortRangeT&& value) {
151 SetContainerPortRange(std::forward<ContainerPortRangeT>(value));
152 return *this;
153 }
155
157
161 inline const Aws::String& GetHostPortRange() const { return m_hostPortRange; }
162 inline bool HostPortRangeHasBeenSet() const { return m_hostPortRangeHasBeenSet; }
163 template <typename HostPortRangeT = Aws::String>
164 void SetHostPortRange(HostPortRangeT&& value) {
165 m_hostPortRangeHasBeenSet = true;
166 m_hostPortRange = std::forward<HostPortRangeT>(value);
167 }
168 template <typename HostPortRangeT = Aws::String>
169 NetworkBinding& WithHostPortRange(HostPortRangeT&& value) {
170 SetHostPortRange(std::forward<HostPortRangeT>(value));
171 return *this;
172 }
174 private:
175 Aws::String m_bindIP;
176
177 int m_containerPort{0};
178
179 int m_hostPort{0};
180
182
183 Aws::String m_containerPortRange;
184
185 Aws::String m_hostPortRange;
186 bool m_bindIPHasBeenSet = false;
187 bool m_containerPortHasBeenSet = false;
188 bool m_hostPortHasBeenSet = false;
189 bool m_protocolHasBeenSet = false;
190 bool m_containerPortRangeHasBeenSet = false;
191 bool m_hostPortRangeHasBeenSet = false;
192};
193
194} // namespace Model
195} // namespace ECS
196} // namespace Aws
AWS_ECS_API Aws::Utils::Json::JsonValue Jsonize() const
NetworkBinding & WithHostPortRange(HostPortRangeT &&value)
const Aws::String & GetHostPortRange() const
NetworkBinding & WithHostPort(int value)
NetworkBinding & WithProtocol(TransportProtocol value)
void SetHostPortRange(HostPortRangeT &&value)
TransportProtocol GetProtocol() const
NetworkBinding & WithContainerPortRange(ContainerPortRangeT &&value)
AWS_ECS_API NetworkBinding()=default
const Aws::String & GetBindIP() const
AWS_ECS_API NetworkBinding & operator=(Aws::Utils::Json::JsonView jsonValue)
NetworkBinding & WithBindIP(BindIPT &&value)
NetworkBinding & WithContainerPort(int value)
void SetProtocol(TransportProtocol value)
const Aws::String & GetContainerPortRange() const
void SetContainerPortRange(ContainerPortRangeT &&value)
void SetBindIP(BindIPT &&value)
AWS_ECS_API NetworkBinding(Aws::Utils::Json::JsonView jsonValue)
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Aws::Utils::Json::JsonValue JsonValue