AWS SDK

AWS SDK

rev. 18b1dd205ff4335251e6dd0ecb88193de1b1cede

Files changed:

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

@@ -0,1 +0,192 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
           3  +
/// <p>A filter to limit the amount of step execution information returned by the call.</p>
           4  +
#[non_exhaustive]
           5  +
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
           6  +
pub struct StepExecutionFilter {
           7  +
    /// <p>One or more keys to limit the results.</p>
           8  +
    pub key: crate::types::StepExecutionFilterKey,
           9  +
    /// <p>The values of the filter key.</p>
          10  +
    pub values: ::std::vec::Vec<::std::string::String>,
          11  +
}
          12  +
impl StepExecutionFilter {
          13  +
    /// <p>One or more keys to limit the results.</p>
          14  +
    pub fn key(&self) -> &crate::types::StepExecutionFilterKey {
          15  +
        &self.key
          16  +
    }
          17  +
    /// <p>The values of the filter key.</p>
          18  +
    pub fn values(&self) -> &[::std::string::String] {
          19  +
        use std::ops::Deref;
          20  +
        self.values.deref()
          21  +
    }
          22  +
}
          23  +
static STEPEXECUTIONFILTER_MEMBER_KEY: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          24  +
    ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#StepExecutionFilter$Key", "com.amazonaws.ssm", "StepExecutionFilter"),
          25  +
    ::aws_smithy_schema::ShapeType::String,
          26  +
    "Key",
          27  +
    0,
          28  +
);
          29  +
static STEPEXECUTIONFILTER_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#StepExecutionFilterValueList$member",
          32  +
        "com.amazonaws.ssm",
          33  +
        "StepExecutionFilterValueList",
          34  +
    ),
          35  +
    ::aws_smithy_schema::ShapeType::String,
          36  +
    "member",
          37  +
    0,
          38  +
);
          39  +
static STEPEXECUTIONFILTER_MEMBER_VALUES: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          40  +
    ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#StepExecutionFilter$Values", "com.amazonaws.ssm", "StepExecutionFilter"),
          41  +
    ::aws_smithy_schema::ShapeType::List,
          42  +
    "Values",
          43  +
    1,
          44  +
)
          45  +
.with_list_member(&STEPEXECUTIONFILTER_MEMBER_VALUES_MEMBER);
          46  +
static STEPEXECUTIONFILTER_SCHEMA: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_struct(
          47  +
    ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#StepExecutionFilter", "com.amazonaws.ssm", "StepExecutionFilter"),
          48  +
    ::aws_smithy_schema::ShapeType::Structure,
          49  +
    &[&STEPEXECUTIONFILTER_MEMBER_KEY, &STEPEXECUTIONFILTER_MEMBER_VALUES],
          50  +
);
          51  +
impl StepExecutionFilter {
          52  +
    /// The schema for this shape.
          53  +
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema<'static> = &STEPEXECUTIONFILTER_SCHEMA;
          54  +
}
          55  +
