AWS SDK

AWS SDK

rev. aa190e630077955f0bc8f58dee6a16530c1e0578 (ignoring whitespace)

Files changed:

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

@@ -0,1 +0,299 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
           3  +
/// <p>The inventory item schema definition. Users can use this to compose inventory query filters.</p>
           4  +
#[non_exhaustive]
           5  +
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
           6  +
pub struct InventoryItemSchema {
           7  +
    /// <p>The name of the inventory type. Default inventory item type names start with Amazon Web Services. Custom inventory type names will start with Custom. Default inventory item types include the following: <code>AWS:AWSComponent</code>, <code>AWS:Application</code>, <code>AWS:InstanceInformation</code>, <code>AWS:Network</code>, and <code>AWS:WindowsUpdate</code>.</p>
           8  +
    pub type_name: ::std::string::String,
           9  +
    /// <p>The schema version for the inventory item.</p>
          10  +
    pub version: ::std::option::Option<::std::string::String>,
          11  +
    /// <p>The schema attributes for inventory. This contains data type and attribute name.</p>
          12  +
    pub attributes: ::std::vec::Vec<crate::types::InventoryItemAttribute>,
          13  +
    /// <p>The alias name of the inventory type. The alias name is used for display purposes.</p>
          14  +
    pub display_name: ::std::option::Option<::std::string::String>,
          15  +
}
          16  +
impl InventoryItemSchema {
          17  +
    /// <p>The name of the inventory type. Default inventory item type names start with Amazon Web Services. Custom inventory type names will start with Custom. Default inventory item types include the following: <code>AWS:AWSComponent</code>, <code>AWS:Application</code>, <code>AWS:InstanceInformation</code>, <code>AWS:Network</code>, and <code>AWS:WindowsUpdate</code>.</p>
          18  +
    pub fn type_name(&self) -> &str {
          19  +
        use std::ops::Deref;
          20  +
        self.type_name.deref()
          21  +
    }
          22  +
    /// <p>The schema version for the inventory item.</p>
          23  +
    pub fn version(&self) -> ::std::option::Option<&str> {
          24  +
        self.version.as_deref()
          25  +
    }
          26  +
    /// <p>The schema attributes for inventory. This contains data type and attribute name.</p>
          27  +
    pub fn attributes(&self) -> &[crate::types::InventoryItemAttribute] {
          28  +
        use std::ops::Deref;
          29  +
        self.attributes.deref()
          30  +
    }
          31  +
    /// <p>The alias name of the inventory type. The alias name is used for display purposes.</p>
          32  +
    pub fn display_name(&self) -> ::std::option::Option<&str> {
          33  +
        self.display_name.as_deref()
          34  +
    }
          35  +
}
          36  +
static INVENTORYITEMSCHEMA_MEMBER_TYPE_NAME: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          37  +
    ::aws_smithy_schema::ShapeId::from_parts(
          38  +
        "com.amazonaws.ssm#InventoryItemSchema$TypeName",
          39  +
        "com.amazonaws.ssm",
          40  +
        "InventoryItemSchema",
          41  +
    ),
          42  +
    ::aws_smithy_schema::ShapeType::String,
          43  +
    "TypeName",
          44  +
    0,
          45  +
);
          46  +
static INVENTORYITEMSCHEMA_MEMBER_VERSION: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          47  +
    ::aws_smithy_schema::ShapeId::from_parts(
          48  +
        "com.amazonaws.ssm#InventoryItemSchema$Version",
          49  +
        "com.amazonaws.ssm",
          50  +
        "InventoryItemSchema",
          51  +
    ),
          52  +
    ::aws_smithy_schema::ShapeType::String,
          53  +
    "Version",
          54  +
    1,
          55  +
);
          56  +
static INVENTORYITEMSCHEMA_MEMBER_ATTRIBUTES_MEMBER: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          57  +
    ::aws_smithy_schema::ShapeId::from_parts(
          58  +
        "com.amazonaws.ssm#InventoryItemAttributeList$member",
          59  +
        "com.amazonaws.ssm",
          60  +
        "InventoryItemAttributeList",
          61  +
    ),
          62  +
    ::aws_smithy_schema::ShapeType::Structure,
          63  +
    "member",
          64  +
    0,
          65  +
)
          66  +
.with_xml_name("Attribute");
          67  +
static INVENTORYITEMSCHEMA_MEMBER_ATTRIBUTES: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          68  +
    ::aws_smithy_schema::ShapeId::from_parts(
          69  +
        "com.amazonaws.ssm#InventoryItemSchema$Attributes",
          70  +
        "com.amazonaws.ssm",
          71  +
        "InventoryItemSchema",
          72  +
    ),
          73  +
    ::aws_smithy_schema::ShapeType::List,
          74  +
    "Attributes",
          75  +
    2,
          76  +
)
          77  +
