AWS SDK

AWS SDK

rev. bbca34fa2eddb4be623fbbc6b6df1a2401de0029

Files changed:

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

@@ -0,1 +0,175 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
           3  +
/// <p>The updated status is the same as the current status.</p>
           4  +
#[non_exhaustive]
           5  +
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
           6  +
pub struct StatusUnchanged {
           7  +
    #[allow(missing_docs)] // documentation missing in model
           8  +
    pub message: ::std::option::Option<::std::string::String>,
           9  +
    pub(crate) meta: ::aws_smithy_types::error::ErrorMetadata,
          10  +
}
          11  +
static STATUSUNCHANGED_MEMBER_MESSAGE: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          12  +
    ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#StatusUnchanged$Message", "com.amazonaws.ssm", "StatusUnchanged"),
          13  +
    ::aws_smithy_schema::ShapeType::String,
          14  +
    "Message",
          15  +
    0,
          16  +
);
          17  +
static STATUSUNCHANGED_TRAITS: std::sync::LazyLock<::aws_smithy_schema::TraitMap> = std::sync::LazyLock::new(|| {
          18  +
    let mut map = ::aws_smithy_schema::TraitMap::new();
          19  +
    map.insert(Box::new(::aws_smithy_schema::DocumentTrait::new(
          20  +
        ::aws_smithy_schema::ShapeId::from_parts("aws.protocols#awsQueryError", "aws.protocols", "awsQueryError"),
          21  +
        {
          22  +
            let mut obj = ::aws_smithy_types::document::DocumentObject::new();
          23  +
            obj.insert("code".to_string(), ::aws_smithy_types::Document::String("StatusUnchanged".to_string()));
          24  +
            obj.insert(
          25  +
                "httpResponseCode".to_string(),
          26  +
                ::aws_smithy_types::Document::Number(::aws_smithy_types::Number::PosInt(400u64)),
          27  +
            );
          28  +
            ::aws_smithy_types::Document::Object(obj)
          29  +
        },
          30  +
    )));
          31  +
    map
          32  +
});
          33  +
static STATUSUNCHANGED_SCHEMA: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_struct(
          34  +
    ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#StatusUnchanged", "com.amazonaws.ssm", "StatusUnchanged"),
          35  +
    ::aws_smithy_schema::ShapeType::Structure,
          36  +
    &[&STATUSUNCHANGED_MEMBER_MESSAGE],
          37  +
)
          38  +
.with_traits(&STATUSUNCHANGED_TRAITS);
          39  +
impl StatusUnchanged {
          40  +
    /// The schema for this shape.
          41  +
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema<'static> = &STATUSUNCHANGED_SCHEMA;
          42  +
}
          43  +
impl ::aws_smithy_schema::serde::SerializableStruct for StatusUnchanged {
          44  +
    #[allow(unused_variables, clippy::diverging_sub_expression)]
          45  +
    fn serialize_members(
          46  +
        &self,
          47  +
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
          48  +
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
          49  +
        if let Some(ref val) = self.message {
          50  +
            ser.write_string(&STATUSUNCHANGED_MEMBER_MESSAGE, val)?;
          51  +
        }
          52  +
        Ok(())
          53  +
    }
          54  +
}
          55  +
impl StatusUnchanged {
          56  +
    /// Deserializes this structure from a [`ShapeDeserializer`].
          57  +
    pub fn deserialize(
          58  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
          59  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
          60  +
        #[allow(unused_variables, unused_mut)]
          61  +
        let mut builder = Self::builder();
          62  +
        #[allow(
          63  +
            unused_variables,
          64  +
            unreachable_code,
          65  +
            clippy::single_match,
          66  +
            clippy::match_single_binding,
          67  +
            clippy::diverging_sub_expression
          68  +
        )]
          69  +
        deserializer.read_struct(&STATUSUNCHANGED_SCHEMA, &mut |member, deser| {
          70  +
            match member.member_index() {
          71  +
                Some(0) => {
          72  +
                    if deser.is_null() {
          73  +
                        deser.read_null()?;
          74  +
                    } else {
          75  +
                        builder.message = Some(deser.read_string(member)?);
          76  +
                    }
          77  +
                }
          78  +
                _ => {}
          79  +
            }
          80  +
            Ok(())
          81  +
        })?;
          82  +
        Ok(builder.build())
          83  +
    }
          84  +
}
          85  +
impl StatusUnchanged {
          86  +
    /// Deserializes this structure from a body deserializer and HTTP response.
          87  +
    pub fn deserialize_with_response(
          88  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
          89  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
          90  +
        _status: u16,
          91  +
        body: &[u8],
          92  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
          93  +
        if body.is_empty() {
          94  +
            return Ok(Self::builder().build());
          95  +
        }
          96  +
        Self::deserialize(deserializer)
          97  +
    }
          98  +
}
          99  +
impl StatusUnchanged {
         100  +
    /// Returns the error message.
         101  +
    pub fn message(&self) -> ::std::option::Option<&str> {
         102  +
        self.message.as_deref()
         103  +
    }
         104  +
}
         105  +
impl ::std::fmt::Display for StatusUnchanged {
         106  +
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
         107  +
        ::std::write!(f, "StatusUnchanged")?;
         108  +
        if let ::std::option::Option::Some(inner_1) = &self.message {
         109  +
            {
         110  +
                ::std::write!(f, ": {inner_1}")?;
         111  +
            }
         112  +
        }
         113  +
        Ok(())
         114  +
    }
         115  +
}
         116  +
impl ::std::error::Error for StatusUnchanged {}
         117  +
impl ::aws_types::request_id::RequestId for crate::types::error::StatusUnchanged {
         118  +
    fn request_id(&self) -> Option<&str> {
         119  +
        use ::aws_smithy_types::error::metadata::ProvideErrorMetadata;
         120  +
        self.meta().request_id()
         121  +
    }
         122  +
}
         123  +
impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for StatusUnchanged {
         124  +
    fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
         125  +
        &self.meta
         126  +
    }
         127  +
}
         128  +
impl StatusUnchanged {
         129  +
    /// Creates a new builder-style object to manufacture [`StatusUnchanged`](crate::types::error::StatusUnchanged).
         130  +
    pub fn builder() -> crate::types::error::builders::StatusUnchangedBuilder {
         131  +
        crate::types::error::builders::StatusUnchangedBuilder::default()
         132  +
    }
         133  +
}
         134  +
         135  +
/// A builder for [`StatusUnchanged`](crate::types::error::StatusUnchanged).
         136  +
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
         137  +
#[non_exhaustive]
         138  +
pub struct StatusUnchangedBuilder {
         139  +
    pub(crate) message: ::std::option::Option<::std::string::String>,
         140  +
    meta: std::option::Option<::aws_smithy_types::error::ErrorMetadata>,
         141  +
}
         142  +