impl ::aws_smithy_schema::serde::SerializableStruct for StepExecutionFilter {
          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(&STEPEXECUTIONFILTER_MEMBER_KEY, val.as_str())?;
          64  +
        }
          65  +
        {
          66  +
            let val = &self.values;
          67  +
          68  +
            ser.write_list(
          69  +
                &STEPEXECUTIONFILTER_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 StepExecutionFilter {
          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(&STEPEXECUTIONFILTER_SCHEMA, &mut |member, deser| {
          96  +
            match member.member_index() {
          97  +
                Some(0) => {
          98  +
                    builder.key = Some(crate::types::StepExecutionFilterKey::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 StepExecutionFilter {
         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 StepExecutionFilter {
         123  +
    /// Creates a new builder-style object to manufacture [`StepExecutionFilter`](crate::types::StepExecutionFilter).
         124  +
    pub fn builder() -> crate::types::builders::StepExecutionFilterBuilder {
         125  +
        crate::types::builders::StepExecutionFilterBuilder::default()
         126  +
    }
         127  +
}
         128  +
         129  +
/// A builder for [`StepExecutionFilter`](crate::types::StepExecutionFilter).
         130  +
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
         131  +
#[non_exhaustive]
         132  +
pub struct StepExecutionFilterBuilder {
         133  +
    pub(crate) key: ::std::option::Option<crate::types::StepExecutionFilterKey>,
         134  +
    pub(crate) values: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
         135  +
}
         136  +
impl StepExecutionFilterBuilder {
         137  +
    /// <p>One or more keys to limit the results.</p>
         138  +
    /// This field is required.
         139  +
    pub fn key(mut self, input: crate::types::StepExecutionFilterKey) -> Self {
         140  +
        self.key = ::std::option::Option::Some(input);
         141  +
        self
         142  +
    }
         143  +
    /// <p>One or more keys to limit the results.</p>
         144  +
    pub fn set_key(mut self, input: ::std::option::Option<crate::types::StepExecutionFilterKey>) -> Self {
         145  +
        self.key = input;
         146  +
        self
         147  +
    }
         148  +
    /// <p>One or more keys to limit the results.</p>
         149  +
    pub fn get_key(&self) -> &::std::option::Option<crate::types::StepExecutionFilterKey> {
         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 values of the filter key.</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 values of the filter key.</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 values of the filter key.</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 [`StepExecutionFilter`](crate::types::StepExecutionFilter).
         173  +
    /// This method will fail if any of the following fields are not set:
         174  +
    /// - [`key`](crate::types::builders::StepExecutionFilterBuilder::key)
         175  +
    /// - [`values`](crate::types::builders::StepExecutionFilterBuilder::values)
         176  +
    pub fn build(self) -> ::std::result::Result<crate::types::StepExecutionFilter, ::aws_smithy_types::error::operation::BuildError> {
         177  +
        ::std::result::Result::Ok(crate::types::StepExecutionFilter {
         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 StepExecutionFilter",
         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 StepExecutionFilter",
         188  +
                )
         189  +
            })?,
         190  +
        })
         191  +
    }
         192  +
}

tmp-codegen-diff/aws-sdk/sdk/ssm/src/types/_step_execution_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 `StepExecutionFilterKey`, 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 stepexecutionfilterkey = unimplemented!();
          14  +
/// match stepexecutionfilterkey {
          15  +
///     StepExecutionFilterKey::Action => { /* ... */ },
          16  +
///     StepExecutionFilterKey::ParentStepExecutionId => { /* ... */ },
          17  +
///     StepExecutionFilterKey::ParentStepIteration => { /* ... */ },
          18  +
///     StepExecutionFilterKey::ParentStepIteratorValue => { /* ... */ },
          19  +
///     StepExecutionFilterKey::StartTimeAfter => { /* ... */ },
          20  +
///     StepExecutionFilterKey::StartTimeBefore => { /* ... */ },
          21  +
///     StepExecutionFilterKey::StepExecutionId => { /* ... */ },
          22  +
///     StepExecutionFilterKey::StepExecutionStatus => { /* ... */ },
          23  +
///     StepExecutionFilterKey::StepName => { /* ... */ },
          24  +
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
          25  +
///     _ => { /* ... */ },
          26  +
/// }
          27  +
/// ```
          28  +
/// The above code demonstrates that when `stepexecutionfilterkey` represents
          29  +
/// `NewFeature`, the execution path will lead to the second last match arm,
          30  +
/// even though the enum does not contain a variant `StepExecutionFilterKey::NewFeature`
          31  +
/// in the current version of SDK. The reason is that the variable `other`,
          32  +
/// created by the `@` operator, is bound to
          33  +
/// `StepExecutionFilterKey::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 `StepExecutionFilterKey::NewFeature` is defined.
          37  +
/// Specifically, when `stepexecutionfilterkey` represents `NewFeature`,
          38  +
/// the execution path will hit the second last match arm as before by virtue of
          39  +
/// calling `as_str` on `StepExecutionFilterKey::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 StepExecutionFilterKey {
          52  +
    #[allow(missing_docs)] // documentation missing in model
          53  +
    Action,
          54  +
    #[allow(missing_docs)] // documentation missing in model
          55  +
    ParentStepExecutionId,
          56  +
    #[allow(missing_docs)] // documentation missing in model
          57  +
    ParentStepIteration,
          58  +
    #[allow(missing_docs)] // documentation missing in model
          59  +
    ParentStepIteratorValue,
          60  +
    #[allow(missing_docs)] // documentation missing in model
          61  +
    StartTimeAfter,
          62  +
    #[allow(missing_docs)] // documentation missing in model
          63  +
    StartTimeBefore,
          64  +
    #[allow(missing_docs)] // documentation missing in model
          65  +
    StepExecutionId,
          66  +
    #[allow(missing_docs)] // documentation missing in model
          67  +
    StepExecutionStatus,
          68  +
    #[allow(missing_docs)] // documentation missing in model
          69  +
    StepName,
          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 StepExecutionFilterKey {
          75  +
    fn from(s: &str) -> Self {
          76  +
        match s {
          77  +
            "Action" => StepExecutionFilterKey::Action,
          78  +
            "ParentStepExecutionId" => StepExecutionFilterKey::ParentStepExecutionId,
          79  +
            "ParentStepIteration" => StepExecutionFilterKey::ParentStepIteration,
          80  +
            "ParentStepIteratorValue" => StepExecutionFilterKey::ParentStepIteratorValue,
          81  +
            "StartTimeAfter" => StepExecutionFilterKey::StartTimeAfter,
          82  +
            "StartTimeBefore" => StepExecutionFilterKey::StartTimeBefore,
          83  +
            "StepExecutionId" => StepExecutionFilterKey::StepExecutionId,
          84  +
            "StepExecutionStatus" => StepExecutionFilterKey::StepExecutionStatus,
          85  +
            "StepName" => StepExecutionFilterKey::StepName,
          86  +
            other => StepExecutionFilterKey::Unknown(crate::primitives::sealed_enum_unknown::UnknownVariantValue(other.to_owned())),
          87  +
        }
          88  +
    }
          89  +
}
          90  +
impl ::std::str::FromStr for StepExecutionFilterKey {
          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(StepExecutionFilterKey::from(s))
          95  +
    }
          96  +
}
          97  +
impl StepExecutionFilterKey {
          98  +
    /// Returns the `&str` value of the enum member.
          99  +
    pub fn as_str(&self) -> &str {
         100  +
        match self {
         101  +
            StepExecutionFilterKey::Action => "Action",
         102  +
            StepExecutionFilterKey::ParentStepExecutionId => "ParentStepExecutionId",
         103  +
            StepExecutionFilterKey::ParentStepIteration => "ParentStepIteration",
         104  +
            StepExecutionFilterKey::ParentStepIteratorValue => "ParentStepIteratorValue",
         105  +
            StepExecutionFilterKey::StartTimeAfter => "StartTimeAfter",
         106  +
            StepExecutionFilterKey::StartTimeBefore => "StartTimeBefore",
         107  +
            StepExecutionFilterKey::StepExecutionId => "StepExecutionId",
         108  +
            StepExecutionFilterKey::StepExecutionStatus => "StepExecutionStatus",
         109  +
            StepExecutionFilterKey::StepName => "StepName",
         110  +
            StepExecutionFilterKey::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  +
            "Action",
         117  +
            "ParentStepExecutionId",
         118  +
            "ParentStepIteration",
         119  +
            "ParentStepIteratorValue",
         120  +
            "StartTimeAfter",
         121  +
            "StartTimeBefore",
         122  +
            "StepExecutionId",
         123  +
            "StepExecutionStatus",
         124  +
            "StepName",
         125  +
        ]
         126  +
    }
         127  +
}
         128  +
impl ::std::convert::AsRef<str> for StepExecutionFilterKey {
         129  +
    fn as_ref(&self) -> &str {
         130  +
        self.as_str()
         131  +
    }
         132  +
}
         133  +
impl StepExecutionFilterKey {
         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 StepExecutionFilterKey {
         146  +
    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
         147  +
        match self {
         148  +
            StepExecutionFilterKey::Action => write!(f, "Action"),
         149  +
            StepExecutionFilterKey::ParentStepExecutionId => write!(f, "ParentStepExecutionId"),
         150  +
            StepExecutionFilterKey::ParentStepIteration => write!(f, "ParentStepIteration"),
         151  +
            StepExecutionFilterKey::ParentStepIteratorValue => write!(f, "ParentStepIteratorValue"),
         152  +
            StepExecutionFilterKey::StartTimeAfter => write!(f, "StartTimeAfter"),
         153  +
            StepExecutionFilterKey::StartTimeBefore => write!(f, "StartTimeBefore"),
         154  +
            StepExecutionFilterKey::StepExecutionId => write!(f, "StepExecutionId"),
         155  +
            StepExecutionFilterKey::StepExecutionStatus => write!(f, "StepExecutionStatus"),
         156  +
            StepExecutionFilterKey::StepName => write!(f, "StepName"),
         157  +
            StepExecutionFilterKey::Unknown(value) => write!(f, "{value}"),
         158  +
        }
         159  +
    }
         160  +
}

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

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

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

@@ -0,1 +0,166 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
           3  +
/// <p>Metadata that you assign to your Amazon Web Services resources. Tags enable you to categorize your resources in different ways, for example, by purpose, owner, or environment. In Amazon Web Services Systems Manager, you can apply tags to Systems Manager documents (SSM documents), managed nodes, maintenance windows, parameters, patch baselines, OpsItems, and OpsMetadata.</p>
           4  +
#[non_exhaustive]
           5  +
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
           6  +
pub struct Tag {
           7  +
    /// <p>The name of the tag.</p>
           8  +
    pub key: ::std::string::String,
           9  +
    /// <p>The value of the tag.</p>
          10  +
    pub value: ::std::string::String,
          11  +
}
          12  +
impl Tag {
          13  +
    /// <p>The name of the tag.</p>
          14  +
    pub fn key(&self) -> &str {
          15  +
        use std::ops::Deref;
          16  +
        self.key.deref()
          17  +
    }
          18  +
    /// <p>The value of the tag.</p>
          19  +
    pub fn value(&self) -> &str {
          20  +
        use std::ops::Deref;
          21  +
        self.value.deref()
          22  +
    }
          23  +
}
          24  +
static TAG_MEMBER_KEY: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          25  +
    ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#Tag$Key", "com.amazonaws.ssm", "Tag"),
          26  +
    ::aws_smithy_schema::ShapeType::String,
          27  +
    "Key",
          28  +
    0,
          29  +
);
          30  +
static TAG_MEMBER_VALUE: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          31  +
    ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#Tag$Value", "com.amazonaws.ssm", "Tag"),
          32  +
    ::aws_smithy_schema::ShapeType::String,
          33  +
    "Value",
          34  +
    1,
          35  +
);
          36  +
static TAG_SCHEMA: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_struct(
          37  +
    ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#Tag", "com.amazonaws.ssm", "Tag"),
          38  +
    ::aws_smithy_schema::ShapeType::Structure,
          39  +
    &[&TAG_MEMBER_KEY, &TAG_MEMBER_VALUE],
          40  +
);
          41  +
impl Tag {
          42  +
    /// The schema for this shape.
          43  +
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema<'static> = &TAG_SCHEMA;
          44  +
}
          45  +
impl ::aws_smithy_schema::serde::SerializableStruct for Tag {
          46  +
    #[allow(unused_variables, clippy::diverging_sub_expression)]
          47  +
    fn serialize_members(
          48  +
        &self,
          49  +
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
          50  +
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
          51  +
        {
          52  +
            let val = &self.key;
          53  +
            ser.write_string(&TAG_MEMBER_KEY, val)?;
          54  +
        }
          55  +
        {
          56  +
            let val = &self.value;
          57  +
            ser.write_string(&TAG_MEMBER_VALUE, val)?;
          58  +
        }
          59  +
        Ok(())
          60  +
    }
          61  +
}
          62  +
impl Tag {
          63  +
    /// Deserializes this structure from a [`ShapeDeserializer`].
          64  +
    pub fn deserialize(
          65  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
          66  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
          67  +
        #[allow(unused_variables, unused_mut)]
          68  +
        let mut builder = Self::builder();
          69  +
        #[allow(
          70  +
            unused_variables,
          71  +
            unreachable_code,
          72  +
            clippy::single_match,
          73  +
            clippy::match_single_binding,
          74  +
            clippy::diverging_sub_expression
          75  +
        )]
          76  +
        deserializer.read_struct(&TAG_SCHEMA, &mut |member, deser| {
          77  +
            match member.member_index() {
          78  +
                Some(0) => {
          79  +
                    builder.key = Some(deser.read_string(member)?);
          80  +
                }
          81  +
                Some(1) => {
          82  +
                    builder.value = Some(deser.read_string(member)?);
          83  +
                }
          84  +
                _ => {}
          85  +
            }
          86  +
            Ok(())
          87  +
        })?;
          88  +
        builder.key = builder.key.or(Some(String::new()));
          89  +
        builder.value = builder.value.or(Some(String::new()));
          90  +
        builder.build().map_err(|e| aws_smithy_schema::serde::SerdeError::custom(e.to_string()))
          91  +
    }
          92  +
}
          93  +
impl Tag {
          94  +
    /// Deserializes this structure from a body deserializer and HTTP response.
          95  +
    pub fn deserialize_with_response(
          96  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
          97  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
          98  +
        _status: u16,
          99  +
        _body: &[u8],
         100  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         101  +
        Self::deserialize(deserializer)
         102  +
    }
         103  +
}
         104  +
impl Tag {
         105  +
    /// Creates a new builder-style object to manufacture [`Tag`](crate::types::Tag).
         106  +
    pub fn builder() -> crate::types::builders::TagBuilder {
         107  +
        crate::types::builders::TagBuilder::default()
         108  +
    }
         109  +
}
         110  +
         111  +
/// A builder for [`Tag`](crate::types::Tag).
         112  +
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
         113  +
#[non_exhaustive]
         114  +
pub struct TagBuilder {
         115  +
    pub(crate) key: ::std::option::Option<::std::string::String>,
         116  +
    pub(crate) value: ::std::option::Option<::std::string::String>,
         117  +
}
         118  +
impl TagBuilder {
         119  +
    /// <p>The name of the tag.</p>
         120  +
    /// This field is required.
         121  +
    pub fn key(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         122  +
        self.key = ::std::option::Option::Some(input.into());
         123  +
        self
         124  +
    }
         125  +
    /// <p>The name of the tag.</p>
         126  +
    pub fn set_key(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         127  +
        self.key = input;
         128  +
        self
         129  +
    }
         130  +
    /// <p>The name of the tag.</p>
         131  +
    pub fn get_key(&self) -> &::std::option::Option<::std::string::String> {
         132  +
        &self.key
         133  +
    }
         134  +
    /// <p>The value of the tag.</p>
         135  +
    /// This field is required.
         136  +
    pub fn value(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         137  +
        self.value = ::std::option::Option::Some(input.into());
         138  +
        self
         139  +
    }
         140  +
    /// <p>The value of the tag.</p>
         141  +
    pub fn set_value(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         142  +
        self.value = input;
         143  +
        self
         144  +
    }
         145  +
    /// <p>The value of the tag.</p>
         146  +
    pub fn get_value(&self) -> &::std::option::Option<::std::string::String> {
         147  +
        &self.value
         148  +
    }
         149  +
    /// Consumes the builder and constructs a [`Tag`](crate::types::Tag).
         150  +
    /// This method will fail if any of the following fields are not set:
         151  +
    /// - [`key`](crate::types::builders::TagBuilder::key)
         152  +
    /// - [`value`](crate::types::builders::TagBuilder::value)
         153  +
    pub fn build(self) -> ::std::result::Result<crate::types::Tag, ::aws_smithy_types::error::operation::BuildError> {
         154  +
        ::std::result::Result::Ok(crate::types::Tag {
         155  +
            key: self.key.ok_or_else(|| {
         156  +
                ::aws_smithy_types::error::operation::BuildError::missing_field("key", "key was not specified but it is required when building Tag")
         157  +
            })?,
         158  +
            value: self.value.ok_or_else(|| {
         159  +
                ::aws_smithy_types::error::operation::BuildError::missing_field(
         160  +
                    "value",
         161  +
                    "value was not specified but it is required when building Tag",
         162  +
                )
         163  +
            })?,
         164  +
        })
         165  +
    }
         166  +
}

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

@@ -0,1 +0,235 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
           3  +
/// <p>An array of search criteria that targets managed nodes using a key-value pair that you specify.</p><note>
           4  +
/// <p>One or more targets must be specified for maintenance window Run Command-type tasks. Depending on the task, targets are optional for other maintenance window task types (Automation, Lambda, and Step Functions). For more information about running tasks that don't specify targets, see <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/maintenance-windows-targetless-tasks.html">Registering maintenance window tasks without targets</a> in the <i>Amazon Web Services Systems Manager User Guide</i>.</p>
           5  +
/// </note>
           6  +
/// <p>Supported formats include the following.</p>
           7  +
/// <p><b>For all Systems Manager tools:</b></p>
           8  +
/// <ul>
           9  +
/// <li>
          10  +
/// <p><code>Key=tag-key,Values=tag-value-1,tag-value-2</code></p></li>
          11  +
/// </ul>
          12  +
/// <p><b>For Automation and Change Manager:</b></p>
          13  +
/// <ul>
          14  +
/// <li>
          15  +
/// <p><code>Key=tag:tag-key,Values=tag-value</code></p></li>
          16  +
/// <li>
          17  +
/// <p><code>Key=ResourceGroup,Values=resource-group-name</code></p></li>
          18  +
/// <li>
          19  +
/// <p><code>Key=ParameterValues,Values=value-1,value-2,value-3</code></p></li>
          20  +
/// <li>
          21  +
/// <p>To target all instances in the Amazon Web Services Region:</p>
          22  +
/// <ul>
          23  +
/// <li>
          24  +
/// <p><code>Key=AWS::EC2::Instance,Values=*</code></p></li>
          25  +
/// <li>
          26  +
/// <p><code>Key=InstanceIds,Values=*</code></p></li>
          27  +
/// </ul></li>
          28  +
/// </ul>
          29  +
/// <p><b>For Run Command and Maintenance Windows:</b></p>
          30  +
/// <ul>
          31  +
/// <li>
          32  +
/// <p><code>Key=InstanceIds,Values=instance-id-1,instance-id-2,instance-id-3</code></p></li>
          33  +
/// <li>
          34  +
/// <p><code>Key=tag:tag-key,Values=tag-value-1,tag-value-2</code></p></li>
          35  +
/// <li>
          36  +
/// <p><code>Key=resource-groups:Name,Values=resource-group-name</code></p></li>
          37  +
/// <li>
          38  +
/// <p>Additionally, Maintenance Windows support targeting resource types:</p>
          39  +
/// <ul>
          40  +
/// <li>
          41  +
/// <p><code>Key=resource-groups:ResourceTypeFilters,Values=resource-type-1,resource-type-2</code></p></li>
          42  +
/// </ul></li>
          43  +
/// </ul>
          44  +
/// <p><b>For State Manager:</b></p>
          45  +
/// <ul>
          46  +
/// <li>
          47  +
/// <p><code>Key=InstanceIds,Values=instance-id-1,instance-id-2,instance-id-3</code></p></li>
          48  +
/// <li>
          49  +
/// <p><code>Key=tag:tag-key,Values=tag-value-1,tag-value-2</code></p></li>
          50  +
/// <li>
          51  +
/// <p>To target all instances in the Amazon Web Services Region:</p>
          52  +
/// <ul>
          53  +
/// <li>
          54  +
/// <p><code>Key=InstanceIds,Values=*</code></p></li>
          55  +
/// </ul></li>
          56  +
/// </ul>
          57  +
/// <p>For more information about how to send commands that target managed nodes using <code>Key,Value</code> parameters, see <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/send-commands-multiple.html#send-commands-targeting">Targeting multiple managed nodes</a> in the <i>Amazon Web Services Systems Manager User Guide</i>.</p>
          58  +
#[non_exhaustive]
          59  +
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
          60  +
pub struct Target {
          61  +
    /// <p>User-defined criteria for sending commands that target managed nodes that meet the criteria.</p>
          62  +
    pub key: ::std::option::Option<::std::string::String>,
          63  +
    /// <p>User-defined criteria that maps to <code>Key</code>. For example, if you specified <code>tag:ServerRole</code>, you could specify <code>value:WebServer</code> to run a command on instances that include EC2 tags of <code>ServerRole,WebServer</code>.</p>
          64  +
    /// <p>Depending on the type of target, the maximum number of values for a key might be lower than the global maximum of 50.</p>
          65  +
    pub values: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
          66  +
}
          67  +
impl Target {
          68  +
    /// <p>User-defined criteria for sending commands that target managed nodes that meet the criteria.</p>
          69  +
    pub fn key(&self) -> ::std::option::Option<&str> {
          70  +
        self.key.as_deref()
          71  +
    }
          72  +
    /// <p>User-defined criteria that maps to <code>Key</code>. For example, if you specified <code>tag:ServerRole</code>, you could specify <code>value:WebServer</code> to run a command on instances that include EC2 tags of <code>ServerRole,WebServer</code>.</p>
          73  +
    /// <p>Depending on the type of target, the maximum number of values for a key might be lower than the global maximum of 50.</p>
          74  +
    ///
          75  +
    /// 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()`.
          76  +
    pub fn values(&self) -> &[::std::string::String] {
          77  +
        self.values.as_deref().unwrap_or_default()
          78  +
    }
          79  +
}
          80  +
static TARGET_MEMBER_KEY: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          81  +
    ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#Target$Key", "com.amazonaws.ssm", "Target"),
          82  +
    ::aws_smithy_schema::ShapeType::String,
          83  +
    "Key",
          84  +
    0,
          85  +
);
          86  +
static TARGET_MEMBER_VALUES_MEMBER: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          87  +
    ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#TargetValues$member", "com.amazonaws.ssm", "TargetValues"),
          88  +
    ::aws_smithy_schema::ShapeType::String,
          89  +
    "member",
          90  +
    0,
          91  +
);
          92  +
