AWS SDK

AWS SDK

rev. bbca34fa2eddb4be623fbbc6b6df1a2401de0029

Files changed:

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

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

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

@@ -0,1 +0,186 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
           3  +
/// <p>The content of the association document matches another document. Change the content of the document and try again.</p>
           4  +
#[non_exhaustive]
           5  +
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
           6  +
pub struct DuplicateDocumentContent {
           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 DUPLICATEDOCUMENTCONTENT_MEMBER_MESSAGE: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          12  +
    ::aws_smithy_schema::ShapeId::from_parts(
          13  +
        "com.amazonaws.ssm#DuplicateDocumentContent$Message",
          14  +
        "com.amazonaws.ssm",
          15  +
        "DuplicateDocumentContent",
          16  +
    ),
          17  +
    ::aws_smithy_schema::ShapeType::String,
          18  +
    "Message",
          19  +
    0,
          20  +
);
          21  +
static DUPLICATEDOCUMENTCONTENT_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("DuplicateDocumentContent".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 DUPLICATEDOCUMENTCONTENT_SCHEMA: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_struct(
          41  +
    ::aws_smithy_schema::ShapeId::from_parts(
          42  +
        "com.amazonaws.ssm#DuplicateDocumentContent",
          43  +
        "com.amazonaws.ssm",
          44  +
        "DuplicateDocumentContent",
          45  +
    ),
          46  +
    ::aws_smithy_schema::ShapeType::Structure,
          47  +
    &[&DUPLICATEDOCUMENTCONTENT_MEMBER_MESSAGE],
          48  +
)
          49  +
.with_traits(&DUPLICATEDOCUMENTCONTENT_TRAITS);
          50  +
impl DuplicateDocumentContent {
          51  +
    /// The schema for this shape.
          52  +
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema<'static> = &DUPLICATEDOCUMENTCONTENT_SCHEMA;
          53  +
}
          54  +
impl ::aws_smithy_schema::serde::SerializableStruct for DuplicateDocumentContent {
          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(&DUPLICATEDOCUMENTCONTENT_MEMBER_MESSAGE, val)?;
          62  +
        }
          63  +
        Ok(())
          64  +
    }
          65  +
}
          66  +
