AWS SDK for C++  0.14.3
AWS SDK for C++
TopicRule.h
Go to the documentation of this file.
1 /*
2 * Copyright 2010-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License").
5 * You may not use this file except in compliance with the License.
6 * A copy of the License is located at
7 *
8 * http://aws.amazon.com/apache2.0
9 *
10 * or in the "license" file accompanying this file. This file is distributed
11 * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
12 * express or implied. See the License for the specific language governing
13 * permissions and limitations under the License.
14 */
15 #pragma once
16 #include <aws/iot/IoT_EXPORTS.h>
20 #include <aws/iot/model/Action.h>
21 
22 namespace Aws
23 {
24 namespace Utils
25 {
26 namespace Json
27 {
28  class JsonValue;
29 } // namespace Json
30 } // namespace Utils
31 namespace IoT
32 {
33 namespace Model
34 {
35 
40  {
41  public:
42  TopicRule();
43  TopicRule(const Aws::Utils::Json::JsonValue& jsonValue);
44  TopicRule& operator=(const Aws::Utils::Json::JsonValue& jsonValue);
45  Aws::Utils::Json::JsonValue Jsonize() const;
46 
50  inline const Aws::String& GetRuleName() const{ return m_ruleName; }
51 
55  inline void SetRuleName(const Aws::String& value) { m_ruleNameHasBeenSet = true; m_ruleName = value; }
56 
60  inline void SetRuleName(Aws::String&& value) { m_ruleNameHasBeenSet = true; m_ruleName = value; }
61 
65  inline void SetRuleName(const char* value) { m_ruleNameHasBeenSet = true; m_ruleName.assign(value); }
66 
70  inline TopicRule& WithRuleName(const Aws::String& value) { SetRuleName(value); return *this;}
71 
75  inline TopicRule& WithRuleName(Aws::String&& value) { SetRuleName(value); return *this;}
76 
80  inline TopicRule& WithRuleName(const char* value) { SetRuleName(value); return *this;}
81 
86  inline const Aws::String& GetSql() const{ return m_sql; }
87 
92  inline void SetSql(const Aws::String& value) { m_sqlHasBeenSet = true; m_sql = value; }
93 
98  inline void SetSql(Aws::String&& value) { m_sqlHasBeenSet = true; m_sql = value; }
99 
104  inline void SetSql(const char* value) { m_sqlHasBeenSet = true; m_sql.assign(value); }
105 
110  inline TopicRule& WithSql(const Aws::String& value) { SetSql(value); return *this;}
111 
116  inline TopicRule& WithSql(Aws::String&& value) { SetSql(value); return *this;}
117 
122  inline TopicRule& WithSql(const char* value) { SetSql(value); return *this;}
123 
127  inline const Aws::String& GetDescription() const{ return m_description; }
128 
132  inline void SetDescription(const Aws::String& value) { m_descriptionHasBeenSet = true; m_description = value; }
133 
137  inline void SetDescription(Aws::String&& value) { m_descriptionHasBeenSet = true; m_description = value; }
138 
142  inline void SetDescription(const char* value) { m_descriptionHasBeenSet = true; m_description.assign(value); }
143 
147  inline TopicRule& WithDescription(const Aws::String& value) { SetDescription(value); return *this;}
148 
152  inline TopicRule& WithDescription(Aws::String&& value) { SetDescription(value); return *this;}
153 
157  inline TopicRule& WithDescription(const char* value) { SetDescription(value); return *this;}
158 
162  inline const Aws::Utils::DateTime& GetCreatedAt() const{ return m_createdAt; }
163 
167  inline void SetCreatedAt(const Aws::Utils::DateTime& value) { m_createdAtHasBeenSet = true; m_createdAt = value; }
168 
172  inline void SetCreatedAt(Aws::Utils::DateTime&& value) { m_createdAtHasBeenSet = true; m_createdAt = value; }
173 
177  inline TopicRule& WithCreatedAt(const Aws::Utils::DateTime& value) { SetCreatedAt(value); return *this;}
178 
182  inline TopicRule& WithCreatedAt(Aws::Utils::DateTime&& value) { SetCreatedAt(value); return *this;}
183 
187  inline const Aws::Vector<Action>& GetActions() const{ return m_actions; }
188 
192  inline void SetActions(const Aws::Vector<Action>& value) { m_actionsHasBeenSet = true; m_actions = value; }
193 
197  inline void SetActions(Aws::Vector<Action>&& value) { m_actionsHasBeenSet = true; m_actions = value; }
198 
202  inline TopicRule& WithActions(const Aws::Vector<Action>& value) { SetActions(value); return *this;}
203 
207  inline TopicRule& WithActions(Aws::Vector<Action>&& value) { SetActions(value); return *this;}
208 
212  inline TopicRule& AddActions(const Action& value) { m_actionsHasBeenSet = true; m_actions.push_back(value); return *this; }
213 
217  inline TopicRule& AddActions(Action&& value) { m_actionsHasBeenSet = true; m_actions.push_back(value); return *this; }
218 
222  inline bool GetRuleDisabled() const{ return m_ruleDisabled; }
223 
227  inline void SetRuleDisabled(bool value) { m_ruleDisabledHasBeenSet = true; m_ruleDisabled = value; }
228 
232  inline TopicRule& WithRuleDisabled(bool value) { SetRuleDisabled(value); return *this;}
233 
237  inline const Aws::String& GetAwsIotSqlVersion() const{ return m_awsIotSqlVersion; }
238 
242  inline void SetAwsIotSqlVersion(const Aws::String& value) { m_awsIotSqlVersionHasBeenSet = true; m_awsIotSqlVersion = value; }
243 
247  inline void SetAwsIotSqlVersion(Aws::String&& value) { m_awsIotSqlVersionHasBeenSet = true; m_awsIotSqlVersion = value; }
248 
252  inline void SetAwsIotSqlVersion(const char* value) { m_awsIotSqlVersionHasBeenSet = true; m_awsIotSqlVersion.assign(value); }
253 
257  inline TopicRule& WithAwsIotSqlVersion(const Aws::String& value) { SetAwsIotSqlVersion(value); return *this;}
258 
262  inline TopicRule& WithAwsIotSqlVersion(Aws::String&& value) { SetAwsIotSqlVersion(value); return *this;}
263 
267  inline TopicRule& WithAwsIotSqlVersion(const char* value) { SetAwsIotSqlVersion(value); return *this;}
268 
269  private:
270  Aws::String m_ruleName;
271  bool m_ruleNameHasBeenSet;
272  Aws::String m_sql;
273  bool m_sqlHasBeenSet;
274  Aws::String m_description;
275  bool m_descriptionHasBeenSet;
276  Aws::Utils::DateTime m_createdAt;
277  bool m_createdAtHasBeenSet;
278  Aws::Vector<Action> m_actions;
279  bool m_actionsHasBeenSet;
280  bool m_ruleDisabled;
281  bool m_ruleDisabledHasBeenSet;
282  Aws::String m_awsIotSqlVersion;
283  bool m_awsIotSqlVersionHasBeenSet;
284  };
285 
286 } // namespace Model
287 } // namespace IoT
288 } // namespace Aws
TopicRule & WithSql(const char *value)
Definition: TopicRule.h:122
TopicRule & WithAwsIotSqlVersion(Aws::String &&value)
Definition: TopicRule.h:262
TopicRule & WithDescription(const Aws::String &value)
Definition: TopicRule.h:147
const Aws::String & GetSql() const
Definition: TopicRule.h:86
void SetActions(const Aws::Vector< Action > &value)
Definition: TopicRule.h:192
const Aws::Utils::DateTime & GetCreatedAt() const
Definition: TopicRule.h:162
TopicRule & WithActions(Aws::Vector< Action > &&value)
Definition: TopicRule.h:207
TopicRule & WithDescription(Aws::String &&value)
Definition: TopicRule.h:152
std::vector< T, Aws::Allocator< T > > Vector
Definition: AWSVector.h:27
TopicRule & WithCreatedAt(const Aws::Utils::DateTime &value)
Definition: TopicRule.h:177
TopicRule & AddActions(Action &&value)
Definition: TopicRule.h:217
void SetCreatedAt(Aws::Utils::DateTime &&value)
Definition: TopicRule.h:172
void SetAwsIotSqlVersion(const char *value)
Definition: TopicRule.h:252
TopicRule & WithRuleName(Aws::String &&value)
Definition: TopicRule.h:75
void SetCreatedAt(const Aws::Utils::DateTime &value)
Definition: TopicRule.h:167
void SetDescription(const char *value)
Definition: TopicRule.h:142
TopicRule & WithAwsIotSqlVersion(const Aws::String &value)
Definition: TopicRule.h:257
#define AWS_IOT_API
Definition: IoT_EXPORTS.h:37
TopicRule & WithRuleName(const Aws::String &value)
Definition: TopicRule.h:70
const Aws::String & GetDescription() const
Definition: TopicRule.h:127
TopicRule & WithDescription(const char *value)
Definition: TopicRule.h:157
TopicRule & WithCreatedAt(Aws::Utils::DateTime &&value)
Definition: TopicRule.h:182
void SetSql(const char *value)
Definition: TopicRule.h:104
TopicRule & AddActions(const Action &value)
Definition: TopicRule.h:212
const Aws::String & GetRuleName() const
Definition: TopicRule.h:50
void SetAwsIotSqlVersion(const Aws::String &value)
Definition: TopicRule.h:242
bool GetRuleDisabled() const
Definition: TopicRule.h:222
TopicRule & WithActions(const Aws::Vector< Action > &value)
Definition: TopicRule.h:202
void SetAwsIotSqlVersion(Aws::String &&value)
Definition: TopicRule.h:247
TopicRule & WithRuleDisabled(bool value)
Definition: TopicRule.h:232
void SetSql(Aws::String &&value)
Definition: TopicRule.h:98
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Definition: AWSString.h:97
TopicRule & WithRuleName(const char *value)
Definition: TopicRule.h:80
void SetDescription(Aws::String &&value)
Definition: TopicRule.h:137
void SetRuleDisabled(bool value)
Definition: TopicRule.h:227
void SetRuleName(Aws::String &&value)
Definition: TopicRule.h:60
TopicRule & WithSql(Aws::String &&value)
Definition: TopicRule.h:116
TopicRule & WithAwsIotSqlVersion(const char *value)
Definition: TopicRule.h:267
void SetRuleName(const char *value)
Definition: TopicRule.h:65
void SetRuleName(const Aws::String &value)
Definition: TopicRule.h:55
void SetSql(const Aws::String &value)
Definition: TopicRule.h:92
TopicRule & WithSql(const Aws::String &value)
Definition: TopicRule.h:110
void SetDescription(const Aws::String &value)
Definition: TopicRule.h:132
const Aws::Vector< Action > & GetActions() const
Definition: TopicRule.h:187
void SetActions(Aws::Vector< Action > &&value)
Definition: TopicRule.h:197
const Aws::String & GetAwsIotSqlVersion() const
Definition: TopicRule.h:237
JSON (JavaScript Object Notation).