static TARGET_MEMBER_VALUES: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          93  +
    ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#Target$Values", "com.amazonaws.ssm", "Target"),
          94  +
    ::aws_smithy_schema::ShapeType::List,
          95  +
    "Values",
          96  +
    1,
          97  +
)
          98  +
.with_list_member(&TARGET_MEMBER_VALUES_MEMBER);
          99  +
static TARGET_SCHEMA: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_struct(
         100  +
    ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#Target", "com.amazonaws.ssm", "Target"),
         101  +
    ::aws_smithy_schema::ShapeType::Structure,
         102  +
    &[&TARGET_MEMBER_KEY, &TARGET_MEMBER_VALUES],
         103  +
);
         104  +
impl Target {
         105  +
    /// The schema for this shape.
         106  +
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema<'static> = &TARGET_SCHEMA;
         107  +
}
         108  +
impl ::aws_smithy_schema::serde::SerializableStruct for Target {
         109  +
    #[allow(unused_variables, clippy::diverging_sub_expression)]
         110  +
    fn serialize_members(
         111  +
        &self,
         112  +
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
         113  +
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
         114  +
        if let Some(ref val) = self.key {
         115  +
            ser.write_string(&TARGET_MEMBER_KEY, val)?;
         116  +
        }
         117  +
        if let Some(ref val) = self.values {
         118  +
            ser.write_list(&TARGET_MEMBER_VALUES, &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
         119  +
                for item in val {
         120  +
                    ser.write_string(&aws_smithy_schema::prelude::STRING, item)?;
         121  +
                }
         122  +
                Ok(())
         123  +
            })?;
         124  +
        }
         125  +
        Ok(())
         126  +
    }
         127  +
}
         128  +
