AWS SDK

AWS SDK

rev. 3388bf5e18f4269f2b46f39cdc814c5c39d413d0 (ignoring whitespace)

Files changed:

tmp-codegen-diff/aws-sdk/sdk/ssm/src/types/_resource_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 `ResourceType`, 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 resourcetype = unimplemented!();
          14  +
/// match resourcetype {
          15  +
///     ResourceType::Ec2Instance => { /* ... */ },
          16  +
///     ResourceType::ManagedInstance => { /* ... */ },
          17  +
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
          18  +
///     _ => { /* ... */ },
          19  +
/// }
          20  +
/// ```
          21  +
/// The above code demonstrates that when `resourcetype` represents
          22  +
/// `NewFeature`, the execution path will lead to the second last match arm,
          23  +
/// even though the enum does not contain a variant `ResourceType::NewFeature`
          24  +
/// in the current version of SDK. The reason is that the variable `other`,
          25  +
/// created by the `@` operator, is bound to
          26  +
/// `ResourceType::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 `ResourceType::NewFeature` is defined.
          30  +
/// Specifically, when `resourcetype` represents `NewFeature`,
          31  +
/// the execution path will hit the second last match arm as before by virtue of
          32  +
/// calling `as_str` on `ResourceType::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 ResourceType {
          45  +
    #[allow(missing_docs)] // documentation missing in model
          46  +
    Ec2Instance,
          47  +
    #[allow(missing_docs)] // documentation missing in model
          48  +
    ManagedInstance,
          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 ResourceType {
          54  +
    fn from(s: &str) -> Self {
          55  +
        match s {
          56  +
            "EC2Instance" => ResourceType::Ec2Instance,
          57  +
            "ManagedInstance" => ResourceType::ManagedInstance,
          58  +
            other => ResourceType::Unknown(crate::primitives::sealed_enum_unknown::UnknownVariantValue(other.to_owned())),
          59  +
        }
          60  +
    }
          61  +
}
          62  +
impl ::std::str::FromStr for ResourceType {
          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(ResourceType::from(s))
          67  +
    }
          68  +
}
          69  +
impl ResourceType {
          70  +
    /// Returns the `&str` value of the enum member.
          71  +
    pub fn as_str(&self) -> &str {
          72  +
        match self {
          73  +
            ResourceType::Ec2Instance => "EC2Instance",
          74  +
            ResourceType::ManagedInstance => "ManagedInstance",
          75  +
            ResourceType::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  +
        &["EC2Instance", "ManagedInstance"]
          81  +
    }
          82  +
}
          83  +
impl ::std::convert::AsRef<str> for ResourceType {
          84  +
    fn as_ref(&self) -> &str {
          85  +
        self.as_str()
          86  +
    }
          87  +
}
          88  +
impl ResourceType {
          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 ResourceType {
         101  +
    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
         102  +
        match self {
         103  +
            ResourceType::Ec2Instance => write!(f, "EC2Instance"),
         104  +
            ResourceType::ManagedInstance => write!(f, "ManagedInstance"),
         105  +
            ResourceType::Unknown(value) => write!(f, "{value}"),
         106  +
        }
         107  +
    }
         108  +
}

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

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

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

@@ -0,1 +0,125 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
           3  +
/// <p>The inventory item result attribute.</p>
           4  +
#[non_exhaustive]
           5  +
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
           6  +
pub struct ResultAttribute {
           7  +
    /// <p>Name of the inventory item type. Valid value: <code>AWS:InstanceInformation</code>. Default Value: <code>AWS:InstanceInformation</code>.</p>
           8  +
    pub type_name: ::std::string::String,
           9  +
}
          10  +
impl ResultAttribute {
          11  +
    /// <p>Name of the inventory item type. Valid value: <code>AWS:InstanceInformation</code>. Default Value: <code>AWS:InstanceInformation</code>.</p>
          12  +
    pub fn type_name(&self) -> &str {
          13  +
        use std::ops::Deref;
          14  +
        self.type_name.deref()
          15  +
    }
          16  +
}
          17  +
static RESULTATTRIBUTE_MEMBER_TYPE_NAME: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          18  +
    ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#ResultAttribute$TypeName", "com.amazonaws.ssm", "ResultAttribute"),
          19  +
    ::aws_smithy_schema::ShapeType::String,
          20  +
    "TypeName",
          21  +
    0,
          22  +
);
          23  +
static RESULTATTRIBUTE_SCHEMA: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_struct(
          24  +
    ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#ResultAttribute", "com.amazonaws.ssm", "ResultAttribute"),
          25  +
    ::aws_smithy_schema::ShapeType::Structure,
          26  +
    &[&RESULTATTRIBUTE_MEMBER_TYPE_NAME],
          27  +
);
          28  +
impl ResultAttribute {
          29  +
    /// The schema for this shape.
          30  +
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema<'static> = &RESULTATTRIBUTE_SCHEMA;
          31  +
}
          32  +
impl ::aws_smithy_schema::serde::SerializableStruct for ResultAttribute {
          33  +
    #[allow(unused_variables, clippy::diverging_sub_expression)]
          34  +
    fn serialize_members(
          35  +
        &self,
          36  +
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
          37  +
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
          38  +
        {
          39  +
            let val = &self.type_name;
          40  +
            ser.write_string(&RESULTATTRIBUTE_MEMBER_TYPE_NAME, val)?;
          41  +
        }
          42  +
        Ok(())
          43  +
    }
          44  +
}
          45  +
impl ResultAttribute {
          46  +
    /// Deserializes this structure from a [`ShapeDeserializer`].
          47  +
    pub fn deserialize(
          48  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
          49  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
          50  +
        #[allow(unused_variables, unused_mut)]
          51  +
        let mut builder = Self::builder();
          52  +
        #[allow(
          53  +
            unused_variables,
          54  +
            unreachable_code,
          55  +
            clippy::single_match,
          56  +
            clippy::match_single_binding,
          57  +
            clippy::diverging_sub_expression
          58  +
        )]
          59  +
        deserializer.read_struct(&RESULTATTRIBUTE_SCHEMA, &mut |member, deser| {
          60  +
            match member.member_index() {
          61  +
                Some(0) => {
          62  +
                    builder.type_name = Some(deser.read_string(member)?);
          63  +
                }
          64  +
                _ => {}
          65  +
            }
          66  +
            Ok(())
          67  +
        })?;
          68  +
        builder.type_name = builder.type_name.or(Some(String::new()));
          69  +
        builder.build().map_err(|e| aws_smithy_schema::serde::SerdeError::custom(e.to_string()))
          70  +
    }
          71  +
}
          72  +
impl ResultAttribute {
          73  +
    /// Deserializes this structure from a body deserializer and HTTP response.
          74  +
    pub fn deserialize_with_response(
          75  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
          76  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
          77  +
        _status: u16,
          78  +
        _body: &[u8],
          79  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
          80  +
        Self::deserialize(deserializer)
          81  +
    }
          82  +
}
          83  +
