1 /**
2  * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3  * SPDX-License-Identifier: Apache-2.0.
4  */
5 
6 #pragma once
7 #include <aws/iotsecuretunneling/IoTSecureTunneling_EXPORTS.h>
8 #include <aws/core/utils/memory/stl/AWSString.h>
9 #include <aws/iotsecuretunneling/model/TunnelStatus.h>
10 #include <aws/iotsecuretunneling/model/ConnectionState.h>
11 #include <aws/iotsecuretunneling/model/DestinationConfig.h>
12 #include <aws/iotsecuretunneling/model/TimeoutConfig.h>
13 #include <aws/core/utils/memory/stl/AWSVector.h>
14 #include <aws/core/utils/DateTime.h>
15 #include <aws/iotsecuretunneling/model/Tag.h>
16 #include <utility>
17 
18 namespace Aws
19 {
20 namespace Utils
21 {
22 namespace Json
23 {
24   class JsonValue;
25   class JsonView;
26 } // namespace Json
27 } // namespace Utils
28 namespace IoTSecureTunneling
29 {
30 namespace Model
31 {
32 
33   /**
34    * <p>A connection between a source computer and a destination
35    * device.</p><p><h3>See Also:</h3>   <a
36    * href="http://docs.aws.amazon.com/goto/WebAPI/iotsecuretunneling-2018-10-05/Tunnel">AWS
37    * API Reference</a></p>
38    */
39   class AWS_IOTSECURETUNNELING_API Tunnel
40   {
41   public:
42     Tunnel();
43     Tunnel(Aws::Utils::Json::JsonView jsonValue);
44     Tunnel& operator=(Aws::Utils::Json::JsonView jsonValue);
45     Aws::Utils::Json::JsonValue Jsonize() const;
46 
47 
48     /**
49      * <p>A unique alpha-numeric ID that identifies a tunnel.</p>
50      */
GetTunnelId()51     inline const Aws::String& GetTunnelId() const{ return m_tunnelId; }
52 
53     /**
54      * <p>A unique alpha-numeric ID that identifies a tunnel.</p>
55      */
TunnelIdHasBeenSet()56     inline bool TunnelIdHasBeenSet() const { return m_tunnelIdHasBeenSet; }
57 
58     /**
59      * <p>A unique alpha-numeric ID that identifies a tunnel.</p>
60      */
SetTunnelId(const Aws::String & value)61     inline void SetTunnelId(const Aws::String& value) { m_tunnelIdHasBeenSet = true; m_tunnelId = value; }
62 
63     /**
64      * <p>A unique alpha-numeric ID that identifies a tunnel.</p>
65      */
SetTunnelId(Aws::String && value)66     inline void SetTunnelId(Aws::String&& value) { m_tunnelIdHasBeenSet = true; m_tunnelId = std::move(value); }
67 
68     /**
69      * <p>A unique alpha-numeric ID that identifies a tunnel.</p>
70      */
SetTunnelId(const char * value)71     inline void SetTunnelId(const char* value) { m_tunnelIdHasBeenSet = true; m_tunnelId.assign(value); }
72 
73     /**
74      * <p>A unique alpha-numeric ID that identifies a tunnel.</p>
75      */
WithTunnelId(const Aws::String & value)76     inline Tunnel& WithTunnelId(const Aws::String& value) { SetTunnelId(value); return *this;}
77 
78     /**
79      * <p>A unique alpha-numeric ID that identifies a tunnel.</p>
80      */
WithTunnelId(Aws::String && value)81     inline Tunnel& WithTunnelId(Aws::String&& value) { SetTunnelId(std::move(value)); return *this;}
82 
83     /**
84      * <p>A unique alpha-numeric ID that identifies a tunnel.</p>
85      */
WithTunnelId(const char * value)86     inline Tunnel& WithTunnelId(const char* value) { SetTunnelId(value); return *this;}
87 
88 
89     /**
90      * <p>The Amazon Resource Name (ARN) of a tunnel. The tunnel ARN format is
91      * <code>arn:aws:tunnel:&lt;region&gt;:&lt;account-id&gt;:tunnel/&lt;tunnel-id&gt;</code>
92      * </p>
93      */
GetTunnelArn()94     inline const Aws::String& GetTunnelArn() const{ return m_tunnelArn; }
95 
96     /**
97      * <p>The Amazon Resource Name (ARN) of a tunnel. The tunnel ARN format is
98      * <code>arn:aws:tunnel:&lt;region&gt;:&lt;account-id&gt;:tunnel/&lt;tunnel-id&gt;</code>
99      * </p>
100      */
TunnelArnHasBeenSet()101     inline bool TunnelArnHasBeenSet() const { return m_tunnelArnHasBeenSet; }
102 
103     /**
104      * <p>The Amazon Resource Name (ARN) of a tunnel. The tunnel ARN format is
105      * <code>arn:aws:tunnel:&lt;region&gt;:&lt;account-id&gt;:tunnel/&lt;tunnel-id&gt;</code>
106      * </p>
107      */
SetTunnelArn(const Aws::String & value)108     inline void SetTunnelArn(const Aws::String& value) { m_tunnelArnHasBeenSet = true; m_tunnelArn = value; }
109 
110     /**
111      * <p>The Amazon Resource Name (ARN) of a tunnel. The tunnel ARN format is
112      * <code>arn:aws:tunnel:&lt;region&gt;:&lt;account-id&gt;:tunnel/&lt;tunnel-id&gt;</code>
113      * </p>
114      */
SetTunnelArn(Aws::String && value)115     inline void SetTunnelArn(Aws::String&& value) { m_tunnelArnHasBeenSet = true; m_tunnelArn = std::move(value); }
116 
117     /**
118      * <p>The Amazon Resource Name (ARN) of a tunnel. The tunnel ARN format is
119      * <code>arn:aws:tunnel:&lt;region&gt;:&lt;account-id&gt;:tunnel/&lt;tunnel-id&gt;</code>
120      * </p>
121      */
SetTunnelArn(const char * value)122     inline void SetTunnelArn(const char* value) { m_tunnelArnHasBeenSet = true; m_tunnelArn.assign(value); }
123 
124     /**
125      * <p>The Amazon Resource Name (ARN) of a tunnel. The tunnel ARN format is
126      * <code>arn:aws:tunnel:&lt;region&gt;:&lt;account-id&gt;:tunnel/&lt;tunnel-id&gt;</code>
127      * </p>
128      */
WithTunnelArn(const Aws::String & value)129     inline Tunnel& WithTunnelArn(const Aws::String& value) { SetTunnelArn(value); return *this;}
130 
131     /**
132      * <p>The Amazon Resource Name (ARN) of a tunnel. The tunnel ARN format is
133      * <code>arn:aws:tunnel:&lt;region&gt;:&lt;account-id&gt;:tunnel/&lt;tunnel-id&gt;</code>
134      * </p>
135      */
WithTunnelArn(Aws::String && value)136     inline Tunnel& WithTunnelArn(Aws::String&& value) { SetTunnelArn(std::move(value)); return *this;}
137 
138     /**
139      * <p>The Amazon Resource Name (ARN) of a tunnel. The tunnel ARN format is
140      * <code>arn:aws:tunnel:&lt;region&gt;:&lt;account-id&gt;:tunnel/&lt;tunnel-id&gt;</code>
141      * </p>
142      */
WithTunnelArn(const char * value)143     inline Tunnel& WithTunnelArn(const char* value) { SetTunnelArn(value); return *this;}
144 
145 
146     /**
147      * <p>The status of a tunnel. Valid values are: Open and Closed.</p>
148      */
GetStatus()149     inline const TunnelStatus& GetStatus() const{ return m_status; }
150 
151     /**
152      * <p>The status of a tunnel. Valid values are: Open and Closed.</p>
153      */
StatusHasBeenSet()154     inline bool StatusHasBeenSet() const { return m_statusHasBeenSet; }
155 
156     /**
157      * <p>The status of a tunnel. Valid values are: Open and Closed.</p>
158      */
SetStatus(const TunnelStatus & value)159     inline void SetStatus(const TunnelStatus& value) { m_statusHasBeenSet = true; m_status = value; }
160 
161     /**
162      * <p>The status of a tunnel. Valid values are: Open and Closed.</p>
163      */
SetStatus(TunnelStatus && value)164     inline void SetStatus(TunnelStatus&& value) { m_statusHasBeenSet = true; m_status = std::move(value); }
165 
166     /**
167      * <p>The status of a tunnel. Valid values are: Open and Closed.</p>
168      */
WithStatus(const TunnelStatus & value)169     inline Tunnel& WithStatus(const TunnelStatus& value) { SetStatus(value); return *this;}
170 
171     /**
172      * <p>The status of a tunnel. Valid values are: Open and Closed.</p>
173      */
WithStatus(TunnelStatus && value)174     inline Tunnel& WithStatus(TunnelStatus&& value) { SetStatus(std::move(value)); return *this;}
175 
176 
177     /**
178      * <p>The connection state of the source application.</p>
179      */
GetSourceConnectionState()180     inline const ConnectionState& GetSourceConnectionState() const{ return m_sourceConnectionState; }
181 
182     /**
183      * <p>The connection state of the source application.</p>
184      */
SourceConnectionStateHasBeenSet()185     inline bool SourceConnectionStateHasBeenSet() const { return m_sourceConnectionStateHasBeenSet; }
186 
187     /**
188      * <p>The connection state of the source application.</p>
189      */
SetSourceConnectionState(const ConnectionState & value)190     inline void SetSourceConnectionState(const ConnectionState& value) { m_sourceConnectionStateHasBeenSet = true; m_sourceConnectionState = value; }
191 
192     /**
193      * <p>The connection state of the source application.</p>
194      */
SetSourceConnectionState(ConnectionState && value)195     inline void SetSourceConnectionState(ConnectionState&& value) { m_sourceConnectionStateHasBeenSet = true; m_sourceConnectionState = std::move(value); }
196 
197     /**
198      * <p>The connection state of the source application.</p>
199      */
WithSourceConnectionState(const ConnectionState & value)200     inline Tunnel& WithSourceConnectionState(const ConnectionState& value) { SetSourceConnectionState(value); return *this;}
201 
202     /**
203      * <p>The connection state of the source application.</p>
204      */
WithSourceConnectionState(ConnectionState && value)205     inline Tunnel& WithSourceConnectionState(ConnectionState&& value) { SetSourceConnectionState(std::move(value)); return *this;}
206 
207 
208     /**
209      * <p>The connection state of the destination application.</p>
210      */
GetDestinationConnectionState()211     inline const ConnectionState& GetDestinationConnectionState() const{ return m_destinationConnectionState; }
212 
213     /**
214      * <p>The connection state of the destination application.</p>
215      */
DestinationConnectionStateHasBeenSet()216     inline bool DestinationConnectionStateHasBeenSet() const { return m_destinationConnectionStateHasBeenSet; }
217 
218     /**
219      * <p>The connection state of the destination application.</p>
220      */
SetDestinationConnectionState(const ConnectionState & value)221     inline void SetDestinationConnectionState(const ConnectionState& value) { m_destinationConnectionStateHasBeenSet = true; m_destinationConnectionState = value; }
222 
223     /**
224      * <p>The connection state of the destination application.</p>
225      */
SetDestinationConnectionState(ConnectionState && value)226     inline void SetDestinationConnectionState(ConnectionState&& value) { m_destinationConnectionStateHasBeenSet = true; m_destinationConnectionState = std::move(value); }
227 
228     /**
229      * <p>The connection state of the destination application.</p>
230      */
WithDestinationConnectionState(const ConnectionState & value)231     inline Tunnel& WithDestinationConnectionState(const ConnectionState& value) { SetDestinationConnectionState(value); return *this;}
232 
233     /**
234      * <p>The connection state of the destination application.</p>
235      */
WithDestinationConnectionState(ConnectionState && value)236     inline Tunnel& WithDestinationConnectionState(ConnectionState&& value) { SetDestinationConnectionState(std::move(value)); return *this;}
237 
238 
239     /**
240      * <p>A description of the tunnel.</p>
241      */
GetDescription()242     inline const Aws::String& GetDescription() const{ return m_description; }
243 
244     /**
245      * <p>A description of the tunnel.</p>
246      */
DescriptionHasBeenSet()247     inline bool DescriptionHasBeenSet() const { return m_descriptionHasBeenSet; }
248 
249     /**
250      * <p>A description of the tunnel.</p>
251      */
SetDescription(const Aws::String & value)252     inline void SetDescription(const Aws::String& value) { m_descriptionHasBeenSet = true; m_description = value; }
253 
254     /**
255      * <p>A description of the tunnel.</p>
256      */
SetDescription(Aws::String && value)257     inline void SetDescription(Aws::String&& value) { m_descriptionHasBeenSet = true; m_description = std::move(value); }
258 
259     /**
260      * <p>A description of the tunnel.</p>
261      */
SetDescription(const char * value)262     inline void SetDescription(const char* value) { m_descriptionHasBeenSet = true; m_description.assign(value); }
263 
264     /**
265      * <p>A description of the tunnel.</p>
266      */
WithDescription(const Aws::String & value)267     inline Tunnel& WithDescription(const Aws::String& value) { SetDescription(value); return *this;}
268 
269     /**
270      * <p>A description of the tunnel.</p>
271      */
WithDescription(Aws::String && value)272     inline Tunnel& WithDescription(Aws::String&& value) { SetDescription(std::move(value)); return *this;}
273 
274     /**
275      * <p>A description of the tunnel.</p>
276      */
WithDescription(const char * value)277     inline Tunnel& WithDescription(const char* value) { SetDescription(value); return *this;}
278 
279 
280     /**
281      * <p>The destination configuration that specifies the thing name of the
282      * destination device and a service name that the local proxy uses to connect to
283      * the destination application.</p>
284      */
GetDestinationConfig()285     inline const DestinationConfig& GetDestinationConfig() const{ return m_destinationConfig; }
286 
287     /**
288      * <p>The destination configuration that specifies the thing name of the
289      * destination device and a service name that the local proxy uses to connect to
290      * the destination application.</p>
291      */
DestinationConfigHasBeenSet()292     inline bool DestinationConfigHasBeenSet() const { return m_destinationConfigHasBeenSet; }
293 
294     /**
295      * <p>The destination configuration that specifies the thing name of the
296      * destination device and a service name that the local proxy uses to connect to
297      * the destination application.</p>
298      */
SetDestinationConfig(const DestinationConfig & value)299     inline void SetDestinationConfig(const DestinationConfig& value) { m_destinationConfigHasBeenSet = true; m_destinationConfig = value; }
300 
301     /**
302      * <p>The destination configuration that specifies the thing name of the
303      * destination device and a service name that the local proxy uses to connect to
304      * the destination application.</p>
305      */
SetDestinationConfig(DestinationConfig && value)306     inline void SetDestinationConfig(DestinationConfig&& value) { m_destinationConfigHasBeenSet = true; m_destinationConfig = std::move(value); }
307 
308     /**
309      * <p>The destination configuration that specifies the thing name of the
310      * destination device and a service name that the local proxy uses to connect to
311      * the destination application.</p>
312      */
WithDestinationConfig(const DestinationConfig & value)313     inline Tunnel& WithDestinationConfig(const DestinationConfig& value) { SetDestinationConfig(value); return *this;}
314 
315     /**
316      * <p>The destination configuration that specifies the thing name of the
317      * destination device and a service name that the local proxy uses to connect to
318      * the destination application.</p>
319      */
WithDestinationConfig(DestinationConfig && value)320     inline Tunnel& WithDestinationConfig(DestinationConfig&& value) { SetDestinationConfig(std::move(value)); return *this;}
321 
322 
323     /**
324      * <p>Timeout configuration for the tunnel.</p>
325      */
GetTimeoutConfig()326     inline const TimeoutConfig& GetTimeoutConfig() const{ return m_timeoutConfig; }
327 
328     /**
329      * <p>Timeout configuration for the tunnel.</p>
330      */
TimeoutConfigHasBeenSet()331     inline bool TimeoutConfigHasBeenSet() const { return m_timeoutConfigHasBeenSet; }
332 
333     /**
334      * <p>Timeout configuration for the tunnel.</p>
335      */
SetTimeoutConfig(const TimeoutConfig & value)336     inline void SetTimeoutConfig(const TimeoutConfig& value) { m_timeoutConfigHasBeenSet = true; m_timeoutConfig = value; }
337 
338     /**
339      * <p>Timeout configuration for the tunnel.</p>
340      */
SetTimeoutConfig(TimeoutConfig && value)341     inline void SetTimeoutConfig(TimeoutConfig&& value) { m_timeoutConfigHasBeenSet = true; m_timeoutConfig = std::move(value); }
342 
343     /**
344      * <p>Timeout configuration for the tunnel.</p>
345      */
WithTimeoutConfig(const TimeoutConfig & value)346     inline Tunnel& WithTimeoutConfig(const TimeoutConfig& value) { SetTimeoutConfig(value); return *this;}
347 
348     /**
349      * <p>Timeout configuration for the tunnel.</p>
350      */
WithTimeoutConfig(TimeoutConfig && value)351     inline Tunnel& WithTimeoutConfig(TimeoutConfig&& value) { SetTimeoutConfig(std::move(value)); return *this;}
352 
353 
354     /**
355      * <p>A list of tag metadata associated with the secure tunnel.</p>
356      */
GetTags()357     inline const Aws::Vector<Tag>& GetTags() const{ return m_tags; }
358 
359     /**
360      * <p>A list of tag metadata associated with the secure tunnel.</p>
361      */
TagsHasBeenSet()362     inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; }
363 
364     /**
365      * <p>A list of tag metadata associated with the secure tunnel.</p>
366      */
SetTags(const Aws::Vector<Tag> & value)367     inline void SetTags(const Aws::Vector<Tag>& value) { m_tagsHasBeenSet = true; m_tags = value; }
368 
369     /**
370      * <p>A list of tag metadata associated with the secure tunnel.</p>
371      */
SetTags(Aws::Vector<Tag> && value)372     inline void SetTags(Aws::Vector<Tag>&& value) { m_tagsHasBeenSet = true; m_tags = std::move(value); }
373 
374     /**
375      * <p>A list of tag metadata associated with the secure tunnel.</p>
376      */
WithTags(const Aws::Vector<Tag> & value)377     inline Tunnel& WithTags(const Aws::Vector<Tag>& value) { SetTags(value); return *this;}
378 
379     /**
380      * <p>A list of tag metadata associated with the secure tunnel.</p>
381      */
WithTags(Aws::Vector<Tag> && value)382     inline Tunnel& WithTags(Aws::Vector<Tag>&& value) { SetTags(std::move(value)); return *this;}
383 
384     /**
385      * <p>A list of tag metadata associated with the secure tunnel.</p>
386      */
AddTags(const Tag & value)387     inline Tunnel& AddTags(const Tag& value) { m_tagsHasBeenSet = true; m_tags.push_back(value); return *this; }
388 
389     /**
390      * <p>A list of tag metadata associated with the secure tunnel.</p>
391      */
AddTags(Tag && value)392     inline Tunnel& AddTags(Tag&& value) { m_tagsHasBeenSet = true; m_tags.push_back(std::move(value)); return *this; }
393 
394 
395     /**
396      * <p>The time when the tunnel was created.</p>
397      */
GetCreatedAt()398     inline const Aws::Utils::DateTime& GetCreatedAt() const{ return m_createdAt; }
399 
400     /**
401      * <p>The time when the tunnel was created.</p>
402      */
CreatedAtHasBeenSet()403     inline bool CreatedAtHasBeenSet() const { return m_createdAtHasBeenSet; }
404 
405     /**
406      * <p>The time when the tunnel was created.</p>
407      */
SetCreatedAt(const Aws::Utils::DateTime & value)408     inline void SetCreatedAt(const Aws::Utils::DateTime& value) { m_createdAtHasBeenSet = true; m_createdAt = value; }
409 
410     /**
411      * <p>The time when the tunnel was created.</p>
412      */
SetCreatedAt(Aws::Utils::DateTime && value)413     inline void SetCreatedAt(Aws::Utils::DateTime&& value) { m_createdAtHasBeenSet = true; m_createdAt = std::move(value); }
414 
415     /**
416      * <p>The time when the tunnel was created.</p>
417      */
WithCreatedAt(const Aws::Utils::DateTime & value)418     inline Tunnel& WithCreatedAt(const Aws::Utils::DateTime& value) { SetCreatedAt(value); return *this;}
419 
420     /**
421      * <p>The time when the tunnel was created.</p>
422      */
WithCreatedAt(Aws::Utils::DateTime && value)423     inline Tunnel& WithCreatedAt(Aws::Utils::DateTime&& value) { SetCreatedAt(std::move(value)); return *this;}
424 
425 
426     /**
427      * <p>The last time the tunnel was updated.</p>
428      */
GetLastUpdatedAt()429     inline const Aws::Utils::DateTime& GetLastUpdatedAt() const{ return m_lastUpdatedAt; }
430 
431     /**
432      * <p>The last time the tunnel was updated.</p>
433      */
LastUpdatedAtHasBeenSet()434     inline bool LastUpdatedAtHasBeenSet() const { return m_lastUpdatedAtHasBeenSet; }
435 
436     /**
437      * <p>The last time the tunnel was updated.</p>
438      */
SetLastUpdatedAt(const Aws::Utils::DateTime & value)439     inline void SetLastUpdatedAt(const Aws::Utils::DateTime& value) { m_lastUpdatedAtHasBeenSet = true; m_lastUpdatedAt = value; }
440 
441     /**
442      * <p>The last time the tunnel was updated.</p>
443      */
SetLastUpdatedAt(Aws::Utils::DateTime && value)444     inline void SetLastUpdatedAt(Aws::Utils::DateTime&& value) { m_lastUpdatedAtHasBeenSet = true; m_lastUpdatedAt = std::move(value); }
445 
446     /**
447      * <p>The last time the tunnel was updated.</p>
448      */
WithLastUpdatedAt(const Aws::Utils::DateTime & value)449     inline Tunnel& WithLastUpdatedAt(const Aws::Utils::DateTime& value) { SetLastUpdatedAt(value); return *this;}
450 
451     /**
452      * <p>The last time the tunnel was updated.</p>
453      */
WithLastUpdatedAt(Aws::Utils::DateTime && value)454     inline Tunnel& WithLastUpdatedAt(Aws::Utils::DateTime&& value) { SetLastUpdatedAt(std::move(value)); return *this;}
455 
456   private:
457 
458     Aws::String m_tunnelId;
459     bool m_tunnelIdHasBeenSet;
460 
461     Aws::String m_tunnelArn;
462     bool m_tunnelArnHasBeenSet;
463 
464     TunnelStatus m_status;
465     bool m_statusHasBeenSet;
466 
467     ConnectionState m_sourceConnectionState;
468     bool m_sourceConnectionStateHasBeenSet;
469 
470     ConnectionState m_destinationConnectionState;
471     bool m_destinationConnectionStateHasBeenSet;
472 
473     Aws::String m_description;
474     bool m_descriptionHasBeenSet;
475 
476     DestinationConfig m_destinationConfig;
477     bool m_destinationConfigHasBeenSet;
478 
479     TimeoutConfig m_timeoutConfig;
480     bool m_timeoutConfigHasBeenSet;
481 
482     Aws::Vector<Tag> m_tags;
483     bool m_tagsHasBeenSet;
484 
485     Aws::Utils::DateTime m_createdAt;
486     bool m_createdAtHasBeenSet;
487 
488     Aws::Utils::DateTime m_lastUpdatedAt;
489     bool m_lastUpdatedAtHasBeenSet;
490   };
491 
492 } // namespace Model
493 } // namespace IoTSecureTunneling
494 } // namespace Aws
495