.with_list_member(&INVENTORYITEMSCHEMA_MEMBER_ATTRIBUTES_MEMBER);
          78  +
static INVENTORYITEMSCHEMA_MEMBER_DISPLAY_NAME: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          79  +
    ::aws_smithy_schema::ShapeId::from_parts(
          80  +
        "com.amazonaws.ssm#InventoryItemSchema$DisplayName",
          81  +
        "com.amazonaws.ssm",
          82  +
        "InventoryItemSchema",
          83  +
    ),
          84  +
    ::aws_smithy_schema::ShapeType::String,
          85  +
    "DisplayName",
          86  +
    3,
          87  +
);
          88  +
static INVENTORYITEMSCHEMA_SCHEMA: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_struct(
          89  +
    ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#InventoryItemSchema", "com.amazonaws.ssm", "InventoryItemSchema"),
          90  +
    ::aws_smithy_schema::ShapeType::Structure,
          91  +
    &[
          92  +
        &INVENTORYITEMSCHEMA_MEMBER_TYPE_NAME,
          93  +
        &INVENTORYITEMSCHEMA_MEMBER_VERSION,
          94  +
        &INVENTORYITEMSCHEMA_MEMBER_ATTRIBUTES,
          95  +
        &INVENTORYITEMSCHEMA_MEMBER_DISPLAY_NAME,
          96  +
    ],
          97  +
);
          98  +
impl InventoryItemSchema {
          99  +
    /// The schema for this shape.
         100  +
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema<'static> = &INVENTORYITEMSCHEMA_SCHEMA;
         101  +
}
         102  +
impl ::aws_smithy_schema::serde::SerializableStruct for InventoryItemSchema {
         103  +
    #[allow(unused_variables, clippy::diverging_sub_expression)]
         104  +
    fn serialize_members(
         105  +
        &self,
         106  +
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
         107  +
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
         108  +
        {
         109  +
            let val = &self.type_name;
         110  +
            ser.write_string(&INVENTORYITEMSCHEMA_MEMBER_TYPE_NAME, val)?;
         111  +
        }
         112  +
        if let Some(ref val) = self.version {
         113  +
            ser.write_string(&INVENTORYITEMSCHEMA_MEMBER_VERSION, val)?;
         114  +
        }
         115  +
        {
         116  +
            let val = &self.attributes;
         117  +
         118  +
            ser.write_list(
         119  +
                &INVENTORYITEMSCHEMA_MEMBER_ATTRIBUTES,
         120  +
                &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
         121  +
                    for item in val {
         122  +
                        ser.write_struct(crate::types::InventoryItemAttribute::SCHEMA, item)?;
         123  +
                    }
         124  +
                    Ok(())
         125  +
                },
         126  +
            )?;
         127  +
        }
         128  +
        if let Some(ref val) = self.display_name {
         129  +
            ser.write_string(&INVENTORYITEMSCHEMA_MEMBER_DISPLAY_NAME, val)?;
         130  +
        }
         131  +
        Ok(())
         132  +
    }
         133  +
}
         134  +
impl InventoryItemSchema {
         135  +
    /// Deserializes this structure from a [`ShapeDeserializer`].
         136  +
    pub fn deserialize(
         137  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         138  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         139  +
        #[allow(unused_variables, unused_mut)]
         140  +
        let mut builder = Self::builder();
         141  +
        #[allow(
         142  +
            unused_variables,
         143  +
            unreachable_code,
         144  +
            clippy::single_match,
         145  +
            clippy::match_single_binding,
         146  +
            clippy::diverging_sub_expression
         147  +
        )]
         148  +
        deserializer.read_struct(&INVENTORYITEMSCHEMA_SCHEMA, &mut |member, deser| {
         149  +
            match member.member_index() {
         150  +
                Some(0) => {
         151  +
                    builder.type_name = Some(deser.read_string(member)?);
         152  +
                }
         153  +
                Some(1) => {
         154  +
                    if deser.is_null() {
         155  +
                        deser.read_null()?;
         156  +
                    } else {
         157  +
                        builder.version = Some(deser.read_string(member)?);
         158  +
                    }
         159  +
                }
         160  +
                Some(2) => {
         161  +
                    builder.attributes = Some({
         162  +
                        let mut container = Vec::new();
         163  +
                        deser.read_list(member, &mut |deser| {
         164  +
                            container.push(crate::types::InventoryItemAttribute::deserialize(deser)?);
         165  +
                            Ok(())
         166  +
                        })?;
         167  +
                        container
         168  +
                    });
         169  +
                }
         170  +
                Some(3) => {
         171  +
                    if deser.is_null() {
         172  +
                        deser.read_null()?;
         173  +
                    } else {
         174  +
                        builder.display_name = Some(deser.read_string(member)?);
         175  +
                    }
         176  +
                }
         177  +
                _ => {}
         178  +
            }
         179  +
            Ok(())
         180  +
        })?;
         181  +
        builder.type_name = builder.type_name.or(Some(String::new()));
         182  +
        builder.attributes = builder.attributes.or(Some(Vec::new()));
         183  +
        builder.build().map_err(|e| aws_smithy_schema::serde::SerdeError::custom(e.to_string()))
         184  +
    }
         185  +
}
         186  +