impl ResultAttribute {
          84  +
    /// Creates a new builder-style object to manufacture [`ResultAttribute`](crate::types::ResultAttribute).
          85  +
    pub fn builder() -> crate::types::builders::ResultAttributeBuilder {
          86  +
        crate::types::builders::ResultAttributeBuilder::default()
          87  +
    }
          88  +
}
          89  +
          90  +
/// A builder for [`ResultAttribute`](crate::types::ResultAttribute).
          91  +
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
          92  +
#[non_exhaustive]
          93  +
pub struct ResultAttributeBuilder {
          94  +
    pub(crate) type_name: ::std::option::Option<::std::string::String>,
          95  +
}
          96  +
impl ResultAttributeBuilder {
          97  +
    /// <p>Name of the inventory item type. Valid value: <code>AWS:InstanceInformation</code>. Default Value: <code>AWS:InstanceInformation</code>.</p>
          98  +
    /// This field is required.
          99  +
    pub fn type_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         100  +
        self.type_name = ::std::option::Option::Some(input.into());
         101  +
        self
         102  +
    }
         103  +
    /// <p>Name of the inventory item type. Valid value: <code>AWS:InstanceInformation</code>. Default Value: <code>AWS:InstanceInformation</code>.</p>
         104  +
    pub fn set_type_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         105  +
        self.type_name = input;
         106  +
        self
         107  +
    }
         108  +
    /// <p>Name of the inventory item type. Valid value: <code>AWS:InstanceInformation</code>. Default Value: <code>AWS:InstanceInformation</code>.</p>
         109  +
    pub fn get_type_name(&self) -> &::std::option::Option<::std::string::String> {
         110  +
        &self.type_name
         111  +
    }
         112  +
    /// Consumes the builder and constructs a [`ResultAttribute`](crate::types::ResultAttribute).
         113  +
    /// This method will fail if any of the following fields are not set:
         114  +
    /// - [`type_name`](crate::types::builders::ResultAttributeBuilder::type_name)
         115  +
    pub fn build(self) -> ::std::result::Result<crate::types::ResultAttribute, ::aws_smithy_types::error::operation::BuildError> {
         116  +
        ::std::result::Result::Ok(crate::types::ResultAttribute {
         117  +
            type_name: self.type_name.ok_or_else(|| {
         118  +
                ::aws_smithy_types::error::operation::BuildError::missing_field(
         119  +
                    "type_name",
         120  +
                    "type_name was not specified but it is required when building ResultAttribute",
         121  +
                )
         122  +
            })?,
         123  +
        })
         124  +
    }
         125  +
}

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

@@ -0,1 +0,202 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
           3  +
/// <p>Information about the result of a document review request.</p>
           4  +
#[non_exhaustive]
           5  +
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
           6  +
pub struct ReviewInformation {
           7  +
    /// <p>The time that the reviewer took action on the document review request.</p>
           8  +
    pub reviewed_time: ::std::option::Option<::aws_smithy_types::DateTime>,
           9  +
    /// <p>The current status of the document review request.</p>
          10  +
    pub status: ::std::option::Option<crate::types::ReviewStatus>,
          11  +
    /// <p>The reviewer assigned to take action on the document review request.</p>
          12  +
    pub reviewer: ::std::option::Option<::std::string::String>,
          13  +
}
          14  +
impl ReviewInformation {
          15  +
    /// <p>The time that the reviewer took action on the document review request.</p>
          16  +
    pub fn reviewed_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
          17  +
        self.reviewed_time.as_ref()
          18  +
    }
          19  +
    /// <p>The current status of the document review request.</p>
          20  +
    pub fn status(&self) -> ::std::option::Option<&crate::types::ReviewStatus> {
          21  +
        self.status.as_ref()
          22  +
    }
          23  +
    /// <p>The reviewer assigned to take action on the document review request.</p>
          24  +
    pub fn reviewer(&self) -> ::std::option::Option<&str> {
          25  +
        self.reviewer.as_deref()
          26  +
    }
          27  +
}
          28  +
static REVIEWINFORMATION_MEMBER_REVIEWED_TIME: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          29  +
    ::aws_smithy_schema::ShapeId::from_parts(
          30  +
        "com.amazonaws.ssm#ReviewInformation$ReviewedTime",
          31  +
        "com.amazonaws.ssm",
          32  +
        "ReviewInformation",
          33  +
    ),
          34  +
    ::aws_smithy_schema::ShapeType::Timestamp,
          35  +
    "ReviewedTime",
          36  +
    0,
          37  +
);
          38  +
static REVIEWINFORMATION_MEMBER_STATUS: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          39  +
    ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#ReviewInformation$Status", "com.amazonaws.ssm", "ReviewInformation"),
          40  +
    ::aws_smithy_schema::ShapeType::String,
          41  +
    "Status",
          42  +
    1,
          43  +
);
          44  +
static REVIEWINFORMATION_MEMBER_REVIEWER: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          45  +
    ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#ReviewInformation$Reviewer", "com.amazonaws.ssm", "ReviewInformation"),
          46  +
    ::aws_smithy_schema::ShapeType::String,
          47  +
    "Reviewer",
          48  +
    2,
          49  +
);
          50  +
static REVIEWINFORMATION_SCHEMA: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_struct(
          51  +
    ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#ReviewInformation", "com.amazonaws.ssm", "ReviewInformation"),
          52  +
    ::aws_smithy_schema::ShapeType::Structure,
          53  +
    &[
          54  +
        &REVIEWINFORMATION_MEMBER_REVIEWED_TIME,
          55  +
        &REVIEWINFORMATION_MEMBER_STATUS,
          56  +
        &REVIEWINFORMATION_MEMBER_REVIEWER,
          57  +
    ],
          58  +
);
          59  +
impl ReviewInformation {
          60  +
    /// The schema for this shape.
          61  +
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema<'static> = &REVIEWINFORMATION_SCHEMA;
          62  +
}
          63  +
impl ::aws_smithy_schema::serde::SerializableStruct for ReviewInformation {
          64  +
    #[allow(unused_variables, clippy::diverging_sub_expression)]
          65  +
    fn serialize_members(
          66  +
        &self,
          67  +
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
          68  +
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
          69  +
        if let Some(ref val) = self.reviewed_time {
          70  +
            ser.write_timestamp(&REVIEWINFORMATION_MEMBER_REVIEWED_TIME, val)?;
          71  +
        }
          72  +
        if let Some(ref val) = self.status {
          73  +
            ser.write_string(&REVIEWINFORMATION_MEMBER_STATUS, val.as_str())?;
          74  +
        }
          75  +
        if let Some(ref val) = self.reviewer {
          76  +
            ser.write_string(&REVIEWINFORMATION_MEMBER_REVIEWER, val)?;
          77  +
        }
          78  +
        Ok(())
          79  +
    }
          80  +
}
          81  +
