AWS SDK

AWS SDK

rev. bbca34fa2eddb4be623fbbc6b6df1a2401de0029 (ignoring whitespace)

Files changed:

tmp-codegen-diff/aws-sdk/sdk/ssm/src/types/_inventory_attribute_data_type.rs

@@ -0,1 +0,108 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
           3  +
/// When writing a match expression against `InventoryAttributeDataType`, it is important to ensure
           4  +
/// your code is forward-compatible. That is, if a match arm handles a case for a
           5  +
/// feature that is supported by the service but has not been represented as an enum
           6  +
/// variant in a current version of SDK, your code should continue to work when you
           7  +
/// upgrade SDK to a future version in which the enum does include a variant for that
           8  +
/// feature.
           9  +
///
          10  +
/// Here is an example of how you can make a match expression forward-compatible:
          11  +
///
          12  +
/// ```text
          13  +
/// # let inventoryattributedatatype = unimplemented!();
          14  +
/// match inventoryattributedatatype {
          15  +
///     InventoryAttributeDataType::Number => { /* ... */ },
          16  +
///     InventoryAttributeDataType::String => { /* ... */ },
          17  +
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
          18  +
///     _ => { /* ... */ },
          19  +
/// }
          20  +
/// ```
          21  +
/// The above code demonstrates that when `inventoryattributedatatype` represents
          22  +
/// `NewFeature`, the execution path will lead to the second last match arm,
          23  +
/// even though the enum does not contain a variant `InventoryAttributeDataType::NewFeature`
          24  +
/// in the current version of SDK. The reason is that the variable `other`,
          25  +
/// created by the `@` operator, is bound to
          26  +
/// `InventoryAttributeDataType::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
          27  +
/// and calling `as_str` on it yields `"NewFeature"`.
          28  +
/// This match expression is forward-compatible when executed with a newer
          29  +
/// version of SDK where the variant `InventoryAttributeDataType::NewFeature` is defined.
          30  +
/// Specifically, when `inventoryattributedatatype` represents `NewFeature`,
          31  +
/// the execution path will hit the second last match arm as before by virtue of
          32  +
/// calling `as_str` on `InventoryAttributeDataType::NewFeature` also yielding `"NewFeature"`.
          33  +
///
          34  +
/// Explicitly matching on the `Unknown` variant should
          35  +
/// be avoided for two reasons:
          36  +
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
          37  +
/// - It might inadvertently shadow other intended match arms.
          38  +
///
          39  +
#[allow(missing_docs)] // documentation missing in model
          40  +
#[non_exhaustive]
          41  +
#[derive(
          42  +
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::Ord, ::std::cmp::PartialEq, ::std::cmp::PartialOrd, ::std::fmt::Debug, ::std::hash::Hash,
          43  +
)]
          44  +
pub enum InventoryAttributeDataType {
          45  +
    #[allow(missing_docs)] // documentation missing in model
          46  +
    Number,
          47  +
    #[allow(missing_docs)] // documentation missing in model
          48  +
    String,
          49  +
    /// `Unknown` contains new variants that have been added since this code was generated.
          50  +
    #[deprecated(note = "Don't directly match on `Unknown`. See the docs on this enum for the correct way to handle unknown variants.")]
          51  +
    Unknown(crate::primitives::sealed_enum_unknown::UnknownVariantValue),
          52  +
}
          53  +
impl ::std::convert::From<&str> for InventoryAttributeDataType {
          54  +
    fn from(s: &str) -> Self {
          55  +
        match s {
          56  +
            "number" => InventoryAttributeDataType::Number,
          57  +
            "string" => InventoryAttributeDataType::String,
          58  +
            other => InventoryAttributeDataType::Unknown(crate::primitives::sealed_enum_unknown::UnknownVariantValue(other.to_owned())),
          59  +
        }
          60  +
    }
          61  +
}
          62  +
impl ::std::str::FromStr for InventoryAttributeDataType {
          63  +
    type Err = ::std::convert::Infallible;
          64  +
          65  +
    fn from_str(s: &str) -> ::std::result::Result<Self, <Self as ::std::str::FromStr>::Err> {
          66  +
        ::std::result::Result::Ok(InventoryAttributeDataType::from(s))
          67  +
    }
          68  +
}
          69  +