impl Target {
         129  +
    /// Deserializes this structure from a [`ShapeDeserializer`].
         130  +
    pub fn deserialize(
         131  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         132  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         133  +
        #[allow(unused_variables, unused_mut)]
         134  +
        let mut builder = Self::builder();
         135  +
        #[allow(
         136  +
            unused_variables,
         137  +
            unreachable_code,
         138  +
            clippy::single_match,
         139  +
            clippy::match_single_binding,
         140  +
            clippy::diverging_sub_expression
         141  +
        )]
         142  +
        deserializer.read_struct(&TARGET_SCHEMA, &mut |member, deser| {
         143  +
            match member.member_index() {
         144  +
                Some(0) => {
         145  +
                    if deser.is_null() {
         146  +
                        deser.read_null()?;
         147  +
                    } else {
         148  +
                        builder.key = Some(deser.read_string(member)?);
         149  +
                    }
         150  +
                }
         151  +
                Some(1) => {
         152  +
                    if deser.is_null() {
         153  +
                        deser.read_null()?;
         154  +
                    } else {
         155  +
                        builder.values = Some(deser.read_string_list(member)?);
         156  +
                    }
         157  +
                }
         158  +
                _ => {}
         159  +
            }
         160  +
            Ok(())
         161  +
        })?;
         162  +
        Ok(builder.build())
         163  +
    }
         164  +
}
         165  +
impl Target {
         166  +
    /// Deserializes this structure from a body deserializer and HTTP response.
         167  +
    pub fn deserialize_with_response(
         168  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         169  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
         170  +
        _status: u16,
         171  +
        _body: &[u8],
         172  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         173  +
        Self::deserialize(deserializer)
         174  +
    }
         175  +
}
         176  +
impl Target {
         177  +
    /// Creates a new builder-style object to manufacture [`Target`](crate::types::Target).
         178  +
    pub fn builder() -> crate::types::builders::TargetBuilder {
         179  +
        crate::types::builders::TargetBuilder::default()
         180  +
    }
         181  +
}
         182  +
         183  +
/// A builder for [`Target`](crate::types::Target).
         184  +
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
         185  +
#[non_exhaustive]
         186  +
pub struct TargetBuilder {
         187  +
    pub(crate) key: ::std::option::Option<::std::string::String>,
         188  +
    pub(crate) values: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
         189  +
}
         190  +
impl TargetBuilder {
         191  +
    /// <p>User-defined criteria for sending commands that target managed nodes that meet the criteria.</p>
         192  +
    pub fn key(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         193  +
        self.key = ::std::option::Option::Some(input.into());
         194  +
        self
         195  +
    }
         196  +
    /// <p>User-defined criteria for sending commands that target managed nodes that meet the criteria.</p>
         197  +
    pub fn set_key(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         198  +
        self.key = input;
         199  +
        self
         200  +
    }
         201  +
    /// <p>User-defined criteria for sending commands that target managed nodes that meet the criteria.</p>
         202  +
    pub fn get_key(&self) -> &::std::option::Option<::std::string::String> {
         203  +
        &self.key
         204  +
    }
         205  +
    /// Appends an item to `values`.
         206  +
    ///
         207  +
    /// To override the contents of this collection use [`set_values`](Self::set_values).
         208  +
    ///
         209  +
    /// <p>User-defined criteria that maps to <code>Key</code>. For example, if you specified <code>tag:ServerRole</code>, you could specify <code>value:WebServer</code> to run a command on instances that include EC2 tags of <code>ServerRole,WebServer</code>.</p>
         210  +
    /// <p>Depending on the type of target, the maximum number of values for a key might be lower than the global maximum of 50.</p>
         211  +
    pub fn values(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         212  +
        let mut v = self.values.unwrap_or_default();
         213  +
        v.push(input.into());
         214  +
        self.values = ::std::option::Option::Some(v);
         215  +
        self
         216  +
    }
         217  +
    /// <p>User-defined criteria that maps to <code>Key</code>. For example, if you specified <code>tag:ServerRole</code>, you could specify <code>value:WebServer</code> to run a command on instances that include EC2 tags of <code>ServerRole,WebServer</code>.</p>
         218  +
    /// <p>Depending on the type of target, the maximum number of values for a key might be lower than the global maximum of 50.</p>
         219  +
    pub fn set_values(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
         220  +
        self.values = input;
         221  +
        self
         222  +
    }
         223  +
    /// <p>User-defined criteria that maps to <code>Key</code>. For example, if you specified <code>tag:ServerRole</code>, you could specify <code>value:WebServer</code> to run a command on instances that include EC2 tags of <code>ServerRole,WebServer</code>.</p>
         224  +
    /// <p>Depending on the type of target, the maximum number of values for a key might be lower than the global maximum of 50.</p>
         225  +
    pub fn get_values(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
         226  +
        &self.values
         227  +
    }
         228  +
    /// Consumes the builder and constructs a [`Target`](crate::types::Target).
         229  +
    pub fn build(self) -> crate::types::Target {
         230  +
        crate::types::Target {
         231  +
            key: self.key,
         232  +
            values: self.values,
         233  +
        }
         234  +
    }
         235  +
}

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

@@ -0,1 +0,635 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
           3  +
/// <p>The combination of Amazon Web Services Regions and Amazon Web Services accounts targeted by the current Automation execution.</p>
           4  +
#[non_exhaustive]
           5  +
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
           6  +
pub struct TargetLocation {
           7  +
    /// <p>The Amazon Web Services accounts targeted by the current Automation execution.</p>
           8  +
    pub accounts: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
           9  +
    /// <p>The Amazon Web Services Regions targeted by the current Automation execution.</p>
          10  +
    pub regions: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
          11  +
    /// <p>The maximum number of Amazon Web Services Regions and Amazon Web Services accounts allowed to run the Automation concurrently. <code>TargetLocationMaxConcurrency</code> has a default value of 1.</p>
          12  +
    pub target_location_max_concurrency: ::std::option::Option<::std::string::String>,
          13  +
    /// <p>The maximum number of errors allowed before the system stops queueing additional Automation executions for the currently running Automation. <code>TargetLocationMaxErrors</code> has a default value of 0.</p>
          14  +
    pub target_location_max_errors: ::std::option::Option<::std::string::String>,
          15  +
    /// <p>The Automation execution role used by the currently running Automation. If not specified, the default value is <code>AWS-SystemsManager-AutomationExecutionRole</code>.</p>
          16  +
    pub execution_role_name: ::std::option::Option<::std::string::String>,
          17  +
    /// <p>The details for the CloudWatch alarm you want to apply to an automation or command.</p>
          18  +
    pub target_location_alarm_configuration: ::std::option::Option<crate::types::AlarmConfiguration>,
          19  +
    /// <p>Indicates whether to include child organizational units (OUs) that are children of the targeted OUs. The default is <code>false</code>.</p>
          20  +
    pub include_child_organization_units: bool,
          21  +
    /// <p>Amazon Web Services accounts or organizational units to exclude as expanded targets.</p>
          22  +
    pub exclude_accounts: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
          23  +
    /// <p>A list of key-value mappings to target resources. If you specify values for this data type, you must also specify a value for <code>TargetParameterName</code>.</p>
          24  +
    /// <p>This <code>Targets</code> parameter takes precedence over the <code>StartAutomationExecution:Targets</code> parameter if both are supplied.</p>
          25  +
    pub targets: ::std::option::Option<::std::vec::Vec<crate::types::Target>>,
          26  +
    /// <p>The maximum number of targets allowed to run this task in parallel. This <code>TargetsMaxConcurrency</code> takes precedence over the <code>StartAutomationExecution:MaxConcurrency</code> parameter if both are supplied.</p>
          27  +
    pub targets_max_concurrency: ::std::option::Option<::std::string::String>,
          28  +
    /// <p>The maximum number of errors that are allowed before the system stops running the automation on additional targets. This <code>TargetsMaxErrors</code> parameter takes precedence over the <code>StartAutomationExecution:MaxErrors</code> parameter if both are supplied.</p>
          29  +
    pub targets_max_errors: ::std::option::Option<::std::string::String>,
          30  +
}
          31  +