impl ReviewInformation {
          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(&REVIEWINFORMATION_SCHEMA, &mut |member, deser| {
          96  +
            match member.member_index() {
          97  +
                Some(0) => {
          98  +
                    if deser.is_null() {
          99  +
                        deser.read_null()?;
         100  +
                    } else {
         101  +
                        builder.reviewed_time = Some(deser.read_timestamp(member)?);
         102  +
                    }
         103  +
                }
         104  +
                Some(1) => {
         105  +
                    if deser.is_null() {
         106  +
                        deser.read_null()?;
         107  +
                    } else {
         108  +
                        builder.status = Some(crate::types::ReviewStatus::from(deser.read_string(member)?.as_str()));
         109  +
                    }
         110  +
                }
         111  +
                Some(2) => {
         112  +
                    if deser.is_null() {
         113  +
                        deser.read_null()?;
         114  +
                    } else {
         115  +
                        builder.reviewer = Some(deser.read_string(member)?);
         116  +
                    }
         117  +
                }
         118  +
                _ => {}
         119  +
            }
         120  +
            Ok(())
         121  +
        })?;
         122  +
        Ok(builder.build())
         123  +
    }
         124  +
}
         125  +
impl ReviewInformation {
         126  +
    /// Deserializes this structure from a body deserializer and HTTP response.
         127  +
    pub fn deserialize_with_response(
         128  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         129  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
         130  +
        _status: u16,
         131  +
        _body: &[u8],
         132  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         133  +
        Self::deserialize(deserializer)
         134  +
    }
         135  +
}
         136  +
impl ReviewInformation {
         137  +
    /// Creates a new builder-style object to manufacture [`ReviewInformation`](crate::types::ReviewInformation).
         138  +
    pub fn builder() -> crate::types::builders::ReviewInformationBuilder {
         139  +
        crate::types::builders::ReviewInformationBuilder::default()
         140  +
    }
         141  +
}
         142  +
         143  +
/// A builder for [`ReviewInformation`](crate::types::ReviewInformation).
         144  +
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
         145  +
#[non_exhaustive]
         146  +
pub struct ReviewInformationBuilder {
         147  +
    pub(crate) reviewed_time: ::std::option::Option<::aws_smithy_types::DateTime>,
         148  +
    pub(crate) status: ::std::option::Option<crate::types::ReviewStatus>,
         149  +
    pub(crate) reviewer: ::std::option::Option<::std::string::String>,
         150  +
}
         151  +
impl ReviewInformationBuilder {
         152  +
    /// <p>The time that the reviewer took action on the document review request.</p>
         153  +
    pub fn reviewed_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
         154  +
        self.reviewed_time = ::std::option::Option::Some(input);
         155  +
        self
         156  +
    }
         157  +
    /// <p>The time that the reviewer took action on the document review request.</p>
         158  +
    pub fn set_reviewed_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
         159  +
        self.reviewed_time = input;
         160  +
        self
         161  +
    }
         162  +
    /// <p>The time that the reviewer took action on the document review request.</p>
         163  +
    pub fn get_reviewed_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
         164  +
        &self.reviewed_time
         165  +
    }
         166  +
    /// <p>The current status of the document review request.</p>
         167  +
    pub fn status(mut self, input: crate::types::ReviewStatus) -> Self {
         168  +
        self.status = ::std::option::Option::Some(input);
         169  +
        self
         170  +
    }
         171  +
    /// <p>The current status of the document review request.</p>
         172  +
    pub fn set_status(mut self, input: ::std::option::Option<crate::types::ReviewStatus>) -> Self {
         173  +
        self.status = input;
         174  +
        self
         175  +
    }
         176  +
    /// <p>The current status of the document review request.</p>
         177  +
    pub fn get_status(&self) -> &::std::option::Option<crate::types::ReviewStatus> {
         178  +
        &self.status
         179  +
    }
         180  +
    /// <p>The reviewer assigned to take action on the document review request.</p>
         181  +
    pub fn reviewer(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         182  +
        self.reviewer = ::std::option::Option::Some(input.into());
         183  +
        self
         184  +
    }
         185  +
    /// <p>The reviewer assigned to take action on the document review request.</p>
         186  +
    pub fn set_reviewer(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         187  +
        self.reviewer = input;
         188  +
        self
         189  +
    }
         190  +
    /// <p>The reviewer assigned to take action on the document review request.</p>
         191  +
    pub fn get_reviewer(&self) -> &::std::option::Option<::std::string::String> {
         192  +
        &self.reviewer
         193  +
    }
         194  +
    /// Consumes the builder and constructs a [`ReviewInformation`](crate::types::ReviewInformation).
         195  +
    pub fn build(self) -> crate::types::ReviewInformation {
         196  +
        crate::types::ReviewInformation {
         197  +
            reviewed_time: self.reviewed_time,
         198  +
            status: self.status,
         199  +
            reviewer: self.reviewer,
         200  +
        }
         201  +
    }
         202  +
}

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

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

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

@@ -0,1 +0,663 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
           3  +
/// <p>Information about an Automation runbook used in a runbook workflow in Change Manager.</p><note>
           4  +
/// <p>The Automation runbooks specified for the runbook workflow can't run until all required approvals for the change request have been received.</p>
           5  +
/// </note>
           6  +
#[non_exhaustive]
           7  +
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
           8  +
pub struct Runbook {
           9  +
    /// <p>The name of the Automation runbook used in a runbook workflow.</p>
          10  +
    pub document_name: ::std::string::String,
          11  +
    /// <p>The version of the Automation runbook used in a runbook workflow.</p>
          12  +
    pub document_version: ::std::option::Option<::std::string::String>,
          13  +
    /// <p>The key-value map of execution parameters, which were supplied when calling <code>StartChangeRequestExecution</code>.</p>
          14  +
    pub parameters: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::vec::Vec<::std::string::String>>>,
          15  +
    /// <p>The name of the parameter used as the target resource for the rate-controlled runbook workflow. Required if you specify <code>Targets</code>.</p>
          16  +
    pub target_parameter_name: ::std::option::Option<::std::string::String>,
          17  +
    /// <p>A key-value mapping to target resources that the runbook operation performs tasks on. Required if you specify <code>TargetParameterName</code>.</p>
          18  +
    pub targets: ::std::option::Option<::std::vec::Vec<crate::types::Target>>,
          19  +
    /// <p>A key-value mapping of runbook parameters to target resources. Both Targets and TargetMaps can't be specified together.</p>
          20  +
    pub target_maps:
          21  +
        ::std::option::Option<::std::vec::Vec<::std::collections::HashMap<::std::string::String, ::std::vec::Vec<::std::string::String>>>>,
          22  +
    /// <p>The <code>MaxConcurrency</code> value specified by the user when the operation started, indicating the maximum number of resources that the runbook operation can run on at the same time.</p>
          23  +
    pub max_concurrency: ::std::option::Option<::std::string::String>,
          24  +
    /// <p>The <code>MaxErrors</code> value specified by the user when the execution started, indicating the maximum number of errors that can occur during the operation before the updates are stopped or rolled back.</p>
          25  +
    pub max_errors: ::std::option::Option<::std::string::String>,
          26  +
    /// <p>Information about the Amazon Web Services Regions and Amazon Web Services accounts targeted by the current Runbook operation.</p>
          27  +
    pub target_locations: ::std::option::Option<::std::vec::Vec<crate::types::TargetLocation>>,
          28  +
}
          29  +
