/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include namespace Aws { namespace Utils { namespace Json { class JsonValue; class JsonView; } // namespace Json } // namespace Utils namespace IoT { namespace Model { /** *

The connectivity status of the thing.

See Also:

AWS * API Reference

*/ class ThingConnectivity { public: AWS_IOT_API ThingConnectivity(); AWS_IOT_API ThingConnectivity(Aws::Utils::Json::JsonView jsonValue); AWS_IOT_API ThingConnectivity& operator=(Aws::Utils::Json::JsonView jsonValue); AWS_IOT_API Aws::Utils::Json::JsonValue Jsonize() const; /** *

True if the thing is connected to the Amazon Web Services IoT Core service; * false if it is not connected.

*/ inline bool GetConnected() const{ return m_connected; } /** *

True if the thing is connected to the Amazon Web Services IoT Core service; * false if it is not connected.

*/ inline bool ConnectedHasBeenSet() const { return m_connectedHasBeenSet; } /** *

True if the thing is connected to the Amazon Web Services IoT Core service; * false if it is not connected.

*/ inline void SetConnected(bool value) { m_connectedHasBeenSet = true; m_connected = value; } /** *

True if the thing is connected to the Amazon Web Services IoT Core service; * false if it is not connected.

*/ inline ThingConnectivity& WithConnected(bool value) { SetConnected(value); return *this;} /** *

The epoch time (in milliseconds) when the thing last connected or * disconnected. If the thing has been disconnected for approximately an hour, the * time value might be missing.

*/ inline long long GetTimestamp() const{ return m_timestamp; } /** *

The epoch time (in milliseconds) when the thing last connected or * disconnected. If the thing has been disconnected for approximately an hour, the * time value might be missing.

*/ inline bool TimestampHasBeenSet() const { return m_timestampHasBeenSet; } /** *

The epoch time (in milliseconds) when the thing last connected or * disconnected. If the thing has been disconnected for approximately an hour, the * time value might be missing.

*/ inline void SetTimestamp(long long value) { m_timestampHasBeenSet = true; m_timestamp = value; } /** *

The epoch time (in milliseconds) when the thing last connected or * disconnected. If the thing has been disconnected for approximately an hour, the * time value might be missing.

*/ inline ThingConnectivity& WithTimestamp(long long value) { SetTimestamp(value); return *this;} /** *

The reason why the client is disconnected. If the thing has been disconnected * for approximately an hour, the disconnectReason value might be * missing.

*/ inline const Aws::String& GetDisconnectReason() const{ return m_disconnectReason; } /** *

The reason why the client is disconnected. If the thing has been disconnected * for approximately an hour, the disconnectReason value might be * missing.

*/ inline bool DisconnectReasonHasBeenSet() const { return m_disconnectReasonHasBeenSet; } /** *

The reason why the client is disconnected. If the thing has been disconnected * for approximately an hour, the disconnectReason value might be * missing.

*/ inline void SetDisconnectReason(const Aws::String& value) { m_disconnectReasonHasBeenSet = true; m_disconnectReason = value; } /** *

The reason why the client is disconnected. If the thing has been disconnected * for approximately an hour, the disconnectReason value might be * missing.

*/ inline void SetDisconnectReason(Aws::String&& value) { m_disconnectReasonHasBeenSet = true; m_disconnectReason = std::move(value); } /** *

The reason why the client is disconnected. If the thing has been disconnected * for approximately an hour, the disconnectReason value might be * missing.

*/ inline void SetDisconnectReason(const char* value) { m_disconnectReasonHasBeenSet = true; m_disconnectReason.assign(value); } /** *

The reason why the client is disconnected. If the thing has been disconnected * for approximately an hour, the disconnectReason value might be * missing.

*/ inline ThingConnectivity& WithDisconnectReason(const Aws::String& value) { SetDisconnectReason(value); return *this;} /** *

The reason why the client is disconnected. If the thing has been disconnected * for approximately an hour, the disconnectReason value might be * missing.

*/ inline ThingConnectivity& WithDisconnectReason(Aws::String&& value) { SetDisconnectReason(std::move(value)); return *this;} /** *

The reason why the client is disconnected. If the thing has been disconnected * for approximately an hour, the disconnectReason value might be * missing.

*/ inline ThingConnectivity& WithDisconnectReason(const char* value) { SetDisconnectReason(value); return *this;} private: bool m_connected; bool m_connectedHasBeenSet = false; long long m_timestamp; bool m_timestampHasBeenSet = false; Aws::String m_disconnectReason; bool m_disconnectReasonHasBeenSet = false; }; } // namespace Model } // namespace IoT } // namespace Aws