AWS SDK

AWS SDK

rev. 97ba95e6039d206ffea5b866ddc214d34f7f88c3 (ignoring whitespace)

Files changed:

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

@@ -0,1 +0,198 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
           3  +
/// <p>Information about the approval status of a patch.</p>
           4  +
#[non_exhaustive]
           5  +
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
           6  +
pub struct PatchStatus {
           7  +
    /// <p>The approval status of a patch.</p>
           8  +
    pub deployment_status: ::std::option::Option<crate::types::PatchDeploymentStatus>,
           9  +
    /// <p>The compliance severity level for a patch.</p>
          10  +
    pub compliance_level: ::std::option::Option<crate::types::PatchComplianceLevel>,
          11  +
    /// <p>The date the patch was approved (or will be approved if the status is <code>PENDING_APPROVAL</code>).</p>
          12  +
    pub approval_date: ::std::option::Option<::aws_smithy_types::DateTime>,
          13  +
}
          14  +
impl PatchStatus {
          15  +
    /// <p>The approval status of a patch.</p>
          16  +
    pub fn deployment_status(&self) -> ::std::option::Option<&crate::types::PatchDeploymentStatus> {
          17  +
        self.deployment_status.as_ref()
          18  +
    }
          19  +
    /// <p>The compliance severity level for a patch.</p>
          20  +
    pub fn compliance_level(&self) -> ::std::option::Option<&crate::types::PatchComplianceLevel> {
          21  +
        self.compliance_level.as_ref()
          22  +
    }
          23  +
    /// <p>The date the patch was approved (or will be approved if the status is <code>PENDING_APPROVAL</code>).</p>
          24  +
    pub fn approval_date(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
          25  +
        self.approval_date.as_ref()
          26  +
    }
          27  +
}
          28  +
static PATCHSTATUS_MEMBER_DEPLOYMENT_STATUS: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          29  +
    ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#PatchStatus$DeploymentStatus", "com.amazonaws.ssm", "PatchStatus"),
          30  +
    ::aws_smithy_schema::ShapeType::String,
          31  +
    "DeploymentStatus",
          32  +
    0,
          33  +
);
          34  +
static PATCHSTATUS_MEMBER_COMPLIANCE_LEVEL: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          35  +
    ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#PatchStatus$ComplianceLevel", "com.amazonaws.ssm", "PatchStatus"),
          36  +
    ::aws_smithy_schema::ShapeType::String,
          37  +
    "ComplianceLevel",
          38  +
    1,
          39  +
);
          40  +
static PATCHSTATUS_MEMBER_APPROVAL_DATE: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          41  +
    ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#PatchStatus$ApprovalDate", "com.amazonaws.ssm", "PatchStatus"),
          42  +
    ::aws_smithy_schema::ShapeType::Timestamp,
          43  +
    "ApprovalDate",
          44  +
    2,
          45  +
);
          46  +
static PATCHSTATUS_SCHEMA: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_struct(
          47  +
    ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#PatchStatus", "com.amazonaws.ssm", "PatchStatus"),
          48  +
    ::aws_smithy_schema::ShapeType::Structure,
          49  +
    &[
          50  +
        &PATCHSTATUS_MEMBER_DEPLOYMENT_STATUS,
          51  +
        &PATCHSTATUS_MEMBER_COMPLIANCE_LEVEL,
          52  +
        &PATCHSTATUS_MEMBER_APPROVAL_DATE,
          53  +
    ],
          54  +
);
          55  +
impl PatchStatus {
          56  +
    /// The schema for this shape.
          57  +
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema<'static> = &PATCHSTATUS_SCHEMA;
          58  +
}
          59  +
