AWS SDK

AWS SDK

rev. 3388bf5e18f4269f2b46f39cdc814c5c39d413d0

Files changed:

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

@@ -0,1 +0,201 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
           3  +
/// <p>Describes a filter for a specific list of managed nodes. You can filter node information by using tags. You specify tags by using a key-value mapping.</p>
           4  +
#[non_exhaustive]
           5  +
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
           6  +
pub struct InstancePropertyFilter {
           7  +
    /// <p>The name of the filter.</p>
           8  +
    pub key: crate::types::InstancePropertyFilterKey,
           9  +
    /// <p>The filter values.</p>
          10  +
    pub value_set: ::std::vec::Vec<::std::string::String>,
          11  +
}
          12  +
impl InstancePropertyFilter {
          13  +
    /// <p>The name of the filter.</p>
          14  +
    pub fn key(&self) -> &crate::types::InstancePropertyFilterKey {
          15  +
        &self.key
          16  +
    }
          17  +
    /// <p>The filter values.</p>
          18  +
    pub fn value_set(&self) -> &[::std::string::String] {
          19  +
        use std::ops::Deref;
          20  +
        self.value_set.deref()
          21  +
    }
          22  +
}
          23  +
static INSTANCEPROPERTYFILTER_MEMBER_KEY: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          24  +
    ::aws_smithy_schema::ShapeId::from_parts(
          25  +
        "com.amazonaws.ssm#InstancePropertyFilter$key",
          26  +
        "com.amazonaws.ssm",
          27  +
        "InstancePropertyFilter",
          28  +
    ),
          29  +
    ::aws_smithy_schema::ShapeType::String,
          30  +
    "key",
          31  +
    0,
          32  +
);
          33  +
static INSTANCEPROPERTYFILTER_MEMBER_VALUE_SET_MEMBER: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          34  +
    ::aws_smithy_schema::ShapeId::from_parts(
          35  +
        "com.amazonaws.ssm#InstancePropertyFilterValueSet$member",
          36  +
        "com.amazonaws.ssm",
          37  +
        "InstancePropertyFilterValueSet",
          38  +
    ),
          39  +
    ::aws_smithy_schema::ShapeType::String,
          40  +
    "member",
          41  +
    0,
          42  +
)
          43  +
.with_xml_name("InstancePropertyFilterValue");
          44  +
static INSTANCEPROPERTYFILTER_MEMBER_VALUE_SET: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          45  +
    ::aws_smithy_schema::ShapeId::from_parts(
          46  +
        "com.amazonaws.ssm#InstancePropertyFilter$valueSet",
          47  +
        "com.amazonaws.ssm",
          48  +
        "InstancePropertyFilter",
          49  +
    ),
          50  +
    ::aws_smithy_schema::ShapeType::List,
          51  +
    "valueSet",
          52  +
    1,
          53  +
)
          54  +
.with_list_member(&INSTANCEPROPERTYFILTER_MEMBER_VALUE_SET_MEMBER);
          55  +
static INSTANCEPROPERTYFILTER_SCHEMA: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_struct(
          56  +
    ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#InstancePropertyFilter", "com.amazonaws.ssm", "InstancePropertyFilter"),
          57  +
    ::aws_smithy_schema::ShapeType::Structure,
          58  +
    &[&INSTANCEPROPERTYFILTER_MEMBER_KEY, &INSTANCEPROPERTYFILTER_MEMBER_VALUE_SET],
          59  +
);
          60  +
impl InstancePropertyFilter {
          61  +
    /// The schema for this shape.
          62  +
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema<'static> = &INSTANCEPROPERTYFILTER_SCHEMA;
          63  +
}
          64  +
impl ::aws_smithy_schema::serde::SerializableStruct for InstancePropertyFilter {
          65  +
    #[allow(unused_variables, clippy::diverging_sub_expression)]
          66  +
    fn serialize_members(
          67  +
        &self,
          68  +
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
          69  +
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
          70  +
        {
          71  +
            let val = &self.key;
          72  +
            ser.write_string(&INSTANCEPROPERTYFILTER_MEMBER_KEY, val.as_str())?;
          73  +
        }
          74  +
        {
          75  +
            let val = &self.value_set;
          76  +
          77  +
            ser.write_list(
          78  +
                &INSTANCEPROPERTYFILTER_MEMBER_VALUE_SET,
          79  +
                &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
          80  +
                    for item in val {
          81  +
                        ser.write_string(&aws_smithy_schema::prelude::STRING, item)?;
          82  +
                    }
          83  +
                    Ok(())
          84  +
                },
          85  +
            )?;
          86  +
        }
          87  +
        Ok(())
          88  +
    }
          89  +
}
          90  +
