AWS SDK

AWS SDK

rev. 3388bf5e18f4269f2b46f39cdc814c5c39d413d0 (ignoring whitespace)

Files changed:

tmp-codegen-diff/aws-sdk/sdk/ssm/src/types/error/_resource_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>Error returned if an attempt is made to delete a patch baseline that is registered for a patch group.</p>
           4  +
#[non_exhaustive]
           5  +
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
           6  +
pub struct ResourceInUseException {
           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 RESOURCEINUSEEXCEPTION_MEMBER_MESSAGE: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          12  +
    ::aws_smithy_schema::ShapeId::from_parts(
          13  +
        "com.amazonaws.ssm#ResourceInUseException$Message",
          14  +
        "com.amazonaws.ssm",
          15  +
        "ResourceInUseException",
          16  +
    ),
          17  +
    ::aws_smithy_schema::ShapeType::String,
          18  +
    "Message",
          19  +
    0,
          20  +
);
          21  +
static RESOURCEINUSEEXCEPTION_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("ResourceInUseException".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 RESOURCEINUSEEXCEPTION_SCHEMA: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_struct(
          41  +
    ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#ResourceInUseException", "com.amazonaws.ssm", "ResourceInUseException"),
          42  +
    ::aws_smithy_schema::ShapeType::Structure,
          43  +
    &[&RESOURCEINUSEEXCEPTION_MEMBER_MESSAGE],
          44  +
)
          45  +
.with_traits(&RESOURCEINUSEEXCEPTION_TRAITS);
          46  +
impl ResourceInUseException {
          47  +
    /// The schema for this shape.
          48  +
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema<'static> = &RESOURCEINUSEEXCEPTION_SCHEMA;
          49  +
}
          50  +
impl ::aws_smithy_schema::serde::SerializableStruct for ResourceInUseException {
          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(&RESOURCEINUSEEXCEPTION_MEMBER_MESSAGE, val)?;
          58  +
        }
          59  +
        Ok(())
          60  +
    }
          61  +
}
          62  +
