AWS SDK

AWS SDK

rev. 97ba95e6039d206ffea5b866ddc214d34f7f88c3 (ignoring whitespace)

Files changed:

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

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

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

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

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

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

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

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

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

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

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

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