AWS SDK for C++

AWS SDK for C++ Version 1.11.827

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
56 inline long long GetTimestamp() const { return m_timestamp; }
57 inline bool TimestampHasBeenSet() const { return m_timestampHasBeenSet; }
58 inline void SetTimestamp(long long value) {
59 m_timestampHasBeenSet = true;
60 m_timestamp = value;
61 }
62 inline ThingConnectivity& WithTimestamp(long long value) {
63 SetTimestamp(value);
64 return *this;
65 }
67
69
72 inline const Aws::String& GetDisconnectReason() const { return m_disconnectReason; }
73 inline bool DisconnectReasonHasBeenSet() const { return m_disconnectReasonHasBeenSet; }
74 template <typename DisconnectReasonT = Aws::String>
75 void SetDisconnectReason(DisconnectReasonT&& value) {
76 m_disconnectReasonHasBeenSet = true;
77 m_disconnectReason = std::forward<DisconnectReasonT>(value);
78 }
79 template <typename DisconnectReasonT = Aws::String>
80 ThingConnectivity& WithDisconnectReason(DisconnectReasonT&& value) {
81 SetDisconnectReason(std::forward<DisconnectReasonT>(value));
82 return *this;
83 }
85
87
91 inline int GetKeepAliveDuration() const { return m_keepAliveDuration; }
92 inline bool KeepAliveDurationHasBeenSet() const { return m_keepAliveDurationHasBeenSet; }
93 inline void SetKeepAliveDuration(int value) {
94 m_keepAliveDurationHasBeenSet = true;
95 m_keepAliveDuration = value;
96 }
99 return *this;
100 }
102
104
108 inline bool GetCleanSession() const { return m_cleanSession; }
109 inline bool CleanSessionHasBeenSet() const { return m_cleanSessionHasBeenSet; }
110 inline void SetCleanSession(bool value) {
111 m_cleanSessionHasBeenSet = true;
112 m_cleanSession = value;
113 }
115 SetCleanSession(value);
116 return *this;
117 }
119
121
126 inline long long GetSessionExpiry() const { return m_sessionExpiry; }
127 inline bool SessionExpiryHasBeenSet() const { return m_sessionExpiryHasBeenSet; }
128 inline void SetSessionExpiry(long long value) {
129 m_sessionExpiryHasBeenSet = true;
130 m_sessionExpiry = value;
131 }
132 inline ThingConnectivity& WithSessionExpiry(long long value) {
133 SetSessionExpiry(value);
134 return *this;
135 }
137
139
142 inline const Aws::String& GetClientId() const { return m_clientId; }
143 inline bool ClientIdHasBeenSet() const { return m_clientIdHasBeenSet; }
144 template <typename ClientIdT = Aws::String>
145 void SetClientId(ClientIdT&& value) {
146 m_clientIdHasBeenSet = true;
147 m_clientId = std::forward<ClientIdT>(value);
148 }
149 template <typename ClientIdT = Aws::String>
150 ThingConnectivity& WithClientId(ClientIdT&& value) {
151 SetClientId(std::forward<ClientIdT>(value));
152 return *this;
153 }
155 private:
156 bool m_connected{false};
157
158 long long m_timestamp{0};
159
160 Aws::String m_disconnectReason;
161
162 int m_keepAliveDuration{0};
163
164 bool m_cleanSession{false};
165
166 long long m_sessionExpiry{0};
167
168 Aws::String m_clientId;
169 bool m_connectedHasBeenSet = false;
170 bool m_timestampHasBeenSet = false;
171 bool m_disconnectReasonHasBeenSet = false;
172 bool m_keepAliveDurationHasBeenSet = false;
173 bool m_cleanSessionHasBeenSet = false;
174 bool m_sessionExpiryHasBeenSet = false;
175 bool m_clientIdHasBeenSet = false;
176};
177
178} // namespace Model
179} // namespace IoT
180} // 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