impl InventoryAttributeDataType {
          70  +
    /// Returns the `&str` value of the enum member.
          71  +
    pub fn as_str(&self) -> &str {
          72  +
        match self {
          73  +
            InventoryAttributeDataType::Number => "number",
          74  +
            InventoryAttributeDataType::String => "string",
          75  +
            InventoryAttributeDataType::Unknown(value) => value.as_str(),
          76  +
        }
          77  +
    }
          78  +
    /// Returns all the `&str` representations of the enum members.
          79  +
    pub const fn values() -> &'static [&'static str] {
          80  +
        &["number", "string"]
          81  +
    }
          82  +
}
          83  +
impl ::std::convert::AsRef<str> for InventoryAttributeDataType {
          84  +
    fn as_ref(&self) -> &str {
          85  +
        self.as_str()
          86  +
    }
          87  +
}
          88  +
impl InventoryAttributeDataType {
          89  +
    /// Parses the enum value while disallowing unknown variants.
          90  +
    ///
          91  +
    /// Unknown variants will result in an error.
          92  +
    pub fn try_parse(value: &str) -> ::std::result::Result<Self, crate::error::UnknownVariantError> {
          93  +
        match Self::from(value) {
          94  +
            #[allow(deprecated)]
          95  +
            Self::Unknown(_) => ::std::result::Result::Err(crate::error::UnknownVariantError::new(value)),
          96  +
            known => Ok(known),
          97  +
        }
          98  +
    }
          99  +
}
         100  +
impl ::std::fmt::Display for InventoryAttributeDataType {
         101  +
    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
         102  +
        match self {
         103  +
            InventoryAttributeDataType::Number => write!(f, "number"),
         104  +
            InventoryAttributeDataType::String => write!(f, "string"),
         105  +
            InventoryAttributeDataType::Unknown(value) => write!(f, "{value}"),
         106  +
        }
         107  +
    }
         108  +
}

tmp-codegen-diff/aws-sdk/sdk/ssm/src/types/_inventory_deletion_status.rs

@@ -0,1 +0,108 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
           3  +
/// When writing a match expression against `InventoryDeletionStatus`, it is important to ensure
           4  +
/// your code is forward-compatible. That is, if a match arm handles a case for a
           5  +
/// feature that is supported by the service but has not been represented as an enum
           6  +
/// variant in a current version of SDK, your code should continue to work when you
           7  +
/// upgrade SDK to a future version in which the enum does include a variant for that
           8  +
/// feature.
           9  +
///
          10  +
/// Here is an example of how you can make a match expression forward-compatible:
          11  +
///
          12  +
/// ```text
          13  +
/// # let inventorydeletionstatus = unimplemented!();
          14  +
/// match inventorydeletionstatus {
          15  +
///     InventoryDeletionStatus::Complete => { /* ... */ },
          16  +
///     InventoryDeletionStatus::InProgress => { /* ... */ },
          17  +
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
          18  +
///     _ => { /* ... */ },
          19  +
/// }
          20  +
/// ```
          21  +
/// The above code demonstrates that when `inventorydeletionstatus` represents
          22  +
/// `NewFeature`, the execution path will lead to the second last match arm,
          23  +
/// even though the enum does not contain a variant `InventoryDeletionStatus::NewFeature`
          24  +
/// in the current version of SDK. The reason is that the variable `other`,
          25  +
/// created by the `@` operator, is bound to
          26  +
/// `InventoryDeletionStatus::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
          27  +
/// and calling `as_str` on it yields `"NewFeature"`.
          28  +
/// This match expression is forward-compatible when executed with a newer
          29  +
/// version of SDK where the variant `InventoryDeletionStatus::NewFeature` is defined.
          30  +
/// Specifically, when `inventorydeletionstatus` represents `NewFeature`,
          31  +
/// the execution path will hit the second last match arm as before by virtue of
          32  +
/// calling `as_str` on `InventoryDeletionStatus::NewFeature` also yielding `"NewFeature"`.
          33  +
///
          34  +
/// Explicitly matching on the `Unknown` variant should
          35  +
/// be avoided for two reasons:
          36  +
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
          37  +
/// - It might inadvertently shadow other intended match arms.
          38  +
///
          39  +
#[allow(missing_docs)] // documentation missing in model
          40  +
#[non_exhaustive]
          41  +
#[derive(
          42  +
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::Ord, ::std::cmp::PartialEq, ::std::cmp::PartialOrd, ::std::fmt::Debug, ::std::hash::Hash,
          43  +
)]
          44  +