impl ::aws_smithy_schema::serde::SerializableStruct for PatchStatus {
          60  +
    #[allow(unused_variables, clippy::diverging_sub_expression)]
          61  +
    fn serialize_members(
          62  +
        &self,
          63  +
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
          64  +
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
          65  +
        if let Some(ref val) = self.deployment_status {
          66  +
            ser.write_string(&PATCHSTATUS_MEMBER_DEPLOYMENT_STATUS, val.as_str())?;
          67  +
        }
          68  +
        if let Some(ref val) = self.compliance_level {
          69  +
            ser.write_string(&PATCHSTATUS_MEMBER_COMPLIANCE_LEVEL, val.as_str())?;
          70  +
        }
          71  +
        if let Some(ref val) = self.approval_date {
          72  +
            ser.write_timestamp(&PATCHSTATUS_MEMBER_APPROVAL_DATE, val)?;
          73  +
        }
          74  +
        Ok(())
          75  +
    }
          76  +
}
          77  +
impl PatchStatus {
          78  +
    /// Deserializes this structure from a [`ShapeDeserializer`].
          79  +
    pub fn deserialize(
          80  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
          81  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
          82  +
        #[allow(unused_variables, unused_mut)]
          83  +
        let mut builder = Self::builder();
          84  +
        #[allow(
          85  +
            unused_variables,
          86  +
            unreachable_code,
          87  +
            clippy::single_match,
          88  +
            clippy::match_single_binding,
          89  +
            clippy::diverging_sub_expression
          90  +
        )]
          91  +
        deserializer.read_struct(&PATCHSTATUS_SCHEMA, &mut |member, deser| {
          92  +
            match member.member_index() {
          93  +
                Some(0) => {
          94  +
                    if deser.is_null() {
          95  +
                        deser.read_null()?;
          96  +
                    } else {
          97  +
                        builder.deployment_status = Some(crate::types::PatchDeploymentStatus::from(deser.read_string(member)?.as_str()));
          98  +
                    }
          99  +
                }
         100  +
                Some(1) => {
         101  +
                    if deser.is_null() {
         102  +
                        deser.read_null()?;
         103  +
                    } else {
         104  +
                        builder.compliance_level = Some(crate::types::PatchComplianceLevel::from(deser.read_string(member)?.as_str()));
         105  +
                    }
         106  +
                }
         107  +
                Some(2) => {
         108  +
                    if deser.is_null() {
         109  +
                        deser.read_null()?;
         110  +
                    } else {
         111  +
                        builder.approval_date = Some(deser.read_timestamp(member)?);
         112  +
                    }
         113  +
                }
         114  +
                _ => {}
         115  +
            }
         116  +
            Ok(())
         117  +
        })?;
         118  +
        Ok(builder.build())
         119  +
    }
         120  +
}
         121  +
impl PatchStatus {
         122  +
    /// Deserializes this structure from a body deserializer and HTTP response.
         123  +
    pub fn deserialize_with_response(
         124  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         125  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
         126  +
        _status: u16,
         127  +
        _body: &[u8],
         128  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         129  +
        Self::deserialize(deserializer)
         130  +
    }
         131  +
}
         132  +
impl PatchStatus {
         133  +
    /// Creates a new builder-style object to manufacture [`PatchStatus`](crate::types::PatchStatus).
         134  +
    pub fn builder() -> crate::types::builders::PatchStatusBuilder {
         135  +
        crate::types::builders::PatchStatusBuilder::default()
         136  +
    }
         137  +
}
         138  +
         139  +
/// A builder for [`PatchStatus`](crate::types::PatchStatus).
         140  +
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
         141  +
#[non_exhaustive]
         142  +
pub struct PatchStatusBuilder {
         143  +
    pub(crate) deployment_status: ::std::option::Option<crate::types::PatchDeploymentStatus>,
         144  +
    pub(crate) compliance_level: ::std::option::Option<crate::types::PatchComplianceLevel>,
         145  +
    pub(crate) approval_date: ::std::option::Option<::aws_smithy_types::DateTime>,
         146  +
}
         147  +
