AWS SDK

AWS SDK

rev. aa190e630077955f0bc8f58dee6a16530c1e0578 (ignoring whitespace)

Files changed:

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

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

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

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

@@ -0,1 +0,164 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
           3  +
/// <p>Information includes the Amazon Web Services account ID where the current document is shared and the version shared with that account.</p>
           4  +
#[non_exhaustive]
           5  +
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
           6  +
pub struct AccountSharingInfo {
           7  +
    /// <p>The Amazon Web Services account ID where the current document is shared.</p>
           8  +
    pub account_id: ::std::option::Option<::std::string::String>,
           9  +
    /// <p>The version of the current document shared with the account.</p>
          10  +
    pub shared_document_version: ::std::option::Option<::std::string::String>,
          11  +
}
          12  +
impl AccountSharingInfo {
          13  +
    /// <p>The Amazon Web Services account ID where the current document is shared.</p>
          14  +
    pub fn account_id(&self) -> ::std::option::Option<&str> {
          15  +
        self.account_id.as_deref()
          16  +
    }
          17  +
    /// <p>The version of the current document shared with the account.</p>
          18  +
    pub fn shared_document_version(&self) -> ::std::option::Option<&str> {
          19  +
        self.shared_document_version.as_deref()
          20  +
    }
          21  +
}
          22  +
static ACCOUNTSHARINGINFO_MEMBER_ACCOUNT_ID: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          23  +
    ::aws_smithy_schema::ShapeId::from_parts(
          24  +
        "com.amazonaws.ssm#AccountSharingInfo$AccountId",
          25  +
        "com.amazonaws.ssm",
          26  +
        "AccountSharingInfo",
          27  +
    ),
          28  +
    ::aws_smithy_schema::ShapeType::String,
          29  +
    "AccountId",
          30  +
    0,
          31  +
);
          32  +
static ACCOUNTSHARINGINFO_MEMBER_SHARED_DOCUMENT_VERSION: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          33  +
    ::aws_smithy_schema::ShapeId::from_parts(
          34  +
        "com.amazonaws.ssm#AccountSharingInfo$SharedDocumentVersion",
          35  +
        "com.amazonaws.ssm",
          36  +
        "AccountSharingInfo",
          37  +
    ),
          38  +
    ::aws_smithy_schema::ShapeType::String,
          39  +
    "SharedDocumentVersion",
          40  +
    1,
          41  +
);
          42  +
static ACCOUNTSHARINGINFO_SCHEMA: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_struct(
          43  +
    ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#AccountSharingInfo", "com.amazonaws.ssm", "AccountSharingInfo"),
          44  +
    ::aws_smithy_schema::ShapeType::Structure,
          45  +
    &[&ACCOUNTSHARINGINFO_MEMBER_ACCOUNT_ID, &ACCOUNTSHARINGINFO_MEMBER_SHARED_DOCUMENT_VERSION],
          46  +
);
          47  +
impl AccountSharingInfo {
          48  +
    /// The schema for this shape.
          49  +
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema<'static> = &ACCOUNTSHARINGINFO_SCHEMA;
          50  +
}
          51  +
impl ::aws_smithy_schema::serde::SerializableStruct for AccountSharingInfo {
          52  +
    #[allow(unused_variables, clippy::diverging_sub_expression)]
          53  +
    fn serialize_members(
          54  +
        &self,
          55  +
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
          56  +
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
          57  +
        if let Some(ref val) = self.account_id {
          58  +
            ser.write_string(&ACCOUNTSHARINGINFO_MEMBER_ACCOUNT_ID, val)?;
          59  +
        }
          60  +
        if let Some(ref val) = self.shared_document_version {
          61  +
            ser.write_string(&ACCOUNTSHARINGINFO_MEMBER_SHARED_DOCUMENT_VERSION, val)?;
          62  +
        }
          63  +
        Ok(())
          64  +
    }
          65  +
}
          66  +
