AWS SDK

AWS SDK

rev. aa190e630077955f0bc8f58dee6a16530c1e0578

Files changed:

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

@@ -0,1 +0,175 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
           3  +
/// <p>There are concurrent updates for a resource that supports one update at a time.</p>
           4  +
#[non_exhaustive]
           5  +
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
           6  +
pub struct TooManyUpdates {
           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 TOOMANYUPDATES_MEMBER_MESSAGE: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          12  +
    ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#TooManyUpdates$Message", "com.amazonaws.ssm", "TooManyUpdates"),
          13  +
    ::aws_smithy_schema::ShapeType::String,
          14  +
    "Message",
          15  +
    0,
          16  +
);
          17  +
static TOOMANYUPDATES_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("TooManyUpdates".to_string()));
          24  +
            obj.insert(
          25  +
                "httpResponseCode".to_string(),
          26  +
                ::aws_smithy_types::Document::Number(::aws_smithy_types::Number::PosInt(429u64)),
          27  +
            );
          28  +
            ::aws_smithy_types::Document::Object(obj)
          29  +
        },
          30  +
    )));
          31  +
    map
          32  +
});
          33  +
static TOOMANYUPDATES_SCHEMA: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_struct(
          34  +
    ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#TooManyUpdates", "com.amazonaws.ssm", "TooManyUpdates"),
          35  +
    ::aws_smithy_schema::ShapeType::Structure,
          36  +
    &[&TOOMANYUPDATES_MEMBER_MESSAGE],
          37  +
)
          38  +
.with_traits(&TOOMANYUPDATES_TRAITS);
          39  +
impl TooManyUpdates {
          40  +
    /// The schema for this shape.
          41  +
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema<'static> = &TOOMANYUPDATES_SCHEMA;
          42  +
}
          43  +
impl ::aws_smithy_schema::serde::SerializableStruct for TooManyUpdates {
          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(&TOOMANYUPDATES_MEMBER_MESSAGE, val)?;
          51  +
        }
          52  +
        Ok(())
          53  +
    }
          54  +
}
          55  +
