AWS SDK for C++

AWS SDK for C++ Version 1.11.607

Loading...
Searching...
No Matches
CreateRule.h
1
6#pragma once
7#include <aws/dlm/DLM_EXPORTS.h>
8#include <aws/dlm/model/LocationValues.h>
9#include <aws/dlm/model/IntervalUnitValues.h>
10#include <aws/core/utils/memory/stl/AWSVector.h>
11#include <aws/core/utils/memory/stl/AWSString.h>
12#include <aws/dlm/model/Script.h>
13#include <utility>
14
15namespace Aws
16{
17namespace Utils
18{
19namespace Json
20{
21 class JsonValue;
22 class JsonView;
23} // namespace Json
24} // namespace Utils
25namespace DLM
26{
27namespace Model
28{
29
42 {
43 public:
44 AWS_DLM_API CreateRule() = default;
45 AWS_DLM_API CreateRule(Aws::Utils::Json::JsonView jsonValue);
48
49
51
67 inline LocationValues GetLocation() const { return m_location; }
68 inline bool LocationHasBeenSet() const { return m_locationHasBeenSet; }
69 inline void SetLocation(LocationValues value) { m_locationHasBeenSet = true; m_location = value; }
70 inline CreateRule& WithLocation(LocationValues value) { SetLocation(value); return *this;}
72
74
78 inline int GetInterval() const { return m_interval; }
79 inline bool IntervalHasBeenSet() const { return m_intervalHasBeenSet; }
80 inline void SetInterval(int value) { m_intervalHasBeenSet = true; m_interval = value; }
81 inline CreateRule& WithInterval(int value) { SetInterval(value); return *this;}
83
85
88 inline IntervalUnitValues GetIntervalUnit() const { return m_intervalUnit; }
89 inline bool IntervalUnitHasBeenSet() const { return m_intervalUnitHasBeenSet; }
90 inline void SetIntervalUnit(IntervalUnitValues value) { m_intervalUnitHasBeenSet = true; m_intervalUnit = value; }
91 inline CreateRule& WithIntervalUnit(IntervalUnitValues value) { SetIntervalUnit(value); return *this;}
93
95
101 inline const Aws::Vector<Aws::String>& GetTimes() const { return m_times; }
102 inline bool TimesHasBeenSet() const { return m_timesHasBeenSet; }
103 template<typename TimesT = Aws::Vector<Aws::String>>
104 void SetTimes(TimesT&& value) { m_timesHasBeenSet = true; m_times = std::forward<TimesT>(value); }
105 template<typename TimesT = Aws::Vector<Aws::String>>
106 CreateRule& WithTimes(TimesT&& value) { SetTimes(std::forward<TimesT>(value)); return *this;}
107 template<typename TimesT = Aws::String>
108 CreateRule& AddTimes(TimesT&& value) { m_timesHasBeenSet = true; m_times.emplace_back(std::forward<TimesT>(value)); return *this; }
110
112
118 inline const Aws::String& GetCronExpression() const { return m_cronExpression; }
119 inline bool CronExpressionHasBeenSet() const { return m_cronExpressionHasBeenSet; }
120 template<typename CronExpressionT = Aws::String>
121 void SetCronExpression(CronExpressionT&& value) { m_cronExpressionHasBeenSet = true; m_cronExpression = std::forward<CronExpressionT>(value); }
122 template<typename CronExpressionT = Aws::String>
123 CreateRule& WithCronExpression(CronExpressionT&& value) { SetCronExpression(std::forward<CronExpressionT>(value)); return *this;}
125
127
136 inline const Aws::Vector<Script>& GetScripts() const { return m_scripts; }
137 inline bool ScriptsHasBeenSet() const { return m_scriptsHasBeenSet; }
138 template<typename ScriptsT = Aws::Vector<Script>>
139 void SetScripts(ScriptsT&& value) { m_scriptsHasBeenSet = true; m_scripts = std::forward<ScriptsT>(value); }
140 template<typename ScriptsT = Aws::Vector<Script>>
141 CreateRule& WithScripts(ScriptsT&& value) { SetScripts(std::forward<ScriptsT>(value)); return *this;}
142 template<typename ScriptsT = Script>
143 CreateRule& AddScripts(ScriptsT&& value) { m_scriptsHasBeenSet = true; m_scripts.emplace_back(std::forward<ScriptsT>(value)); return *this; }
145 private:
146
148 bool m_locationHasBeenSet = false;
149
150 int m_interval{0};
151 bool m_intervalHasBeenSet = false;
152
154 bool m_intervalUnitHasBeenSet = false;
155
157 bool m_timesHasBeenSet = false;
158
159 Aws::String m_cronExpression;
160 bool m_cronExpressionHasBeenSet = false;
161
162 Aws::Vector<Script> m_scripts;
163 bool m_scriptsHasBeenSet = false;
164 };
165
166} // namespace Model
167} // namespace DLM
168} // namespace Aws
LocationValues GetLocation() const
Definition CreateRule.h:67
CreateRule & AddScripts(ScriptsT &&value)
Definition CreateRule.h:143
CreateRule & WithLocation(LocationValues value)
Definition CreateRule.h:70
const Aws::Vector< Aws::String > & GetTimes() const
Definition CreateRule.h:101
CreateRule & WithInterval(int value)
Definition CreateRule.h:81
CreateRule & WithTimes(TimesT &&value)
Definition CreateRule.h:106
void SetIntervalUnit(IntervalUnitValues value)
Definition CreateRule.h:90
CreateRule & WithCronExpression(CronExpressionT &&value)
Definition CreateRule.h:123
bool IntervalUnitHasBeenSet() const
Definition CreateRule.h:89
void SetInterval(int value)
Definition CreateRule.h:80
CreateRule & AddTimes(TimesT &&value)
Definition CreateRule.h:108
void SetCronExpression(CronExpressionT &&value)
Definition CreateRule.h:121
bool LocationHasBeenSet() const
Definition CreateRule.h:68
AWS_DLM_API CreateRule()=default
void SetScripts(ScriptsT &&value)
Definition CreateRule.h:139
CreateRule & WithScripts(ScriptsT &&value)
Definition CreateRule.h:141
AWS_DLM_API CreateRule(Aws::Utils::Json::JsonView jsonValue)
const Aws::Vector< Script > & GetScripts() const
Definition CreateRule.h:136
bool CronExpressionHasBeenSet() const
Definition CreateRule.h:119
const Aws::String & GetCronExpression() const
Definition CreateRule.h:118
bool IntervalHasBeenSet() const
Definition CreateRule.h:79
AWS_DLM_API Aws::Utils::Json::JsonValue Jsonize() const
void SetTimes(TimesT &&value)
Definition CreateRule.h:104
AWS_DLM_API CreateRule & operator=(Aws::Utils::Json::JsonView jsonValue)
void SetLocation(LocationValues value)
Definition CreateRule.h:69
IntervalUnitValues GetIntervalUnit() const
Definition CreateRule.h:88
CreateRule & WithIntervalUnit(IntervalUnitValues value)
Definition CreateRule.h:91
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector
Aws::Utils::Json::JsonValue JsonValue