impl AccountSharingInfo {
          67  +
    /// Deserializes this structure from a [`ShapeDeserializer`].
          68  +
    pub fn deserialize(
          69  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
          70  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
          71  +
        #[allow(unused_variables, unused_mut)]
          72  +
        let mut builder = Self::builder();
          73  +
        #[allow(
          74  +
            unused_variables,
          75  +
            unreachable_code,
          76  +
            clippy::single_match,
          77  +
            clippy::match_single_binding,
          78  +
            clippy::diverging_sub_expression
          79  +
        )]
          80  +
        deserializer.read_struct(&ACCOUNTSHARINGINFO_SCHEMA, &mut |member, deser| {
          81  +
            match member.member_index() {
          82  +
                Some(0) => {
          83  +
                    if deser.is_null() {
          84  +
                        deser.read_null()?;
          85  +
                    } else {
          86  +
                        builder.account_id = Some(deser.read_string(member)?);
          87  +
                    }
          88  +
                }
          89  +
                Some(1) => {
          90  +
                    if deser.is_null() {
          91  +
                        deser.read_null()?;
          92  +
                    } else {
          93  +
                        builder.shared_document_version = Some(deser.read_string(member)?);
          94  +
                    }
          95  +
                }
          96  +
                _ => {}
          97  +
            }
          98  +
            Ok(())
          99  +
        })?;
         100  +
        Ok(builder.build())
         101  +
    }
         102  +
}
         103  +
impl AccountSharingInfo {
         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 AccountSharingInfo {
         115  +
    /// Creates a new builder-style object to manufacture [`AccountSharingInfo`](crate::types::AccountSharingInfo).
         116  +
    pub fn builder() -> crate::types::builders::AccountSharingInfoBuilder {
         117  +
        crate::types::builders::AccountSharingInfoBuilder::default()
         118  +
    }
         119  +
}
         120  +
         121  +
/// A builder for [`AccountSharingInfo`](crate::types::AccountSharingInfo).
         122  +
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
         123  +
#[non_exhaustive]
         124  +
pub struct AccountSharingInfoBuilder {
         125  +
    pub(crate) account_id: ::std::option::Option<::std::string::String>,
         126  +
    pub(crate) shared_document_version: ::std::option::Option<::std::string::String>,
         127  +
}
         128  +
impl AccountSharingInfoBuilder {
         129  +
    /// <p>The Amazon Web Services account ID where the current document is shared.</p>
         130  +
    pub fn account_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         131  +
        self.account_id = ::std::option::Option::Some(input.into());
         132  +
        self
         133  +
    }
         134  +
    /// <p>The Amazon Web Services account ID where the current document is shared.</p>
         135  +
    pub fn set_account_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         136  +
        self.account_id = input;
         137  +
        self
         138  +
    }
         139  +
    /// <p>The Amazon Web Services account ID where the current document is shared.</p>
         140  +
    pub fn get_account_id(&self) -> &::std::option::Option<::std::string::String> {
         141  +
        &self.account_id
         142  +
    }
         143  +
    /// <p>The version of the current document shared with the account.</p>
         144  +
    pub fn shared_document_version(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         145  +
        self.shared_document_version = ::std::option::Option::Some(input.into());
         146  +
        self
         147  +
    }
         148  +
    /// <p>The version of the current document shared with the account.</p>
         149  +
    pub fn set_shared_document_version(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         150  +
        self.shared_document_version = input;
         151  +
        self
         152  +
    }
         153  +
    /// <p>The version of the current document shared with the account.</p>
         154  +
    pub fn get_shared_document_version(&self) -> &::std::option::Option<::std::string::String> {
         155  +
        &self.shared_document_version
         156  +
    }
         157  +
    /// Consumes the builder and constructs a [`AccountSharingInfo`](crate::types::AccountSharingInfo).
         158  +
    pub fn build(self) -> crate::types::AccountSharingInfo {
         159  +
        crate::types::AccountSharingInfo {
         160  +
            account_id: self.account_id,
         161  +
            shared_document_version: self.shared_document_version,
         162  +
        }
         163  +
    }
         164  +
}

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

@@ -0,1 +0,495 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
           3  +
/// <p>An activation registers one or more on-premises servers or virtual machines (VMs) with Amazon Web Services so that you can configure those servers or VMs using Run Command. A server or VM that has been registered with Amazon Web Services Systems Manager is called a managed node.</p>
           4  +