impl InventoryItemSchema {
         187  +
    /// Deserializes this structure from a body deserializer and HTTP response.
         188  +
    pub fn deserialize_with_response(
         189  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         190  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
         191  +
        _status: u16,
         192  +
        _body: &[u8],
         193  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         194  +
        Self::deserialize(deserializer)
         195  +
    }
         196  +
}
         197  +
impl InventoryItemSchema {
         198  +
    /// Creates a new builder-style object to manufacture [`InventoryItemSchema`](crate::types::InventoryItemSchema).
         199  +
    pub fn builder() -> crate::types::builders::InventoryItemSchemaBuilder {
         200  +
        crate::types::builders::InventoryItemSchemaBuilder::default()
         201  +
    }
         202  +
}
         203  +
         204  +
/// A builder for [`InventoryItemSchema`](crate::types::InventoryItemSchema).
         205  +
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
         206  +
#[non_exhaustive]
         207  +
pub struct InventoryItemSchemaBuilder {
         208  +
    pub(crate) type_name: ::std::option::Option<::std::string::String>,
         209  +
    pub(crate) version: ::std::option::Option<::std::string::String>,
         210  +
    pub(crate) attributes: ::std::option::Option<::std::vec::Vec<crate::types::InventoryItemAttribute>>,
         211  +
    pub(crate) display_name: ::std::option::Option<::std::string::String>,
         212  +
}
         213  +
