AWS SDK

AWS SDK

rev. 97ba95e6039d206ffea5b866ddc214d34f7f88c3

Files changed:

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

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

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

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

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

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

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

@@ -0,1 +0,175 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
           3  +
/// <p>The query key ID isn't valid.</p>
           4  +
#[non_exhaustive]
           5  +
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
           6  +
pub struct InvalidKeyId {
           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 INVALIDKEYID_MEMBER_MESSAGE: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          12  +
    ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#InvalidKeyId$message", "com.amazonaws.ssm", "InvalidKeyId"),
          13  +
    ::aws_smithy_schema::ShapeType::String,
          14  +
    "message",
          15  +
    0,
          16  +
);
          17  +
static INVALIDKEYID_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("InvalidKeyId".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 INVALIDKEYID_SCHEMA: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_struct(
          34  +
    ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#InvalidKeyId", "com.amazonaws.ssm", "InvalidKeyId"),
          35  +
    ::aws_smithy_schema::ShapeType::Structure,
          36  +
    &[&INVALIDKEYID_MEMBER_MESSAGE],
          37  +
)
          38  +
.with_traits(&INVALIDKEYID_TRAITS);
          39  +
impl InvalidKeyId {
          40  +
    /// The schema for this shape.
          41  +
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema<'static> = &INVALIDKEYID_SCHEMA;
          42  +
}
          43  +
impl ::aws_smithy_schema::serde::SerializableStruct for InvalidKeyId {
          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(&INVALIDKEYID_MEMBER_MESSAGE, val)?;
          51  +
        }
          52  +
        Ok(())
          53  +
    }
          54  +
}
          55  +
impl InvalidKeyId {
          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(&INVALIDKEYID_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 InvalidKeyId {
          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 InvalidKeyId {
         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 InvalidKeyId {
         106  +
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
         107  +
        ::std::write!(f, "InvalidKeyId")?;
         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 InvalidKeyId {}
         117  +
impl ::aws_types::request_id::RequestId for crate::types::error::InvalidKeyId {
         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 InvalidKeyId {
         124  +
    fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
         125  +
        &self.meta
         126  +
    }
         127  +
}
         128  +
impl InvalidKeyId {
         129  +
    /// Creates a new builder-style object to manufacture [`InvalidKeyId`](crate::types::error::InvalidKeyId).
         130  +
    pub fn builder() -> crate::types::error::builders::InvalidKeyIdBuilder {
         131  +
        crate::types::error::builders::InvalidKeyIdBuilder::default()
         132  +
    }
         133  +
}
         134  +
         135  +
/// A builder for [`InvalidKeyId`](crate::types::error::InvalidKeyId).
         136  +
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
         137  +
#[non_exhaustive]
         138  +
pub struct InvalidKeyIdBuilder {
         139  +
    pub(crate) message: ::std::option::Option<::std::string::String>,
         140  +
    meta: std::option::Option<::aws_smithy_types::error::ErrorMetadata>,
         141  +
}
         142  +
impl InvalidKeyIdBuilder {
         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 [`InvalidKeyId`](crate::types::error::InvalidKeyId).
         169  +
    pub fn build(self) -> crate::types::error::InvalidKeyId {
         170  +
        crate::types::error::InvalidKeyId {
         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_next_token.rs

@@ -0,1 +0,175 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
           3  +
/// <p>The specified token isn't valid.</p>
           4  +
#[non_exhaustive]
           5  +
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
           6  +
pub struct InvalidNextToken {
           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 INVALIDNEXTTOKEN_MEMBER_MESSAGE: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          12  +
    ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#InvalidNextToken$Message", "com.amazonaws.ssm", "InvalidNextToken"),
          13  +
    ::aws_smithy_schema::ShapeType::String,
          14  +
    "Message",
          15  +
    0,
          16  +
);
          17  +
static INVALIDNEXTTOKEN_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("InvalidNextToken".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 INVALIDNEXTTOKEN_SCHEMA: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_struct(
          34  +
    ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#InvalidNextToken", "com.amazonaws.ssm", "InvalidNextToken"),
          35  +
    ::aws_smithy_schema::ShapeType::Structure,
          36  +
    &[&INVALIDNEXTTOKEN_MEMBER_MESSAGE],
          37  +
)
          38  +
.with_traits(&INVALIDNEXTTOKEN_TRAITS);
          39  +
impl InvalidNextToken {
          40  +
    /// The schema for this shape.
          41  +
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema<'static> = &INVALIDNEXTTOKEN_SCHEMA;
          42  +
}
          43  +
impl ::aws_smithy_schema::serde::SerializableStruct for InvalidNextToken {
          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(&INVALIDNEXTTOKEN_MEMBER_MESSAGE, val)?;
          51  +
        }
          52  +
        Ok(())
          53  +
    }
          54  +
}
          55  +
impl InvalidNextToken {
          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(&INVALIDNEXTTOKEN_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 InvalidNextToken {
          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 InvalidNextToken {
         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 InvalidNextToken {
         106  +
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
         107  +
        ::std::write!(f, "InvalidNextToken")?;
         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 InvalidNextToken {}
         117  +
impl ::aws_types::request_id::RequestId for crate::types::error::InvalidNextToken {
         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 InvalidNextToken {
         124  +
    fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
         125  +
        &self.meta
         126  +
    }
         127  +
}
         128  +
impl InvalidNextToken {
         129  +
    /// Creates a new builder-style object to manufacture [`InvalidNextToken`](crate::types::error::InvalidNextToken).
         130  +
    pub fn builder() -> crate::types::error::builders::InvalidNextTokenBuilder {
         131  +
        crate::types::error::builders::InvalidNextTokenBuilder::default()
         132  +
    }
         133  +
}
         134  +
         135  +
/// A builder for [`InvalidNextToken`](crate::types::error::InvalidNextToken).
         136  +
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
         137  +
#[non_exhaustive]
         138  +
pub struct InvalidNextTokenBuilder {
         139  +
    pub(crate) message: ::std::option::Option<::std::string::String>,
         140  +
    meta: std::option::Option<::aws_smithy_types::error::ErrorMetadata>,
         141  +
}
         142  +
impl InvalidNextTokenBuilder {
         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 [`InvalidNextToken`](crate::types::error::InvalidNextToken).
         169  +
    pub fn build(self) -> crate::types::error::InvalidNextToken {
         170  +
        crate::types::error::InvalidNextToken {
         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_notification_config.rs

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