impl PatchStatusBuilder {
         148  +
    /// <p>The approval status of a patch.</p>
         149  +
    pub fn deployment_status(mut self, input: crate::types::PatchDeploymentStatus) -> Self {
         150  +
        self.deployment_status = ::std::option::Option::Some(input);
         151  +
        self
         152  +
    }
         153  +
    /// <p>The approval status of a patch.</p>
         154  +
    pub fn set_deployment_status(mut self, input: ::std::option::Option<crate::types::PatchDeploymentStatus>) -> Self {
         155  +
        self.deployment_status = input;
         156  +
        self
         157  +
    }
         158  +
    /// <p>The approval status of a patch.</p>
         159  +
    pub fn get_deployment_status(&self) -> &::std::option::Option<crate::types::PatchDeploymentStatus> {
         160  +
        &self.deployment_status
         161  +
    }
         162  +
    /// <p>The compliance severity level for a patch.</p>
         163  +
    pub fn compliance_level(mut self, input: crate::types::PatchComplianceLevel) -> Self {
         164  +
        self.compliance_level = ::std::option::Option::Some(input);
         165  +
        self
         166  +
    }
         167  +
    /// <p>The compliance severity level for a patch.</p>
         168  +
    pub fn set_compliance_level(mut self, input: ::std::option::Option<crate::types::PatchComplianceLevel>) -> Self {
         169  +
        self.compliance_level = input;
         170  +
        self
         171  +
    }
         172  +
    /// <p>The compliance severity level for a patch.</p>
         173  +
    pub fn get_compliance_level(&self) -> &::std::option::Option<crate::types::PatchComplianceLevel> {
         174  +
        &self.compliance_level
         175  +
    }
         176  +
    /// <p>The date the patch was approved (or will be approved if the status is <code>PENDING_APPROVAL</code>).</p>
         177  +
    pub fn approval_date(mut self, input: ::aws_smithy_types::DateTime) -> Self {
         178  +
        self.approval_date = ::std::option::Option::Some(input);
         179  +
        self
         180  +
    }
         181  +
    /// <p>The date the patch was approved (or will be approved if the status is <code>PENDING_APPROVAL</code>).</p>
         182  +
    pub fn set_approval_date(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
         183  +
        self.approval_date = input;
         184  +
        self
         185  +
    }
         186  +
    /// <p>The date the patch was approved (or will be approved if the status is <code>PENDING_APPROVAL</code>).</p>
         187  +
    pub fn get_approval_date(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
         188  +
        &self.approval_date
         189  +
    }
         190  +
    /// Consumes the builder and constructs a [`PatchStatus`](crate::types::PatchStatus).
         191  +
    pub fn build(self) -> crate::types::PatchStatus {
         192  +
        crate::types::PatchStatus {
         193  +
            deployment_status: self.deployment_status,
         194  +
            compliance_level: self.compliance_level,
         195  +
            approval_date: self.approval_date,
         196  +
        }
         197  +
    }
         198  +
}

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

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

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

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

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

@@ -0,1 +0,269 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
           3  +
/// <p>An aggregate of step execution statuses displayed in the Amazon Web Services Systems Manager console for a multi-Region and multi-account Automation execution.</p>
           4  +
#[non_exhaustive]
           5  +
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
           6  +
pub struct ProgressCounters {
           7  +
    /// <p>The total number of steps run in all specified Amazon Web Services Regions and Amazon Web Services accounts for the current Automation execution.</p>
           8  +
    pub total_steps: i32,
           9  +
    /// <p>The total number of steps that successfully completed in all specified Amazon Web Services Regions and Amazon Web Services accounts for the current Automation execution.</p>
          10  +
    pub success_steps: i32,
          11  +
    /// <p>The total number of steps that failed to run in all specified Amazon Web Services Regions and Amazon Web Services accounts for the current Automation execution.</p>
          12  +
    pub failed_steps: i32,
          13  +
    /// <p>The total number of steps that the system cancelled in all specified Amazon Web Services Regions and Amazon Web Services accounts for the current Automation execution.</p>
          14  +
    pub cancelled_steps: i32,
          15  +
    /// <p>The total number of steps that timed out in all specified Amazon Web Services Regions and Amazon Web Services accounts for the current Automation execution.</p>
          16  +
    pub timed_out_steps: i32,
          17  +
}
          18  +