impl InventoryItemSchemaBuilder {
         214  +
    /// <p>The name of the inventory type. Default inventory item type names start with Amazon Web Services. Custom inventory type names will start with Custom. Default inventory item types include the following: <code>AWS:AWSComponent</code>, <code>AWS:Application</code>, <code>AWS:InstanceInformation</code>, <code>AWS:Network</code>, and <code>AWS:WindowsUpdate</code>.</p>
         215  +
    /// This field is required.
         216  +
    pub fn type_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         217  +
        self.type_name = ::std::option::Option::Some(input.into());
         218  +
        self
         219  +
    }
         220  +
    /// <p>The name of the inventory type. Default inventory item type names start with Amazon Web Services. Custom inventory type names will start with Custom. Default inventory item types include the following: <code>AWS:AWSComponent</code>, <code>AWS:Application</code>, <code>AWS:InstanceInformation</code>, <code>AWS:Network</code>, and <code>AWS:WindowsUpdate</code>.</p>
         221  +
    pub fn set_type_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         222  +
        self.type_name = input;
         223  +
        self
         224  +
    }
         225  +
    /// <p>The name of the inventory type. Default inventory item type names start with Amazon Web Services. Custom inventory type names will start with Custom. Default inventory item types include the following: <code>AWS:AWSComponent</code>, <code>AWS:Application</code>, <code>AWS:InstanceInformation</code>, <code>AWS:Network</code>, and <code>AWS:WindowsUpdate</code>.</p>
         226  +
    pub fn get_type_name(&self) -> &::std::option::Option<::std::string::String> {
         227  +
        &self.type_name
         228  +
    }
         229  +
    /// <p>The schema version for the inventory item.</p>
         230  +
    pub fn version(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         231  +
        self.version = ::std::option::Option::Some(input.into());
         232  +
        self
         233  +
    }
         234  +
    /// <p>The schema version for the inventory item.</p>
         235  +
    pub fn set_version(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         236  +
        self.version = input;
         237  +
        self
         238  +
    }
         239  +
    /// <p>The schema version for the inventory item.</p>
         240  +
    pub fn get_version(&self) -> &::std::option::Option<::std::string::String> {
         241  +
        &self.version
         242  +
    }
         243  +
    /// Appends an item to `attributes`.
         244  +
    ///
         245  +
    /// To override the contents of this collection use [`set_attributes`](Self::set_attributes).
         246  +
    ///
         247  +
    /// <p>The schema attributes for inventory. This contains data type and attribute name.</p>
         248  +
    pub fn attributes(mut self, input: crate::types::InventoryItemAttribute) -> Self {
         249  +
        let mut v = self.attributes.unwrap_or_default();
         250  +
        v.push(input);
         251  +
        self.attributes = ::std::option::Option::Some(v);
         252  +
        self
         253  +
    }
         254  +
    /// <p>The schema attributes for inventory. This contains data type and attribute name.</p>
         255  +
    pub fn set_attributes(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::InventoryItemAttribute>>) -> Self {
         256  +
        self.attributes = input;
         257  +
        self
         258  +
    }
         259  +
    /// <p>The schema attributes for inventory. This contains data type and attribute name.</p>
         260  +
    pub fn get_attributes(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::InventoryItemAttribute>> {
         261  +
        &self.attributes
         262  +
    }
         263  +
    /// <p>The alias name of the inventory type. The alias name is used for display purposes.</p>
         264  +
    pub fn display_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         265  +
        self.display_name = ::std::option::Option::Some(input.into());
         266  +
        self
         267  +
    }
         268  +
    /// <p>The alias name of the inventory type. The alias name is used for display purposes.</p>
         269  +
    pub fn set_display_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         270  +
        self.display_name = input;
         271  +
        self
         272  +
    }
         273  +
    /// <p>The alias name of the inventory type. The alias name is used for display purposes.</p>
         274  +
    pub fn get_display_name(&self) -> &::std::option::Option<::std::string::String> {
         275  +
        &self.display_name
         276  +
    }
         277  +
    /// Consumes the builder and constructs a [`InventoryItemSchema`](crate::types::InventoryItemSchema).
         278  +
    /// This method will fail if any of the following fields are not set:
         279  +
    /// - [`type_name`](crate::types::builders::InventoryItemSchemaBuilder::type_name)
         280  +
    /// - [`attributes`](crate::types::builders::InventoryItemSchemaBuilder::attributes)
         281  +
    pub fn build(self) -> ::std::result::Result<crate::types::InventoryItemSchema, ::aws_smithy_types::error::operation::BuildError> {
         282  +
        ::std::result::Result::Ok(crate::types::InventoryItemSchema {
         283  +
            type_name: self.type_name.ok_or_else(|| {
         284  +
                ::aws_smithy_types::error::operation::BuildError::missing_field(
         285  +
                    "type_name",
         286  +
                    "type_name was not specified but it is required when building InventoryItemSchema",
         287  +
                )
         288  +
            })?,
         289  +
            version: self.version,
         290  +
            attributes: self.attributes.ok_or_else(|| {
         291  +
                ::aws_smithy_types::error::operation::BuildError::missing_field(
         292  +
                    "attributes",
         293  +
                    "attributes was not specified but it is required when building InventoryItemSchema",
         294  +
                )
         295  +
            })?,
         296  +
            display_name: self.display_name,
         297  +
        })
         298  +
    }
         299  +
}

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

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

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

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

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

@@ -0,1 +0,383 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
           3  +
/// <p>The inventory result item.</p>
           4  +
#[non_exhaustive]
           5  +
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
           6  +
pub struct InventoryResultItem {
           7  +
    /// <p>The name of the inventory result item type.</p>
           8  +
    pub type_name: ::std::string::String,
           9  +
    /// <p>The schema version for the inventory result item/</p>
          10  +
    pub schema_version: ::std::string::String,
          11  +
    /// <p>The time inventory item data was captured.</p>
          12  +
    pub capture_time: ::std::option::Option<::std::string::String>,
          13  +
    /// <p>MD5 hash of the inventory item type contents. The content hash is used to determine whether to update inventory information. The PutInventory API doesn't update the inventory item type contents if the MD5 hash hasn't changed since last update.</p>
          14  +
    pub content_hash: ::std::option::Option<::std::string::String>,
          15  +
    /// <p>Contains all the inventory data of the item type. Results include attribute names and values.</p>
          16  +
    pub content: ::std::vec::Vec<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
          17  +
}
          18  +