impl InstancePropertyFilter {
          91  +
    /// Deserializes this structure from a [`ShapeDeserializer`].
          92  +
    pub fn deserialize(
          93  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
          94  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
          95  +
        #[allow(unused_variables, unused_mut)]
          96  +
        let mut builder = Self::builder();
          97  +
        #[allow(
          98  +
            unused_variables,
          99  +
            unreachable_code,
         100  +
            clippy::single_match,
         101  +
            clippy::match_single_binding,
         102  +
            clippy::diverging_sub_expression
         103  +
        )]
         104  +
        deserializer.read_struct(&INSTANCEPROPERTYFILTER_SCHEMA, &mut |member, deser| {
         105  +
            match member.member_index() {
         106  +
                Some(0) => {
         107  +
                    builder.key = Some(crate::types::InstancePropertyFilterKey::from(deser.read_string(member)?.as_str()));
         108  +
                }
         109  +
                Some(1) => {
         110  +
                    builder.value_set = Some(deser.read_string_list(member)?);
         111  +
                }
         112  +
                _ => {}
         113  +
            }
         114  +
            Ok(())
         115  +
        })?;
         116  +
        builder.value_set = builder.value_set.or(Some(Vec::new()));
         117  +
        builder.build().map_err(|e| aws_smithy_schema::serde::SerdeError::custom(e.to_string()))
         118  +
    }
         119  +
}
         120  +
impl InstancePropertyFilter {
         121  +
    /// Deserializes this structure from a body deserializer and HTTP response.
         122  +
    pub fn deserialize_with_response(
         123  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         124  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
         125  +
        _status: u16,
         126  +
        _body: &[u8],
         127  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         128  +
        Self::deserialize(deserializer)
         129  +
    }
         130  +
}
         131  +
impl InstancePropertyFilter {
         132  +
    /// Creates a new builder-style object to manufacture [`InstancePropertyFilter`](crate::types::InstancePropertyFilter).
         133  +
    pub fn builder() -> crate::types::builders::InstancePropertyFilterBuilder {
         134  +
        crate::types::builders::InstancePropertyFilterBuilder::default()
         135  +
    }
         136  +
}
         137  +
         138  +
/// A builder for [`InstancePropertyFilter`](crate::types::InstancePropertyFilter).
         139  +
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
         140  +
#[non_exhaustive]
         141  +
pub struct InstancePropertyFilterBuilder {
         142  +
    pub(crate) key: ::std::option::Option<crate::types::InstancePropertyFilterKey>,
         143  +
    pub(crate) value_set: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
         144  +
}
         145  +
impl InstancePropertyFilterBuilder {
         146  +
    /// <p>The name of the filter.</p>
         147  +
    /// This field is required.
         148  +
    pub fn key(mut self, input: crate::types::InstancePropertyFilterKey) -> Self {
         149  +
        self.key = ::std::option::Option::Some(input);
         150  +
        self
         151  +
    }
         152  +
    /// <p>The name of the filter.</p>
         153  +
    pub fn set_key(mut self, input: ::std::option::Option<crate::types::InstancePropertyFilterKey>) -> Self {
         154  +
        self.key = input;
         155  +
        self
         156  +
    }
         157  +
    /// <p>The name of the filter.</p>
         158  +
    pub fn get_key(&self) -> &::std::option::Option<crate::types::InstancePropertyFilterKey> {
         159  +
        &self.key
         160  +
    }
         161  +
    /// Appends an item to `value_set`.
         162  +
    ///
         163  +
    /// To override the contents of this collection use [`set_value_set`](Self::set_value_set).
         164  +
    ///
         165  +
    /// <p>The filter values.</p>
         166  +
    pub fn value_set(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         167  +
        let mut v = self.value_set.unwrap_or_default();
         168  +
        v.push(input.into());
         169  +
        self.value_set = ::std::option::Option::Some(v);
         170  +
        self
         171  +
    }
         172  +
    /// <p>The filter values.</p>
         173  +
    pub fn set_value_set(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
         174  +
        self.value_set = input;
         175  +
        self
         176  +
    }
         177  +
    /// <p>The filter values.</p>
         178  +
    pub fn get_value_set(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
         179  +
        &self.value_set
         180  +
    }
         181  +
    /// Consumes the builder and constructs a [`InstancePropertyFilter`](crate::types::InstancePropertyFilter).
         182  +
    /// This method will fail if any of the following fields are not set:
         183  +
    /// - [`key`](crate::types::builders::InstancePropertyFilterBuilder::key)
         184  +
    /// - [`value_set`](crate::types::builders::InstancePropertyFilterBuilder::value_set)
         185  +
    pub fn build(self) -> ::std::result::Result<crate::types::InstancePropertyFilter, ::aws_smithy_types::error::operation::BuildError> {
         186  +
        ::std::result::Result::Ok(crate::types::InstancePropertyFilter {
         187  +
            key: self.key.ok_or_else(|| {
         188  +
                ::aws_smithy_types::error::operation::BuildError::missing_field(
         189  +
                    "key",
         190  +
                    "key was not specified but it is required when building InstancePropertyFilter",
         191  +
                )
         192  +
            })?,
         193  +
            value_set: self.value_set.ok_or_else(|| {
         194  +
                ::aws_smithy_types::error::operation::BuildError::missing_field(
         195  +
                    "value_set",
         196  +
                    "value_set was not specified but it is required when building InstancePropertyFilter",
         197  +
                )
         198  +
            })?,
         199  +
        })
         200  +
    }
         201  +
}

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

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

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

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

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

