1 + | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
|
2 + |
|
3 + | /// <p>Information about the maintenance window.</p>
|
4 + | #[non_exhaustive]
|
5 + | #[derive(::std::clone::Clone, ::std::cmp::PartialEq)]
|
6 + | pub struct MaintenanceWindowIdentity {
|
7 + | /// <p>The ID of the maintenance window.</p>
|
8 + | pub window_id: ::std::option::Option<::std::string::String>,
|
9 + | /// <p>The name of the maintenance window.</p>
|
10 + | pub name: ::std::option::Option<::std::string::String>,
|
11 + | /// <p>A description of the maintenance window.</p>
|
12 + | pub description: ::std::option::Option<::std::string::String>,
|
13 + | /// <p>Indicates whether the maintenance window is enabled.</p>
|
14 + | pub enabled: bool,
|
15 + | /// <p>The duration of the maintenance window in hours.</p>
|
16 + | pub duration: ::std::option::Option<i32>,
|
17 + | /// <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>
|
18 + | pub cutoff: i32,
|
19 + | /// <p>The schedule of the maintenance window in the form of a cron or rate expression.</p>
|
20 + | pub schedule: ::std::option::Option<::std::string::String>,
|
21 + | /// <p>The time zone that the scheduled maintenance window executions are based on, in Internet Assigned Numbers Authority (IANA) format.</p>
|
22 + | pub schedule_timezone: ::std::option::Option<::std::string::String>,
|
23 + | /// <p>The number of days to wait to run a maintenance window after the scheduled cron expression date and time.</p>
|
24 + | pub schedule_offset: ::std::option::Option<i32>,
|
25 + | /// <p>The date and time, in ISO-8601 Extended format, for when the maintenance window is scheduled to become inactive.</p>
|
26 + | pub end_date: ::std::option::Option<::std::string::String>,
|
27 + | /// <p>The date and time, in ISO-8601 Extended format, for when the maintenance window is scheduled to become active.</p>
|
28 + | pub start_date: ::std::option::Option<::std::string::String>,
|
29 + | /// <p>The next time the maintenance window will actually run, taking into account any specified times for the maintenance window to become active or inactive.</p>
|
30 + | pub next_execution_time: ::std::option::Option<::std::string::String>,
|
31 + | }
|
32 + | impl MaintenanceWindowIdentity {
|
33 + | /// <p>The ID of the maintenance window.</p>
|
34 + | pub fn window_id(&self) -> ::std::option::Option<&str> {
|
35 + | self.window_id.as_deref()
|
36 + | }
|
37 + | /// <p>The name of the maintenance window.</p>
|
38 + | pub fn name(&self) -> ::std::option::Option<&str> {
|
39 + | self.name.as_deref()
|
40 + | }
|
41 + | /// <p>A description of the maintenance window.</p>
|
42 + | pub fn description(&self) -> ::std::option::Option<&str> {
|
43 + | self.description.as_deref()
|
44 + | }
|
45 + | /// <p>Indicates whether the maintenance window is enabled.</p>
|
46 + | pub fn enabled(&self) -> bool {
|
47 + | self.enabled
|
48 + | }
|
49 + | /// <p>The duration of the maintenance window in hours.</p>
|
50 + | pub fn duration(&self) -> ::std::option::Option<i32> {
|
51 + | self.duration
|
52 + | }
|
53 + | /// <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>
|
54 + | pub fn cutoff(&self) -> i32 {
|
55 + | self.cutoff
|
56 + | }
|
57 + | /// <p>The schedule of the maintenance window in the form of a cron or rate expression.</p>
|
58 + | pub fn schedule(&self) -> ::std::option::Option<&str> {
|
59 + | self.schedule.as_deref()
|
60 + | }
|
61 + | /// <p>The time zone that the scheduled maintenance window executions are based on, in Internet Assigned Numbers Authority (IANA) format.</p>
|
62 + | pub fn schedule_timezone(&self) -> ::std::option::Option<&str> {
|
63 + | self.schedule_timezone.as_deref()
|
64 + | }
|
65 + | /// <p>The number of days to wait to run a maintenance window after the scheduled cron expression date and time.</p>
|
66 + | pub fn schedule_offset(&self) -> ::std::option::Option<i32> {
|
67 + | self.schedule_offset
|
68 + | }
|
69 + | /// <p>The date and time, in ISO-8601 Extended format, for when the maintenance window is scheduled to become inactive.</p>
|
70 + | pub fn end_date(&self) -> ::std::option::Option<&str> {
|
71 + | self.end_date.as_deref()
|
72 + | }
|
73 + | /// <p>The date and time, in ISO-8601 Extended format, for when the maintenance window is scheduled to become active.</p>
|
74 + | pub fn start_date(&self) -> ::std::option::Option<&str> {
|
75 + | self.start_date.as_deref()
|
76 + | }
|
77 + | /// <p>The next time the maintenance window will actually run, taking into account any specified times for the maintenance window to become active or inactive.</p>
|
78 + | pub fn next_execution_time(&self) -> ::std::option::Option<&str> {
|
79 + | self.next_execution_time.as_deref()
|
80 + | }
|
81 + | }
|
82 + | impl ::std::fmt::Debug for MaintenanceWindowIdentity {
|
83 + | fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
|
84 + | let mut formatter = f.debug_struct("MaintenanceWindowIdentity");
|
85 + | formatter.field("window_id", &self.window_id);
|
86 + | formatter.field("name", &self.name);
|
87 + | formatter.field("description", &"*** Sensitive Data Redacted ***");
|
88 + | formatter.field("enabled", &self.enabled);
|
89 + | formatter.field("duration", &self.duration);
|
90 + | formatter.field("cutoff", &self.cutoff);
|
91 + | formatter.field("schedule", &self.schedule);
|
92 + | formatter.field("schedule_timezone", &self.schedule_timezone);
|
93 + | formatter.field("schedule_offset", &self.schedule_offset);
|
94 + | formatter.field("end_date", &self.end_date);
|
95 + | formatter.field("start_date", &self.start_date);
|
96 + | formatter.field("next_execution_time", &self.next_execution_time);
|
97 + | formatter.finish()
|
98 + | }
|
99 + | }
|
100 + | static MAINTENANCEWINDOWIDENTITY_MEMBER_WINDOW_ID: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
|
101 + | ::aws_smithy_schema::ShapeId::from_parts(
|
102 + | "com.amazonaws.ssm#MaintenanceWindowIdentity$WindowId",
|
103 + | "com.amazonaws.ssm",
|
104 + | "MaintenanceWindowIdentity",
|
105 + | ),
|
106 + | ::aws_smithy_schema::ShapeType::String,
|
107 + | "WindowId",
|
108 + | 0,
|
109 + | );
|
110 + | static MAINTENANCEWINDOWIDENTITY_MEMBER_NAME: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
|
111 + | ::aws_smithy_schema::ShapeId::from_parts(
|
112 + | "com.amazonaws.ssm#MaintenanceWindowIdentity$Name",
|
113 + | "com.amazonaws.ssm",
|
114 + | "MaintenanceWindowIdentity",
|
115 + | ),
|
116 + | ::aws_smithy_schema::ShapeType::String,
|
117 + | "Name",
|
118 + | 1,
|
119 + | );
|
120 + | static MAINTENANCEWINDOWIDENTITY_MEMBER_DESCRIPTION: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
|
121 + | ::aws_smithy_schema::ShapeId::from_parts(
|
122 + | "com.amazonaws.ssm#MaintenanceWindowIdentity$Description",
|
123 + | "com.amazonaws.ssm",
|
124 + | "MaintenanceWindowIdentity",
|
125 + | ),
|
126 + | ::aws_smithy_schema::ShapeType::String,
|
127 + | "Description",
|
128 + | 2,
|
129 + | );
|
130 + | static MAINTENANCEWINDOWIDENTITY_MEMBER_ENABLED: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
|
131 + | ::aws_smithy_schema::ShapeId::from_parts(
|
132 + | "com.amazonaws.ssm#MaintenanceWindowIdentity$Enabled",
|
133 + | "com.amazonaws.ssm",
|
134 + | "MaintenanceWindowIdentity",
|
135 + | ),
|
136 + | ::aws_smithy_schema::ShapeType::Boolean,
|
137 + | "Enabled",
|
138 + | 3,
|
139 + | );
|
140 + | static MAINTENANCEWINDOWIDENTITY_MEMBER_DURATION: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
|
141 + | ::aws_smithy_schema::ShapeId::from_parts(
|
142 + | "com.amazonaws.ssm#MaintenanceWindowIdentity$Duration",
|
143 + | "com.amazonaws.ssm",
|
144 + | "MaintenanceWindowIdentity",
|
145 + | ),
|
146 + | ::aws_smithy_schema::ShapeType::Integer,
|
147 + | "Duration",
|
148 + | 4,
|
149 + | );
|
150 + | static MAINTENANCEWINDOWIDENTITY_MEMBER_CUTOFF: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
|
151 + | ::aws_smithy_schema::ShapeId::from_parts(
|
152 + | "com.amazonaws.ssm#MaintenanceWindowIdentity$Cutoff",
|
153 + | "com.amazonaws.ssm",
|
154 + | "MaintenanceWindowIdentity",
|
155 + | ),
|
156 + | ::aws_smithy_schema::ShapeType::Integer,
|
157 + | "Cutoff",
|
158 + | 5,
|
159 + | );
|
160 + | static MAINTENANCEWINDOWIDENTITY_MEMBER_SCHEDULE: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
|
161 + | ::aws_smithy_schema::ShapeId::from_parts(
|
162 + | "com.amazonaws.ssm#MaintenanceWindowIdentity$Schedule",
|
163 + | "com.amazonaws.ssm",
|
164 + | "MaintenanceWindowIdentity",
|
165 + | ),
|
166 + | ::aws_smithy_schema::ShapeType::String,
|
167 + | "Schedule",
|
168 + | 6,
|
169 + | );
|
170 + | static MAINTENANCEWINDOWIDENTITY_MEMBER_SCHEDULE_TIMEZONE: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
|
171 + | ::aws_smithy_schema::ShapeId::from_parts(
|
172 + | "com.amazonaws.ssm#MaintenanceWindowIdentity$ScheduleTimezone",
|
173 + | "com.amazonaws.ssm",
|
174 + | "MaintenanceWindowIdentity",
|
175 + | ),
|
176 + | ::aws_smithy_schema::ShapeType::String,
|
177 + | "ScheduleTimezone",
|
178 + | 7,
|
179 + | );
|
180 + | static MAINTENANCEWINDOWIDENTITY_MEMBER_SCHEDULE_OFFSET: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
|
181 + | ::aws_smithy_schema::ShapeId::from_parts(
|
182 + | "com.amazonaws.ssm#MaintenanceWindowIdentity$ScheduleOffset",
|
183 + | "com.amazonaws.ssm",
|
184 + | "MaintenanceWindowIdentity",
|
185 + | ),
|
186 + | ::aws_smithy_schema::ShapeType::Integer,
|
187 + | "ScheduleOffset",
|
188 + | 8,
|
189 + | );
|
190 + | static MAINTENANCEWINDOWIDENTITY_MEMBER_END_DATE: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
|
191 + | ::aws_smithy_schema::ShapeId::from_parts(
|
192 + | "com.amazonaws.ssm#MaintenanceWindowIdentity$EndDate",
|
193 + | "com.amazonaws.ssm",
|
194 + | "MaintenanceWindowIdentity",
|
195 + | ),
|
196 + | ::aws_smithy_schema::ShapeType::String,
|
197 + | "EndDate",
|
198 + | 9,
|
199 + | );
|
200 + | static MAINTENANCEWINDOWIDENTITY_MEMBER_START_DATE: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
|
201 + | ::aws_smithy_schema::ShapeId::from_parts(
|
202 + | "com.amazonaws.ssm#MaintenanceWindowIdentity$StartDate",
|
203 + | "com.amazonaws.ssm",
|
204 + | "MaintenanceWindowIdentity",
|
205 + | ),
|
206 + | ::aws_smithy_schema::ShapeType::String,
|
207 + | "StartDate",
|
208 + | 10,
|
209 + | );
|
210 + | static MAINTENANCEWINDOWIDENTITY_MEMBER_NEXT_EXECUTION_TIME: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
|
211 + | ::aws_smithy_schema::ShapeId::from_parts(
|
212 + | "com.amazonaws.ssm#MaintenanceWindowIdentity$NextExecutionTime",
|
213 + | "com.amazonaws.ssm",
|
214 + | "MaintenanceWindowIdentity",
|
215 + | ),
|
216 + | ::aws_smithy_schema::ShapeType::String,
|
217 + | "NextExecutionTime",
|
218 + | 11,
|
219 + | );
|
220 + | static MAINTENANCEWINDOWIDENTITY_SCHEMA: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_struct(
|
221 + | ::aws_smithy_schema::ShapeId::from_parts(
|
222 + | "com.amazonaws.ssm#MaintenanceWindowIdentity",
|
223 + | "com.amazonaws.ssm",
|
224 + | "MaintenanceWindowIdentity",
|
225 + | ),
|
226 + | ::aws_smithy_schema::ShapeType::Structure,
|
227 + | &[
|
228 + | &MAINTENANCEWINDOWIDENTITY_MEMBER_WINDOW_ID,
|
229 + | &MAINTENANCEWINDOWIDENTITY_MEMBER_NAME,
|
230 + | &MAINTENANCEWINDOWIDENTITY_MEMBER_DESCRIPTION,
|
231 + | &MAINTENANCEWINDOWIDENTITY_MEMBER_ENABLED,
|
232 + | &MAINTENANCEWINDOWIDENTITY_MEMBER_DURATION,
|
233 + | &MAINTENANCEWINDOWIDENTITY_MEMBER_CUTOFF,
|
234 + | &MAINTENANCEWINDOWIDENTITY_MEMBER_SCHEDULE,
|
235 + | &MAINTENANCEWINDOWIDENTITY_MEMBER_SCHEDULE_TIMEZONE,
|
236 + | &MAINTENANCEWINDOWIDENTITY_MEMBER_SCHEDULE_OFFSET,
|
237 + | &MAINTENANCEWINDOWIDENTITY_MEMBER_END_DATE,
|
238 + | &MAINTENANCEWINDOWIDENTITY_MEMBER_START_DATE,
|
239 + | &MAINTENANCEWINDOWIDENTITY_MEMBER_NEXT_EXECUTION_TIME,
|
240 + | ],
|
241 + | );
|
242 + | impl MaintenanceWindowIdentity {
|
243 + | /// The schema for this shape.
|
244 + | pub const SCHEMA: &'static ::aws_smithy_schema::Schema<'static> = &MAINTENANCEWINDOWIDENTITY_SCHEMA;
|
245 + | }
|
246 + | impl ::aws_smithy_schema::serde::SerializableStruct for MaintenanceWindowIdentity {
|
247 + | #[allow(unused_variables, clippy::diverging_sub_expression)]
|
248 + | fn serialize_members(
|
249 + | &self,
|
250 + | ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
|
251 + | ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
|
252 + | if let Some(ref val) = self.window_id {
|
253 + | ser.write_string(&MAINTENANCEWINDOWIDENTITY_MEMBER_WINDOW_ID, val)?;
|
254 + | }
|
255 + | if let Some(ref val) = self.name {
|
256 + | ser.write_string(&MAINTENANCEWINDOWIDENTITY_MEMBER_NAME, val)?;
|
257 + | }
|
258 + | if let Some(ref val) = self.description {
|
259 + | ser.write_string(&MAINTENANCEWINDOWIDENTITY_MEMBER_DESCRIPTION, val)?;
|
260 + | }
|
261 + | {
|
262 + | let val = &self.enabled;
|
263 + | ser.write_boolean(&MAINTENANCEWINDOWIDENTITY_MEMBER_ENABLED, *val)?;
|
264 + | }
|
265 + | if let Some(ref val) = self.duration {
|
266 + | ser.write_integer(&MAINTENANCEWINDOWIDENTITY_MEMBER_DURATION, *val)?;
|
267 + | }
|
268 + | {
|
269 + | let val = &self.cutoff;
|
270 + | ser.write_integer(&MAINTENANCEWINDOWIDENTITY_MEMBER_CUTOFF, *val)?;
|
271 + | }
|
272 + | if let Some(ref val) = self.schedule {
|
273 + | ser.write_string(&MAINTENANCEWINDOWIDENTITY_MEMBER_SCHEDULE, val)?;
|
274 + | }
|
275 + | if let Some(ref val) = self.schedule_timezone {
|
276 + | ser.write_string(&MAINTENANCEWINDOWIDENTITY_MEMBER_SCHEDULE_TIMEZONE, val)?;
|
277 + | }
|
278 + | if let Some(ref val) = self.schedule_offset {
|
279 + | ser.write_integer(&MAINTENANCEWINDOWIDENTITY_MEMBER_SCHEDULE_OFFSET, *val)?;
|
280 + | }
|
281 + | if let Some(ref val) = self.end_date {
|
282 + | ser.write_string(&MAINTENANCEWINDOWIDENTITY_MEMBER_END_DATE, val)?;
|
283 + | }
|
284 + | if let Some(ref val) = self.start_date {
|
285 + | ser.write_string(&MAINTENANCEWINDOWIDENTITY_MEMBER_START_DATE, val)?;
|
286 + | }
|
287 + | if let Some(ref val) = self.next_execution_time {
|
288 + | ser.write_string(&MAINTENANCEWINDOWIDENTITY_MEMBER_NEXT_EXECUTION_TIME, val)?;
|
289 + | }
|
290 + | Ok(())
|
291 + | }
|
292 + | }
|
293 + | impl MaintenanceWindowIdentity {
|
294 + | /// Deserializes this structure from a [`ShapeDeserializer`].
|
295 + | pub fn deserialize(
|
296 + | deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
|
297 + | ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
|
298 + | #[allow(unused_variables, unused_mut)]
|
299 + | let mut builder = Self::builder();
|
300 + | #[allow(
|
301 + | unused_variables,
|
302 + | unreachable_code,
|
303 + | clippy::single_match,
|
304 + | clippy::match_single_binding,
|
305 + | clippy::diverging_sub_expression
|
306 + | )]
|
307 + | deserializer.read_struct(&MAINTENANCEWINDOWIDENTITY_SCHEMA, &mut |member, deser| {
|
308 + | match member.member_index() {
|
309 + | Some(0) => {
|
310 + | if deser.is_null() {
|
311 + | deser.read_null()?;
|
312 + | } else {
|
313 + | builder.window_id = Some(deser.read_string(member)?);
|
314 + | }
|
315 + | }
|
316 + | Some(1) => {
|
317 + | if deser.is_null() {
|
318 + | deser.read_null()?;
|
319 + | } else {
|
320 + | builder.name = Some(deser.read_string(member)?);
|
321 + | }
|
322 + | }
|
323 + | Some(2) => {
|
324 + | if deser.is_null() {
|
325 + | deser.read_null()?;
|
326 + | } else {
|
327 + | builder.description = Some(deser.read_string(member)?);
|
328 + | }
|
329 + | }
|
330 + | Some(3) => {
|
331 + | builder.enabled = Some(deser.read_boolean(member)?);
|
332 + | }
|
333 + | Some(4) => {
|
334 + | if deser.is_null() {
|
335 + | deser.read_null()?;
|
336 + | } else {
|
337 + | builder.duration = Some(deser.read_integer(member)?);
|
338 + | }
|
339 + | }
|
340 + | Some(5) => {
|
341 + | builder.cutoff = Some(deser.read_integer(member)?);
|
342 + | }
|
343 + | Some(6) => {
|
344 + | if deser.is_null() {
|
345 + | deser.read_null()?;
|
346 + | } else {
|
347 + | builder.schedule = Some(deser.read_string(member)?);
|
348 + | }
|
349 + | }
|
350 + | Some(7) => {
|
351 + | if deser.is_null() {
|
352 + | deser.read_null()?;
|
353 + | } else {
|
354 + | builder.schedule_timezone = Some(deser.read_string(member)?);
|
355 + | }
|
356 + | }
|
357 + | Some(8) => {
|
358 + | if deser.is_null() {
|
359 + | deser.read_null()?;
|
360 + | } else {
|
361 + | builder.schedule_offset = Some(deser.read_integer(member)?);
|
362 + | }
|
363 + | }
|
364 + | Some(9) => {
|
365 + | if deser.is_null() {
|
366 + | deser.read_null()?;
|
367 + | } else {
|
368 + | builder.end_date = Some(deser.read_string(member)?);
|
369 + | }
|
370 + | }
|
371 + | Some(10) => {
|
372 + | if deser.is_null() {
|
373 + | deser.read_null()?;
|
374 + | } else {
|
375 + | builder.start_date = Some(deser.read_string(member)?);
|
376 + | }
|
377 + | }
|
378 + | Some(11) => {
|
379 + | if deser.is_null() {
|
380 + | deser.read_null()?;
|
381 + | } else {
|
382 + | builder.next_execution_time = Some(deser.read_string(member)?);
|
383 + | }
|
384 + | }
|
385 + | _ => {}
|
386 + | }
|
387 + | Ok(())
|
388 + | })?;
|
389 + | Ok(builder.build())
|
390 + | }
|
391 + | }
|
392 + | impl MaintenanceWindowIdentity {
|
393 + | /// Deserializes this structure from a body deserializer and HTTP response.
|
394 + | pub fn deserialize_with_response(
|
395 + | deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
|
396 + | _headers: &::aws_smithy_runtime_api::http::Headers,
|
397 + | _status: u16,
|
398 + | _body: &[u8],
|
399 + | ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
|
400 + | Self::deserialize(deserializer)
|
401 + | }
|
402 + | }
|
403 + | impl MaintenanceWindowIdentity {
|
404 + | /// Creates a new builder-style object to manufacture [`MaintenanceWindowIdentity`](crate::types::MaintenanceWindowIdentity).
|
405 + | pub fn builder() -> crate::types::builders::MaintenanceWindowIdentityBuilder {
|
406 + | crate::types::builders::MaintenanceWindowIdentityBuilder::default()
|
407 + | }
|
408 + | }
|
409 + |
|
410 + | /// A builder for [`MaintenanceWindowIdentity`](crate::types::MaintenanceWindowIdentity).
|
411 + | #[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
|
412 + | #[non_exhaustive]
|
413 + | pub struct MaintenanceWindowIdentityBuilder {
|
414 + | pub(crate) window_id: ::std::option::Option<::std::string::String>,
|
415 + | pub(crate) name: ::std::option::Option<::std::string::String>,
|
416 + | pub(crate) description: ::std::option::Option<::std::string::String>,
|
417 + | pub(crate) enabled: ::std::option::Option<bool>,
|
418 + | pub(crate) duration: ::std::option::Option<i32>,
|
419 + | pub(crate) cutoff: ::std::option::Option<i32>,
|
420 + | pub(crate) schedule: ::std::option::Option<::std::string::String>,
|
421 + | pub(crate) schedule_timezone: ::std::option::Option<::std::string::String>,
|
422 + | pub(crate) schedule_offset: ::std::option::Option<i32>,
|
423 + | pub(crate) end_date: ::std::option::Option<::std::string::String>,
|
424 + | pub(crate) start_date: ::std::option::Option<::std::string::String>,
|
425 + | pub(crate) next_execution_time: ::std::option::Option<::std::string::String>,
|
426 + | }
|
427 + | impl MaintenanceWindowIdentityBuilder {
|
428 + | /// <p>The ID of the maintenance window.</p>
|
429 + | pub fn window_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
|
430 + | self.window_id = ::std::option::Option::Some(input.into());
|
431 + | self
|
432 + | }
|
433 + | /// <p>The ID of the maintenance window.</p>
|
434 + | pub fn set_window_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
|
435 + | self.window_id = input;
|
436 + | self
|
437 + | }
|
438 + | /// <p>The ID of the maintenance window.</p>
|
439 + | pub fn get_window_id(&self) -> &::std::option::Option<::std::string::String> {
|
440 + | &self.window_id
|
441 + | }
|
442 + | /// <p>The name of the maintenance window.</p>
|
443 + | pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
|
444 + | self.name = ::std::option::Option::Some(input.into());
|
445 + | self
|
446 + | }
|
447 + | /// <p>The name of the maintenance window.</p>
|
448 + | pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
|
449 + | self.name = input;
|
450 + | self
|
451 + | }
|
452 + | /// <p>The name of the maintenance window.</p>
|
453 + | pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
|
454 + | &self.name
|
455 + | }
|
456 + | /// <p>A description of the maintenance window.</p>
|
457 + | pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
|
458 + | self.description = ::std::option::Option::Some(input.into());
|
459 + | self
|
460 + | }
|
461 + | /// <p>A description of the maintenance window.</p>
|
462 + | pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
|
463 + | self.description = input;
|
464 + | self
|
465 + | }
|
466 + | /// <p>A description of the maintenance window.</p>
|
467 + | pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
|
468 + | &self.description
|
469 + | }
|
470 + | /// <p>Indicates whether the maintenance window is enabled.</p>
|
471 + | pub fn enabled(mut self, input: bool) -> Self {
|
472 + | self.enabled = ::std::option::Option::Some(input);
|
473 + | self
|
474 + | }
|
475 + | /// <p>Indicates whether the maintenance window is enabled.</p>
|
476 + | pub fn set_enabled(mut self, input: ::std::option::Option<bool>) -> Self {
|
477 + | self.enabled = input;
|
478 + | self
|
479 + | }
|
480 + | /// <p>Indicates whether the maintenance window is enabled.</p>
|
481 + | pub fn get_enabled(&self) -> &::std::option::Option<bool> {
|
482 + | &self.enabled
|
483 + | }
|
484 + | /// <p>The duration of the maintenance window in hours.</p>
|
485 + | pub fn duration(mut self, input: i32) -> Self {
|
486 + | self.duration = ::std::option::Option::Some(input);
|
487 + | self
|
488 + | }
|
489 + | /// <p>The duration of the maintenance window in hours.</p>
|
490 + | pub fn set_duration(mut self, input: ::std::option::Option<i32>) -> Self {
|
491 + | self.duration = input;
|
492 + | self
|
493 + | }
|
494 + | /// <p>The duration of the maintenance window in hours.</p>
|
495 + | pub fn get_duration(&self) -> &::std::option::Option<i32> {
|
496 + | &self.duration
|
497 + | }
|
498 + | /// <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>
|
499 + | pub fn cutoff(mut self, input: i32) -> Self {
|
500 + | self.cutoff = ::std::option::Option::Some(input);
|
501 + | self
|
502 + | }
|
503 + | /// <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>
|
504 + | pub fn set_cutoff(mut self, input: ::std::option::Option<i32>) -> Self {
|
505 + | self.cutoff = input;
|
506 + | self
|
507 + | }
|
508 + | /// <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>
|
509 + | pub fn get_cutoff(&self) -> &::std::option::Option<i32> {
|
510 + | &self.cutoff
|
511 + | }
|
512 + | /// <p>The schedule of the maintenance window in the form of a cron or rate expression.</p>
|
513 + | pub fn schedule(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
|
514 + | self.schedule = ::std::option::Option::Some(input.into());
|
515 + | self
|
516 + | }
|
517 + | /// <p>The schedule of the maintenance window in the form of a cron or rate expression.</p>
|
518 + | pub fn set_schedule(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
|
519 + | self.schedule = input;
|
520 + | self
|
521 + | }
|
522 + | /// <p>The schedule of the maintenance window in the form of a cron or rate expression.</p>
|
523 + | pub fn get_schedule(&self) -> &::std::option::Option<::std::string::String> {
|
524 + | &self.schedule
|
525 + | }
|
526 + | /// <p>The time zone that the scheduled maintenance window executions are based on, in Internet Assigned Numbers Authority (IANA) format.</p>
|
527 + | pub fn schedule_timezone(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
|
528 + | self.schedule_timezone = ::std::option::Option::Some(input.into());
|
529 + | self
|
530 + | }
|
531 + | /// <p>The time zone that the scheduled maintenance window executions are based on, in Internet Assigned Numbers Authority (IANA) format.</p>
|
532 + | pub fn set_schedule_timezone(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
|
533 + | self.schedule_timezone = input;
|
534 + | self
|
535 + | }
|
536 + | /// <p>The time zone that the scheduled maintenance window executions are based on, in Internet Assigned Numbers Authority (IANA) format.</p>
|
537 + | pub fn get_schedule_timezone(&self) -> &::std::option::Option<::std::string::String> {
|
538 + | &self.schedule_timezone
|
539 + | }
|
540 + | /// <p>The number of days to wait to run a maintenance window after the scheduled cron expression date and time.</p>
|
541 + | pub fn schedule_offset(mut self, input: i32) -> Self {
|
542 + | self.schedule_offset = ::std::option::Option::Some(input);
|
543 + | self
|
544 + | }
|
545 + | /// <p>The number of days to wait to run a maintenance window after the scheduled cron expression date and time.</p>
|
546 + | pub fn set_schedule_offset(mut self, input: ::std::option::Option<i32>) -> Self {
|
547 + | self.schedule_offset = input;
|
548 + | self
|
549 + | }
|
550 + | /// <p>The number of days to wait to run a maintenance window after the scheduled cron expression date and time.</p>
|
551 + | pub fn get_schedule_offset(&self) -> &::std::option::Option<i32> {
|
552 + | &self.schedule_offset
|
553 + | }
|
554 + | /// <p>The date and time, in ISO-8601 Extended format, for when the maintenance window is scheduled to become inactive.</p>
|
555 + | pub fn end_date(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
|
556 + | self.end_date = ::std::option::Option::Some(input.into());
|
557 + | self
|
558 + | }
|
559 + | /// <p>The date and time, in ISO-8601 Extended format, for when the maintenance window is scheduled to become inactive.</p>
|
560 + | pub fn set_end_date(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
|
561 + | self.end_date = input;
|
562 + | self
|
563 + | }
|
564 + | /// <p>The date and time, in ISO-8601 Extended format, for when the maintenance window is scheduled to become inactive.</p>
|
565 + | pub fn get_end_date(&self) -> &::std::option::Option<::std::string::String> {
|
566 + | &self.end_date
|
567 + | }
|
568 + | /// <p>The date and time, in ISO-8601 Extended format, for when the maintenance window is scheduled to become active.</p>
|
569 + | pub fn start_date(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
|
570 + | self.start_date = ::std::option::Option::Some(input.into());
|
571 + | self
|
572 + | }
|
573 + | /// <p>The date and time, in ISO-8601 Extended format, for when the maintenance window is scheduled to become active.</p>
|
574 + | pub fn set_start_date(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
|
575 + | self.start_date = input;
|
576 + | self
|
577 + | }
|
578 + | /// <p>The date and time, in ISO-8601 Extended format, for when the maintenance window is scheduled to become active.</p>
|
579 + | pub fn get_start_date(&self) -> &::std::option::Option<::std::string::String> {
|
580 + | &self.start_date
|
581 + | }
|
582 + | /// <p>The next time the maintenance window will actually run, taking into account any specified times for the maintenance window to become active or inactive.</p>
|
583 + | pub fn next_execution_time(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
|
584 + | self.next_execution_time = ::std::option::Option::Some(input.into());
|
585 + | self
|
586 + | }
|
587 + | /// <p>The next time the maintenance window will actually run, taking into account any specified times for the maintenance window to become active or inactive.</p>
|
588 + | pub fn set_next_execution_time(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
|
589 + | self.next_execution_time = input;
|
590 + | self
|
591 + | }
|
592 + | /// <p>The next time the maintenance window will actually run, taking into account any specified times for the maintenance window to become active or inactive.</p>
|
593 + | pub fn get_next_execution_time(&self) -> &::std::option::Option<::std::string::String> {
|
594 + | &self.next_execution_time
|
595 + | }
|
596 + | /// Consumes the builder and constructs a [`MaintenanceWindowIdentity`](crate::types::MaintenanceWindowIdentity).
|
597 + | pub fn build(self) -> crate::types::MaintenanceWindowIdentity {
|
598 + | crate::types::MaintenanceWindowIdentity {
|
599 + | window_id: self.window_id,
|
600 + | name: self.name,
|
601 + | description: self.description,
|
602 + | enabled: self.enabled.unwrap_or_default(),
|
603 + | duration: self.duration,
|
604 + | cutoff: self.cutoff.unwrap_or_default(),
|
605 + | schedule: self.schedule,
|
606 + | schedule_timezone: self.schedule_timezone,
|
607 + | schedule_offset: self.schedule_offset,
|
608 + | end_date: self.end_date,
|
609 + | start_date: self.start_date,
|
610 + | next_execution_time: self.next_execution_time,
|
611 + | }
|
612 + | }
|
613 + | }
|
614 + | impl ::std::fmt::Debug for MaintenanceWindowIdentityBuilder {
|
615 + | fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
|
616 + | let mut formatter = f.debug_struct("MaintenanceWindowIdentityBuilder");
|
617 + | formatter.field("window_id", &self.window_id);
|
618 + | formatter.field("name", &self.name);
|
619 + | formatter.field("description", &"*** Sensitive Data Redacted ***");
|
620 + | formatter.field("enabled", &self.enabled);
|
621 + | formatter.field("duration", &self.duration);
|
622 + | formatter.field("cutoff", &self.cutoff);
|
623 + | formatter.field("schedule", &self.schedule);
|
624 + | formatter.field("schedule_timezone", &self.schedule_timezone);
|
625 + | formatter.field("schedule_offset", &self.schedule_offset);
|
626 + | formatter.field("end_date", &self.end_date);
|
627 + | formatter.field("start_date", &self.start_date);
|
628 + | formatter.field("next_execution_time", &self.next_execution_time);
|
629 + | formatter.finish()
|
630 + | }
|
631 + | }
|