impl InventoryResultItem {
          19  +
    /// <p>The name of the inventory result item type.</p>
          20  +
    pub fn type_name(&self) -> &str {
          21  +
        use std::ops::Deref;
          22  +
        self.type_name.deref()
          23  +
    }
          24  +
    /// <p>The schema version for the inventory result item/</p>
          25  +
    pub fn schema_version(&self) -> &str {
          26  +
        use std::ops::Deref;
          27  +
        self.schema_version.deref()
          28  +
    }
          29  +
    /// <p>The time inventory item data was captured.</p>
          30  +
    pub fn capture_time(&self) -> ::std::option::Option<&str> {
          31  +
        self.capture_time.as_deref()
          32  +
    }
          33  +
    /// <p>MD5 hash of the inventory item type contents. The content hash is used to determine whether to update inventory information. The PutInventory API doesn't update the inventory item type contents if the MD5 hash hasn't changed since last update.</p>
          34  +
    pub fn content_hash(&self) -> ::std::option::Option<&str> {
          35  +
        self.content_hash.as_deref()
          36  +
    }
          37  +
    /// <p>Contains all the inventory data of the item type. Results include attribute names and values.</p>
          38  +
    pub fn content(&self) -> &[::std::collections::HashMap<::std::string::String, ::std::string::String>] {
          39  +
        use std::ops::Deref;
          40  +
        self.content.deref()
          41  +
    }
          42  +
}
          43  +
static INVENTORYRESULTITEM_MEMBER_TYPE_NAME: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          44  +
    ::aws_smithy_schema::ShapeId::from_parts(
          45  +
        "com.amazonaws.ssm#InventoryResultItem$TypeName",
          46  +
        "com.amazonaws.ssm",
          47  +
        "InventoryResultItem",
          48  +
    ),
          49  +
    ::aws_smithy_schema::ShapeType::String,
          50  +
    "TypeName",
          51  +
    0,
          52  +
);
          53  +
static INVENTORYRESULTITEM_MEMBER_SCHEMA_VERSION: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          54  +
    ::aws_smithy_schema::ShapeId::from_parts(
          55  +
        "com.amazonaws.ssm#InventoryResultItem$SchemaVersion",
          56  +
        "com.amazonaws.ssm",
          57  +
        "InventoryResultItem",
          58  +
    ),
          59  +
    ::aws_smithy_schema::ShapeType::String,
          60  +
    "SchemaVersion",
          61  +
    1,
          62  +
);
          63  +
static INVENTORYRESULTITEM_MEMBER_CAPTURE_TIME: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          64  +
    ::aws_smithy_schema::ShapeId::from_parts(
          65  +
        "com.amazonaws.ssm#InventoryResultItem$CaptureTime",
          66  +
        "com.amazonaws.ssm",
          67  +
        "InventoryResultItem",
          68  +
    ),
          69  +
    ::aws_smithy_schema::ShapeType::String,
          70  +
    "CaptureTime",
          71  +
    2,
          72  +
);
          73  +
static INVENTORYRESULTITEM_MEMBER_CONTENT_HASH: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          74  +
    ::aws_smithy_schema::ShapeId::from_parts(
          75  +
        "com.amazonaws.ssm#InventoryResultItem$ContentHash",
          76  +
        "com.amazonaws.ssm",
          77  +
        "InventoryResultItem",
          78  +
    ),
          79  +
    ::aws_smithy_schema::ShapeType::String,
          80  +
    "ContentHash",
          81  +
    3,
          82  +
);
          83  +
static INVENTORYRESULTITEM_MEMBER_CONTENT_MEMBER_KEY: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          84  +
    ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#InventoryItemEntry$key", "com.amazonaws.ssm", "InventoryItemEntry"),
          85  +
    ::aws_smithy_schema::ShapeType::String,
          86  +
    "key",
          87  +
    0,
          88  +
);
          89  +
static INVENTORYRESULTITEM_MEMBER_CONTENT_MEMBER_VALUE: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          90  +
    ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#InventoryItemEntry$value", "com.amazonaws.ssm", "InventoryItemEntry"),
          91  +
    ::aws_smithy_schema::ShapeType::String,
          92  +
    "value",
          93  +
    1,
          94  +
);
          95  +
static INVENTORYRESULTITEM_MEMBER_CONTENT_MEMBER: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          96  +
    ::aws_smithy_schema::ShapeId::from_parts(
          97  +
        "com.amazonaws.ssm#InventoryItemEntryList$member",
          98  +
        "com.amazonaws.ssm",
          99  +
        "InventoryItemEntryList",
         100  +
    ),
         101  +
    ::aws_smithy_schema::ShapeType::Map,
         102  +
    "member",
         103  +
    0,
         104  +
)
         105  +
.with_map_members(
         106  +
    &INVENTORYRESULTITEM_MEMBER_CONTENT_MEMBER_KEY,
         107  +
    &INVENTORYRESULTITEM_MEMBER_CONTENT_MEMBER_VALUE,
         108  +
);
         109  +