impl StatusUnchangedBuilder {
         143  +
    #[allow(missing_docs)] // documentation missing in model
         144  +
    pub fn message(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         145  +
        self.message = ::std::option::Option::Some(input.into());
         146  +
        self
         147  +
    }
         148  +
    #[allow(missing_docs)] // documentation missing in model
         149  +
    pub fn set_message(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         150  +
        self.message = input;
         151  +
        self
         152  +
    }
         153  +
    #[allow(missing_docs)] // documentation missing in model
         154  +
    pub fn get_message(&self) -> &::std::option::Option<::std::string::String> {
         155  +
        &self.message
         156  +
    }
         157  +
    /// Sets error metadata
         158  +
    pub fn meta(mut self, meta: ::aws_smithy_types::error::ErrorMetadata) -> Self {
         159  +
        self.meta = Some(meta);
         160  +
        self
         161  +
    }
         162  +
         163  +
    /// Sets error metadata
         164  +
    pub fn set_meta(&mut self, meta: std::option::Option<::aws_smithy_types::error::ErrorMetadata>) -> &mut Self {
         165  +
        self.meta = meta;
         166  +
        self
         167  +
    }
         168  +
    /// Consumes the builder and constructs a [`StatusUnchanged`](crate::types::error::StatusUnchanged).
         169  +
    pub fn build(self) -> crate::types::error::StatusUnchanged {
         170  +
        crate::types::error::StatusUnchanged {
         171  +
            message: self.message,
         172  +
            meta: self.meta.unwrap_or_default(),
         173  +
        }
         174  +
    }
         175  +
}

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

@@ -0,1 +0,186 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
           3  +
/// <p>The sub-type count exceeded the limit for the inventory type.</p>
           4  +
#[non_exhaustive]
           5  +
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
           6  +
pub struct SubTypeCountLimitExceededException {
           7  +
    #[allow(missing_docs)] // documentation missing in model
           8  +
    pub message: ::std::option::Option<::std::string::String>,
           9  +
    pub(crate) meta: ::aws_smithy_types::error::ErrorMetadata,
          10  +
}
          11  +
static SUBTYPECOUNTLIMITEXCEEDEDEXCEPTION_MEMBER_MESSAGE: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          12  +
    ::aws_smithy_schema::ShapeId::from_parts(
          13  +
        "com.amazonaws.ssm#SubTypeCountLimitExceededException$Message",
          14  +
        "com.amazonaws.ssm",
          15  +
        "SubTypeCountLimitExceededException",
          16  +
    ),
          17  +
    ::aws_smithy_schema::ShapeType::String,
          18  +
    "Message",
          19  +
    0,
          20  +
);
          21  +
static SUBTYPECOUNTLIMITEXCEEDEDEXCEPTION_TRAITS: std::sync::LazyLock<::aws_smithy_schema::TraitMap> = std::sync::LazyLock::new(|| {
          22  +
    let mut map = ::aws_smithy_schema::TraitMap::new();
          23  +
    map.insert(Box::new(::aws_smithy_schema::DocumentTrait::new(
          24  +
        ::aws_smithy_schema::ShapeId::from_parts("aws.protocols#awsQueryError", "aws.protocols", "awsQueryError"),
          25  +
        {
          26  +
            let mut obj = ::aws_smithy_types::document::DocumentObject::new();
          27  +
            obj.insert(
          28  +
                "code".to_string(),
          29  +
                ::aws_smithy_types::Document::String("SubTypeCountLimitExceeded".to_string()),
          30  +
            );
          31  +
            obj.insert(
          32  +
                "httpResponseCode".to_string(),
          33  +
                ::aws_smithy_types::Document::Number(::aws_smithy_types::Number::PosInt(400u64)),
          34  +
            );
          35  +
            ::aws_smithy_types::Document::Object(obj)
          36  +
        },
          37  +
    )));
          38  +
    map
          39  +
});
          40  +
static SUBTYPECOUNTLIMITEXCEEDEDEXCEPTION_SCHEMA: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_struct(
          41  +
    ::aws_smithy_schema::ShapeId::from_parts(
          42  +
        "com.amazonaws.ssm#SubTypeCountLimitExceededException",
          43  +
        "com.amazonaws.ssm",
          44  +
        "SubTypeCountLimitExceededException",
          45  +
    ),
          46  +
    ::aws_smithy_schema::ShapeType::Structure,
          47  +
    &[&SUBTYPECOUNTLIMITEXCEEDEDEXCEPTION_MEMBER_MESSAGE],
          48  +
)
          49  +
.with_traits(&SUBTYPECOUNTLIMITEXCEEDEDEXCEPTION_TRAITS);
          50  +
impl SubTypeCountLimitExceededException {
          51  +
    /// The schema for this shape.
          52  +
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema<'static> = &SUBTYPECOUNTLIMITEXCEEDEDEXCEPTION_SCHEMA;
          53  +
}
          54  +
impl ::aws_smithy_schema::serde::SerializableStruct for SubTypeCountLimitExceededException {
          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  +
        if let Some(ref val) = self.message {
          61  +
            ser.write_string(&SUBTYPECOUNTLIMITEXCEEDEDEXCEPTION_MEMBER_MESSAGE, val)?;
          62  +
        }
          63  +
        Ok(())
          64  +
    }
          65  +
}
          66  +
impl SubTypeCountLimitExceededException {
          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(&SUBTYPECOUNTLIMITEXCEEDEDEXCEPTION_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.message = Some(deser.read_string(member)?);
          87  +
                    }
          88  +
                }
          89  +
                _ => {}
          90  +
            }
          91  +
            Ok(())
          92  +
        })?;
          93  +
        Ok(builder.build())
          94  +
    }
          95  +
}
          96  +
impl SubTypeCountLimitExceededException {
          97  +
    /// Deserializes this structure from a body deserializer and HTTP response.
          98  +
    pub fn deserialize_with_response(
          99  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         100  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
         101  +
        _status: u16,
         102  +
        body: &[u8],
         103  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         104  +
        if body.is_empty() {
         105  +
            return Ok(Self::builder().build());
         106  +
        }
         107  +
        Self::deserialize(deserializer)
         108  +
    }
         109  +
}
         110  +
impl SubTypeCountLimitExceededException {
         111  +
    /// Returns the error message.
         112  +
    pub fn message(&self) -> ::std::option::Option<&str> {
         113  +
        self.message.as_deref()
         114  +
    }
         115  +
}
         116  +
impl ::std::fmt::Display for SubTypeCountLimitExceededException {
         117  +
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
         118  +
        ::std::write!(f, "SubTypeCountLimitExceededException")?;
         119  +
        if let ::std::option::Option::Some(inner_1) = &self.message {
         120  +
            {
         121  +
                ::std::write!(f, ": {inner_1}")?;
         122  +
            }
         123  +
        }
         124  +
        Ok(())
         125  +
    }
         126  +
}
         127  +