impl ProgressCounters {
          19  +
    /// <p>The total number of steps run in all specified Amazon Web Services Regions and Amazon Web Services accounts for the current Automation execution.</p>
          20  +
    pub fn total_steps(&self) -> i32 {
          21  +
        self.total_steps
          22  +
    }
          23  +
    /// <p>The total number of steps that successfully completed in all specified Amazon Web Services Regions and Amazon Web Services accounts for the current Automation execution.</p>
          24  +
    pub fn success_steps(&self) -> i32 {
          25  +
        self.success_steps
          26  +
    }
          27  +
    /// <p>The total number of steps that failed to run in all specified Amazon Web Services Regions and Amazon Web Services accounts for the current Automation execution.</p>
          28  +
    pub fn failed_steps(&self) -> i32 {
          29  +
        self.failed_steps
          30  +
    }
          31  +
    /// <p>The total number of steps that the system cancelled in all specified Amazon Web Services Regions and Amazon Web Services accounts for the current Automation execution.</p>
          32  +
    pub fn cancelled_steps(&self) -> i32 {
          33  +
        self.cancelled_steps
          34  +
    }
          35  +
    /// <p>The total number of steps that timed out in all specified Amazon Web Services Regions and Amazon Web Services accounts for the current Automation execution.</p>
          36  +
    pub fn timed_out_steps(&self) -> i32 {
          37  +
        self.timed_out_steps
          38  +
    }
          39  +
}
          40  +
static PROGRESSCOUNTERS_MEMBER_TOTAL_STEPS: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          41  +
    ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#ProgressCounters$TotalSteps", "com.amazonaws.ssm", "ProgressCounters"),
          42  +
    ::aws_smithy_schema::ShapeType::Integer,
          43  +
    "TotalSteps",
          44  +
    0,
          45  +
);
          46  +
static PROGRESSCOUNTERS_MEMBER_SUCCESS_STEPS: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          47  +
    ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#ProgressCounters$SuccessSteps", "com.amazonaws.ssm", "ProgressCounters"),
          48  +
    ::aws_smithy_schema::ShapeType::Integer,
          49  +
    "SuccessSteps",
          50  +
    1,
          51  +
);
          52  +
static PROGRESSCOUNTERS_MEMBER_FAILED_STEPS: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          53  +
    ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#ProgressCounters$FailedSteps", "com.amazonaws.ssm", "ProgressCounters"),
          54  +
    ::aws_smithy_schema::ShapeType::Integer,
          55  +
    "FailedSteps",
          56  +
    2,
          57  +
);
          58  +
static PROGRESSCOUNTERS_MEMBER_CANCELLED_STEPS: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          59  +
    ::aws_smithy_schema::ShapeId::from_parts(
          60  +
        "com.amazonaws.ssm#ProgressCounters$CancelledSteps",
          61  +
        "com.amazonaws.ssm",
          62  +
        "ProgressCounters",
          63  +
    ),
          64  +
    ::aws_smithy_schema::ShapeType::Integer,
          65  +
    "CancelledSteps",
          66  +
    3,
          67  +
);
          68  +
static PROGRESSCOUNTERS_MEMBER_TIMED_OUT_STEPS: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          69  +
    ::aws_smithy_schema::ShapeId::from_parts(
          70  +
        "com.amazonaws.ssm#ProgressCounters$TimedOutSteps",
          71  +
        "com.amazonaws.ssm",
          72  +
        "ProgressCounters",
          73  +
    ),
          74  +
    ::aws_smithy_schema::ShapeType::Integer,
          75  +
    "TimedOutSteps",
          76  +
    4,
          77  +
);
          78  +
static PROGRESSCOUNTERS_SCHEMA: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_struct(
          79  +
    ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#ProgressCounters", "com.amazonaws.ssm", "ProgressCounters"),
          80  +
    ::aws_smithy_schema::ShapeType::Structure,
          81  +
    &[
          82  +
        &PROGRESSCOUNTERS_MEMBER_TOTAL_STEPS,
          83  +
        &PROGRESSCOUNTERS_MEMBER_SUCCESS_STEPS,
          84  +
        &PROGRESSCOUNTERS_MEMBER_FAILED_STEPS,
          85  +
        &PROGRESSCOUNTERS_MEMBER_CANCELLED_STEPS,
          86  +
        &PROGRESSCOUNTERS_MEMBER_TIMED_OUT_STEPS,
          87  +
    ],
          88  +
);
          89  +