impl TooManyUpdates {
          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(&TOOMANYUPDATES_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 TooManyUpdates {
          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 TooManyUpdates {
         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 TooManyUpdates {
         106  +
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
         107  +
        ::std::write!(f, "TooManyUpdates")?;
         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 TooManyUpdates {}
         117  +
impl ::aws_types::request_id::RequestId for crate::types::error::TooManyUpdates {
         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 TooManyUpdates {
         124  +
    fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
         125  +
        &self.meta
         126  +
    }
         127  +
}
         128  +
impl TooManyUpdates {
         129  +
    /// Creates a new builder-style object to manufacture [`TooManyUpdates`](crate::types::error::TooManyUpdates).
         130  +
    pub fn builder() -> crate::types::error::builders::TooManyUpdatesBuilder {
         131  +
        crate::types::error::builders::TooManyUpdatesBuilder::default()
         132  +
    }
         133  +
}
         134  +
         135  +
/// A builder for [`TooManyUpdates`](crate::types::error::TooManyUpdates).
         136  +
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
         137  +
#[non_exhaustive]
         138  +
pub struct TooManyUpdatesBuilder {
         139  +
    pub(crate) message: ::std::option::Option<::std::string::String>,
         140  +
    meta: std::option::Option<::aws_smithy_types::error::ErrorMetadata>,
         141  +
}
         142  +
impl TooManyUpdatesBuilder {
         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 [`TooManyUpdates`](crate::types::error::TooManyUpdates).
         169  +
    pub fn build(self) -> crate::types::error::TooManyUpdates {
         170  +
        crate::types::error::TooManyUpdates {
         171  +
            message: self.message,
         172  +
            meta: self.meta.unwrap_or_default(),
         173  +
        }
         174  +
    }
         175  +
}

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

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

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

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

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

@@ -0,1 +0,186 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
           3  +
/// <p>Patching for applications released by Microsoft is only available on EC2 instances and advanced instances. To patch applications released by Microsoft on on-premises servers and VMs, you must enable advanced instances. For more information, see <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/systems-manager-managedinstances-advanced.html">Turning on the advanced-instances tier</a> in the <i>Amazon Web Services Systems Manager User Guide</i>.</p>
           4  +
#[non_exhaustive]
           5  +
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
           6  +
pub struct UnsupportedFeatureRequiredException {
           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 UNSUPPORTEDFEATUREREQUIREDEXCEPTION_MEMBER_MESSAGE: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          12  +
    ::aws_smithy_schema::ShapeId::from_parts(
          13  +
        "com.amazonaws.ssm#UnsupportedFeatureRequiredException$Message",
          14  +
        "com.amazonaws.ssm",
          15  +
        "UnsupportedFeatureRequiredException",
          16  +
    ),
          17  +
    ::aws_smithy_schema::ShapeType::String,
          18  +
    "Message",
          19  +
    0,
          20  +
);
          21  +
static UNSUPPORTEDFEATUREREQUIREDEXCEPTION_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("UnsupportedFeatureRequiredException".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 UNSUPPORTEDFEATUREREQUIREDEXCEPTION_SCHEMA: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_struct(
          41  +
    ::aws_smithy_schema::ShapeId::from_parts(
          42  +
        "com.amazonaws.ssm#UnsupportedFeatureRequiredException",
          43  +
        "com.amazonaws.ssm",
          44  +
        "UnsupportedFeatureRequiredException",
          45  +
    ),
          46  +
    ::aws_smithy_schema::ShapeType::Structure,
          47  +
    &[&UNSUPPORTEDFEATUREREQUIREDEXCEPTION_MEMBER_MESSAGE],
          48  +
)
          49  +
.with_traits(&UNSUPPORTEDFEATUREREQUIREDEXCEPTION_TRAITS);
          50  +
impl UnsupportedFeatureRequiredException {
          51  +
    /// The schema for this shape.
          52  +
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema<'static> = &UNSUPPORTEDFEATUREREQUIREDEXCEPTION_SCHEMA;
          53  +
}
          54  +
impl ::aws_smithy_schema::serde::SerializableStruct for UnsupportedFeatureRequiredException {
          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(&UNSUPPORTEDFEATUREREQUIREDEXCEPTION_MEMBER_MESSAGE, val)?;
          62  +
        }
          63  +
        Ok(())
          64  +
    }
          65  +
}
          66  +
impl UnsupportedFeatureRequiredException {
          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(&UNSUPPORTEDFEATUREREQUIREDEXCEPTION_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 UnsupportedFeatureRequiredException {
          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 UnsupportedFeatureRequiredException {
         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 UnsupportedFeatureRequiredException {
         117  +
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
         118  +
        ::std::write!(f, "UnsupportedFeatureRequiredException")?;
         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 UnsupportedFeatureRequiredException {}
         128  +
impl ::aws_types::request_id::RequestId for crate::types::error::UnsupportedFeatureRequiredException {
         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 UnsupportedFeatureRequiredException {
         135  +
    fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
         136  +
        &self.meta
         137  +
    }
         138  +
}
         139  +
impl UnsupportedFeatureRequiredException {
         140  +
    /// Creates a new builder-style object to manufacture [`UnsupportedFeatureRequiredException`](crate::types::error::UnsupportedFeatureRequiredException).
         141  +
    pub fn builder() -> crate::types::error::builders::UnsupportedFeatureRequiredExceptionBuilder {
         142  +
        crate::types::error::builders::UnsupportedFeatureRequiredExceptionBuilder::default()
         143  +
    }
         144  +
}
         145  +
         146  +
/// A builder for [`UnsupportedFeatureRequiredException`](crate::types::error::UnsupportedFeatureRequiredException).
         147  +
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
         148  +
#[non_exhaustive]
         149  +
pub struct UnsupportedFeatureRequiredExceptionBuilder {
         150  +
    pub(crate) message: ::std::option::Option<::std::string::String>,
         151  +
    meta: std::option::Option<::aws_smithy_types::error::ErrorMetadata>,
         152  +
}
         153  +
impl UnsupportedFeatureRequiredExceptionBuilder {
         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 [`UnsupportedFeatureRequiredException`](crate::types::error::UnsupportedFeatureRequiredException).
         180  +
    pub fn build(self) -> crate::types::error::UnsupportedFeatureRequiredException {
         181  +
        crate::types::error::UnsupportedFeatureRequiredException {
         182  +
            message: self.message,
         183  +
            meta: self.meta.unwrap_or_default(),
         184  +
        }
         185  +
    }
         186  +
}

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

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

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

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