impl ::std::error::Error for SubTypeCountLimitExceededException {}
         128  +
impl ::aws_types::request_id::RequestId for crate::types::error::SubTypeCountLimitExceededException {
         129  +
    fn request_id(&self) -> Option<&str> {
         130  +
        use ::aws_smithy_types::error::metadata::ProvideErrorMetadata;
         131  +
        self.meta().request_id()
         132  +
    }
         133  +
}
         134  +
impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for SubTypeCountLimitExceededException {
         135  +
    fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
         136  +
        &self.meta
         137  +
    }
         138  +
}
         139  +
impl SubTypeCountLimitExceededException {
         140  +
    /// Creates a new builder-style object to manufacture [`SubTypeCountLimitExceededException`](crate::types::error::SubTypeCountLimitExceededException).
         141  +
    pub fn builder() -> crate::types::error::builders::SubTypeCountLimitExceededExceptionBuilder {
         142  +
        crate::types::error::builders::SubTypeCountLimitExceededExceptionBuilder::default()
         143  +
    }
         144  +
}
         145  +
         146  +
/// A builder for [`SubTypeCountLimitExceededException`](crate::types::error::SubTypeCountLimitExceededException).
         147  +
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
         148  +
#[non_exhaustive]
         149  +
pub struct SubTypeCountLimitExceededExceptionBuilder {
         150  +
    pub(crate) message: ::std::option::Option<::std::string::String>,
         151  +
    meta: std::option::Option<::aws_smithy_types::error::ErrorMetadata>,
         152  +
}
         153  +
impl SubTypeCountLimitExceededExceptionBuilder {
         154  +
    #[allow(missing_docs)] // documentation missing in model
         155  +
    pub fn message(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         156  +
        self.message = ::std::option::Option::Some(input.into());
         157  +
        self
         158  +
    }
         159  +
    #[allow(missing_docs)] // documentation missing in model
         160  +
    pub fn set_message(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         161  +
        self.message = input;
         162  +
        self
         163  +
    }
         164  +
    #[allow(missing_docs)] // documentation missing in model
         165  +
    pub fn get_message(&self) -> &::std::option::Option<::std::string::String> {
         166  +
        &self.message
         167  +
    }
         168  +
    /// Sets error metadata
         169  +
    pub fn meta(mut self, meta: ::aws_smithy_types::error::ErrorMetadata) -> Self {
         170  +
        self.meta = Some(meta);
         171  +
        self
         172  +
    }
         173  +
         174  +
    /// Sets error metadata
         175  +
    pub fn set_meta(&mut self, meta: std::option::Option<::aws_smithy_types::error::ErrorMetadata>) -> &mut Self {
         176  +
        self.meta = meta;
         177  +
        self
         178  +
    }
         179  +
    /// Consumes the builder and constructs a [`SubTypeCountLimitExceededException`](crate::types::error::SubTypeCountLimitExceededException).
         180  +
    pub fn build(self) -> crate::types::error::SubTypeCountLimitExceededException {
         181  +
        crate::types::error::SubTypeCountLimitExceededException {
         182  +
            message: self.message,
         183  +
            meta: self.meta.unwrap_or_default(),
         184  +
        }
         185  +
    }
         186  +
}

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

@@ -0,1 +0,182 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
           3  +
/// <p>You specified the <code>Safe</code> option for the DeregisterTargetFromMaintenanceWindow operation, but the target is still referenced in a task.</p>
           4  +
#[non_exhaustive]
           5  +
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
           6  +
pub struct TargetInUseException {
           7  +
    #[allow(missing_docs)] // documentation missing in model
           8  +
    pub message: ::std::option::Option<::std::string::String>,
           9  +
    pub(crate) meta: ::aws_smithy_types::error::ErrorMetadata,
          10  +
}
          11  +
static TARGETINUSEEXCEPTION_MEMBER_MESSAGE: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          12  +
    ::aws_smithy_schema::ShapeId::from_parts(
          13  +
        "com.amazonaws.ssm#TargetInUseException$Message",
          14  +
        "com.amazonaws.ssm",
          15  +
        "TargetInUseException",
          16  +
    ),
          17  +
    ::aws_smithy_schema::ShapeType::String,
          18  +
    "Message",
          19  +
    0,
          20  +
);
          21  +
static TARGETINUSEEXCEPTION_TRAITS: std::sync::LazyLock<::aws_smithy_schema::TraitMap> = std::sync::LazyLock::new(|| {
          22  +
    let mut map = ::aws_smithy_schema::TraitMap::new();
          23  +
    map.insert(Box::new(::aws_smithy_schema::DocumentTrait::new(
          24  +
        ::aws_smithy_schema::ShapeId::from_parts("aws.protocols#awsQueryError", "aws.protocols", "awsQueryError"),
          25  +
        {
          26  +
            let mut obj = ::aws_smithy_types::document::DocumentObject::new();
          27  +
            obj.insert(
          28  +
                "code".to_string(),
          29  +
                ::aws_smithy_types::Document::String("TargetInUseException".to_string()),
          30  +
            );
          31  +
            obj.insert(
          32  +
                "httpResponseCode".to_string(),
          33  +
                ::aws_smithy_types::Document::Number(::aws_smithy_types::Number::PosInt(400u64)),
          34  +
            );
          35  +
            ::aws_smithy_types::Document::Object(obj)
          36  +
        },
          37  +
    )));
          38  +
    map
          39  +
});
          40  +
static TARGETINUSEEXCEPTION_SCHEMA: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_struct(
          41  +
    ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#TargetInUseException", "com.amazonaws.ssm", "TargetInUseException"),
          42  +
    ::aws_smithy_schema::ShapeType::Structure,
          43  +
    &[&TARGETINUSEEXCEPTION_MEMBER_MESSAGE],
          44  +
)
          45  +
.with_traits(&TARGETINUSEEXCEPTION_TRAITS);
          46  +
impl TargetInUseException {
          47  +
    /// The schema for this shape.
          48  +
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema<'static> = &TARGETINUSEEXCEPTION_SCHEMA;
          49  +
}
          50  +
impl ::aws_smithy_schema::serde::SerializableStruct for TargetInUseException {
          51  +
    #[allow(unused_variables, clippy::diverging_sub_expression)]
          52  +
    fn serialize_members(
          53  +
        &self,
          54  +
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
          55  +
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
          56  +
        if let Some(ref val) = self.message {
          57  +
            ser.write_string(&TARGETINUSEEXCEPTION_MEMBER_MESSAGE, val)?;
          58  +
        }
          59  +
        Ok(())
          60  +
    }
          61  +
}
          62  +