impl ProgressCounters {
          90  +
    /// The schema for this shape.
          91  +
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema<'static> = &PROGRESSCOUNTERS_SCHEMA;
          92  +
}
          93  +
impl ::aws_smithy_schema::serde::SerializableStruct for ProgressCounters {
          94  +
    #[allow(unused_variables, clippy::diverging_sub_expression)]
          95  +
    fn serialize_members(
          96  +
        &self,
          97  +
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
          98  +
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
          99  +
        {
         100  +
            let val = &self.total_steps;
         101  +
            ser.write_integer(&PROGRESSCOUNTERS_MEMBER_TOTAL_STEPS, *val)?;
         102  +
        }
         103  +
        {
         104  +
            let val = &self.success_steps;
         105  +
            ser.write_integer(&PROGRESSCOUNTERS_MEMBER_SUCCESS_STEPS, *val)?;
         106  +
        }
         107  +
        {
         108  +
            let val = &self.failed_steps;
         109  +
            ser.write_integer(&PROGRESSCOUNTERS_MEMBER_FAILED_STEPS, *val)?;
         110  +
        }
         111  +
        {
         112  +
            let val = &self.cancelled_steps;
         113  +
            ser.write_integer(&PROGRESSCOUNTERS_MEMBER_CANCELLED_STEPS, *val)?;
         114  +
        }
         115  +
        {
         116  +
            let val = &self.timed_out_steps;
         117  +
            ser.write_integer(&PROGRESSCOUNTERS_MEMBER_TIMED_OUT_STEPS, *val)?;
         118  +
        }
         119  +
        Ok(())
         120  +
    }
         121  +
}
         122  +
impl ProgressCounters {
         123  +
    /// Deserializes this structure from a [`ShapeDeserializer`].
         124  +
    pub fn deserialize(
         125  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         126  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         127  +
        #[allow(unused_variables, unused_mut)]
         128  +
        let mut builder = Self::builder();
         129  +
        #[allow(
         130  +
            unused_variables,
         131  +
            unreachable_code,
         132  +
            clippy::single_match,
         133  +
            clippy::match_single_binding,
         134  +
            clippy::diverging_sub_expression
         135  +
        )]
         136  +
        deserializer.read_struct(&PROGRESSCOUNTERS_SCHEMA, &mut |member, deser| {
         137  +
            match member.member_index() {
         138  +
                Some(0) => {
         139  +
                    builder.total_steps = Some(deser.read_integer(member)?);
         140  +
                }
         141  +
                Some(1) => {
         142  +
                    builder.success_steps = Some(deser.read_integer(member)?);
         143  +
                }
         144  +
                Some(2) => {
         145  +
                    builder.failed_steps = Some(deser.read_integer(member)?);
         146  +
                }
         147  +
                Some(3) => {
         148  +
                    builder.cancelled_steps = Some(deser.read_integer(member)?);
         149  +
                }
         150  +
                Some(4) => {
         151  +
                    builder.timed_out_steps = Some(deser.read_integer(member)?);
         152  +
                }
         153  +
                _ => {}
         154  +
            }
         155  +
            Ok(())
         156  +
        })?;
         157  +
        Ok(builder.build())
         158  +
    }
         159  +
}
         160  +
impl ProgressCounters {
         161  +
    /// Deserializes this structure from a body deserializer and HTTP response.
         162  +
    pub fn deserialize_with_response(
         163  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         164  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
         165  +
        _status: u16,
         166  +
        _body: &[u8],
         167  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         168  +
        Self::deserialize(deserializer)
         169  +
    }
         170  +
}
         171  +
