AWS SDK

AWS SDK

rev. 3388bf5e18f4269f2b46f39cdc814c5c39d413d0

Files changed:

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

@@ -0,1 +0,269 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
           3  +
/// <p>One or more filters. Use a filter to return a more specific list of results.</p>
           4  +
#[non_exhaustive]
           5  +
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
           6  +
pub struct ParameterStringFilter {
           7  +
    /// <p>The name of the filter.</p>
           8  +
    /// <p>The <code>ParameterStringFilter</code> object is used by the <code>DescribeParameters</code> and <code>GetParametersByPath</code> API operations. However, not all of the pattern values listed for <code>Key</code> can be used with both operations.</p>
           9  +
    /// <p>For <code>DescribeParameters</code>, all of the listed patterns are valid except <code>Label</code>.</p>
          10  +
    /// <p>For <code>GetParametersByPath</code>, the following patterns listed for <code>Key</code> aren't valid: <code>tag</code>, <code>DataType</code>, <code>Name</code>, <code>Path</code>, and <code>Tier</code>.</p>
          11  +
    /// <p>For examples of Amazon Web Services CLI commands demonstrating valid parameter filter constructions, see <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/parameter-search.html">Searching for Systems Manager parameters</a> in the <i>Amazon Web Services Systems Manager User Guide</i>.</p>
          12  +
    pub key: ::std::string::String,
          13  +
    /// <p>For all filters used with <code>DescribeParameters</code>, valid options include <code>Equals</code> and <code>BeginsWith</code>. The <code>Name</code> filter additionally supports the <code>Contains</code> option. (Exception: For filters using the key <code>Path</code>, valid options include <code>Recursive</code> and <code>OneLevel</code>.)</p>
          14  +
    /// <p>For filters used with <code>GetParametersByPath</code>, valid options include <code>Equals</code> and <code>BeginsWith</code>. (Exception: For filters using <code>Label</code> as the Key name, the only valid option is <code>Equals</code>.)</p>
          15  +
    pub option: ::std::option::Option<::std::string::String>,
          16  +
    /// <p>The value you want to search for.</p>
          17  +
    pub values: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
          18  +
}
          19  +