impl Runbook {
          30  +
    /// <p>The name of the Automation runbook used in a runbook workflow.</p>
          31  +
    pub fn document_name(&self) -> &str {
          32  +
        use std::ops::Deref;
          33  +
        self.document_name.deref()
          34  +
    }
          35  +
    /// <p>The version of the Automation runbook used in a runbook workflow.</p>
          36  +
    pub fn document_version(&self) -> ::std::option::Option<&str> {
          37  +
        self.document_version.as_deref()
          38  +
    }
          39  +
    /// <p>The key-value map of execution parameters, which were supplied when calling <code>StartChangeRequestExecution</code>.</p>
          40  +
    pub fn parameters(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::vec::Vec<::std::string::String>>> {
          41  +
        self.parameters.as_ref()
          42  +
    }
          43  +
    /// <p>The name of the parameter used as the target resource for the rate-controlled runbook workflow. Required if you specify <code>Targets</code>.</p>
          44  +
    pub fn target_parameter_name(&self) -> ::std::option::Option<&str> {
          45  +
        self.target_parameter_name.as_deref()
          46  +
    }
          47  +
    /// <p>A key-value mapping to target resources that the runbook operation performs tasks on. Required if you specify <code>TargetParameterName</code>.</p>
          48  +
    ///
          49  +
    /// 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()`.
          50  +
    pub fn targets(&self) -> &[crate::types::Target] {
          51  +
        self.targets.as_deref().unwrap_or_default()
          52  +
    }
          53  +
    /// <p>A key-value mapping of runbook parameters to target resources. Both Targets and TargetMaps can't be specified together.</p>
          54  +
    ///
          55  +
    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.target_maps.is_none()`.
          56  +
    pub fn target_maps(&self) -> &[::std::collections::HashMap<::std::string::String, ::std::vec::Vec<::std::string::String>>] {
          57  +
        self.target_maps.as_deref().unwrap_or_default()
          58  +
    }
          59  +
    /// <p>The <code>MaxConcurrency</code> value specified by the user when the operation started, indicating the maximum number of resources that the runbook operation can run on at the same time.</p>
          60  +
    pub fn max_concurrency(&self) -> ::std::option::Option<&str> {
          61  +
        self.max_concurrency.as_deref()
          62  +
    }
          63  +
    /// <p>The <code>MaxErrors</code> value specified by the user when the execution started, indicating the maximum number of errors that can occur during the operation before the updates are stopped or rolled back.</p>
          64  +
    pub fn max_errors(&self) -> ::std::option::Option<&str> {
          65  +
        self.max_errors.as_deref()
          66  +
    }
          67  +
    /// <p>Information about the Amazon Web Services Regions and Amazon Web Services accounts targeted by the current Runbook operation.</p>
          68  +
    ///
          69  +
    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.target_locations.is_none()`.
          70  +
    pub fn target_locations(&self) -> &[crate::types::TargetLocation] {
          71  +
        self.target_locations.as_deref().unwrap_or_default()
          72  +
    }
          73  +
}
          74  +
static RUNBOOK_MEMBER_DOCUMENT_NAME: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          75  +
    ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#Runbook$DocumentName", "com.amazonaws.ssm", "Runbook"),
          76  +
    ::aws_smithy_schema::ShapeType::String,
          77  +
    "DocumentName",
          78  +
    0,
          79  +
);
          80  +
static RUNBOOK_MEMBER_DOCUMENT_VERSION: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          81  +
    ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#Runbook$DocumentVersion", "com.amazonaws.ssm", "Runbook"),
          82  +
    ::aws_smithy_schema::ShapeType::String,
          83  +
    "DocumentVersion",
          84  +
    1,
          85  +
);
          86  +
static RUNBOOK_MEMBER_PARAMETERS_VALUE_MEMBER: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          87  +
    ::aws_smithy_schema::ShapeId::from_parts(
          88  +
        "com.amazonaws.ssm#AutomationParameterValueList$member",
          89  +
        "com.amazonaws.ssm",
          90  +
        "AutomationParameterValueList",
          91  +
    ),
          92  +
    ::aws_smithy_schema::ShapeType::String,
          93  +
    "member",
          94  +
    0,
          95  +
);
          96  +
static RUNBOOK_MEMBER_PARAMETERS_KEY: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          97  +
    ::aws_smithy_schema::ShapeId::from_parts(
          98  +
        "com.amazonaws.ssm#AutomationParameterMap$key",
          99  +
        "com.amazonaws.ssm",
         100  +
        "AutomationParameterMap",
         101  +
    ),
         102  +
    ::aws_smithy_schema::ShapeType::String,
         103  +
    "key",
         104  +
    0,
         105  +
);
         106  +
static RUNBOOK_MEMBER_PARAMETERS_VALUE: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
         107  +
    ::aws_smithy_schema::ShapeId::from_parts(
         108  +
        "com.amazonaws.ssm#AutomationParameterMap$value",
         109  +
        "com.amazonaws.ssm",
         110  +
        "AutomationParameterMap",
         111  +
    ),
         112  +
    ::aws_smithy_schema::ShapeType::List,
         113  +
    "value",
         114  +
    1,
         115  +
)
         116  +
.with_list_member(&RUNBOOK_MEMBER_PARAMETERS_VALUE_MEMBER);
         117  +
static RUNBOOK_MEMBER_PARAMETERS: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
         118  +
    ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#Runbook$Parameters", "com.amazonaws.ssm", "Runbook"),
         119  +
    ::aws_smithy_schema::ShapeType::Map,
         120  +
    "Parameters",
         121  +
    2,
         122  +
)
         123  +
.with_map_members(&RUNBOOK_MEMBER_PARAMETERS_KEY, &RUNBOOK_MEMBER_PARAMETERS_VALUE);
         124  +
static RUNBOOK_MEMBER_TARGET_PARAMETER_NAME: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
         125  +
    ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#Runbook$TargetParameterName", "com.amazonaws.ssm", "Runbook"),
         126  +
    ::aws_smithy_schema::ShapeType::String,
         127  +
    "TargetParameterName",
         128  +
    3,
         129  +
);
         130  +