impl TargetInUseException {
          63  +
    /// Deserializes this structure from a [`ShapeDeserializer`].
          64  +
    pub fn deserialize(
          65  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
          66  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
          67  +
        #[allow(unused_variables, unused_mut)]
          68  +
        let mut builder = Self::builder();
          69  +
        #[allow(
          70  +
            unused_variables,
          71  +
            unreachable_code,
          72  +
            clippy::single_match,
          73  +
            clippy::match_single_binding,
          74  +
            clippy::diverging_sub_expression
          75  +
        )]
          76  +
        deserializer.read_struct(&TARGETINUSEEXCEPTION_SCHEMA, &mut |member, deser| {
          77  +
            match member.member_index() {
          78  +
                Some(0) => {
          79  +
                    if deser.is_null() {
          80  +
                        deser.read_null()?;
          81  +
                    } else {
          82  +
                        builder.message = Some(deser.read_string(member)?);
          83  +
                    }
          84  +
                }
          85  +
                _ => {}
          86  +
            }
          87  +
            Ok(())
          88  +
        })?;
          89  +
        Ok(builder.build())
          90  +
    }
          91  +
}
          92  +
impl TargetInUseException {
          93  +
    /// Deserializes this structure from a body deserializer and HTTP response.
          94  +
    pub fn deserialize_with_response(
          95  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
          96  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
          97  +
        _status: u16,
          98  +
        body: &[u8],
          99  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         100  +
        if body.is_empty() {
         101  +
            return Ok(Self::builder().build());
         102  +
        }
         103  +
        Self::deserialize(deserializer)
         104  +
    }
         105  +
}
         106  +
impl TargetInUseException {
         107  +
    /// Returns the error message.
         108  +
    pub fn message(&self) -> ::std::option::Option<&str> {
         109  +
        self.message.as_deref()
         110  +
    }
         111  +
}
         112  +
impl ::std::fmt::Display for TargetInUseException {
         113  +
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
         114  +
        ::std::write!(f, "TargetInUseException")?;
         115  +
        if let ::std::option::Option::Some(inner_1) = &self.message {
         116  +
            {
         117  +
                ::std::write!(f, ": {inner_1}")?;
         118  +
            }
         119  +
        }
         120  +
        Ok(())
         121  +
    }
         122  +
}
         123  +
impl ::std::error::Error for TargetInUseException {}
         124  +
impl ::aws_types::request_id::RequestId for crate::types::error::TargetInUseException {
         125  +
    fn request_id(&self) -> Option<&str> {
         126  +
        use ::aws_smithy_types::error::metadata::ProvideErrorMetadata;
         127  +
        self.meta().request_id()
         128  +
    }
         129  +
}
         130  +
impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for TargetInUseException {
         131  +
    fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
         132  +
        &self.meta
         133  +
    }
         134  +
}
         135  +
impl TargetInUseException {
         136  +
    /// Creates a new builder-style object to manufacture [`TargetInUseException`](crate::types::error::TargetInUseException).
         137  +
    pub fn builder() -> crate::types::error::builders::TargetInUseExceptionBuilder {
         138  +
        crate::types::error::builders::TargetInUseExceptionBuilder::default()
         139  +
    }
         140  +
}
         141  +
         142  +
/// A builder for [`TargetInUseException`](crate::types::error::TargetInUseException).
         143  +
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
         144  +
#[non_exhaustive]
         145  +
pub struct TargetInUseExceptionBuilder {
         146  +
    pub(crate) message: ::std::option::Option<::std::string::String>,
         147  +
    meta: std::option::Option<::aws_smithy_types::error::ErrorMetadata>,
         148  +
}
         149  +
impl TargetInUseExceptionBuilder {
         150  +
    #[allow(missing_docs)] // documentation missing in model
         151  +
    pub fn message(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         152  +
        self.message = ::std::option::Option::Some(input.into());
         153  +
        self
         154  +
    }
         155  +
    #[allow(missing_docs)] // documentation missing in model
         156  +
    pub fn set_message(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         157  +
        self.message = input;
         158  +
        self
         159  +
    }
         160  +
    #[allow(missing_docs)] // documentation missing in model
         161  +
    pub fn get_message(&self) -> &::std::option::Option<::std::string::String> {
         162  +
        &self.message
         163  +
    }
         164  +
    /// Sets error metadata
         165  +
    pub fn meta(mut self, meta: ::aws_smithy_types::error::ErrorMetadata) -> Self {
         166  +
        self.meta = Some(meta);
         167  +
        self
         168  +
    }
         169  +
         170  +
    /// Sets error metadata
         171  +
    pub fn set_meta(&mut self, meta: std::option::Option<::aws_smithy_types::error::ErrorMetadata>) -> &mut Self {
         172  +
        self.meta = meta;
         173  +
        self
         174  +
    }
         175  +
    /// Consumes the builder and constructs a [`TargetInUseException`](crate::types::error::TargetInUseException).
         176  +
    pub fn build(self) -> crate::types::error::TargetInUseException {
         177  +
        crate::types::error::TargetInUseException {
         178  +
            message: self.message,
         179  +
            meta: self.meta.unwrap_or_default(),
         180  +
        }
         181  +
    }
         182  +
}

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

@@ -0,1 +0,175 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
           3  +
/// <p>The specified target managed node for the session isn't fully configured for use with Session Manager. For more information, see <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/session-manager-getting-started.html">Setting up Session Manager</a> in the <i>Amazon Web Services Systems Manager User Guide</i>. This error is also returned if you attempt to start a session on a managed node that is located in a different account or Region</p>
           4  +
#[non_exhaustive]
           5  +
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
           6  +
pub struct TargetNotConnected {
           7  +
    #[allow(missing_docs)] // documentation missing in model
           8  +
    pub message: ::std::option::Option<::std::string::String>,
           9  +
    pub(crate) meta: ::aws_smithy_types::error::ErrorMetadata,
          10  +
}
          11  +
static TARGETNOTCONNECTED_MEMBER_MESSAGE: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          12  +
    ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#TargetNotConnected$Message", "com.amazonaws.ssm", "TargetNotConnected"),
          13  +
    ::aws_smithy_schema::ShapeType::String,
          14  +
    "Message",
          15  +
    0,
          16  +
);
          17  +
static TARGETNOTCONNECTED_TRAITS: std::sync::LazyLock<::aws_smithy_schema::TraitMap> = std::sync::LazyLock::new(|| {
          18  +
    let mut map = ::aws_smithy_schema::TraitMap::new();
          19  +
    map.insert(Box::new(::aws_smithy_schema::DocumentTrait::new(
          20  +
        ::aws_smithy_schema::ShapeId::from_parts("aws.protocols#awsQueryError", "aws.protocols", "awsQueryError"),
          21  +
        {
          22  +
            let mut obj = ::aws_smithy_types::document::DocumentObject::new();
          23  +
            obj.insert("code".to_string(), ::aws_smithy_types::Document::String("TargetNotConnected".to_string()));
          24  +
            obj.insert(
          25  +
                "httpResponseCode".to_string(),
          26  +
                ::aws_smithy_types::Document::Number(::aws_smithy_types::Number::PosInt(430u64)),
          27  +
            );
          28  +
            ::aws_smithy_types::Document::Object(obj)
          29  +
        },
          30  +
    )));
          31  +
    map
          32  +
});
          33  +
