1 + | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
|
2 + |
|
3 + | /// <p>Status information returned by the <code>DeleteInventory</code> operation.</p>
|
4 + | #[non_exhaustive]
|
5 + | #[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
|
6 + | pub struct InventoryDeletionStatusItem {
|
7 + | /// <p>The deletion ID returned by the <code>DeleteInventory</code> operation.</p>
|
8 + | pub deletion_id: ::std::option::Option<::std::string::String>,
|
9 + | /// <p>The name of the inventory data type.</p>
|
10 + | pub type_name: ::std::option::Option<::std::string::String>,
|
11 + | /// <p>The UTC timestamp when the delete operation started.</p>
|
12 + | pub deletion_start_time: ::std::option::Option<::aws_smithy_types::DateTime>,
|
13 + | /// <p>The status of the operation. Possible values are InProgress and Complete.</p>
|
14 + | pub last_status: ::std::option::Option<crate::types::InventoryDeletionStatus>,
|
15 + | /// <p>Information about the status.</p>
|
16 + | pub last_status_message: ::std::option::Option<::std::string::String>,
|
17 + | /// <p>Information about the delete operation. For more information about this summary, see <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/inventory-custom.html#delete-custom-inventory">Understanding the delete inventory summary</a> in the <i>Amazon Web Services Systems Manager User Guide</i>.</p>
|
18 + | pub deletion_summary: ::std::option::Option<crate::types::InventoryDeletionSummary>,
|
19 + | /// <p>The UTC timestamp of when the last status report.</p>
|
20 + | pub last_status_update_time: ::std::option::Option<::aws_smithy_types::DateTime>,
|
21 + | }
|
22 + | impl InventoryDeletionStatusItem {
|
23 + | /// <p>The deletion ID returned by the <code>DeleteInventory</code> operation.</p>
|
24 + | pub fn deletion_id(&self) -> ::std::option::Option<&str> {
|
25 + | self.deletion_id.as_deref()
|
26 + | }
|
27 + | /// <p>The name of the inventory data type.</p>
|
28 + | pub fn type_name(&self) -> ::std::option::Option<&str> {
|
29 + | self.type_name.as_deref()
|
30 + | }
|
31 + | /// <p>The UTC timestamp when the delete operation started.</p>
|
32 + | pub fn deletion_start_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
|
33 + | self.deletion_start_time.as_ref()
|
34 + | }
|
35 + | /// <p>The status of the operation. Possible values are InProgress and Complete.</p>
|
36 + | pub fn last_status(&self) -> ::std::option::Option<&crate::types::InventoryDeletionStatus> {
|
37 + | self.last_status.as_ref()
|
38 + | }
|
39 + | /// <p>Information about the status.</p>
|
40 + | pub fn last_status_message(&self) -> ::std::option::Option<&str> {
|
41 + | self.last_status_message.as_deref()
|
42 + | }
|
43 + | /// <p>Information about the delete operation. For more information about this summary, see <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/inventory-custom.html#delete-custom-inventory">Understanding the delete inventory summary</a> in the <i>Amazon Web Services Systems Manager User Guide</i>.</p>
|
44 + | pub fn deletion_summary(&self) -> ::std::option::Option<&crate::types::InventoryDeletionSummary> {
|
45 + | self.deletion_summary.as_ref()
|
46 + | }
|
47 + | /// <p>The UTC timestamp of when the last status report.</p>
|
48 + | pub fn last_status_update_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
|
49 + | self.last_status_update_time.as_ref()
|
50 + | }
|
51 + | }
|
52 + | static INVENTORYDELETIONSTATUSITEM_MEMBER_DELETION_ID: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
|
53 + | ::aws_smithy_schema::ShapeId::from_parts(
|
54 + | "com.amazonaws.ssm#InventoryDeletionStatusItem$DeletionId",
|
55 + | "com.amazonaws.ssm",
|
56 + | "InventoryDeletionStatusItem",
|
57 + | ),
|
58 + | ::aws_smithy_schema::ShapeType::String,
|
59 + | "DeletionId",
|
60 + | 0,
|
61 + | );
|
62 + | static INVENTORYDELETIONSTATUSITEM_MEMBER_TYPE_NAME: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
|
63 + | ::aws_smithy_schema::ShapeId::from_parts(
|
64 + | "com.amazonaws.ssm#InventoryDeletionStatusItem$TypeName",
|
65 + | "com.amazonaws.ssm",
|
66 + | "InventoryDeletionStatusItem",
|
67 + | ),
|
68 + | ::aws_smithy_schema::ShapeType::String,
|
69 + | "TypeName",
|
70 + | 1,
|
71 + | );
|
72 + | static INVENTORYDELETIONSTATUSITEM_MEMBER_DELETION_START_TIME: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
|
73 + | ::aws_smithy_schema::ShapeId::from_parts(
|
74 + | "com.amazonaws.ssm#InventoryDeletionStatusItem$DeletionStartTime",
|
75 + | "com.amazonaws.ssm",
|
76 + | "InventoryDeletionStatusItem",
|
77 + | ),
|
78 + | ::aws_smithy_schema::ShapeType::Timestamp,
|
79 + | "DeletionStartTime",
|
80 + | 2,
|
81 + | );
|
82 + | static INVENTORYDELETIONSTATUSITEM_MEMBER_LAST_STATUS: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
|
83 + | ::aws_smithy_schema::ShapeId::from_parts(
|
84 + | "com.amazonaws.ssm#InventoryDeletionStatusItem$LastStatus",
|
85 + | "com.amazonaws.ssm",
|
86 + | "InventoryDeletionStatusItem",
|
87 + | ),
|
88 + | ::aws_smithy_schema::ShapeType::String,
|
89 + | "LastStatus",
|
90 + | 3,
|
91 + | );
|
92 + | static INVENTORYDELETIONSTATUSITEM_MEMBER_LAST_STATUS_MESSAGE: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
|
93 + | ::aws_smithy_schema::ShapeId::from_parts(
|
94 + | "com.amazonaws.ssm#InventoryDeletionStatusItem$LastStatusMessage",
|
95 + | "com.amazonaws.ssm",
|
96 + | "InventoryDeletionStatusItem",
|
97 + | ),
|
98 + | ::aws_smithy_schema::ShapeType::String,
|
99 + | "LastStatusMessage",
|
100 + | 4,
|
101 + | );
|
102 + | static INVENTORYDELETIONSTATUSITEM_MEMBER_DELETION_SUMMARY: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
|
103 + | ::aws_smithy_schema::ShapeId::from_parts(
|
104 + | "com.amazonaws.ssm#InventoryDeletionStatusItem$DeletionSummary",
|
105 + | "com.amazonaws.ssm",
|
106 + | "InventoryDeletionStatusItem",
|
107 + | ),
|
108 + | ::aws_smithy_schema::ShapeType::Structure,
|
109 + | "DeletionSummary",
|
110 + | 5,
|
111 + | );
|
112 + | static INVENTORYDELETIONSTATUSITEM_MEMBER_LAST_STATUS_UPDATE_TIME: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
|
113 + | ::aws_smithy_schema::ShapeId::from_parts(
|
114 + | "com.amazonaws.ssm#InventoryDeletionStatusItem$LastStatusUpdateTime",
|
115 + | "com.amazonaws.ssm",
|
116 + | "InventoryDeletionStatusItem",
|
117 + | ),
|
118 + | ::aws_smithy_schema::ShapeType::Timestamp,
|
119 + | "LastStatusUpdateTime",
|
120 + | 6,
|
121 + | );
|
122 + | static INVENTORYDELETIONSTATUSITEM_SCHEMA: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_struct(
|
123 + | ::aws_smithy_schema::ShapeId::from_parts(
|
124 + | "com.amazonaws.ssm#InventoryDeletionStatusItem",
|
125 + | "com.amazonaws.ssm",
|
126 + | "InventoryDeletionStatusItem",
|
127 + | ),
|
128 + | ::aws_smithy_schema::ShapeType::Structure,
|
129 + | &[
|
130 + | &INVENTORYDELETIONSTATUSITEM_MEMBER_DELETION_ID,
|
131 + | &INVENTORYDELETIONSTATUSITEM_MEMBER_TYPE_NAME,
|
132 + | &INVENTORYDELETIONSTATUSITEM_MEMBER_DELETION_START_TIME,
|
133 + | &INVENTORYDELETIONSTATUSITEM_MEMBER_LAST_STATUS,
|
134 + | &INVENTORYDELETIONSTATUSITEM_MEMBER_LAST_STATUS_MESSAGE,
|
135 + | &INVENTORYDELETIONSTATUSITEM_MEMBER_DELETION_SUMMARY,
|
136 + | &INVENTORYDELETIONSTATUSITEM_MEMBER_LAST_STATUS_UPDATE_TIME,
|
137 + | ],
|
138 + | );
|
139 + | impl InventoryDeletionStatusItem {
|
140 + | /// The schema for this shape.
|
141 + | pub const SCHEMA: &'static ::aws_smithy_schema::Schema<'static> = &INVENTORYDELETIONSTATUSITEM_SCHEMA;
|
142 + | }
|
143 + | impl ::aws_smithy_schema::serde::SerializableStruct for InventoryDeletionStatusItem {
|
144 + | #[allow(unused_variables, clippy::diverging_sub_expression)]
|
145 + | fn serialize_members(
|
146 + | &self,
|
147 + | ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
|
148 + | ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
|
149 + | if let Some(ref val) = self.deletion_id {
|
150 + | ser.write_string(&INVENTORYDELETIONSTATUSITEM_MEMBER_DELETION_ID, val)?;
|
151 + | }
|
152 + | if let Some(ref val) = self.type_name {
|
153 + | ser.write_string(&INVENTORYDELETIONSTATUSITEM_MEMBER_TYPE_NAME, val)?;
|
154 + | }
|
155 + | if let Some(ref val) = self.deletion_start_time {
|
156 + | ser.write_timestamp(&INVENTORYDELETIONSTATUSITEM_MEMBER_DELETION_START_TIME, val)?;
|
157 + | }
|
158 + | if let Some(ref val) = self.last_status {
|
159 + | ser.write_string(&INVENTORYDELETIONSTATUSITEM_MEMBER_LAST_STATUS, val.as_str())?;
|
160 + | }
|
161 + | if let Some(ref val) = self.last_status_message {
|
162 + | ser.write_string(&INVENTORYDELETIONSTATUSITEM_MEMBER_LAST_STATUS_MESSAGE, val)?;
|
163 + | }
|
164 + | if let Some(ref val) = self.deletion_summary {
|
165 + | ser.write_struct(&INVENTORYDELETIONSTATUSITEM_MEMBER_DELETION_SUMMARY, val)?;
|
166 + | }
|
167 + | if let Some(ref val) = self.last_status_update_time {
|
168 + | ser.write_timestamp(&INVENTORYDELETIONSTATUSITEM_MEMBER_LAST_STATUS_UPDATE_TIME, val)?;
|
169 + | }
|
170 + | Ok(())
|
171 + | }
|
172 + | }
|
173 + | impl InventoryDeletionStatusItem {
|
174 + | /// Deserializes this structure from a [`ShapeDeserializer`].
|
175 + | pub fn deserialize(
|
176 + | deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
|
177 + | ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
|
178 + | #[allow(unused_variables, unused_mut)]
|
179 + | let mut builder = Self::builder();
|
180 + | #[allow(
|
181 + | unused_variables,
|
182 + | unreachable_code,
|
183 + | clippy::single_match,
|
184 + | clippy::match_single_binding,
|
185 + | clippy::diverging_sub_expression
|
186 + | )]
|
187 + | deserializer.read_struct(&INVENTORYDELETIONSTATUSITEM_SCHEMA, &mut |member, deser| {
|
188 + | match member.member_index() {
|
189 + | Some(0) => {
|
190 + | if deser.is_null() {
|
191 + | deser.read_null()?;
|
192 + | } else {
|
193 + | builder.deletion_id = Some(deser.read_string(member)?);
|
194 + | }
|
195 + | }
|
196 + | Some(1) => {
|
197 + | if deser.is_null() {
|
198 + | deser.read_null()?;
|
199 + | } else {
|
200 + | builder.type_name = Some(deser.read_string(member)?);
|
201 + | }
|
202 + | }
|
203 + | Some(2) => {
|
204 + | if deser.is_null() {
|
205 + | deser.read_null()?;
|
206 + | } else {
|
207 + | builder.deletion_start_time = Some(deser.read_timestamp(member)?);
|
208 + | }
|
209 + | }
|
210 + | Some(3) => {
|
211 + | if deser.is_null() {
|
212 + | deser.read_null()?;
|
213 + | } else {
|
214 + | builder.last_status = Some(crate::types::InventoryDeletionStatus::from(deser.read_string(member)?.as_str()));
|
215 + | }
|
216 + | }
|
217 + | Some(4) => {
|
218 + | if deser.is_null() {
|
219 + | deser.read_null()?;
|
220 + | } else {
|
221 + | builder.last_status_message = Some(deser.read_string(member)?);
|
222 + | }
|
223 + | }
|
224 + | Some(5) => {
|
225 + | if deser.is_null() {
|
226 + | deser.read_null()?;
|
227 + | } else {
|
228 + | builder.deletion_summary = Some(crate::types::InventoryDeletionSummary::deserialize(deser)?);
|
229 + | }
|
230 + | }
|
231 + | Some(6) => {
|
232 + | if deser.is_null() {
|
233 + | deser.read_null()?;
|
234 + | } else {
|
235 + | builder.last_status_update_time = Some(deser.read_timestamp(member)?);
|
236 + | }
|
237 + | }
|
238 + | _ => {}
|
239 + | }
|
240 + | Ok(())
|
241 + | })?;
|
242 + | Ok(builder.build())
|
243 + | }
|
244 + | }
|
245 + | impl InventoryDeletionStatusItem {
|
246 + | /// Deserializes this structure from a body deserializer and HTTP response.
|
247 + | pub fn deserialize_with_response(
|
248 + | deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
|
249 + | _headers: &::aws_smithy_runtime_api::http::Headers,
|
250 + | _status: u16,
|
251 + | _body: &[u8],
|
252 + | ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
|
253 + | Self::deserialize(deserializer)
|
254 + | }
|
255 + | }
|
256 + | impl InventoryDeletionStatusItem {
|
257 + | /// Creates a new builder-style object to manufacture [`InventoryDeletionStatusItem`](crate::types::InventoryDeletionStatusItem).
|
258 + | pub fn builder() -> crate::types::builders::InventoryDeletionStatusItemBuilder {
|
259 + | crate::types::builders::InventoryDeletionStatusItemBuilder::default()
|
260 + | }
|
261 + | }
|
262 + |
|
263 + | /// A builder for [`InventoryDeletionStatusItem`](crate::types::InventoryDeletionStatusItem).
|
264 + | #[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
|
265 + | #[non_exhaustive]
|
266 + | pub struct InventoryDeletionStatusItemBuilder {
|
267 + | pub(crate) deletion_id: ::std::option::Option<::std::string::String>,
|
268 + | pub(crate) type_name: ::std::option::Option<::std::string::String>,
|
269 + | pub(crate) deletion_start_time: ::std::option::Option<::aws_smithy_types::DateTime>,
|
270 + | pub(crate) last_status: ::std::option::Option<crate::types::InventoryDeletionStatus>,
|
271 + | pub(crate) last_status_message: ::std::option::Option<::std::string::String>,
|
272 + | pub(crate) deletion_summary: ::std::option::Option<crate::types::InventoryDeletionSummary>,
|
273 + | pub(crate) last_status_update_time: ::std::option::Option<::aws_smithy_types::DateTime>,
|
274 + | }
|
275 + | impl InventoryDeletionStatusItemBuilder {
|
276 + | /// <p>The deletion ID returned by the <code>DeleteInventory</code> operation.</p>
|
277 + | pub fn deletion_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
|
278 + | self.deletion_id = ::std::option::Option::Some(input.into());
|
279 + | self
|
280 + | }
|
281 + | /// <p>The deletion ID returned by the <code>DeleteInventory</code> operation.</p>
|
282 + | pub fn set_deletion_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
|
283 + | self.deletion_id = input;
|
284 + | self
|
285 + | }
|
286 + | /// <p>The deletion ID returned by the <code>DeleteInventory</code> operation.</p>
|
287 + | pub fn get_deletion_id(&self) -> &::std::option::Option<::std::string::String> {
|
288 + | &self.deletion_id
|
289 + | }
|
290 + | /// <p>The name of the inventory data type.</p>
|
291 + | pub fn type_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
|
292 + | self.type_name = ::std::option::Option::Some(input.into());
|
293 + | self
|
294 + | }
|
295 + | /// <p>The name of the inventory data type.</p>
|
296 + | pub fn set_type_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
|
297 + | self.type_name = input;
|
298 + | self
|
299 + | }
|
300 + | /// <p>The name of the inventory data type.</p>
|
301 + | pub fn get_type_name(&self) -> &::std::option::Option<::std::string::String> {
|
302 + | &self.type_name
|
303 + | }
|
304 + | /// <p>The UTC timestamp when the delete operation started.</p>
|
305 + | pub fn deletion_start_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
|
306 + | self.deletion_start_time = ::std::option::Option::Some(input);
|
307 + | self
|
308 + | }
|
309 + | /// <p>The UTC timestamp when the delete operation started.</p>
|
310 + | pub fn set_deletion_start_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
|
311 + | self.deletion_start_time = input;
|
312 + | self
|
313 + | }
|
314 + | /// <p>The UTC timestamp when the delete operation started.</p>
|
315 + | pub fn get_deletion_start_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
|
316 + | &self.deletion_start_time
|
317 + | }
|
318 + | /// <p>The status of the operation. Possible values are InProgress and Complete.</p>
|
319 + | pub fn last_status(mut self, input: crate::types::InventoryDeletionStatus) -> Self {
|
320 + | self.last_status = ::std::option::Option::Some(input);
|
321 + | self
|
322 + | }
|
323 + | /// <p>The status of the operation. Possible values are InProgress and Complete.</p>
|
324 + | pub fn set_last_status(mut self, input: ::std::option::Option<crate::types::InventoryDeletionStatus>) -> Self {
|
325 + | self.last_status = input;
|
326 + | self
|
327 + | }
|
328 + | /// <p>The status of the operation. Possible values are InProgress and Complete.</p>
|
329 + | pub fn get_last_status(&self) -> &::std::option::Option<crate::types::InventoryDeletionStatus> {
|
330 + | &self.last_status
|
331 + | }
|
332 + | /// <p>Information about the status.</p>
|
333 + | pub fn last_status_message(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
|
334 + | self.last_status_message = ::std::option::Option::Some(input.into());
|
335 + | self
|
336 + | }
|
337 + | /// <p>Information about the status.</p>
|
338 + | pub fn set_last_status_message(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
|
339 + | self.last_status_message = input;
|
340 + | self
|
341 + | }
|
342 + | /// <p>Information about the status.</p>
|
343 + | pub fn get_last_status_message(&self) -> &::std::option::Option<::std::string::String> {
|
344 + | &self.last_status_message
|
345 + | }
|
346 + | /// <p>Information about the delete operation. For more information about this summary, see <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/inventory-custom.html#delete-custom-inventory">Understanding the delete inventory summary</a> in the <i>Amazon Web Services Systems Manager User Guide</i>.</p>
|
347 + | pub fn deletion_summary(mut self, input: crate::types::InventoryDeletionSummary) -> Self {
|
348 + | self.deletion_summary = ::std::option::Option::Some(input);
|
349 + | self
|
350 + | }
|
351 + | /// <p>Information about the delete operation. For more information about this summary, see <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/inventory-custom.html#delete-custom-inventory">Understanding the delete inventory summary</a> in the <i>Amazon Web Services Systems Manager User Guide</i>.</p>
|
352 + | pub fn set_deletion_summary(mut self, input: ::std::option::Option<crate::types::InventoryDeletionSummary>) -> Self {
|
353 + | self.deletion_summary = input;
|
354 + | self
|
355 + | }
|
356 + | /// <p>Information about the delete operation. For more information about this summary, see <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/inventory-custom.html#delete-custom-inventory">Understanding the delete inventory summary</a> in the <i>Amazon Web Services Systems Manager User Guide</i>.</p>
|
357 + | pub fn get_deletion_summary(&self) -> &::std::option::Option<crate::types::InventoryDeletionSummary> {
|
358 + | &self.deletion_summary
|
359 + | }
|
360 + | /// <p>The UTC timestamp of when the last status report.</p>
|
361 + | pub fn last_status_update_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
|
362 + | self.last_status_update_time = ::std::option::Option::Some(input);
|
363 + | self
|
364 + | }
|
365 + | /// <p>The UTC timestamp of when the last status report.</p>
|
366 + | pub fn set_last_status_update_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
|
367 + | self.last_status_update_time = input;
|
368 + | self
|
369 + | }
|
370 + | /// <p>The UTC timestamp of when the last status report.</p>
|
371 + | pub fn get_last_status_update_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
|
372 + | &self.last_status_update_time
|
373 + | }
|
374 + | /// Consumes the builder and constructs a [`InventoryDeletionStatusItem`](crate::types::InventoryDeletionStatusItem).
|
375 + | pub fn build(self) -> crate::types::InventoryDeletionStatusItem {
|
376 + | crate::types::InventoryDeletionStatusItem {
|
377 + | deletion_id: self.deletion_id,
|
378 + | type_name: self.type_name,
|
379 + | deletion_start_time: self.deletion_start_time,
|
380 + | last_status: self.last_status,
|
381 + | last_status_message: self.last_status_message,
|
382 + | deletion_summary: self.deletion_summary,
|
383 + | last_status_update_time: self.last_status_update_time,
|
384 + | }
|
385 + | }
|
386 + | }
|