impl ProgressCounters {
         172  +
    /// Creates a new builder-style object to manufacture [`ProgressCounters`](crate::types::ProgressCounters).
         173  +
    pub fn builder() -> crate::types::builders::ProgressCountersBuilder {
         174  +
        crate::types::builders::ProgressCountersBuilder::default()
         175  +
    }
         176  +
}
         177  +
         178  +
/// A builder for [`ProgressCounters`](crate::types::ProgressCounters).
         179  +
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
         180  +
#[non_exhaustive]
         181  +
pub struct ProgressCountersBuilder {
         182  +
    pub(crate) total_steps: ::std::option::Option<i32>,
         183  +
    pub(crate) success_steps: ::std::option::Option<i32>,
         184  +
    pub(crate) failed_steps: ::std::option::Option<i32>,
         185  +
    pub(crate) cancelled_steps: ::std::option::Option<i32>,
         186  +
    pub(crate) timed_out_steps: ::std::option::Option<i32>,
         187  +
}
         188  +
impl ProgressCountersBuilder {
         189  +
    /// <p>The total number of steps run in all specified Amazon Web Services Regions and Amazon Web Services accounts for the current Automation execution.</p>
         190  +
    pub fn total_steps(mut self, input: i32) -> Self {
         191  +
        self.total_steps = ::std::option::Option::Some(input);
         192  +
        self
         193  +
    }
         194  +
    /// <p>The total number of steps run in all specified Amazon Web Services Regions and Amazon Web Services accounts for the current Automation execution.</p>
         195  +
    pub fn set_total_steps(mut self, input: ::std::option::Option<i32>) -> Self {
         196  +
        self.total_steps = input;
         197  +
        self
         198  +
    }
         199  +
    /// <p>The total number of steps run in all specified Amazon Web Services Regions and Amazon Web Services accounts for the current Automation execution.</p>
         200  +
    pub fn get_total_steps(&self) -> &::std::option::Option<i32> {
         201  +
        &self.total_steps
         202  +
    }
         203  +
    /// <p>The total number of steps that successfully completed in all specified Amazon Web Services Regions and Amazon Web Services accounts for the current Automation execution.</p>
         204  +
    pub fn success_steps(mut self, input: i32) -> Self {
         205  +
        self.success_steps = ::std::option::Option::Some(input);
         206  +
        self
         207  +
    }
         208  +
    /// <p>The total number of steps that successfully completed in all specified Amazon Web Services Regions and Amazon Web Services accounts for the current Automation execution.</p>
         209  +
    pub fn set_success_steps(mut self, input: ::std::option::Option<i32>) -> Self {
         210  +
        self.success_steps = input;
         211  +
        self
         212  +
    }
         213  +
    /// <p>The total number of steps that successfully completed in all specified Amazon Web Services Regions and Amazon Web Services accounts for the current Automation execution.</p>
         214  +
    pub fn get_success_steps(&self) -> &::std::option::Option<i32> {
         215  +
        &self.success_steps
         216  +
    }
         217  +
    /// <p>The total number of steps that failed to run in all specified Amazon Web Services Regions and Amazon Web Services accounts for the current Automation execution.</p>
         218  +
    pub fn failed_steps(mut self, input: i32) -> Self {
         219  +
        self.failed_steps = ::std::option::Option::Some(input);
         220  +
        self
         221  +
    }
         222  +
    /// <p>The total number of steps that failed to run in all specified Amazon Web Services Regions and Amazon Web Services accounts for the current Automation execution.</p>
         223  +
    pub fn set_failed_steps(mut self, input: ::std::option::Option<i32>) -> Self {
         224  +
        self.failed_steps = input;
         225  +
        self
         226  +
    }
         227  +
    /// <p>The total number of steps that failed to run in all specified Amazon Web Services Regions and Amazon Web Services accounts for the current Automation execution.</p>
         228  +
    pub fn get_failed_steps(&self) -> &::std::option::Option<i32> {
         229  +
        &self.failed_steps
         230  +
    }
         231  +
    /// <p>The total number of steps that the system cancelled in all specified Amazon Web Services Regions and Amazon Web Services accounts for the current Automation execution.</p>
         232  +
    pub fn cancelled_steps(mut self, input: i32) -> Self {
         233  +
        self.cancelled_steps = ::std::option::Option::Some(input);
         234  +
        self
         235  +
    }
         236  +
    /// <p>The total number of steps that the system cancelled in all specified Amazon Web Services Regions and Amazon Web Services accounts for the current Automation execution.</p>
         237  +
    pub fn set_cancelled_steps(mut self, input: ::std::option::Option<i32>) -> Self {
         238  +
        self.cancelled_steps = input;
         239  +
        self
         240  +
    }
         241  +
    /// <p>The total number of steps that the system cancelled in all specified Amazon Web Services Regions and Amazon Web Services accounts for the current Automation execution.</p>
         242  +
    pub fn get_cancelled_steps(&self) -> &::std::option::Option<i32> {
         243  +
        &self.cancelled_steps
         244  +
    }
         245  +
    /// <p>The total number of steps that timed out in all specified Amazon Web Services Regions and Amazon Web Services accounts for the current Automation execution.</p>
         246  +
    pub fn timed_out_steps(mut self, input: i32) -> Self {
         247  +
        self.timed_out_steps = ::std::option::Option::Some(input);
         248  +
        self
         249  +
    }
         250  +
    /// <p>The total number of steps that timed out in all specified Amazon Web Services Regions and Amazon Web Services accounts for the current Automation execution.</p>
         251  +
    pub fn set_timed_out_steps(mut self, input: ::std::option::Option<i32>) -> Self {
         252  +
        self.timed_out_steps = input;
         253  +
        self
         254  +
    }
         255  +
    /// <p>The total number of steps that timed out in all specified Amazon Web Services Regions and Amazon Web Services accounts for the current Automation execution.</p>
         256  +
    pub fn get_timed_out_steps(&self) -> &::std::option::Option<i32> {
         257  +
        &self.timed_out_steps
         258  +
    }
         259  +
    /// Consumes the builder and constructs a [`ProgressCounters`](crate::types::ProgressCounters).
         260  +
    pub fn build(self) -> crate::types::ProgressCounters {
         261  +
        crate::types::ProgressCounters {
         262  +
            total_steps: self.total_steps.unwrap_or_default(),
         263  +
            success_steps: self.success_steps.unwrap_or_default(),
         264  +
            failed_steps: self.failed_steps.unwrap_or_default(),
         265  +
            cancelled_steps: self.cancelled_steps.unwrap_or_default(),
         266  +
            timed_out_steps: self.timed_out_steps.unwrap_or_default(),
         267  +
        }
         268  +
    }
         269  +
}

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

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

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

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