impl TargetLocation {
          32  +
    /// <p>The Amazon Web Services accounts targeted by the current Automation execution.</p>
          33  +
    ///
          34  +
    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.accounts.is_none()`.
          35  +
    pub fn accounts(&self) -> &[::std::string::String] {
          36  +
        self.accounts.as_deref().unwrap_or_default()
          37  +
    }
          38  +
    /// <p>The Amazon Web Services Regions targeted by the current Automation execution.</p>
          39  +
    ///
          40  +
    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.regions.is_none()`.
          41  +
    pub fn regions(&self) -> &[::std::string::String] {
          42  +
        self.regions.as_deref().unwrap_or_default()
          43  +
    }
          44  +
    /// <p>The maximum number of Amazon Web Services Regions and Amazon Web Services accounts allowed to run the Automation concurrently. <code>TargetLocationMaxConcurrency</code> has a default value of 1.</p>
          45  +
    pub fn target_location_max_concurrency(&self) -> ::std::option::Option<&str> {
          46  +
        self.target_location_max_concurrency.as_deref()
          47  +
    }
          48  +
    /// <p>The maximum number of errors allowed before the system stops queueing additional Automation executions for the currently running Automation. <code>TargetLocationMaxErrors</code> has a default value of 0.</p>
          49  +
    pub fn target_location_max_errors(&self) -> ::std::option::Option<&str> {
          50  +
        self.target_location_max_errors.as_deref()
          51  +
    }
          52  +
    /// <p>The Automation execution role used by the currently running Automation. If not specified, the default value is <code>AWS-SystemsManager-AutomationExecutionRole</code>.</p>
          53  +
    pub fn execution_role_name(&self) -> ::std::option::Option<&str> {
          54  +
        self.execution_role_name.as_deref()
          55  +
    }
          56  +
    /// <p>The details for the CloudWatch alarm you want to apply to an automation or command.</p>
          57  +
    pub fn target_location_alarm_configuration(&self) -> ::std::option::Option<&crate::types::AlarmConfiguration> {
          58  +
        self.target_location_alarm_configuration.as_ref()
          59  +
    }
          60  +
    /// <p>Indicates whether to include child organizational units (OUs) that are children of the targeted OUs. The default is <code>false</code>.</p>
          61  +
    pub fn include_child_organization_units(&self) -> bool {
          62  +
        self.include_child_organization_units
          63  +
    }
          64  +
    /// <p>Amazon Web Services accounts or organizational units to exclude as expanded targets.</p>
          65  +
    ///
          66  +
    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.exclude_accounts.is_none()`.
          67  +
    pub fn exclude_accounts(&self) -> &[::std::string::String] {
          68  +
        self.exclude_accounts.as_deref().unwrap_or_default()
          69  +
    }
          70  +
    /// <p>A list of key-value mappings to target resources. If you specify values for this data type, you must also specify a value for <code>TargetParameterName</code>.</p>
          71  +
    /// <p>This <code>Targets</code> parameter takes precedence over the <code>StartAutomationExecution:Targets</code> parameter if both are supplied.</p>
          72  +
    ///
          73  +
    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.targets.is_none()`.
          74  +
    pub fn targets(&self) -> &[crate::types::Target] {
          75  +
        self.targets.as_deref().unwrap_or_default()
          76  +
    }
          77  +
    /// <p>The maximum number of targets allowed to run this task in parallel. This <code>TargetsMaxConcurrency</code> takes precedence over the <code>StartAutomationExecution:MaxConcurrency</code> parameter if both are supplied.</p>
          78  +
    pub fn targets_max_concurrency(&self) -> ::std::option::Option<&str> {
          79  +
        self.targets_max_concurrency.as_deref()
          80  +
    }
          81  +
    /// <p>The maximum number of errors that are allowed before the system stops running the automation on additional targets. This <code>TargetsMaxErrors</code> parameter takes precedence over the <code>StartAutomationExecution:MaxErrors</code> parameter if both are supplied.</p>
          82  +
    pub fn targets_max_errors(&self) -> ::std::option::Option<&str> {
          83  +
        self.targets_max_errors.as_deref()
          84  +
    }
          85  +
}
          86  +
static TARGETLOCATION_MEMBER_ACCOUNTS_MEMBER: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          87  +
    ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#Accounts$member", "com.amazonaws.ssm", "Accounts"),
          88  +
    ::aws_smithy_schema::ShapeType::String,
          89  +
    "member",
          90  +
    0,
          91  +
);
          92  +
static TARGETLOCATION_MEMBER_ACCOUNTS: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          93  +
    ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#TargetLocation$Accounts", "com.amazonaws.ssm", "TargetLocation"),
          94  +
    ::aws_smithy_schema::ShapeType::List,
          95  +
    "Accounts",
          96  +
    0,
          97  +
)
          98  +
.with_list_member(&TARGETLOCATION_MEMBER_ACCOUNTS_MEMBER);
          99  +
static TARGETLOCATION_MEMBER_REGIONS_MEMBER: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
         100  +
    ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#Regions$member", "com.amazonaws.ssm", "Regions"),
         101  +
    ::aws_smithy_schema::ShapeType::String,
         102  +
    "member",
         103  +
    0,
         104  +
);
         105  +
static TARGETLOCATION_MEMBER_REGIONS: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
         106  +
    ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#TargetLocation$Regions", "com.amazonaws.ssm", "TargetLocation"),
         107  +
    ::aws_smithy_schema::ShapeType::List,
         108  +
    "Regions",
         109  +
    1,
         110  +
)
         111  +
.with_list_member(&TARGETLOCATION_MEMBER_REGIONS_MEMBER);
         112  +
static TARGETLOCATION_MEMBER_TARGET_LOCATION_MAX_CONCURRENCY: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
         113  +
    ::aws_smithy_schema::ShapeId::from_parts(
         114  +
        "com.amazonaws.ssm#TargetLocation$TargetLocationMaxConcurrency",
         115  +
        "com.amazonaws.ssm",
         116  +
        "TargetLocation",
         117  +
    ),
         118  +
    ::aws_smithy_schema::ShapeType::String,
         119  +
    "TargetLocationMaxConcurrency",
         120  +
    2,
         121  +
);
         122  +
static TARGETLOCATION_MEMBER_TARGET_LOCATION_MAX_ERRORS: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
         123  +
    ::aws_smithy_schema::ShapeId::from_parts(
         124  +
        "com.amazonaws.ssm#TargetLocation$TargetLocationMaxErrors",
         125  +
        "com.amazonaws.ssm",
         126  +
        "TargetLocation",
         127  +
    ),
         128  +
    ::aws_smithy_schema::ShapeType::String,
         129  +
    "TargetLocationMaxErrors",
         130  +
    3,
         131  +
);
         132  +
static TARGETLOCATION_MEMBER_EXECUTION_ROLE_NAME: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
         133  +
    ::aws_smithy_schema::ShapeId::from_parts(
         134  +
        "com.amazonaws.ssm#TargetLocation$ExecutionRoleName",
         135  +
        "com.amazonaws.ssm",
         136  +
        "TargetLocation",
         137  +
    ),
         138  +
    ::aws_smithy_schema::ShapeType::String,
         139  +
    "ExecutionRoleName",
         140  +
    4,
         141  +
);
         142  +
static TARGETLOCATION_MEMBER_TARGET_LOCATION_ALARM_CONFIGURATION: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
         143  +
    ::aws_smithy_schema::ShapeId::from_parts(
         144  +
        "com.amazonaws.ssm#TargetLocation$TargetLocationAlarmConfiguration",
         145  +
        "com.amazonaws.ssm",
         146  +
        "TargetLocation",
         147  +
    ),
         148  +
    ::aws_smithy_schema::ShapeType::Structure,
         149  +
    "TargetLocationAlarmConfiguration",
         150  +
    5,
         151  +
);
         152  +
static TARGETLOCATION_MEMBER_INCLUDE_CHILD_ORGANIZATION_UNITS: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
         153  +
    ::aws_smithy_schema::ShapeId::from_parts(
         154  +
        "com.amazonaws.ssm#TargetLocation$IncludeChildOrganizationUnits",
         155  +
        "com.amazonaws.ssm",
         156  +
        "TargetLocation",
         157  +
    ),
         158  +
    ::aws_smithy_schema::ShapeType::Boolean,
         159  +
    "IncludeChildOrganizationUnits",
         160  +
    6,
         161  +
);
         162  +