static INVENTORYRESULTITEM_MEMBER_CONTENT: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
         110  +
    ::aws_smithy_schema::ShapeId::from_parts(
         111  +
        "com.amazonaws.ssm#InventoryResultItem$Content",
         112  +
        "com.amazonaws.ssm",
         113  +
        "InventoryResultItem",
         114  +
    ),
         115  +
    ::aws_smithy_schema::ShapeType::List,
         116  +
    "Content",
         117  +
    4,
         118  +
)
         119  +
.with_list_member(&INVENTORYRESULTITEM_MEMBER_CONTENT_MEMBER);
         120  +
static INVENTORYRESULTITEM_SCHEMA: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_struct(
         121  +
    ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#InventoryResultItem", "com.amazonaws.ssm", "InventoryResultItem"),
         122  +
    ::aws_smithy_schema::ShapeType::Structure,
         123  +
    &[
         124  +
        &INVENTORYRESULTITEM_MEMBER_TYPE_NAME,
         125  +
        &INVENTORYRESULTITEM_MEMBER_SCHEMA_VERSION,
         126  +
        &INVENTORYRESULTITEM_MEMBER_CAPTURE_TIME,
         127  +
        &INVENTORYRESULTITEM_MEMBER_CONTENT_HASH,
         128  +
        &INVENTORYRESULTITEM_MEMBER_CONTENT,
         129  +
    ],
         130  +
);
         131  +
impl InventoryResultItem {
         132  +
    /// The schema for this shape.
         133  +
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema<'static> = &INVENTORYRESULTITEM_SCHEMA;
         134  +
}
         135  +
impl ::aws_smithy_schema::serde::SerializableStruct for InventoryResultItem {
         136  +
    #[allow(unused_variables, clippy::diverging_sub_expression)]
         137  +
    fn serialize_members(
         138  +
        &self,
         139  +
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
         140  +
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
         141  +
        {
         142  +
            let val = &self.type_name;
         143  +
            ser.write_string(&INVENTORYRESULTITEM_MEMBER_TYPE_NAME, val)?;
         144  +
        }
         145  +
        {
         146  +
            let val = &self.schema_version;
         147  +
            ser.write_string(&INVENTORYRESULTITEM_MEMBER_SCHEMA_VERSION, val)?;
         148  +
        }
         149  +
        if let Some(ref val) = self.capture_time {
         150  +
            ser.write_string(&INVENTORYRESULTITEM_MEMBER_CAPTURE_TIME, val)?;
         151  +
        }
         152  +
        if let Some(ref val) = self.content_hash {
         153  +
            ser.write_string(&INVENTORYRESULTITEM_MEMBER_CONTENT_HASH, val)?;
         154  +
        }
         155  +
        {
         156  +
            let val = &self.content;
         157  +
         158  +
            ser.write_list(
         159  +
                &INVENTORYRESULTITEM_MEMBER_CONTENT,
         160  +
                &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
         161  +
                    for item in val {
         162  +
                        ser.write_map(
         163  +
                            &INVENTORYRESULTITEM_MEMBER_CONTENT_MEMBER,
         164  +
                            &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
         165  +
                                for (key, value) in item {
         166  +
                                    ser.write_string(&::aws_smithy_schema::prelude::STRING, key)?;
         167  +
                                    ser.write_string(&::aws_smithy_schema::prelude::STRING, value)?;
         168  +
                                }
         169  +
                                Ok(())
         170  +
                            },
         171  +
                        )?;
         172  +
                    }
         173  +
                    Ok(())
         174  +
                },
         175  +
            )?;
         176  +
        }
         177  +
        Ok(())
         178  +
    }
         179  +
}
         180  +
