AWS SDK

AWS SDK

rev. 18b1dd205ff4335251e6dd0ecb88193de1b1cede

Files changed:

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

@@ -0,1 +0,211 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
           3  +
/// <p>Information about ownership of a managed node.</p>
           4  +
#[non_exhaustive]
           5  +
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
           6  +
pub struct NodeOwnerInfo {
           7  +
    /// <p>The ID of the Amazon Web Services account that owns the managed node.</p>
           8  +
    pub account_id: ::std::option::Option<::std::string::String>,
           9  +
    /// <p>The ID of the organization unit (OU) that the account is part of.</p>
          10  +
    pub organizational_unit_id: ::std::option::Option<::std::string::String>,
          11  +
    /// <p>The path for the organizational unit (OU) that owns the managed node. The path for the OU is built using the IDs of the organization, root, and all OUs in the path down to and including the OU. For example:</p>
          12  +
    /// <p><code>o-a1b2c3d4e5/r-f6g7h8i9j0example/ou-ghi0-awsccccc/ou-jkl0-awsddddd/</code></p>
          13  +
    pub organizational_unit_path: ::std::option::Option<::std::string::String>,
          14  +
}
          15  +
impl NodeOwnerInfo {
          16  +
    /// <p>The ID of the Amazon Web Services account that owns the managed node.</p>
          17  +
    pub fn account_id(&self) -> ::std::option::Option<&str> {
          18  +
        self.account_id.as_deref()
          19  +
    }
          20  +
    /// <p>The ID of the organization unit (OU) that the account is part of.</p>
          21  +
    pub fn organizational_unit_id(&self) -> ::std::option::Option<&str> {
          22  +
        self.organizational_unit_id.as_deref()
          23  +
    }
          24  +
    /// <p>The path for the organizational unit (OU) that owns the managed node. The path for the OU is built using the IDs of the organization, root, and all OUs in the path down to and including the OU. For example:</p>
          25  +
    /// <p><code>o-a1b2c3d4e5/r-f6g7h8i9j0example/ou-ghi0-awsccccc/ou-jkl0-awsddddd/</code></p>
          26  +
    pub fn organizational_unit_path(&self) -> ::std::option::Option<&str> {
          27  +
        self.organizational_unit_path.as_deref()
          28  +
    }
          29  +
}
          30  +
static NODEOWNERINFO_MEMBER_ACCOUNT_ID: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          31  +
    ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#NodeOwnerInfo$AccountId", "com.amazonaws.ssm", "NodeOwnerInfo"),
          32  +
    ::aws_smithy_schema::ShapeType::String,
          33  +
    "AccountId",
          34  +
    0,
          35  +
);
          36  +
static NODEOWNERINFO_MEMBER_ORGANIZATIONAL_UNIT_ID: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          37  +
    ::aws_smithy_schema::ShapeId::from_parts(
          38  +
        "com.amazonaws.ssm#NodeOwnerInfo$OrganizationalUnitId",
          39  +
        "com.amazonaws.ssm",
          40  +
        "NodeOwnerInfo",
          41  +
    ),
          42  +
    ::aws_smithy_schema::ShapeType::String,
          43  +
    "OrganizationalUnitId",
          44  +
    1,
          45  +
);
          46  +
static NODEOWNERINFO_MEMBER_ORGANIZATIONAL_UNIT_PATH: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          47  +
    ::aws_smithy_schema::ShapeId::from_parts(
          48  +
        "com.amazonaws.ssm#NodeOwnerInfo$OrganizationalUnitPath",
          49  +
        "com.amazonaws.ssm",
          50  +
        "NodeOwnerInfo",
          51  +
    ),
          52  +
    ::aws_smithy_schema::ShapeType::String,
          53  +
    "OrganizationalUnitPath",
          54  +
    2,
          55  +
);
          56  +
static NODEOWNERINFO_SCHEMA: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_struct(
          57  +
    ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#NodeOwnerInfo", "com.amazonaws.ssm", "NodeOwnerInfo"),
          58  +
    ::aws_smithy_schema::ShapeType::Structure,
          59  +
    &[
          60  +
        &NODEOWNERINFO_MEMBER_ACCOUNT_ID,
          61  +
        &NODEOWNERINFO_MEMBER_ORGANIZATIONAL_UNIT_ID,
          62  +
        &NODEOWNERINFO_MEMBER_ORGANIZATIONAL_UNIT_PATH,
          63  +
    ],
          64  +
);
          65  +
impl NodeOwnerInfo {
          66  +
    /// The schema for this shape.
          67  +
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema<'static> = &NODEOWNERINFO_SCHEMA;
          68  +
}
          69  +