static RUNBOOK_MEMBER_TARGETS_MEMBER: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
         131  +
    ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#Targets$member", "com.amazonaws.ssm", "Targets"),
         132  +
    ::aws_smithy_schema::ShapeType::Structure,
         133  +
    "member",
         134  +
    0,
         135  +
);
         136  +
static RUNBOOK_MEMBER_TARGETS: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
         137  +
    ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#Runbook$Targets", "com.amazonaws.ssm", "Runbook"),
         138  +
    ::aws_smithy_schema::ShapeType::List,
         139  +
    "Targets",
         140  +
    4,
         141  +
)
         142  +
.with_list_member(&RUNBOOK_MEMBER_TARGETS_MEMBER);
         143  +
static RUNBOOK_MEMBER_TARGET_MAPS_MEMBER_VALUE_MEMBER: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
         144  +
    ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#TargetMapValueList$member", "com.amazonaws.ssm", "TargetMapValueList"),
         145  +
    ::aws_smithy_schema::ShapeType::String,
         146  +
    "member",
         147  +
    0,
         148  +
);
         149  +
static RUNBOOK_MEMBER_TARGET_MAPS_MEMBER_KEY: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
         150  +
    ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#TargetMap$key", "com.amazonaws.ssm", "TargetMap"),
         151  +
    ::aws_smithy_schema::ShapeType::String,
         152  +
    "key",
         153  +
    0,
         154  +
);
         155  +
static RUNBOOK_MEMBER_TARGET_MAPS_MEMBER_VALUE: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
         156  +
    ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#TargetMap$value", "com.amazonaws.ssm", "TargetMap"),
         157  +
    ::aws_smithy_schema::ShapeType::List,
         158  +
    "value",
         159  +
    1,
         160  +
)
         161  +
.with_list_member(&RUNBOOK_MEMBER_TARGET_MAPS_MEMBER_VALUE_MEMBER);
         162  +
static RUNBOOK_MEMBER_TARGET_MAPS_MEMBER: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
         163  +
    ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#TargetMaps$member", "com.amazonaws.ssm", "TargetMaps"),
         164  +
    ::aws_smithy_schema::ShapeType::Map,
         165  +
    "member",
         166  +
    0,
         167  +
)
         168  +
.with_map_members(&RUNBOOK_MEMBER_TARGET_MAPS_MEMBER_KEY, &RUNBOOK_MEMBER_TARGET_MAPS_MEMBER_VALUE);
         169  +
static RUNBOOK_MEMBER_TARGET_MAPS: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
         170  +
    ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#Runbook$TargetMaps", "com.amazonaws.ssm", "Runbook"),
         171  +
    ::aws_smithy_schema::ShapeType::List,
         172  +
    "TargetMaps",
         173  +
    5,
         174  +
)
         175  +
.with_list_member(&RUNBOOK_MEMBER_TARGET_MAPS_MEMBER);
         176  +
static RUNBOOK_MEMBER_MAX_CONCURRENCY: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
         177  +
    ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#Runbook$MaxConcurrency", "com.amazonaws.ssm", "Runbook"),
         178  +
    ::aws_smithy_schema::ShapeType::String,
         179  +
    "MaxConcurrency",
         180  +
    6,
         181  +
);
         182  +
static RUNBOOK_MEMBER_MAX_ERRORS: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
         183  +
    ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#Runbook$MaxErrors", "com.amazonaws.ssm", "Runbook"),
         184  +
    ::aws_smithy_schema::ShapeType::String,
         185  +
    "MaxErrors",
         186  +
    7,
         187  +
);
         188  +
static RUNBOOK_MEMBER_TARGET_LOCATIONS_MEMBER: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
         189  +
    ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#TargetLocations$member", "com.amazonaws.ssm", "TargetLocations"),
         190  +
    ::aws_smithy_schema::ShapeType::Structure,
         191  +
    "member",
         192  +
    0,
         193  +
);
         194  +
static RUNBOOK_MEMBER_TARGET_LOCATIONS: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
         195  +
    ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#Runbook$TargetLocations", "com.amazonaws.ssm", "Runbook"),
         196  +
    ::aws_smithy_schema::ShapeType::List,
         197  +
    "TargetLocations",
         198  +
    8,
         199  +
)
         200  +
.with_list_member(&RUNBOOK_MEMBER_TARGET_LOCATIONS_MEMBER);
         201  +
static RUNBOOK_SCHEMA: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_struct(
         202  +
    ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#Runbook", "com.amazonaws.ssm", "Runbook"),
         203  +
    ::aws_smithy_schema::ShapeType::Structure,
         204  +
    &[
         205  +
        &RUNBOOK_MEMBER_DOCUMENT_NAME,
         206  +
        &RUNBOOK_MEMBER_DOCUMENT_VERSION,
         207  +
        &RUNBOOK_MEMBER_PARAMETERS,
         208  +
        &RUNBOOK_MEMBER_TARGET_PARAMETER_NAME,
         209  +
        &RUNBOOK_MEMBER_TARGETS,
         210  +
        &RUNBOOK_MEMBER_TARGET_MAPS,
         211  +
        &RUNBOOK_MEMBER_MAX_CONCURRENCY,
         212  +
        &RUNBOOK_MEMBER_MAX_ERRORS,
         213  +
        &RUNBOOK_MEMBER_TARGET_LOCATIONS,
         214  +
    ],
         215  +
);
         216  +
impl Runbook {
         217  +
    /// The schema for this shape.
         218  +
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema<'static> = &RUNBOOK_SCHEMA;
         219  +
}
         220  +
