AWS SDK for C++

AWS SDK for C++ Version 1.11.716

Loading...
Searching...
No Matches
MaintenanceWindow.h
1
6#pragma once
7#include <aws/core/utils/memory/stl/AWSVector.h>
8#include <aws/odb/Odb_EXPORTS.h>
9#include <aws/odb/model/DayOfWeek.h>
10#include <aws/odb/model/Month.h>
11#include <aws/odb/model/PatchingModeType.h>
12#include <aws/odb/model/PreferenceType.h>
13
14#include <utility>
15
16namespace Aws {
17namespace Utils {
18namespace Json {
19class JsonValue;
20class JsonView;
21} // namespace Json
22} // namespace Utils
23namespace odb {
24namespace Model {
25
33 public:
34 AWS_ODB_API MaintenanceWindow() = default;
38
40
43 inline int GetCustomActionTimeoutInMins() const { return m_customActionTimeoutInMins; }
44 inline bool CustomActionTimeoutInMinsHasBeenSet() const { return m_customActionTimeoutInMinsHasBeenSet; }
45 inline void SetCustomActionTimeoutInMins(int value) {
46 m_customActionTimeoutInMinsHasBeenSet = true;
47 m_customActionTimeoutInMins = value;
48 }
51 return *this;
52 }
54
56
59 inline const Aws::Vector<DayOfWeek>& GetDaysOfWeek() const { return m_daysOfWeek; }
60 inline bool DaysOfWeekHasBeenSet() const { return m_daysOfWeekHasBeenSet; }
61 template <typename DaysOfWeekT = Aws::Vector<DayOfWeek>>
62 void SetDaysOfWeek(DaysOfWeekT&& value) {
63 m_daysOfWeekHasBeenSet = true;
64 m_daysOfWeek = std::forward<DaysOfWeekT>(value);
65 }
66 template <typename DaysOfWeekT = Aws::Vector<DayOfWeek>>
67 MaintenanceWindow& WithDaysOfWeek(DaysOfWeekT&& value) {
68 SetDaysOfWeek(std::forward<DaysOfWeekT>(value));
69 return *this;
70 }
71 template <typename DaysOfWeekT = DayOfWeek>
72 MaintenanceWindow& AddDaysOfWeek(DaysOfWeekT&& value) {
73 m_daysOfWeekHasBeenSet = true;
74 m_daysOfWeek.emplace_back(std::forward<DaysOfWeekT>(value));
75 return *this;
76 }
78
80
83 inline const Aws::Vector<int>& GetHoursOfDay() const { return m_hoursOfDay; }
84 inline bool HoursOfDayHasBeenSet() const { return m_hoursOfDayHasBeenSet; }
85 template <typename HoursOfDayT = Aws::Vector<int>>
86 void SetHoursOfDay(HoursOfDayT&& value) {
87 m_hoursOfDayHasBeenSet = true;
88 m_hoursOfDay = std::forward<HoursOfDayT>(value);
89 }
90 template <typename HoursOfDayT = Aws::Vector<int>>
91 MaintenanceWindow& WithHoursOfDay(HoursOfDayT&& value) {
92 SetHoursOfDay(std::forward<HoursOfDayT>(value));
93 return *this;
94 }
95 inline MaintenanceWindow& AddHoursOfDay(int value) {
96 m_hoursOfDayHasBeenSet = true;
97 m_hoursOfDay.push_back(value);
98 return *this;
99 }
101
103
107 inline bool GetIsCustomActionTimeoutEnabled() const { return m_isCustomActionTimeoutEnabled; }
108 inline bool IsCustomActionTimeoutEnabledHasBeenSet() const { return m_isCustomActionTimeoutEnabledHasBeenSet; }
109 inline void SetIsCustomActionTimeoutEnabled(bool value) {
110 m_isCustomActionTimeoutEnabledHasBeenSet = true;
111 m_isCustomActionTimeoutEnabled = value;
112 }
115 return *this;
116 }
118
120
123 inline int GetLeadTimeInWeeks() const { return m_leadTimeInWeeks; }
124 inline bool LeadTimeInWeeksHasBeenSet() const { return m_leadTimeInWeeksHasBeenSet; }
125 inline void SetLeadTimeInWeeks(int value) {
126 m_leadTimeInWeeksHasBeenSet = true;
127 m_leadTimeInWeeks = value;
128 }
130 SetLeadTimeInWeeks(value);
131 return *this;
132 }
134
136
139 inline const Aws::Vector<Month>& GetMonths() const { return m_months; }
140 inline bool MonthsHasBeenSet() const { return m_monthsHasBeenSet; }
141 template <typename MonthsT = Aws::Vector<Month>>
142 void SetMonths(MonthsT&& value) {
143 m_monthsHasBeenSet = true;
144 m_months = std::forward<MonthsT>(value);
145 }
146 template <typename MonthsT = Aws::Vector<Month>>
147 MaintenanceWindow& WithMonths(MonthsT&& value) {
148 SetMonths(std::forward<MonthsT>(value));
149 return *this;
150 }
151 template <typename MonthsT = Month>
152 MaintenanceWindow& AddMonths(MonthsT&& value) {
153 m_monthsHasBeenSet = true;
154 m_months.emplace_back(std::forward<MonthsT>(value));
155 return *this;
156 }
158
160
163 inline PatchingModeType GetPatchingMode() const { return m_patchingMode; }
164 inline bool PatchingModeHasBeenSet() const { return m_patchingModeHasBeenSet; }
166 m_patchingModeHasBeenSet = true;
167 m_patchingMode = value;
168 }
170 SetPatchingMode(value);
171 return *this;
172 }
174
176
179 inline PreferenceType GetPreference() const { return m_preference; }
180 inline bool PreferenceHasBeenSet() const { return m_preferenceHasBeenSet; }
181 inline void SetPreference(PreferenceType value) {
182 m_preferenceHasBeenSet = true;
183 m_preference = value;
184 }
186 SetPreference(value);
187 return *this;
188 }
190
192
195 inline bool GetSkipRu() const { return m_skipRu; }
196 inline bool SkipRuHasBeenSet() const { return m_skipRuHasBeenSet; }
197 inline void SetSkipRu(bool value) {
198 m_skipRuHasBeenSet = true;
199 m_skipRu = value;
200 }
201 inline MaintenanceWindow& WithSkipRu(bool value) {
202 SetSkipRu(value);
203 return *this;
204 }
206
208
211 inline const Aws::Vector<int>& GetWeeksOfMonth() const { return m_weeksOfMonth; }
212 inline bool WeeksOfMonthHasBeenSet() const { return m_weeksOfMonthHasBeenSet; }
213 template <typename WeeksOfMonthT = Aws::Vector<int>>
214 void SetWeeksOfMonth(WeeksOfMonthT&& value) {
215 m_weeksOfMonthHasBeenSet = true;
216 m_weeksOfMonth = std::forward<WeeksOfMonthT>(value);
217 }
218 template <typename WeeksOfMonthT = Aws::Vector<int>>
219 MaintenanceWindow& WithWeeksOfMonth(WeeksOfMonthT&& value) {
220 SetWeeksOfMonth(std::forward<WeeksOfMonthT>(value));
221 return *this;
222 }
224 m_weeksOfMonthHasBeenSet = true;
225 m_weeksOfMonth.push_back(value);
226 return *this;
227 }
229 private:
230 int m_customActionTimeoutInMins{0};
231
232 Aws::Vector<DayOfWeek> m_daysOfWeek;
233
234 Aws::Vector<int> m_hoursOfDay;
235
236 bool m_isCustomActionTimeoutEnabled{false};
237
238 int m_leadTimeInWeeks{0};
239
240 Aws::Vector<Month> m_months;
241
243
245
246 bool m_skipRu{false};
247
248 Aws::Vector<int> m_weeksOfMonth;
249 bool m_customActionTimeoutInMinsHasBeenSet = false;
250 bool m_daysOfWeekHasBeenSet = false;
251 bool m_hoursOfDayHasBeenSet = false;
252 bool m_isCustomActionTimeoutEnabledHasBeenSet = false;
253 bool m_leadTimeInWeeksHasBeenSet = false;
254 bool m_monthsHasBeenSet = false;
255 bool m_patchingModeHasBeenSet = false;
256 bool m_preferenceHasBeenSet = false;
257 bool m_skipRuHasBeenSet = false;
258 bool m_weeksOfMonthHasBeenSet = false;
259};
260
261} // namespace Model
262} // namespace odb
263} // namespace Aws
MaintenanceWindow & WithSkipRu(bool value)
const Aws::Vector< DayOfWeek > & GetDaysOfWeek() const
const Aws::Vector< int > & GetHoursOfDay() const
const Aws::Vector< int > & GetWeeksOfMonth() const
void SetHoursOfDay(HoursOfDayT &&value)
MaintenanceWindow & WithLeadTimeInWeeks(int value)
PatchingModeType GetPatchingMode() const
MaintenanceWindow & WithPatchingMode(PatchingModeType value)
MaintenanceWindow & WithPreference(PreferenceType value)
MaintenanceWindow & WithDaysOfWeek(DaysOfWeekT &&value)
MaintenanceWindow & WithHoursOfDay(HoursOfDayT &&value)
MaintenanceWindow & WithIsCustomActionTimeoutEnabled(bool value)
AWS_ODB_API MaintenanceWindow(Aws::Utils::Json::JsonView jsonValue)
const Aws::Vector< Month > & GetMonths() const
void SetPatchingMode(PatchingModeType value)
void SetDaysOfWeek(DaysOfWeekT &&value)
void SetWeeksOfMonth(WeeksOfMonthT &&value)
AWS_ODB_API MaintenanceWindow & operator=(Aws::Utils::Json::JsonView jsonValue)
AWS_ODB_API Aws::Utils::Json::JsonValue Jsonize() const
MaintenanceWindow & WithMonths(MonthsT &&value)
void SetPreference(PreferenceType value)
MaintenanceWindow & AddDaysOfWeek(DaysOfWeekT &&value)
MaintenanceWindow & WithCustomActionTimeoutInMins(int value)
MaintenanceWindow & AddWeeksOfMonth(int value)
AWS_ODB_API MaintenanceWindow()=default
MaintenanceWindow & AddHoursOfDay(int value)
MaintenanceWindow & AddMonths(MonthsT &&value)
MaintenanceWindow & WithWeeksOfMonth(WeeksOfMonthT &&value)
std::vector< T, Aws::Allocator< T > > Vector
Aws::Utils::Json::JsonValue JsonValue