static TARGETLOCATION_MEMBER_EXCLUDE_ACCOUNTS_MEMBER: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
         163  +
    ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#ExcludeAccounts$member", "com.amazonaws.ssm", "ExcludeAccounts"),
         164  +
    ::aws_smithy_schema::ShapeType::String,
         165  +
    "member",
         166  +
    0,
         167  +
);
         168  +
static TARGETLOCATION_MEMBER_EXCLUDE_ACCOUNTS: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
         169  +
    ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#TargetLocation$ExcludeAccounts", "com.amazonaws.ssm", "TargetLocation"),
         170  +
    ::aws_smithy_schema::ShapeType::List,
         171  +
    "ExcludeAccounts",
         172  +
    7,
         173  +
)
         174  +
.with_list_member(&TARGETLOCATION_MEMBER_EXCLUDE_ACCOUNTS_MEMBER);
         175  +
static TARGETLOCATION_MEMBER_TARGETS_MEMBER: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
         176  +
    ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#AutomationTargets$member", "com.amazonaws.ssm", "AutomationTargets"),
         177  +
    ::aws_smithy_schema::ShapeType::Structure,
         178  +
    "member",
         179  +
    0,
         180  +
);
         181  +
static TARGETLOCATION_MEMBER_TARGETS: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
         182  +
    ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#TargetLocation$Targets", "com.amazonaws.ssm", "TargetLocation"),
         183  +
    ::aws_smithy_schema::ShapeType::List,
         184  +
    "Targets",
         185  +
    8,
         186  +
)
         187  +
.with_list_member(&TARGETLOCATION_MEMBER_TARGETS_MEMBER);
         188  +
static TARGETLOCATION_MEMBER_TARGETS_MAX_CONCURRENCY: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
         189  +
    ::aws_smithy_schema::ShapeId::from_parts(
         190  +
        "com.amazonaws.ssm#TargetLocation$TargetsMaxConcurrency",
         191  +
        "com.amazonaws.ssm",
         192  +
        "TargetLocation",
         193  +
    ),
         194  +
    ::aws_smithy_schema::ShapeType::String,
         195  +
    "TargetsMaxConcurrency",
         196  +
    9,
         197  +
);
         198  +
static TARGETLOCATION_MEMBER_TARGETS_MAX_ERRORS: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
         199  +
    ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#TargetLocation$TargetsMaxErrors", "com.amazonaws.ssm", "TargetLocation"),
         200  +
    ::aws_smithy_schema::ShapeType::String,
         201  +
    "TargetsMaxErrors",
         202  +
    10,
         203  +
);
         204  +
static TARGETLOCATION_SCHEMA: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_struct(
         205  +
    ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#TargetLocation", "com.amazonaws.ssm", "TargetLocation"),
         206  +
    ::aws_smithy_schema::ShapeType::Structure,
         207  +
    &[
         208  +
        &TARGETLOCATION_MEMBER_ACCOUNTS,
         209  +
        &TARGETLOCATION_MEMBER_REGIONS,
         210  +
        &TARGETLOCATION_MEMBER_TARGET_LOCATION_MAX_CONCURRENCY,
         211  +
        &TARGETLOCATION_MEMBER_TARGET_LOCATION_MAX_ERRORS,
         212  +
        &TARGETLOCATION_MEMBER_EXECUTION_ROLE_NAME,
         213  +
        &TARGETLOCATION_MEMBER_TARGET_LOCATION_ALARM_CONFIGURATION,
         214  +
        &TARGETLOCATION_MEMBER_INCLUDE_CHILD_ORGANIZATION_UNITS,
         215  +
        &TARGETLOCATION_MEMBER_EXCLUDE_ACCOUNTS,
         216  +
        &TARGETLOCATION_MEMBER_TARGETS,
         217  +
        &TARGETLOCATION_MEMBER_TARGETS_MAX_CONCURRENCY,
         218  +
        &TARGETLOCATION_MEMBER_TARGETS_MAX_ERRORS,
         219  +
    ],
         220  +
);
         221  +
impl TargetLocation {
         222  +
    /// The schema for this shape.
         223  +
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema<'static> = &TARGETLOCATION_SCHEMA;
         224  +
}
         225  +
impl ::aws_smithy_schema::serde::SerializableStruct for TargetLocation {
         226  +
    #[allow(unused_variables, clippy::diverging_sub_expression)]
         227  +
    fn serialize_members(
         228  +
        &self,
         229  +
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
         230  +
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
         231  +
        if let Some(ref val) = self.accounts {
         232  +
            ser.write_list(
         233  +
                &TARGETLOCATION_MEMBER_ACCOUNTS,
         234  +
                &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
         235  +
                    for item in val {
         236  +
                        ser.write_string(&aws_smithy_schema::prelude::STRING, item)?;
         237  +
                    }
         238  +
                    Ok(())
         239  +
                },
         240  +
            )?;
         241  +
        }
         242  +
        if let Some(ref val) = self.regions {
         243  +
            ser.write_list(
         244  +
                &TARGETLOCATION_MEMBER_REGIONS,
         245  +
                &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
         246  +
                    for item in val {
         247  +
                        ser.write_string(&aws_smithy_schema::prelude::STRING, item)?;
         248  +
                    }
         249  +
                    Ok(())
         250  +
                },
         251  +
            )?;
         252  +
        }
         253  +
        if let Some(ref val) = self.target_location_max_concurrency {
         254  +
            ser.write_string(&TARGETLOCATION_MEMBER_TARGET_LOCATION_MAX_CONCURRENCY, val)?;
         255  +
        }
         256  +
        if let Some(ref val) = self.target_location_max_errors {
         257  +
            ser.write_string(&TARGETLOCATION_MEMBER_TARGET_LOCATION_MAX_ERRORS, val)?;
         258  +
        }
         259  +
        if let Some(ref val) = self.execution_role_name {
         260  +
            ser.write_string(&TARGETLOCATION_MEMBER_EXECUTION_ROLE_NAME, val)?;
         261  +
        }
         262  +
        if let Some(ref val) = self.target_location_alarm_configuration {
         263  +
            ser.write_struct(&TARGETLOCATION_MEMBER_TARGET_LOCATION_ALARM_CONFIGURATION, val)?;
         264  +
        }
         265  +
        {
         266  +
            let val = &self.include_child_organization_units;
         267  +
            ser.write_boolean(&TARGETLOCATION_MEMBER_INCLUDE_CHILD_ORGANIZATION_UNITS, *val)?;
         268  +
        }
         269  +
        if let Some(ref val) = self.exclude_accounts {
         270  +
            ser.write_list(
         271  +
                &TARGETLOCATION_MEMBER_EXCLUDE_ACCOUNTS,
         272  +
                &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
         273  +
                    for item in val {
         274  +
                        ser.write_string(&aws_smithy_schema::prelude::STRING, item)?;
         275  +
                    }
         276  +
                    Ok(())
         277  +
                },
         278  +
            )?;
         279  +
        }
         280  +
        if let Some(ref val) = self.targets {
         281  +
            ser.write_list(
         282  +
                &TARGETLOCATION_MEMBER_TARGETS,
         283  +
                &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
         284  +
                    for item in val {
         285  +
                        ser.write_struct(crate::types::Target::SCHEMA, item)?;
         286  +
                    }
         287  +
                    Ok(())
         288  +
                },
         289  +
            )?;
         290  +
        }
         291  +
        if let Some(ref val) = self.targets_max_concurrency {
         292  +
            ser.write_string(&TARGETLOCATION_MEMBER_TARGETS_MAX_CONCURRENCY, val)?;
         293  +
        }
         294  +
        if let Some(ref val) = self.targets_max_errors {
         295  +
            ser.write_string(&TARGETLOCATION_MEMBER_TARGETS_MAX_ERRORS, val)?;
         296  +
        }
         297  +
        Ok(())
         298  +
    }
         299  +
}
         300  +
