AWS SDK for C++

AWS SDK for C++ Version 1.11.719

Loading...
Searching...
No Matches
CreateRule.h
1
6#pragma once
7#include <aws/core/utils/memory/stl/AWSString.h>
8#include <aws/core/utils/memory/stl/AWSVector.h>
9#include <aws/dlm/DLM_EXPORTS.h>
10#include <aws/dlm/model/IntervalUnitValues.h>
11#include <aws/dlm/model/LocationValues.h>
12#include <aws/dlm/model/Script.h>
13
14#include <utility>
15
16namespace Aws {
17namespace Utils {
18namespace Json {
19class JsonValue;
20class JsonView;
21} // namespace Json
22} // namespace Utils
23namespace DLM {
24namespace Model {
25
38 public:
39 AWS_DLM_API CreateRule() = default;
40 AWS_DLM_API CreateRule(Aws::Utils::Json::JsonView jsonValue);
43
45
61 inline LocationValues GetLocation() const { return m_location; }
62 inline bool LocationHasBeenSet() const { return m_locationHasBeenSet; }
63 inline void SetLocation(LocationValues value) {
64 m_locationHasBeenSet = true;
65 m_location = value;
66 }
68 SetLocation(value);
69 return *this;
70 }
72
74
78 inline int GetInterval() const { return m_interval; }
79 inline bool IntervalHasBeenSet() const { return m_intervalHasBeenSet; }
80 inline void SetInterval(int value) {
81 m_intervalHasBeenSet = true;
82 m_interval = value;
83 }
84 inline CreateRule& WithInterval(int value) {
85 SetInterval(value);
86 return *this;
87 }
89
91
94 inline IntervalUnitValues GetIntervalUnit() const { return m_intervalUnit; }
95 inline bool IntervalUnitHasBeenSet() const { return m_intervalUnitHasBeenSet; }
97 m_intervalUnitHasBeenSet = true;
98 m_intervalUnit = value;
99 }
101 SetIntervalUnit(value);
102 return *this;
103 }
105
107
113 inline const Aws::Vector<Aws::String>& GetTimes() const { return m_times; }
114 inline bool TimesHasBeenSet() const { return m_timesHasBeenSet; }
115 template <typename TimesT = Aws::Vector<Aws::String>>
116 void SetTimes(TimesT&& value) {
117 m_timesHasBeenSet = true;
118 m_times = std::forward<TimesT>(value);
119 }
120 template <typename TimesT = Aws::Vector<Aws::String>>
121 CreateRule& WithTimes(TimesT&& value) {
122 SetTimes(std::forward<TimesT>(value));
123 return *this;
124 }
125 template <typename TimesT = Aws::String>
126 CreateRule& AddTimes(TimesT&& value) {
127 m_timesHasBeenSet = true;
128 m_times.emplace_back(std::forward<TimesT>(value));
129 return *this;
130 }
132
134
140 inline const Aws::String& GetCronExpression() const { return m_cronExpression; }
141 inline bool CronExpressionHasBeenSet() const { return m_cronExpressionHasBeenSet; }
142 template <typename CronExpressionT = Aws::String>
143 void SetCronExpression(CronExpressionT&& value) {
144 m_cronExpressionHasBeenSet = true;
145 m_cronExpression = std::forward<CronExpressionT>(value);
146 }
147 template <typename CronExpressionT = Aws::String>
148 CreateRule& WithCronExpression(CronExpressionT&& value) {
149 SetCronExpression(std::forward<CronExpressionT>(value));
150 return *this;
151 }
153
155
164 inline const Aws::Vector<Script>& GetScripts() const { return m_scripts; }
165 inline bool ScriptsHasBeenSet() const { return m_scriptsHasBeenSet; }
166 template <typename ScriptsT = Aws::Vector<Script>>
167 void SetScripts(ScriptsT&& value) {
168 m_scriptsHasBeenSet = true;
169 m_scripts = std::forward<ScriptsT>(value);
170 }
171 template <typename ScriptsT = Aws::Vector<Script>>
172 CreateRule& WithScripts(ScriptsT&& value) {
173 SetScripts(std::forward<ScriptsT>(value));
174 return *this;
175 }
176 template <typename ScriptsT = Script>
177 CreateRule& AddScripts(ScriptsT&& value) {
178 m_scriptsHasBeenSet = true;
179 m_scripts.emplace_back(std::forward<ScriptsT>(value));
180 return *this;
181 }
183 private:
185
186 int m_interval{0};
187
189
191
192 Aws::String m_cronExpression;
193
194 Aws::Vector<Script> m_scripts;
195 bool m_locationHasBeenSet = false;
196 bool m_intervalHasBeenSet = false;
197 bool m_intervalUnitHasBeenSet = false;
198 bool m_timesHasBeenSet = false;
199 bool m_cronExpressionHasBeenSet = false;
200 bool m_scriptsHasBeenSet = false;
201};
202
203} // namespace Model
204} // namespace DLM
205} // namespace Aws
LocationValues GetLocation() const
Definition CreateRule.h:61
CreateRule & AddScripts(ScriptsT &&value)
Definition CreateRule.h:177
CreateRule & WithLocation(LocationValues value)
Definition CreateRule.h:67
const Aws::Vector< Aws::String > & GetTimes() const
Definition CreateRule.h:113
CreateRule & WithInterval(int value)
Definition CreateRule.h:84
CreateRule & WithTimes(TimesT &&value)
Definition CreateRule.h:121
void SetIntervalUnit(IntervalUnitValues value)
Definition CreateRule.h:96
CreateRule & WithCronExpression(CronExpressionT &&value)
Definition CreateRule.h:148
bool IntervalUnitHasBeenSet() const
Definition CreateRule.h:95
void SetInterval(int value)
Definition CreateRule.h:80
CreateRule & AddTimes(TimesT &&value)
Definition CreateRule.h:126
void SetCronExpression(CronExpressionT &&value)
Definition CreateRule.h:143
bool LocationHasBeenSet() const
Definition CreateRule.h:62
AWS_DLM_API CreateRule()=default
void SetScripts(ScriptsT &&value)
Definition CreateRule.h:167
CreateRule & WithScripts(ScriptsT &&value)
Definition CreateRule.h:172
AWS_DLM_API CreateRule(Aws::Utils::Json::JsonView jsonValue)
const Aws::Vector< Script > & GetScripts() const
Definition CreateRule.h:164
bool CronExpressionHasBeenSet() const
Definition CreateRule.h:141
const Aws::String & GetCronExpression() const
Definition CreateRule.h:140
bool IntervalHasBeenSet() const
Definition CreateRule.h:79
AWS_DLM_API Aws::Utils::Json::JsonValue Jsonize() const
void SetTimes(TimesT &&value)
Definition CreateRule.h:116
AWS_DLM_API CreateRule & operator=(Aws::Utils::Json::JsonView jsonValue)
void SetLocation(LocationValues value)
Definition CreateRule.h:63
IntervalUnitValues GetIntervalUnit() const
Definition CreateRule.h:94
CreateRule & WithIntervalUnit(IntervalUnitValues value)
Definition CreateRule.h:100
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector
Aws::Utils::Json::JsonValue JsonValue