#[non_exhaustive]
           5  +
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
           6  +
pub struct Activation {
           7  +
    /// <p>The ID created by Systems Manager when you submitted the activation.</p>
           8  +
    pub activation_id: ::std::option::Option<::std::string::String>,
           9  +
    /// <p>A user defined description of the activation.</p>
          10  +
    pub description: ::std::option::Option<::std::string::String>,
          11  +
    /// <p>A name for the managed node when it is created.</p>
          12  +
    pub default_instance_name: ::std::option::Option<::std::string::String>,
          13  +
    /// <p>The Identity and Access Management (IAM) role to assign to the managed node.</p>
          14  +
    pub iam_role: ::std::option::Option<::std::string::String>,
          15  +
    /// <p>The maximum number of managed nodes that can be registered using this activation.</p>
          16  +
    pub registration_limit: ::std::option::Option<i32>,
          17  +
    /// <p>The number of managed nodes already registered with this activation.</p>
          18  +
    pub registrations_count: ::std::option::Option<i32>,
          19  +
    /// <p>The date when this activation can no longer be used to register managed nodes.</p>
          20  +
    pub expiration_date: ::std::option::Option<::aws_smithy_types::DateTime>,
          21  +
    /// <p>Whether or not the activation is expired.</p>
          22  +
    pub expired: bool,
          23  +
    /// <p>The date the activation was created.</p>
          24  +
    pub created_date: ::std::option::Option<::aws_smithy_types::DateTime>,
          25  +
    /// <p>Tags assigned to the activation.</p>
          26  +
    pub tags: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
          27  +
}
          28  +
