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

The output from the GetRetainedMessage operation.

See Also:

* AWS * API Reference

*/ class GetRetainedMessageResult { public: AWS_IOTDATAPLANE_API GetRetainedMessageResult(); AWS_IOTDATAPLANE_API GetRetainedMessageResult(const Aws::AmazonWebServiceResult& result); AWS_IOTDATAPLANE_API GetRetainedMessageResult& operator=(const Aws::AmazonWebServiceResult& result); /** *

The topic name to which the retained message was published.

*/ inline const Aws::String& GetTopic() const{ return m_topic; } /** *

The topic name to which the retained message was published.

*/ inline void SetTopic(const Aws::String& value) { m_topic = value; } /** *

The topic name to which the retained message was published.

*/ inline void SetTopic(Aws::String&& value) { m_topic = std::move(value); } /** *

The topic name to which the retained message was published.

*/ inline void SetTopic(const char* value) { m_topic.assign(value); } /** *

The topic name to which the retained message was published.

*/ inline GetRetainedMessageResult& WithTopic(const Aws::String& value) { SetTopic(value); return *this;} /** *

The topic name to which the retained message was published.

*/ inline GetRetainedMessageResult& WithTopic(Aws::String&& value) { SetTopic(std::move(value)); return *this;} /** *

The topic name to which the retained message was published.

*/ inline GetRetainedMessageResult& WithTopic(const char* value) { SetTopic(value); return *this;} /** *

The Base64-encoded message payload of the retained message body.

*/ inline const Aws::Utils::ByteBuffer& GetPayload() const{ return m_payload; } /** *

The Base64-encoded message payload of the retained message body.

*/ inline void SetPayload(const Aws::Utils::ByteBuffer& value) { m_payload = value; } /** *

The Base64-encoded message payload of the retained message body.

*/ inline void SetPayload(Aws::Utils::ByteBuffer&& value) { m_payload = std::move(value); } /** *

The Base64-encoded message payload of the retained message body.

*/ inline GetRetainedMessageResult& WithPayload(const Aws::Utils::ByteBuffer& value) { SetPayload(value); return *this;} /** *

The Base64-encoded message payload of the retained message body.

*/ inline GetRetainedMessageResult& WithPayload(Aws::Utils::ByteBuffer&& value) { SetPayload(std::move(value)); return *this;} /** *

The quality of service (QoS) level used to publish the retained message.

*/ inline int GetQos() const{ return m_qos; } /** *

The quality of service (QoS) level used to publish the retained message.

*/ inline void SetQos(int value) { m_qos = value; } /** *

The quality of service (QoS) level used to publish the retained message.

*/ inline GetRetainedMessageResult& WithQos(int value) { SetQos(value); return *this;} /** *

The Epoch date and time, in milliseconds, when the retained message was * stored by IoT.

*/ inline long long GetLastModifiedTime() const{ return m_lastModifiedTime; } /** *

The Epoch date and time, in milliseconds, when the retained message was * stored by IoT.

*/ inline void SetLastModifiedTime(long long value) { m_lastModifiedTime = value; } /** *

The Epoch date and time, in milliseconds, when the retained message was * stored by IoT.

*/ inline GetRetainedMessageResult& WithLastModifiedTime(long long value) { SetLastModifiedTime(value); return *this;} /** *

A base64-encoded JSON string that includes an array of JSON objects, or null * if the retained message doesn't include any user properties.

The * following example userProperties parameter is a JSON string that * represents two user properties. Note that it will be base64-encoded:

* [{"deviceName": "alpha"}, {"deviceCnt": "45"}]

*/ inline const Aws::Utils::ByteBuffer& GetUserProperties() const{ return m_userProperties; } /** *

A base64-encoded JSON string that includes an array of JSON objects, or null * if the retained message doesn't include any user properties.

The * following example userProperties parameter is a JSON string that * represents two user properties. Note that it will be base64-encoded:

* [{"deviceName": "alpha"}, {"deviceCnt": "45"}]

*/ inline void SetUserProperties(const Aws::Utils::ByteBuffer& value) { m_userProperties = value; } /** *

A base64-encoded JSON string that includes an array of JSON objects, or null * if the retained message doesn't include any user properties.

The * following example userProperties parameter is a JSON string that * represents two user properties. Note that it will be base64-encoded:

* [{"deviceName": "alpha"}, {"deviceCnt": "45"}]

*/ inline void SetUserProperties(Aws::Utils::ByteBuffer&& value) { m_userProperties = std::move(value); } /** *

A base64-encoded JSON string that includes an array of JSON objects, or null * if the retained message doesn't include any user properties.

The * following example userProperties parameter is a JSON string that * represents two user properties. Note that it will be base64-encoded:

* [{"deviceName": "alpha"}, {"deviceCnt": "45"}]

*/ inline GetRetainedMessageResult& WithUserProperties(const Aws::Utils::ByteBuffer& value) { SetUserProperties(value); return *this;} /** *

A base64-encoded JSON string that includes an array of JSON objects, or null * if the retained message doesn't include any user properties.

The * following example userProperties parameter is a JSON string that * represents two user properties. Note that it will be base64-encoded:

* [{"deviceName": "alpha"}, {"deviceCnt": "45"}]

*/ inline GetRetainedMessageResult& WithUserProperties(Aws::Utils::ByteBuffer&& value) { SetUserProperties(std::move(value)); return *this;} inline const Aws::String& GetRequestId() const{ return m_requestId; } inline void SetRequestId(const Aws::String& value) { m_requestId = value; } inline void SetRequestId(Aws::String&& value) { m_requestId = std::move(value); } inline void SetRequestId(const char* value) { m_requestId.assign(value); } inline GetRetainedMessageResult& WithRequestId(const Aws::String& value) { SetRequestId(value); return *this;} inline GetRetainedMessageResult& WithRequestId(Aws::String&& value) { SetRequestId(std::move(value)); return *this;} inline GetRetainedMessageResult& WithRequestId(const char* value) { SetRequestId(value); return *this;} private: Aws::String m_topic; Aws::Utils::ByteBuffer m_payload; int m_qos; long long m_lastModifiedTime; Aws::Utils::ByteBuffer m_userProperties; Aws::String m_requestId; }; } // namespace Model } // namespace IoTDataPlane } // namespace Aws