pub enum InventoryDeletionStatus {
          45  +
    #[allow(missing_docs)] // documentation missing in model
          46  +
    Complete,
          47  +
    #[allow(missing_docs)] // documentation missing in model
          48  +
    InProgress,
          49  +
    /// `Unknown` contains new variants that have been added since this code was generated.
          50  +
    #[deprecated(note = "Don't directly match on `Unknown`. See the docs on this enum for the correct way to handle unknown variants.")]
          51  +
    Unknown(crate::primitives::sealed_enum_unknown::UnknownVariantValue),
          52  +
}
          53  +
impl ::std::convert::From<&str> for InventoryDeletionStatus {
          54  +
    fn from(s: &str) -> Self {
          55  +
        match s {
          56  +
            "Complete" => InventoryDeletionStatus::Complete,
          57  +
            "InProgress" => InventoryDeletionStatus::InProgress,
          58  +
            other => InventoryDeletionStatus::Unknown(crate::primitives::sealed_enum_unknown::UnknownVariantValue(other.to_owned())),
          59  +
        }
          60  +
    }
          61  +
}
          62  +
impl ::std::str::FromStr for InventoryDeletionStatus {
          63  +
    type Err = ::std::convert::Infallible;
          64  +
          65  +
    fn from_str(s: &str) -> ::std::result::Result<Self, <Self as ::std::str::FromStr>::Err> {
          66  +
        ::std::result::Result::Ok(InventoryDeletionStatus::from(s))
          67  +
    }
          68  +
}
          69  +
impl InventoryDeletionStatus {
          70  +
    /// Returns the `&str` value of the enum member.
          71  +
    pub fn as_str(&self) -> &str {
          72  +
        match self {
          73  +
            InventoryDeletionStatus::Complete => "Complete",
          74  +
            InventoryDeletionStatus::InProgress => "InProgress",
          75  +
            InventoryDeletionStatus::Unknown(value) => value.as_str(),
          76  +
        }
          77  +
    }
          78  +
    /// Returns all the `&str` representations of the enum members.
          79  +
    pub const fn values() -> &'static [&'static str] {
          80  +
        &["Complete", "InProgress"]
          81  +
    }
          82  +
}
          83  +
impl ::std::convert::AsRef<str> for InventoryDeletionStatus {
          84  +
    fn as_ref(&self) -> &str {
          85  +
        self.as_str()
          86  +
    }
          87  +
}
          88  +
impl InventoryDeletionStatus {
          89  +
    /// Parses the enum value while disallowing unknown variants.
          90  +
    ///
          91  +
    /// Unknown variants will result in an error.
          92  +
    pub fn try_parse(value: &str) -> ::std::result::Result<Self, crate::error::UnknownVariantError> {
          93  +
        match Self::from(value) {
          94  +
            #[allow(deprecated)]
          95  +
            Self::Unknown(_) => ::std::result::Result::Err(crate::error::UnknownVariantError::new(value)),
          96  +
            known => Ok(known),
          97  +
        }
          98  +
    }
          99  +
}
         100  +
impl ::std::fmt::Display for InventoryDeletionStatus {
         101  +
    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
         102  +
        match self {
         103  +
            InventoryDeletionStatus::Complete => write!(f, "Complete"),
         104  +
            InventoryDeletionStatus::InProgress => write!(f, "InProgress"),
         105  +
            InventoryDeletionStatus::Unknown(value) => write!(f, "{value}"),
         106  +
        }
         107  +
    }
         108  +
}

tmp-codegen-diff/aws-sdk/sdk/ssm/src/types/_inventory_deletion_status_item.rs

@@ -0,1 +0,386 @@
           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  +
}

tmp-codegen-diff/aws-sdk/sdk/ssm/src/types/_inventory_deletion_summary.rs

@@ -0,1 +0,242 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
           3  +
/// <p>Information about the delete operation.</p>
           4  +
#[non_exhaustive]
           5  +
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
           6  +
pub struct InventoryDeletionSummary {
           7  +
    /// <p>The total number of items to delete. This count doesn't change during the delete operation.</p>
           8  +
    pub total_count: i32,
           9  +
    /// <p>Remaining number of items to delete.</p>
          10  +
    pub remaining_count: i32,
          11  +
    /// <p>A list of counts and versions for deleted items.</p>
          12  +
    pub summary_items: ::std::option::Option<::std::vec::Vec<crate::types::InventoryDeletionSummaryItem>>,
          13  +
}
          14  +