@@ -0,1 +0,253 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
           3  +
/// <p>The filters to describe or get information about your managed nodes.</p>
           4  +
#[non_exhaustive]
           5  +
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
           6  +
pub struct InstancePropertyStringFilter {
           7  +
    /// <p>The filter key name to describe your managed nodes.</p>
           8  +
    pub key: ::std::string::String,
           9  +
    /// <p>The filter key name to describe your managed nodes.</p>
          10  +
    pub values: ::std::vec::Vec<::std::string::String>,
          11  +
    /// <p>The operator used by the filter call.</p>
          12  +
    pub operator: ::std::option::Option<crate::types::InstancePropertyFilterOperator>,
          13  +
}
          14  +
impl InstancePropertyStringFilter {
          15  +
    /// <p>The filter key name to describe your managed nodes.</p>
          16  +
    pub fn key(&self) -> &str {
          17  +
        use std::ops::Deref;
          18  +
        self.key.deref()
          19  +
    }
          20  +
    /// <p>The filter key name to describe your managed nodes.</p>
          21  +
    pub fn values(&self) -> &[::std::string::String] {
          22  +
        use std::ops::Deref;
          23  +
        self.values.deref()
          24  +
    }
          25  +
    /// <p>The operator used by the filter call.</p>
          26  +
    pub fn operator(&self) -> ::std::option::Option<&crate::types::InstancePropertyFilterOperator> {
          27  +
        self.operator.as_ref()
          28  +
    }
          29  +
}
          30  +
static INSTANCEPROPERTYSTRINGFILTER_MEMBER_KEY: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          31  +
    ::aws_smithy_schema::ShapeId::from_parts(
          32  +
        "com.amazonaws.ssm#InstancePropertyStringFilter$Key",
          33  +
        "com.amazonaws.ssm",
          34  +
        "InstancePropertyStringFilter",
          35  +
    ),
          36  +
    ::aws_smithy_schema::ShapeType::String,
          37  +
    "Key",
          38  +
    0,
          39  +
);
          40  +
static INSTANCEPROPERTYSTRINGFILTER_MEMBER_VALUES_MEMBER: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          41  +
    ::aws_smithy_schema::ShapeId::from_parts(
          42  +
        "com.amazonaws.ssm#InstancePropertyFilterValueSet$member",
          43  +
        "com.amazonaws.ssm",
          44  +
        "InstancePropertyFilterValueSet",
          45  +
    ),
          46  +
    ::aws_smithy_schema::ShapeType::String,
          47  +
    "member",
          48  +
    0,
          49  +
)
          50  +
.with_xml_name("InstancePropertyFilterValue");
          51  +
static INSTANCEPROPERTYSTRINGFILTER_MEMBER_VALUES: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          52  +
    ::aws_smithy_schema::ShapeId::from_parts(
          53  +
        "com.amazonaws.ssm#InstancePropertyStringFilter$Values",
          54  +
        "com.amazonaws.ssm",
          55  +
        "InstancePropertyStringFilter",
          56  +
    ),
          57  +
    ::aws_smithy_schema::ShapeType::List,
          58  +
    "Values",
          59  +
    1,
          60  +
)
          61  +
.with_list_member(&INSTANCEPROPERTYSTRINGFILTER_MEMBER_VALUES_MEMBER);
          62  +
static INSTANCEPROPERTYSTRINGFILTER_MEMBER_OPERATOR: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          63  +
    ::aws_smithy_schema::ShapeId::from_parts(
          64  +
        "com.amazonaws.ssm#InstancePropertyStringFilter$Operator",
          65  +
        "com.amazonaws.ssm",
          66  +
        "InstancePropertyStringFilter",
          67  +
    ),
          68  +
    ::aws_smithy_schema::ShapeType::String,
          69  +
    "Operator",
          70  +
    2,
          71  +
);
          72  +