impl ::aws_smithy_schema::serde::SerializableStruct for Runbook {
         221  +
    #[allow(unused_variables, clippy::diverging_sub_expression)]
         222  +
    fn serialize_members(
         223  +
        &self,
         224  +
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
         225  +
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
         226  +
        {
         227  +
            let val = &self.document_name;
         228  +
            ser.write_string(&RUNBOOK_MEMBER_DOCUMENT_NAME, val)?;
         229  +
        }
         230  +
        if let Some(ref val) = self.document_version {
         231  +
            ser.write_string(&RUNBOOK_MEMBER_DOCUMENT_VERSION, val)?;
         232  +
        }
         233  +
        if let Some(ref val) = self.parameters {
         234  +
            ser.write_map(
         235  +
                &RUNBOOK_MEMBER_PARAMETERS,
         236  +
                &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
         237  +
                    for (key, value) in val {
         238  +
                        ser.write_string(&::aws_smithy_schema::prelude::STRING, key)?;
         239  +
         240  +
                        ser.write_list(
         241  +
                            &RUNBOOK_MEMBER_PARAMETERS_VALUE,
         242  +
                            &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
         243  +
                                for item in value {
         244  +
                                    ser.write_string(&aws_smithy_schema::prelude::STRING, item)?;
         245  +
                                }
         246  +
                                Ok(())
         247  +
                            },
         248  +
                        )?;
         249  +
                    }
         250  +
                    Ok(())
         251  +
                },
         252  +
            )?;
         253  +
        }
         254  +
        if let Some(ref val) = self.target_parameter_name {
         255  +
            ser.write_string(&RUNBOOK_MEMBER_TARGET_PARAMETER_NAME, val)?;
         256  +
        }
         257  +
        if let Some(ref val) = self.targets {
         258  +
            ser.write_list(&RUNBOOK_MEMBER_TARGETS, &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
         259  +
                for item in val {
         260  +
                    ser.write_struct(crate::types::Target::SCHEMA, item)?;
         261  +
                }
         262  +
                Ok(())
         263  +
            })?;
         264  +
        }
         265  +
        if let Some(ref val) = self.target_maps {
         266  +
            ser.write_list(
         267  +
                &RUNBOOK_MEMBER_TARGET_MAPS,
         268  +
                &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
         269  +
                    for item in val {
         270  +
                        ser.write_map(
         271  +
                            &RUNBOOK_MEMBER_TARGET_MAPS_MEMBER,
         272  +
                            &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
         273  +
                                for (key, value) in item {
         274  +
                                    ser.write_string(&::aws_smithy_schema::prelude::STRING, key)?;
         275  +
         276  +
                                    ser.write_list(
         277  +
                                        &RUNBOOK_MEMBER_TARGET_MAPS_MEMBER_VALUE,
         278  +
                                        &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
         279  +
                                            for item in value {
         280  +
                                                ser.write_string(&aws_smithy_schema::prelude::STRING, item)?;
         281  +
                                            }
         282  +
                                            Ok(())
         283  +
                                        },
         284  +
                                    )?;
         285  +
                                }
         286  +
                                Ok(())
         287  +
                            },
         288  +
                        )?;
         289  +
                    }
         290  +
                    Ok(())
         291  +
                },
         292  +
            )?;
         293  +
        }
         294  +
        if let Some(ref val) = self.max_concurrency {
         295  +
            ser.write_string(&RUNBOOK_MEMBER_MAX_CONCURRENCY, val)?;
         296  +
        }
         297  +
        if let Some(ref val) = self.max_errors {
         298  +
            ser.write_string(&RUNBOOK_MEMBER_MAX_ERRORS, val)?;
         299  +
        }
         300  +
        if let Some(ref val) = self.target_locations {
         301  +
            ser.write_list(
         302  +
                &RUNBOOK_MEMBER_TARGET_LOCATIONS,
         303  +
                &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
         304  +
                    for item in val {
         305  +
                        ser.write_struct(crate::types::TargetLocation::SCHEMA, item)?;
         306  +
                    }
         307  +
                    Ok(())
         308  +
                },
         309  +
            )?;
         310  +
        }
         311  +
        Ok(())
         312  +
    }
         313  +
}
         314  +
impl Runbook {
         315  +
    /// Deserializes this structure from a [`ShapeDeserializer`].
         316  +
    pub fn deserialize(
         317  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         318  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         319  +
        #[allow(unused_variables, unused_mut)]
         320  +
        let mut builder = Self::builder();
         321  +
        #[allow(
         322  +
            unused_variables,
         323  +
            unreachable_code,
         324  +
            clippy::single_match,
         325  +
            clippy::match_single_binding,
         326  +
            clippy::diverging_sub_expression
         327  +
        )]
         328  +
        deserializer.read_struct(&RUNBOOK_SCHEMA, &mut |member, deser| {
         329  +
            match member.member_index() {
         330  +
                Some(0) => {
         331  +
                    builder.document_name = Some(deser.read_string(member)?);
         332  +
                }
         333  +
                Some(1) => {
         334  +
                    if deser.is_null() {
         335  +
                        deser.read_null()?;
         336  +
                    } else {
         337  +
                        builder.document_version = Some(deser.read_string(member)?);
         338  +
                    }
         339  +
                }
         340  +
                Some(2) => {
         341  +
                    if deser.is_null() {
         342  +
                        deser.read_null()?;
         343  +
                    } else {
         344  +
                        builder.parameters = Some({
         345  +
                            let mut container = std::collections::HashMap::new();
         346  +
                            deser.read_map(member, &mut |key, deser| {
         347  +
                                container.insert(key, {
         348  +
                                    let mut list = Vec::new();
         349  +
                                    deser.read_list(&RUNBOOK_MEMBER_PARAMETERS_VALUE, &mut |deser| {
         350  +
                                        list.push(deser.read_string(&::aws_smithy_schema::prelude::STRING)?);
         351  +
                                        Ok(())
         352  +
                                    })?;
         353  +
                                    list
         354  +
                                });
         355  +
                                Ok(())
         356  +
                            })?;
         357  +
                            container
         358  +
                        });
         359  +
                    }
         360  +
                }
         361  +
                Some(3) => {
         362  +
                    if deser.is_null() {
         363  +
                        deser.read_null()?;
         364  +
                    } else {
         365  +
                        builder.target_parameter_name = Some(deser.read_string(member)?);
         366  +
                    }
         367  +
                }
         368  +
                Some(4) => {
         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(5) => {
         383  +
                    if deser.is_null() {
         384  +
                        deser.read_null()?;
         385  +
                    } else {
         386  +
                        builder.target_maps = Some({
         387  +
                            let mut container = Vec::new();
         388  +
                            deser.read_list(member, &mut |deser| {
         389  +
                                container.push({
         390  +
                                    let mut map = ::std::collections::HashMap::new();
         391  +
                                    deser.read_map(&RUNBOOK_MEMBER_TARGET_MAPS_MEMBER, &mut |key, deser| {
         392  +
                                        let value = {
         393  +
                                            let mut list = Vec::new();
         394  +
                                            deser.read_list(&RUNBOOK_MEMBER_TARGET_MAPS_MEMBER_VALUE, &mut |deser| {
         395  +
                                                list.push(deser.read_string(&::aws_smithy_schema::prelude::STRING)?);
         396  +
                                                Ok(())
         397  +
                                            })?;
         398  +
                                            list
         399  +
                                        };
         400  +
                                        map.insert(key, value);
         401  +
                                        Ok(())
         402  +
                                    })?;
         403  +
                                    map
         404  +
                                });
         405  +
                                Ok(())
         406  +
                            })?;
         407  +
                            container
         408  +
                        });
         409  +
                    }
         410  +
                }
         411  +
                Some(6) => {
         412  +
                    if deser.is_null() {
         413  +
                        deser.read_null()?;
         414  +
                    } else {
         415  +
                        builder.max_concurrency = Some(deser.read_string(member)?);
         416  +
                    }
         417  +
                }
         418  +
                Some(7) => {
         419  +
                    if deser.is_null() {
         420  +
                        deser.read_null()?;
         421  +
                    } else {
         422  +
                        builder.max_errors = Some(deser.read_string(member)?);
         423  +
                    }
         424  +
                }
         425  +
                Some(8) => {
         426  +
                    if deser.is_null() {
         427  +
                        deser.read_null()?;
         428  +
                    } else {
         429  +
                        builder.target_locations = Some({
         430  +
                            let mut container = Vec::new();
         431  +
                            deser.read_list(member, &mut |deser| {
         432  +
                                container.push(crate::types::TargetLocation::deserialize(deser)?);
         433  +
                                Ok(())
         434  +
                            })?;
         435  +
                            container
         436  +
                        });
         437  +
                    }
         438  +
                }
         439  +
                _ => {}
         440  +
            }
         441  +
            Ok(())
         442  +
        })?;
         443  +
        builder.document_name = builder.document_name.or(Some(String::new()));
         444  +
        builder.build().map_err(|e| aws_smithy_schema::serde::SerdeError::custom(e.to_string()))
         445  +
    }
         446  +
}
         447  +