static TARGETNOTCONNECTED_SCHEMA: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_struct(
          34  +
    ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#TargetNotConnected", "com.amazonaws.ssm", "TargetNotConnected"),
          35  +
    ::aws_smithy_schema::ShapeType::Structure,
          36  +
    &[&TARGETNOTCONNECTED_MEMBER_MESSAGE],
          37  +
)
          38  +
.with_traits(&TARGETNOTCONNECTED_TRAITS);
          39  +
impl TargetNotConnected {
          40  +
    /// The schema for this shape.
          41  +
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema<'static> = &TARGETNOTCONNECTED_SCHEMA;
          42  +
}
          43  +
impl ::aws_smithy_schema::serde::SerializableStruct for TargetNotConnected {
          44  +
    #[allow(unused_variables, clippy::diverging_sub_expression)]
          45  +
    fn serialize_members(
          46  +
        &self,
          47  +
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
          48  +
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
          49  +
        if let Some(ref val) = self.message {
          50  +
            ser.write_string(&TARGETNOTCONNECTED_MEMBER_MESSAGE, val)?;
          51  +
        }
          52  +
        Ok(())
          53  +
    }
          54  +
}
          55  +
impl TargetNotConnected {
          56  +
    /// Deserializes this structure from a [`ShapeDeserializer`].
          57  +
    pub fn deserialize(
          58  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
          59  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
          60  +
        #[allow(unused_variables, unused_mut)]
          61  +
        let mut builder = Self::builder();
          62  +
        #[allow(
          63  +
            unused_variables,
          64  +
            unreachable_code,
          65  +
            clippy::single_match,
          66  +
            clippy::match_single_binding,
          67  +
            clippy::diverging_sub_expression
          68  +
        )]
          69  +
        deserializer.read_struct(&TARGETNOTCONNECTED_SCHEMA, &mut |member, deser| {
          70  +
            match member.member_index() {
          71  +
                Some(0) => {
          72  +
                    if deser.is_null() {
          73  +
                        deser.read_null()?;
          74  +
                    } else {
          75  +
                        builder.message = Some(deser.read_string(member)?);
          76  +
                    }
          77  +
                }
          78  +
                _ => {}
          79  +
            }
          80  +
            Ok(())
          81  +
        })?;
          82  +
        Ok(builder.build())
          83  +
    }
          84  +
}
          85  +
impl TargetNotConnected {
          86  +
    /// Deserializes this structure from a body deserializer and HTTP response.
          87  +
    pub fn deserialize_with_response(
          88  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
          89  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
          90  +
        _status: u16,
          91  +
        body: &[u8],
          92  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
          93  +
        if body.is_empty() {
          94  +
            return Ok(Self::builder().build());
          95  +
        }
          96  +
        Self::deserialize(deserializer)
          97  +
    }
          98  +
}
          99  +
impl TargetNotConnected {
         100  +
    /// Returns the error message.
         101  +
    pub fn message(&self) -> ::std::option::Option<&str> {
         102  +
        self.message.as_deref()
         103  +
    }
         104  +
}
         105  +
impl ::std::fmt::Display for TargetNotConnected {
         106  +
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
         107  +
        ::std::write!(f, "TargetNotConnected")?;
         108  +
        if let ::std::option::Option::Some(inner_1) = &self.message {
         109  +
            {
         110  +
                ::std::write!(f, ": {inner_1}")?;
         111  +
            }
         112  +
        }
         113  +
        Ok(())
         114  +
    }
         115  +
}
         116  +
impl ::std::error::Error for TargetNotConnected {}
         117  +
impl ::aws_types::request_id::RequestId for crate::types::error::TargetNotConnected {
         118  +
    fn request_id(&self) -> Option<&str> {
         119  +
        use ::aws_smithy_types::error::metadata::ProvideErrorMetadata;
         120  +
        self.meta().request_id()
         121  +
    }
         122  +
}
         123  +
impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for TargetNotConnected {
         124  +
    fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
         125  +
        &self.meta
         126  +
    }
         127  +
}
         128  +
impl TargetNotConnected {
         129  +
    /// Creates a new builder-style object to manufacture [`TargetNotConnected`](crate::types::error::TargetNotConnected).
         130  +
    pub fn builder() -> crate::types::error::builders::TargetNotConnectedBuilder {
         131  +
        crate::types::error::builders::TargetNotConnectedBuilder::default()
         132  +
    }
         133  +
}
         134  +
         135  +
/// A builder for [`TargetNotConnected`](crate::types::error::TargetNotConnected).
         136  +
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
         137  +
#[non_exhaustive]
         138  +
pub struct TargetNotConnectedBuilder {
         139  +
    pub(crate) message: ::std::option::Option<::std::string::String>,
         140  +
    meta: std::option::Option<::aws_smithy_types::error::ErrorMetadata>,
         141  +
}
         142  +
impl TargetNotConnectedBuilder {
         143  +
    #[allow(missing_docs)] // documentation missing in model
         144  +
    pub fn message(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         145  +
        self.message = ::std::option::Option::Some(input.into());
         146  +
        self
         147  +
    }
         148  +
    #[allow(missing_docs)] // documentation missing in model
         149  +
    pub fn set_message(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         150  +
        self.message = input;
         151  +
        self
         152  +
    }
         153  +
    #[allow(missing_docs)] // documentation missing in model
         154  +
    pub fn get_message(&self) -> &::std::option::Option<::std::string::String> {
         155  +
        &self.message
         156  +
    }
         157  +
    /// Sets error metadata
         158  +
    pub fn meta(mut self, meta: ::aws_smithy_types::error::ErrorMetadata) -> Self {
         159  +
        self.meta = Some(meta);
         160  +
        self
         161  +
    }
         162  +
         163  +
    /// Sets error metadata
         164  +
    pub fn set_meta(&mut self, meta: std::option::Option<::aws_smithy_types::error::ErrorMetadata>) -> &mut Self {
         165  +
        self.meta = meta;
         166  +
        self
         167  +
    }
         168  +
    /// Consumes the builder and constructs a [`TargetNotConnected`](crate::types::error::TargetNotConnected).
         169  +
    pub fn build(self) -> crate::types::error::TargetNotConnected {
         170  +
        crate::types::error::TargetNotConnected {
         171  +
            message: self.message,
         172  +
            meta: self.meta.unwrap_or_default(),
         173  +
        }
         174  +
    }
         175  +
}

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