impl ParameterStringFilter {
          20  +
    /// <p>The name of the filter.</p>
          21  +
    /// <p>The <code>ParameterStringFilter</code> object is used by the <code>DescribeParameters</code> and <code>GetParametersByPath</code> API operations. However, not all of the pattern values listed for <code>Key</code> can be used with both operations.</p>
          22  +
    /// <p>For <code>DescribeParameters</code>, all of the listed patterns are valid except <code>Label</code>.</p>
          23  +
    /// <p>For <code>GetParametersByPath</code>, the following patterns listed for <code>Key</code> aren't valid: <code>tag</code>, <code>DataType</code>, <code>Name</code>, <code>Path</code>, and <code>Tier</code>.</p>
          24  +
    /// <p>For examples of Amazon Web Services CLI commands demonstrating valid parameter filter constructions, see <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/parameter-search.html">Searching for Systems Manager parameters</a> in the <i>Amazon Web Services Systems Manager User Guide</i>.</p>
          25  +
    pub fn key(&self) -> &str {
          26  +
        use std::ops::Deref;
          27  +
        self.key.deref()
          28  +
    }
          29  +
    /// <p>For all filters used with <code>DescribeParameters</code>, valid options include <code>Equals</code> and <code>BeginsWith</code>. The <code>Name</code> filter additionally supports the <code>Contains</code> option. (Exception: For filters using the key <code>Path</code>, valid options include <code>Recursive</code> and <code>OneLevel</code>.)</p>
          30  +
    /// <p>For filters used with <code>GetParametersByPath</code>, valid options include <code>Equals</code> and <code>BeginsWith</code>. (Exception: For filters using <code>Label</code> as the Key name, the only valid option is <code>Equals</code>.)</p>
          31  +
    pub fn option(&self) -> ::std::option::Option<&str> {
          32  +
        self.option.as_deref()
          33  +
    }
          34  +
    /// <p>The value you want to search for.</p>
          35  +
    ///
          36  +
    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.values.is_none()`.
          37  +
    pub fn values(&self) -> &[::std::string::String] {
          38  +
        self.values.as_deref().unwrap_or_default()
          39  +
    }
          40  +
}
          41  +
static PARAMETERSTRINGFILTER_MEMBER_KEY: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          42  +
    ::aws_smithy_schema::ShapeId::from_parts(
          43  +
        "com.amazonaws.ssm#ParameterStringFilter$Key",
          44  +
        "com.amazonaws.ssm",
          45  +
        "ParameterStringFilter",
          46  +
    ),
          47  +
    ::aws_smithy_schema::ShapeType::String,
          48  +
    "Key",
          49  +
    0,
          50  +
);
          51  +
static PARAMETERSTRINGFILTER_MEMBER_OPTION: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          52  +
    ::aws_smithy_schema::ShapeId::from_parts(
          53  +
        "com.amazonaws.ssm#ParameterStringFilter$Option",
          54  +
        "com.amazonaws.ssm",
          55  +
        "ParameterStringFilter",
          56  +
    ),
          57  +
    ::aws_smithy_schema::ShapeType::String,
          58  +
    "Option",
          59  +
    1,
          60  +
);
          61  +
static PARAMETERSTRINGFILTER_MEMBER_VALUES_MEMBER: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          62  +
    ::aws_smithy_schema::ShapeId::from_parts(
          63  +
        "com.amazonaws.ssm#ParameterStringFilterValueList$member",
          64  +
        "com.amazonaws.ssm",
          65  +
        "ParameterStringFilterValueList",
          66  +
    ),
          67  +
    ::aws_smithy_schema::ShapeType::String,
          68  +
    "member",
          69  +
    0,
          70  +
);
          71  +
static PARAMETERSTRINGFILTER_MEMBER_VALUES: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          72  +
    ::aws_smithy_schema::ShapeId::from_parts(
          73  +
        "com.amazonaws.ssm#ParameterStringFilter$Values",
          74  +
        "com.amazonaws.ssm",
          75  +
        "ParameterStringFilter",
          76  +
    ),
          77  +
    ::aws_smithy_schema::ShapeType::List,
          78  +
    "Values",
          79  +
    2,
          80  +
)
          81  +
.with_list_member(&PARAMETERSTRINGFILTER_MEMBER_VALUES_MEMBER);
          82  +
static PARAMETERSTRINGFILTER_SCHEMA: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_struct(
          83  +
    ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#ParameterStringFilter", "com.amazonaws.ssm", "ParameterStringFilter"),
          84  +
    ::aws_smithy_schema::ShapeType::Structure,
          85  +
    &[
          86  +
        &PARAMETERSTRINGFILTER_MEMBER_KEY,
          87  +
        &PARAMETERSTRINGFILTER_MEMBER_OPTION,
          88  +
        &PARAMETERSTRINGFILTER_MEMBER_VALUES,
          89  +
    ],
          90  +
);
          91  +
impl ParameterStringFilter {
          92  +
    /// The schema for this shape.
          93  +
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema<'static> = &PARAMETERSTRINGFILTER_SCHEMA;
          94  +
}
          95  +
impl ::aws_smithy_schema::serde::SerializableStruct for ParameterStringFilter {
          96  +
    #[allow(unused_variables, clippy::diverging_sub_expression)]
          97  +
    fn serialize_members(
          98  +
        &self,
          99  +
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
         100  +
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
         101  +
        {
         102  +
            let val = &self.key;
         103  +
            ser.write_string(&PARAMETERSTRINGFILTER_MEMBER_KEY, val)?;
         104  +
        }
         105  +
        if let Some(ref val) = self.option {
         106  +
            ser.write_string(&PARAMETERSTRINGFILTER_MEMBER_OPTION, val)?;
         107  +
        }
         108  +
        if let Some(ref val) = self.values {
         109  +
            ser.write_list(
         110  +
                &PARAMETERSTRINGFILTER_MEMBER_VALUES,
         111  +
                &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
         112  +
                    for item in val {
         113  +
                        ser.write_string(&aws_smithy_schema::prelude::STRING, item)?;
         114  +
                    }
         115  +
                    Ok(())
         116  +
                },
         117  +
            )?;
         118  +
        }
         119  +
        Ok(())
         120  +
    }
         121  +
}
         122  +
impl ParameterStringFilter {
         123  +
    /// Deserializes this structure from a [`ShapeDeserializer`].
         124  +
    pub fn deserialize(
         125  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         126  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         127  +
        #[allow(unused_variables, unused_mut)]
         128  +
        let mut builder = Self::builder();
         129  +
        #[allow(
         130  +
            unused_variables,
         131  +
            unreachable_code,
         132  +
            clippy::single_match,
         133  +
            clippy::match_single_binding,
         134  +
            clippy::diverging_sub_expression
         135  +
        )]
         136  +
        deserializer.read_struct(&PARAMETERSTRINGFILTER_SCHEMA, &mut |member, deser| {
         137  +
            match member.member_index() {
         138  +
                Some(0) => {
         139  +
                    builder.key = Some(deser.read_string(member)?);
         140  +
                }
         141  +
                Some(1) => {
         142  +
                    if deser.is_null() {
         143  +
                        deser.read_null()?;
         144  +
                    } else {
         145  +
                        builder.option = Some(deser.read_string(member)?);
         146  +
                    }
         147  +
                }
         148  +
                Some(2) => {
         149  +
                    if deser.is_null() {
         150  +
                        deser.read_null()?;
         151  +
                    } else {
         152  +
                        builder.values = Some(deser.read_string_list(member)?);
         153  +
                    }
         154  +
                }
         155  +
                _ => {}
         156  +
            }
         157  +
            Ok(())
         158  +
        })?;
         159  +
        builder.key = builder.key.or(Some(String::new()));
         160  +
        builder.build().map_err(|e| aws_smithy_schema::serde::SerdeError::custom(e.to_string()))
         161  +
    }
         162  +
}
         163  +
impl ParameterStringFilter {
         164  +
    /// Deserializes this structure from a body deserializer and HTTP response.
         165  +
    pub fn deserialize_with_response(
         166  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         167  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
         168  +
        _status: u16,
         169  +
        _body: &[u8],
         170  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         171  +
        Self::deserialize(deserializer)
         172  +
    }
         173  +
}
         174  +
impl ParameterStringFilter {
         175  +
    /// Creates a new builder-style object to manufacture [`ParameterStringFilter`](crate::types::ParameterStringFilter).
         176  +
    pub fn builder() -> crate::types::builders::ParameterStringFilterBuilder {
         177  +
        crate::types::builders::ParameterStringFilterBuilder::default()
         178  +
    }
         179  +
}
         180  +
         181  +
/// A builder for [`ParameterStringFilter`](crate::types::ParameterStringFilter).
         182  +
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
         183  +
#[non_exhaustive]
         184  +
pub struct ParameterStringFilterBuilder {
         185  +
    pub(crate) key: ::std::option::Option<::std::string::String>,
         186  +
    pub(crate) option: ::std::option::Option<::std::string::String>,
         187  +
    pub(crate) values: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
         188  +
}
         189  +
impl ParameterStringFilterBuilder {
         190  +
    /// <p>The name of the filter.</p>
         191  +
    /// <p>The <code>ParameterStringFilter</code> object is used by the <code>DescribeParameters</code> and <code>GetParametersByPath</code> API operations. However, not all of the pattern values listed for <code>Key</code> can be used with both operations.</p>
         192  +
    /// <p>For <code>DescribeParameters</code>, all of the listed patterns are valid except <code>Label</code>.</p>
         193  +
    /// <p>For <code>GetParametersByPath</code>, the following patterns listed for <code>Key</code> aren't valid: <code>tag</code>, <code>DataType</code>, <code>Name</code>, <code>Path</code>, and <code>Tier</code>.</p>
         194  +
    /// <p>For examples of Amazon Web Services CLI commands demonstrating valid parameter filter constructions, see <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/parameter-search.html">Searching for Systems Manager parameters</a> in the <i>Amazon Web Services Systems Manager User Guide</i>.</p>
         195  +
    /// This field is required.
         196  +
    pub fn key(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         197  +
        self.key = ::std::option::Option::Some(input.into());
         198  +
        self
         199  +
    }
         200  +
    /// <p>The name of the filter.</p>
         201  +
    /// <p>The <code>ParameterStringFilter</code> object is used by the <code>DescribeParameters</code> and <code>GetParametersByPath</code> API operations. However, not all of the pattern values listed for <code>Key</code> can be used with both operations.</p>
         202  +
    /// <p>For <code>DescribeParameters</code>, all of the listed patterns are valid except <code>Label</code>.</p>
         203  +
    /// <p>For <code>GetParametersByPath</code>, the following patterns listed for <code>Key</code> aren't valid: <code>tag</code>, <code>DataType</code>, <code>Name</code>, <code>Path</code>, and <code>Tier</code>.</p>
         204  +
    /// <p>For examples of Amazon Web Services CLI commands demonstrating valid parameter filter constructions, see <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/parameter-search.html">Searching for Systems Manager parameters</a> in the <i>Amazon Web Services Systems Manager User Guide</i>.</p>
         205  +
    pub fn set_key(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         206  +
        self.key = input;
         207  +
        self
         208  +
    }
         209  +
    /// <p>The name of the filter.</p>
         210  +
    /// <p>The <code>ParameterStringFilter</code> object is used by the <code>DescribeParameters</code> and <code>GetParametersByPath</code> API operations. However, not all of the pattern values listed for <code>Key</code> can be used with both operations.</p>
         211  +
    /// <p>For <code>DescribeParameters</code>, all of the listed patterns are valid except <code>Label</code>.</p>
         212  +
    /// <p>For <code>GetParametersByPath</code>, the following patterns listed for <code>Key</code> aren't valid: <code>tag</code>, <code>DataType</code>, <code>Name</code>, <code>Path</code>, and <code>Tier</code>.</p>
         213  +
    /// <p>For examples of Amazon Web Services CLI commands demonstrating valid parameter filter constructions, see <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/parameter-search.html">Searching for Systems Manager parameters</a> in the <i>Amazon Web Services Systems Manager User Guide</i>.</p>
         214  +
    pub fn get_key(&self) -> &::std::option::Option<::std::string::String> {
         215  +
        &self.key
         216  +
    }
         217  +
    /// <p>For all filters used with <code>DescribeParameters</code>, valid options include <code>Equals</code> and <code>BeginsWith</code>. The <code>Name</code> filter additionally supports the <code>Contains</code> option. (Exception: For filters using the key <code>Path</code>, valid options include <code>Recursive</code> and <code>OneLevel</code>.)</p>
         218  +
    /// <p>For filters used with <code>GetParametersByPath</code>, valid options include <code>Equals</code> and <code>BeginsWith</code>. (Exception: For filters using <code>Label</code> as the Key name, the only valid option is <code>Equals</code>.)</p>
         219  +
    pub fn option(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         220  +
        self.option = ::std::option::Option::Some(input.into());
         221  +
        self
         222  +
    }
         223  +
    /// <p>For all filters used with <code>DescribeParameters</code>, valid options include <code>Equals</code> and <code>BeginsWith</code>. The <code>Name</code> filter additionally supports the <code>Contains</code> option. (Exception: For filters using the key <code>Path</code>, valid options include <code>Recursive</code> and <code>OneLevel</code>.)</p>
         224  +
    /// <p>For filters used with <code>GetParametersByPath</code>, valid options include <code>Equals</code> and <code>BeginsWith</code>. (Exception: For filters using <code>Label</code> as the Key name, the only valid option is <code>Equals</code>.)</p>
         225  +
    pub fn set_option(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         226  +
        self.option = input;
         227  +
        self
         228  +
    }
         229  +
    /// <p>For all filters used with <code>DescribeParameters</code>, valid options include <code>Equals</code> and <code>BeginsWith</code>. The <code>Name</code> filter additionally supports the <code>Contains</code> option. (Exception: For filters using the key <code>Path</code>, valid options include <code>Recursive</code> and <code>OneLevel</code>.)</p>
         230  +
    /// <p>For filters used with <code>GetParametersByPath</code>, valid options include <code>Equals</code> and <code>BeginsWith</code>. (Exception: For filters using <code>Label</code> as the Key name, the only valid option is <code>Equals</code>.)</p>
         231  +
    pub fn get_option(&self) -> &::std::option::Option<::std::string::String> {
         232  +
        &self.option
         233  +
    }
         234  +
    /// Appends an item to `values`.
         235  +
    ///
         236  +
    /// To override the contents of this collection use [`set_values`](Self::set_values).
         237  +
    ///
         238  +
    /// <p>The value you want to search for.</p>
         239  +
    pub fn values(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         240  +
        let mut v = self.values.unwrap_or_default();
         241  +
        v.push(input.into());
         242  +
        self.values = ::std::option::Option::Some(v);
         243  +
        self
         244  +
    }
         245  +
    /// <p>The value you want to search for.</p>
         246  +
    pub fn set_values(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
         247  +
        self.values = input;
         248  +
        self
         249  +
    }
         250  +
    /// <p>The value you want to search for.</p>
         251  +
    pub fn get_values(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
         252  +
        &self.values
         253  +
    }
         254  +
    /// Consumes the builder and constructs a [`ParameterStringFilter`](crate::types::ParameterStringFilter).
         255  +
    /// This method will fail if any of the following fields are not set:
         256  +
    /// - [`key`](crate::types::builders::ParameterStringFilterBuilder::key)
         257  +
    pub fn build(self) -> ::std::result::Result<crate::types::ParameterStringFilter, ::aws_smithy_types::error::operation::BuildError> {
         258  +
        ::std::result::Result::Ok(crate::types::ParameterStringFilter {
         259  +
            key: self.key.ok_or_else(|| {
         260  +
                ::aws_smithy_types::error::operation::BuildError::missing_field(
         261  +
                    "key",
         262  +
                    "key was not specified but it is required when building ParameterStringFilter",
         263  +
                )
         264  +
            })?,
         265  +
            option: self.option,
         266  +
            values: self.values,
         267  +
        })
         268  +
    }
         269  +
}

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

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

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

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

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

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

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

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

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

@@ -0,1 +0,284 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
           3  +
/// <p>A detailed status of the parent step.</p>
           4  +
#[non_exhaustive]
           5  +
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
           6  +
pub struct ParentStepDetails {
           7  +
    /// <p>The unique ID of a step execution.</p>
           8  +
    pub step_execution_id: ::std::option::Option<::std::string::String>,
           9  +
    /// <p>The name of the step.</p>
          10  +
    pub step_name: ::std::option::Option<::std::string::String>,
          11  +
    /// <p>The name of the automation action.</p>
          12  +
    pub action: ::std::option::Option<::std::string::String>,
          13  +
    /// <p>The current repetition of the loop represented by an integer.</p>
          14  +
    pub iteration: ::std::option::Option<i32>,
          15  +
    /// <p>The current value of the specified iterator in the loop.</p>
          16  +
    pub iterator_value: ::std::option::Option<::std::string::String>,
          17  +
}
          18  +
impl ParentStepDetails {
          19  +
    /// <p>The unique ID of a step execution.</p>
          20  +
    pub fn step_execution_id(&self) -> ::std::option::Option<&str> {
          21  +
        self.step_execution_id.as_deref()
          22  +
    }
          23  +
    /// <p>The name of the step.</p>
          24  +
    pub fn step_name(&self) -> ::std::option::Option<&str> {
          25  +
        self.step_name.as_deref()
          26  +
    }
          27  +
    /// <p>The name of the automation action.</p>
          28  +
    pub fn action(&self) -> ::std::option::Option<&str> {
          29  +
        self.action.as_deref()
          30  +
    }
          31  +
    /// <p>The current repetition of the loop represented by an integer.</p>
          32  +
    pub fn iteration(&self) -> ::std::option::Option<i32> {
          33  +
        self.iteration
          34  +
    }
          35  +
    /// <p>The current value of the specified iterator in the loop.</p>
          36  +
    pub fn iterator_value(&self) -> ::std::option::Option<&str> {
          37  +
        self.iterator_value.as_deref()
          38  +
    }
          39  +
}
          40  +
static PARENTSTEPDETAILS_MEMBER_STEP_EXECUTION_ID: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          41  +
    ::aws_smithy_schema::ShapeId::from_parts(
          42  +
        "com.amazonaws.ssm#ParentStepDetails$StepExecutionId",
          43  +
        "com.amazonaws.ssm",
          44  +
        "ParentStepDetails",
          45  +
    ),
          46  +
    ::aws_smithy_schema::ShapeType::String,
          47  +
    "StepExecutionId",
          48  +
    0,
          49  +
);
          50  +
static PARENTSTEPDETAILS_MEMBER_STEP_NAME: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          51  +
    ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#ParentStepDetails$StepName", "com.amazonaws.ssm", "ParentStepDetails"),
          52  +
    ::aws_smithy_schema::ShapeType::String,
          53  +
    "StepName",
          54  +
    1,
          55  +
);
          56  +
static PARENTSTEPDETAILS_MEMBER_ACTION: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          57  +
    ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#ParentStepDetails$Action", "com.amazonaws.ssm", "ParentStepDetails"),
          58  +
    ::aws_smithy_schema::ShapeType::String,
          59  +
    "Action",
          60  +
    2,
          61  +
);
          62  +
static PARENTSTEPDETAILS_MEMBER_ITERATION: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          63  +
    ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#ParentStepDetails$Iteration", "com.amazonaws.ssm", "ParentStepDetails"),
          64  +
    ::aws_smithy_schema::ShapeType::Integer,
          65  +
    "Iteration",
          66  +
    3,
          67  +
);
          68  +
static PARENTSTEPDETAILS_MEMBER_ITERATOR_VALUE: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          69  +
    ::aws_smithy_schema::ShapeId::from_parts(
          70  +
        "com.amazonaws.ssm#ParentStepDetails$IteratorValue",
          71  +
        "com.amazonaws.ssm",
          72  +
        "ParentStepDetails",
          73  +
    ),
          74  +
    ::aws_smithy_schema::ShapeType::String,
          75  +
    "IteratorValue",
          76  +
    4,
          77  +
);
          78  +
static PARENTSTEPDETAILS_SCHEMA: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_struct(
          79  +
    ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#ParentStepDetails", "com.amazonaws.ssm", "ParentStepDetails"),
          80  +
    ::aws_smithy_schema::ShapeType::Structure,
          81  +
    &[
          82  +
        &PARENTSTEPDETAILS_MEMBER_STEP_EXECUTION_ID,
          83  +
        &PARENTSTEPDETAILS_MEMBER_STEP_NAME,
          84  +
        &PARENTSTEPDETAILS_MEMBER_ACTION,
          85  +
        &PARENTSTEPDETAILS_MEMBER_ITERATION,
          86  +
        &PARENTSTEPDETAILS_MEMBER_ITERATOR_VALUE,
          87  +
    ],
          88  +
);
          89  +
impl ParentStepDetails {
          90  +
    /// The schema for this shape.
          91  +
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema<'static> = &PARENTSTEPDETAILS_SCHEMA;
          92  +
}
          93  +
impl ::aws_smithy_schema::serde::SerializableStruct for ParentStepDetails {
          94  +
    #[allow(unused_variables, clippy::diverging_sub_expression)]
          95  +
    fn serialize_members(
          96  +
        &self,
          97  +
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
          98  +
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
          99  +
        if let Some(ref val) = self.step_execution_id {
         100  +
            ser.write_string(&PARENTSTEPDETAILS_MEMBER_STEP_EXECUTION_ID, val)?;
         101  +
        }
         102  +
        if let Some(ref val) = self.step_name {
         103  +
            ser.write_string(&PARENTSTEPDETAILS_MEMBER_STEP_NAME, val)?;
         104  +
        }
         105  +
        if let Some(ref val) = self.action {
         106  +
            ser.write_string(&PARENTSTEPDETAILS_MEMBER_ACTION, val)?;
         107  +
        }
         108  +
        if let Some(ref val) = self.iteration {
         109  +
            ser.write_integer(&PARENTSTEPDETAILS_MEMBER_ITERATION, *val)?;
         110  +
        }
         111  +
        if let Some(ref val) = self.iterator_value {
         112  +
            ser.write_string(&PARENTSTEPDETAILS_MEMBER_ITERATOR_VALUE, val)?;
         113  +
        }
         114  +
        Ok(())
         115  +
    }
         116  +
}
         117  +
impl ParentStepDetails {
         118  +
    /// Deserializes this structure from a [`ShapeDeserializer`].
         119  +
    pub fn deserialize(
         120  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         121  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         122  +
        #[allow(unused_variables, unused_mut)]
         123  +
        let mut builder = Self::builder();
         124  +
        #[allow(
         125  +
            unused_variables,
         126  +
            unreachable_code,
         127  +
            clippy::single_match,
         128  +
            clippy::match_single_binding,
         129  +
            clippy::diverging_sub_expression
         130  +
        )]
         131  +
        deserializer.read_struct(&PARENTSTEPDETAILS_SCHEMA, &mut |member, deser| {
         132  +
            match member.member_index() {
         133  +
                Some(0) => {
         134  +
                    if deser.is_null() {
         135  +
                        deser.read_null()?;
         136  +
                    } else {
         137  +
                        builder.step_execution_id = Some(deser.read_string(member)?);
         138  +
                    }
         139  +
                }
         140  +
                Some(1) => {
         141  +
                    if deser.is_null() {
         142  +
                        deser.read_null()?;
         143  +
                    } else {
         144  +
                        builder.step_name = Some(deser.read_string(member)?);
         145  +
                    }
         146  +
                }
         147  +
                Some(2) => {
         148  +
                    if deser.is_null() {
         149  +
                        deser.read_null()?;
         150  +
                    } else {
         151  +
                        builder.action = Some(deser.read_string(member)?);
         152  +
                    }
         153  +
                }
         154  +
                Some(3) => {
         155  +
                    if deser.is_null() {
         156  +
                        deser.read_null()?;
         157  +
                    } else {
         158  +
                        builder.iteration = Some(deser.read_integer(member)?);
         159  +
                    }
         160  +
                }
         161  +
                Some(4) => {
         162  +
                    if deser.is_null() {
         163  +
                        deser.read_null()?;
         164  +
                    } else {
         165  +
                        builder.iterator_value = Some(deser.read_string(member)?);
         166  +
                    }
         167  +
                }
         168  +
                _ => {}
         169  +
            }
         170  +
            Ok(())
         171  +
        })?;
         172  +
        Ok(builder.build())
         173  +
    }
         174  +
}
         175  +
impl ParentStepDetails {
         176  +
    /// Deserializes this structure from a body deserializer and HTTP response.
         177  +
    pub fn deserialize_with_response(
         178  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         179  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
         180  +
        _status: u16,
         181  +
        _body: &[u8],
         182  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         183  +
        Self::deserialize(deserializer)
         184  +
    }
         185  +
}
         186  +
impl ParentStepDetails {
         187  +
    /// Creates a new builder-style object to manufacture [`ParentStepDetails`](crate::types::ParentStepDetails).
         188  +
    pub fn builder() -> crate::types::builders::ParentStepDetailsBuilder {
         189  +
        crate::types::builders::ParentStepDetailsBuilder::default()
         190  +
    }
         191  +
}
         192  +
         193  +
/// A builder for [`ParentStepDetails`](crate::types::ParentStepDetails).
         194  +
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
         195  +
#[non_exhaustive]
         196  +
pub struct ParentStepDetailsBuilder {
         197  +
    pub(crate) step_execution_id: ::std::option::Option<::std::string::String>,
         198  +
    pub(crate) step_name: ::std::option::Option<::std::string::String>,
         199  +
    pub(crate) action: ::std::option::Option<::std::string::String>,
         200  +
    pub(crate) iteration: ::std::option::Option<i32>,
         201  +
    pub(crate) iterator_value: ::std::option::Option<::std::string::String>,
         202  +
}
         203  +
impl ParentStepDetailsBuilder {
         204  +
    /// <p>The unique ID of a step execution.</p>
         205  +
    pub fn step_execution_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         206  +
        self.step_execution_id = ::std::option::Option::Some(input.into());
         207  +
        self
         208  +
    }
         209  +
    /// <p>The unique ID of a step execution.</p>
         210  +
    pub fn set_step_execution_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         211  +
        self.step_execution_id = input;
         212  +
        self
         213  +
    }
         214  +
    /// <p>The unique ID of a step execution.</p>
         215  +
    pub fn get_step_execution_id(&self) -> &::std::option::Option<::std::string::String> {
         216  +
        &self.step_execution_id
         217  +
    }
         218  +
    /// <p>The name of the step.</p>
         219  +
    pub fn step_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         220  +
        self.step_name = ::std::option::Option::Some(input.into());
         221  +
        self
         222  +
    }
         223  +
    /// <p>The name of the step.</p>
         224  +
    pub fn set_step_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         225  +
        self.step_name = input;
         226  +
        self
         227  +
    }
         228  +
    /// <p>The name of the step.</p>
         229  +
    pub fn get_step_name(&self) -> &::std::option::Option<::std::string::String> {
         230  +
        &self.step_name
         231  +
    }
         232  +
    /// <p>The name of the automation action.</p>
         233  +
    pub fn action(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         234  +
        self.action = ::std::option::Option::Some(input.into());
         235  +
        self
         236  +
    }
         237  +
    /// <p>The name of the automation action.</p>
         238  +
    pub fn set_action(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         239  +
        self.action = input;
         240  +
        self
         241  +
    }
         242  +
    /// <p>The name of the automation action.</p>
         243  +
    pub fn get_action(&self) -> &::std::option::Option<::std::string::String> {
         244  +
        &self.action
         245  +
    }
         246  +
    /// <p>The current repetition of the loop represented by an integer.</p>
         247  +
    pub fn iteration(mut self, input: i32) -> Self {
         248  +
        self.iteration = ::std::option::Option::Some(input);
         249  +
        self
         250  +
    }
         251  +
    /// <p>The current repetition of the loop represented by an integer.</p>
         252  +
    pub fn set_iteration(mut self, input: ::std::option::Option<i32>) -> Self {
         253  +
        self.iteration = input;
         254  +
        self
         255  +
    }
         256  +
    /// <p>The current repetition of the loop represented by an integer.</p>
         257  +
    pub fn get_iteration(&self) -> &::std::option::Option<i32> {
         258  +
        &self.iteration
         259  +
    }
         260  +
    /// <p>The current value of the specified iterator in the loop.</p>
         261  +
    pub fn iterator_value(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         262  +
        self.iterator_value = ::std::option::Option::Some(input.into());
         263  +
        self
         264  +
    }
         265  +
    /// <p>The current value of the specified iterator in the loop.</p>
         266  +
    pub fn set_iterator_value(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         267  +
        self.iterator_value = input;
         268  +
        self
         269  +
    }
         270  +
    /// <p>The current value of the specified iterator in the loop.</p>
         271  +
    pub fn get_iterator_value(&self) -> &::std::option::Option<::std::string::String> {
         272  +
        &self.iterator_value
         273  +
    }
         274  +
    /// Consumes the builder and constructs a [`ParentStepDetails`](crate::types::ParentStepDetails).
         275  +
    pub fn build(self) -> crate::types::ParentStepDetails {
         276  +
        crate::types::ParentStepDetails {
         277  +
            step_execution_id: self.step_execution_id,
         278  +
            step_name: self.step_name,
         279  +
            action: self.action,
         280  +
            iteration: self.iteration,
         281  +
            iterator_value: self.iterator_value,
         282  +
        }
         283  +
    }
         284  +
}