static INSTANCEPROPERTYSTRINGFILTER_SCHEMA: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_struct(
          73  +
    ::aws_smithy_schema::ShapeId::from_parts(
          74  +
        "com.amazonaws.ssm#InstancePropertyStringFilter",
          75  +
        "com.amazonaws.ssm",
          76  +
        "InstancePropertyStringFilter",
          77  +
    ),
          78  +
    ::aws_smithy_schema::ShapeType::Structure,
          79  +
    &[
          80  +
        &INSTANCEPROPERTYSTRINGFILTER_MEMBER_KEY,
          81  +
        &INSTANCEPROPERTYSTRINGFILTER_MEMBER_VALUES,
          82  +
        &INSTANCEPROPERTYSTRINGFILTER_MEMBER_OPERATOR,
          83  +
    ],
          84  +
);
          85  +
impl InstancePropertyStringFilter {
          86  +
    /// The schema for this shape.
          87  +
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema<'static> = &INSTANCEPROPERTYSTRINGFILTER_SCHEMA;
          88  +
}
          89  +
impl ::aws_smithy_schema::serde::SerializableStruct for InstancePropertyStringFilter {
          90  +
    #[allow(unused_variables, clippy::diverging_sub_expression)]
          91  +
    fn serialize_members(
          92  +
        &self,
          93  +
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
          94  +
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
          95  +
        {
          96  +
            let val = &self.key;
          97  +
            ser.write_string(&INSTANCEPROPERTYSTRINGFILTER_MEMBER_KEY, val)?;
          98  +
        }
          99  +
        {
         100  +
            let val = &self.values;
         101  +
         102  +
            ser.write_list(
         103  +
                &INSTANCEPROPERTYSTRINGFILTER_MEMBER_VALUES,
         104  +
                &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
         105  +
                    for item in val {
         106  +
                        ser.write_string(&aws_smithy_schema::prelude::STRING, item)?;
         107  +
                    }
         108  +
                    Ok(())
         109  +
                },
         110  +
            )?;
         111  +
        }
         112  +
        if let Some(ref val) = self.operator {
         113  +
            ser.write_string(&INSTANCEPROPERTYSTRINGFILTER_MEMBER_OPERATOR, val.as_str())?;
         114  +
        }
         115  +
        Ok(())
         116  +
    }
         117  +
}
         118  +
impl InstancePropertyStringFilter {
         119  +
    /// Deserializes this structure from a [`ShapeDeserializer`].
         120  +
    pub fn deserialize(
         121  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         122  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         123  +
        #[allow(unused_variables, unused_mut)]
         124  +
        let mut builder = Self::builder();
         125  +
        #[allow(
         126  +
            unused_variables,
         127  +
            unreachable_code,
         128  +
            clippy::single_match,
         129  +
            clippy::match_single_binding,
         130  +
            clippy::diverging_sub_expression
         131  +
        )]
         132  +
        deserializer.read_struct(&INSTANCEPROPERTYSTRINGFILTER_SCHEMA, &mut |member, deser| {
         133  +
            match member.member_index() {
         134  +
                Some(0) => {
         135  +
                    builder.key = Some(deser.read_string(member)?);
         136  +
                }
         137  +
                Some(1) => {
         138  +
                    builder.values = Some(deser.read_string_list(member)?);
         139  +
                }
         140  +
                Some(2) => {
         141  +
                    if deser.is_null() {
         142  +
                        deser.read_null()?;
         143  +
                    } else {
         144  +
                        builder.operator = Some(crate::types::InstancePropertyFilterOperator::from(deser.read_string(member)?.as_str()));
         145  +
                    }
         146  +
                }
         147  +
                _ => {}
         148  +
            }
         149  +
            Ok(())
         150  +
        })?;
         151  +
        builder.key = builder.key.or(Some(String::new()));
         152  +
        builder.values = builder.values.or(Some(Vec::new()));
         153  +
        builder.build().map_err(|e| aws_smithy_schema::serde::SerdeError::custom(e.to_string()))
         154  +
    }
         155  +
}
         156  +
impl InstancePropertyStringFilter {
         157  +
    /// Deserializes this structure from a body deserializer and HTTP response.
         158  +
    pub fn deserialize_with_response(
         159  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         160  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
         161  +
        _status: u16,
         162  +
        _body: &[u8],
         163  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         164  +
        Self::deserialize(deserializer)
         165  +
    }
         166  +
}
         167  +