@@ -0,1 +0,258 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
           3  +
/// <p>The request or operation couldn't be performed because the service is throttling requests.</p>
           4  +
#[non_exhaustive]
           5  +
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
           6  +
pub struct ThrottlingException {
           7  +
    #[allow(missing_docs)] // documentation missing in model
           8  +
    pub message: ::std::string::String,
           9  +
    /// <p>The quota code recognized by the Amazon Web Services Service Quotas service.</p>
          10  +
    pub quota_code: ::std::option::Option<::std::string::String>,
          11  +
    /// <p>The code for the Amazon Web Services service that owns the quota.</p>
          12  +
    pub service_code: ::std::option::Option<::std::string::String>,
          13  +
    pub(crate) meta: ::aws_smithy_types::error::ErrorMetadata,
          14  +
}
          15  +
impl ThrottlingException {
          16  +
    /// <p>The quota code recognized by the Amazon Web Services Service Quotas service.</p>
          17  +
    pub fn quota_code(&self) -> ::std::option::Option<&str> {
          18  +
        self.quota_code.as_deref()
          19  +
    }
          20  +
    /// <p>The code for the Amazon Web Services service that owns the quota.</p>
          21  +
    pub fn service_code(&self) -> ::std::option::Option<&str> {
          22  +
        self.service_code.as_deref()
          23  +
    }
          24  +
}
          25  +
static THROTTLINGEXCEPTION_MEMBER_MESSAGE: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          26  +
    ::aws_smithy_schema::ShapeId::from_parts(
          27  +
        "com.amazonaws.ssm#ThrottlingException$Message",
          28  +
        "com.amazonaws.ssm",
          29  +
        "ThrottlingException",
          30  +
    ),
          31  +
    ::aws_smithy_schema::ShapeType::String,
          32  +
    "Message",
          33  +
    0,
          34  +
);
          35  +
static THROTTLINGEXCEPTION_MEMBER_QUOTA_CODE: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          36  +
    ::aws_smithy_schema::ShapeId::from_parts(
          37  +
        "com.amazonaws.ssm#ThrottlingException$QuotaCode",
          38  +
        "com.amazonaws.ssm",
          39  +
        "ThrottlingException",
          40  +
    ),
          41  +
    ::aws_smithy_schema::ShapeType::String,
          42  +
    "QuotaCode",
          43  +
    1,
          44  +
);
          45  +
static THROTTLINGEXCEPTION_MEMBER_SERVICE_CODE: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          46  +
    ::aws_smithy_schema::ShapeId::from_parts(
          47  +
        "com.amazonaws.ssm#ThrottlingException$ServiceCode",
          48  +
        "com.amazonaws.ssm",
          49  +
        "ThrottlingException",
          50  +
    ),
          51  +
    ::aws_smithy_schema::ShapeType::String,
          52  +
    "ServiceCode",
          53  +
    2,
          54  +
);
          55  +
static THROTTLINGEXCEPTION_SCHEMA: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_struct(
          56  +
    ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#ThrottlingException", "com.amazonaws.ssm", "ThrottlingException"),
          57  +
    ::aws_smithy_schema::ShapeType::Structure,
          58  +
    &[
          59  +
        &THROTTLINGEXCEPTION_MEMBER_MESSAGE,
          60  +
        &THROTTLINGEXCEPTION_MEMBER_QUOTA_CODE,
          61  +
        &THROTTLINGEXCEPTION_MEMBER_SERVICE_CODE,
          62  +
    ],
          63  +
);
          64  +
impl ThrottlingException {
          65  +
    /// The schema for this shape.
          66  +
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema<'static> = &THROTTLINGEXCEPTION_SCHEMA;
          67  +
}
          68  +
impl ::aws_smithy_schema::serde::SerializableStruct for ThrottlingException {
          69  +
    #[allow(unused_variables, clippy::diverging_sub_expression)]
          70  +
    fn serialize_members(
          71  +
        &self,
          72  +
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
          73  +
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
          74  +
        {
          75  +
            let val = &self.message;
          76  +
            ser.write_string(&THROTTLINGEXCEPTION_MEMBER_MESSAGE, val)?;
          77  +
        }
          78  +
        if let Some(ref val) = self.quota_code {
          79  +
            ser.write_string(&THROTTLINGEXCEPTION_MEMBER_QUOTA_CODE, val)?;
          80  +
        }
          81  +
        if let Some(ref val) = self.service_code {
          82  +
            ser.write_string(&THROTTLINGEXCEPTION_MEMBER_SERVICE_CODE, val)?;
          83  +
        }
          84  +
        Ok(())
          85  +
    }
          86  +
}
          87  +
impl ThrottlingException {
          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(&THROTTLINGEXCEPTION_SCHEMA, &mut |member, deser| {
         102  +
            match member.member_index() {
         103  +
                Some(0) => {
         104  +
                    builder.message = Some(deser.read_string(member)?);
         105  +
                }
         106  +
                Some(1) => {
         107  +
                    if deser.is_null() {
         108  +
                        deser.read_null()?;
         109  +
                    } else {
         110  +
                        builder.quota_code = Some(deser.read_string(member)?);
         111  +
                    }
         112  +
                }
         113  +
                Some(2) => {
         114  +
                    if deser.is_null() {
         115  +
                        deser.read_null()?;
         116  +
                    } else {
         117  +
                        builder.service_code = Some(deser.read_string(member)?);
         118  +
                    }
         119  +
                }
         120  +
                _ => {}
         121  +
            }
         122  +
            Ok(())
         123  +
        })?;
         124  +
        builder.message = builder.message.or(Some(String::new()));
         125  +
        builder.build().map_err(|e| aws_smithy_schema::serde::SerdeError::custom(e.to_string()))
         126  +
    }
         127  +
}
         128  +
impl ThrottlingException {
         129  +
    /// Deserializes this structure from a body deserializer and HTTP response.
         130  +
    pub fn deserialize_with_response(
         131  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         132  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
         133  +
        _status: u16,
         134  +
        body: &[u8],
         135  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         136  +
        if body.is_empty() {
         137  +
            return Self::builder()
         138  +
                .build()
         139  +
                .map_err(|e| aws_smithy_schema::serde::SerdeError::custom(e.to_string()));
         140  +
        }
         141  +
        Self::deserialize(deserializer)
         142  +
    }
         143  +
}
         144  +
impl ThrottlingException {
         145  +
    /// Returns the error message.
         146  +
    pub fn message(&self) -> &str {
         147  +
        &self.message
         148  +
    }
         149  +
}
         150  +
impl ::std::fmt::Display for ThrottlingException {
         151  +
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
         152  +
        ::std::write!(f, "ThrottlingException")?;
         153  +
        {
         154  +
            ::std::write!(f, ": {}", &self.message)?;
         155  +
        }
         156  +
        Ok(())
         157  +
    }
         158  +
}
         159  +
