AWS SDK for C++

AWS SDK for C++ Version 1.11.763

Loading...
Searching...
No Matches
TopicRule.h
1
6#pragma once
7#include <aws/core/utils/DateTime.h>
8#include <aws/core/utils/memory/stl/AWSString.h>
9#include <aws/core/utils/memory/stl/AWSVector.h>
10#include <aws/iot/IoT_EXPORTS.h>
11#include <aws/iot/model/Action.h>
12
13#include <utility>
14
15namespace Aws {
16namespace Utils {
17namespace Json {
18class JsonValue;
19class JsonView;
20} // namespace Json
21} // namespace Utils
22namespace IoT {
23namespace Model {
24
30class TopicRule {
31 public:
32 AWS_IOT_API TopicRule() = default;
33 AWS_IOT_API TopicRule(Aws::Utils::Json::JsonView jsonValue);
36
38
41 inline const Aws::String& GetRuleName() const { return m_ruleName; }
42 inline bool RuleNameHasBeenSet() const { return m_ruleNameHasBeenSet; }
43 template <typename RuleNameT = Aws::String>
44 void SetRuleName(RuleNameT&& value) {
45 m_ruleNameHasBeenSet = true;
46 m_ruleName = std::forward<RuleNameT>(value);
47 }
48 template <typename RuleNameT = Aws::String>
49 TopicRule& WithRuleName(RuleNameT&& value) {
50 SetRuleName(std::forward<RuleNameT>(value));
51 return *this;
52 }
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) {
64 m_sqlHasBeenSet = true;
65 m_sql = std::forward<SqlT>(value);
66 }
67 template <typename SqlT = Aws::String>
68 TopicRule& WithSql(SqlT&& value) {
69 SetSql(std::forward<SqlT>(value));
70 return *this;
71 }
73
75
78 inline const Aws::String& GetDescription() const { return m_description; }
79 inline bool DescriptionHasBeenSet() const { return m_descriptionHasBeenSet; }
80 template <typename DescriptionT = Aws::String>
81 void SetDescription(DescriptionT&& value) {
82 m_descriptionHasBeenSet = true;
83 m_description = std::forward<DescriptionT>(value);
84 }
85 template <typename DescriptionT = Aws::String>
86 TopicRule& WithDescription(DescriptionT&& value) {
87 SetDescription(std::forward<DescriptionT>(value));
88 return *this;
89 }
91
93
96 inline const Aws::Utils::DateTime& GetCreatedAt() const { return m_createdAt; }
97 inline bool CreatedAtHasBeenSet() const { return m_createdAtHasBeenSet; }
98 template <typename CreatedAtT = Aws::Utils::DateTime>
99 void SetCreatedAt(CreatedAtT&& value) {
100 m_createdAtHasBeenSet = true;
101 m_createdAt = std::forward<CreatedAtT>(value);
102 }
103 template <typename CreatedAtT = Aws::Utils::DateTime>
104 TopicRule& WithCreatedAt(CreatedAtT&& value) {
105 SetCreatedAt(std::forward<CreatedAtT>(value));
106 return *this;
107 }
109
111
114 inline const Aws::Vector<Action>& GetActions() const { return m_actions; }
115 inline bool ActionsHasBeenSet() const { return m_actionsHasBeenSet; }
116 template <typename ActionsT = Aws::Vector<Action>>
117 void SetActions(ActionsT&& value) {
118 m_actionsHasBeenSet = true;
119 m_actions = std::forward<ActionsT>(value);
120 }
121 template <typename ActionsT = Aws::Vector<Action>>
122 TopicRule& WithActions(ActionsT&& value) {
123 SetActions(std::forward<ActionsT>(value));
124 return *this;
125 }
126 template <typename ActionsT = Action>
127 TopicRule& AddActions(ActionsT&& value) {
128 m_actionsHasBeenSet = true;
129 m_actions.emplace_back(std::forward<ActionsT>(value));
130 return *this;
131 }
133
135
138 inline bool GetRuleDisabled() const { return m_ruleDisabled; }
139 inline bool RuleDisabledHasBeenSet() const { return m_ruleDisabledHasBeenSet; }
140 inline void SetRuleDisabled(bool value) {
141 m_ruleDisabledHasBeenSet = true;
142 m_ruleDisabled = value;
143 }
144 inline TopicRule& WithRuleDisabled(bool value) {
145 SetRuleDisabled(value);
146 return *this;
147 }
149
151
154 inline const Aws::String& GetAwsIotSqlVersion() const { return m_awsIotSqlVersion; }
155 inline bool AwsIotSqlVersionHasBeenSet() const { return m_awsIotSqlVersionHasBeenSet; }
156 template <typename AwsIotSqlVersionT = Aws::String>
157 void SetAwsIotSqlVersion(AwsIotSqlVersionT&& value) {
158 m_awsIotSqlVersionHasBeenSet = true;
159 m_awsIotSqlVersion = std::forward<AwsIotSqlVersionT>(value);
160 }
161 template <typename AwsIotSqlVersionT = Aws::String>
162 TopicRule& WithAwsIotSqlVersion(AwsIotSqlVersionT&& value) {
163 SetAwsIotSqlVersion(std::forward<AwsIotSqlVersionT>(value));
164 return *this;
165 }
167
169
172 inline const Action& GetErrorAction() const { return m_errorAction; }
173 inline bool ErrorActionHasBeenSet() const { return m_errorActionHasBeenSet; }
174 template <typename ErrorActionT = Action>
175 void SetErrorAction(ErrorActionT&& value) {
176 m_errorActionHasBeenSet = true;
177 m_errorAction = std::forward<ErrorActionT>(value);
178 }
179 template <typename ErrorActionT = Action>
180 TopicRule& WithErrorAction(ErrorActionT&& value) {
181 SetErrorAction(std::forward<ErrorActionT>(value));
182 return *this;
183 }
185 private:
186 Aws::String m_ruleName;
187
188 Aws::String m_sql;
189
190 Aws::String m_description;
191
192 Aws::Utils::DateTime m_createdAt{};
193
194 Aws::Vector<Action> m_actions;
195
196 bool m_ruleDisabled{false};
197
198 Aws::String m_awsIotSqlVersion;
199
200 Action m_errorAction;
201 bool m_ruleNameHasBeenSet = false;
202 bool m_sqlHasBeenSet = false;
203 bool m_descriptionHasBeenSet = false;
204 bool m_createdAtHasBeenSet = false;
205 bool m_actionsHasBeenSet = false;
206 bool m_ruleDisabledHasBeenSet = false;
207 bool m_awsIotSqlVersionHasBeenSet = false;
208 bool m_errorActionHasBeenSet = false;
209};
210
211} // namespace Model
212} // namespace IoT
213} // namespace Aws
bool DescriptionHasBeenSet() const
Definition TopicRule.h:79
bool CreatedAtHasBeenSet() const
Definition TopicRule.h:97
bool ActionsHasBeenSet() const
Definition TopicRule.h:115
bool GetRuleDisabled() const
Definition TopicRule.h:138
AWS_IOT_API Aws::Utils::Json::JsonValue Jsonize() const
TopicRule & WithAwsIotSqlVersion(AwsIotSqlVersionT &&value)
Definition TopicRule.h:162
void SetSql(SqlT &&value)
Definition TopicRule.h:63
TopicRule & WithCreatedAt(CreatedAtT &&value)
Definition TopicRule.h:104
void SetCreatedAt(CreatedAtT &&value)
Definition TopicRule.h:99
void SetRuleName(RuleNameT &&value)
Definition TopicRule.h:44
AWS_IOT_API TopicRule & operator=(Aws::Utils::Json::JsonView jsonValue)
void SetDescription(DescriptionT &&value)
Definition TopicRule.h:81
TopicRule & WithActions(ActionsT &&value)
Definition TopicRule.h:122
void SetAwsIotSqlVersion(AwsIotSqlVersionT &&value)
Definition TopicRule.h:157
const Aws::Utils::DateTime & GetCreatedAt() const
Definition TopicRule.h:96
TopicRule & AddActions(ActionsT &&value)
Definition TopicRule.h:127
const Aws::String & GetDescription() const
Definition TopicRule.h:78
TopicRule & WithErrorAction(ErrorActionT &&value)
Definition TopicRule.h:180
const Aws::Vector< Action > & GetActions() const
Definition TopicRule.h:114
TopicRule & WithDescription(DescriptionT &&value)
Definition TopicRule.h:86
bool RuleDisabledHasBeenSet() const
Definition TopicRule.h:139
const Action & GetErrorAction() const
Definition TopicRule.h:172
void SetErrorAction(ErrorActionT &&value)
Definition TopicRule.h:175
AWS_IOT_API TopicRule()=default
bool AwsIotSqlVersionHasBeenSet() const
Definition TopicRule.h:155
TopicRule & WithSql(SqlT &&value)
Definition TopicRule.h:68
TopicRule & WithRuleDisabled(bool value)
Definition TopicRule.h:144
void SetRuleDisabled(bool value)
Definition TopicRule.h:140
const Aws::String & GetSql() const
Definition TopicRule.h:60
void SetActions(ActionsT &&value)
Definition TopicRule.h:117
bool SqlHasBeenSet() const
Definition TopicRule.h:61
const Aws::String & GetRuleName() const
Definition TopicRule.h:41
bool ErrorActionHasBeenSet() const
Definition TopicRule.h:173
const Aws::String & GetAwsIotSqlVersion() const
Definition TopicRule.h:154
AWS_IOT_API TopicRule(Aws::Utils::Json::JsonView jsonValue)
bool RuleNameHasBeenSet() const
Definition TopicRule.h:42
TopicRule & WithRuleName(RuleNameT &&value)
Definition TopicRule.h:49
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector
Aws::Utils::Json::JsonValue JsonValue