AWS SDK for C++

AWS SDK for C++ Version 1.11.607

Loading...
Searching...
No Matches
ThingConnectivity.h
1
6#pragma once
7#include <aws/iot/IoT_EXPORTS.h>
8#include <aws/core/utils/memory/stl/AWSString.h>
9#include <utility>
10
11namespace Aws
12{
13namespace Utils
14{
15namespace Json
16{
17 class JsonValue;
18 class JsonView;
19} // namespace Json
20} // namespace Utils
21namespace IoT
22{
23namespace Model
24{
25
32 {
33 public:
34 AWS_IOT_API ThingConnectivity() = default;
38
39
41
45 inline bool GetConnected() const { return m_connected; }
46 inline bool ConnectedHasBeenSet() const { return m_connectedHasBeenSet; }
47 inline void SetConnected(bool value) { m_connectedHasBeenSet = true; m_connected = value; }
48 inline ThingConnectivity& WithConnected(bool value) { SetConnected(value); return *this;}
50
52
57 inline long long GetTimestamp() const { return m_timestamp; }
58 inline bool TimestampHasBeenSet() const { return m_timestampHasBeenSet; }
59 inline void SetTimestamp(long long value) { m_timestampHasBeenSet = true; m_timestamp = value; }
60 inline ThingConnectivity& WithTimestamp(long long value) { SetTimestamp(value); return *this;}
62
64
69 inline const Aws::String& GetDisconnectReason() const { return m_disconnectReason; }
70 inline bool DisconnectReasonHasBeenSet() const { return m_disconnectReasonHasBeenSet; }
71 template<typename DisconnectReasonT = Aws::String>
72 void SetDisconnectReason(DisconnectReasonT&& value) { m_disconnectReasonHasBeenSet = true; m_disconnectReason = std::forward<DisconnectReasonT>(value); }
73 template<typename DisconnectReasonT = Aws::String>
74 ThingConnectivity& WithDisconnectReason(DisconnectReasonT&& value) { SetDisconnectReason(std::forward<DisconnectReasonT>(value)); return *this;}
76 private:
77
78 bool m_connected{false};
79 bool m_connectedHasBeenSet = false;
80
81 long long m_timestamp{0};
82 bool m_timestampHasBeenSet = false;
83
84 Aws::String m_disconnectReason;
85 bool m_disconnectReasonHasBeenSet = false;
86 };
87
88} // namespace Model
89} // namespace IoT
90} // namespace Aws
ThingConnectivity & WithDisconnectReason(DisconnectReasonT &&value)
AWS_IOT_API Aws::Utils::Json::JsonValue Jsonize() const
ThingConnectivity & WithTimestamp(long long value)
AWS_IOT_API ThingConnectivity(Aws::Utils::Json::JsonView jsonValue)
const Aws::String & GetDisconnectReason() const
ThingConnectivity & WithConnected(bool value)
void SetDisconnectReason(DisconnectReasonT &&value)
AWS_IOT_API ThingConnectivity()=default
AWS_IOT_API ThingConnectivity & operator=(Aws::Utils::Json::JsonView jsonValue)
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Aws::Utils::Json::JsonValue JsonValue