AWS SDK for C++

AWS SDK for C++ Version 1.11.816

Loading...
Searching...
No Matches
GetConnectionResult.h
1
6#pragma once
7#include <aws/core/http/HttpResponse.h>
8#include <aws/core/utils/memory/stl/AWSString.h>
9#include <aws/iot-data/IoTDataPlane_EXPORTS.h>
10
11#include <utility>
12
13namespace Aws {
14template <typename RESULT_TYPE>
15class AmazonWebServiceResult;
16
17namespace Utils {
18namespace Json {
19class JsonValue;
20} // namespace Json
21} // namespace Utils
22namespace IoTDataPlane {
23namespace Model {
25 public:
26 AWS_IOTDATAPLANE_API GetConnectionResult() = default;
29
31
36 inline bool GetConnected() const { return m_connected; }
37 inline void SetConnected(bool value) {
38 m_connectedHasBeenSet = true;
39 m_connected = value;
40 }
41 inline GetConnectionResult& WithConnected(bool value) {
42 SetConnected(value);
43 return *this;
44 }
46
48
52 inline const Aws::String& GetThingName() const { return m_thingName; }
53 template <typename ThingNameT = Aws::String>
54 void SetThingName(ThingNameT&& value) {
55 m_thingNameHasBeenSet = true;
56 m_thingName = std::forward<ThingNameT>(value);
57 }
58 template <typename ThingNameT = Aws::String>
59 GetConnectionResult& WithThingName(ThingNameT&& value) {
60 SetThingName(std::forward<ThingNameT>(value));
61 return *this;
62 }
64
66
71 inline bool GetCleanSession() const { return m_cleanSession; }
72 inline void SetCleanSession(bool value) {
73 m_cleanSessionHasBeenSet = true;
74 m_cleanSession = value;
75 }
77 SetCleanSession(value);
78 return *this;
79 }
81
83
86 inline const Aws::String& GetSourceIp() const { return m_sourceIp; }
87 template <typename SourceIpT = Aws::String>
88 void SetSourceIp(SourceIpT&& value) {
89 m_sourceIpHasBeenSet = true;
90 m_sourceIp = std::forward<SourceIpT>(value);
91 }
92 template <typename SourceIpT = Aws::String>
93 GetConnectionResult& WithSourceIp(SourceIpT&& value) {
94 SetSourceIp(std::forward<SourceIpT>(value));
95 return *this;
96 }
98
100
103 inline int GetSourcePort() const { return m_sourcePort; }
104 inline void SetSourcePort(int value) {
105 m_sourcePortHasBeenSet = true;
106 m_sourcePort = value;
107 }
109 SetSourcePort(value);
110 return *this;
111 }
113
115
120 inline const Aws::String& GetTargetIp() const { return m_targetIp; }
121 template <typename TargetIpT = Aws::String>
122 void SetTargetIp(TargetIpT&& value) {
123 m_targetIpHasBeenSet = true;
124 m_targetIp = std::forward<TargetIpT>(value);
125 }
126 template <typename TargetIpT = Aws::String>
127 GetConnectionResult& WithTargetIp(TargetIpT&& value) {
128 SetTargetIp(std::forward<TargetIpT>(value));
129 return *this;
130 }
132
134
138 inline int GetTargetPort() const { return m_targetPort; }
139 inline void SetTargetPort(int value) {
140 m_targetPortHasBeenSet = true;
141 m_targetPort = value;
142 }
144 SetTargetPort(value);
145 return *this;
146 }
148
150
154 inline int GetKeepAliveDuration() const { return m_keepAliveDuration; }
155 inline void SetKeepAliveDuration(int value) {
156 m_keepAliveDurationHasBeenSet = true;
157 m_keepAliveDuration = value;
158 }
161 return *this;
162 }
164
166
170 inline long long GetConnectedSince() const { return m_connectedSince; }
171 inline void SetConnectedSince(long long value) {
172 m_connectedSinceHasBeenSet = true;
173 m_connectedSince = value;
174 }
175 inline GetConnectionResult& WithConnectedSince(long long value) {
176 SetConnectedSince(value);
177 return *this;
178 }
180
182
187 inline long long GetDisconnectedSince() const { return m_disconnectedSince; }
188 inline void SetDisconnectedSince(long long value) {
189 m_disconnectedSinceHasBeenSet = true;
190 m_disconnectedSince = value;
191 }
194 return *this;
195 }
197
199
205 inline const Aws::String& GetDisconnectReason() const { return m_disconnectReason; }
206 template <typename DisconnectReasonT = Aws::String>
207 void SetDisconnectReason(DisconnectReasonT&& value) {
208 m_disconnectReasonHasBeenSet = true;
209 m_disconnectReason = std::forward<DisconnectReasonT>(value);
210 }
211 template <typename DisconnectReasonT = Aws::String>
212 GetConnectionResult& WithDisconnectReason(DisconnectReasonT&& value) {
213 SetDisconnectReason(std::forward<DisconnectReasonT>(value));
214 return *this;
215 }
217
219
224 inline long long GetSessionExpiry() const { return m_sessionExpiry; }
225 inline void SetSessionExpiry(long long value) {
226 m_sessionExpiryHasBeenSet = true;
227 m_sessionExpiry = value;
228 }
229 inline GetConnectionResult& WithSessionExpiry(long long value) {
230 SetSessionExpiry(value);
231 return *this;
232 }
234
236
240 inline const Aws::String& GetClientId() const { return m_clientId; }
241 template <typename ClientIdT = Aws::String>
242 void SetClientId(ClientIdT&& value) {
243 m_clientIdHasBeenSet = true;
244 m_clientId = std::forward<ClientIdT>(value);
245 }
246 template <typename ClientIdT = Aws::String>
247 GetConnectionResult& WithClientId(ClientIdT&& value) {
248 SetClientId(std::forward<ClientIdT>(value));
249 return *this;
250 }
252
254
260 inline const Aws::String& GetVpcEndpointId() const { return m_vpcEndpointId; }
261 template <typename VpcEndpointIdT = Aws::String>
262 void SetVpcEndpointId(VpcEndpointIdT&& value) {
263 m_vpcEndpointIdHasBeenSet = true;
264 m_vpcEndpointId = std::forward<VpcEndpointIdT>(value);
265 }
266 template <typename VpcEndpointIdT = Aws::String>
267 GetConnectionResult& WithVpcEndpointId(VpcEndpointIdT&& value) {
268 SetVpcEndpointId(std::forward<VpcEndpointIdT>(value));
269 return *this;
270 }
272
274
275 inline const Aws::String& GetRequestId() const { return m_requestId; }
276 template <typename RequestIdT = Aws::String>
277 void SetRequestId(RequestIdT&& value) {
278 m_requestIdHasBeenSet = true;
279 m_requestId = std::forward<RequestIdT>(value);
280 }
281 template <typename RequestIdT = Aws::String>
282 GetConnectionResult& WithRequestId(RequestIdT&& value) {
283 SetRequestId(std::forward<RequestIdT>(value));
284 return *this;
285 }
287 inline Aws::Http::HttpResponseCode GetHttpResponseCode() const { return m_HttpResponseCode; }
288
289 private:
290 bool m_connected{false};
291
292 Aws::String m_thingName;
293
294 bool m_cleanSession{false};
295
296 Aws::String m_sourceIp;
297
298 int m_sourcePort{0};
299
300 Aws::String m_targetIp;
301
302 int m_targetPort{0};
303
304 int m_keepAliveDuration{0};
305
306 long long m_connectedSince{0};
307
308 long long m_disconnectedSince{0};
309
310 Aws::String m_disconnectReason;
311
312 long long m_sessionExpiry{0};
313
314 Aws::String m_clientId;
315
316 Aws::String m_vpcEndpointId;
317
318 Aws::String m_requestId;
319 Aws::Http::HttpResponseCode m_HttpResponseCode;
320 bool m_connectedHasBeenSet = false;
321 bool m_thingNameHasBeenSet = false;
322 bool m_cleanSessionHasBeenSet = false;
323 bool m_sourceIpHasBeenSet = false;
324 bool m_sourcePortHasBeenSet = false;
325 bool m_targetIpHasBeenSet = false;
326 bool m_targetPortHasBeenSet = false;
327 bool m_keepAliveDurationHasBeenSet = false;
328 bool m_connectedSinceHasBeenSet = false;
329 bool m_disconnectedSinceHasBeenSet = false;
330 bool m_disconnectReasonHasBeenSet = false;
331 bool m_sessionExpiryHasBeenSet = false;
332 bool m_clientIdHasBeenSet = false;
333 bool m_vpcEndpointIdHasBeenSet = false;
334 bool m_requestIdHasBeenSet = false;
335};
336
337} // namespace Model
338} // namespace IoTDataPlane
339} // namespace Aws
void SetDisconnectReason(DisconnectReasonT &&value)
AWS_IOTDATAPLANE_API GetConnectionResult & operator=(const Aws::AmazonWebServiceResult< Aws::Utils::Json::JsonValue > &result)
GetConnectionResult & WithKeepAliveDuration(int value)
GetConnectionResult & WithConnected(bool value)
GetConnectionResult & WithTargetIp(TargetIpT &&value)
Aws::Http::HttpResponseCode GetHttpResponseCode() const
AWS_IOTDATAPLANE_API GetConnectionResult()=default
GetConnectionResult & WithThingName(ThingNameT &&value)
GetConnectionResult & WithConnectedSince(long long value)
GetConnectionResult & WithCleanSession(bool value)
GetConnectionResult & WithVpcEndpointId(VpcEndpointIdT &&value)
AWS_IOTDATAPLANE_API GetConnectionResult(const Aws::AmazonWebServiceResult< Aws::Utils::Json::JsonValue > &result)
GetConnectionResult & WithSourceIp(SourceIpT &&value)
GetConnectionResult & WithSessionExpiry(long long value)
GetConnectionResult & WithDisconnectReason(DisconnectReasonT &&value)
GetConnectionResult & WithDisconnectedSince(long long value)
GetConnectionResult & WithRequestId(RequestIdT &&value)
GetConnectionResult & WithClientId(ClientIdT &&value)
GetConnectionResult & WithSourcePort(int value)
GetConnectionResult & WithTargetPort(int value)
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Aws::Utils::Json::JsonValue JsonValue