impl ::aws_smithy_schema::serde::SerializableStruct for NodeOwnerInfo {
          70  +
    #[allow(unused_variables, clippy::diverging_sub_expression)]
          71  +
    fn serialize_members(
          72  +
        &self,
          73  +
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
          74  +
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
          75  +
        if let Some(ref val) = self.account_id {
          76  +
            ser.write_string(&NODEOWNERINFO_MEMBER_ACCOUNT_ID, val)?;
          77  +
        }
          78  +
        if let Some(ref val) = self.organizational_unit_id {
          79  +
            ser.write_string(&NODEOWNERINFO_MEMBER_ORGANIZATIONAL_UNIT_ID, val)?;
          80  +
        }
          81  +
        if let Some(ref val) = self.organizational_unit_path {
          82  +
            ser.write_string(&NODEOWNERINFO_MEMBER_ORGANIZATIONAL_UNIT_PATH, val)?;
          83  +
        }
          84  +
        Ok(())
          85  +
    }
          86  +
}
          87  +
impl NodeOwnerInfo {
          88  +
    /// Deserializes this structure from a [`ShapeDeserializer`].
          89  +
    pub fn deserialize(
          90  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
          91  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
          92  +
        #[allow(unused_variables, unused_mut)]
          93  +
        let mut builder = Self::builder();
          94  +
        #[allow(
          95  +
            unused_variables,
          96  +
            unreachable_code,
          97  +
            clippy::single_match,
          98  +
            clippy::match_single_binding,
          99  +
            clippy::diverging_sub_expression
         100  +
        )]
         101  +
        deserializer.read_struct(&NODEOWNERINFO_SCHEMA, &mut |member, deser| {
         102  +
            match member.member_index() {
         103  +
                Some(0) => {
         104  +
                    if deser.is_null() {
         105  +
                        deser.read_null()?;
         106  +
                    } else {
         107  +
                        builder.account_id = Some(deser.read_string(member)?);
         108  +
                    }
         109  +
                }
         110  +
                Some(1) => {
         111  +
                    if deser.is_null() {
         112  +
                        deser.read_null()?;
         113  +
                    } else {
         114  +
                        builder.organizational_unit_id = Some(deser.read_string(member)?);
         115  +
                    }
         116  +
                }
         117  +
                Some(2) => {
         118  +
                    if deser.is_null() {
         119  +
                        deser.read_null()?;
         120  +
                    } else {
         121  +
                        builder.organizational_unit_path = Some(deser.read_string(member)?);
         122  +
                    }
         123  +
                }
         124  +
                _ => {}
         125  +
            }
         126  +
            Ok(())
         127  +
        })?;
         128  +
        Ok(builder.build())
         129  +
    }
         130  +
}
         131  +
impl NodeOwnerInfo {
         132  +
    /// Deserializes this structure from a body deserializer and HTTP response.
         133  +
    pub fn deserialize_with_response(
         134  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         135  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
         136  +
        _status: u16,
         137  +
        _body: &[u8],
         138  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         139  +
        Self::deserialize(deserializer)
         140  +
    }
         141  +
}
         142  +
impl NodeOwnerInfo {
         143  +
    /// Creates a new builder-style object to manufacture [`NodeOwnerInfo`](crate::types::NodeOwnerInfo).
         144  +
    pub fn builder() -> crate::types::builders::NodeOwnerInfoBuilder {
         145  +
        crate::types::builders::NodeOwnerInfoBuilder::default()
         146  +
    }
         147  +
}
         148  +
         149  +
/// A builder for [`NodeOwnerInfo`](crate::types::NodeOwnerInfo).
         150  +
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
         151  +
#[non_exhaustive]
         152  +
pub struct NodeOwnerInfoBuilder {
         153  +
    pub(crate) account_id: ::std::option::Option<::std::string::String>,
         154  +
    pub(crate) organizational_unit_id: ::std::option::Option<::std::string::String>,
         155  +
    pub(crate) organizational_unit_path: ::std::option::Option<::std::string::String>,
         156  +
}
         157  +