impl InventoryResultItem {
         181  +
    /// Deserializes this structure from a [`ShapeDeserializer`].
         182  +
    pub fn deserialize(
         183  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         184  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         185  +
        #[allow(unused_variables, unused_mut)]
         186  +
        let mut builder = Self::builder();
         187  +
        #[allow(
         188  +
            unused_variables,
         189  +
            unreachable_code,
         190  +
            clippy::single_match,
         191  +
            clippy::match_single_binding,
         192  +
            clippy::diverging_sub_expression
         193  +
        )]
         194  +
        deserializer.read_struct(&INVENTORYRESULTITEM_SCHEMA, &mut |member, deser| {
         195  +
            match member.member_index() {
         196  +
                Some(0) => {
         197  +
                    builder.type_name = Some(deser.read_string(member)?);
         198  +
                }
         199  +
                Some(1) => {
         200  +
                    builder.schema_version = Some(deser.read_string(member)?);
         201  +
                }
         202  +
                Some(2) => {
         203  +
                    if deser.is_null() {
         204  +
                        deser.read_null()?;
         205  +
                    } else {
         206  +
                        builder.capture_time = Some(deser.read_string(member)?);
         207  +
                    }
         208  +
                }
         209  +
                Some(3) => {
         210  +
                    if deser.is_null() {
         211  +
                        deser.read_null()?;
         212  +
                    } else {
         213  +
                        builder.content_hash = Some(deser.read_string(member)?);
         214  +
                    }
         215  +
                }
         216  +
                Some(4) => {
         217  +
                    builder.content = Some({
         218  +
                        let mut container = Vec::new();
         219  +
                        deser.read_list(member, &mut |deser| {
         220  +
                            container.push({
         221  +
                                let mut map = ::std::collections::HashMap::new();
         222  +
                                deser.read_map(&INVENTORYRESULTITEM_MEMBER_CONTENT_MEMBER, &mut |key, deser| {
         223  +
                                    let value = deser.read_string(&::aws_smithy_schema::prelude::STRING)?;
         224  +
                                    map.insert(key, value);
         225  +
                                    Ok(())
         226  +
                                })?;
         227  +
                                map
         228  +
                            });
         229  +
                            Ok(())
         230  +
                        })?;
         231  +
                        container
         232  +
                    });
         233  +
                }
         234  +
                _ => {}
         235  +
            }
         236  +
            Ok(())
         237  +
        })?;
         238  +
        builder.type_name = builder.type_name.or(Some(String::new()));
         239  +
        builder.schema_version = builder.schema_version.or(Some(String::new()));
         240  +
        builder.content = builder.content.or(Some(Vec::new()));
         241  +
        builder.build().map_err(|e| aws_smithy_schema::serde::SerdeError::custom(e.to_string()))
         242  +
    }
         243  +
}
         244  +
impl InventoryResultItem {
         245  +
    /// Deserializes this structure from a body deserializer and HTTP response.
         246  +
    pub fn deserialize_with_response(
         247  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         248  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
         249  +
        _status: u16,
         250  +
        _body: &[u8],
         251  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         252  +
        Self::deserialize(deserializer)
         253  +
    }
         254  +
}
         255  +
impl InventoryResultItem {
         256  +
    /// Creates a new builder-style object to manufacture [`InventoryResultItem`](crate::types::InventoryResultItem).
         257  +
    pub fn builder() -> crate::types::builders::InventoryResultItemBuilder {
         258  +
        crate::types::builders::InventoryResultItemBuilder::default()
         259  +
    }
         260  +
}
         261  +
         262  +
/// A builder for [`InventoryResultItem`](crate::types::InventoryResultItem).
         263  +
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
         264  +
#[non_exhaustive]
         265  +
pub struct InventoryResultItemBuilder {
         266  +
    pub(crate) type_name: ::std::option::Option<::std::string::String>,
         267  +
    pub(crate) schema_version: ::std::option::Option<::std::string::String>,
         268  +
    pub(crate) capture_time: ::std::option::Option<::std::string::String>,
         269  +
    pub(crate) content_hash: ::std::option::Option<::std::string::String>,
         270  +
    pub(crate) content: ::std::option::Option<::std::vec::Vec<::std::collections::HashMap<::std::string::String, ::std::string::String>>>,
         271  +
}
         272  +
