AWS SDK for C++  0.12.9
AWS SDK for C++
Rule.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
19 
20 namespace Aws
21 {
22 namespace Utils
23 {
24 namespace Json
25 {
26  class JsonValue;
27 } // namespace Json
28 } // namespace Utils
29 namespace CloudWatchEvents
30 {
31 namespace Model
32 {
33 
39  {
40  public:
41  Rule();
42  Rule(const Aws::Utils::Json::JsonValue& jsonValue);
43  Rule& operator=(const Aws::Utils::Json::JsonValue& jsonValue);
44  Aws::Utils::Json::JsonValue Jsonize() const;
45 
49  inline const Aws::String& GetName() const{ return m_name; }
50 
54  inline void SetName(const Aws::String& value) { m_nameHasBeenSet = true; m_name = value; }
55 
59  inline void SetName(Aws::String&& value) { m_nameHasBeenSet = true; m_name = value; }
60 
64  inline void SetName(const char* value) { m_nameHasBeenSet = true; m_name.assign(value); }
65 
69  inline Rule& WithName(const Aws::String& value) { SetName(value); return *this;}
70 
74  inline Rule& WithName(Aws::String&& value) { SetName(value); return *this;}
75 
79  inline Rule& WithName(const char* value) { SetName(value); return *this;}
80 
84  inline const Aws::String& GetArn() const{ return m_arn; }
85 
89  inline void SetArn(const Aws::String& value) { m_arnHasBeenSet = true; m_arn = value; }
90 
94  inline void SetArn(Aws::String&& value) { m_arnHasBeenSet = true; m_arn = value; }
95 
99  inline void SetArn(const char* value) { m_arnHasBeenSet = true; m_arn.assign(value); }
100 
104  inline Rule& WithArn(const Aws::String& value) { SetArn(value); return *this;}
105 
109  inline Rule& WithArn(Aws::String&& value) { SetArn(value); return *this;}
110 
114  inline Rule& WithArn(const char* value) { SetArn(value); return *this;}
115 
119  inline const Aws::String& GetEventPattern() const{ return m_eventPattern; }
120 
124  inline void SetEventPattern(const Aws::String& value) { m_eventPatternHasBeenSet = true; m_eventPattern = value; }
125 
129  inline void SetEventPattern(Aws::String&& value) { m_eventPatternHasBeenSet = true; m_eventPattern = value; }
130 
134  inline void SetEventPattern(const char* value) { m_eventPatternHasBeenSet = true; m_eventPattern.assign(value); }
135 
139  inline Rule& WithEventPattern(const Aws::String& value) { SetEventPattern(value); return *this;}
140 
144  inline Rule& WithEventPattern(Aws::String&& value) { SetEventPattern(value); return *this;}
145 
149  inline Rule& WithEventPattern(const char* value) { SetEventPattern(value); return *this;}
150 
154  inline const RuleState& GetState() const{ return m_state; }
155 
159  inline void SetState(const RuleState& value) { m_stateHasBeenSet = true; m_state = value; }
160 
164  inline void SetState(RuleState&& value) { m_stateHasBeenSet = true; m_state = value; }
165 
169  inline Rule& WithState(const RuleState& value) { SetState(value); return *this;}
170 
174  inline Rule& WithState(RuleState&& value) { SetState(value); return *this;}
175 
179  inline const Aws::String& GetDescription() const{ return m_description; }
180 
184  inline void SetDescription(const Aws::String& value) { m_descriptionHasBeenSet = true; m_description = value; }
185 
189  inline void SetDescription(Aws::String&& value) { m_descriptionHasBeenSet = true; m_description = value; }
190 
194  inline void SetDescription(const char* value) { m_descriptionHasBeenSet = true; m_description.assign(value); }
195 
199  inline Rule& WithDescription(const Aws::String& value) { SetDescription(value); return *this;}
200 
204  inline Rule& WithDescription(Aws::String&& value) { SetDescription(value); return *this;}
205 
209  inline Rule& WithDescription(const char* value) { SetDescription(value); return *this;}
210 
215  inline const Aws::String& GetScheduleExpression() const{ return m_scheduleExpression; }
216 
221  inline void SetScheduleExpression(const Aws::String& value) { m_scheduleExpressionHasBeenSet = true; m_scheduleExpression = value; }
222 
227  inline void SetScheduleExpression(Aws::String&& value) { m_scheduleExpressionHasBeenSet = true; m_scheduleExpression = value; }
228 
233  inline void SetScheduleExpression(const char* value) { m_scheduleExpressionHasBeenSet = true; m_scheduleExpression.assign(value); }
234 
239  inline Rule& WithScheduleExpression(const Aws::String& value) { SetScheduleExpression(value); return *this;}
240 
245  inline Rule& WithScheduleExpression(Aws::String&& value) { SetScheduleExpression(value); return *this;}
246 
251  inline Rule& WithScheduleExpression(const char* value) { SetScheduleExpression(value); return *this;}
252 
257  inline const Aws::String& GetRoleArn() const{ return m_roleArn; }
258 
263  inline void SetRoleArn(const Aws::String& value) { m_roleArnHasBeenSet = true; m_roleArn = value; }
264 
269  inline void SetRoleArn(Aws::String&& value) { m_roleArnHasBeenSet = true; m_roleArn = value; }
270 
275  inline void SetRoleArn(const char* value) { m_roleArnHasBeenSet = true; m_roleArn.assign(value); }
276 
281  inline Rule& WithRoleArn(const Aws::String& value) { SetRoleArn(value); return *this;}
282 
287  inline Rule& WithRoleArn(Aws::String&& value) { SetRoleArn(value); return *this;}
288 
293  inline Rule& WithRoleArn(const char* value) { SetRoleArn(value); return *this;}
294 
295  private:
296  Aws::String m_name;
297  bool m_nameHasBeenSet;
298  Aws::String m_arn;
299  bool m_arnHasBeenSet;
300  Aws::String m_eventPattern;
301  bool m_eventPatternHasBeenSet;
302  RuleState m_state;
303  bool m_stateHasBeenSet;
304  Aws::String m_description;
305  bool m_descriptionHasBeenSet;
306  Aws::String m_scheduleExpression;
307  bool m_scheduleExpressionHasBeenSet;
308  Aws::String m_roleArn;
309  bool m_roleArnHasBeenSet;
310  };
311 
312 } // namespace Model
313 } // namespace CloudWatchEvents
314 } // namespace Aws
#define AWS_CLOUDWATCHEVENTS_API
const Aws::String & GetArn() const
Definition: Rule.h:84
Rule & WithArn(const Aws::String &value)
Definition: Rule.h:104
Rule & WithScheduleExpression(const Aws::String &value)
Definition: Rule.h:239
void SetState(const RuleState &value)
Definition: Rule.h:159
Rule & WithState(RuleState &&value)
Definition: Rule.h:174
void SetRoleArn(const char *value)
Definition: Rule.h:275
const Aws::String & GetName() const
Definition: Rule.h:49
const Aws::String & GetRoleArn() const
Definition: Rule.h:257
Rule & WithEventPattern(const Aws::String &value)
Definition: Rule.h:139
void SetArn(Aws::String &&value)
Definition: Rule.h:94
Rule & WithEventPattern(const char *value)
Definition: Rule.h:149
Rule & WithDescription(const Aws::String &value)
Definition: Rule.h:199
Rule & WithName(const Aws::String &value)
Definition: Rule.h:69
const Aws::String & GetEventPattern() const
Definition: Rule.h:119
void SetArn(const Aws::String &value)
Definition: Rule.h:89
void SetName(const Aws::String &value)
Definition: Rule.h:54
const Aws::String & GetDescription() const
Definition: Rule.h:179
Rule & WithName(Aws::String &&value)
Definition: Rule.h:74
const Aws::String & GetScheduleExpression() const
Definition: Rule.h:215
void SetArn(const char *value)
Definition: Rule.h:99
Rule & WithRoleArn(Aws::String &&value)
Definition: Rule.h:287
Rule & WithState(const RuleState &value)
Definition: Rule.h:169
Rule & WithRoleArn(const Aws::String &value)
Definition: Rule.h:281
void SetRoleArn(const Aws::String &value)
Definition: Rule.h:263
Rule & WithArn(Aws::String &&value)
Definition: Rule.h:109
void SetRoleArn(Aws::String &&value)
Definition: Rule.h:269
void SetDescription(const Aws::String &value)
Definition: Rule.h:184
Rule & WithScheduleExpression(const char *value)
Definition: Rule.h:251
void SetScheduleExpression(const char *value)
Definition: Rule.h:233
Rule & WithEventPattern(Aws::String &&value)
Definition: Rule.h:144
void SetState(RuleState &&value)
Definition: Rule.h:164
const RuleState & GetState() const
Definition: Rule.h:154
Rule & WithArn(const char *value)
Definition: Rule.h:114
void SetDescription(const char *value)
Definition: Rule.h:194
void SetScheduleExpression(const Aws::String &value)
Definition: Rule.h:221
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Definition: AWSString.h:97
void SetEventPattern(const Aws::String &value)
Definition: Rule.h:124
void SetDescription(Aws::String &&value)
Definition: Rule.h:189
Rule & WithDescription(Aws::String &&value)
Definition: Rule.h:204
Rule & WithRoleArn(const char *value)
Definition: Rule.h:293
Rule & WithScheduleExpression(Aws::String &&value)
Definition: Rule.h:245
void SetScheduleExpression(Aws::String &&value)
Definition: Rule.h:227
void SetName(const char *value)
Definition: Rule.h:64
void SetName(Aws::String &&value)
Definition: Rule.h:59
Rule & WithName(const char *value)
Definition: Rule.h:79
void SetEventPattern(Aws::String &&value)
Definition: Rule.h:129
Rule & WithDescription(const char *value)
Definition: Rule.h:209
void SetEventPattern(const char *value)
Definition: Rule.h:134
JSON (JavaScript Object Notation).