impl NodeOwnerInfoBuilder {
         158  +
    /// <p>The ID of the Amazon Web Services account that owns the managed node.</p>
         159  +
    pub fn account_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         160  +
        self.account_id = ::std::option::Option::Some(input.into());
         161  +
        self
         162  +
    }
         163  +
    /// <p>The ID of the Amazon Web Services account that owns the managed node.</p>
         164  +
    pub fn set_account_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         165  +
        self.account_id = input;
         166  +
        self
         167  +
    }
         168  +
    /// <p>The ID of the Amazon Web Services account that owns the managed node.</p>
         169  +
    pub fn get_account_id(&self) -> &::std::option::Option<::std::string::String> {
         170  +
        &self.account_id
         171  +
    }
         172  +
    /// <p>The ID of the organization unit (OU) that the account is part of.</p>
         173  +
    pub fn organizational_unit_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         174  +
        self.organizational_unit_id = ::std::option::Option::Some(input.into());
         175  +
        self
         176  +
    }
         177  +
    /// <p>The ID of the organization unit (OU) that the account is part of.</p>
         178  +
    pub fn set_organizational_unit_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         179  +
        self.organizational_unit_id = input;
         180  +
        self
         181  +
    }
         182  +
    /// <p>The ID of the organization unit (OU) that the account is part of.</p>
         183  +
    pub fn get_organizational_unit_id(&self) -> &::std::option::Option<::std::string::String> {
         184  +
        &self.organizational_unit_id
         185  +
    }
         186  +
    /// <p>The path for the organizational unit (OU) that owns the managed node. The path for the OU is built using the IDs of the organization, root, and all OUs in the path down to and including the OU. For example:</p>
         187  +
    /// <p><code>o-a1b2c3d4e5/r-f6g7h8i9j0example/ou-ghi0-awsccccc/ou-jkl0-awsddddd/</code></p>
         188  +
    pub fn organizational_unit_path(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         189  +
        self.organizational_unit_path = ::std::option::Option::Some(input.into());
         190  +
        self
         191  +
    }
         192  +
    /// <p>The path for the organizational unit (OU) that owns the managed node. The path for the OU is built using the IDs of the organization, root, and all OUs in the path down to and including the OU. For example:</p>
         193  +
    /// <p><code>o-a1b2c3d4e5/r-f6g7h8i9j0example/ou-ghi0-awsccccc/ou-jkl0-awsddddd/</code></p>
         194  +
    pub fn set_organizational_unit_path(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         195  +
        self.organizational_unit_path = input;
         196  +
        self
         197  +
    }
         198  +
    /// <p>The path for the organizational unit (OU) that owns the managed node. The path for the OU is built using the IDs of the organization, root, and all OUs in the path down to and including the OU. For example:</p>
         199  +
    /// <p><code>o-a1b2c3d4e5/r-f6g7h8i9j0example/ou-ghi0-awsccccc/ou-jkl0-awsddddd/</code></p>
         200  +
    pub fn get_organizational_unit_path(&self) -> &::std::option::Option<::std::string::String> {
         201  +
        &self.organizational_unit_path
         202  +
    }
         203  +
    /// Consumes the builder and constructs a [`NodeOwnerInfo`](crate::types::NodeOwnerInfo).
         204  +
    pub fn build(self) -> crate::types::NodeOwnerInfo {
         205  +
        crate::types::NodeOwnerInfo {
         206  +
            account_id: self.account_id,
         207  +
            organizational_unit_id: self.organizational_unit_id,
         208  +
            organizational_unit_path: self.organizational_unit_path,
         209  +
        }
         210  +
    }
         211  +
}

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

@@ -0,1 +0,85 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
           3  +
/// <p>Information about a managed node's type.</p>
           4  +
#[non_exhaustive]
           5  +
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
           6  +
pub enum NodeType {
           7  +
    /// <p>Information about a specific managed node.</p>
           8  +
    Instance(crate::types::InstanceInfo),
           9  +
    /// The `Unknown` variant represents cases where new union variant was received. Consider upgrading the SDK to the latest available version.
          10  +
    /// An unknown enum variant
          11  +
    ///
          12  +
    /// _Note: If you encounter this error, consider upgrading your SDK to the latest version._
          13  +
    /// The `Unknown` variant represents cases where the server sent a value that wasn't recognized
          14  +
    /// by the client. This can happen when the server adds new functionality, but the client has not been updated.
          15  +
    /// To investigate this, consider turning on debug logging to print the raw HTTP response.
          16  +
    #[non_exhaustive]
          17  +
    Unknown,
          18  +
}
          19  +
impl NodeType {
          20  +
    #[allow(irrefutable_let_patterns)]
          21  +
    /// Tries to convert the enum instance into [`Instance`](crate::types::NodeType::Instance), extracting the inner [`InstanceInfo`](crate::types::InstanceInfo).
          22  +
    /// Returns `Err(&Self)` if it can't be converted.
          23  +
    pub fn as_instance(&self) -> ::std::result::Result<&crate::types::InstanceInfo, &Self> {
          24  +
        if let NodeType::Instance(val) = &self {
          25  +
            ::std::result::Result::Ok(val)
          26  +
        } else {
          27  +
            ::std::result::Result::Err(self)
          28  +
        }
          29  +
    }
          30  +
    /// Returns true if this is a [`Instance`](crate::types::NodeType::Instance).
          31  +
    pub fn is_instance(&self) -> bool {
          32  +
        self.as_instance().is_ok()
          33  +
    }
          34  +
    /// Returns true if the enum instance is the `Unknown` variant.
          35  +
    pub fn is_unknown(&self) -> bool {
          36  +
        matches!(self, Self::Unknown)
          37  +
    }
          38  +
}
          39  +
static NODETYPE_MEMBER_INSTANCE: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          40  +
    ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#NodeType$Instance", "com.amazonaws.ssm", "NodeType"),
          41  +
    ::aws_smithy_schema::ShapeType::Structure,
          42  +
    "Instance",
          43  +
    0,
          44  +
);
          45  +
static NODETYPE_SCHEMA: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_struct(
          46  +
    ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#NodeType", "com.amazonaws.ssm", "NodeType"),
          47  +
    ::aws_smithy_schema::ShapeType::Union,
          48  +
    &[&NODETYPE_MEMBER_INSTANCE],
          49  +
);
          50  +
impl NodeType {
          51  +
    /// The schema for this shape.
          52  +
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema<'static> = &NODETYPE_SCHEMA;
          53  +
}
          54  +