impl InventoryResultItemBuilder {
         273  +
    /// <p>The name of the inventory result item type.</p>
         274  +
    /// This field is required.
         275  +
    pub fn type_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         276  +
        self.type_name = ::std::option::Option::Some(input.into());
         277  +
        self
         278  +
    }
         279  +
    /// <p>The name of the inventory result item type.</p>
         280  +
    pub fn set_type_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         281  +
        self.type_name = input;
         282  +
        self
         283  +
    }
         284  +
    /// <p>The name of the inventory result item type.</p>
         285  +
    pub fn get_type_name(&self) -> &::std::option::Option<::std::string::String> {
         286  +
        &self.type_name
         287  +
    }
         288  +
    /// <p>The schema version for the inventory result item/</p>
         289  +
    /// This field is required.
         290  +
    pub fn schema_version(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         291  +
        self.schema_version = ::std::option::Option::Some(input.into());
         292  +
        self
         293  +
    }
         294  +
    /// <p>The schema version for the inventory result item/</p>
         295  +
    pub fn set_schema_version(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         296  +
        self.schema_version = input;
         297  +
        self
         298  +
    }
         299  +
    /// <p>The schema version for the inventory result item/</p>
         300  +
    pub fn get_schema_version(&self) -> &::std::option::Option<::std::string::String> {
         301  +
        &self.schema_version
         302  +
    }
         303  +
    /// <p>The time inventory item data was captured.</p>
         304  +
    pub fn capture_time(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         305  +
        self.capture_time = ::std::option::Option::Some(input.into());
         306  +
        self
         307  +
    }
         308  +
    /// <p>The time inventory item data was captured.</p>
         309  +
    pub fn set_capture_time(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         310  +
        self.capture_time = input;
         311  +
        self
         312  +
    }
         313  +
    /// <p>The time inventory item data was captured.</p>
         314  +
    pub fn get_capture_time(&self) -> &::std::option::Option<::std::string::String> {
         315  +
        &self.capture_time
         316  +
    }
         317  +
    /// <p>MD5 hash of the inventory item type contents. The content hash is used to determine whether to update inventory information. The PutInventory API doesn't update the inventory item type contents if the MD5 hash hasn't changed since last update.</p>
         318  +
    pub fn content_hash(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         319  +
        self.content_hash = ::std::option::Option::Some(input.into());
         320  +
        self
         321  +
    }
         322  +
    /// <p>MD5 hash of the inventory item type contents. The content hash is used to determine whether to update inventory information. The PutInventory API doesn't update the inventory item type contents if the MD5 hash hasn't changed since last update.</p>
         323  +
    pub fn set_content_hash(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         324  +
        self.content_hash = input;
         325  +
        self
         326  +
    }
         327  +
    /// <p>MD5 hash of the inventory item type contents. The content hash is used to determine whether to update inventory information. The PutInventory API doesn't update the inventory item type contents if the MD5 hash hasn't changed since last update.</p>
         328  +
    pub fn get_content_hash(&self) -> &::std::option::Option<::std::string::String> {
         329  +
        &self.content_hash
         330  +
    }
         331  +
    /// Appends an item to `content`.
         332  +
    ///
         333  +
    /// To override the contents of this collection use [`set_content`](Self::set_content).
         334  +
    ///
         335  +
    /// <p>Contains all the inventory data of the item type. Results include attribute names and values.</p>
         336  +
    pub fn content(mut self, input: ::std::collections::HashMap<::std::string::String, ::std::string::String>) -> Self {
         337  +
        let mut v = self.content.unwrap_or_default();
         338  +
        v.push(input);
         339  +
        self.content = ::std::option::Option::Some(v);
         340  +
        self
         341  +
    }
         342  +
    /// <p>Contains all the inventory data of the item type. Results include attribute names and values.</p>
         343  +
    pub fn set_content(
         344  +
        mut self,
         345  +
        input: ::std::option::Option<::std::vec::Vec<::std::collections::HashMap<::std::string::String, ::std::string::String>>>,
         346  +
    ) -> Self {
         347  +
        self.content = input;
         348  +
        self
         349  +
    }
         350  +
    /// <p>Contains all the inventory data of the item type. Results include attribute names and values.</p>
         351  +
    pub fn get_content(&self) -> &::std::option::Option<::std::vec::Vec<::std::collections::HashMap<::std::string::String, ::std::string::String>>> {
         352  +
        &self.content
         353  +
    }
         354  +
    /// Consumes the builder and constructs a [`InventoryResultItem`](crate::types::InventoryResultItem).
         355  +
    /// This method will fail if any of the following fields are not set:
         356  +
    /// - [`type_name`](crate::types::builders::InventoryResultItemBuilder::type_name)
         357  +
    /// - [`schema_version`](crate::types::builders::InventoryResultItemBuilder::schema_version)
         358  +
    /// - [`content`](crate::types::builders::InventoryResultItemBuilder::content)
         359  +
    pub fn build(self) -> ::std::result::Result<crate::types::InventoryResultItem, ::aws_smithy_types::error::operation::BuildError> {
         360  +
        ::std::result::Result::Ok(crate::types::InventoryResultItem {
         361  +
            type_name: self.type_name.ok_or_else(|| {
         362  +
                ::aws_smithy_types::error::operation::BuildError::missing_field(
         363  +
                    "type_name",
         364  +
                    "type_name was not specified but it is required when building InventoryResultItem",
         365  +
                )
         366  +
            })?,
         367  +
            schema_version: self.schema_version.ok_or_else(|| {
         368  +
                ::aws_smithy_types::error::operation::BuildError::missing_field(
         369  +
                    "schema_version",
         370  +
                    "schema_version was not specified but it is required when building InventoryResultItem",
         371  +
                )
         372  +
            })?,
         373  +
            capture_time: self.capture_time,
         374  +
            content_hash: self.content_hash,
         375  +
            content: self.content.ok_or_else(|| {
         376  +
                ::aws_smithy_types::error::operation::BuildError::missing_field(
         377  +
                    "content",
         378  +
                    "content was not specified but it is required when building InventoryResultItem",
         379  +
                )
         380  +
            })?,
         381  +
        })
         382  +
    }
         383  +
}