impl TargetLocation {
         301  +
    /// Deserializes this structure from a [`ShapeDeserializer`].
         302  +
    pub fn deserialize(
         303  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         304  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         305  +
        #[allow(unused_variables, unused_mut)]
         306  +
        let mut builder = Self::builder();
         307  +
        #[allow(
         308  +
            unused_variables,
         309  +
            unreachable_code,
         310  +
            clippy::single_match,
         311  +
            clippy::match_single_binding,
         312  +
            clippy::diverging_sub_expression
         313  +
        )]
         314  +
        deserializer.read_struct(&TARGETLOCATION_SCHEMA, &mut |member, deser| {
         315  +
            match member.member_index() {
         316  +
                Some(0) => {
         317  +
                    if deser.is_null() {
         318  +
                        deser.read_null()?;
         319  +
                    } else {
         320  +
                        builder.accounts = Some(deser.read_string_list(member)?);
         321  +
                    }
         322  +
                }
         323  +
                Some(1) => {
         324  +
                    if deser.is_null() {
         325  +
                        deser.read_null()?;
         326  +
                    } else {
         327  +
                        builder.regions = Some(deser.read_string_list(member)?);
         328  +
                    }
         329  +
                }
         330  +
                Some(2) => {
         331  +
                    if deser.is_null() {
         332  +
                        deser.read_null()?;
         333  +
                    } else {
         334  +
                        builder.target_location_max_concurrency = Some(deser.read_string(member)?);
         335  +
                    }
         336  +
                }
         337  +
                Some(3) => {
         338  +
                    if deser.is_null() {
         339  +
                        deser.read_null()?;
         340  +
                    } else {
         341  +
                        builder.target_location_max_errors = Some(deser.read_string(member)?);
         342  +
                    }
         343  +
                }
         344  +
                Some(4) => {
         345  +
                    if deser.is_null() {
         346  +
                        deser.read_null()?;
         347  +
                    } else {
         348  +
                        builder.execution_role_name = Some(deser.read_string(member)?);
         349  +
                    }
         350  +
                }
         351  +
                Some(5) => {
         352  +
                    if deser.is_null() {
         353  +
                        deser.read_null()?;
         354  +
                    } else {
         355  +
                        builder.target_location_alarm_configuration = Some(crate::types::AlarmConfiguration::deserialize(deser)?);
         356  +
                    }
         357  +
                }
         358  +
                Some(6) => {
         359  +
                    builder.include_child_organization_units = Some(deser.read_boolean(member)?);
         360  +
                }
         361  +
                Some(7) => {
         362  +
                    if deser.is_null() {
         363  +
                        deser.read_null()?;
         364  +
                    } else {
         365  +
                        builder.exclude_accounts = Some(deser.read_string_list(member)?);
         366  +
                    }
         367  +
                }
         368  +
                Some(8) => {
         369  +
                    if deser.is_null() {
         370  +
                        deser.read_null()?;
         371  +
                    } else {
         372  +
                        builder.targets = Some({
         373  +
                            let mut container = Vec::new();
         374  +
                            deser.read_list(member, &mut |deser| {
         375  +
                                container.push(crate::types::Target::deserialize(deser)?);
         376  +
                                Ok(())
         377  +
                            })?;
         378  +
                            container
         379  +
                        });
         380  +
                    }
         381  +
                }
         382  +
                Some(9) => {
         383  +
                    if deser.is_null() {
         384  +
                        deser.read_null()?;
         385  +
                    } else {
         386  +
                        builder.targets_max_concurrency = Some(deser.read_string(member)?);
         387  +
                    }
         388  +
                }
         389  +
                Some(10) => {
         390  +
                    if deser.is_null() {
         391  +
                        deser.read_null()?;
         392  +
                    } else {
         393  +
                        builder.targets_max_errors = Some(deser.read_string(member)?);
         394  +
                    }
         395  +
                }
         396  +
                _ => {}
         397  +
            }
         398  +
            Ok(())
         399  +
        })?;
         400  +
        Ok(builder.build())
         401  +
    }
         402  +
}
         403  +
impl TargetLocation {
         404  +
    /// Deserializes this structure from a body deserializer and HTTP response.
         405  +
    pub fn deserialize_with_response(
         406  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         407  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
         408  +
        _status: u16,
         409  +
        _body: &[u8],
         410  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         411  +
        Self::deserialize(deserializer)
         412  +
    }
         413  +
}
         414  +
impl TargetLocation {
         415  +
    /// Creates a new builder-style object to manufacture [`TargetLocation`](crate::types::TargetLocation).
         416  +
    pub fn builder() -> crate::types::builders::TargetLocationBuilder {
         417  +
        crate::types::builders::TargetLocationBuilder::default()
         418  +
    }
         419  +
}
         420  +
         421  +
/// A builder for [`TargetLocation`](crate::types::TargetLocation).
         422  +
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
         423  +
#[non_exhaustive]
         424  +
pub struct TargetLocationBuilder {
         425  +
    pub(crate) accounts: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
         426  +
    pub(crate) regions: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
         427  +
    pub(crate) target_location_max_concurrency: ::std::option::Option<::std::string::String>,
         428  +
    pub(crate) target_location_max_errors: ::std::option::Option<::std::string::String>,
         429  +
    pub(crate) execution_role_name: ::std::option::Option<::std::string::String>,
         430  +
    pub(crate) target_location_alarm_configuration: ::std::option::Option<crate::types::AlarmConfiguration>,
         431  +
    pub(crate) include_child_organization_units: ::std::option::Option<bool>,
         432  +
    pub(crate) exclude_accounts: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
         433  +
    pub(crate) targets: ::std::option::Option<::std::vec::Vec<crate::types::Target>>,
         434  +
    pub(crate) targets_max_concurrency: ::std::option::Option<::std::string::String>,
         435  +
    pub(crate) targets_max_errors: ::std::option::Option<::std::string::String>,
         436  +
}
         437  +