impl ::std::error::Error for ThrottlingException {}
         160  +
impl ::aws_types::request_id::RequestId for crate::types::error::ThrottlingException {
         161  +
    fn request_id(&self) -> Option<&str> {
         162  +
        use ::aws_smithy_types::error::metadata::ProvideErrorMetadata;
         163  +
        self.meta().request_id()
         164  +
    }
         165  +
}
         166  +
impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for ThrottlingException {
         167  +
    fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
         168  +
        &self.meta
         169  +
    }
         170  +
}
         171  +
impl ThrottlingException {
         172  +
    /// Creates a new builder-style object to manufacture [`ThrottlingException`](crate::types::error::ThrottlingException).
         173  +
    pub fn builder() -> crate::types::error::builders::ThrottlingExceptionBuilder {
         174  +
        crate::types::error::builders::ThrottlingExceptionBuilder::default()
         175  +
    }
         176  +
}
         177  +
         178  +
/// A builder for [`ThrottlingException`](crate::types::error::ThrottlingException).
         179  +
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
         180  +
#[non_exhaustive]
         181  +
pub struct ThrottlingExceptionBuilder {
         182  +
    pub(crate) message: ::std::option::Option<::std::string::String>,
         183  +
    pub(crate) quota_code: ::std::option::Option<::std::string::String>,
         184  +
    pub(crate) service_code: ::std::option::Option<::std::string::String>,
         185  +
    meta: std::option::Option<::aws_smithy_types::error::ErrorMetadata>,
         186  +
}
         187  +
impl ThrottlingExceptionBuilder {
         188  +
    #[allow(missing_docs)] // documentation missing in model
         189  +
    /// This field is required.
         190  +
    pub fn message(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         191  +
        self.message = ::std::option::Option::Some(input.into());
         192  +
        self
         193  +
    }
         194  +
    #[allow(missing_docs)] // documentation missing in model
         195  +
    pub fn set_message(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         196  +
        self.message = input;
         197  +
        self
         198  +
    }
         199  +
    #[allow(missing_docs)] // documentation missing in model
         200  +
    pub fn get_message(&self) -> &::std::option::Option<::std::string::String> {
         201  +
        &self.message
         202  +
    }
         203  +
    /// <p>The quota code recognized by the Amazon Web Services Service Quotas service.</p>
         204  +
    pub fn quota_code(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         205  +
        self.quota_code = ::std::option::Option::Some(input.into());
         206  +
        self
         207  +
    }
         208  +
    /// <p>The quota code recognized by the Amazon Web Services Service Quotas service.</p>
         209  +
    pub fn set_quota_code(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         210  +
        self.quota_code = input;
         211  +
        self
         212  +
    }
         213  +
    /// <p>The quota code recognized by the Amazon Web Services Service Quotas service.</p>
         214  +
    pub fn get_quota_code(&self) -> &::std::option::Option<::std::string::String> {
         215  +
        &self.quota_code
         216  +
    }
         217  +
    /// <p>The code for the Amazon Web Services service that owns the quota.</p>
         218  +
    pub fn service_code(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         219  +
        self.service_code = ::std::option::Option::Some(input.into());
         220  +
        self
         221  +
    }
         222  +
    /// <p>The code for the Amazon Web Services service that owns the quota.</p>
         223  +
    pub fn set_service_code(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         224  +
        self.service_code = input;
         225  +
        self
         226  +
    }
         227  +
    /// <p>The code for the Amazon Web Services service that owns the quota.</p>
         228  +
    pub fn get_service_code(&self) -> &::std::option::Option<::std::string::String> {
         229  +
        &self.service_code
         230  +
    }
         231  +
    /// Sets error metadata
         232  +
    pub fn meta(mut self, meta: ::aws_smithy_types::error::ErrorMetadata) -> Self {
         233  +
        self.meta = Some(meta);
         234  +
        self
         235  +
    }
         236  +
         237  +
    /// Sets error metadata
         238  +
    pub fn set_meta(&mut self, meta: std::option::Option<::aws_smithy_types::error::ErrorMetadata>) -> &mut Self {
         239  +
        self.meta = meta;
         240  +
        self
         241  +
    }
         242  +
    /// Consumes the builder and constructs a [`ThrottlingException`](crate::types::error::ThrottlingException).
         243  +
    /// This method will fail if any of the following fields are not set:
         244  +
    /// - [`message`](crate::types::error::builders::ThrottlingExceptionBuilder::message)
         245  +
    pub fn build(self) -> ::std::result::Result<crate::types::error::ThrottlingException, ::aws_smithy_types::error::operation::BuildError> {
         246  +
        ::std::result::Result::Ok(crate::types::error::ThrottlingException {
         247  +
            message: self.message.ok_or_else(|| {
         248  +
                ::aws_smithy_types::error::operation::BuildError::missing_field(
         249  +
                    "message",
         250  +
                    "message was not specified but it is required when building ThrottlingException",
         251  +
                )
         252  +
            })?,
         253  +
            quota_code: self.quota_code,
         254  +
            service_code: self.service_code,
         255  +
            meta: self.meta.unwrap_or_default(),
         256  +
        })
         257  +
    }
         258  +
}

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

@@ -0,1 +0,175 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
           3  +
/// <p>The <code>Targets</code> parameter includes too many tags. Remove one or more tags and try the command again.</p>
           4  +
#[non_exhaustive]
           5  +
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
           6  +
pub struct TooManyTagsError {
           7  +
    #[allow(missing_docs)] // documentation missing in model
           8  +
    pub message: ::std::option::Option<::std::string::String>,
           9  +
    pub(crate) meta: ::aws_smithy_types::error::ErrorMetadata,
          10  +
}
          11  +
static TOOMANYTAGSERROR_MEMBER_MESSAGE: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          12  +
    ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#TooManyTagsError$Message", "com.amazonaws.ssm", "TooManyTagsError"),
          13  +
    ::aws_smithy_schema::ShapeType::String,
          14  +
    "Message",
          15  +
    0,
          16  +
);
          17  +
static TOOMANYTAGSERROR_TRAITS: std::sync::LazyLock<::aws_smithy_schema::TraitMap> = std::sync::LazyLock::new(|| {
          18  +
    let mut map = ::aws_smithy_schema::TraitMap::new();
          19  +
    map.insert(Box::new(::aws_smithy_schema::DocumentTrait::new(
          20  +
        ::aws_smithy_schema::ShapeId::from_parts("aws.protocols#awsQueryError", "aws.protocols", "awsQueryError"),
          21  +
        {
          22  +
            let mut obj = ::aws_smithy_types::document::DocumentObject::new();
          23  +
            obj.insert("code".to_string(), ::aws_smithy_types::Document::String("TooManyTagsError".to_string()));
          24  +
            obj.insert(
          25  +
                "httpResponseCode".to_string(),
          26  +
                ::aws_smithy_types::Document::Number(::aws_smithy_types::Number::PosInt(400u64)),
          27  +
            );
          28  +
            ::aws_smithy_types::Document::Object(obj)
          29  +
        },
          30  +
    )));
          31  +
    map
          32  +
});
          33  +