impl InstancePropertyStringFilter {
         168  +
    /// Creates a new builder-style object to manufacture [`InstancePropertyStringFilter`](crate::types::InstancePropertyStringFilter).
         169  +
    pub fn builder() -> crate::types::builders::InstancePropertyStringFilterBuilder {
         170  +
        crate::types::builders::InstancePropertyStringFilterBuilder::default()
         171  +
    }
         172  +
}
         173  +
         174  +
/// A builder for [`InstancePropertyStringFilter`](crate::types::InstancePropertyStringFilter).
         175  +
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
         176  +
#[non_exhaustive]
         177  +
pub struct InstancePropertyStringFilterBuilder {
         178  +
    pub(crate) key: ::std::option::Option<::std::string::String>,
         179  +
    pub(crate) values: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
         180  +
    pub(crate) operator: ::std::option::Option<crate::types::InstancePropertyFilterOperator>,
         181  +
}
         182  +
impl InstancePropertyStringFilterBuilder {
         183  +
    /// <p>The filter key name to describe your managed nodes.</p>
         184  +
    /// This field is required.
         185  +
    pub fn key(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         186  +
        self.key = ::std::option::Option::Some(input.into());
         187  +
        self
         188  +
    }
         189  +
    /// <p>The filter key name to describe your managed nodes.</p>
         190  +
    pub fn set_key(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         191  +
        self.key = input;
         192  +
        self
         193  +
    }
         194  +
    /// <p>The filter key name to describe your managed nodes.</p>
         195  +
    pub fn get_key(&self) -> &::std::option::Option<::std::string::String> {
         196  +
        &self.key
         197  +
    }
         198  +
    /// Appends an item to `values`.
         199  +
    ///
         200  +
    /// To override the contents of this collection use [`set_values`](Self::set_values).
         201  +
    ///
         202  +
    /// <p>The filter key name to describe your managed nodes.</p>
         203  +
    pub fn values(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         204  +
        let mut v = self.values.unwrap_or_default();
         205  +
        v.push(input.into());
         206  +
        self.values = ::std::option::Option::Some(v);
         207  +
        self
         208  +
    }
         209  +
    /// <p>The filter key name to describe your managed nodes.</p>
         210  +
    pub fn set_values(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
         211  +
        self.values = input;
         212  +
        self
         213  +
    }
         214  +
    /// <p>The filter key name to describe your managed nodes.</p>
         215  +
    pub fn get_values(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
         216  +
        &self.values
         217  +
    }
         218  +
    /// <p>The operator used by the filter call.</p>
         219  +
    pub fn operator(mut self, input: crate::types::InstancePropertyFilterOperator) -> Self {
         220  +
        self.operator = ::std::option::Option::Some(input);
         221  +
        self
         222  +
    }
         223  +
    /// <p>The operator used by the filter call.</p>
         224  +
    pub fn set_operator(mut self, input: ::std::option::Option<crate::types::InstancePropertyFilterOperator>) -> Self {
         225  +
        self.operator = input;
         226  +
        self
         227  +
    }
         228  +
    /// <p>The operator used by the filter call.</p>
         229  +
    pub fn get_operator(&self) -> &::std::option::Option<crate::types::InstancePropertyFilterOperator> {
         230  +
        &self.operator
         231  +
    }
         232  +
    /// Consumes the builder and constructs a [`InstancePropertyStringFilter`](crate::types::InstancePropertyStringFilter).
         233  +
    /// This method will fail if any of the following fields are not set:
         234  +
    /// - [`key`](crate::types::builders::InstancePropertyStringFilterBuilder::key)
         235  +
    /// - [`values`](crate::types::builders::InstancePropertyStringFilterBuilder::values)
         236  +
    pub fn build(self) -> ::std::result::Result<crate::types::InstancePropertyStringFilter, ::aws_smithy_types::error::operation::BuildError> {
         237  +
        ::std::result::Result::Ok(crate::types::InstancePropertyStringFilter {
         238  +
            key: self.key.ok_or_else(|| {
         239  +
                ::aws_smithy_types::error::operation::BuildError::missing_field(
         240  +
                    "key",
         241  +
                    "key was not specified but it is required when building InstancePropertyStringFilter",
         242  +
                )
         243  +
            })?,
         244  +
            values: self.values.ok_or_else(|| {
         245  +
                ::aws_smithy_types::error::operation::BuildError::missing_field(
         246  +
                    "values",
         247  +
                    "values was not specified but it is required when building InstancePropertyStringFilter",
         248  +
                )
         249  +
            })?,
         250  +
            operator: self.operator,
         251  +
        })
         252  +
    }
         253  +
}

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

