/** * 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 Utils { namespace Json { class JsonValue; class JsonView; } // namespace Json } // namespace Utils namespace IoT { namespace Model { /** *

Describes a rule.

See Also:

AWS * API Reference

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

The SQL statement used to query the topic. For more information, see IoT * SQL Reference in the IoT Developer Guide.

*/ inline const Aws::String& GetSql() const{ return m_sql; } /** *

The SQL statement used to query the topic. For more information, see IoT * SQL Reference in the IoT Developer Guide.

*/ inline bool SqlHasBeenSet() const { return m_sqlHasBeenSet; } /** *

The SQL statement used to query the topic. For more information, see IoT * SQL Reference in the IoT Developer Guide.

*/ inline void SetSql(const Aws::String& value) { m_sqlHasBeenSet = true; m_sql = value; } /** *

The SQL statement used to query the topic. For more information, see IoT * SQL Reference in the IoT Developer Guide.

*/ inline void SetSql(Aws::String&& value) { m_sqlHasBeenSet = true; m_sql = std::move(value); } /** *

The SQL statement used to query the topic. For more information, see IoT * SQL Reference in the IoT Developer Guide.

*/ inline void SetSql(const char* value) { m_sqlHasBeenSet = true; m_sql.assign(value); } /** *

The SQL statement used to query the topic. For more information, see IoT * SQL Reference in the IoT Developer Guide.

*/ inline TopicRulePayload& WithSql(const Aws::String& value) { SetSql(value); return *this;} /** *

The SQL statement used to query the topic. For more information, see IoT * SQL Reference in the IoT Developer Guide.

*/ inline TopicRulePayload& WithSql(Aws::String&& value) { SetSql(std::move(value)); return *this;} /** *

The SQL statement used to query the topic. For more information, see IoT * SQL Reference in the IoT Developer Guide.

*/ inline TopicRulePayload& WithSql(const char* value) { SetSql(value); return *this;} /** *

The description of the rule.

*/ inline const Aws::String& GetDescription() const{ return m_description; } /** *

The description of the rule.

*/ inline bool DescriptionHasBeenSet() const { return m_descriptionHasBeenSet; } /** *

The description of the rule.

*/ inline void SetDescription(const Aws::String& value) { m_descriptionHasBeenSet = true; m_description = value; } /** *

The description of the rule.

*/ inline void SetDescription(Aws::String&& value) { m_descriptionHasBeenSet = true; m_description = std::move(value); } /** *

The description of the rule.

*/ inline void SetDescription(const char* value) { m_descriptionHasBeenSet = true; m_description.assign(value); } /** *

The description of the rule.

*/ inline TopicRulePayload& WithDescription(const Aws::String& value) { SetDescription(value); return *this;} /** *

The description of the rule.

*/ inline TopicRulePayload& WithDescription(Aws::String&& value) { SetDescription(std::move(value)); return *this;} /** *

The description of the rule.

*/ inline TopicRulePayload& WithDescription(const char* value) { SetDescription(value); return *this;} /** *

The actions associated with the rule.

*/ inline const Aws::Vector& GetActions() const{ return m_actions; } /** *

The actions associated with the rule.

*/ inline bool ActionsHasBeenSet() const { return m_actionsHasBeenSet; } /** *

The actions associated with the rule.

*/ inline void SetActions(const Aws::Vector& value) { m_actionsHasBeenSet = true; m_actions = value; } /** *

The actions associated with the rule.

*/ inline void SetActions(Aws::Vector&& value) { m_actionsHasBeenSet = true; m_actions = std::move(value); } /** *

The actions associated with the rule.

*/ inline TopicRulePayload& WithActions(const Aws::Vector& value) { SetActions(value); return *this;} /** *

The actions associated with the rule.

*/ inline TopicRulePayload& WithActions(Aws::Vector&& value) { SetActions(std::move(value)); return *this;} /** *

The actions associated with the rule.

*/ inline TopicRulePayload& AddActions(const Action& value) { m_actionsHasBeenSet = true; m_actions.push_back(value); return *this; } /** *

The actions associated with the rule.

*/ inline TopicRulePayload& AddActions(Action&& value) { m_actionsHasBeenSet = true; m_actions.push_back(std::move(value)); return *this; } /** *

Specifies whether the rule is disabled.

*/ inline bool GetRuleDisabled() const{ return m_ruleDisabled; } /** *

Specifies whether the rule is disabled.

*/ inline bool RuleDisabledHasBeenSet() const { return m_ruleDisabledHasBeenSet; } /** *

Specifies whether the rule is disabled.

*/ inline void SetRuleDisabled(bool value) { m_ruleDisabledHasBeenSet = true; m_ruleDisabled = value; } /** *

Specifies whether the rule is disabled.

*/ inline TopicRulePayload& WithRuleDisabled(bool value) { SetRuleDisabled(value); return *this;} /** *

The version of the SQL rules engine to use when evaluating the rule.

*/ inline const Aws::String& GetAwsIotSqlVersion() const{ return m_awsIotSqlVersion; } /** *

The version of the SQL rules engine to use when evaluating the rule.

*/ inline bool AwsIotSqlVersionHasBeenSet() const { return m_awsIotSqlVersionHasBeenSet; } /** *

The version of the SQL rules engine to use when evaluating the rule.

*/ inline void SetAwsIotSqlVersion(const Aws::String& value) { m_awsIotSqlVersionHasBeenSet = true; m_awsIotSqlVersion = value; } /** *

The version of the SQL rules engine to use when evaluating the rule.

*/ inline void SetAwsIotSqlVersion(Aws::String&& value) { m_awsIotSqlVersionHasBeenSet = true; m_awsIotSqlVersion = std::move(value); } /** *

The version of the SQL rules engine to use when evaluating the rule.

*/ inline void SetAwsIotSqlVersion(const char* value) { m_awsIotSqlVersionHasBeenSet = true; m_awsIotSqlVersion.assign(value); } /** *

The version of the SQL rules engine to use when evaluating the rule.

*/ inline TopicRulePayload& WithAwsIotSqlVersion(const Aws::String& value) { SetAwsIotSqlVersion(value); return *this;} /** *

The version of the SQL rules engine to use when evaluating the rule.

*/ inline TopicRulePayload& WithAwsIotSqlVersion(Aws::String&& value) { SetAwsIotSqlVersion(std::move(value)); return *this;} /** *

The version of the SQL rules engine to use when evaluating the rule.

*/ inline TopicRulePayload& WithAwsIotSqlVersion(const char* value) { SetAwsIotSqlVersion(value); return *this;} /** *

The action to take when an error occurs.

*/ inline const Action& GetErrorAction() const{ return m_errorAction; } /** *

The action to take when an error occurs.

*/ inline bool ErrorActionHasBeenSet() const { return m_errorActionHasBeenSet; } /** *

The action to take when an error occurs.

*/ inline void SetErrorAction(const Action& value) { m_errorActionHasBeenSet = true; m_errorAction = value; } /** *

The action to take when an error occurs.

*/ inline void SetErrorAction(Action&& value) { m_errorActionHasBeenSet = true; m_errorAction = std::move(value); } /** *

The action to take when an error occurs.

*/ inline TopicRulePayload& WithErrorAction(const Action& value) { SetErrorAction(value); return *this;} /** *

The action to take when an error occurs.

*/ inline TopicRulePayload& WithErrorAction(Action&& value) { SetErrorAction(std::move(value)); return *this;} private: Aws::String m_sql; bool m_sqlHasBeenSet = false; Aws::String m_description; bool m_descriptionHasBeenSet = false; Aws::Vector m_actions; bool m_actionsHasBeenSet = false; bool m_ruleDisabled; bool m_ruleDisabledHasBeenSet = false; Aws::String m_awsIotSqlVersion; bool m_awsIotSqlVersionHasBeenSet = false; Action m_errorAction; bool m_errorActionHasBeenSet = false; }; } // namespace Model } // namespace IoT } // namespace Aws