AWS SDK for C++

AWS SDK for C++ Version 1.11.764

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
57 inline long long GetTimestamp() const { return m_timestamp; }
58 inline bool TimestampHasBeenSet() const { return m_timestampHasBeenSet; }
59 inline void SetTimestamp(long long value) {
60 m_timestampHasBeenSet = true;
61 m_timestamp = value;
62 }
63 inline ThingConnectivity& WithTimestamp(long long value) {
64 SetTimestamp(value);
65 return *this;
66 }
68
70
75 inline const Aws::String& GetDisconnectReason() const { return m_disconnectReason; }
76 inline bool DisconnectReasonHasBeenSet() const { return m_disconnectReasonHasBeenSet; }
77 template <typename DisconnectReasonT = Aws::String>
78 void SetDisconnectReason(DisconnectReasonT&& value) {
79 m_disconnectReasonHasBeenSet = true;
80 m_disconnectReason = std::forward<DisconnectReasonT>(value);
81 }
82 template <typename DisconnectReasonT = Aws::String>
83 ThingConnectivity& WithDisconnectReason(DisconnectReasonT&& value) {
84 SetDisconnectReason(std::forward<DisconnectReasonT>(value));
85 return *this;
86 }
88 private:
89 bool m_connected{false};
90
91 long long m_timestamp{0};
92
93 Aws::String m_disconnectReason;
94 bool m_connectedHasBeenSet = false;
95 bool m_timestampHasBeenSet = false;
96 bool m_disconnectReasonHasBeenSet = false;
97};
98
99} // namespace Model
100} // namespace IoT
101} // 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