@@ -0,1 +0,125 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
           3  +
/// <p>An OpsItems that shares something in common with the current OpsItem. For example, related OpsItems can include OpsItems with similar error messages, impacted resources, or statuses for the impacted resource.</p>
           4  +
#[non_exhaustive]
           5  +
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
           6  +
pub struct RelatedOpsItem {
           7  +
    /// <p>The ID of an OpsItem related to the current OpsItem.</p>
           8  +
    pub ops_item_id: ::std::string::String,
           9  +
}
          10  +
impl RelatedOpsItem {
          11  +
    /// <p>The ID of an OpsItem related to the current OpsItem.</p>
          12  +
    pub fn ops_item_id(&self) -> &str {
          13  +
        use std::ops::Deref;
          14  +
        self.ops_item_id.deref()
          15  +
    }
          16  +
}
          17  +
static RELATEDOPSITEM_MEMBER_OPS_ITEM_ID: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          18  +
    ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#RelatedOpsItem$OpsItemId", "com.amazonaws.ssm", "RelatedOpsItem"),
          19  +
    ::aws_smithy_schema::ShapeType::String,
          20  +
    "OpsItemId",
          21  +
    0,
          22  +
);
          23  +
static RELATEDOPSITEM_SCHEMA: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_struct(
          24  +
    ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#RelatedOpsItem", "com.amazonaws.ssm", "RelatedOpsItem"),
          25  +
    ::aws_smithy_schema::ShapeType::Structure,
          26  +
    &[&RELATEDOPSITEM_MEMBER_OPS_ITEM_ID],
          27  +
);
          28  +