impl Runbook {
         448  +
    /// Deserializes this structure from a body deserializer and HTTP response.
         449  +
    pub fn deserialize_with_response(
         450  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         451  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
         452  +
        _status: u16,
         453  +
        _body: &[u8],
         454  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         455  +
        Self::deserialize(deserializer)
         456  +
    }
         457  +
}
         458  +
impl Runbook {
         459  +
    /// Creates a new builder-style object to manufacture [`Runbook`](crate::types::Runbook).
         460  +
    pub fn builder() -> crate::types::builders::RunbookBuilder {
         461  +
        crate::types::builders::RunbookBuilder::default()
         462  +
    }
         463  +
}
         464  +
         465  +
/// A builder for [`Runbook`](crate::types::Runbook).
         466  +
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
         467  +
#[non_exhaustive]
         468  +
pub struct RunbookBuilder {
         469  +
    pub(crate) document_name: ::std::option::Option<::std::string::String>,
         470  +
    pub(crate) document_version: ::std::option::Option<::std::string::String>,
         471  +
    pub(crate) parameters: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::vec::Vec<::std::string::String>>>,
         472  +
    pub(crate) target_parameter_name: ::std::option::Option<::std::string::String>,
         473  +
    pub(crate) targets: ::std::option::Option<::std::vec::Vec<crate::types::Target>>,
         474  +
    pub(crate) target_maps:
         475  +
        ::std::option::Option<::std::vec::Vec<::std::collections::HashMap<::std::string::String, ::std::vec::Vec<::std::string::String>>>>,
         476  +
    pub(crate) max_concurrency: ::std::option::Option<::std::string::String>,
         477  +
    pub(crate) max_errors: ::std::option::Option<::std::string::String>,
         478  +
    pub(crate) target_locations: ::std::option::Option<::std::vec::Vec<crate::types::TargetLocation>>,
         479  +
}
         480  +
