AWS SDK for C++

AWS SDK for C++ Version 1.11.816

Loading...
Searching...
No Matches
ThingConnectivity.h
1
6#pragma once
7#include <aws/core/utils/memory/stl/AWSString.h>
8#include <aws/iot/IoT_EXPORTS.h>
9
10#include <utility>
11
12namespace Aws {
13namespace Utils {
14namespace Json {
15class JsonValue;
16class JsonView;
17} // namespace Json
18} // namespace Utils
19namespace IoT {
20namespace Model {
21
28 public:
29 AWS_IOT_API ThingConnectivity() = default;
33
35
39 inline bool GetConnected() const { return m_connected; }
40 inline bool ConnectedHasBeenSet() const { return m_connectedHasBeenSet; }
41 inline void SetConnected(bool value) {
42 m_connectedHasBeenSet = true;
43 m_connected = value;
44 }
45 inline ThingConnectivity& WithConnected(bool value) {
46 SetConnected(value);
47 return *this;
48 }
50
52
60 inline long long GetTimestamp() const { return m_timestamp; }
61 inline bool TimestampHasBeenSet() const { return m_timestampHasBeenSet; }
62 inline void SetTimestamp(long long value) {
63 m_timestampHasBeenSet = true;
64 m_timestamp = value;
65 }
66 inline ThingConnectivity& WithTimestamp(long long value) {
67 SetTimestamp(value);
68 return *this;
69 }
71
73
78 inline const Aws::String& GetDisconnectReason() const { return m_disconnectReason; }
79 inline bool DisconnectReasonHasBeenSet() const { return m_disconnectReasonHasBeenSet; }
80 template <typename DisconnectReasonT = Aws::String>
81 void SetDisconnectReason(DisconnectReasonT&& value) {
82 m_disconnectReasonHasBeenSet = true;
83 m_disconnectReason = std::forward<DisconnectReasonT>(value);
84 }
85 template <typename DisconnectReasonT = Aws::String>
86 ThingConnectivity& WithDisconnectReason(DisconnectReasonT&& value) {
87 SetDisconnectReason(std::forward<DisconnectReasonT>(value));
88 return *this;
89 }
91
93
97 inline int GetKeepAliveDuration() const { return m_keepAliveDuration; }
98 inline bool KeepAliveDurationHasBeenSet() const { return m_keepAliveDurationHasBeenSet; }
99 inline void SetKeepAliveDuration(int value) {
100 m_keepAliveDurationHasBeenSet = true;
101 m_keepAliveDuration = value;
102 }
105 return *this;
106 }
108
110
114 inline bool GetCleanSession() const { return m_cleanSession; }
115 inline bool CleanSessionHasBeenSet() const { return m_cleanSessionHasBeenSet; }
116 inline void SetCleanSession(bool value) {
117 m_cleanSessionHasBeenSet = true;
118 m_cleanSession = value;
119 }
121 SetCleanSession(value);
122 return *this;
123 }
125
127
132 inline long long GetSessionExpiry() const { return m_sessionExpiry; }
133 inline bool SessionExpiryHasBeenSet() const { return m_sessionExpiryHasBeenSet; }
134 inline void SetSessionExpiry(long long value) {
135 m_sessionExpiryHasBeenSet = true;
136 m_sessionExpiry = value;
137 }
138 inline ThingConnectivity& WithSessionExpiry(long long value) {
139 SetSessionExpiry(value);
140 return *this;
141 }
143
145
148 inline const Aws::String& GetClientId() const { return m_clientId; }
149 inline bool ClientIdHasBeenSet() const { return m_clientIdHasBeenSet; }
150 template <typename ClientIdT = Aws::String>
151 void SetClientId(ClientIdT&& value) {
152 m_clientIdHasBeenSet = true;
153 m_clientId = std::forward<ClientIdT>(value);
154 }
155 template <typename ClientIdT = Aws::String>
156 ThingConnectivity& WithClientId(ClientIdT&& value) {
157 SetClientId(std::forward<ClientIdT>(value));
158 return *this;
159 }
161 private:
162 bool m_connected{false};
163
164 long long m_timestamp{0};
165
166 Aws::String m_disconnectReason;
167
168 int m_keepAliveDuration{0};
169
170 bool m_cleanSession{false};
171
172 long long m_sessionExpiry{0};
173
174 Aws::String m_clientId;
175 bool m_connectedHasBeenSet = false;
176 bool m_timestampHasBeenSet = false;
177 bool m_disconnectReasonHasBeenSet = false;
178 bool m_keepAliveDurationHasBeenSet = false;
179 bool m_cleanSessionHasBeenSet = false;
180 bool m_sessionExpiryHasBeenSet = false;
181 bool m_clientIdHasBeenSet = false;
182};
183
184} // namespace Model
185} // namespace IoT
186} // namespace Aws
ThingConnectivity & WithKeepAliveDuration(int value)
ThingConnectivity & WithDisconnectReason(DisconnectReasonT &&value)
AWS_IOT_API Aws::Utils::Json::JsonValue Jsonize() const
ThingConnectivity & WithCleanSession(bool value)
ThingConnectivity & WithTimestamp(long long value)
AWS_IOT_API ThingConnectivity(Aws::Utils::Json::JsonView jsonValue)
ThingConnectivity & WithClientId(ClientIdT &&value)
const Aws::String & GetDisconnectReason() const
const Aws::String & GetClientId() const
ThingConnectivity & WithConnected(bool value)
ThingConnectivity & WithSessionExpiry(long long 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