impl ::aws_smithy_schema::serde::SerializableStruct for NodeType {
          55  +
    #[allow(unused_variables, clippy::diverging_sub_expression)]
          56  +
    fn serialize_members(
          57  +
        &self,
          58  +
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
          59  +
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
          60  +
        match self {
          61  +
            Self::Instance(val) => {
          62  +
                ser.write_struct(&NODETYPE_MEMBER_INSTANCE, val)?;
          63  +
            }
          64  +
            Self::Unknown => return Err(::aws_smithy_schema::serde::SerdeError::custom("cannot serialize unknown union variant")),
          65  +
        }
          66  +
        Ok(())
          67  +
    }
          68  +
}
          69  +
impl NodeType {
          70  +
    /// Deserializes this union from a [`ShapeDeserializer`].
          71  +
    pub fn deserialize(
          72  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
          73  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
          74  +
        let mut result: ::std::option::Option<Self> = ::std::option::Option::None;
          75  +
        #[allow(unused_variables, unreachable_code, clippy::single_match, clippy::match_single_binding)]
          76  +
        deserializer.read_struct(&NODETYPE_SCHEMA, &mut |member, deser| {
          77  +
            result = ::std::option::Option::Some(match member.member_index() {
          78  +
                Some(0) => Self::Instance(crate::types::InstanceInfo::deserialize(deser)?),
          79  +
                _ => Self::Unknown,
          80  +
            });
          81  +
            Ok(())
          82  +
        })?;
          83  +
        result.ok_or_else(|| ::aws_smithy_schema::serde::SerdeError::custom("expected a union variant"))
          84  +
    }
          85  +
}

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

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

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

@@ -0,1 +0,164 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
           3  +
/// <p>A summary of resources that aren't compliant. The summary is organized according to resource type.</p>
           4  +
#[non_exhaustive]
           5  +
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
           6  +
pub struct NonCompliantSummary {
           7  +
    /// <p>The total number of compliance items that aren't compliant.</p>
           8  +
    pub non_compliant_count: i32,
           9  +
    /// <p>A summary of the non-compliance severity by compliance type</p>
          10  +
    pub severity_summary: ::std::option::Option<crate::types::SeveritySummary>,
          11  +
}
          12  +
impl NonCompliantSummary {
          13  +
    /// <p>The total number of compliance items that aren't compliant.</p>
          14  +
    pub fn non_compliant_count(&self) -> i32 {
          15  +
        self.non_compliant_count
          16  +
    }
          17  +
    /// <p>A summary of the non-compliance severity by compliance type</p>
          18  +
    pub fn severity_summary(&self) -> ::std::option::Option<&crate::types::SeveritySummary> {
          19  +
        self.severity_summary.as_ref()
          20  +
    }
          21  +
}
          22  +
static NONCOMPLIANTSUMMARY_MEMBER_NON_COMPLIANT_COUNT: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          23  +
    ::aws_smithy_schema::ShapeId::from_parts(
          24  +
        "com.amazonaws.ssm#NonCompliantSummary$NonCompliantCount",
          25  +
        "com.amazonaws.ssm",
          26  +
        "NonCompliantSummary",
          27  +
    ),
          28  +
    ::aws_smithy_schema::ShapeType::Integer,
          29  +
    "NonCompliantCount",
          30  +
    0,
          31  +
);
          32  +
static NONCOMPLIANTSUMMARY_MEMBER_SEVERITY_SUMMARY: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          33  +
    ::aws_smithy_schema::ShapeId::from_parts(
          34  +
        "com.amazonaws.ssm#NonCompliantSummary$SeveritySummary",
          35  +
        "com.amazonaws.ssm",
          36  +
        "NonCompliantSummary",
          37  +
    ),
          38  +
    ::aws_smithy_schema::ShapeType::Structure,
          39  +
    "SeveritySummary",
          40  +
    1,
          41  +
);
          42  +
static NONCOMPLIANTSUMMARY_SCHEMA: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_struct(
          43  +
    ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#NonCompliantSummary", "com.amazonaws.ssm", "NonCompliantSummary"),
          44  +
    ::aws_smithy_schema::ShapeType::Structure,
          45  +
    &[
          46  +
        &NONCOMPLIANTSUMMARY_MEMBER_NON_COMPLIANT_COUNT,
          47  +
        &NONCOMPLIANTSUMMARY_MEMBER_SEVERITY_SUMMARY,
          48  +
    ],
          49  +
);
          50  +
impl NonCompliantSummary {
          51  +
    /// The schema for this shape.
          52  +
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema<'static> = &NONCOMPLIANTSUMMARY_SCHEMA;
          53  +
}
          54  +
impl ::aws_smithy_schema::serde::SerializableStruct for NonCompliantSummary {
          55  +
    #[allow(unused_variables, clippy::diverging_sub_expression)]
          56  +
    fn serialize_members(
          57  +
        &self,
          58  +
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
          59  +
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
          60  +
        {
          61  +
            let val = &self.non_compliant_count;
          62  +
            ser.write_integer(&NONCOMPLIANTSUMMARY_MEMBER_NON_COMPLIANT_COUNT, *val)?;
          63  +
        }
          64  +
        if let Some(ref val) = self.severity_summary {
          65  +
            ser.write_struct(&NONCOMPLIANTSUMMARY_MEMBER_SEVERITY_SUMMARY, val)?;
          66  +
        }
          67  +
        Ok(())
          68  +
    }
          69  +
}
          70  +