impl InventoryDeletionSummary {
          15  +
    /// <p>The total number of items to delete. This count doesn't change during the delete operation.</p>
          16  +
    pub fn total_count(&self) -> i32 {
          17  +
        self.total_count
          18  +
    }
          19  +
    /// <p>Remaining number of items to delete.</p>
          20  +
    pub fn remaining_count(&self) -> i32 {
          21  +
        self.remaining_count
          22  +
    }
          23  +
    /// <p>A list of counts and versions for deleted items.</p>
          24  +
    ///
          25  +
    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.summary_items.is_none()`.
          26  +
    pub fn summary_items(&self) -> &[crate::types::InventoryDeletionSummaryItem] {
          27  +
        self.summary_items.as_deref().unwrap_or_default()
          28  +
    }
          29  +
}
          30  +
static INVENTORYDELETIONSUMMARY_MEMBER_TOTAL_COUNT: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          31  +
    ::aws_smithy_schema::ShapeId::from_parts(
          32  +
        "com.amazonaws.ssm#InventoryDeletionSummary$TotalCount",
          33  +
        "com.amazonaws.ssm",
          34  +
        "InventoryDeletionSummary",
          35  +
    ),
          36  +
    ::aws_smithy_schema::ShapeType::Integer,
          37  +
    "TotalCount",
          38  +
    0,
          39  +
);
          40  +
static INVENTORYDELETIONSUMMARY_MEMBER_REMAINING_COUNT: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          41  +
    ::aws_smithy_schema::ShapeId::from_parts(
          42  +
        "com.amazonaws.ssm#InventoryDeletionSummary$RemainingCount",
          43  +
        "com.amazonaws.ssm",
          44  +
        "InventoryDeletionSummary",
          45  +
    ),
          46  +
    ::aws_smithy_schema::ShapeType::Integer,
          47  +
    "RemainingCount",
          48  +
    1,
          49  +
);
          50  +
static INVENTORYDELETIONSUMMARY_MEMBER_SUMMARY_ITEMS_MEMBER: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          51  +
    ::aws_smithy_schema::ShapeId::from_parts(
          52  +
        "com.amazonaws.ssm#InventoryDeletionSummaryItems$member",
          53  +
        "com.amazonaws.ssm",
          54  +
        "InventoryDeletionSummaryItems",
          55  +
    ),
          56  +
    ::aws_smithy_schema::ShapeType::Structure,
          57  +
    "member",
          58  +
    0,
          59  +
);
          60  +
static INVENTORYDELETIONSUMMARY_MEMBER_SUMMARY_ITEMS: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          61  +
    ::aws_smithy_schema::ShapeId::from_parts(
          62  +
        "com.amazonaws.ssm#InventoryDeletionSummary$SummaryItems",
          63  +
        "com.amazonaws.ssm",
          64  +
        "InventoryDeletionSummary",
          65  +
    ),
          66  +
    ::aws_smithy_schema::ShapeType::List,
          67  +
    "SummaryItems",
          68  +
    2,
          69  +
)
          70  +
.with_list_member(&INVENTORYDELETIONSUMMARY_MEMBER_SUMMARY_ITEMS_MEMBER);
          71  +
static INVENTORYDELETIONSUMMARY_SCHEMA: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_struct(
          72  +
    ::aws_smithy_schema::ShapeId::from_parts(
          73  +
        "com.amazonaws.ssm#InventoryDeletionSummary",
          74  +
        "com.amazonaws.ssm",
          75  +
        "InventoryDeletionSummary",
          76  +
    ),
          77  +
    ::aws_smithy_schema::ShapeType::Structure,
          78  +
    &[
          79  +
        &INVENTORYDELETIONSUMMARY_MEMBER_TOTAL_COUNT,
          80  +
        &INVENTORYDELETIONSUMMARY_MEMBER_REMAINING_COUNT,
          81  +
        &INVENTORYDELETIONSUMMARY_MEMBER_SUMMARY_ITEMS,
          82  +
    ],
          83  +
);
          84  +
impl InventoryDeletionSummary {
          85  +
    /// The schema for this shape.
          86  +
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema<'static> = &INVENTORYDELETIONSUMMARY_SCHEMA;
          87  +
}
          88  +
impl ::aws_smithy_schema::serde::SerializableStruct for InventoryDeletionSummary {
          89  +
    #[allow(unused_variables, clippy::diverging_sub_expression)]
          90  +
    fn serialize_members(
          91  +
        &self,
          92  +
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
          93  +
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
          94  +
        {
          95  +
            let val = &self.total_count;
          96  +
            ser.write_integer(&INVENTORYDELETIONSUMMARY_MEMBER_TOTAL_COUNT, *val)?;
          97  +
        }
          98  +
        {
          99  +
            let val = &self.remaining_count;
         100  +
            ser.write_integer(&INVENTORYDELETIONSUMMARY_MEMBER_REMAINING_COUNT, *val)?;
         101  +
        }
         102  +
        if let Some(ref val) = self.summary_items {
         103  +
            ser.write_list(
         104  +
                &INVENTORYDELETIONSUMMARY_MEMBER_SUMMARY_ITEMS,
         105  +
                &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
         106  +
                    for item in val {
         107  +
                        ser.write_struct(crate::types::InventoryDeletionSummaryItem::SCHEMA, item)?;
         108  +
                    }
         109  +
                    Ok(())
         110  +
                },
         111  +
            )?;
         112  +
        }
         113  +
        Ok(())
         114  +
    }
         115  +
}
         116  +
impl InventoryDeletionSummary {
         117  +
    /// Deserializes this structure from a [`ShapeDeserializer`].
         118  +
    pub fn deserialize(
         119  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         120  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         121  +
        #[allow(unused_variables, unused_mut)]
         122  +
        let mut builder = Self::builder();
         123  +
        #[allow(
         124  +
            unused_variables,
         125  +
            unreachable_code,
         126  +
            clippy::single_match,
         127  +
            clippy::match_single_binding,
         128  +
            clippy::diverging_sub_expression
         129  +
        )]
         130  +
        deserializer.read_struct(&INVENTORYDELETIONSUMMARY_SCHEMA, &mut |member, deser| {
         131  +
            match member.member_index() {
         132  +
                Some(0) => {
         133  +
                    builder.total_count = Some(deser.read_integer(member)?);
         134  +
                }
         135  +
                Some(1) => {
         136  +
                    builder.remaining_count = Some(deser.read_integer(member)?);
         137  +
                }
         138  +
                Some(2) => {
         139  +
                    if deser.is_null() {
         140  +
                        deser.read_null()?;
         141  +
                    } else {
         142  +
                        builder.summary_items = Some({
         143  +
                            let mut container = Vec::new();
         144  +
                            deser.read_list(member, &mut |deser| {
         145  +
                                container.push(crate::types::InventoryDeletionSummaryItem::deserialize(deser)?);
         146  +
                                Ok(())
         147  +
                            })?;
         148  +
                            container
         149  +
                        });
         150  +
                    }
         151  +
                }
         152  +
                _ => {}
         153  +
            }
         154  +
            Ok(())
         155  +
        })?;
         156  +
        Ok(builder.build())
         157  +
    }
         158  +
}
         159  +
impl InventoryDeletionSummary {
         160  +
    /// Deserializes this structure from a body deserializer and HTTP response.
         161  +
    pub fn deserialize_with_response(
         162  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         163  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
         164  +
        _status: u16,
         165  +
        _body: &[u8],
         166  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         167  +
        Self::deserialize(deserializer)
         168  +
    }
         169  +
}
         170  +
impl InventoryDeletionSummary {
         171  +
    /// Creates a new builder-style object to manufacture [`InventoryDeletionSummary`](crate::types::InventoryDeletionSummary).
         172  +
    pub fn builder() -> crate::types::builders::InventoryDeletionSummaryBuilder {
         173  +
        crate::types::builders::InventoryDeletionSummaryBuilder::default()
         174  +
    }
         175  +
}
         176  +
         177  +
/// A builder for [`InventoryDeletionSummary`](crate::types::InventoryDeletionSummary).
         178  +
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
         179  +
#[non_exhaustive]
         180  +
pub struct InventoryDeletionSummaryBuilder {
         181  +
    pub(crate) total_count: ::std::option::Option<i32>,
         182  +
    pub(crate) remaining_count: ::std::option::Option<i32>,
         183  +
    pub(crate) summary_items: ::std::option::Option<::std::vec::Vec<crate::types::InventoryDeletionSummaryItem>>,
         184  +
}
         185  +
impl InventoryDeletionSummaryBuilder {
         186  +
    /// <p>The total number of items to delete. This count doesn't change during the delete operation.</p>
         187  +
    pub fn total_count(mut self, input: i32) -> Self {
         188  +
        self.total_count = ::std::option::Option::Some(input);
         189  +
        self
         190  +
    }
         191  +
    /// <p>The total number of items to delete. This count doesn't change during the delete operation.</p>
         192  +
    pub fn set_total_count(mut self, input: ::std::option::Option<i32>) -> Self {
         193  +
        self.total_count = input;
         194  +
        self
         195  +
    }
         196  +
    /// <p>The total number of items to delete. This count doesn't change during the delete operation.</p>
         197  +
    pub fn get_total_count(&self) -> &::std::option::Option<i32> {
         198  +
        &self.total_count
         199  +
    }
         200  +
    /// <p>Remaining number of items to delete.</p>
         201  +
    pub fn remaining_count(mut self, input: i32) -> Self {
         202  +
        self.remaining_count = ::std::option::Option::Some(input);
         203  +
        self
         204  +
    }
         205  +
    /// <p>Remaining number of items to delete.</p>
         206  +
    pub fn set_remaining_count(mut self, input: ::std::option::Option<i32>) -> Self {
         207  +
        self.remaining_count = input;
         208  +
        self
         209  +
    }
         210  +
    /// <p>Remaining number of items to delete.</p>
         211  +
    pub fn get_remaining_count(&self) -> &::std::option::Option<i32> {
         212  +
        &self.remaining_count
         213  +
    }
         214  +
    /// Appends an item to `summary_items`.
         215  +
    ///
         216  +
    /// To override the contents of this collection use [`set_summary_items`](Self::set_summary_items).
         217  +
    ///
         218  +
    /// <p>A list of counts and versions for deleted items.</p>
         219  +
    pub fn summary_items(mut self, input: crate::types::InventoryDeletionSummaryItem) -> Self {
         220  +
        let mut v = self.summary_items.unwrap_or_default();
         221  +
        v.push(input);
         222  +
        self.summary_items = ::std::option::Option::Some(v);
         223  +
        self
         224  +
    }
         225  +
    /// <p>A list of counts and versions for deleted items.</p>
         226  +
    pub fn set_summary_items(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::InventoryDeletionSummaryItem>>) -> Self {
         227  +
        self.summary_items = input;
         228  +
        self
         229  +
    }
         230  +
    /// <p>A list of counts and versions for deleted items.</p>
         231  +
    pub fn get_summary_items(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::InventoryDeletionSummaryItem>> {
         232  +
        &self.summary_items
         233  +
    }
         234  +
    /// Consumes the builder and constructs a [`InventoryDeletionSummary`](crate::types::InventoryDeletionSummary).
         235  +
    pub fn build(self) -> crate::types::InventoryDeletionSummary {
         236  +
        crate::types::InventoryDeletionSummary {
         237  +
            total_count: self.total_count.unwrap_or_default(),
         238  +
            remaining_count: self.remaining_count.unwrap_or_default(),
         239  +
            summary_items: self.summary_items,
         240  +
        }
         241  +
    }
         242  +
}

tmp-codegen-diff/aws-sdk/sdk/ssm/src/types/_inventory_deletion_summary_item.rs

@@ -0,1 +0,208 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
           3  +
/// <p>Either a count, remaining count, or a version number in a delete inventory summary.</p>
           4  +
#[non_exhaustive]
           5  +
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
           6  +
pub struct InventoryDeletionSummaryItem {
           7  +
    /// <p>The inventory type version.</p>
           8  +
    pub version: ::std::option::Option<::std::string::String>,
           9  +
    /// <p>A count of the number of deleted items.</p>
          10  +
    pub count: i32,
          11  +
    /// <p>The remaining number of items to delete.</p>
          12  +
    pub remaining_count: i32,
          13  +
}
          14  +
impl InventoryDeletionSummaryItem {
          15  +
    /// <p>The inventory type version.</p>
          16  +
    pub fn version(&self) -> ::std::option::Option<&str> {
          17  +
        self.version.as_deref()
          18  +
    }
          19  +
    /// <p>A count of the number of deleted items.</p>
          20  +
    pub fn count(&self) -> i32 {
          21  +
        self.count
          22  +
    }
          23  +
    /// <p>The remaining number of items to delete.</p>
          24  +
    pub fn remaining_count(&self) -> i32 {
          25  +
        self.remaining_count
          26  +
    }
          27  +
}
          28  +
static INVENTORYDELETIONSUMMARYITEM_MEMBER_VERSION: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          29  +
    ::aws_smithy_schema::ShapeId::from_parts(
          30  +
        "com.amazonaws.ssm#InventoryDeletionSummaryItem$Version",
          31  +
        "com.amazonaws.ssm",
          32  +
        "InventoryDeletionSummaryItem",
          33  +
    ),
          34  +
    ::aws_smithy_schema::ShapeType::String,
          35  +
    "Version",
          36  +
    0,
          37  +
);
          38  +
static INVENTORYDELETIONSUMMARYITEM_MEMBER_COUNT: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          39  +
    ::aws_smithy_schema::ShapeId::from_parts(
          40  +
        "com.amazonaws.ssm#InventoryDeletionSummaryItem$Count",
          41  +
        "com.amazonaws.ssm",
          42  +
        "InventoryDeletionSummaryItem",
          43  +
    ),
          44  +
    ::aws_smithy_schema::ShapeType::Integer,
          45  +
    "Count",
          46  +
    1,
          47  +
);
          48  +
static INVENTORYDELETIONSUMMARYITEM_MEMBER_REMAINING_COUNT: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          49  +
    ::aws_smithy_schema::ShapeId::from_parts(
          50  +
        "com.amazonaws.ssm#InventoryDeletionSummaryItem$RemainingCount",
          51  +
        "com.amazonaws.ssm",
          52  +
        "InventoryDeletionSummaryItem",
          53  +
    ),
          54  +
    ::aws_smithy_schema::ShapeType::Integer,
          55  +
    "RemainingCount",
          56  +
    2,
          57  +
);
          58  +
static INVENTORYDELETIONSUMMARYITEM_SCHEMA: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_struct(
          59  +
    ::aws_smithy_schema::ShapeId::from_parts(
          60  +
        "com.amazonaws.ssm#InventoryDeletionSummaryItem",
          61  +
        "com.amazonaws.ssm",
          62  +
        "InventoryDeletionSummaryItem",
          63  +
    ),
          64  +
    ::aws_smithy_schema::ShapeType::Structure,
          65  +
    &[
          66  +
        &INVENTORYDELETIONSUMMARYITEM_MEMBER_VERSION,
          67  +
        &INVENTORYDELETIONSUMMARYITEM_MEMBER_COUNT,
          68  +
        &INVENTORYDELETIONSUMMARYITEM_MEMBER_REMAINING_COUNT,
          69  +
    ],
          70  +
);
          71  +
impl InventoryDeletionSummaryItem {
          72  +
    /// The schema for this shape.
          73  +
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema<'static> = &INVENTORYDELETIONSUMMARYITEM_SCHEMA;
          74  +
}
          75  +
impl ::aws_smithy_schema::serde::SerializableStruct for InventoryDeletionSummaryItem {
          76  +
    #[allow(unused_variables, clippy::diverging_sub_expression)]
          77  +
    fn serialize_members(
          78  +
        &self,
          79  +
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
          80  +
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
          81  +
        if let Some(ref val) = self.version {
          82  +
            ser.write_string(&INVENTORYDELETIONSUMMARYITEM_MEMBER_VERSION, val)?;
          83  +
        }
          84  +
        {
          85  +
            let val = &self.count;
          86  +
            ser.write_integer(&INVENTORYDELETIONSUMMARYITEM_MEMBER_COUNT, *val)?;
          87  +
        }
          88  +
        {
          89  +
            let val = &self.remaining_count;
          90  +
            ser.write_integer(&INVENTORYDELETIONSUMMARYITEM_MEMBER_REMAINING_COUNT, *val)?;
          91  +
        }
          92  +
        Ok(())
          93  +
    }
          94  +
}
          95  +
impl InventoryDeletionSummaryItem {
          96  +
    /// Deserializes this structure from a [`ShapeDeserializer`].
          97  +
    pub fn deserialize(
          98  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
          99  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         100  +
        #[allow(unused_variables, unused_mut)]
         101  +
        let mut builder = Self::builder();
         102  +
        #[allow(
         103  +
            unused_variables,
         104  +
            unreachable_code,
         105  +
            clippy::single_match,
         106  +
            clippy::match_single_binding,
         107  +
            clippy::diverging_sub_expression
         108  +
        )]
         109  +
        deserializer.read_struct(&INVENTORYDELETIONSUMMARYITEM_SCHEMA, &mut |member, deser| {
         110  +
            match member.member_index() {
         111  +
                Some(0) => {
         112  +
                    if deser.is_null() {
         113  +
                        deser.read_null()?;
         114  +
                    } else {
         115  +
                        builder.version = Some(deser.read_string(member)?);
         116  +
                    }
         117  +
                }
         118  +
                Some(1) => {
         119  +
                    builder.count = Some(deser.read_integer(member)?);
         120  +
                }
         121  +
                Some(2) => {
         122  +
                    builder.remaining_count = Some(deser.read_integer(member)?);
         123  +
                }
         124  +
                _ => {}
         125  +
            }
         126  +
            Ok(())
         127  +
        })?;
         128  +
        Ok(builder.build())
         129  +
    }
         130  +
}
         131  +
impl InventoryDeletionSummaryItem {
         132  +
    /// Deserializes this structure from a body deserializer and HTTP response.
         133  +
    pub fn deserialize_with_response(
         134  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         135  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
         136  +
        _status: u16,
         137  +
        _body: &[u8],
         138  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         139  +
        Self::deserialize(deserializer)
         140  +
    }
         141  +
}
         142  +
impl InventoryDeletionSummaryItem {
         143  +
    /// Creates a new builder-style object to manufacture [`InventoryDeletionSummaryItem`](crate::types::InventoryDeletionSummaryItem).
         144  +
    pub fn builder() -> crate::types::builders::InventoryDeletionSummaryItemBuilder {
         145  +
        crate::types::builders::InventoryDeletionSummaryItemBuilder::default()
         146  +
    }
         147  +
}
         148  +
         149  +
/// A builder for [`InventoryDeletionSummaryItem`](crate::types::InventoryDeletionSummaryItem).
         150  +
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
         151  +
#[non_exhaustive]
         152  +
pub struct InventoryDeletionSummaryItemBuilder {
         153  +
    pub(crate) version: ::std::option::Option<::std::string::String>,
         154  +
    pub(crate) count: ::std::option::Option<i32>,
         155  +
    pub(crate) remaining_count: ::std::option::Option<i32>,
         156  +
}
         157  +
impl InventoryDeletionSummaryItemBuilder {
         158  +
    /// <p>The inventory type version.</p>
         159  +
    pub fn version(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         160  +
        self.version = ::std::option::Option::Some(input.into());
         161  +
        self
         162  +
    }
         163  +
    /// <p>The inventory type version.</p>
         164  +
    pub fn set_version(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         165  +
        self.version = input;
         166  +
        self
         167  +
    }
         168  +
    /// <p>The inventory type version.</p>
         169  +
    pub fn get_version(&self) -> &::std::option::Option<::std::string::String> {
         170  +
        &self.version
         171  +
    }
         172  +
    /// <p>A count of the number of deleted items.</p>
         173  +
    pub fn count(mut self, input: i32) -> Self {
         174  +
        self.count = ::std::option::Option::Some(input);
         175  +
        self
         176  +
    }
         177  +
    /// <p>A count of the number of deleted items.</p>
         178  +
    pub fn set_count(mut self, input: ::std::option::Option<i32>) -> Self {
         179  +
        self.count = input;
         180  +
        self
         181  +
    }
         182  +
    /// <p>A count of the number of deleted items.</p>
         183  +
    pub fn get_count(&self) -> &::std::option::Option<i32> {
         184  +
        &self.count
         185  +
    }
         186  +
    /// <p>The remaining number of items to delete.</p>
         187  +
    pub fn remaining_count(mut self, input: i32) -> Self {
         188  +
        self.remaining_count = ::std::option::Option::Some(input);
         189  +
        self
         190  +
    }
         191  +
    /// <p>The remaining number of items to delete.</p>
         192  +
    pub fn set_remaining_count(mut self, input: ::std::option::Option<i32>) -> Self {
         193  +
        self.remaining_count = input;
         194  +
        self
         195  +
    }
         196  +
    /// <p>The remaining number of items to delete.</p>
         197  +
    pub fn get_remaining_count(&self) -> &::std::option::Option<i32> {
         198  +
        &self.remaining_count
         199  +
    }
         200  +
    /// Consumes the builder and constructs a [`InventoryDeletionSummaryItem`](crate::types::InventoryDeletionSummaryItem).
         201  +
    pub fn build(self) -> crate::types::InventoryDeletionSummaryItem {
         202  +
        crate::types::InventoryDeletionSummaryItem {
         203  +
            version: self.version,
         204  +
            count: self.count.unwrap_or_default(),
         205  +
            remaining_count: self.remaining_count.unwrap_or_default(),
         206  +
        }
         207  +
    }
         208  +
}