/** * 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 IoT { namespace Model { /** *

Describes an action to republish to another topic.

See Also:

* AWS * API Reference

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

The ARN of the IAM role that grants access.

*/ inline const Aws::String& GetRoleArn() const{ return m_roleArn; } /** *

The ARN of the IAM role that grants access.

*/ inline bool RoleArnHasBeenSet() const { return m_roleArnHasBeenSet; } /** *

The ARN of the IAM role that grants access.

*/ inline void SetRoleArn(const Aws::String& value) { m_roleArnHasBeenSet = true; m_roleArn = value; } /** *

The ARN of the IAM role that grants access.

*/ inline void SetRoleArn(Aws::String&& value) { m_roleArnHasBeenSet = true; m_roleArn = std::move(value); } /** *

The ARN of the IAM role that grants access.

*/ inline void SetRoleArn(const char* value) { m_roleArnHasBeenSet = true; m_roleArn.assign(value); } /** *

The ARN of the IAM role that grants access.

*/ inline RepublishAction& WithRoleArn(const Aws::String& value) { SetRoleArn(value); return *this;} /** *

The ARN of the IAM role that grants access.

*/ inline RepublishAction& WithRoleArn(Aws::String&& value) { SetRoleArn(std::move(value)); return *this;} /** *

The ARN of the IAM role that grants access.

*/ inline RepublishAction& WithRoleArn(const char* value) { SetRoleArn(value); return *this;} /** *

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 RepublishAction& WithTopic(const Aws::String& value) { SetTopic(value); return *this;} /** *

The name of the MQTT topic.

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

The name of the MQTT topic.

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

The Quality of Service (QoS) level to use when republishing messages. The * default value is 0.

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

The Quality of Service (QoS) level to use when republishing messages. The * default value is 0.

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

The Quality of Service (QoS) level to use when republishing messages. The * default value is 0.

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

The Quality of Service (QoS) level to use when republishing messages. The * default value is 0.

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

MQTT Version 5.0 headers information. For more information, see MQTT * from the Amazon Web Services IoT Core Developer Guide.

*/ inline const MqttHeaders& GetHeaders() const{ return m_headers; } /** *

MQTT Version 5.0 headers information. For more information, see MQTT * from the Amazon Web Services IoT Core Developer Guide.

*/ inline bool HeadersHasBeenSet() const { return m_headersHasBeenSet; } /** *

MQTT Version 5.0 headers information. For more information, see MQTT * from the Amazon Web Services IoT Core Developer Guide.

*/ inline void SetHeaders(const MqttHeaders& value) { m_headersHasBeenSet = true; m_headers = value; } /** *

MQTT Version 5.0 headers information. For more information, see MQTT * from the Amazon Web Services IoT Core Developer Guide.

*/ inline void SetHeaders(MqttHeaders&& value) { m_headersHasBeenSet = true; m_headers = std::move(value); } /** *

MQTT Version 5.0 headers information. For more information, see MQTT * from the Amazon Web Services IoT Core Developer Guide.

*/ inline RepublishAction& WithHeaders(const MqttHeaders& value) { SetHeaders(value); return *this;} /** *

MQTT Version 5.0 headers information. For more information, see MQTT * from the Amazon Web Services IoT Core Developer Guide.

*/ inline RepublishAction& WithHeaders(MqttHeaders&& value) { SetHeaders(std::move(value)); return *this;} private: Aws::String m_roleArn; bool m_roleArnHasBeenSet = false; Aws::String m_topic; bool m_topicHasBeenSet = false; int m_qos; bool m_qosHasBeenSet = false; MqttHeaders m_headers; bool m_headersHasBeenSet = false; }; } // namespace Model } // namespace IoT } // namespace Aws