impl Activation {
          29  +
    /// <p>The ID created by Systems Manager when you submitted the activation.</p>
          30  +
    pub fn activation_id(&self) -> ::std::option::Option<&str> {
          31  +
        self.activation_id.as_deref()
          32  +
    }
          33  +
    /// <p>A user defined description of the activation.</p>
          34  +
    pub fn description(&self) -> ::std::option::Option<&str> {
          35  +
        self.description.as_deref()
          36  +
    }
          37  +
    /// <p>A name for the managed node when it is created.</p>
          38  +
    pub fn default_instance_name(&self) -> ::std::option::Option<&str> {
          39  +
        self.default_instance_name.as_deref()
          40  +
    }
          41  +
    /// <p>The Identity and Access Management (IAM) role to assign to the managed node.</p>
          42  +
    pub fn iam_role(&self) -> ::std::option::Option<&str> {
          43  +
        self.iam_role.as_deref()
          44  +
    }
          45  +
    /// <p>The maximum number of managed nodes that can be registered using this activation.</p>
          46  +
    pub fn registration_limit(&self) -> ::std::option::Option<i32> {
          47  +
        self.registration_limit
          48  +
    }
          49  +
    /// <p>The number of managed nodes already registered with this activation.</p>
          50  +
    pub fn registrations_count(&self) -> ::std::option::Option<i32> {
          51  +
        self.registrations_count
          52  +
    }
          53  +
    /// <p>The date when this activation can no longer be used to register managed nodes.</p>
          54  +
    pub fn expiration_date(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
          55  +
        self.expiration_date.as_ref()
          56  +
    }
          57  +
    /// <p>Whether or not the activation is expired.</p>
          58  +
    pub fn expired(&self) -> bool {
          59  +
        self.expired
          60  +
    }
          61  +
    /// <p>The date the activation was created.</p>
          62  +
    pub fn created_date(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
          63  +
        self.created_date.as_ref()
          64  +
    }
          65  +
    /// <p>Tags assigned to the activation.</p>
          66  +
    ///
          67  +
    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.tags.is_none()`.
          68  +
    pub fn tags(&self) -> &[crate::types::Tag] {
          69  +
        self.tags.as_deref().unwrap_or_default()
          70  +
    }
          71  +
}
          72  +
static ACTIVATION_MEMBER_ACTIVATION_ID: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          73  +
    ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#Activation$ActivationId", "com.amazonaws.ssm", "Activation"),
          74  +
    ::aws_smithy_schema::ShapeType::String,
          75  +
    "ActivationId",
          76  +
    0,
          77  +
);
          78  +
static ACTIVATION_MEMBER_DESCRIPTION: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          79  +
    ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#Activation$Description", "com.amazonaws.ssm", "Activation"),
          80  +
    ::aws_smithy_schema::ShapeType::String,
          81  +
    "Description",
          82  +
    1,
          83  +
);
          84  +
static ACTIVATION_MEMBER_DEFAULT_INSTANCE_NAME: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          85  +
    ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#Activation$DefaultInstanceName", "com.amazonaws.ssm", "Activation"),
          86  +
    ::aws_smithy_schema::ShapeType::String,
          87  +
    "DefaultInstanceName",
          88  +
    2,
          89  +
);
          90  +
static ACTIVATION_MEMBER_IAM_ROLE: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          91  +
    ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#Activation$IamRole", "com.amazonaws.ssm", "Activation"),
          92  +
    ::aws_smithy_schema::ShapeType::String,
          93  +
    "IamRole",
          94  +
    3,
          95  +
);
          96  +
static ACTIVATION_MEMBER_REGISTRATION_LIMIT: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          97  +
    ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#Activation$RegistrationLimit", "com.amazonaws.ssm", "Activation"),
          98  +
    ::aws_smithy_schema::ShapeType::Integer,
          99  +
    "RegistrationLimit",
         100  +
    4,
         101  +
);
         102  +
static ACTIVATION_MEMBER_REGISTRATIONS_COUNT: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
         103  +
    ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#Activation$RegistrationsCount", "com.amazonaws.ssm", "Activation"),
         104  +
    ::aws_smithy_schema::ShapeType::Integer,
         105  +
    "RegistrationsCount",
         106  +
    5,
         107  +
);
         108  +
static ACTIVATION_MEMBER_EXPIRATION_DATE: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
         109  +
    ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#Activation$ExpirationDate", "com.amazonaws.ssm", "Activation"),
         110  +
    ::aws_smithy_schema::ShapeType::Timestamp,
         111  +
    "ExpirationDate",
         112  +
    6,
         113  +
);
         114  +
static ACTIVATION_MEMBER_EXPIRED: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
         115  +
    ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#Activation$Expired", "com.amazonaws.ssm", "Activation"),
         116  +
    ::aws_smithy_schema::ShapeType::Boolean,
         117  +
    "Expired",
         118  +
    7,
         119  +
);
         120  +
static ACTIVATION_MEMBER_CREATED_DATE: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
         121  +
    ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#Activation$CreatedDate", "com.amazonaws.ssm", "Activation"),
         122  +
    ::aws_smithy_schema::ShapeType::Timestamp,
         123  +
    "CreatedDate",
         124  +
    8,
         125  +
);
         126  +
static ACTIVATION_MEMBER_TAGS_MEMBER: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
         127  +
    ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#TagList$member", "com.amazonaws.ssm", "TagList"),
         128  +
    ::aws_smithy_schema::ShapeType::Structure,
         129  +
    "member",
         130  +
    0,
         131  +
);
         132  +
static ACTIVATION_MEMBER_TAGS: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
         133  +
    ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#Activation$Tags", "com.amazonaws.ssm", "Activation"),
         134  +
    ::aws_smithy_schema::ShapeType::List,
         135  +
    "Tags",
         136  +
    9,
         137  +
)
         138  +
.with_list_member(&ACTIVATION_MEMBER_TAGS_MEMBER);
         139  +
static ACTIVATION_SCHEMA: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_struct(
         140  +
    ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#Activation", "com.amazonaws.ssm", "Activation"),
         141  +
    ::aws_smithy_schema::ShapeType::Structure,
         142  +
    &[
         143  +
        &ACTIVATION_MEMBER_ACTIVATION_ID,
         144  +
        &ACTIVATION_MEMBER_DESCRIPTION,
         145  +
        &ACTIVATION_MEMBER_DEFAULT_INSTANCE_NAME,
         146  +
        &ACTIVATION_MEMBER_IAM_ROLE,
         147  +
        &ACTIVATION_MEMBER_REGISTRATION_LIMIT,
         148  +
        &ACTIVATION_MEMBER_REGISTRATIONS_COUNT,
         149  +
        &ACTIVATION_MEMBER_EXPIRATION_DATE,
         150  +
        &ACTIVATION_MEMBER_EXPIRED,
         151  +
        &ACTIVATION_MEMBER_CREATED_DATE,
         152  +
        &ACTIVATION_MEMBER_TAGS,
         153  +
    ],
         154  +
);
         155  +
impl Activation {
         156  +
    /// The schema for this shape.
         157  +
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema<'static> = &ACTIVATION_SCHEMA;
         158  +
}
         159  +
impl ::aws_smithy_schema::serde::SerializableStruct for Activation {
         160  +
    #[allow(unused_variables, clippy::diverging_sub_expression)]
         161  +
    fn serialize_members(
         162  +
        &self,
         163  +
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
         164  +
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
         165  +
        if let Some(ref val) = self.activation_id {
         166  +
            ser.write_string(&ACTIVATION_MEMBER_ACTIVATION_ID, val)?;
         167  +
        }
         168  +
        if let Some(ref val) = self.description {
         169  +
            ser.write_string(&ACTIVATION_MEMBER_DESCRIPTION, val)?;
         170  +
        }
         171  +
        if let Some(ref val) = self.default_instance_name {
         172  +
            ser.write_string(&ACTIVATION_MEMBER_DEFAULT_INSTANCE_NAME, val)?;
         173  +
        }
         174  +
        if let Some(ref val) = self.iam_role {
         175  +
            ser.write_string(&ACTIVATION_MEMBER_IAM_ROLE, val)?;
         176  +
        }
         177  +
        if let Some(ref val) = self.registration_limit {
         178  +
            ser.write_integer(&ACTIVATION_MEMBER_REGISTRATION_LIMIT, *val)?;
         179  +
        }
         180  +
        if let Some(ref val) = self.registrations_count {
         181  +
            ser.write_integer(&ACTIVATION_MEMBER_REGISTRATIONS_COUNT, *val)?;
         182  +
        }
         183  +
        if let Some(ref val) = self.expiration_date {
         184  +
            ser.write_timestamp(&ACTIVATION_MEMBER_EXPIRATION_DATE, val)?;
         185  +
        }
         186  +
        {
         187  +
            let val = &self.expired;
         188  +
            ser.write_boolean(&ACTIVATION_MEMBER_EXPIRED, *val)?;
         189  +
        }
         190  +
        if let Some(ref val) = self.created_date {
         191  +
            ser.write_timestamp(&ACTIVATION_MEMBER_CREATED_DATE, val)?;
         192  +
        }
         193  +
        if let Some(ref val) = self.tags {
         194  +
            ser.write_list(&ACTIVATION_MEMBER_TAGS, &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
         195  +
                for item in val {
         196  +
                    ser.write_struct(crate::types::Tag::SCHEMA, item)?;
         197  +
                }
         198  +
                Ok(())
         199  +
            })?;
         200  +
        }
         201  +
        Ok(())
         202  +
    }
         203  +
}
         204  +
impl Activation {
         205  +
    /// Deserializes this structure from a [`ShapeDeserializer`].
         206  +
    pub fn deserialize(
         207  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         208  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         209  +
        #[allow(unused_variables, unused_mut)]
         210  +
        let mut builder = Self::builder();
         211  +
        #[allow(
         212  +
            unused_variables,
         213  +
            unreachable_code,
         214  +
            clippy::single_match,
         215  +
            clippy::match_single_binding,
         216  +
            clippy::diverging_sub_expression
         217  +
        )]
         218  +
        deserializer.read_struct(&ACTIVATION_SCHEMA, &mut |member, deser| {
         219  +
            match member.member_index() {
         220  +
                Some(0) => {
         221  +
                    if deser.is_null() {
         222  +
                        deser.read_null()?;
         223  +
                    } else {
         224  +
                        builder.activation_id = Some(deser.read_string(member)?);
         225  +
                    }
         226  +
                }
         227  +
                Some(1) => {
         228  +
                    if deser.is_null() {
         229  +
                        deser.read_null()?;
         230  +
                    } else {
         231  +
                        builder.description = Some(deser.read_string(member)?);
         232  +
                    }
         233  +
                }
         234  +
                Some(2) => {
         235  +
                    if deser.is_null() {
         236  +
                        deser.read_null()?;
         237  +
                    } else {
         238  +
                        builder.default_instance_name = Some(deser.read_string(member)?);
         239  +
                    }
         240  +
                }
         241  +
                Some(3) => {
         242  +
                    if deser.is_null() {
         243  +
                        deser.read_null()?;
         244  +
                    } else {
         245  +
                        builder.iam_role = Some(deser.read_string(member)?);
         246  +
                    }
         247  +
                }
         248  +
                Some(4) => {
         249  +
                    if deser.is_null() {
         250  +
                        deser.read_null()?;
         251  +
                    } else {
         252  +
                        builder.registration_limit = Some(deser.read_integer(member)?);
         253  +
                    }
         254  +
                }
         255  +
                Some(5) => {
         256  +
                    if deser.is_null() {
         257  +
                        deser.read_null()?;
         258  +
                    } else {
         259  +
                        builder.registrations_count = Some(deser.read_integer(member)?);
         260  +
                    }
         261  +
                }
         262  +
                Some(6) => {
         263  +
                    if deser.is_null() {
         264  +
                        deser.read_null()?;
         265  +
                    } else {
         266  +
                        builder.expiration_date = Some(deser.read_timestamp(member)?);
         267  +
                    }
         268  +
                }
         269  +
                Some(7) => {
         270  +
                    builder.expired = Some(deser.read_boolean(member)?);
         271  +
                }
         272  +
                Some(8) => {
         273  +
                    if deser.is_null() {
         274  +
                        deser.read_null()?;
         275  +
                    } else {
         276  +
                        builder.created_date = Some(deser.read_timestamp(member)?);
         277  +
                    }
         278  +
                }
         279  +
                Some(9) => {
         280  +
                    if deser.is_null() {
         281  +
                        deser.read_null()?;
         282  +
                    } else {
         283  +
                        builder.tags = Some({
         284  +
                            let mut container = Vec::new();
         285  +
                            deser.read_list(member, &mut |deser| {
         286  +
                                container.push(crate::types::Tag::deserialize(deser)?);
         287  +
                                Ok(())
         288  +
                            })?;
         289  +
                            container
         290  +
                        });
         291  +
                    }
         292  +
                }
         293  +
                _ => {}
         294  +
            }
         295  +
            Ok(())
         296  +
        })?;
         297  +
        Ok(builder.build())
         298  +
    }
         299  +
}
         300  +
impl Activation {
         301  +
    /// Deserializes this structure from a body deserializer and HTTP response.
         302  +
    pub fn deserialize_with_response(
         303  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         304  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
         305  +
        _status: u16,
         306  +
        _body: &[u8],
         307  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         308  +
        Self::deserialize(deserializer)
         309  +
    }
         310  +
}
         311  +
impl Activation {
         312  +
    /// Creates a new builder-style object to manufacture [`Activation`](crate::types::Activation).
         313  +
    pub fn builder() -> crate::types::builders::ActivationBuilder {
         314  +
        crate::types::builders::ActivationBuilder::default()
         315  +
    }
         316  +
}
         317  +
         318  +
/// A builder for [`Activation`](crate::types::Activation).
         319  +
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
         320  +
#[non_exhaustive]
         321  +
pub struct ActivationBuilder {
         322  +
    pub(crate) activation_id: ::std::option::Option<::std::string::String>,
         323  +
    pub(crate) description: ::std::option::Option<::std::string::String>,
         324  +
    pub(crate) default_instance_name: ::std::option::Option<::std::string::String>,
         325  +
    pub(crate) iam_role: ::std::option::Option<::std::string::String>,
         326  +
    pub(crate) registration_limit: ::std::option::Option<i32>,
         327  +
    pub(crate) registrations_count: ::std::option::Option<i32>,
         328  +
    pub(crate) expiration_date: ::std::option::Option<::aws_smithy_types::DateTime>,
         329  +
    pub(crate) expired: ::std::option::Option<bool>,
         330  +
    pub(crate) created_date: ::std::option::Option<::aws_smithy_types::DateTime>,
         331  +
    pub(crate) tags: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
         332  +
}
         333  +
impl ActivationBuilder {
         334  +
    /// <p>The ID created by Systems Manager when you submitted the activation.</p>
         335  +
    pub fn activation_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         336  +
        self.activation_id = ::std::option::Option::Some(input.into());
         337  +
        self
         338  +
    }
         339  +
    /// <p>The ID created by Systems Manager when you submitted the activation.</p>
         340  +
    pub fn set_activation_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         341  +
        self.activation_id = input;
         342  +
        self
         343  +
    }
         344  +
    /// <p>The ID created by Systems Manager when you submitted the activation.</p>
         345  +
    pub fn get_activation_id(&self) -> &::std::option::Option<::std::string::String> {
         346  +
        &self.activation_id
         347  +
    }
         348  +
    /// <p>A user defined description of the activation.</p>
         349  +
    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         350  +
        self.description = ::std::option::Option::Some(input.into());
         351  +
        self
         352  +
    }
         353  +
    /// <p>A user defined description of the activation.</p>
         354  +
    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         355  +
        self.description = input;
         356  +
        self
         357  +
    }
         358  +
    /// <p>A user defined description of the activation.</p>
         359  +
    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
         360  +
        &self.description
         361  +
    }
         362  +
    /// <p>A name for the managed node when it is created.</p>
         363  +
    pub fn default_instance_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         364  +
        self.default_instance_name = ::std::option::Option::Some(input.into());
         365  +
        self
         366  +
    }
         367  +
    /// <p>A name for the managed node when it is created.</p>
         368  +
    pub fn set_default_instance_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         369  +
        self.default_instance_name = input;
         370  +
        self
         371  +
    }
         372  +
    /// <p>A name for the managed node when it is created.</p>
         373  +
    pub fn get_default_instance_name(&self) -> &::std::option::Option<::std::string::String> {
         374  +
        &self.default_instance_name
         375  +
    }
         376  +
    /// <p>The Identity and Access Management (IAM) role to assign to the managed node.</p>
         377  +
    pub fn iam_role(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         378  +
        self.iam_role = ::std::option::Option::Some(input.into());
         379  +
        self
         380  +
    }
         381  +
    /// <p>The Identity and Access Management (IAM) role to assign to the managed node.</p>
         382  +
    pub fn set_iam_role(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         383  +
        self.iam_role = input;
         384  +
        self
         385  +
    }
         386  +
    /// <p>The Identity and Access Management (IAM) role to assign to the managed node.</p>
         387  +
    pub fn get_iam_role(&self) -> &::std::option::Option<::std::string::String> {
         388  +
        &self.iam_role
         389  +
    }
         390  +
    /// <p>The maximum number of managed nodes that can be registered using this activation.</p>
         391  +
    pub fn registration_limit(mut self, input: i32) -> Self {
         392  +
        self.registration_limit = ::std::option::Option::Some(input);
         393  +
        self
         394  +
    }
         395  +
    /// <p>The maximum number of managed nodes that can be registered using this activation.</p>
         396  +
    pub fn set_registration_limit(mut self, input: ::std::option::Option<i32>) -> Self {
         397  +
        self.registration_limit = input;
         398  +
        self
         399  +
    }
         400  +
    /// <p>The maximum number of managed nodes that can be registered using this activation.</p>
         401  +
    pub fn get_registration_limit(&self) -> &::std::option::Option<i32> {
         402  +
        &self.registration_limit
         403  +
    }
         404  +
    /// <p>The number of managed nodes already registered with this activation.</p>
         405  +
    pub fn registrations_count(mut self, input: i32) -> Self {
         406  +
        self.registrations_count = ::std::option::Option::Some(input);
         407  +
        self
         408  +
    }
         409  +
    /// <p>The number of managed nodes already registered with this activation.</p>
         410  +
    pub fn set_registrations_count(mut self, input: ::std::option::Option<i32>) -> Self {
         411  +
        self.registrations_count = input;
         412  +
        self
         413  +
    }
         414  +
    /// <p>The number of managed nodes already registered with this activation.</p>
         415  +
    pub fn get_registrations_count(&self) -> &::std::option::Option<i32> {
         416  +
        &self.registrations_count
         417  +
    }
         418  +
    /// <p>The date when this activation can no longer be used to register managed nodes.</p>
         419  +
    pub fn expiration_date(mut self, input: ::aws_smithy_types::DateTime) -> Self {
         420  +
        self.expiration_date = ::std::option::Option::Some(input);
         421  +
        self
         422  +
    }
         423  +
    /// <p>The date when this activation can no longer be used to register managed nodes.</p>
         424  +
    pub fn set_expiration_date(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
         425  +
        self.expiration_date = input;
         426  +
        self
         427  +
    }
         428  +
    /// <p>The date when this activation can no longer be used to register managed nodes.</p>
         429  +
    pub fn get_expiration_date(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
         430  +
        &self.expiration_date
         431  +
    }
         432  +
    /// <p>Whether or not the activation is expired.</p>
         433  +
    pub fn expired(mut self, input: bool) -> Self {
         434  +
        self.expired = ::std::option::Option::Some(input);
         435  +
        self
         436  +
    }
         437  +
    /// <p>Whether or not the activation is expired.</p>
         438  +
    pub fn set_expired(mut self, input: ::std::option::Option<bool>) -> Self {
         439  +
        self.expired = input;
         440  +
        self
         441  +
    }
         442  +
    /// <p>Whether or not the activation is expired.</p>
         443  +
    pub fn get_expired(&self) -> &::std::option::Option<bool> {
         444  +
        &self.expired
         445  +
    }
         446  +
    /// <p>The date the activation was created.</p>
         447  +
    pub fn created_date(mut self, input: ::aws_smithy_types::DateTime) -> Self {
         448  +
        self.created_date = ::std::option::Option::Some(input);
         449  +
        self
         450  +
    }
         451  +
    /// <p>The date the activation was created.</p>
         452  +
    pub fn set_created_date(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
         453  +
        self.created_date = input;
         454  +
        self
         455  +
    }
         456  +
    /// <p>The date the activation was created.</p>
         457  +
    pub fn get_created_date(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
         458  +
        &self.created_date
         459  +
    }
         460  +
    /// Appends an item to `tags`.
         461  +
    ///
         462  +
    /// To override the contents of this collection use [`set_tags`](Self::set_tags).
         463  +
    ///
         464  +
    /// <p>Tags assigned to the activation.</p>
         465  +
    pub fn tags(mut self, input: crate::types::Tag) -> Self {
         466  +
        let mut v = self.tags.unwrap_or_default();
         467  +
        v.push(input);
         468  +
        self.tags = ::std::option::Option::Some(v);
         469  +
        self
         470  +
    }
         471  +
    /// <p>Tags assigned to the activation.</p>
         472  +
    pub fn set_tags(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>) -> Self {
         473  +
        self.tags = input;
         474  +
        self
         475  +
    }
         476  +
    /// <p>Tags assigned to the activation.</p>
         477  +
    pub fn get_tags(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Tag>> {
         478  +
        &self.tags
         479  +
    }
         480  +
    /// Consumes the builder and constructs a [`Activation`](crate::types::Activation).
         481  +
    pub fn build(self) -> crate::types::Activation {
         482  +
        crate::types::Activation {
         483  +
            activation_id: self.activation_id,
         484  +
            description: self.description,
         485  +
            default_instance_name: self.default_instance_name,
         486  +
            iam_role: self.iam_role,
         487  +
            registration_limit: self.registration_limit,
         488  +
            registrations_count: self.registrations_count,
         489  +
            expiration_date: self.expiration_date,
         490  +
            expired: self.expired.unwrap_or_default(),
         491  +
            created_date: self.created_date,
         492  +
            tags: self.tags,
         493  +
        }
         494  +
    }
         495  +
}

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

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