1 + | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
|
2 + |
|
3 + | /// <p>Describes the information about an execution of a maintenance window.</p>
|
4 + | #[non_exhaustive]
|
5 + | #[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
|
6 + | pub struct MaintenanceWindowExecution {
|
7 + | /// <p>The ID of the maintenance window.</p>
|
8 + | pub window_id: ::std::option::Option<::std::string::String>,
|
9 + | /// <p>The ID of the maintenance window execution.</p>
|
10 + | pub window_execution_id: ::std::option::Option<::std::string::String>,
|
11 + | /// <p>The status of the execution.</p>
|
12 + | pub status: ::std::option::Option<crate::types::MaintenanceWindowExecutionStatus>,
|
13 + | /// <p>The details explaining the status. Not available for all status values.</p>
|
14 + | pub status_details: ::std::option::Option<::std::string::String>,
|
15 + | /// <p>The time the execution started.</p>
|
16 + | pub start_time: ::std::option::Option<::aws_smithy_types::DateTime>,
|
17 + | /// <p>The time the execution finished.</p>
|
18 + | pub end_time: ::std::option::Option<::aws_smithy_types::DateTime>,
|
19 + | }
|
20 + | impl MaintenanceWindowExecution {
|
21 + | /// <p>The ID of the maintenance window.</p>
|
22 + | pub fn window_id(&self) -> ::std::option::Option<&str> {
|
23 + | self.window_id.as_deref()
|
24 + | }
|
25 + | /// <p>The ID of the maintenance window execution.</p>
|
26 + | pub fn window_execution_id(&self) -> ::std::option::Option<&str> {
|
27 + | self.window_execution_id.as_deref()
|
28 + | }
|
29 + | /// <p>The status of the execution.</p>
|
30 + | pub fn status(&self) -> ::std::option::Option<&crate::types::MaintenanceWindowExecutionStatus> {
|
31 + | self.status.as_ref()
|
32 + | }
|
33 + | /// <p>The details explaining the status. Not available for all status values.</p>
|
34 + | pub fn status_details(&self) -> ::std::option::Option<&str> {
|
35 + | self.status_details.as_deref()
|
36 + | }
|
37 + | /// <p>The time the execution started.</p>
|
38 + | pub fn start_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
|
39 + | self.start_time.as_ref()
|
40 + | }
|
41 + | /// <p>The time the execution finished.</p>
|
42 + | pub fn end_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
|
43 + | self.end_time.as_ref()
|
44 + | }
|
45 + | }
|
46 + | static MAINTENANCEWINDOWEXECUTION_MEMBER_WINDOW_ID: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
|
47 + | ::aws_smithy_schema::ShapeId::from_parts(
|
48 + | "com.amazonaws.ssm#MaintenanceWindowExecution$WindowId",
|
49 + | "com.amazonaws.ssm",
|
50 + | "MaintenanceWindowExecution",
|
51 + | ),
|
52 + | ::aws_smithy_schema::ShapeType::String,
|
53 + | "WindowId",
|
54 + | 0,
|
55 + | );
|
56 + | static MAINTENANCEWINDOWEXECUTION_MEMBER_WINDOW_EXECUTION_ID: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
|
57 + | ::aws_smithy_schema::ShapeId::from_parts(
|
58 + | "com.amazonaws.ssm#MaintenanceWindowExecution$WindowExecutionId",
|
59 + | "com.amazonaws.ssm",
|
60 + | "MaintenanceWindowExecution",
|
61 + | ),
|
62 + | ::aws_smithy_schema::ShapeType::String,
|
63 + | "WindowExecutionId",
|
64 + | 1,
|
65 + | );
|
66 + | static MAINTENANCEWINDOWEXECUTION_MEMBER_STATUS: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
|
67 + | ::aws_smithy_schema::ShapeId::from_parts(
|
68 + | "com.amazonaws.ssm#MaintenanceWindowExecution$Status",
|
69 + | "com.amazonaws.ssm",
|
70 + | "MaintenanceWindowExecution",
|
71 + | ),
|
72 + | ::aws_smithy_schema::ShapeType::String,
|
73 + | "Status",
|
74 + | 2,
|
75 + | );
|
76 + | static MAINTENANCEWINDOWEXECUTION_MEMBER_STATUS_DETAILS: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
|
77 + | ::aws_smithy_schema::ShapeId::from_parts(
|
78 + | "com.amazonaws.ssm#MaintenanceWindowExecution$StatusDetails",
|
79 + | "com.amazonaws.ssm",
|
80 + | "MaintenanceWindowExecution",
|
81 + | ),
|
82 + | ::aws_smithy_schema::ShapeType::String,
|
83 + | "StatusDetails",
|
84 + | 3,
|
85 + | );
|
86 + | static MAINTENANCEWINDOWEXECUTION_MEMBER_START_TIME: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
|
87 + | ::aws_smithy_schema::ShapeId::from_parts(
|
88 + | "com.amazonaws.ssm#MaintenanceWindowExecution$StartTime",
|
89 + | "com.amazonaws.ssm",
|
90 + | "MaintenanceWindowExecution",
|
91 + | ),
|
92 + | ::aws_smithy_schema::ShapeType::Timestamp,
|
93 + | "StartTime",
|
94 + | 4,
|
95 + | );
|
96 + | static MAINTENANCEWINDOWEXECUTION_MEMBER_END_TIME: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
|
97 + | ::aws_smithy_schema::ShapeId::from_parts(
|
98 + | "com.amazonaws.ssm#MaintenanceWindowExecution$EndTime",
|
99 + | "com.amazonaws.ssm",
|
100 + | "MaintenanceWindowExecution",
|
101 + | ),
|
102 + | ::aws_smithy_schema::ShapeType::Timestamp,
|
103 + | "EndTime",
|
104 + | 5,
|
105 + | );
|
106 + | static MAINTENANCEWINDOWEXECUTION_SCHEMA: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_struct(
|
107 + | ::aws_smithy_schema::ShapeId::from_parts(
|
108 + | "com.amazonaws.ssm#MaintenanceWindowExecution",
|
109 + | "com.amazonaws.ssm",
|
110 + | "MaintenanceWindowExecution",
|
111 + | ),
|
112 + | ::aws_smithy_schema::ShapeType::Structure,
|
113 + | &[
|
114 + | &MAINTENANCEWINDOWEXECUTION_MEMBER_WINDOW_ID,
|
115 + | &MAINTENANCEWINDOWEXECUTION_MEMBER_WINDOW_EXECUTION_ID,
|
116 + | &MAINTENANCEWINDOWEXECUTION_MEMBER_STATUS,
|
117 + | &MAINTENANCEWINDOWEXECUTION_MEMBER_STATUS_DETAILS,
|
118 + | &MAINTENANCEWINDOWEXECUTION_MEMBER_START_TIME,
|
119 + | &MAINTENANCEWINDOWEXECUTION_MEMBER_END_TIME,
|
120 + | ],
|
121 + | );
|
122 + | impl MaintenanceWindowExecution {
|
123 + | /// The schema for this shape.
|
124 + | pub const SCHEMA: &'static ::aws_smithy_schema::Schema<'static> = &MAINTENANCEWINDOWEXECUTION_SCHEMA;
|
125 + | }
|
126 + | impl ::aws_smithy_schema::serde::SerializableStruct for MaintenanceWindowExecution {
|
127 + | #[allow(unused_variables, clippy::diverging_sub_expression)]
|
128 + | fn serialize_members(
|
129 + | &self,
|
130 + | ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
|
131 + | ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
|
132 + | if let Some(ref val) = self.window_id {
|
133 + | ser.write_string(&MAINTENANCEWINDOWEXECUTION_MEMBER_WINDOW_ID, val)?;
|
134 + | }
|
135 + | if let Some(ref val) = self.window_execution_id {
|
136 + | ser.write_string(&MAINTENANCEWINDOWEXECUTION_MEMBER_WINDOW_EXECUTION_ID, val)?;
|
137 + | }
|
138 + | if let Some(ref val) = self.status {
|
139 + | ser.write_string(&MAINTENANCEWINDOWEXECUTION_MEMBER_STATUS, val.as_str())?;
|
140 + | }
|
141 + | if let Some(ref val) = self.status_details {
|
142 + | ser.write_string(&MAINTENANCEWINDOWEXECUTION_MEMBER_STATUS_DETAILS, val)?;
|
143 + | }
|
144 + | if let Some(ref val) = self.start_time {
|
145 + | ser.write_timestamp(&MAINTENANCEWINDOWEXECUTION_MEMBER_START_TIME, val)?;
|
146 + | }
|
147 + | if let Some(ref val) = self.end_time {
|
148 + | ser.write_timestamp(&MAINTENANCEWINDOWEXECUTION_MEMBER_END_TIME, val)?;
|
149 + | }
|
150 + | Ok(())
|
151 + | }
|
152 + | }
|
153 + | impl MaintenanceWindowExecution {
|
154 + | /// Deserializes this structure from a [`ShapeDeserializer`].
|
155 + | pub fn deserialize(
|
156 + | deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
|
157 + | ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
|
158 + | #[allow(unused_variables, unused_mut)]
|
159 + | let mut builder = Self::builder();
|
160 + | #[allow(
|
161 + | unused_variables,
|
162 + | unreachable_code,
|
163 + | clippy::single_match,
|
164 + | clippy::match_single_binding,
|
165 + | clippy::diverging_sub_expression
|
166 + | )]
|
167 + | deserializer.read_struct(&MAINTENANCEWINDOWEXECUTION_SCHEMA, &mut |member, deser| {
|
168 + | match member.member_index() {
|
169 + | Some(0) => {
|
170 + | if deser.is_null() {
|
171 + | deser.read_null()?;
|
172 + | } else {
|
173 + | builder.window_id = Some(deser.read_string(member)?);
|
174 + | }
|
175 + | }
|
176 + | Some(1) => {
|
177 + | if deser.is_null() {
|
178 + | deser.read_null()?;
|
179 + | } else {
|
180 + | builder.window_execution_id = Some(deser.read_string(member)?);
|
181 + | }
|
182 + | }
|
183 + | Some(2) => {
|
184 + | if deser.is_null() {
|
185 + | deser.read_null()?;
|
186 + | } else {
|
187 + | builder.status = Some(crate::types::MaintenanceWindowExecutionStatus::from(deser.read_string(member)?.as_str()));
|
188 + | }
|
189 + | }
|
190 + | Some(3) => {
|
191 + | if deser.is_null() {
|
192 + | deser.read_null()?;
|
193 + | } else {
|
194 + | builder.status_details = Some(deser.read_string(member)?);
|
195 + | }
|
196 + | }
|
197 + | Some(4) => {
|
198 + | if deser.is_null() {
|
199 + | deser.read_null()?;
|
200 + | } else {
|
201 + | builder.start_time = Some(deser.read_timestamp(member)?);
|
202 + | }
|
203 + | }
|
204 + | Some(5) => {
|
205 + | if deser.is_null() {
|
206 + | deser.read_null()?;
|
207 + | } else {
|
208 + | builder.end_time = Some(deser.read_timestamp(member)?);
|
209 + | }
|
210 + | }
|
211 + | _ => {}
|
212 + | }
|
213 + | Ok(())
|
214 + | })?;
|
215 + | Ok(builder.build())
|
216 + | }
|
217 + | }
|
218 + | impl MaintenanceWindowExecution {
|
219 + | /// Deserializes this structure from a body deserializer and HTTP response.
|
220 + | pub fn deserialize_with_response(
|
221 + | deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
|
222 + | _headers: &::aws_smithy_runtime_api::http::Headers,
|
223 + | _status: u16,
|
224 + | _body: &[u8],
|
225 + | ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
|
226 + | Self::deserialize(deserializer)
|
227 + | }
|
228 + | }
|
229 + | impl MaintenanceWindowExecution {
|
230 + | /// Creates a new builder-style object to manufacture [`MaintenanceWindowExecution`](crate::types::MaintenanceWindowExecution).
|
231 + | pub fn builder() -> crate::types::builders::MaintenanceWindowExecutionBuilder {
|
232 + | crate::types::builders::MaintenanceWindowExecutionBuilder::default()
|
233 + | }
|
234 + | }
|
235 + |
|
236 + | /// A builder for [`MaintenanceWindowExecution`](crate::types::MaintenanceWindowExecution).
|
237 + | #[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
|
238 + | #[non_exhaustive]
|
239 + | pub struct MaintenanceWindowExecutionBuilder {
|
240 + | pub(crate) window_id: ::std::option::Option<::std::string::String>,
|
241 + | pub(crate) window_execution_id: ::std::option::Option<::std::string::String>,
|
242 + | pub(crate) status: ::std::option::Option<crate::types::MaintenanceWindowExecutionStatus>,
|
243 + | pub(crate) status_details: ::std::option::Option<::std::string::String>,
|
244 + | pub(crate) start_time: ::std::option::Option<::aws_smithy_types::DateTime>,
|
245 + | pub(crate) end_time: ::std::option::Option<::aws_smithy_types::DateTime>,
|
246 + | }
|
247 + | impl MaintenanceWindowExecutionBuilder {
|
248 + | /// <p>The ID of the maintenance window.</p>
|
249 + | pub fn window_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
|
250 + | self.window_id = ::std::option::Option::Some(input.into());
|
251 + | self
|
252 + | }
|
253 + | /// <p>The ID of the maintenance window.</p>
|
254 + | pub fn set_window_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
|
255 + | self.window_id = input;
|
256 + | self
|
257 + | }
|
258 + | /// <p>The ID of the maintenance window.</p>
|
259 + | pub fn get_window_id(&self) -> &::std::option::Option<::std::string::String> {
|
260 + | &self.window_id
|
261 + | }
|
262 + | /// <p>The ID of the maintenance window execution.</p>
|
263 + | pub fn window_execution_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
|
264 + | self.window_execution_id = ::std::option::Option::Some(input.into());
|
265 + | self
|
266 + | }
|
267 + | /// <p>The ID of the maintenance window execution.</p>
|
268 + | pub fn set_window_execution_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
|
269 + | self.window_execution_id = input;
|
270 + | self
|
271 + | }
|
272 + | /// <p>The ID of the maintenance window execution.</p>
|
273 + | pub fn get_window_execution_id(&self) -> &::std::option::Option<::std::string::String> {
|
274 + | &self.window_execution_id
|
275 + | }
|
276 + | /// <p>The status of the execution.</p>
|
277 + | pub fn status(mut self, input: crate::types::MaintenanceWindowExecutionStatus) -> Self {
|
278 + | self.status = ::std::option::Option::Some(input);
|
279 + | self
|
280 + | }
|
281 + | /// <p>The status of the execution.</p>
|
282 + | pub fn set_status(mut self, input: ::std::option::Option<crate::types::MaintenanceWindowExecutionStatus>) -> Self {
|
283 + | self.status = input;
|
284 + | self
|
285 + | }
|
286 + | /// <p>The status of the execution.</p>
|
287 + | pub fn get_status(&self) -> &::std::option::Option<crate::types::MaintenanceWindowExecutionStatus> {
|
288 + | &self.status
|
289 + | }
|
290 + | /// <p>The details explaining the status. Not available for all status values.</p>
|
291 + | pub fn status_details(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
|
292 + | self.status_details = ::std::option::Option::Some(input.into());
|
293 + | self
|
294 + | }
|
295 + | /// <p>The details explaining the status. Not available for all status values.</p>
|
296 + | pub fn set_status_details(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
|
297 + | self.status_details = input;
|
298 + | self
|
299 + | }
|
300 + | /// <p>The details explaining the status. Not available for all status values.</p>
|
301 + | pub fn get_status_details(&self) -> &::std::option::Option<::std::string::String> {
|
302 + | &self.status_details
|
303 + | }
|
304 + | /// <p>The time the execution started.</p>
|
305 + | pub fn start_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
|
306 + | self.start_time = ::std::option::Option::Some(input);
|
307 + | self
|
308 + | }
|
309 + | /// <p>The time the execution started.</p>
|
310 + | pub fn set_start_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
|
311 + | self.start_time = input;
|
312 + | self
|
313 + | }
|
314 + | /// <p>The time the execution started.</p>
|
315 + | pub fn get_start_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
|
316 + | &self.start_time
|
317 + | }
|
318 + | /// <p>The time the execution finished.</p>
|
319 + | pub fn end_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
|
320 + | self.end_time = ::std::option::Option::Some(input);
|
321 + | self
|
322 + | }
|
323 + | /// <p>The time the execution finished.</p>
|
324 + | pub fn set_end_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
|
325 + | self.end_time = input;
|
326 + | self
|
327 + | }
|
328 + | /// <p>The time the execution finished.</p>
|
329 + | pub fn get_end_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
|
330 + | &self.end_time
|
331 + | }
|
332 + | /// Consumes the builder and constructs a [`MaintenanceWindowExecution`](crate::types::MaintenanceWindowExecution).
|
333 + | pub fn build(self) -> crate::types::MaintenanceWindowExecution {
|
334 + | crate::types::MaintenanceWindowExecution {
|
335 + | window_id: self.window_id,
|
336 + | window_execution_id: self.window_execution_id,
|
337 + | status: self.status,
|
338 + | status_details: self.status_details,
|
339 + | start_time: self.start_time,
|
340 + | end_time: self.end_time,
|
341 + | }
|
342 + | }
|
343 + | }
|