@@ -0,1 +0,272 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
           3  +
/// <p>Specifies the inventory type and attribute for the aggregation execution.</p>
           4  +
#[non_exhaustive]
           5  +
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
           6  +
pub struct InventoryAggregator {
           7  +
    /// <p>The inventory type and attribute name for aggregation.</p>
           8  +
    pub expression: ::std::option::Option<::std::string::String>,
           9  +
    /// <p>Nested aggregators to further refine aggregation for an inventory type.</p>
          10  +
    pub aggregators: ::std::option::Option<::std::vec::Vec<crate::types::InventoryAggregator>>,
          11  +
    /// <p>A user-defined set of one or more filters on which to aggregate inventory data. Groups return a count of resources that match and don't match the specified criteria.</p>
          12  +
    pub groups: ::std::option::Option<::std::vec::Vec<crate::types::InventoryGroup>>,
          13  +
}
          14  +
impl InventoryAggregator {
          15  +
    /// <p>The inventory type and attribute name for aggregation.</p>
          16  +
    pub fn expression(&self) -> ::std::option::Option<&str> {
          17  +
        self.expression.as_deref()
          18  +
    }
          19  +
    /// <p>Nested aggregators to further refine aggregation for an inventory type.</p>
          20  +
    ///
          21  +
    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.aggregators.is_none()`.
          22  +
    pub fn aggregators(&self) -> &[crate::types::InventoryAggregator] {
          23  +
        self.aggregators.as_deref().unwrap_or_default()
          24  +
    }
          25  +
    /// <p>A user-defined set of one or more filters on which to aggregate inventory data. Groups return a count of resources that match and don't match the specified criteria.</p>
          26  +
    ///
          27  +
    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.groups.is_none()`.
          28  +
    pub fn groups(&self) -> &[crate::types::InventoryGroup] {
          29  +
        self.groups.as_deref().unwrap_or_default()
          30  +
    }
          31  +
}
          32  +
static INVENTORYAGGREGATOR_MEMBER_EXPRESSION: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          33  +
    ::aws_smithy_schema::ShapeId::from_parts(
          34  +
        "com.amazonaws.ssm#InventoryAggregator$Expression",
          35  +
        "com.amazonaws.ssm",
          36  +
        "InventoryAggregator",
          37  +
    ),
          38  +
    ::aws_smithy_schema::ShapeType::String,
          39  +
    "Expression",
          40  +
    0,
          41  +
);
          42  +
static INVENTORYAGGREGATOR_MEMBER_AGGREGATORS_MEMBER: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          43  +
    ::aws_smithy_schema::ShapeId::from_parts(
          44  +
        "com.amazonaws.ssm#InventoryAggregatorList$member",
          45  +
        "com.amazonaws.ssm",
          46  +
        "InventoryAggregatorList",
          47  +
    ),
          48  +
    ::aws_smithy_schema::ShapeType::Structure,
          49  +
    "member",
          50  +
    0,
          51  +
)
          52  +
.with_xml_name("Aggregator");
          53  +
static INVENTORYAGGREGATOR_MEMBER_AGGREGATORS: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          54  +
    ::aws_smithy_schema::ShapeId::from_parts(
          55  +
        "com.amazonaws.ssm#InventoryAggregator$Aggregators",
          56  +
        "com.amazonaws.ssm",
          57  +
        "InventoryAggregator",
          58  +
    ),
          59  +
    ::aws_smithy_schema::ShapeType::List,
          60  +
    "Aggregators",
          61  +
    1,
          62  +
)
          63  +
.with_list_member(&INVENTORYAGGREGATOR_MEMBER_AGGREGATORS_MEMBER);
          64  +
static INVENTORYAGGREGATOR_MEMBER_GROUPS_MEMBER: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          65  +
    ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#InventoryGroupList$member", "com.amazonaws.ssm", "InventoryGroupList"),
          66  +
    ::aws_smithy_schema::ShapeType::Structure,
          67  +
    "member",
          68  +
    0,
          69  +
)
          70  +
.with_xml_name("InventoryGroup");
          71  +
static INVENTORYAGGREGATOR_MEMBER_GROUPS: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          72  +
    ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#InventoryAggregator$Groups", "com.amazonaws.ssm", "InventoryAggregator"),
          73  +
    ::aws_smithy_schema::ShapeType::List,
          74  +
    "Groups",
          75  +
    2,
          76  +
)
          77  +
.with_list_member(&INVENTORYAGGREGATOR_MEMBER_GROUPS_MEMBER);
          78  +
