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

The input for the Publish operation.

See Also:

AWS * API Reference

*/ class AWS_IOTDATAPLANE_API PublishRequest : public StreamingIoTDataPlaneRequest { public: PublishRequest(); // Service request name is the Operation name which will send this request out, // each operation should has unique request name, so that we can get operation's name from this request. // Note: this is not true for response, multiple operations may have the same response name, // so we can not get operation's name from response. inline virtual const char* GetServiceRequestName() const override { return "Publish"; } void AddQueryStringParameters(Aws::Http::URI& uri) const override; /** *

The name of the MQTT topic.

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

The name of the MQTT topic.

*/ inline bool TopicHasBeenSet() const { return m_topicHasBeenSet; } /** *

The name of the MQTT topic.

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

The name of the MQTT topic.

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

The name of the MQTT topic.

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

The name of the MQTT topic.

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

The name of the MQTT topic.

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

The name of the MQTT topic.

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

The Quality of Service (QoS) level.

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

The Quality of Service (QoS) level.

*/ inline bool QosHasBeenSet() const { return m_qosHasBeenSet; } /** *

The Quality of Service (QoS) level.

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

The Quality of Service (QoS) level.

*/ inline PublishRequest& WithQos(int value) { SetQos(value); return *this;} private: Aws::String m_topic; bool m_topicHasBeenSet; int m_qos; bool m_qosHasBeenSet; }; } // namespace Model } // namespace IoTDataPlane } // namespace Aws