impl RelatedOpsItem {
          29  +
    /// The schema for this shape.
          30  +
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema<'static> = &RELATEDOPSITEM_SCHEMA;
          31  +
}
          32  +
impl ::aws_smithy_schema::serde::SerializableStruct for RelatedOpsItem {
          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.ops_item_id;
          40  +
            ser.write_string(&RELATEDOPSITEM_MEMBER_OPS_ITEM_ID, val)?;
          41  +
        }
          42  +
        Ok(())
          43  +
    }
          44  +
}
          45  +
impl RelatedOpsItem {
          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(&RELATEDOPSITEM_SCHEMA, &mut |member, deser| {
          60  +
            match member.member_index() {
          61  +
                Some(0) => {
          62  +
                    builder.ops_item_id = Some(deser.read_string(member)?);
          63  +
                }
          64  +
                _ => {}
          65  +
            }
          66  +
            Ok(())
          67  +
        })?;
          68  +
        builder.ops_item_id = builder.ops_item_id.or(Some(String::new()));
          69  +
        builder.build().map_err(|e| aws_smithy_schema::serde::SerdeError::custom(e.to_string()))
          70  +
    }
          71  +
}
          72  +
impl RelatedOpsItem {
          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 RelatedOpsItem {
          84  +
    /// Creates a new builder-style object to manufacture [`RelatedOpsItem`](crate::types::RelatedOpsItem).
          85  +
    pub fn builder() -> crate::types::builders::RelatedOpsItemBuilder {
          86  +
        crate::types::builders::RelatedOpsItemBuilder::default()
          87  +
    }
          88  +
}
          89  +
          90  +
/// A builder for [`RelatedOpsItem`](crate::types::RelatedOpsItem).
          91  +
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
          92  +
#[non_exhaustive]
          93  +
pub struct RelatedOpsItemBuilder {
          94  +
    pub(crate) ops_item_id: ::std::option::Option<::std::string::String>,
          95  +
}
          96  +
impl RelatedOpsItemBuilder {
          97  +
    /// <p>The ID of an OpsItem related to the current OpsItem.</p>
          98  +
    /// This field is required.
          99  +
    pub fn ops_item_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         100  +
        self.ops_item_id = ::std::option::Option::Some(input.into());
         101  +
        self
         102  +
    }
         103  +
    /// <p>The ID of an OpsItem related to the current OpsItem.</p>
         104  +
    pub fn set_ops_item_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         105  +
        self.ops_item_id = input;
         106  +
        self
         107  +
    }
         108  +
    /// <p>The ID of an OpsItem related to the current OpsItem.</p>
         109  +
    pub fn get_ops_item_id(&self) -> &::std::option::Option<::std::string::String> {
         110  +
        &self.ops_item_id
         111  +
    }
         112  +
    /// Consumes the builder and constructs a [`RelatedOpsItem`](crate::types::RelatedOpsItem).
         113  +
    /// This method will fail if any of the following fields are not set:
         114  +
    /// - [`ops_item_id`](crate::types::builders::RelatedOpsItemBuilder::ops_item_id)
         115  +
    pub fn build(self) -> ::std::result::Result<crate::types::RelatedOpsItem, ::aws_smithy_types::error::operation::BuildError> {
         116  +
        ::std::result::Result::Ok(crate::types::RelatedOpsItem {
         117  +
            ops_item_id: self.ops_item_id.ok_or_else(|| {
         118  +
                ::aws_smithy_types::error::operation::BuildError::missing_field(
         119  +
                    "ops_item_id",
         120  +
                    "ops_item_id was not specified but it is required when building RelatedOpsItem",
         121  +
                )
         122  +
            })?,
         123  +
        })
         124  +
    }
         125  +
}