static INVENTORYAGGREGATOR_SCHEMA: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_struct(
          79  +
    ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#InventoryAggregator", "com.amazonaws.ssm", "InventoryAggregator"),
          80  +
    ::aws_smithy_schema::ShapeType::Structure,
          81  +
    &[
          82  +
        &INVENTORYAGGREGATOR_MEMBER_EXPRESSION,
          83  +
        &INVENTORYAGGREGATOR_MEMBER_AGGREGATORS,
          84  +
        &INVENTORYAGGREGATOR_MEMBER_GROUPS,
          85  +
    ],
          86  +
);
          87  +
impl InventoryAggregator {
          88  +
    /// The schema for this shape.
          89  +
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema<'static> = &INVENTORYAGGREGATOR_SCHEMA;
          90  +
}
          91  +
impl ::aws_smithy_schema::serde::SerializableStruct for InventoryAggregator {
          92  +
    #[allow(unused_variables, clippy::diverging_sub_expression)]
          93  +
    fn serialize_members(
          94  +
        &self,
          95  +
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
          96  +
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
          97  +
        if let Some(ref val) = self.expression {
          98  +
            ser.write_string(&INVENTORYAGGREGATOR_MEMBER_EXPRESSION, val)?;
          99  +
        }
         100  +
        if let Some(ref val) = self.aggregators {
         101  +
            ser.write_list(
         102  +
                &INVENTORYAGGREGATOR_MEMBER_AGGREGATORS,
         103  +
                &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
         104  +
                    for item in val {
         105  +
                        ser.write_struct(crate::types::InventoryAggregator::SCHEMA, item)?;
         106  +
                    }
         107  +
                    Ok(())
         108  +
                },
         109  +
            )?;
         110  +
        }
         111  +
        if let Some(ref val) = self.groups {
         112  +
            ser.write_list(
         113  +
                &INVENTORYAGGREGATOR_MEMBER_GROUPS,
         114  +
                &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
         115  +
                    for item in val {
         116  +
                        ser.write_struct(crate::types::InventoryGroup::SCHEMA, item)?;
         117  +
                    }
         118  +
                    Ok(())
         119  +
                },
         120  +
            )?;
         121  +
        }
         122  +
        Ok(())
         123  +
    }
         124  +
}
         125  +
impl InventoryAggregator {
         126  +
    /// Deserializes this structure from a [`ShapeDeserializer`].
         127  +
    pub fn deserialize(
         128  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         129  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         130  +
        #[allow(unused_variables, unused_mut)]
         131  +
        let mut builder = Self::builder();
         132  +
        #[allow(
         133  +
            unused_variables,
         134  +
            unreachable_code,
         135  +
            clippy::single_match,
         136  +
            clippy::match_single_binding,
         137  +
            clippy::diverging_sub_expression
         138  +
        )]
         139  +
        deserializer.read_struct(&INVENTORYAGGREGATOR_SCHEMA, &mut |member, deser| {
         140  +
            match member.member_index() {
         141  +
                Some(0) => {
         142  +
                    if deser.is_null() {
         143  +
                        deser.read_null()?;
         144  +
                    } else {
         145  +
                        builder.expression = Some(deser.read_string(member)?);
         146  +
                    }
         147  +
                }
         148  +
                Some(1) => {
         149  +
                    if deser.is_null() {
         150  +
                        deser.read_null()?;
         151  +
                    } else {
         152  +
                        builder.aggregators = Some({
         153  +
                            let mut container = Vec::new();
         154  +
                            deser.read_list(member, &mut |deser| {
         155  +
                                container.push(crate::types::InventoryAggregator::deserialize(deser)?);
         156  +
                                Ok(())
         157  +
                            })?;
         158  +
                            container
         159  +
                        });
         160  +
                    }
         161  +
                }
         162  +
                Some(2) => {
         163  +
                    if deser.is_null() {
         164  +
                        deser.read_null()?;
         165  +
                    } else {
         166  +
                        builder.groups = Some({
         167  +
                            let mut container = Vec::new();
         168  +
                            deser.read_list(member, &mut |deser| {
         169  +
                                container.push(crate::types::InventoryGroup::deserialize(deser)?);
         170  +
                                Ok(())
         171  +
                            })?;
         172  +
                            container
         173  +
                        });
         174  +
                    }
         175  +
                }
         176  +
                _ => {}
         177  +
            }
         178  +
            Ok(())
         179  +
        })?;
         180  +
        Ok(builder.build())
         181  +
    }
         182  +
}
         183  +