impl NonCompliantSummary {
          71  +
    /// Deserializes this structure from a [`ShapeDeserializer`].
          72  +
    pub fn deserialize(
          73  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
          74  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
          75  +
        #[allow(unused_variables, unused_mut)]
          76  +
        let mut builder = Self::builder();
          77  +
        #[allow(
          78  +
            unused_variables,
          79  +
            unreachable_code,
          80  +
            clippy::single_match,
          81  +
            clippy::match_single_binding,
          82  +
            clippy::diverging_sub_expression
          83  +
        )]
          84  +
        deserializer.read_struct(&NONCOMPLIANTSUMMARY_SCHEMA, &mut |member, deser| {
          85  +
            match member.member_index() {
          86  +
                Some(0) => {
          87  +
                    builder.non_compliant_count = Some(deser.read_integer(member)?);
          88  +
                }
          89  +
                Some(1) => {
          90  +
                    if deser.is_null() {
          91  +
                        deser.read_null()?;
          92  +
                    } else {
          93  +
                        builder.severity_summary = Some(crate::types::SeveritySummary::deserialize(deser)?);
          94  +
                    }
          95  +
                }
          96  +
                _ => {}
          97  +
            }
          98  +
            Ok(())
          99  +
        })?;
         100  +
        Ok(builder.build())
         101  +
    }
         102  +
}
         103  +
impl NonCompliantSummary {
         104  +
    /// Deserializes this structure from a body deserializer and HTTP response.
         105  +
    pub fn deserialize_with_response(
         106  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         107  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
         108  +
        _status: u16,
         109  +
        _body: &[u8],
         110  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         111  +
        Self::deserialize(deserializer)
         112  +
    }
         113  +
}
         114  +
impl NonCompliantSummary {
         115  +
    /// Creates a new builder-style object to manufacture [`NonCompliantSummary`](crate::types::NonCompliantSummary).
         116  +
    pub fn builder() -> crate::types::builders::NonCompliantSummaryBuilder {
         117  +
        crate::types::builders::NonCompliantSummaryBuilder::default()
         118  +
    }
         119  +
}
         120  +
         121  +
/// A builder for [`NonCompliantSummary`](crate::types::NonCompliantSummary).
         122  +
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
         123  +
#[non_exhaustive]
         124  +
pub struct NonCompliantSummaryBuilder {
         125  +
    pub(crate) non_compliant_count: ::std::option::Option<i32>,
         126  +
    pub(crate) severity_summary: ::std::option::Option<crate::types::SeveritySummary>,
         127  +
}
         128  +
impl NonCompliantSummaryBuilder {
         129  +
    /// <p>The total number of compliance items that aren't compliant.</p>
         130  +
    pub fn non_compliant_count(mut self, input: i32) -> Self {
         131  +
        self.non_compliant_count = ::std::option::Option::Some(input);
         132  +
        self
         133  +
    }
         134  +
    /// <p>The total number of compliance items that aren't compliant.</p>
         135  +
    pub fn set_non_compliant_count(mut self, input: ::std::option::Option<i32>) -> Self {
         136  +
        self.non_compliant_count = input;
         137  +
        self
         138  +
    }
         139  +
    /// <p>The total number of compliance items that aren't compliant.</p>
         140  +
    pub fn get_non_compliant_count(&self) -> &::std::option::Option<i32> {
         141  +
        &self.non_compliant_count
         142  +
    }
         143  +
    /// <p>A summary of the non-compliance severity by compliance type</p>
         144  +
    pub fn severity_summary(mut self, input: crate::types::SeveritySummary) -> Self {
         145  +
        self.severity_summary = ::std::option::Option::Some(input);
         146  +
        self
         147  +
    }
         148  +
    /// <p>A summary of the non-compliance severity by compliance type</p>
         149  +
    pub fn set_severity_summary(mut self, input: ::std::option::Option<crate::types::SeveritySummary>) -> Self {
         150  +
        self.severity_summary = input;
         151  +
        self
         152  +
    }
         153  +
    /// <p>A summary of the non-compliance severity by compliance type</p>
         154  +
    pub fn get_severity_summary(&self) -> &::std::option::Option<crate::types::SeveritySummary> {
         155  +
        &self.severity_summary
         156  +
    }
         157  +
    /// Consumes the builder and constructs a [`NonCompliantSummary`](crate::types::NonCompliantSummary).
         158  +
    pub fn build(self) -> crate::types::NonCompliantSummary {
         159  +
        crate::types::NonCompliantSummary {
         160  +
            non_compliant_count: self.non_compliant_count.unwrap_or_default(),
         161  +
            severity_summary: self.severity_summary,
         162  +
        }
         163  +
    }
         164  +
}

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