impl RunbookBuilder {
         481  +
    /// <p>The name of the Automation runbook used in a runbook workflow.</p>
         482  +
    /// This field is required.
         483  +
    pub fn document_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         484  +
        self.document_name = ::std::option::Option::Some(input.into());
         485  +
        self
         486  +
    }
         487  +
    /// <p>The name of the Automation runbook used in a runbook workflow.</p>
         488  +
    pub fn set_document_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         489  +
        self.document_name = input;
         490  +
        self
         491  +
    }
         492  +
    /// <p>The name of the Automation runbook used in a runbook workflow.</p>
         493  +
    pub fn get_document_name(&self) -> &::std::option::Option<::std::string::String> {
         494  +
        &self.document_name
         495  +
    }
         496  +
    /// <p>The version of the Automation runbook used in a runbook workflow.</p>
         497  +
    pub fn document_version(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         498  +
        self.document_version = ::std::option::Option::Some(input.into());
         499  +
        self
         500  +
    }
         501  +
    /// <p>The version of the Automation runbook used in a runbook workflow.</p>
         502  +
    pub fn set_document_version(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         503  +
        self.document_version = input;
         504  +
        self
         505  +
    }
         506  +
    /// <p>The version of the Automation runbook used in a runbook workflow.</p>
         507  +
    pub fn get_document_version(&self) -> &::std::option::Option<::std::string::String> {
         508  +
        &self.document_version
         509  +
    }
         510  +
    /// Adds a key-value pair to `parameters`.
         511  +
    ///
         512  +
    /// To override the contents of this collection use [`set_parameters`](Self::set_parameters).
         513  +
    ///
         514  +
    /// <p>The key-value map of execution parameters, which were supplied when calling <code>StartChangeRequestExecution</code>.</p>
         515  +
    pub fn parameters(mut self, k: impl ::std::convert::Into<::std::string::String>, v: ::std::vec::Vec<::std::string::String>) -> Self {
         516  +
        let mut hash_map = self.parameters.unwrap_or_default();
         517  +
        hash_map.insert(k.into(), v);
         518  +
        self.parameters = ::std::option::Option::Some(hash_map);
         519  +
        self
         520  +
    }
         521  +
    /// <p>The key-value map of execution parameters, which were supplied when calling <code>StartChangeRequestExecution</code>.</p>
         522  +
    pub fn set_parameters(
         523  +
        mut self,
         524  +
        input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::vec::Vec<::std::string::String>>>,
         525  +
    ) -> Self {
         526  +
        self.parameters = input;
         527  +
        self
         528  +
    }
         529  +
    /// <p>The key-value map of execution parameters, which were supplied when calling <code>StartChangeRequestExecution</code>.</p>
         530  +
    pub fn get_parameters(
         531  +
        &self,
         532  +
    ) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::vec::Vec<::std::string::String>>> {
         533  +
        &self.parameters
         534  +
    }
         535  +
    /// <p>The name of the parameter used as the target resource for the rate-controlled runbook workflow. Required if you specify <code>Targets</code>.</p>
         536  +
    pub fn target_parameter_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         537  +
        self.target_parameter_name = ::std::option::Option::Some(input.into());
         538  +
        self
         539  +
    }
         540  +
    /// <p>The name of the parameter used as the target resource for the rate-controlled runbook workflow. Required if you specify <code>Targets</code>.</p>
         541  +
    pub fn set_target_parameter_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         542  +
        self.target_parameter_name = input;
         543  +
        self
         544  +
    }
         545  +
    /// <p>The name of the parameter used as the target resource for the rate-controlled runbook workflow. Required if you specify <code>Targets</code>.</p>
         546  +
    pub fn get_target_parameter_name(&self) -> &::std::option::Option<::std::string::String> {
         547  +
        &self.target_parameter_name
         548  +
    }
         549  +
    /// Appends an item to `targets`.
         550  +
    ///
         551  +
    /// To override the contents of this collection use [`set_targets`](Self::set_targets).
         552  +
    ///
         553  +
    /// <p>A key-value mapping to target resources that the runbook operation performs tasks on. Required if you specify <code>TargetParameterName</code>.</p>
         554  +
    pub fn targets(mut self, input: crate::types::Target) -> Self {
         555  +
        let mut v = self.targets.unwrap_or_default();
         556  +
        v.push(input);
         557  +
        self.targets = ::std::option::Option::Some(v);
         558  +
        self
         559  +
    }
         560  +
    /// <p>A key-value mapping to target resources that the runbook operation performs tasks on. Required if you specify <code>TargetParameterName</code>.</p>
         561  +
    pub fn set_targets(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Target>>) -> Self {
         562  +
        self.targets = input;
         563  +
        self
         564  +
    }
         565  +
    /// <p>A key-value mapping to target resources that the runbook operation performs tasks on. Required if you specify <code>TargetParameterName</code>.</p>
         566  +
    pub fn get_targets(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Target>> {
         567  +
        &self.targets
         568  +
    }
         569  +
    /// Appends an item to `target_maps`.
         570  +
    ///
         571  +
    /// To override the contents of this collection use [`set_target_maps`](Self::set_target_maps).
         572  +
    ///
         573  +
    /// <p>A key-value mapping of runbook parameters to target resources. Both Targets and TargetMaps can't be specified together.</p>
         574  +
    pub fn target_maps(mut self, input: ::std::collections::HashMap<::std::string::String, ::std::vec::Vec<::std::string::String>>) -> Self {
         575  +
        let mut v = self.target_maps.unwrap_or_default();
         576  +
        v.push(input);
         577  +
        self.target_maps = ::std::option::Option::Some(v);
         578  +
        self
         579  +
    }
         580  +
    /// <p>A key-value mapping of runbook parameters to target resources. Both Targets and TargetMaps can't be specified together.</p>
         581  +
    pub fn set_target_maps(
         582  +
        mut self,
         583  +
        input: ::std::option::Option<::std::vec::Vec<::std::collections::HashMap<::std::string::String, ::std::vec::Vec<::std::string::String>>>>,
         584  +
    ) -> Self {
         585  +
        self.target_maps = input;
         586  +
        self
         587  +
    }
         588  +
    /// <p>A key-value mapping of runbook parameters to target resources. Both Targets and TargetMaps can't be specified together.</p>
         589  +
    pub fn get_target_maps(
         590  +
        &self,
         591  +
    ) -> &::std::option::Option<::std::vec::Vec<::std::collections::HashMap<::std::string::String, ::std::vec::Vec<::std::string::String>>>> {
         592  +
        &self.target_maps
         593  +
    }
         594  +
    /// <p>The <code>MaxConcurrency</code> value specified by the user when the operation started, indicating the maximum number of resources that the runbook operation can run on at the same time.</p>
         595  +
    pub fn max_concurrency(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         596  +
        self.max_concurrency = ::std::option::Option::Some(input.into());
         597  +
        self
         598  +
    }
         599  +
    /// <p>The <code>MaxConcurrency</code> value specified by the user when the operation started, indicating the maximum number of resources that the runbook operation can run on at the same time.</p>
         600  +
    pub fn set_max_concurrency(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         601  +
        self.max_concurrency = input;
         602  +
        self
         603  +
    }
         604  +
    /// <p>The <code>MaxConcurrency</code> value specified by the user when the operation started, indicating the maximum number of resources that the runbook operation can run on at the same time.</p>
         605  +
    pub fn get_max_concurrency(&self) -> &::std::option::Option<::std::string::String> {
         606  +
        &self.max_concurrency
         607  +
    }
         608  +
    /// <p>The <code>MaxErrors</code> value specified by the user when the execution started, indicating the maximum number of errors that can occur during the operation before the updates are stopped or rolled back.</p>
         609  +
    pub fn max_errors(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         610  +
        self.max_errors = ::std::option::Option::Some(input.into());
         611  +
        self
         612  +
    }
         613  +
    /// <p>The <code>MaxErrors</code> value specified by the user when the execution started, indicating the maximum number of errors that can occur during the operation before the updates are stopped or rolled back.</p>
         614  +
    pub fn set_max_errors(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         615  +
        self.max_errors = input;
         616  +
        self
         617  +
    }
         618  +
    /// <p>The <code>MaxErrors</code> value specified by the user when the execution started, indicating the maximum number of errors that can occur during the operation before the updates are stopped or rolled back.</p>
         619  +
    pub fn get_max_errors(&self) -> &::std::option::Option<::std::string::String> {
         620  +
        &self.max_errors
         621  +
    }
         622  +
    /// Appends an item to `target_locations`.
         623  +
    ///
         624  +
    /// To override the contents of this collection use [`set_target_locations`](Self::set_target_locations).
         625  +
    ///
         626  +
    /// <p>Information about the Amazon Web Services Regions and Amazon Web Services accounts targeted by the current Runbook operation.</p>
         627  +
    pub fn target_locations(mut self, input: crate::types::TargetLocation) -> Self {
         628  +
        let mut v = self.target_locations.unwrap_or_default();
         629  +
        v.push(input);
         630  +
        self.target_locations = ::std::option::Option::Some(v);
         631  +
        self
         632  +
    }
         633  +
    /// <p>Information about the Amazon Web Services Regions and Amazon Web Services accounts targeted by the current Runbook operation.</p>
         634  +
    pub fn set_target_locations(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::TargetLocation>>) -> Self {
         635  +
        self.target_locations = input;
         636  +
        self
         637  +
    }
         638  +
    /// <p>Information about the Amazon Web Services Regions and Amazon Web Services accounts targeted by the current Runbook operation.</p>
         639  +
    pub fn get_target_locations(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::TargetLocation>> {
         640  +
        &self.target_locations
         641  +
    }
         642  +
    /// Consumes the builder and constructs a [`Runbook`](crate::types::Runbook).
         643  +
    /// This method will fail if any of the following fields are not set:
         644  +
    /// - [`document_name`](crate::types::builders::RunbookBuilder::document_name)
         645  +
    pub fn build(self) -> ::std::result::Result<crate::types::Runbook, ::aws_smithy_types::error::operation::BuildError> {
         646  +
        ::std::result::Result::Ok(crate::types::Runbook {
         647  +
            document_name: self.document_name.ok_or_else(|| {
         648  +
                ::aws_smithy_types::error::operation::BuildError::missing_field(
         649  +
                    "document_name",
         650  +
                    "document_name was not specified but it is required when building Runbook",
         651  +
                )
         652  +
            })?,
         653  +
            document_version: self.document_version,
         654  +
            parameters: self.parameters,
         655  +
            target_parameter_name: self.target_parameter_name,
         656  +
            targets: self.targets,
         657  +
            target_maps: self.target_maps,
         658  +
            max_concurrency: self.max_concurrency,
         659  +
            max_errors: self.max_errors,
         660  +
            target_locations: self.target_locations,
         661  +
        })
         662  +
    }
         663  +
}