1 + | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
|
2 + | #[allow(missing_docs)] // documentation missing in model
|
3 + | #[non_exhaustive]
|
4 + | #[derive(::std::clone::Clone, ::std::cmp::PartialEq)]
|
5 + | pub struct UpdateMaintenanceWindowInput {
|
6 + | /// <p>The ID of the maintenance window to update.</p>
|
7 + | pub window_id: ::std::option::Option<::std::string::String>,
|
8 + | /// <p>The name of the maintenance window.</p>
|
9 + | pub name: ::std::option::Option<::std::string::String>,
|
10 + | /// <p>An optional description for the update request.</p>
|
11 + | pub description: ::std::option::Option<::std::string::String>,
|
12 + | /// <p>The date and time, in ISO-8601 Extended format, for when you want the maintenance window to become active. <code>StartDate</code> allows you to delay activation of the maintenance window until the specified future date.</p><note>
|
13 + | /// <p>When using a rate schedule, if you provide a start date that occurs in the past, the current date and time are used as the start date.</p>
|
14 + | /// </note>
|
15 + | pub start_date: ::std::option::Option<::std::string::String>,
|
16 + | /// <p>The date and time, in ISO-8601 Extended format, for when you want the maintenance window to become inactive. <code>EndDate</code> allows you to set a date and time in the future when the maintenance window will no longer run.</p>
|
17 + | pub end_date: ::std::option::Option<::std::string::String>,
|
18 + | /// <p>The schedule of the maintenance window in the form of a cron or rate expression.</p>
|
19 + | pub schedule: ::std::option::Option<::std::string::String>,
|
20 + | /// <p>The time zone that the scheduled maintenance window executions are based on, in Internet Assigned Numbers Authority (IANA) format. For example: "America/Los_Angeles", "UTC", or "Asia/Seoul". For more information, see the <a href="https://www.iana.org/time-zones">Time Zone Database</a> on the IANA website.</p>
|
21 + | pub schedule_timezone: ::std::option::Option<::std::string::String>,
|
22 + | /// <p>The number of days to wait after the date and time specified by a cron expression before running the maintenance window.</p>
|
23 + | /// <p>For example, the following cron expression schedules a maintenance window to run the third Tuesday of every month at 11:30 PM.</p>
|
24 + | /// <p><code>cron(30 23 ? * TUE#3 *)</code></p>
|
25 + | /// <p>If the schedule offset is <code>2</code>, the maintenance window won't run until two days later.</p>
|
26 + | pub schedule_offset: ::std::option::Option<i32>,
|
27 + | /// <p>The duration of the maintenance window in hours.</p>
|
28 + | pub duration: ::std::option::Option<i32>,
|
29 + | /// <p>The number of hours before the end of the maintenance window that Amazon Web Services Systems Manager stops scheduling new tasks for execution.</p>
|
30 + | pub cutoff: ::std::option::Option<i32>,
|
31 + | /// <p>Whether targets must be registered with the maintenance window before tasks can be defined for those targets.</p>
|
32 + | pub allow_unassociated_targets: ::std::option::Option<bool>,
|
33 + | /// <p>Whether the maintenance window is enabled.</p>
|
34 + | pub enabled: ::std::option::Option<bool>,
|
35 + | /// <p>If <code>True</code>, then all fields that are required by the <code>CreateMaintenanceWindow</code> operation are also required for this API request. Optional fields that aren't specified are set to null.</p>
|
36 + | pub replace: ::std::option::Option<bool>,
|
37 + | }
|
38 + | impl UpdateMaintenanceWindowInput {
|
39 + | /// <p>The ID of the maintenance window to update.</p>
|
40 + | pub fn window_id(&self) -> ::std::option::Option<&str> {
|
41 + | self.window_id.as_deref()
|
42 + | }
|
43 + | /// <p>The name of the maintenance window.</p>
|
44 + | pub fn name(&self) -> ::std::option::Option<&str> {
|
45 + | self.name.as_deref()
|
46 + | }
|
47 + | /// <p>An optional description for the update request.</p>
|
48 + | pub fn description(&self) -> ::std::option::Option<&str> {
|
49 + | self.description.as_deref()
|
50 + | }
|
51 + | /// <p>The date and time, in ISO-8601 Extended format, for when you want the maintenance window to become active. <code>StartDate</code> allows you to delay activation of the maintenance window until the specified future date.</p><note>
|
52 + | /// <p>When using a rate schedule, if you provide a start date that occurs in the past, the current date and time are used as the start date.</p>
|
53 + | /// </note>
|
54 + | pub fn start_date(&self) -> ::std::option::Option<&str> {
|
55 + | self.start_date.as_deref()
|
56 + | }
|
57 + | /// <p>The date and time, in ISO-8601 Extended format, for when you want the maintenance window to become inactive. <code>EndDate</code> allows you to set a date and time in the future when the maintenance window will no longer run.</p>
|
58 + | pub fn end_date(&self) -> ::std::option::Option<&str> {
|
59 + | self.end_date.as_deref()
|
60 + | }
|
61 + | /// <p>The schedule of the maintenance window in the form of a cron or rate expression.</p>
|
62 + | pub fn schedule(&self) -> ::std::option::Option<&str> {
|
63 + | self.schedule.as_deref()
|
64 + | }
|
65 + | /// <p>The time zone that the scheduled maintenance window executions are based on, in Internet Assigned Numbers Authority (IANA) format. For example: "America/Los_Angeles", "UTC", or "Asia/Seoul". For more information, see the <a href="https://www.iana.org/time-zones">Time Zone Database</a> on the IANA website.</p>
|
66 + | pub fn schedule_timezone(&self) -> ::std::option::Option<&str> {
|
67 + | self.schedule_timezone.as_deref()
|
68 + | }
|
69 + | /// <p>The number of days to wait after the date and time specified by a cron expression before running the maintenance window.</p>
|
70 + | /// <p>For example, the following cron expression schedules a maintenance window to run the third Tuesday of every month at 11:30 PM.</p>
|
71 + | /// <p><code>cron(30 23 ? * TUE#3 *)</code></p>
|
72 + | /// <p>If the schedule offset is <code>2</code>, the maintenance window won't run until two days later.</p>
|
73 + | pub fn schedule_offset(&self) -> ::std::option::Option<i32> {
|
74 + | self.schedule_offset
|
75 + | }
|
76 + | /// <p>The duration of the maintenance window in hours.</p>
|
77 + | pub fn duration(&self) -> ::std::option::Option<i32> {
|
78 + | self.duration
|
79 + | }
|
80 + | /// <p>The number of hours before the end of the maintenance window that Amazon Web Services Systems Manager stops scheduling new tasks for execution.</p>
|
81 + | pub fn cutoff(&self) -> ::std::option::Option<i32> {
|
82 + | self.cutoff
|
83 + | }
|
84 + | /// <p>Whether targets must be registered with the maintenance window before tasks can be defined for those targets.</p>
|
85 + | pub fn allow_unassociated_targets(&self) -> ::std::option::Option<bool> {
|
86 + | self.allow_unassociated_targets
|
87 + | }
|
88 + | /// <p>Whether the maintenance window is enabled.</p>
|
89 + | pub fn enabled(&self) -> ::std::option::Option<bool> {
|
90 + | self.enabled
|
91 + | }
|
92 + | /// <p>If <code>True</code>, then all fields that are required by the <code>CreateMaintenanceWindow</code> operation are also required for this API request. Optional fields that aren't specified are set to null.</p>
|
93 + | pub fn replace(&self) -> ::std::option::Option<bool> {
|
94 + | self.replace
|
95 + | }
|
96 + | }
|
97 + | impl ::std::fmt::Debug for UpdateMaintenanceWindowInput {
|
98 + | fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
|
99 + | let mut formatter = f.debug_struct("UpdateMaintenanceWindowInput");
|
100 + | formatter.field("window_id", &self.window_id);
|
101 + | formatter.field("name", &self.name);
|
102 + | formatter.field("description", &"*** Sensitive Data Redacted ***");
|
103 + | formatter.field("start_date", &self.start_date);
|
104 + | formatter.field("end_date", &self.end_date);
|
105 + | formatter.field("schedule", &self.schedule);
|
106 + | formatter.field("schedule_timezone", &self.schedule_timezone);
|
107 + | formatter.field("schedule_offset", &self.schedule_offset);
|
108 + | formatter.field("duration", &self.duration);
|
109 + | formatter.field("cutoff", &self.cutoff);
|
110 + | formatter.field("allow_unassociated_targets", &self.allow_unassociated_targets);
|
111 + | formatter.field("enabled", &self.enabled);
|
112 + | formatter.field("replace", &self.replace);
|
113 + | formatter.finish()
|
114 + | }
|
115 + | }
|
116 + | static UPDATEMAINTENANCEWINDOWINPUT_MEMBER_WINDOW_ID: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
|
117 + | ::aws_smithy_schema::ShapeId::from_parts(
|
118 + | "com.amazonaws.ssm.synthetic#UpdateMaintenanceWindowInput$WindowId",
|
119 + | "com.amazonaws.ssm.synthetic",
|
120 + | "UpdateMaintenanceWindowInput",
|
121 + | ),
|
122 + | ::aws_smithy_schema::ShapeType::String,
|
123 + | "WindowId",
|
124 + | 0,
|
125 + | );
|
126 + | static UPDATEMAINTENANCEWINDOWINPUT_MEMBER_NAME: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
|
127 + | ::aws_smithy_schema::ShapeId::from_parts(
|
128 + | "com.amazonaws.ssm.synthetic#UpdateMaintenanceWindowInput$Name",
|
129 + | "com.amazonaws.ssm.synthetic",
|
130 + | "UpdateMaintenanceWindowInput",
|
131 + | ),
|
132 + | ::aws_smithy_schema::ShapeType::String,
|
133 + | "Name",
|
134 + | 1,
|
135 + | );
|
136 + | static UPDATEMAINTENANCEWINDOWINPUT_MEMBER_DESCRIPTION: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
|
137 + | ::aws_smithy_schema::ShapeId::from_parts(
|
138 + | "com.amazonaws.ssm.synthetic#UpdateMaintenanceWindowInput$Description",
|
139 + | "com.amazonaws.ssm.synthetic",
|
140 + | "UpdateMaintenanceWindowInput",
|
141 + | ),
|
142 + | ::aws_smithy_schema::ShapeType::String,
|
143 + | "Description",
|
144 + | 2,
|
145 + | );
|
146 + | static UPDATEMAINTENANCEWINDOWINPUT_MEMBER_START_DATE: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
|
147 + | ::aws_smithy_schema::ShapeId::from_parts(
|
148 + | "com.amazonaws.ssm.synthetic#UpdateMaintenanceWindowInput$StartDate",
|
149 + | "com.amazonaws.ssm.synthetic",
|
150 + | "UpdateMaintenanceWindowInput",
|
151 + | ),
|
152 + | ::aws_smithy_schema::ShapeType::String,
|
153 + | "StartDate",
|
154 + | 3,
|
155 + | );
|
156 + | static UPDATEMAINTENANCEWINDOWINPUT_MEMBER_END_DATE: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
|
157 + | ::aws_smithy_schema::ShapeId::from_parts(
|
158 + | "com.amazonaws.ssm.synthetic#UpdateMaintenanceWindowInput$EndDate",
|
159 + | "com.amazonaws.ssm.synthetic",
|
160 + | "UpdateMaintenanceWindowInput",
|
161 + | ),
|
162 + | ::aws_smithy_schema::ShapeType::String,
|
163 + | "EndDate",
|
164 + | 4,
|
165 + | );
|
166 + | static UPDATEMAINTENANCEWINDOWINPUT_MEMBER_SCHEDULE: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
|
167 + | ::aws_smithy_schema::ShapeId::from_parts(
|
168 + | "com.amazonaws.ssm.synthetic#UpdateMaintenanceWindowInput$Schedule",
|
169 + | "com.amazonaws.ssm.synthetic",
|
170 + | "UpdateMaintenanceWindowInput",
|
171 + | ),
|
172 + | ::aws_smithy_schema::ShapeType::String,
|
173 + | "Schedule",
|
174 + | 5,
|
175 + | );
|
176 + | static UPDATEMAINTENANCEWINDOWINPUT_MEMBER_SCHEDULE_TIMEZONE: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
|
177 + | ::aws_smithy_schema::ShapeId::from_parts(
|
178 + | "com.amazonaws.ssm.synthetic#UpdateMaintenanceWindowInput$ScheduleTimezone",
|
179 + | "com.amazonaws.ssm.synthetic",
|
180 + | "UpdateMaintenanceWindowInput",
|
181 + | ),
|
182 + | ::aws_smithy_schema::ShapeType::String,
|
183 + | "ScheduleTimezone",
|
184 + | 6,
|
185 + | );
|
186 + | static UPDATEMAINTENANCEWINDOWINPUT_MEMBER_SCHEDULE_OFFSET: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
|
187 + | ::aws_smithy_schema::ShapeId::from_parts(
|
188 + | "com.amazonaws.ssm.synthetic#UpdateMaintenanceWindowInput$ScheduleOffset",
|
189 + | "com.amazonaws.ssm.synthetic",
|
190 + | "UpdateMaintenanceWindowInput",
|
191 + | ),
|
192 + | ::aws_smithy_schema::ShapeType::Integer,
|
193 + | "ScheduleOffset",
|
194 + | 7,
|
195 + | );
|
196 + | static UPDATEMAINTENANCEWINDOWINPUT_MEMBER_DURATION: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
|
197 + | ::aws_smithy_schema::ShapeId::from_parts(
|
198 + | "com.amazonaws.ssm.synthetic#UpdateMaintenanceWindowInput$Duration",
|
199 + | "com.amazonaws.ssm.synthetic",
|
200 + | "UpdateMaintenanceWindowInput",
|
201 + | ),
|
202 + | ::aws_smithy_schema::ShapeType::Integer,
|
203 + | "Duration",
|
204 + | 8,
|
205 + | );
|
206 + | static UPDATEMAINTENANCEWINDOWINPUT_MEMBER_CUTOFF: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
|
207 + | ::aws_smithy_schema::ShapeId::from_parts(
|
208 + | "com.amazonaws.ssm.synthetic#UpdateMaintenanceWindowInput$Cutoff",
|
209 + | "com.amazonaws.ssm.synthetic",
|
210 + | "UpdateMaintenanceWindowInput",
|
211 + | ),
|
212 + | ::aws_smithy_schema::ShapeType::Integer,
|
213 + | "Cutoff",
|
214 + | 9,
|
215 + | );
|
216 + | static UPDATEMAINTENANCEWINDOWINPUT_MEMBER_ALLOW_UNASSOCIATED_TARGETS: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
|
217 + | ::aws_smithy_schema::ShapeId::from_parts(
|
218 + | "com.amazonaws.ssm.synthetic#UpdateMaintenanceWindowInput$AllowUnassociatedTargets",
|
219 + | "com.amazonaws.ssm.synthetic",
|
220 + | "UpdateMaintenanceWindowInput",
|
221 + | ),
|
222 + | ::aws_smithy_schema::ShapeType::Boolean,
|
223 + | "AllowUnassociatedTargets",
|
224 + | 10,
|
225 + | );
|
226 + | static UPDATEMAINTENANCEWINDOWINPUT_MEMBER_ENABLED: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
|
227 + | ::aws_smithy_schema::ShapeId::from_parts(
|
228 + | "com.amazonaws.ssm.synthetic#UpdateMaintenanceWindowInput$Enabled",
|
229 + | "com.amazonaws.ssm.synthetic",
|
230 + | "UpdateMaintenanceWindowInput",
|
231 + | ),
|
232 + | ::aws_smithy_schema::ShapeType::Boolean,
|
233 + | "Enabled",
|
234 + | 11,
|
235 + | );
|
236 + | static UPDATEMAINTENANCEWINDOWINPUT_MEMBER_REPLACE: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
|
237 + | ::aws_smithy_schema::ShapeId::from_parts(
|
238 + | "com.amazonaws.ssm.synthetic#UpdateMaintenanceWindowInput$Replace",
|
239 + | "com.amazonaws.ssm.synthetic",
|
240 + | "UpdateMaintenanceWindowInput",
|
241 + | ),
|
242 + | ::aws_smithy_schema::ShapeType::Boolean,
|
243 + | "Replace",
|
244 + | 12,
|
245 + | );
|
246 + | static UPDATEMAINTENANCEWINDOWINPUT_SCHEMA: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_struct(
|
247 + | ::aws_smithy_schema::ShapeId::from_parts(
|
248 + | "com.amazonaws.ssm.synthetic#UpdateMaintenanceWindowInput",
|
249 + | "com.amazonaws.ssm.synthetic",
|
250 + | "UpdateMaintenanceWindowInput",
|
251 + | ),
|
252 + | ::aws_smithy_schema::ShapeType::Structure,
|
253 + | &[
|
254 + | &UPDATEMAINTENANCEWINDOWINPUT_MEMBER_WINDOW_ID,
|
255 + | &UPDATEMAINTENANCEWINDOWINPUT_MEMBER_NAME,
|
256 + | &UPDATEMAINTENANCEWINDOWINPUT_MEMBER_DESCRIPTION,
|
257 + | &UPDATEMAINTENANCEWINDOWINPUT_MEMBER_START_DATE,
|
258 + | &UPDATEMAINTENANCEWINDOWINPUT_MEMBER_END_DATE,
|
259 + | &UPDATEMAINTENANCEWINDOWINPUT_MEMBER_SCHEDULE,
|
260 + | &UPDATEMAINTENANCEWINDOWINPUT_MEMBER_SCHEDULE_TIMEZONE,
|
261 + | &UPDATEMAINTENANCEWINDOWINPUT_MEMBER_SCHEDULE_OFFSET,
|
262 + | &UPDATEMAINTENANCEWINDOWINPUT_MEMBER_DURATION,
|
263 + | &UPDATEMAINTENANCEWINDOWINPUT_MEMBER_CUTOFF,
|
264 + | &UPDATEMAINTENANCEWINDOWINPUT_MEMBER_ALLOW_UNASSOCIATED_TARGETS,
|
265 + | &UPDATEMAINTENANCEWINDOWINPUT_MEMBER_ENABLED,
|
266 + | &UPDATEMAINTENANCEWINDOWINPUT_MEMBER_REPLACE,
|
267 + | ],
|
268 + | )
|
269 + | .with_payload_hint(::aws_smithy_schema::PayloadHint::NoStructPayload)
|
270 + | .with_original_name("UpdateMaintenanceWindowRequest");
|
271 + | impl UpdateMaintenanceWindowInput {
|
272 + | /// The schema for this shape.
|
273 + | pub const SCHEMA: &'static ::aws_smithy_schema::Schema<'static> = &UPDATEMAINTENANCEWINDOWINPUT_SCHEMA;
|
274 + | }
|
275 + | impl ::aws_smithy_schema::serde::SerializableStruct for UpdateMaintenanceWindowInput {
|
276 + | #[allow(unused_variables, clippy::diverging_sub_expression)]
|
277 + | fn serialize_members(
|
278 + | &self,
|
279 + | ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
|
280 + | ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
|
281 + | if let Some(ref val) = self.window_id {
|
282 + | ser.write_string(&UPDATEMAINTENANCEWINDOWINPUT_MEMBER_WINDOW_ID, val)?;
|
283 + | }
|
284 + | if let Some(ref val) = self.name {
|
285 + | ser.write_string(&UPDATEMAINTENANCEWINDOWINPUT_MEMBER_NAME, val)?;
|
286 + | }
|
287 + | if let Some(ref val) = self.description {
|
288 + | ser.write_string(&UPDATEMAINTENANCEWINDOWINPUT_MEMBER_DESCRIPTION, val)?;
|
289 + | }
|
290 + | if let Some(ref val) = self.start_date {
|
291 + | ser.write_string(&UPDATEMAINTENANCEWINDOWINPUT_MEMBER_START_DATE, val)?;
|
292 + | }
|
293 + | if let Some(ref val) = self.end_date {
|
294 + | ser.write_string(&UPDATEMAINTENANCEWINDOWINPUT_MEMBER_END_DATE, val)?;
|
295 + | }
|
296 + | if let Some(ref val) = self.schedule {
|
297 + | ser.write_string(&UPDATEMAINTENANCEWINDOWINPUT_MEMBER_SCHEDULE, val)?;
|
298 + | }
|
299 + | if let Some(ref val) = self.schedule_timezone {
|
300 + | ser.write_string(&UPDATEMAINTENANCEWINDOWINPUT_MEMBER_SCHEDULE_TIMEZONE, val)?;
|
301 + | }
|
302 + | if let Some(ref val) = self.schedule_offset {
|
303 + | ser.write_integer(&UPDATEMAINTENANCEWINDOWINPUT_MEMBER_SCHEDULE_OFFSET, *val)?;
|
304 + | }
|
305 + | if let Some(ref val) = self.duration {
|
306 + | ser.write_integer(&UPDATEMAINTENANCEWINDOWINPUT_MEMBER_DURATION, *val)?;
|
307 + | }
|
308 + | if let Some(ref val) = self.cutoff {
|
309 + | ser.write_integer(&UPDATEMAINTENANCEWINDOWINPUT_MEMBER_CUTOFF, *val)?;
|
310 + | }
|
311 + | if let Some(ref val) = self.allow_unassociated_targets {
|
312 + | ser.write_boolean(&UPDATEMAINTENANCEWINDOWINPUT_MEMBER_ALLOW_UNASSOCIATED_TARGETS, *val)?;
|
313 + | }
|
314 + | if let Some(ref val) = self.enabled {
|
315 + | ser.write_boolean(&UPDATEMAINTENANCEWINDOWINPUT_MEMBER_ENABLED, *val)?;
|
316 + | }
|
317 + | if let Some(ref val) = self.replace {
|
318 + | ser.write_boolean(&UPDATEMAINTENANCEWINDOWINPUT_MEMBER_REPLACE, *val)?;
|
319 + | }
|
320 + | Ok(())
|
321 + | }
|
322 + | }
|
323 + | impl UpdateMaintenanceWindowInput {
|
324 + | /// Deserializes this structure from a [`ShapeDeserializer`].
|
325 + | pub fn deserialize(
|
326 + | deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
|
327 + | ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
|
328 + | #[allow(unused_variables, unused_mut)]
|
329 + | let mut builder = Self::builder();
|
330 + | #[allow(
|
331 + | unused_variables,
|
332 + | unreachable_code,
|
333 + | clippy::single_match,
|
334 + | clippy::match_single_binding,
|
335 + | clippy::diverging_sub_expression
|
336 + | )]
|
337 + | deserializer.read_struct(&UPDATEMAINTENANCEWINDOWINPUT_SCHEMA, &mut |member, deser| {
|
338 + | match member.member_index() {
|
339 + | Some(0) => {
|
340 + | if deser.is_null() {
|
341 + | deser.read_null()?;
|
342 + | } else {
|
343 + | builder.window_id = Some(deser.read_string(member)?);
|
344 + | }
|
345 + | }
|
346 + | Some(1) => {
|
347 + | if deser.is_null() {
|
348 + | deser.read_null()?;
|
349 + | } else {
|
350 + | builder.name = Some(deser.read_string(member)?);
|
351 + | }
|
352 + | }
|
353 + | Some(2) => {
|
354 + | if deser.is_null() {
|
355 + | deser.read_null()?;
|
356 + | } else {
|
357 + | builder.description = Some(deser.read_string(member)?);
|
358 + | }
|
359 + | }
|
360 + | Some(3) => {
|
361 + | if deser.is_null() {
|
362 + | deser.read_null()?;
|
363 + | } else {
|
364 + | builder.start_date = Some(deser.read_string(member)?);
|
365 + | }
|
366 + | }
|
367 + | Some(4) => {
|
368 + | if deser.is_null() {
|
369 + | deser.read_null()?;
|
370 + | } else {
|
371 + | builder.end_date = Some(deser.read_string(member)?);
|
372 + | }
|
373 + | }
|
374 + | Some(5) => {
|
375 + | if deser.is_null() {
|
376 + | deser.read_null()?;
|
377 + | } else {
|
378 + | builder.schedule = Some(deser.read_string(member)?);
|
379 + | }
|
380 + | }
|
381 + | Some(6) => {
|
382 + | if deser.is_null() {
|
383 + | deser.read_null()?;
|
384 + | } else {
|
385 + | builder.schedule_timezone = Some(deser.read_string(member)?);
|
386 + | }
|
387 + | }
|
388 + | Some(7) => {
|
389 + | if deser.is_null() {
|
390 + | deser.read_null()?;
|
391 + | } else {
|
392 + | builder.schedule_offset = Some(deser.read_integer(member)?);
|
393 + | }
|
394 + | }
|
395 + | Some(8) => {
|
396 + | if deser.is_null() {
|
397 + | deser.read_null()?;
|
398 + | } else {
|
399 + | builder.duration = Some(deser.read_integer(member)?);
|
400 + | }
|
401 + | }
|
402 + | Some(9) => {
|
403 + | if deser.is_null() {
|
404 + | deser.read_null()?;
|
405 + | } else {
|
406 + | builder.cutoff = Some(deser.read_integer(member)?);
|
407 + | }
|
408 + | }
|
409 + | Some(10) => {
|
410 + | if deser.is_null() {
|
411 + | deser.read_null()?;
|
412 + | } else {
|
413 + | builder.allow_unassociated_targets = Some(deser.read_boolean(member)?);
|
414 + | }
|
415 + | }
|
416 + | Some(11) => {
|
417 + | if deser.is_null() {
|
418 + | deser.read_null()?;
|
419 + | } else {
|
420 + | builder.enabled = Some(deser.read_boolean(member)?);
|
421 + | }
|
422 + | }
|
423 + | Some(12) => {
|
424 + | if deser.is_null() {
|
425 + | deser.read_null()?;
|
426 + | } else {
|
427 + | builder.replace = Some(deser.read_boolean(member)?);
|
428 + | }
|
429 + | }
|
430 + | _ => {}
|
431 + | }
|
432 + | Ok(())
|
433 + | })?;
|
434 + | builder.window_id = builder.window_id.or(Some(String::new()));
|
435 + | builder.build().map_err(|e| aws_smithy_schema::serde::SerdeError::custom(e.to_string()))
|
436 + | }
|
437 + | }
|
438 + | impl UpdateMaintenanceWindowInput {
|
439 + | /// Deserializes this structure from a body deserializer and HTTP response.
|
440 + | pub fn deserialize_with_response(
|
441 + | deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
|
442 + | _headers: &::aws_smithy_runtime_api::http::Headers,
|
443 + | _status: u16,
|
444 + | _body: &[u8],
|
445 + | ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
|
446 + | Self::deserialize(deserializer)
|
447 + | }
|
448 + | }
|
449 + | impl UpdateMaintenanceWindowInput {
|
450 + | /// Creates a new builder-style object to manufacture [`UpdateMaintenanceWindowInput`](crate::operation::update_maintenance_window::UpdateMaintenanceWindowInput).
|
451 + | pub fn builder() -> crate::operation::update_maintenance_window::builders::UpdateMaintenanceWindowInputBuilder {
|
452 + | crate::operation::update_maintenance_window::builders::UpdateMaintenanceWindowInputBuilder::default()
|
453 + | }
|
454 + | }
|
455 + |
|
456 + | /// A builder for [`UpdateMaintenanceWindowInput`](crate::operation::update_maintenance_window::UpdateMaintenanceWindowInput).
|
457 + | #[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
|
458 + | #[non_exhaustive]
|
459 + | pub struct UpdateMaintenanceWindowInputBuilder {
|
460 + | pub(crate) window_id: ::std::option::Option<::std::string::String>,
|
461 + | pub(crate) name: ::std::option::Option<::std::string::String>,
|
462 + | pub(crate) description: ::std::option::Option<::std::string::String>,
|
463 + | pub(crate) start_date: ::std::option::Option<::std::string::String>,
|
464 + | pub(crate) end_date: ::std::option::Option<::std::string::String>,
|
465 + | pub(crate) schedule: ::std::option::Option<::std::string::String>,
|
466 + | pub(crate) schedule_timezone: ::std::option::Option<::std::string::String>,
|
467 + | pub(crate) schedule_offset: ::std::option::Option<i32>,
|
468 + | pub(crate) duration: ::std::option::Option<i32>,
|
469 + | pub(crate) cutoff: ::std::option::Option<i32>,
|
470 + | pub(crate) allow_unassociated_targets: ::std::option::Option<bool>,
|
471 + | pub(crate) enabled: ::std::option::Option<bool>,
|
472 + | pub(crate) replace: ::std::option::Option<bool>,
|
473 + | }
|
474 + | impl UpdateMaintenanceWindowInputBuilder {
|
475 + | /// <p>The ID of the maintenance window to update.</p>
|
476 + | /// This field is required.
|
477 + | pub fn window_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
|
478 + | self.window_id = ::std::option::Option::Some(input.into());
|
479 + | self
|
480 + | }
|
481 + | /// <p>The ID of the maintenance window to update.</p>
|
482 + | pub fn set_window_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
|
483 + | self.window_id = input;
|
484 + | self
|
485 + | }
|
486 + | /// <p>The ID of the maintenance window to update.</p>
|
487 + | pub fn get_window_id(&self) -> &::std::option::Option<::std::string::String> {
|
488 + | &self.window_id
|
489 + | }
|
490 + | /// <p>The name of the maintenance window.</p>
|
491 + | pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
|
492 + | self.name = ::std::option::Option::Some(input.into());
|
493 + | self
|
494 + | }
|
495 + | /// <p>The name of the maintenance window.</p>
|
496 + | pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
|
497 + | self.name = input;
|
498 + | self
|
499 + | }
|
500 + | /// <p>The name of the maintenance window.</p>
|
501 + | pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
|
502 + | &self.name
|
503 + | }
|
504 + | /// <p>An optional description for the update request.</p>
|
505 + | pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
|
506 + | self.description = ::std::option::Option::Some(input.into());
|
507 + | self
|
508 + | }
|
509 + | /// <p>An optional description for the update request.</p>
|
510 + | pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
|
511 + | self.description = input;
|
512 + | self
|
513 + | }
|
514 + | /// <p>An optional description for the update request.</p>
|
515 + | pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
|
516 + | &self.description
|
517 + | }
|
518 + | /// <p>The date and time, in ISO-8601 Extended format, for when you want the maintenance window to become active. <code>StartDate</code> allows you to delay activation of the maintenance window until the specified future date.</p><note>
|
519 + | /// <p>When using a rate schedule, if you provide a start date that occurs in the past, the current date and time are used as the start date.</p>
|
520 + | /// </note>
|
521 + | pub fn start_date(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
|
522 + | self.start_date = ::std::option::Option::Some(input.into());
|
523 + | self
|
524 + | }
|
525 + | /// <p>The date and time, in ISO-8601 Extended format, for when you want the maintenance window to become active. <code>StartDate</code> allows you to delay activation of the maintenance window until the specified future date.</p><note>
|
526 + | /// <p>When using a rate schedule, if you provide a start date that occurs in the past, the current date and time are used as the start date.</p>
|
527 + | /// </note>
|
528 + | pub fn set_start_date(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
|
529 + | self.start_date = input;
|
530 + | self
|
531 + | }
|
532 + | /// <p>The date and time, in ISO-8601 Extended format, for when you want the maintenance window to become active. <code>StartDate</code> allows you to delay activation of the maintenance window until the specified future date.</p><note>
|
533 + | /// <p>When using a rate schedule, if you provide a start date that occurs in the past, the current date and time are used as the start date.</p>
|
534 + | /// </note>
|
535 + | pub fn get_start_date(&self) -> &::std::option::Option<::std::string::String> {
|
536 + | &self.start_date
|
537 + | }
|
538 + | /// <p>The date and time, in ISO-8601 Extended format, for when you want the maintenance window to become inactive. <code>EndDate</code> allows you to set a date and time in the future when the maintenance window will no longer run.</p>
|
539 + | pub fn end_date(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
|
540 + | self.end_date = ::std::option::Option::Some(input.into());
|
541 + | self
|
542 + | }
|
543 + | /// <p>The date and time, in ISO-8601 Extended format, for when you want the maintenance window to become inactive. <code>EndDate</code> allows you to set a date and time in the future when the maintenance window will no longer run.</p>
|
544 + | pub fn set_end_date(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
|
545 + | self.end_date = input;
|
546 + | self
|
547 + | }
|
548 + | /// <p>The date and time, in ISO-8601 Extended format, for when you want the maintenance window to become inactive. <code>EndDate</code> allows you to set a date and time in the future when the maintenance window will no longer run.</p>
|
549 + | pub fn get_end_date(&self) -> &::std::option::Option<::std::string::String> {
|
550 + | &self.end_date
|
551 + | }
|
552 + | /// <p>The schedule of the maintenance window in the form of a cron or rate expression.</p>
|
553 + | pub fn schedule(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
|
554 + | self.schedule = ::std::option::Option::Some(input.into());
|
555 + | self
|
556 + | }
|
557 + | /// <p>The schedule of the maintenance window in the form of a cron or rate expression.</p>
|
558 + | pub fn set_schedule(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
|
559 + | self.schedule = input;
|
560 + | self
|
561 + | }
|
562 + | /// <p>The schedule of the maintenance window in the form of a cron or rate expression.</p>
|
563 + | pub fn get_schedule(&self) -> &::std::option::Option<::std::string::String> {
|
564 + | &self.schedule
|
565 + | }
|
566 + | /// <p>The time zone that the scheduled maintenance window executions are based on, in Internet Assigned Numbers Authority (IANA) format. For example: "America/Los_Angeles", "UTC", or "Asia/Seoul". For more information, see the <a href="https://www.iana.org/time-zones">Time Zone Database</a> on the IANA website.</p>
|
567 + | pub fn schedule_timezone(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
|
568 + | self.schedule_timezone = ::std::option::Option::Some(input.into());
|
569 + | self
|
570 + | }
|
571 + | /// <p>The time zone that the scheduled maintenance window executions are based on, in Internet Assigned Numbers Authority (IANA) format. For example: "America/Los_Angeles", "UTC", or "Asia/Seoul". For more information, see the <a href="https://www.iana.org/time-zones">Time Zone Database</a> on the IANA website.</p>
|
572 + | pub fn set_schedule_timezone(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
|
573 + | self.schedule_timezone = input;
|
574 + | self
|
575 + | }
|
576 + | /// <p>The time zone that the scheduled maintenance window executions are based on, in Internet Assigned Numbers Authority (IANA) format. For example: "America/Los_Angeles", "UTC", or "Asia/Seoul". For more information, see the <a href="https://www.iana.org/time-zones">Time Zone Database</a> on the IANA website.</p>
|
577 + | pub fn get_schedule_timezone(&self) -> &::std::option::Option<::std::string::String> {
|
578 + | &self.schedule_timezone
|
579 + | }
|
580 + | /// <p>The number of days to wait after the date and time specified by a cron expression before running the maintenance window.</p>
|
581 + | /// <p>For example, the following cron expression schedules a maintenance window to run the third Tuesday of every month at 11:30 PM.</p>
|
582 + | /// <p><code>cron(30 23 ? * TUE#3 *)</code></p>
|
583 + | /// <p>If the schedule offset is <code>2</code>, the maintenance window won't run until two days later.</p>
|
584 + | pub fn schedule_offset(mut self, input: i32) -> Self {
|
585 + | self.schedule_offset = ::std::option::Option::Some(input);
|
586 + | self
|
587 + | }
|
588 + | /// <p>The number of days to wait after the date and time specified by a cron expression before running the maintenance window.</p>
|
589 + | /// <p>For example, the following cron expression schedules a maintenance window to run the third Tuesday of every month at 11:30 PM.</p>
|
590 + | /// <p><code>cron(30 23 ? * TUE#3 *)</code></p>
|
591 + | /// <p>If the schedule offset is <code>2</code>, the maintenance window won't run until two days later.</p>
|
592 + | pub fn set_schedule_offset(mut self, input: ::std::option::Option<i32>) -> Self {
|
593 + | self.schedule_offset = input;
|
594 + | self
|
595 + | }
|
596 + | /// <p>The number of days to wait after the date and time specified by a cron expression before running the maintenance window.</p>
|
597 + | /// <p>For example, the following cron expression schedules a maintenance window to run the third Tuesday of every month at 11:30 PM.</p>
|
598 + | /// <p><code>cron(30 23 ? * TUE#3 *)</code></p>
|
599 + | /// <p>If the schedule offset is <code>2</code>, the maintenance window won't run until two days later.</p>
|
600 + | pub fn get_schedule_offset(&self) -> &::std::option::Option<i32> {
|
601 + | &self.schedule_offset
|
602 + | }
|
603 + | /// <p>The duration of the maintenance window in hours.</p>
|
604 + | pub fn duration(mut self, input: i32) -> Self {
|
605 + | self.duration = ::std::option::Option::Some(input);
|
606 + | self
|
607 + | }
|
608 + | /// <p>The duration of the maintenance window in hours.</p>
|
609 + | pub fn set_duration(mut self, input: ::std::option::Option<i32>) -> Self {
|
610 + | self.duration = input;
|
611 + | self
|
612 + | }
|
613 + | /// <p>The duration of the maintenance window in hours.</p>
|
614 + | pub fn get_duration(&self) -> &::std::option::Option<i32> {
|
615 + | &self.duration
|
616 + | }
|
617 + | /// <p>The number of hours before the end of the maintenance window that Amazon Web Services Systems Manager stops scheduling new tasks for execution.</p>
|
618 + | pub fn cutoff(mut self, input: i32) -> Self {
|
619 + | self.cutoff = ::std::option::Option::Some(input);
|
620 + | self
|
621 + | }
|
622 + | /// <p>The number of hours before the end of the maintenance window that Amazon Web Services Systems Manager stops scheduling new tasks for execution.</p>
|
623 + | pub fn set_cutoff(mut self, input: ::std::option::Option<i32>) -> Self {
|
624 + | self.cutoff = input;
|
625 + | self
|
626 + | }
|
627 + | /// <p>The number of hours before the end of the maintenance window that Amazon Web Services Systems Manager stops scheduling new tasks for execution.</p>
|
628 + | pub fn get_cutoff(&self) -> &::std::option::Option<i32> {
|
629 + | &self.cutoff
|
630 + | }
|
631 + | /// <p>Whether targets must be registered with the maintenance window before tasks can be defined for those targets.</p>
|
632 + | pub fn allow_unassociated_targets(mut self, input: bool) -> Self {
|
633 + | self.allow_unassociated_targets = ::std::option::Option::Some(input);
|
634 + | self
|
635 + | }
|
636 + | /// <p>Whether targets must be registered with the maintenance window before tasks can be defined for those targets.</p>
|
637 + | pub fn set_allow_unassociated_targets(mut self, input: ::std::option::Option<bool>) -> Self {
|
638 + | self.allow_unassociated_targets = input;
|
639 + | self
|
640 + | }
|
641 + | /// <p>Whether targets must be registered with the maintenance window before tasks can be defined for those targets.</p>
|
642 + | pub fn get_allow_unassociated_targets(&self) -> &::std::option::Option<bool> {
|
643 + | &self.allow_unassociated_targets
|
644 + | }
|
645 + | /// <p>Whether the maintenance window is enabled.</p>
|
646 + | pub fn enabled(mut self, input: bool) -> Self {
|
647 + | self.enabled = ::std::option::Option::Some(input);
|
648 + | self
|
649 + | }
|
650 + | /// <p>Whether the maintenance window is enabled.</p>
|
651 + | pub fn set_enabled(mut self, input: ::std::option::Option<bool>) -> Self {
|
652 + | self.enabled = input;
|
653 + | self
|
654 + | }
|
655 + | /// <p>Whether the maintenance window is enabled.</p>
|
656 + | pub fn get_enabled(&self) -> &::std::option::Option<bool> {
|
657 + | &self.enabled
|
658 + | }
|
659 + | /// <p>If <code>True</code>, then all fields that are required by the <code>CreateMaintenanceWindow</code> operation are also required for this API request. Optional fields that aren't specified are set to null.</p>
|
660 + | pub fn replace(mut self, input: bool) -> Self {
|
661 + | self.replace = ::std::option::Option::Some(input);
|
662 + | self
|
663 + | }
|
664 + | /// <p>If <code>True</code>, then all fields that are required by the <code>CreateMaintenanceWindow</code> operation are also required for this API request. Optional fields that aren't specified are set to null.</p>
|
665 + | pub fn set_replace(mut self, input: ::std::option::Option<bool>) -> Self {
|
666 + | self.replace = input;
|
667 + | self
|
668 + | }
|
669 + | /// <p>If <code>True</code>, then all fields that are required by the <code>CreateMaintenanceWindow</code> operation are also required for this API request. Optional fields that aren't specified are set to null.</p>
|
670 + | pub fn get_replace(&self) -> &::std::option::Option<bool> {
|
671 + | &self.replace
|
672 + | }
|
673 + | /// Consumes the builder and constructs a [`UpdateMaintenanceWindowInput`](crate::operation::update_maintenance_window::UpdateMaintenanceWindowInput).
|
674 + | pub fn build(
|
675 + | self,
|
676 + | ) -> ::std::result::Result<
|
677 + | crate::operation::update_maintenance_window::UpdateMaintenanceWindowInput,
|
678 + | ::aws_smithy_types::error::operation::BuildError,
|
679 + | > {
|
680 + | ::std::result::Result::Ok(crate::operation::update_maintenance_window::UpdateMaintenanceWindowInput {
|
681 + | window_id: self.window_id,
|
682 + | name: self.name,
|
683 + | description: self.description,
|
684 + | start_date: self.start_date,
|
685 + | end_date: self.end_date,
|
686 + | schedule: self.schedule,
|
687 + | schedule_timezone: self.schedule_timezone,
|
688 + | schedule_offset: self.schedule_offset,
|
689 + | duration: self.duration,
|
690 + | cutoff: self.cutoff,
|
691 + | allow_unassociated_targets: self.allow_unassociated_targets,
|
692 + | enabled: self.enabled,
|
693 + | replace: self.replace,
|
694 + | })
|
695 + | }
|
696 + | }
|
697 + | impl ::std::fmt::Debug for UpdateMaintenanceWindowInputBuilder {
|
698 + | fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
|
699 + | let mut formatter = f.debug_struct("UpdateMaintenanceWindowInputBuilder");
|
700 + | formatter.field("window_id", &self.window_id);
|
701 + | formatter.field("name", &self.name);
|
702 + | formatter.field("description", &"*** Sensitive Data Redacted ***");
|
703 + | formatter.field("start_date", &self.start_date);
|
704 + | formatter.field("end_date", &self.end_date);
|
705 + | formatter.field("schedule", &self.schedule);
|
706 + | formatter.field("schedule_timezone", &self.schedule_timezone);
|
707 + | formatter.field("schedule_offset", &self.schedule_offset);
|
708 + | formatter.field("duration", &self.duration);
|
709 + | formatter.field("cutoff", &self.cutoff);
|
710 + | formatter.field("allow_unassociated_targets", &self.allow_unassociated_targets);
|
711 + | formatter.field("enabled", &self.enabled);
|
712 + | formatter.field("replace", &self.replace);
|
713 + | formatter.finish()
|
714 + | }
|
715 + | }
|