@@ -0,1 +0,276 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
           3  +
/// <p>Configurations for sending notifications.</p>
           4  +
#[non_exhaustive]
           5  +
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
           6  +
pub struct NotificationConfig {
           7  +
    /// <p>An Amazon Resource Name (ARN) for an Amazon Simple Notification Service (Amazon SNS) topic. Run Command pushes notifications about command status changes to this topic.</p>
           8  +
    pub notification_arn: ::std::option::Option<::std::string::String>,
           9  +
    /// <p>The different events for which you can receive notifications. To learn more about these events, see <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/monitoring-sns-notifications.html">Monitoring Systems Manager status changes using Amazon SNS notifications</a> in the <i>Amazon Web Services Systems Manager User Guide</i>.</p>
          10  +
    pub notification_events: ::std::option::Option<::std::vec::Vec<crate::types::NotificationEvent>>,
          11  +
    /// <p>The type of notification.</p>
          12  +
    /// <ul>
          13  +
    /// <li>
          14  +
    /// <p><code>Command</code>: Receive notification when the status of a command changes.</p></li>
          15  +
    /// <li>
          16  +
    /// <p><code>Invocation</code>: For commands sent to multiple managed nodes, receive notification on a per-node basis when the status of a command changes.</p></li>
          17  +
    /// </ul>
          18  +
    pub notification_type: ::std::option::Option<crate::types::NotificationType>,
          19  +
}
          20  +