impl TargetLocationBuilder {
         438  +
    /// Appends an item to `accounts`.
         439  +
    ///
         440  +
    /// To override the contents of this collection use [`set_accounts`](Self::set_accounts).
         441  +
    ///
         442  +
    /// <p>The Amazon Web Services accounts targeted by the current Automation execution.</p>
         443  +
    pub fn accounts(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         444  +
        let mut v = self.accounts.unwrap_or_default();
         445  +
        v.push(input.into());
         446  +
        self.accounts = ::std::option::Option::Some(v);
         447  +
        self
         448  +
    }
         449  +
    /// <p>The Amazon Web Services accounts targeted by the current Automation execution.</p>
         450  +
    pub fn set_accounts(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
         451  +
        self.accounts = input;
         452  +
        self
         453  +
    }
         454  +
    /// <p>The Amazon Web Services accounts targeted by the current Automation execution.</p>
         455  +
    pub fn get_accounts(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
         456  +
        &self.accounts
         457  +
    }
         458  +
    /// Appends an item to `regions`.
         459  +
    ///
         460  +
    /// To override the contents of this collection use [`set_regions`](Self::set_regions).
         461  +
    ///
         462  +
    /// <p>The Amazon Web Services Regions targeted by the current Automation execution.</p>
         463  +
    pub fn regions(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         464  +
        let mut v = self.regions.unwrap_or_default();
         465  +
        v.push(input.into());
         466  +
        self.regions = ::std::option::Option::Some(v);
         467  +
        self
         468  +
    }
         469  +
    /// <p>The Amazon Web Services Regions targeted by the current Automation execution.</p>
         470  +
    pub fn set_regions(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
         471  +
        self.regions = input;
         472  +
        self
         473  +
    }
         474  +
    /// <p>The Amazon Web Services Regions targeted by the current Automation execution.</p>
         475  +
    pub fn get_regions(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
         476  +
        &self.regions
         477  +
    }
         478  +
    /// <p>The maximum number of Amazon Web Services Regions and Amazon Web Services accounts allowed to run the Automation concurrently. <code>TargetLocationMaxConcurrency</code> has a default value of 1.</p>
         479  +
    pub fn target_location_max_concurrency(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         480  +
        self.target_location_max_concurrency = ::std::option::Option::Some(input.into());
         481  +
        self
         482  +
    }
         483  +
    /// <p>The maximum number of Amazon Web Services Regions and Amazon Web Services accounts allowed to run the Automation concurrently. <code>TargetLocationMaxConcurrency</code> has a default value of 1.</p>
         484  +
    pub fn set_target_location_max_concurrency(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         485  +
        self.target_location_max_concurrency = input;
         486  +
        self
         487  +
    }
         488  +
    /// <p>The maximum number of Amazon Web Services Regions and Amazon Web Services accounts allowed to run the Automation concurrently. <code>TargetLocationMaxConcurrency</code> has a default value of 1.</p>
         489  +
    pub fn get_target_location_max_concurrency(&self) -> &::std::option::Option<::std::string::String> {
         490  +
        &self.target_location_max_concurrency
         491  +
    }
         492  +
    /// <p>The maximum number of errors allowed before the system stops queueing additional Automation executions for the currently running Automation. <code>TargetLocationMaxErrors</code> has a default value of 0.</p>
         493  +
    pub fn target_location_max_errors(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         494  +
        self.target_location_max_errors = ::std::option::Option::Some(input.into());
         495  +
        self
         496  +
    }
         497  +
    /// <p>The maximum number of errors allowed before the system stops queueing additional Automation executions for the currently running Automation. <code>TargetLocationMaxErrors</code> has a default value of 0.</p>
         498  +
    pub fn set_target_location_max_errors(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         499  +
        self.target_location_max_errors = input;
         500  +
        self
         501  +
    }
         502  +
    /// <p>The maximum number of errors allowed before the system stops queueing additional Automation executions for the currently running Automation. <code>TargetLocationMaxErrors</code> has a default value of 0.</p>
         503  +
    pub fn get_target_location_max_errors(&self) -> &::std::option::Option<::std::string::String> {
         504  +
        &self.target_location_max_errors
         505  +
    }
         506  +
    /// <p>The Automation execution role used by the currently running Automation. If not specified, the default value is <code>AWS-SystemsManager-AutomationExecutionRole</code>.</p>
         507  +
    pub fn execution_role_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         508  +
        self.execution_role_name = ::std::option::Option::Some(input.into());
         509  +
        self
         510  +
    }
         511  +
    /// <p>The Automation execution role used by the currently running Automation. If not specified, the default value is <code>AWS-SystemsManager-AutomationExecutionRole</code>.</p>
         512  +
    pub fn set_execution_role_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         513  +
        self.execution_role_name = input;
         514  +
        self
         515  +
    }
         516  +
    /// <p>The Automation execution role used by the currently running Automation. If not specified, the default value is <code>AWS-SystemsManager-AutomationExecutionRole</code>.</p>
         517  +
    pub fn get_execution_role_name(&self) -> &::std::option::Option<::std::string::String> {
         518  +
        &self.execution_role_name
         519  +
    }
         520  +
    /// <p>The details for the CloudWatch alarm you want to apply to an automation or command.</p>
         521  +
    pub fn target_location_alarm_configuration(mut self, input: crate::types::AlarmConfiguration) -> Self {
         522  +
        self.target_location_alarm_configuration = ::std::option::Option::Some(input);
         523  +
        self
         524  +
    }
         525  +
    /// <p>The details for the CloudWatch alarm you want to apply to an automation or command.</p>
         526  +
    pub fn set_target_location_alarm_configuration(mut self, input: ::std::option::Option<crate::types::AlarmConfiguration>) -> Self {
         527  +
        self.target_location_alarm_configuration = input;
         528  +
        self
         529  +
    }
         530  +
    /// <p>The details for the CloudWatch alarm you want to apply to an automation or command.</p>
         531  +
    pub fn get_target_location_alarm_configuration(&self) -> &::std::option::Option<crate::types::AlarmConfiguration> {
         532  +
        &self.target_location_alarm_configuration
         533  +
    }
         534  +
    /// <p>Indicates whether to include child organizational units (OUs) that are children of the targeted OUs. The default is <code>false</code>.</p>
         535  +
    pub fn include_child_organization_units(mut self, input: bool) -> Self {
         536  +
        self.include_child_organization_units = ::std::option::Option::Some(input);
         537  +
        self
         538  +
    }
         539  +
    /// <p>Indicates whether to include child organizational units (OUs) that are children of the targeted OUs. The default is <code>false</code>.</p>
         540  +
    pub fn set_include_child_organization_units(mut self, input: ::std::option::Option<bool>) -> Self {
         541  +
        self.include_child_organization_units = input;
         542  +
        self
         543  +
    }
         544  +
    /// <p>Indicates whether to include child organizational units (OUs) that are children of the targeted OUs. The default is <code>false</code>.</p>
         545  +
    pub fn get_include_child_organization_units(&self) -> &::std::option::Option<bool> {
         546  +
        &self.include_child_organization_units
         547  +
    }
         548  +
    /// Appends an item to `exclude_accounts`.
         549  +
    ///
         550  +
    /// To override the contents of this collection use [`set_exclude_accounts`](Self::set_exclude_accounts).
         551  +
    ///
         552  +
    /// <p>Amazon Web Services accounts or organizational units to exclude as expanded targets.</p>
         553  +
    pub fn exclude_accounts(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         554  +
        let mut v = self.exclude_accounts.unwrap_or_default();
         555  +
        v.push(input.into());
         556  +
        self.exclude_accounts = ::std::option::Option::Some(v);
         557  +
        self
         558  +
    }
         559  +
    /// <p>Amazon Web Services accounts or organizational units to exclude as expanded targets.</p>
         560  +
    pub fn set_exclude_accounts(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
         561  +
        self.exclude_accounts = input;
         562  +
        self
         563  +
    }
         564  +
    /// <p>Amazon Web Services accounts or organizational units to exclude as expanded targets.</p>
         565  +
    pub fn get_exclude_accounts(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
         566  +
        &self.exclude_accounts
         567  +
    }
         568  +
    /// Appends an item to `targets`.
         569  +
    ///
         570  +
    /// To override the contents of this collection use [`set_targets`](Self::set_targets).
         571  +
    ///
         572  +
    /// <p>A list of key-value mappings to target resources. If you specify values for this data type, you must also specify a value for <code>TargetParameterName</code>.</p>
         573  +
    /// <p>This <code>Targets</code> parameter takes precedence over the <code>StartAutomationExecution:Targets</code> parameter if both are supplied.</p>
         574  +
    pub fn targets(mut self, input: crate::types::Target) -> Self {
         575  +
        let mut v = self.targets.unwrap_or_default();
         576  +
        v.push(input);
         577  +
        self.targets = ::std::option::Option::Some(v);
         578  +
        self
         579  +
    }
         580  +
    /// <p>A list of key-value mappings to target resources. If you specify values for this data type, you must also specify a value for <code>TargetParameterName</code>.</p>
         581  +
    /// <p>This <code>Targets</code> parameter takes precedence over the <code>StartAutomationExecution:Targets</code> parameter if both are supplied.</p>
         582  +
    pub fn set_targets(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Target>>) -> Self {
         583  +
        self.targets = input;
         584  +
        self
         585  +
    }
         586  +
    /// <p>A list of key-value mappings to target resources. If you specify values for this data type, you must also specify a value for <code>TargetParameterName</code>.</p>
         587  +
    /// <p>This <code>Targets</code> parameter takes precedence over the <code>StartAutomationExecution:Targets</code> parameter if both are supplied.</p>
         588  +
    pub fn get_targets(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Target>> {
         589  +
        &self.targets
         590  +
    }
         591  +
    /// <p>The maximum number of targets allowed to run this task in parallel. This <code>TargetsMaxConcurrency</code> takes precedence over the <code>StartAutomationExecution:MaxConcurrency</code> parameter if both are supplied.</p>
         592  +
    pub fn targets_max_concurrency(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         593  +
        self.targets_max_concurrency = ::std::option::Option::Some(input.into());
         594  +
        self
         595  +
    }
         596  +
    /// <p>The maximum number of targets allowed to run this task in parallel. This <code>TargetsMaxConcurrency</code> takes precedence over the <code>StartAutomationExecution:MaxConcurrency</code> parameter if both are supplied.</p>
         597  +
    pub fn set_targets_max_concurrency(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         598  +
        self.targets_max_concurrency = input;
         599  +
        self
         600  +
    }
         601  +
    /// <p>The maximum number of targets allowed to run this task in parallel. This <code>TargetsMaxConcurrency</code> takes precedence over the <code>StartAutomationExecution:MaxConcurrency</code> parameter if both are supplied.</p>
         602  +
    pub fn get_targets_max_concurrency(&self) -> &::std::option::Option<::std::string::String> {
         603  +
        &self.targets_max_concurrency
         604  +
    }
         605  +
    /// <p>The maximum number of errors that are allowed before the system stops running the automation on additional targets. This <code>TargetsMaxErrors</code> parameter takes precedence over the <code>StartAutomationExecution:MaxErrors</code> parameter if both are supplied.</p>
         606  +
    pub fn targets_max_errors(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         607  +
        self.targets_max_errors = ::std::option::Option::Some(input.into());
         608  +
        self
         609  +
    }
         610  +
    /// <p>The maximum number of errors that are allowed before the system stops running the automation on additional targets. This <code>TargetsMaxErrors</code> parameter takes precedence over the <code>StartAutomationExecution:MaxErrors</code> parameter if both are supplied.</p>
         611  +
    pub fn set_targets_max_errors(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         612  +
        self.targets_max_errors = input;
         613  +
        self
         614  +
    }
         615  +
    /// <p>The maximum number of errors that are allowed before the system stops running the automation on additional targets. This <code>TargetsMaxErrors</code> parameter takes precedence over the <code>StartAutomationExecution:MaxErrors</code> parameter if both are supplied.</p>
         616  +
    pub fn get_targets_max_errors(&self) -> &::std::option::Option<::std::string::String> {
         617  +
        &self.targets_max_errors
         618  +
    }
         619  +
    /// Consumes the builder and constructs a [`TargetLocation`](crate::types::TargetLocation).
         620  +
    pub fn build(self) -> crate::types::TargetLocation {
         621  +
        crate::types::TargetLocation {
         622  +
            accounts: self.accounts,
         623  +
            regions: self.regions,
         624  +
            target_location_max_concurrency: self.target_location_max_concurrency,
         625  +
            target_location_max_errors: self.target_location_max_errors,
         626  +
            execution_role_name: self.execution_role_name,
         627  +
            target_location_alarm_configuration: self.target_location_alarm_configuration,
         628  +
            include_child_organization_units: self.include_child_organization_units.unwrap_or_default(),
         629  +
            exclude_accounts: self.exclude_accounts,
         630  +
            targets: self.targets,
         631  +
            targets_max_concurrency: self.targets_max_concurrency,
         632  +
            targets_max_errors: self.targets_max_errors,
         633  +
        }
         634  +
    }
         635  +
}