impl InventoryAggregator {
         184  +
    /// Deserializes this structure from a body deserializer and HTTP response.
         185  +
    pub fn deserialize_with_response(
         186  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         187  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
         188  +
        _status: u16,
         189  +
        _body: &[u8],
         190  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         191  +
        Self::deserialize(deserializer)
         192  +
    }
         193  +
}
         194  +
impl InventoryAggregator {
         195  +
    /// Creates a new builder-style object to manufacture [`InventoryAggregator`](crate::types::InventoryAggregator).
         196  +
    pub fn builder() -> crate::types::builders::InventoryAggregatorBuilder {
         197  +
        crate::types::builders::InventoryAggregatorBuilder::default()
         198  +
    }
         199  +
}
         200  +
         201  +
/// A builder for [`InventoryAggregator`](crate::types::InventoryAggregator).
         202  +
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
         203  +
#[non_exhaustive]
         204  +
pub struct InventoryAggregatorBuilder {
         205  +
    pub(crate) expression: ::std::option::Option<::std::string::String>,
         206  +
    pub(crate) aggregators: ::std::option::Option<::std::vec::Vec<crate::types::InventoryAggregator>>,
         207  +
    pub(crate) groups: ::std::option::Option<::std::vec::Vec<crate::types::InventoryGroup>>,
         208  +
}
         209  +
impl InventoryAggregatorBuilder {
         210  +
    /// <p>The inventory type and attribute name for aggregation.</p>
         211  +
    pub fn expression(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         212  +
        self.expression = ::std::option::Option::Some(input.into());
         213  +
        self
         214  +
    }
         215  +
    /// <p>The inventory type and attribute name for aggregation.</p>
         216  +
    pub fn set_expression(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         217  +
        self.expression = input;
         218  +
        self
         219  +
    }
         220  +
    /// <p>The inventory type and attribute name for aggregation.</p>
         221  +
    pub fn get_expression(&self) -> &::std::option::Option<::std::string::String> {
         222  +
        &self.expression
         223  +
    }
         224  +
    /// Appends an item to `aggregators`.
         225  +
    ///
         226  +
    /// To override the contents of this collection use [`set_aggregators`](Self::set_aggregators).
         227  +
    ///
         228  +
    /// <p>Nested aggregators to further refine aggregation for an inventory type.</p>
         229  +
    pub fn aggregators(mut self, input: crate::types::InventoryAggregator) -> Self {
         230  +
        let mut v = self.aggregators.unwrap_or_default();
         231  +
        v.push(input);
         232  +
        self.aggregators = ::std::option::Option::Some(v);
         233  +
        self
         234  +
    }
         235  +
    /// <p>Nested aggregators to further refine aggregation for an inventory type.</p>
         236  +
    pub fn set_aggregators(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::InventoryAggregator>>) -> Self {
         237  +
        self.aggregators = input;
         238  +
        self
         239  +
    }
         240  +
    /// <p>Nested aggregators to further refine aggregation for an inventory type.</p>
         241  +
    pub fn get_aggregators(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::InventoryAggregator>> {
         242  +
        &self.aggregators
         243  +
    }
         244  +
    /// Appends an item to `groups`.
         245  +
    ///
         246  +
    /// To override the contents of this collection use [`set_groups`](Self::set_groups).
         247  +
    ///
         248  +
    /// <p>A user-defined set of one or more filters on which to aggregate inventory data. Groups return a count of resources that match and don't match the specified criteria.</p>
         249  +
    pub fn groups(mut self, input: crate::types::InventoryGroup) -> Self {
         250  +
        let mut v = self.groups.unwrap_or_default();
         251  +
        v.push(input);
         252  +
        self.groups = ::std::option::Option::Some(v);
         253  +
        self
         254  +
    }
         255  +
    /// <p>A user-defined set of one or more filters on which to aggregate inventory data. Groups return a count of resources that match and don't match the specified criteria.</p>
         256  +
    pub fn set_groups(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::InventoryGroup>>) -> Self {
         257  +
        self.groups = input;
         258  +
        self
         259  +
    }
         260  +
    /// <p>A user-defined set of one or more filters on which to aggregate inventory data. Groups return a count of resources that match and don't match the specified criteria.</p>
         261  +
    pub fn get_groups(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::InventoryGroup>> {
         262  +
        &self.groups
         263  +
    }
         264  +
    /// Consumes the builder and constructs a [`InventoryAggregator`](crate::types::InventoryAggregator).
         265  +
    pub fn build(self) -> crate::types::InventoryAggregator {
         266  +
        crate::types::InventoryAggregator {
         267  +
            expression: self.expression,
         268  +
            aggregators: self.aggregators,
         269  +
            groups: self.groups,
         270  +
        }
         271  +
    }
         272  +
}