impl NotificationConfig {
          21  +
    /// <p>An Amazon Resource Name (ARN) for an Amazon Simple Notification Service (Amazon SNS) topic. Run Command pushes notifications about command status changes to this topic.</p>
          22  +
    pub fn notification_arn(&self) -> ::std::option::Option<&str> {
          23  +
        self.notification_arn.as_deref()
          24  +
    }
          25  +
    /// <p>The different events for which you can receive notifications. To learn more about these events, see <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/monitoring-sns-notifications.html">Monitoring Systems Manager status changes using Amazon SNS notifications</a> in the <i>Amazon Web Services Systems Manager User Guide</i>.</p>
          26  +
    ///
          27  +
    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.notification_events.is_none()`.
          28  +
    pub fn notification_events(&self) -> &[crate::types::NotificationEvent] {
          29  +
        self.notification_events.as_deref().unwrap_or_default()
          30  +
    }
          31  +
    /// <p>The type of notification.</p>
          32  +
    /// <ul>
          33  +
    /// <li>
          34  +
    /// <p><code>Command</code>: Receive notification when the status of a command changes.</p></li>
          35  +
    /// <li>
          36  +
    /// <p><code>Invocation</code>: For commands sent to multiple managed nodes, receive notification on a per-node basis when the status of a command changes.</p></li>
          37  +
    /// </ul>
          38  +
    pub fn notification_type(&self) -> ::std::option::Option<&crate::types::NotificationType> {
          39  +
        self.notification_type.as_ref()
          40  +
    }
          41  +
}
          42  +
static NOTIFICATIONCONFIG_MEMBER_NOTIFICATION_ARN: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          43  +
    ::aws_smithy_schema::ShapeId::from_parts(
          44  +
        "com.amazonaws.ssm#NotificationConfig$NotificationArn",
          45  +
        "com.amazonaws.ssm",
          46  +
        "NotificationConfig",
          47  +
    ),
          48  +
    ::aws_smithy_schema::ShapeType::String,
          49  +
    "NotificationArn",
          50  +
    0,
          51  +
);
          52  +
static NOTIFICATIONCONFIG_MEMBER_NOTIFICATION_EVENTS_MEMBER: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          53  +
    ::aws_smithy_schema::ShapeId::from_parts(
          54  +
        "com.amazonaws.ssm#NotificationEventList$member",
          55  +
        "com.amazonaws.ssm",
          56  +
        "NotificationEventList",
          57  +
    ),
          58  +
    ::aws_smithy_schema::ShapeType::String,
          59  +
    "member",
          60  +
    0,
          61  +
);
          62  +
static NOTIFICATIONCONFIG_MEMBER_NOTIFICATION_EVENTS: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          63  +
    ::aws_smithy_schema::ShapeId::from_parts(
          64  +
        "com.amazonaws.ssm#NotificationConfig$NotificationEvents",
          65  +
        "com.amazonaws.ssm",
          66  +
        "NotificationConfig",
          67  +
    ),
          68  +
    ::aws_smithy_schema::ShapeType::List,
          69  +
    "NotificationEvents",
          70  +
    1,
          71  +
)
          72  +
.with_list_member(&NOTIFICATIONCONFIG_MEMBER_NOTIFICATION_EVENTS_MEMBER);
          73  +
static NOTIFICATIONCONFIG_MEMBER_NOTIFICATION_TYPE: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          74  +
    ::aws_smithy_schema::ShapeId::from_parts(
          75  +
        "com.amazonaws.ssm#NotificationConfig$NotificationType",
          76  +
        "com.amazonaws.ssm",
          77  +
        "NotificationConfig",
          78  +
    ),
          79  +
    ::aws_smithy_schema::ShapeType::String,
          80  +
    "NotificationType",
          81  +
    2,
          82  +
);
          83  +
static NOTIFICATIONCONFIG_SCHEMA: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_struct(
          84  +
    ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#NotificationConfig", "com.amazonaws.ssm", "NotificationConfig"),
          85  +
    ::aws_smithy_schema::ShapeType::Structure,
          86  +
    &[
          87  +
        &NOTIFICATIONCONFIG_MEMBER_NOTIFICATION_ARN,
          88  +
        &NOTIFICATIONCONFIG_MEMBER_NOTIFICATION_EVENTS,
          89  +
        &NOTIFICATIONCONFIG_MEMBER_NOTIFICATION_TYPE,
          90  +
    ],
          91  +
);
          92  +
impl NotificationConfig {
          93  +
    /// The schema for this shape.
          94  +
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema<'static> = &NOTIFICATIONCONFIG_SCHEMA;
          95  +
}
          96  +
impl ::aws_smithy_schema::serde::SerializableStruct for NotificationConfig {
          97  +
    #[allow(unused_variables, clippy::diverging_sub_expression)]
          98  +
    fn serialize_members(
          99  +
        &self,
         100  +
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
         101  +
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
         102  +
        if let Some(ref val) = self.notification_arn {
         103  +
            ser.write_string(&NOTIFICATIONCONFIG_MEMBER_NOTIFICATION_ARN, val)?;
         104  +
        }
         105  +
        if let Some(ref val) = self.notification_events {
         106  +
            ser.write_list(
         107  +
                &NOTIFICATIONCONFIG_MEMBER_NOTIFICATION_EVENTS,
         108  +
                &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
         109  +
                    for item in val {
         110  +
                        ser.write_string(&aws_smithy_schema::prelude::STRING, item.as_str())?;
         111  +
                    }
         112  +
                    Ok(())
         113  +
                },
         114  +
            )?;
         115  +
        }
         116  +
        if let Some(ref val) = self.notification_type {
         117  +
            ser.write_string(&NOTIFICATIONCONFIG_MEMBER_NOTIFICATION_TYPE, val.as_str())?;
         118  +
        }
         119  +
        Ok(())
         120  +
    }
         121  +
}
         122  +
impl NotificationConfig {
         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(&NOTIFICATIONCONFIG_SCHEMA, &mut |member, deser| {
         137  +
            match member.member_index() {
         138  +
                Some(0) => {
         139  +
                    if deser.is_null() {
         140  +
                        deser.read_null()?;
         141  +
                    } else {
         142  +
                        builder.notification_arn = Some(deser.read_string(member)?);
         143  +
                    }
         144  +
                }
         145  +
                Some(1) => {
         146  +
                    if deser.is_null() {
         147  +
                        deser.read_null()?;
         148  +
                    } else {
         149  +
                        builder.notification_events = Some({
         150  +
                            let mut container = Vec::new();
         151  +
                            deser.read_list(member, &mut |deser| {
         152  +
                                container.push(crate::types::NotificationEvent::from(
         153  +
                                    deser.read_string(&::aws_smithy_schema::prelude::STRING)?.as_str(),
         154  +
                                ));
         155  +
                                Ok(())
         156  +
                            })?;
         157  +
                            container
         158  +
                        });
         159  +
                    }
         160  +
                }
         161  +
                Some(2) => {
         162  +
                    if deser.is_null() {
         163  +
                        deser.read_null()?;
         164  +
                    } else {
         165  +
                        builder.notification_type = Some(crate::types::NotificationType::from(deser.read_string(member)?.as_str()));
         166  +
                    }
         167  +
                }
         168  +
                _ => {}
         169  +
            }
         170  +
            Ok(())
         171  +
        })?;
         172  +
        Ok(builder.build())
         173  +
    }
         174  +
}
         175  +
impl NotificationConfig {
         176  +
    /// Deserializes this structure from a body deserializer and HTTP response.
         177  +
    pub fn deserialize_with_response(
         178  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         179  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
         180  +
        _status: u16,
         181  +
        _body: &[u8],
         182  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         183  +
        Self::deserialize(deserializer)
         184  +
    }
         185  +
}
         186  +
impl NotificationConfig {
         187  +
    /// Creates a new builder-style object to manufacture [`NotificationConfig`](crate::types::NotificationConfig).
         188  +
    pub fn builder() -> crate::types::builders::NotificationConfigBuilder {
         189  +
        crate::types::builders::NotificationConfigBuilder::default()
         190  +
    }
         191  +
}
         192  +
         193  +
/// A builder for [`NotificationConfig`](crate::types::NotificationConfig).
         194  +
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
         195  +
#[non_exhaustive]
         196  +
pub struct NotificationConfigBuilder {
         197  +
    pub(crate) notification_arn: ::std::option::Option<::std::string::String>,
         198  +
    pub(crate) notification_events: ::std::option::Option<::std::vec::Vec<crate::types::NotificationEvent>>,
         199  +
    pub(crate) notification_type: ::std::option::Option<crate::types::NotificationType>,
         200  +
}
         201  +
impl NotificationConfigBuilder {
         202  +
    /// <p>An Amazon Resource Name (ARN) for an Amazon Simple Notification Service (Amazon SNS) topic. Run Command pushes notifications about command status changes to this topic.</p>
         203  +
    pub fn notification_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         204  +
        self.notification_arn = ::std::option::Option::Some(input.into());
         205  +
        self
         206  +
    }
         207  +
    /// <p>An Amazon Resource Name (ARN) for an Amazon Simple Notification Service (Amazon SNS) topic. Run Command pushes notifications about command status changes to this topic.</p>
         208  +
    pub fn set_notification_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         209  +
        self.notification_arn = input;
         210  +
        self
         211  +
    }
         212  +
    /// <p>An Amazon Resource Name (ARN) for an Amazon Simple Notification Service (Amazon SNS) topic. Run Command pushes notifications about command status changes to this topic.</p>
         213  +
    pub fn get_notification_arn(&self) -> &::std::option::Option<::std::string::String> {
         214  +
        &self.notification_arn
         215  +
    }
         216  +
    /// Appends an item to `notification_events`.
         217  +
    ///
         218  +
    /// To override the contents of this collection use [`set_notification_events`](Self::set_notification_events).
         219  +
    ///
         220  +
    /// <p>The different events for which you can receive notifications. To learn more about these events, see <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/monitoring-sns-notifications.html">Monitoring Systems Manager status changes using Amazon SNS notifications</a> in the <i>Amazon Web Services Systems Manager User Guide</i>.</p>
         221  +
    pub fn notification_events(mut self, input: crate::types::NotificationEvent) -> Self {
         222  +
        let mut v = self.notification_events.unwrap_or_default();
         223  +
        v.push(input);
         224  +
        self.notification_events = ::std::option::Option::Some(v);
         225  +
        self
         226  +
    }
         227  +
    /// <p>The different events for which you can receive notifications. To learn more about these events, see <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/monitoring-sns-notifications.html">Monitoring Systems Manager status changes using Amazon SNS notifications</a> in the <i>Amazon Web Services Systems Manager User Guide</i>.</p>
         228  +
    pub fn set_notification_events(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::NotificationEvent>>) -> Self {
         229  +
        self.notification_events = input;
         230  +
        self
         231  +
    }
         232  +
    /// <p>The different events for which you can receive notifications. To learn more about these events, see <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/monitoring-sns-notifications.html">Monitoring Systems Manager status changes using Amazon SNS notifications</a> in the <i>Amazon Web Services Systems Manager User Guide</i>.</p>
         233  +
    pub fn get_notification_events(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::NotificationEvent>> {
         234  +
        &self.notification_events
         235  +
    }
         236  +
    /// <p>The type of notification.</p>
         237  +
    /// <ul>
         238  +
    /// <li>
         239  +
    /// <p><code>Command</code>: Receive notification when the status of a command changes.</p></li>
         240  +
    /// <li>
         241  +
    /// <p><code>Invocation</code>: For commands sent to multiple managed nodes, receive notification on a per-node basis when the status of a command changes.</p></li>
         242  +
    /// </ul>
         243  +
    pub fn notification_type(mut self, input: crate::types::NotificationType) -> Self {
         244  +
        self.notification_type = ::std::option::Option::Some(input);
         245  +
        self
         246  +
    }
         247  +
    /// <p>The type of notification.</p>
         248  +
    /// <ul>
         249  +
    /// <li>
         250  +
    /// <p><code>Command</code>: Receive notification when the status of a command changes.</p></li>
         251  +
    /// <li>
         252  +
    /// <p><code>Invocation</code>: For commands sent to multiple managed nodes, receive notification on a per-node basis when the status of a command changes.</p></li>
         253  +
    /// </ul>
         254  +
    pub fn set_notification_type(mut self, input: ::std::option::Option<crate::types::NotificationType>) -> Self {
         255  +
        self.notification_type = input;
         256  +
        self
         257  +
    }
         258  +
    /// <p>The type of notification.</p>
         259  +
    /// <ul>
         260  +
    /// <li>
         261  +
    /// <p><code>Command</code>: Receive notification when the status of a command changes.</p></li>
         262  +
    /// <li>
         263  +
    /// <p><code>Invocation</code>: For commands sent to multiple managed nodes, receive notification on a per-node basis when the status of a command changes.</p></li>
         264  +
    /// </ul>
         265  +
    pub fn get_notification_type(&self) -> &::std::option::Option<crate::types::NotificationType> {
         266  +
        &self.notification_type
         267  +
    }
         268  +
    /// Consumes the builder and constructs a [`NotificationConfig`](crate::types::NotificationConfig).
         269  +
    pub fn build(self) -> crate::types::NotificationConfig {
         270  +
        crate::types::NotificationConfig {
         271  +
            notification_arn: self.notification_arn,
         272  +
            notification_events: self.notification_events,
         273  +
            notification_type: self.notification_type,
         274  +
        }
         275  +
    }
         276  +
}

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

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

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