AWS SDK for C++

AWS SDK for C++ Version 1.11.607

Loading...
Searching...
No Matches
TopicRule.h
1
6#pragma once
7#include <aws/iot/IoT_EXPORTS.h>
8#include <aws/core/utils/memory/stl/AWSString.h>
9#include <aws/core/utils/DateTime.h>
10#include <aws/core/utils/memory/stl/AWSVector.h>
11#include <aws/iot/model/Action.h>
12#include <utility>
13
14namespace Aws
15{
16namespace Utils
17{
18namespace Json
19{
20 class JsonValue;
21 class JsonView;
22} // namespace Json
23} // namespace Utils
24namespace IoT
25{
26namespace Model
27{
28
35 {
36 public:
37 AWS_IOT_API TopicRule() = default;
38 AWS_IOT_API TopicRule(Aws::Utils::Json::JsonView jsonValue);
41
42
44
47 inline const Aws::String& GetRuleName() const { return m_ruleName; }
48 inline bool RuleNameHasBeenSet() const { return m_ruleNameHasBeenSet; }
49 template<typename RuleNameT = Aws::String>
50 void SetRuleName(RuleNameT&& value) { m_ruleNameHasBeenSet = true; m_ruleName = std::forward<RuleNameT>(value); }
51 template<typename RuleNameT = Aws::String>
52 TopicRule& WithRuleName(RuleNameT&& value) { SetRuleName(std::forward<RuleNameT>(value)); return *this;}
54
56
60 inline const Aws::String& GetSql() const { return m_sql; }
61 inline bool SqlHasBeenSet() const { return m_sqlHasBeenSet; }
62 template<typename SqlT = Aws::String>
63 void SetSql(SqlT&& value) { m_sqlHasBeenSet = true; m_sql = std::forward<SqlT>(value); }
64 template<typename SqlT = Aws::String>
65 TopicRule& WithSql(SqlT&& value) { SetSql(std::forward<SqlT>(value)); return *this;}
67
69
72 inline const Aws::String& GetDescription() const { return m_description; }
73 inline bool DescriptionHasBeenSet() const { return m_descriptionHasBeenSet; }
74 template<typename DescriptionT = Aws::String>
75 void SetDescription(DescriptionT&& value) { m_descriptionHasBeenSet = true; m_description = std::forward<DescriptionT>(value); }
76 template<typename DescriptionT = Aws::String>
77 TopicRule& WithDescription(DescriptionT&& value) { SetDescription(std::forward<DescriptionT>(value)); return *this;}
79
81
84 inline const Aws::Utils::DateTime& GetCreatedAt() const { return m_createdAt; }
85 inline bool CreatedAtHasBeenSet() const { return m_createdAtHasBeenSet; }
86 template<typename CreatedAtT = Aws::Utils::DateTime>
87 void SetCreatedAt(CreatedAtT&& value) { m_createdAtHasBeenSet = true; m_createdAt = std::forward<CreatedAtT>(value); }
88 template<typename CreatedAtT = Aws::Utils::DateTime>
89 TopicRule& WithCreatedAt(CreatedAtT&& value) { SetCreatedAt(std::forward<CreatedAtT>(value)); return *this;}
91
93
96 inline const Aws::Vector<Action>& GetActions() const { return m_actions; }
97 inline bool ActionsHasBeenSet() const { return m_actionsHasBeenSet; }
98 template<typename ActionsT = Aws::Vector<Action>>
99 void SetActions(ActionsT&& value) { m_actionsHasBeenSet = true; m_actions = std::forward<ActionsT>(value); }
100 template<typename ActionsT = Aws::Vector<Action>>
101 TopicRule& WithActions(ActionsT&& value) { SetActions(std::forward<ActionsT>(value)); return *this;}
102 template<typename ActionsT = Action>
103 TopicRule& AddActions(ActionsT&& value) { m_actionsHasBeenSet = true; m_actions.emplace_back(std::forward<ActionsT>(value)); return *this; }
105
107
110 inline bool GetRuleDisabled() const { return m_ruleDisabled; }
111 inline bool RuleDisabledHasBeenSet() const { return m_ruleDisabledHasBeenSet; }
112 inline void SetRuleDisabled(bool value) { m_ruleDisabledHasBeenSet = true; m_ruleDisabled = value; }
113 inline TopicRule& WithRuleDisabled(bool value) { SetRuleDisabled(value); return *this;}
115
117
120 inline const Aws::String& GetAwsIotSqlVersion() const { return m_awsIotSqlVersion; }
121 inline bool AwsIotSqlVersionHasBeenSet() const { return m_awsIotSqlVersionHasBeenSet; }
122 template<typename AwsIotSqlVersionT = Aws::String>
123 void SetAwsIotSqlVersion(AwsIotSqlVersionT&& value) { m_awsIotSqlVersionHasBeenSet = true; m_awsIotSqlVersion = std::forward<AwsIotSqlVersionT>(value); }
124 template<typename AwsIotSqlVersionT = Aws::String>
125 TopicRule& WithAwsIotSqlVersion(AwsIotSqlVersionT&& value) { SetAwsIotSqlVersion(std::forward<AwsIotSqlVersionT>(value)); return *this;}
127
129
132 inline const Action& GetErrorAction() const { return m_errorAction; }
133 inline bool ErrorActionHasBeenSet() const { return m_errorActionHasBeenSet; }
134 template<typename ErrorActionT = Action>
135 void SetErrorAction(ErrorActionT&& value) { m_errorActionHasBeenSet = true; m_errorAction = std::forward<ErrorActionT>(value); }
136 template<typename ErrorActionT = Action>
137 TopicRule& WithErrorAction(ErrorActionT&& value) { SetErrorAction(std::forward<ErrorActionT>(value)); return *this;}
139 private:
140
141 Aws::String m_ruleName;
142 bool m_ruleNameHasBeenSet = false;
143
144 Aws::String m_sql;
145 bool m_sqlHasBeenSet = false;
146
147 Aws::String m_description;
148 bool m_descriptionHasBeenSet = false;
149
150 Aws::Utils::DateTime m_createdAt{};
151 bool m_createdAtHasBeenSet = false;
152
153 Aws::Vector<Action> m_actions;
154 bool m_actionsHasBeenSet = false;
155
156 bool m_ruleDisabled{false};
157 bool m_ruleDisabledHasBeenSet = false;
158
159 Aws::String m_awsIotSqlVersion;
160 bool m_awsIotSqlVersionHasBeenSet = false;
161
162 Action m_errorAction;
163 bool m_errorActionHasBeenSet = false;
164 };
165
166} // namespace Model
167} // namespace IoT
168} // namespace Aws
bool DescriptionHasBeenSet() const
Definition TopicRule.h:73
bool CreatedAtHasBeenSet() const
Definition TopicRule.h:85
bool ActionsHasBeenSet() const
Definition TopicRule.h:97
bool GetRuleDisabled() const
Definition TopicRule.h:110
AWS_IOT_API Aws::Utils::Json::JsonValue Jsonize() const
TopicRule & WithAwsIotSqlVersion(AwsIotSqlVersionT &&value)
Definition TopicRule.h:125
void SetSql(SqlT &&value)
Definition TopicRule.h:63
TopicRule & WithCreatedAt(CreatedAtT &&value)
Definition TopicRule.h:89
void SetCreatedAt(CreatedAtT &&value)
Definition TopicRule.h:87
void SetRuleName(RuleNameT &&value)
Definition TopicRule.h:50
AWS_IOT_API TopicRule & operator=(Aws::Utils::Json::JsonView jsonValue)
void SetDescription(DescriptionT &&value)
Definition TopicRule.h:75
TopicRule & WithActions(ActionsT &&value)
Definition TopicRule.h:101
void SetAwsIotSqlVersion(AwsIotSqlVersionT &&value)
Definition TopicRule.h:123
const Aws::Utils::DateTime & GetCreatedAt() const
Definition TopicRule.h:84
TopicRule & AddActions(ActionsT &&value)
Definition TopicRule.h:103
const Aws::String & GetDescription() const
Definition TopicRule.h:72
TopicRule & WithErrorAction(ErrorActionT &&value)
Definition TopicRule.h:137
const Aws::Vector< Action > & GetActions() const
Definition TopicRule.h:96
TopicRule & WithDescription(DescriptionT &&value)
Definition TopicRule.h:77
bool RuleDisabledHasBeenSet() const
Definition TopicRule.h:111
const Action & GetErrorAction() const
Definition TopicRule.h:132
void SetErrorAction(ErrorActionT &&value)
Definition TopicRule.h:135
AWS_IOT_API TopicRule()=default
bool AwsIotSqlVersionHasBeenSet() const
Definition TopicRule.h:121
TopicRule & WithSql(SqlT &&value)
Definition TopicRule.h:65
TopicRule & WithRuleDisabled(bool value)
Definition TopicRule.h:113
void SetRuleDisabled(bool value)
Definition TopicRule.h:112
const Aws::String & GetSql() const
Definition TopicRule.h:60
void SetActions(ActionsT &&value)
Definition TopicRule.h:99
bool SqlHasBeenSet() const
Definition TopicRule.h:61
const Aws::String & GetRuleName() const
Definition TopicRule.h:47
bool ErrorActionHasBeenSet() const
Definition TopicRule.h:133
const Aws::String & GetAwsIotSqlVersion() const
Definition TopicRule.h:120
AWS_IOT_API TopicRule(Aws::Utils::Json::JsonView jsonValue)
bool RuleNameHasBeenSet() const
Definition TopicRule.h:48
TopicRule & WithRuleName(RuleNameT &&value)
Definition TopicRule.h:52
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector
Aws::Utils::Json::JsonValue JsonValue