impl DuplicateDocumentContent {
          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(&DUPLICATEDOCUMENTCONTENT_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 DuplicateDocumentContent {
          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 DuplicateDocumentContent {
         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 DuplicateDocumentContent {
         117  +
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
         118  +
        ::std::write!(f, "DuplicateDocumentContent")?;
         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 DuplicateDocumentContent {}
         128  +
impl ::aws_types::request_id::RequestId for crate::types::error::DuplicateDocumentContent {
         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 DuplicateDocumentContent {
         135  +
    fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
         136  +
        &self.meta
         137  +
    }
         138  +
}
         139  +
impl DuplicateDocumentContent {
         140  +
    /// Creates a new builder-style object to manufacture [`DuplicateDocumentContent`](crate::types::error::DuplicateDocumentContent).
         141  +
    pub fn builder() -> crate::types::error::builders::DuplicateDocumentContentBuilder {
         142  +
        crate::types::error::builders::DuplicateDocumentContentBuilder::default()
         143  +
    }
         144  +
}
         145  +
         146  +
/// A builder for [`DuplicateDocumentContent`](crate::types::error::DuplicateDocumentContent).
         147  +
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
         148  +
#[non_exhaustive]
         149  +
pub struct DuplicateDocumentContentBuilder {
         150  +
    pub(crate) message: ::std::option::Option<::std::string::String>,
         151  +
    meta: std::option::Option<::aws_smithy_types::error::ErrorMetadata>,
         152  +
}
         153  +
impl DuplicateDocumentContentBuilder {
         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 [`DuplicateDocumentContent`](crate::types::error::DuplicateDocumentContent).
         180  +
    pub fn build(self) -> crate::types::error::DuplicateDocumentContent {
         181  +
        crate::types::error::DuplicateDocumentContent {
         182  +
            message: self.message,
         183  +
            meta: self.meta.unwrap_or_default(),
         184  +
        }
         185  +
    }
         186  +
}

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

@@ -0,1 +0,186 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
           3  +
/// <p>The version name has already been used in this document. Specify a different version name, and then try again.</p>
           4  +
#[non_exhaustive]
           5  +
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
           6  +
pub struct DuplicateDocumentVersionName {
           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 DUPLICATEDOCUMENTVERSIONNAME_MEMBER_MESSAGE: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          12  +
    ::aws_smithy_schema::ShapeId::from_parts(
          13  +
        "com.amazonaws.ssm#DuplicateDocumentVersionName$Message",
          14  +
        "com.amazonaws.ssm",
          15  +
        "DuplicateDocumentVersionName",
          16  +
    ),
          17  +
    ::aws_smithy_schema::ShapeType::String,
          18  +
    "Message",
          19  +
    0,
          20  +
);
          21  +
static DUPLICATEDOCUMENTVERSIONNAME_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("DuplicateDocumentVersionName".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 DUPLICATEDOCUMENTVERSIONNAME_SCHEMA: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_struct(
          41  +
    ::aws_smithy_schema::ShapeId::from_parts(
          42  +
        "com.amazonaws.ssm#DuplicateDocumentVersionName",
          43  +
        "com.amazonaws.ssm",
          44  +
        "DuplicateDocumentVersionName",
          45  +
    ),
          46  +
    ::aws_smithy_schema::ShapeType::Structure,
          47  +
    &[&DUPLICATEDOCUMENTVERSIONNAME_MEMBER_MESSAGE],
          48  +
)
          49  +
.with_traits(&DUPLICATEDOCUMENTVERSIONNAME_TRAITS);
          50  +
impl DuplicateDocumentVersionName {
          51  +
    /// The schema for this shape.
          52  +
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema<'static> = &DUPLICATEDOCUMENTVERSIONNAME_SCHEMA;
          53  +
}
          54  +
impl ::aws_smithy_schema::serde::SerializableStruct for DuplicateDocumentVersionName {
          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(&DUPLICATEDOCUMENTVERSIONNAME_MEMBER_MESSAGE, val)?;
          62  +
        }
          63  +
        Ok(())
          64  +
    }
          65  +
}
          66  +
impl DuplicateDocumentVersionName {
          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(&DUPLICATEDOCUMENTVERSIONNAME_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 DuplicateDocumentVersionName {
          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 DuplicateDocumentVersionName {
         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 DuplicateDocumentVersionName {
         117  +
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
         118  +
        ::std::write!(f, "DuplicateDocumentVersionName")?;
         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 DuplicateDocumentVersionName {}
         128  +
impl ::aws_types::request_id::RequestId for crate::types::error::DuplicateDocumentVersionName {
         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 DuplicateDocumentVersionName {
         135  +
    fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
         136  +
        &self.meta
         137  +
    }
         138  +
}
         139  +
impl DuplicateDocumentVersionName {
         140  +
    /// Creates a new builder-style object to manufacture [`DuplicateDocumentVersionName`](crate::types::error::DuplicateDocumentVersionName).
         141  +
    pub fn builder() -> crate::types::error::builders::DuplicateDocumentVersionNameBuilder {
         142  +
        crate::types::error::builders::DuplicateDocumentVersionNameBuilder::default()
         143  +
    }
         144  +
}
         145  +
         146  +
/// A builder for [`DuplicateDocumentVersionName`](crate::types::error::DuplicateDocumentVersionName).
         147  +
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
         148  +
#[non_exhaustive]
         149  +
pub struct DuplicateDocumentVersionNameBuilder {
         150  +
    pub(crate) message: ::std::option::Option<::std::string::String>,
         151  +
    meta: std::option::Option<::aws_smithy_types::error::ErrorMetadata>,
         152  +
}
         153  +
impl DuplicateDocumentVersionNameBuilder {
         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 [`DuplicateDocumentVersionName`](crate::types::error::DuplicateDocumentVersionName).
         180  +
    pub fn build(self) -> crate::types::error::DuplicateDocumentVersionName {
         181  +
        crate::types::error::DuplicateDocumentVersionName {
         182  +
            message: self.message,
         183  +
            meta: self.meta.unwrap_or_default(),
         184  +
        }
         185  +
    }
         186  +
}

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

@@ -0,1 +0,182 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
           3  +
/// <p>You can't specify a managed node ID in more than one association.</p>
           4  +
#[non_exhaustive]
           5  +
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
           6  +
pub struct DuplicateInstanceId {
           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 DUPLICATEINSTANCEID_MEMBER_MESSAGE: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          12  +
    ::aws_smithy_schema::ShapeId::from_parts(
          13  +
        "com.amazonaws.ssm#DuplicateInstanceId$Message",
          14  +
        "com.amazonaws.ssm",
          15  +
        "DuplicateInstanceId",
          16  +
    ),
          17  +
    ::aws_smithy_schema::ShapeType::String,
          18  +
    "Message",
          19  +
    0,
          20  +
);
          21  +
static DUPLICATEINSTANCEID_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("DuplicateInstanceId".to_string()),
          30  +
            );
          31  +
            obj.insert(
          32  +
                "httpResponseCode".to_string(),
          33  +
                ::aws_smithy_types::Document::Number(::aws_smithy_types::Number::PosInt(404u64)),
          34  +
            );
          35  +
            ::aws_smithy_types::Document::Object(obj)
          36  +
        },
          37  +
    )));
          38  +
    map
          39  +
});
          40  +
static DUPLICATEINSTANCEID_SCHEMA: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_struct(
          41  +
    ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#DuplicateInstanceId", "com.amazonaws.ssm", "DuplicateInstanceId"),
          42  +
    ::aws_smithy_schema::ShapeType::Structure,
          43  +
    &[&DUPLICATEINSTANCEID_MEMBER_MESSAGE],
          44  +
)
          45  +
.with_traits(&DUPLICATEINSTANCEID_TRAITS);
          46  +
impl DuplicateInstanceId {
          47  +
    /// The schema for this shape.
          48  +
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema<'static> = &DUPLICATEINSTANCEID_SCHEMA;
          49  +
}
          50  +
impl ::aws_smithy_schema::serde::SerializableStruct for DuplicateInstanceId {
          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(&DUPLICATEINSTANCEID_MEMBER_MESSAGE, val)?;
          58  +
        }
          59  +
        Ok(())
          60  +
    }
          61  +
}
          62  +