static TOOMANYTAGSERROR_SCHEMA: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_struct(
          34  +
    ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#TooManyTagsError", "com.amazonaws.ssm", "TooManyTagsError"),
          35  +
    ::aws_smithy_schema::ShapeType::Structure,
          36  +
    &[&TOOMANYTAGSERROR_MEMBER_MESSAGE],
          37  +
)
          38  +
.with_traits(&TOOMANYTAGSERROR_TRAITS);
          39  +
impl TooManyTagsError {
          40  +
    /// The schema for this shape.
          41  +
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema<'static> = &TOOMANYTAGSERROR_SCHEMA;
          42  +
}
          43  +
impl ::aws_smithy_schema::serde::SerializableStruct for TooManyTagsError {
          44  +
    #[allow(unused_variables, clippy::diverging_sub_expression)]
          45  +
    fn serialize_members(
          46  +
        &self,
          47  +
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
          48  +
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
          49  +
        if let Some(ref val) = self.message {
          50  +
            ser.write_string(&TOOMANYTAGSERROR_MEMBER_MESSAGE, val)?;
          51  +
        }
          52  +
        Ok(())
          53  +
    }
          54  +
}
          55  +
impl TooManyTagsError {
          56  +
    /// Deserializes this structure from a [`ShapeDeserializer`].
          57  +
    pub fn deserialize(
          58  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
          59  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
          60  +
        #[allow(unused_variables, unused_mut)]
          61  +
        let mut builder = Self::builder();
          62  +
        #[allow(
          63  +
            unused_variables,
          64  +
            unreachable_code,
          65  +
            clippy::single_match,
          66  +
            clippy::match_single_binding,
          67  +
            clippy::diverging_sub_expression
          68  +
        )]
          69  +
        deserializer.read_struct(&TOOMANYTAGSERROR_SCHEMA, &mut |member, deser| {
          70  +
            match member.member_index() {
          71  +
                Some(0) => {
          72  +
                    if deser.is_null() {
          73  +
                        deser.read_null()?;
          74  +
                    } else {
          75  +
                        builder.message = Some(deser.read_string(member)?);
          76  +
                    }
          77  +
                }
          78  +
                _ => {}
          79  +
            }
          80  +
            Ok(())
          81  +
        })?;
          82  +
        Ok(builder.build())
          83  +
    }
          84  +
}
          85  +
impl TooManyTagsError {
          86  +
    /// Deserializes this structure from a body deserializer and HTTP response.
          87  +
    pub fn deserialize_with_response(
          88  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
          89  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
          90  +
        _status: u16,
          91  +
        body: &[u8],
          92  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
          93  +
        if body.is_empty() {
          94  +
            return Ok(Self::builder().build());
          95  +
        }
          96  +
        Self::deserialize(deserializer)
          97  +
    }
          98  +
}
          99  +
impl TooManyTagsError {
         100  +
    /// Returns the error message.
         101  +
    pub fn message(&self) -> ::std::option::Option<&str> {
         102  +
        self.message.as_deref()
         103  +
    }
         104  +
}
         105  +
impl ::std::fmt::Display for TooManyTagsError {
         106  +
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
         107  +
        ::std::write!(f, "TooManyTagsError")?;
         108  +
        if let ::std::option::Option::Some(inner_1) = &self.message {
         109  +
            {
         110  +
                ::std::write!(f, ": {inner_1}")?;
         111  +
            }
         112  +
        }
         113  +
        Ok(())
         114  +
    }
         115  +
}
         116  +
impl ::std::error::Error for TooManyTagsError {}
         117  +
impl ::aws_types::request_id::RequestId for crate::types::error::TooManyTagsError {
         118  +
    fn request_id(&self) -> Option<&str> {
         119  +
        use ::aws_smithy_types::error::metadata::ProvideErrorMetadata;
         120  +
        self.meta().request_id()
         121  +
    }
         122  +
}
         123  +
impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for TooManyTagsError {
         124  +
    fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
         125  +
        &self.meta
         126  +
    }
         127  +
}
         128  +
impl TooManyTagsError {
         129  +
    /// Creates a new builder-style object to manufacture [`TooManyTagsError`](crate::types::error::TooManyTagsError).
         130  +
    pub fn builder() -> crate::types::error::builders::TooManyTagsErrorBuilder {
         131  +
        crate::types::error::builders::TooManyTagsErrorBuilder::default()
         132  +
    }
         133  +
}
         134  +
         135  +
/// A builder for [`TooManyTagsError`](crate::types::error::TooManyTagsError).
         136  +
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
         137  +
#[non_exhaustive]
         138  +
pub struct TooManyTagsErrorBuilder {
         139  +
    pub(crate) message: ::std::option::Option<::std::string::String>,
         140  +
    meta: std::option::Option<::aws_smithy_types::error::ErrorMetadata>,
         141  +
}
         142  +
impl TooManyTagsErrorBuilder {
         143  +
    #[allow(missing_docs)] // documentation missing in model
         144  +
    pub fn message(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         145  +
        self.message = ::std::option::Option::Some(input.into());
         146  +
        self
         147  +
    }
         148  +
    #[allow(missing_docs)] // documentation missing in model
         149  +
    pub fn set_message(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         150  +
        self.message = input;
         151  +
        self
         152  +
    }
         153  +
    #[allow(missing_docs)] // documentation missing in model
         154  +
    pub fn get_message(&self) -> &::std::option::Option<::std::string::String> {
         155  +
        &self.message
         156  +
    }
         157  +
    /// Sets error metadata
         158  +
    pub fn meta(mut self, meta: ::aws_smithy_types::error::ErrorMetadata) -> Self {
         159  +
        self.meta = Some(meta);
         160  +
        self
         161  +
    }
         162  +
         163  +
    /// Sets error metadata
         164  +
    pub fn set_meta(&mut self, meta: std::option::Option<::aws_smithy_types::error::ErrorMetadata>) -> &mut Self {
         165  +
        self.meta = meta;
         166  +
        self
         167  +
    }
         168  +
    /// Consumes the builder and constructs a [`TooManyTagsError`](crate::types::error::TooManyTagsError).
         169  +
    pub fn build(self) -> crate::types::error::TooManyTagsError {
         170  +
        crate::types::error::TooManyTagsError {
         171  +
            message: self.message,
         172  +
            meta: self.meta.unwrap_or_default(),
         173  +
        }
         174  +
    }
         175  +
}