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

Information required to publish the MQTT message through the AWS IoT message * broker.

See Also:

AWS * API Reference

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

The MQTT topic of the message. You can use a string expression that includes * variables ($variable.<variable-name>) and input values * ($input.<input-name>.<path-to-datum>) as the topic * string.

*/ inline const Aws::String& GetMqttTopic() const{ return m_mqttTopic; } /** *

The MQTT topic of the message. You can use a string expression that includes * variables ($variable.<variable-name>) and input values * ($input.<input-name>.<path-to-datum>) as the topic * string.

*/ inline bool MqttTopicHasBeenSet() const { return m_mqttTopicHasBeenSet; } /** *

The MQTT topic of the message. You can use a string expression that includes * variables ($variable.<variable-name>) and input values * ($input.<input-name>.<path-to-datum>) as the topic * string.

*/ inline void SetMqttTopic(const Aws::String& value) { m_mqttTopicHasBeenSet = true; m_mqttTopic = value; } /** *

The MQTT topic of the message. You can use a string expression that includes * variables ($variable.<variable-name>) and input values * ($input.<input-name>.<path-to-datum>) as the topic * string.

*/ inline void SetMqttTopic(Aws::String&& value) { m_mqttTopicHasBeenSet = true; m_mqttTopic = std::move(value); } /** *

The MQTT topic of the message. You can use a string expression that includes * variables ($variable.<variable-name>) and input values * ($input.<input-name>.<path-to-datum>) as the topic * string.

*/ inline void SetMqttTopic(const char* value) { m_mqttTopicHasBeenSet = true; m_mqttTopic.assign(value); } /** *

The MQTT topic of the message. You can use a string expression that includes * variables ($variable.<variable-name>) and input values * ($input.<input-name>.<path-to-datum>) as the topic * string.

*/ inline IotTopicPublishAction& WithMqttTopic(const Aws::String& value) { SetMqttTopic(value); return *this;} /** *

The MQTT topic of the message. You can use a string expression that includes * variables ($variable.<variable-name>) and input values * ($input.<input-name>.<path-to-datum>) as the topic * string.

*/ inline IotTopicPublishAction& WithMqttTopic(Aws::String&& value) { SetMqttTopic(std::move(value)); return *this;} /** *

The MQTT topic of the message. You can use a string expression that includes * variables ($variable.<variable-name>) and input values * ($input.<input-name>.<path-to-datum>) as the topic * string.

*/ inline IotTopicPublishAction& WithMqttTopic(const char* value) { SetMqttTopic(value); return *this;} /** *

You can configure the action payload when you publish a message to an AWS IoT * Core topic.

*/ inline const Payload& GetPayload() const{ return m_payload; } /** *

You can configure the action payload when you publish a message to an AWS IoT * Core topic.

*/ inline bool PayloadHasBeenSet() const { return m_payloadHasBeenSet; } /** *

You can configure the action payload when you publish a message to an AWS IoT * Core topic.

*/ inline void SetPayload(const Payload& value) { m_payloadHasBeenSet = true; m_payload = value; } /** *

You can configure the action payload when you publish a message to an AWS IoT * Core topic.

*/ inline void SetPayload(Payload&& value) { m_payloadHasBeenSet = true; m_payload = std::move(value); } /** *

You can configure the action payload when you publish a message to an AWS IoT * Core topic.

*/ inline IotTopicPublishAction& WithPayload(const Payload& value) { SetPayload(value); return *this;} /** *

You can configure the action payload when you publish a message to an AWS IoT * Core topic.

*/ inline IotTopicPublishAction& WithPayload(Payload&& value) { SetPayload(std::move(value)); return *this;} private: Aws::String m_mqttTopic; bool m_mqttTopicHasBeenSet = false; Payload m_payload; bool m_payloadHasBeenSet = false; }; } // namespace Model } // namespace IoTEvents } // namespace Aws