impl DuplicateInstanceId {
          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(&DUPLICATEINSTANCEID_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 DuplicateInstanceId {
          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 DuplicateInstanceId {
         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 DuplicateInstanceId {
         113  +
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
         114  +
        ::std::write!(f, "DuplicateInstanceId")?;
         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 DuplicateInstanceId {}
         124  +
impl ::aws_types::request_id::RequestId for crate::types::error::DuplicateInstanceId {
         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 DuplicateInstanceId {
         131  +
    fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
         132  +
        &self.meta
         133  +
    }
         134  +
}
         135  +
impl DuplicateInstanceId {
         136  +
    /// Creates a new builder-style object to manufacture [`DuplicateInstanceId`](crate::types::error::DuplicateInstanceId).
         137  +
    pub fn builder() -> crate::types::error::builders::DuplicateInstanceIdBuilder {
         138  +
        crate::types::error::builders::DuplicateInstanceIdBuilder::default()
         139  +
    }
         140  +
}
         141  +
         142  +
/// A builder for [`DuplicateInstanceId`](crate::types::error::DuplicateInstanceId).
         143  +
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
         144  +
#[non_exhaustive]
         145  +
pub struct DuplicateInstanceIdBuilder {
         146  +
    pub(crate) message: ::std::option::Option<::std::string::String>,
         147  +
    meta: std::option::Option<::aws_smithy_types::error::ErrorMetadata>,
         148  +
}
         149  +
impl DuplicateInstanceIdBuilder {
         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 [`DuplicateInstanceId`](crate::types::error::DuplicateInstanceId).
         176  +
    pub fn build(self) -> crate::types::error::DuplicateInstanceId {
         177  +
        crate::types::error::DuplicateInstanceId {
         178  +
            message: self.message,
         179  +
            meta: self.meta.unwrap_or_default(),
         180  +
        }
         181  +
    }
         182  +
}

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

@@ -0,1 +0,186 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
           3  +
/// <p>You attempted to register a <code>LAMBDA</code> or <code>STEP_FUNCTIONS</code> task in a region where the corresponding service isn't available.</p>
           4  +
#[non_exhaustive]
           5  +
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
           6  +
pub struct FeatureNotAvailableException {
           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 FEATURENOTAVAILABLEEXCEPTION_MEMBER_MESSAGE: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          12  +
    ::aws_smithy_schema::ShapeId::from_parts(
          13  +
        "com.amazonaws.ssm#FeatureNotAvailableException$Message",
          14  +
        "com.amazonaws.ssm",
          15  +
        "FeatureNotAvailableException",
          16  +
    ),
          17  +
    ::aws_smithy_schema::ShapeType::String,
          18  +
    "Message",
          19  +
    0,
          20  +
);
          21  +
static FEATURENOTAVAILABLEEXCEPTION_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("FeatureNotAvailableException".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 FEATURENOTAVAILABLEEXCEPTION_SCHEMA: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_struct(
          41  +
    ::aws_smithy_schema::ShapeId::from_parts(
          42  +
        "com.amazonaws.ssm#FeatureNotAvailableException",
          43  +
        "com.amazonaws.ssm",
          44  +
        "FeatureNotAvailableException",
          45  +
    ),
          46  +
    ::aws_smithy_schema::ShapeType::Structure,
          47  +
    &[&FEATURENOTAVAILABLEEXCEPTION_MEMBER_MESSAGE],
          48  +
)
          49  +
.with_traits(&FEATURENOTAVAILABLEEXCEPTION_TRAITS);
          50  +
impl FeatureNotAvailableException {
          51  +
    /// The schema for this shape.
          52  +
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema<'static> = &FEATURENOTAVAILABLEEXCEPTION_SCHEMA;
          53  +
}
          54  +
impl ::aws_smithy_schema::serde::SerializableStruct for FeatureNotAvailableException {
          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(&FEATURENOTAVAILABLEEXCEPTION_MEMBER_MESSAGE, val)?;
          62  +
        }
          63  +
        Ok(())
          64  +
    }
          65  +
}
          66  +
impl FeatureNotAvailableException {
          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(&FEATURENOTAVAILABLEEXCEPTION_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 FeatureNotAvailableException {
          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 FeatureNotAvailableException {
         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 FeatureNotAvailableException {
         117  +
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
         118  +
        ::std::write!(f, "FeatureNotAvailableException")?;
         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 FeatureNotAvailableException {}
         128  +
impl ::aws_types::request_id::RequestId for crate::types::error::FeatureNotAvailableException {
         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 FeatureNotAvailableException {
         135  +
    fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
         136  +
        &self.meta
         137  +
    }
         138  +
}
         139  +
impl FeatureNotAvailableException {
         140  +
    /// Creates a new builder-style object to manufacture [`FeatureNotAvailableException`](crate::types::error::FeatureNotAvailableException).
         141  +
    pub fn builder() -> crate::types::error::builders::FeatureNotAvailableExceptionBuilder {
         142  +
        crate::types::error::builders::FeatureNotAvailableExceptionBuilder::default()
         143  +
    }
         144  +
}
         145  +
         146  +
/// A builder for [`FeatureNotAvailableException`](crate::types::error::FeatureNotAvailableException).
         147  +
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
         148  +
#[non_exhaustive]
         149  +
pub struct FeatureNotAvailableExceptionBuilder {
         150  +
    pub(crate) message: ::std::option::Option<::std::string::String>,
         151  +
    meta: std::option::Option<::aws_smithy_types::error::ErrorMetadata>,
         152  +
}
         153  +
impl FeatureNotAvailableExceptionBuilder {
         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 [`FeatureNotAvailableException`](crate::types::error::FeatureNotAvailableException).
         180  +
    pub fn build(self) -> crate::types::error::FeatureNotAvailableException {
         181  +
        crate::types::error::FeatureNotAvailableException {
         182  +
            message: self.message,
         183  +
            meta: self.meta.unwrap_or_default(),
         184  +
        }
         185  +
    }
         186  +
}

tmp-codegen-diff/aws-sdk/sdk/ssm/src/types/error/_hierarchy_level_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>A hierarchy can have a maximum of 15 levels. For more information, see <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-parameter-name-constraints.html">Requirements and constraints for parameter names</a> in the <i>Amazon Web Services Systems Manager User Guide</i>.</p>
           4  +
#[non_exhaustive]
           5  +
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
           6  +
pub struct HierarchyLevelLimitExceededException {
           7  +
    /// <p>A hierarchy can have a maximum of 15 levels. For more information, see <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-paramstore-su-create.html#sysman-parameter-name-constraints">About requirements and constraints for parameter names</a> in the <i>Amazon Web Services Systems Manager User Guide</i>.</p>
           8  +
    pub message: ::std::option::Option<::std::string::String>,
           9  +
    pub(crate) meta: ::aws_smithy_types::error::ErrorMetadata,
          10  +
}
          11  +
static HIERARCHYLEVELLIMITEXCEEDEDEXCEPTION_MEMBER_MESSAGE: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          12  +
    ::aws_smithy_schema::ShapeId::from_parts(
          13  +
        "com.amazonaws.ssm#HierarchyLevelLimitExceededException$message",
          14  +
        "com.amazonaws.ssm",
          15  +
        "HierarchyLevelLimitExceededException",
          16  +
    ),
          17  +
    ::aws_smithy_schema::ShapeType::String,
          18  +
    "message",
          19  +
    0,
          20  +
);
          21  +
static HIERARCHYLEVELLIMITEXCEEDEDEXCEPTION_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("HierarchyLevelLimitExceededException".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 HIERARCHYLEVELLIMITEXCEEDEDEXCEPTION_SCHEMA: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_struct(
          41  +
    ::aws_smithy_schema::ShapeId::from_parts(
          42  +
        "com.amazonaws.ssm#HierarchyLevelLimitExceededException",
          43  +
        "com.amazonaws.ssm",
          44  +
        "HierarchyLevelLimitExceededException",
          45  +
    ),
          46  +
    ::aws_smithy_schema::ShapeType::Structure,
          47  +
    &[&HIERARCHYLEVELLIMITEXCEEDEDEXCEPTION_MEMBER_MESSAGE],
          48  +
)
          49  +
.with_traits(&HIERARCHYLEVELLIMITEXCEEDEDEXCEPTION_TRAITS);
          50  +
impl HierarchyLevelLimitExceededException {
          51  +
    /// The schema for this shape.
          52  +
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema<'static> = &HIERARCHYLEVELLIMITEXCEEDEDEXCEPTION_SCHEMA;
          53  +
}
          54  +
impl ::aws_smithy_schema::serde::SerializableStruct for HierarchyLevelLimitExceededException {
          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(&HIERARCHYLEVELLIMITEXCEEDEDEXCEPTION_MEMBER_MESSAGE, val)?;
          62  +
        }
          63  +
        Ok(())
          64  +
    }
          65  +
}
          66  +
impl HierarchyLevelLimitExceededException {
          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(&HIERARCHYLEVELLIMITEXCEEDEDEXCEPTION_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 HierarchyLevelLimitExceededException {
          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 HierarchyLevelLimitExceededException {
         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 HierarchyLevelLimitExceededException {
         117  +
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
         118  +
        ::std::write!(f, "HierarchyLevelLimitExceededException")?;
         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 HierarchyLevelLimitExceededException {}
         128  +
impl ::aws_types::request_id::RequestId for crate::types::error::HierarchyLevelLimitExceededException {
         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 HierarchyLevelLimitExceededException {
         135  +
    fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
         136  +
        &self.meta
         137  +
    }
         138  +
}
         139  +
impl HierarchyLevelLimitExceededException {
         140  +
    /// Creates a new builder-style object to manufacture [`HierarchyLevelLimitExceededException`](crate::types::error::HierarchyLevelLimitExceededException).
         141  +
    pub fn builder() -> crate::types::error::builders::HierarchyLevelLimitExceededExceptionBuilder {
         142  +
        crate::types::error::builders::HierarchyLevelLimitExceededExceptionBuilder::default()
         143  +
    }
         144  +
}
         145  +
         146  +
/// A builder for [`HierarchyLevelLimitExceededException`](crate::types::error::HierarchyLevelLimitExceededException).
         147  +
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
         148  +
#[non_exhaustive]
         149  +
pub struct HierarchyLevelLimitExceededExceptionBuilder {
         150  +
    pub(crate) message: ::std::option::Option<::std::string::String>,
         151  +
    meta: std::option::Option<::aws_smithy_types::error::ErrorMetadata>,
         152  +
}
         153  +
impl HierarchyLevelLimitExceededExceptionBuilder {
         154  +
    /// <p>A hierarchy can have a maximum of 15 levels. For more information, see <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-paramstore-su-create.html#sysman-parameter-name-constraints">About requirements and constraints for parameter names</a> in the <i>Amazon Web Services Systems Manager User Guide</i>.</p>
         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  +
    /// <p>A hierarchy can have a maximum of 15 levels. For more information, see <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-paramstore-su-create.html#sysman-parameter-name-constraints">About requirements and constraints for parameter names</a> in the <i>Amazon Web Services Systems Manager User Guide</i>.</p>
         160  +
    pub fn set_message(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         161  +
        self.message = input;
         162  +
        self
         163  +
    }
         164  +
    /// <p>A hierarchy can have a maximum of 15 levels. For more information, see <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-paramstore-su-create.html#sysman-parameter-name-constraints">About requirements and constraints for parameter names</a> in the <i>Amazon Web Services Systems Manager User Guide</i>.</p>
         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 [`HierarchyLevelLimitExceededException`](crate::types::error::HierarchyLevelLimitExceededException).
         180  +
    pub fn build(self) -> crate::types::error::HierarchyLevelLimitExceededException {
         181  +
        crate::types::error::HierarchyLevelLimitExceededException {
         182  +
            message: self.message,
         183  +
            meta: self.meta.unwrap_or_default(),
         184  +
        }
         185  +
    }
         186  +
}