impl ResourceInUseException {
          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(&RESOURCEINUSEEXCEPTION_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 ResourceInUseException {
          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 ResourceInUseException {
         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 ResourceInUseException {
         113  +
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
         114  +
        ::std::write!(f, "ResourceInUseException")?;
         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 ResourceInUseException {}
         124  +
impl ::aws_types::request_id::RequestId for crate::types::error::ResourceInUseException {
         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 ResourceInUseException {
         131  +
    fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
         132  +
        &self.meta
         133  +
    }
         134  +
}
         135  +
impl ResourceInUseException {
         136  +
    /// Creates a new builder-style object to manufacture [`ResourceInUseException`](crate::types::error::ResourceInUseException).
         137  +
    pub fn builder() -> crate::types::error::builders::ResourceInUseExceptionBuilder {
         138  +
        crate::types::error::builders::ResourceInUseExceptionBuilder::default()
         139  +
    }
         140  +
}
         141  +
         142  +
/// A builder for [`ResourceInUseException`](crate::types::error::ResourceInUseException).
         143  +
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
         144  +
#[non_exhaustive]
         145  +
pub struct ResourceInUseExceptionBuilder {
         146  +
    pub(crate) message: ::std::option::Option<::std::string::String>,
         147  +
    meta: std::option::Option<::aws_smithy_types::error::ErrorMetadata>,
         148  +
}
         149  +
impl ResourceInUseExceptionBuilder {
         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 [`ResourceInUseException`](crate::types::error::ResourceInUseException).
         176  +
    pub fn build(self) -> crate::types::error::ResourceInUseException {
         177  +
        crate::types::error::ResourceInUseException {
         178  +
            message: self.message,
         179  +
            meta: self.meta.unwrap_or_default(),
         180  +
        }
         181  +
    }
         182  +
}

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

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

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

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

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

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

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

@@ -0,1 +0,261 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
           3  +
/// <p>One or more parameters specified for the call aren't valid. Verify the parameters and their values and try again.</p>
           4  +
#[non_exhaustive]
           5  +
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
           6  +
pub struct ResourcePolicyInvalidParameterException {
           7  +
    #[allow(missing_docs)] // documentation missing in model
           8  +
    pub parameter_names: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
           9  +
    #[allow(missing_docs)] // documentation missing in model
          10  +
    pub message: ::std::option::Option<::std::string::String>,
          11  +
    pub(crate) meta: ::aws_smithy_types::error::ErrorMetadata,
          12  +
}
          13  +
impl ResourcePolicyInvalidParameterException {
          14  +
    #[allow(missing_docs)] // documentation missing in model
          15  +
    ///
          16  +
    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.parameter_names.is_none()`.
          17  +
    pub fn parameter_names(&self) -> &[::std::string::String] {
          18  +
        self.parameter_names.as_deref().unwrap_or_default()
          19  +
    }
          20  +
}
          21  +
static RESOURCEPOLICYINVALIDPARAMETEREXCEPTION_MEMBER_PARAMETER_NAMES_MEMBER: ::aws_smithy_schema::Schema<'static> =
          22  +
    ::aws_smithy_schema::Schema::new_member(
          23  +
        ::aws_smithy_schema::ShapeId::from_parts(
          24  +
            "com.amazonaws.ssm#ResourcePolicyParameterNamesList$member",
          25  +
            "com.amazonaws.ssm",
          26  +
            "ResourcePolicyParameterNamesList",
          27  +
        ),
          28  +
        ::aws_smithy_schema::ShapeType::String,
          29  +
        "member",
          30  +
        0,
          31  +
    );
          32  +
static RESOURCEPOLICYINVALIDPARAMETEREXCEPTION_MEMBER_PARAMETER_NAMES: ::aws_smithy_schema::Schema<'static> =
          33  +
    ::aws_smithy_schema::Schema::new_member(
          34  +
        ::aws_smithy_schema::ShapeId::from_parts(
          35  +
            "com.amazonaws.ssm#ResourcePolicyInvalidParameterException$ParameterNames",
          36  +
            "com.amazonaws.ssm",
          37  +
            "ResourcePolicyInvalidParameterException",
          38  +
        ),
          39  +
        ::aws_smithy_schema::ShapeType::List,
          40  +
        "ParameterNames",
          41  +
        0,
          42  +
    )
          43  +
    .with_list_member(&RESOURCEPOLICYINVALIDPARAMETEREXCEPTION_MEMBER_PARAMETER_NAMES_MEMBER);
          44  +
static RESOURCEPOLICYINVALIDPARAMETEREXCEPTION_MEMBER_MESSAGE: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          45  +
    ::aws_smithy_schema::ShapeId::from_parts(
          46  +
        "com.amazonaws.ssm#ResourcePolicyInvalidParameterException$Message",
          47  +
        "com.amazonaws.ssm",
          48  +
        "ResourcePolicyInvalidParameterException",
          49  +
    ),
          50  +
    ::aws_smithy_schema::ShapeType::String,
          51  +
    "Message",
          52  +
    1,
          53  +
);
          54  +
static RESOURCEPOLICYINVALIDPARAMETEREXCEPTION_TRAITS: std::sync::LazyLock<::aws_smithy_schema::TraitMap> = std::sync::LazyLock::new(|| {
          55  +
    let mut map = ::aws_smithy_schema::TraitMap::new();
          56  +
    map.insert(Box::new(::aws_smithy_schema::DocumentTrait::new(
          57  +
        ::aws_smithy_schema::ShapeId::from_parts("aws.protocols#awsQueryError", "aws.protocols", "awsQueryError"),
          58  +
        {
          59  +
            let mut obj = ::aws_smithy_types::document::DocumentObject::new();
          60  +
            obj.insert(
          61  +
                "code".to_string(),
          62  +
                ::aws_smithy_types::Document::String("ResourcePolicyInvalidParameterException".to_string()),
          63  +
            );
          64  +
            obj.insert(
          65  +
                "httpResponseCode".to_string(),
          66  +
                ::aws_smithy_types::Document::Number(::aws_smithy_types::Number::PosInt(400u64)),
          67  +
            );
          68  +
            ::aws_smithy_types::Document::Object(obj)
          69  +
        },
          70  +
    )));
          71  +
    map
          72  +
});
          73  +
static RESOURCEPOLICYINVALIDPARAMETEREXCEPTION_SCHEMA: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_struct(
          74  +
    ::aws_smithy_schema::ShapeId::from_parts(
          75  +
        "com.amazonaws.ssm#ResourcePolicyInvalidParameterException",
          76  +
        "com.amazonaws.ssm",
          77  +
        "ResourcePolicyInvalidParameterException",
          78  +
    ),
          79  +
    ::aws_smithy_schema::ShapeType::Structure,
          80  +
    &[
          81  +
        &RESOURCEPOLICYINVALIDPARAMETEREXCEPTION_MEMBER_PARAMETER_NAMES,
          82  +
        &RESOURCEPOLICYINVALIDPARAMETEREXCEPTION_MEMBER_MESSAGE,
          83  +
    ],
          84  +
)
          85  +
.with_traits(&RESOURCEPOLICYINVALIDPARAMETEREXCEPTION_TRAITS);
          86  +
impl ResourcePolicyInvalidParameterException {
          87  +
    /// The schema for this shape.
          88  +
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema<'static> = &RESOURCEPOLICYINVALIDPARAMETEREXCEPTION_SCHEMA;
          89  +
}
          90  +
impl ::aws_smithy_schema::serde::SerializableStruct for ResourcePolicyInvalidParameterException {
          91  +
    #[allow(unused_variables, clippy::diverging_sub_expression)]
          92  +
    fn serialize_members(
          93  +
        &self,
          94  +
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
          95  +
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
          96  +
        if let Some(ref val) = self.parameter_names {
          97  +
            ser.write_list(
          98  +
                &RESOURCEPOLICYINVALIDPARAMETEREXCEPTION_MEMBER_PARAMETER_NAMES,
          99  +
                &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
         100  +
                    for item in val {
         101  +
                        ser.write_string(&aws_smithy_schema::prelude::STRING, item)?;
         102  +
                    }
         103  +
                    Ok(())
         104  +
                },
         105  +
            )?;
         106  +
        }
         107  +
        if let Some(ref val) = self.message {
         108  +
            ser.write_string(&RESOURCEPOLICYINVALIDPARAMETEREXCEPTION_MEMBER_MESSAGE, val)?;
         109  +
        }
         110  +
        Ok(())
         111  +
    }
         112  +
}
         113  +
impl ResourcePolicyInvalidParameterException {
         114  +
    /// Deserializes this structure from a [`ShapeDeserializer`].
         115  +
    pub fn deserialize(
         116  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         117  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         118  +
        #[allow(unused_variables, unused_mut)]
         119  +
        let mut builder = Self::builder();
         120  +
        #[allow(
         121  +
            unused_variables,
         122  +
            unreachable_code,
         123  +
            clippy::single_match,
         124  +
            clippy::match_single_binding,
         125  +
            clippy::diverging_sub_expression
         126  +
        )]
         127  +
        deserializer.read_struct(&RESOURCEPOLICYINVALIDPARAMETEREXCEPTION_SCHEMA, &mut |member, deser| {
         128  +
            match member.member_index() {
         129  +
                Some(0) => {
         130  +
                    if deser.is_null() {
         131  +
                        deser.read_null()?;
         132  +
                    } else {
         133  +
                        builder.parameter_names = Some(deser.read_string_list(member)?);
         134  +
                    }
         135  +
                }
         136  +
                Some(1) => {
         137  +
                    if deser.is_null() {
         138  +
                        deser.read_null()?;
         139  +
                    } else {
         140  +
                        builder.message = Some(deser.read_string(member)?);
         141  +
                    }
         142  +
                }
         143  +
                _ => {}
         144  +
            }
         145  +
            Ok(())
         146  +
        })?;
         147  +
        Ok(builder.build())
         148  +
    }
         149  +
}
         150  +
impl ResourcePolicyInvalidParameterException {
         151  +
    /// Deserializes this structure from a body deserializer and HTTP response.
         152  +
    pub fn deserialize_with_response(
         153  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         154  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
         155  +
        _status: u16,
         156  +
        body: &[u8],
         157  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         158  +
        if body.is_empty() {
         159  +
            return Ok(Self::builder().build());
         160  +
        }
         161  +
        Self::deserialize(deserializer)
         162  +
    }
         163  +
}
         164  +
impl ResourcePolicyInvalidParameterException {
         165  +
    /// Returns the error message.
         166  +
    pub fn message(&self) -> ::std::option::Option<&str> {
         167  +
        self.message.as_deref()
         168  +
    }
         169  +
}
         170  +
impl ::std::fmt::Display for ResourcePolicyInvalidParameterException {
         171  +
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
         172  +
        ::std::write!(f, "ResourcePolicyInvalidParameterException")?;
         173  +
        if let ::std::option::Option::Some(inner_1) = &self.message {
         174  +
            {
         175  +
                ::std::write!(f, ": {inner_1}")?;
         176  +
            }
         177  +
        }
         178  +
        Ok(())
         179  +
    }
         180  +
}
         181  +
impl ::std::error::Error for ResourcePolicyInvalidParameterException {}
         182  +
impl ::aws_types::request_id::RequestId for crate::types::error::ResourcePolicyInvalidParameterException {
         183  +
    fn request_id(&self) -> Option<&str> {
         184  +
        use ::aws_smithy_types::error::metadata::ProvideErrorMetadata;
         185  +
        self.meta().request_id()
         186  +
    }
         187  +
}
         188  +
impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for ResourcePolicyInvalidParameterException {
         189  +
    fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
         190  +
        &self.meta
         191  +
    }
         192  +
}
         193  +
impl ResourcePolicyInvalidParameterException {
         194  +
    /// Creates a new builder-style object to manufacture [`ResourcePolicyInvalidParameterException`](crate::types::error::ResourcePolicyInvalidParameterException).
         195  +
    pub fn builder() -> crate::types::error::builders::ResourcePolicyInvalidParameterExceptionBuilder {
         196  +
        crate::types::error::builders::ResourcePolicyInvalidParameterExceptionBuilder::default()
         197  +
    }
         198  +
}
         199  +
         200  +
/// A builder for [`ResourcePolicyInvalidParameterException`](crate::types::error::ResourcePolicyInvalidParameterException).
         201  +
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
         202  +
#[non_exhaustive]
         203  +
pub struct ResourcePolicyInvalidParameterExceptionBuilder {
         204  +
    pub(crate) parameter_names: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
         205  +
    pub(crate) message: ::std::option::Option<::std::string::String>,
         206  +
    meta: std::option::Option<::aws_smithy_types::error::ErrorMetadata>,
         207  +
}
         208  +
impl ResourcePolicyInvalidParameterExceptionBuilder {
         209  +
    /// Appends an item to `parameter_names`.
         210  +
    ///
         211  +
    /// To override the contents of this collection use [`set_parameter_names`](Self::set_parameter_names).
         212  +
    ///
         213  +
    pub fn parameter_names(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         214  +
        let mut v = self.parameter_names.unwrap_or_default();
         215  +
        v.push(input.into());
         216  +
        self.parameter_names = ::std::option::Option::Some(v);
         217  +
        self
         218  +
    }
         219  +
    #[allow(missing_docs)] // documentation missing in model
         220  +
    pub fn set_parameter_names(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
         221  +
        self.parameter_names = input;
         222  +
        self
         223  +
    }
         224  +
    #[allow(missing_docs)] // documentation missing in model
         225  +
    pub fn get_parameter_names(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
         226  +
        &self.parameter_names
         227  +
    }
         228  +
    #[allow(missing_docs)] // documentation missing in model
         229  +
    pub fn message(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         230  +
        self.message = ::std::option::Option::Some(input.into());
         231  +
        self
         232  +
    }
         233  +
    #[allow(missing_docs)] // documentation missing in model
         234  +
    pub fn set_message(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         235  +
        self.message = input;
         236  +
        self
         237  +
    }
         238  +
    #[allow(missing_docs)] // documentation missing in model
         239  +
    pub fn get_message(&self) -> &::std::option::Option<::std::string::String> {
         240  +
        &self.message
         241  +
    }
         242  +
    /// Sets error metadata
         243  +
    pub fn meta(mut self, meta: ::aws_smithy_types::error::ErrorMetadata) -> Self {
         244  +
        self.meta = Some(meta);
         245  +
        self
         246  +
    }
         247  +
         248  +
    /// Sets error metadata
         249  +
    pub fn set_meta(&mut self, meta: std::option::Option<::aws_smithy_types::error::ErrorMetadata>) -> &mut Self {
         250  +
        self.meta = meta;
         251  +
        self
         252  +
    }
         253  +
    /// Consumes the builder and constructs a [`ResourcePolicyInvalidParameterException`](crate::types::error::ResourcePolicyInvalidParameterException).
         254  +
    pub fn build(self) -> crate::types::error::ResourcePolicyInvalidParameterException {
         255  +
        crate::types::error::ResourcePolicyInvalidParameterException {
         256  +
            parameter_names: self.parameter_names,
         257  +
            message: self.message,
         258  +
            meta: self.meta.unwrap_or_default(),
         259  +
        }
         260  +
    }
         261  +
}