AWS SDK

AWS SDK

rev. 97ba95e6039d206ffea5b866ddc214d34f7f88c3 (ignoring whitespace)

Files changed:

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

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

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

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

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

@@ -0,1 +0,362 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
           3  +
/// <p>The request exceeds the service quota. Service quotas, also referred to as limits, are the maximum number of service resources or operations for your Amazon Web Services account.</p>
           4  +
#[non_exhaustive]
           5  +
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
           6  +
pub struct ServiceQuotaExceededException {
           7  +
    #[allow(missing_docs)] // documentation missing in model
           8  +
    pub message: ::std::string::String,
           9  +
    /// <p>The unique ID of the resource referenced in the failed request.</p>
          10  +
    pub resource_id: ::std::option::Option<::std::string::String>,
          11  +
    /// <p>The resource type of the resource referenced in the failed request.</p>
          12  +
    pub resource_type: ::std::option::Option<::std::string::String>,
          13  +
    /// <p>The quota code recognized by the Amazon Web Services Service Quotas service.</p>
          14  +
    pub quota_code: ::std::string::String,
          15  +
    /// <p>The code for the Amazon Web Services service that owns the quota.</p>
          16  +
    pub service_code: ::std::string::String,
          17  +
    pub(crate) meta: ::aws_smithy_types::error::ErrorMetadata,
          18  +
}
          19  +
impl ServiceQuotaExceededException {
          20  +
    /// <p>The unique ID of the resource referenced in the failed request.</p>
          21  +
    pub fn resource_id(&self) -> ::std::option::Option<&str> {
          22  +
        self.resource_id.as_deref()
          23  +
    }
          24  +
    /// <p>The resource type of the resource referenced in the failed request.</p>
          25  +
    pub fn resource_type(&self) -> ::std::option::Option<&str> {
          26  +
        self.resource_type.as_deref()
          27  +
    }
          28  +
    /// <p>The quota code recognized by the Amazon Web Services Service Quotas service.</p>
          29  +
    pub fn quota_code(&self) -> &str {
          30  +
        use std::ops::Deref;
          31  +
        self.quota_code.deref()
          32  +
    }
          33  +
    /// <p>The code for the Amazon Web Services service that owns the quota.</p>
          34  +
    pub fn service_code(&self) -> &str {
          35  +
        use std::ops::Deref;
          36  +
        self.service_code.deref()
          37  +
    }
          38  +
}
          39  +
static SERVICEQUOTAEXCEEDEDEXCEPTION_MEMBER_MESSAGE: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          40  +
    ::aws_smithy_schema::ShapeId::from_parts(
          41  +
        "com.amazonaws.ssm#ServiceQuotaExceededException$Message",
          42  +
        "com.amazonaws.ssm",
          43  +
        "ServiceQuotaExceededException",
          44  +
    ),
          45  +
    ::aws_smithy_schema::ShapeType::String,
          46  +
    "Message",
          47  +
    0,
          48  +
);
          49  +
static SERVICEQUOTAEXCEEDEDEXCEPTION_MEMBER_RESOURCE_ID: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          50  +
    ::aws_smithy_schema::ShapeId::from_parts(
          51  +
        "com.amazonaws.ssm#ServiceQuotaExceededException$ResourceId",
          52  +
        "com.amazonaws.ssm",
          53  +
        "ServiceQuotaExceededException",
          54  +
    ),
          55  +
    ::aws_smithy_schema::ShapeType::String,
          56  +
    "ResourceId",
          57  +
    1,
          58  +
);
          59  +
static SERVICEQUOTAEXCEEDEDEXCEPTION_MEMBER_RESOURCE_TYPE: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          60  +
    ::aws_smithy_schema::ShapeId::from_parts(
          61  +
        "com.amazonaws.ssm#ServiceQuotaExceededException$ResourceType",
          62  +
        "com.amazonaws.ssm",
          63  +
        "ServiceQuotaExceededException",
          64  +
    ),
          65  +
    ::aws_smithy_schema::ShapeType::String,
          66  +
    "ResourceType",
          67  +
    2,
          68  +
);
          69  +
static SERVICEQUOTAEXCEEDEDEXCEPTION_MEMBER_QUOTA_CODE: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          70  +
    ::aws_smithy_schema::ShapeId::from_parts(
          71  +
        "com.amazonaws.ssm#ServiceQuotaExceededException$QuotaCode",
          72  +
        "com.amazonaws.ssm",
          73  +
        "ServiceQuotaExceededException",
          74  +
    ),
          75  +
    ::aws_smithy_schema::ShapeType::String,
          76  +
    "QuotaCode",
          77  +
    3,
          78  +
);
          79  +
static SERVICEQUOTAEXCEEDEDEXCEPTION_MEMBER_SERVICE_CODE: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          80  +
    ::aws_smithy_schema::ShapeId::from_parts(
          81  +
        "com.amazonaws.ssm#ServiceQuotaExceededException$ServiceCode",
          82  +
        "com.amazonaws.ssm",
          83  +
        "ServiceQuotaExceededException",
          84  +
    ),
          85  +
    ::aws_smithy_schema::ShapeType::String,
          86  +
    "ServiceCode",
          87  +
    4,
          88  +
);
          89  +
static SERVICEQUOTAEXCEEDEDEXCEPTION_SCHEMA: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_struct(
          90  +
    ::aws_smithy_schema::ShapeId::from_parts(
          91  +
        "com.amazonaws.ssm#ServiceQuotaExceededException",
          92  +
        "com.amazonaws.ssm",
          93  +
        "ServiceQuotaExceededException",
          94  +
    ),
          95  +
    ::aws_smithy_schema::ShapeType::Structure,
          96  +
    &[
          97  +
        &SERVICEQUOTAEXCEEDEDEXCEPTION_MEMBER_MESSAGE,
          98  +
        &SERVICEQUOTAEXCEEDEDEXCEPTION_MEMBER_RESOURCE_ID,
          99  +
        &SERVICEQUOTAEXCEEDEDEXCEPTION_MEMBER_RESOURCE_TYPE,
         100  +
        &SERVICEQUOTAEXCEEDEDEXCEPTION_MEMBER_QUOTA_CODE,
         101  +
        &SERVICEQUOTAEXCEEDEDEXCEPTION_MEMBER_SERVICE_CODE,
         102  +
    ],
         103  +
);
         104  +
impl ServiceQuotaExceededException {
         105  +
    /// The schema for this shape.
         106  +
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema<'static> = &SERVICEQUOTAEXCEEDEDEXCEPTION_SCHEMA;
         107  +
}
         108  +
impl ::aws_smithy_schema::serde::SerializableStruct for ServiceQuotaExceededException {
         109  +
    #[allow(unused_variables, clippy::diverging_sub_expression)]
         110  +
    fn serialize_members(
         111  +
        &self,
         112  +
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
         113  +
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
         114  +
        {
         115  +
            let val = &self.message;
         116  +
            ser.write_string(&SERVICEQUOTAEXCEEDEDEXCEPTION_MEMBER_MESSAGE, val)?;
         117  +
        }
         118  +
        if let Some(ref val) = self.resource_id {
         119  +
            ser.write_string(&SERVICEQUOTAEXCEEDEDEXCEPTION_MEMBER_RESOURCE_ID, val)?;
         120  +
        }
         121  +
        if let Some(ref val) = self.resource_type {
         122  +
            ser.write_string(&SERVICEQUOTAEXCEEDEDEXCEPTION_MEMBER_RESOURCE_TYPE, val)?;
         123  +
        }
         124  +
        {
         125  +
            let val = &self.quota_code;
         126  +
            ser.write_string(&SERVICEQUOTAEXCEEDEDEXCEPTION_MEMBER_QUOTA_CODE, val)?;
         127  +
        }
         128  +
        {
         129  +
            let val = &self.service_code;
         130  +
            ser.write_string(&SERVICEQUOTAEXCEEDEDEXCEPTION_MEMBER_SERVICE_CODE, val)?;
         131  +
        }
         132  +
        Ok(())
         133  +
    }
         134  +
}
         135  +
impl ServiceQuotaExceededException {
         136  +
    /// Deserializes this structure from a [`ShapeDeserializer`].
         137  +
    pub fn deserialize(
         138  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         139  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         140  +
        #[allow(unused_variables, unused_mut)]
         141  +
        let mut builder = Self::builder();
         142  +
        #[allow(
         143  +
            unused_variables,
         144  +
            unreachable_code,
         145  +
            clippy::single_match,
         146  +
            clippy::match_single_binding,
         147  +
            clippy::diverging_sub_expression
         148  +
        )]
         149  +
        deserializer.read_struct(&SERVICEQUOTAEXCEEDEDEXCEPTION_SCHEMA, &mut |member, deser| {
         150  +
            match member.member_index() {
         151  +
                Some(0) => {
         152  +
                    builder.message = Some(deser.read_string(member)?);
         153  +
                }
         154  +
                Some(1) => {
         155  +
                    if deser.is_null() {
         156  +
                        deser.read_null()?;
         157  +
                    } else {
         158  +
                        builder.resource_id = Some(deser.read_string(member)?);
         159  +
                    }
         160  +
                }
         161  +
                Some(2) => {
         162  +
                    if deser.is_null() {
         163  +
                        deser.read_null()?;
         164  +
                    } else {
         165  +
                        builder.resource_type = Some(deser.read_string(member)?);
         166  +
                    }
         167  +
                }
         168  +
                Some(3) => {
         169  +
                    builder.quota_code = Some(deser.read_string(member)?);
         170  +
                }
         171  +
                Some(4) => {
         172  +
                    builder.service_code = Some(deser.read_string(member)?);
         173  +
                }
         174  +
                _ => {}
         175  +
            }
         176  +
            Ok(())
         177  +
        })?;
         178  +
        builder.message = builder.message.or(Some(String::new()));
         179  +
        builder.quota_code = builder.quota_code.or(Some(String::new()));
         180  +
        builder.service_code = builder.service_code.or(Some(String::new()));
         181  +
        builder.build().map_err(|e| aws_smithy_schema::serde::SerdeError::custom(e.to_string()))
         182  +
    }
         183  +
}
         184  +
impl ServiceQuotaExceededException {
         185  +
    /// Deserializes this structure from a body deserializer and HTTP response.
         186  +
    pub fn deserialize_with_response(
         187  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         188  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
         189  +
        _status: u16,
         190  +
        body: &[u8],
         191  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         192  +
        if body.is_empty() {
         193  +
            return Self::builder()
         194  +
                .build()
         195  +
                .map_err(|e| aws_smithy_schema::serde::SerdeError::custom(e.to_string()));
         196  +
        }
         197  +
        Self::deserialize(deserializer)
         198  +
    }
         199  +
}
         200  +
impl ServiceQuotaExceededException {
         201  +
    /// Returns the error message.
         202  +
    pub fn message(&self) -> &str {
         203  +
        &self.message
         204  +
    }
         205  +
}
         206  +
impl ::std::fmt::Display for ServiceQuotaExceededException {
         207  +
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
         208  +
        ::std::write!(f, "ServiceQuotaExceededException")?;
         209  +
        {
         210  +
            ::std::write!(f, ": {}", &self.message)?;
         211  +
        }
         212  +
        Ok(())
         213  +
    }
         214  +
}
         215  +
impl ::std::error::Error for ServiceQuotaExceededException {}
         216  +
impl ::aws_types::request_id::RequestId for crate::types::error::ServiceQuotaExceededException {
         217  +
    fn request_id(&self) -> Option<&str> {
         218  +
        use ::aws_smithy_types::error::metadata::ProvideErrorMetadata;
         219  +
        self.meta().request_id()
         220  +
    }
         221  +
}
         222  +
impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for ServiceQuotaExceededException {
         223  +
    fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
         224  +
        &self.meta
         225  +
    }
         226  +
}
         227  +
impl ServiceQuotaExceededException {
         228  +
    /// Creates a new builder-style object to manufacture [`ServiceQuotaExceededException`](crate::types::error::ServiceQuotaExceededException).
         229  +
    pub fn builder() -> crate::types::error::builders::ServiceQuotaExceededExceptionBuilder {
         230  +
        crate::types::error::builders::ServiceQuotaExceededExceptionBuilder::default()
         231  +
    }
         232  +
}
         233  +
         234  +
/// A builder for [`ServiceQuotaExceededException`](crate::types::error::ServiceQuotaExceededException).
         235  +
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
         236  +
#[non_exhaustive]
         237  +
pub struct ServiceQuotaExceededExceptionBuilder {
         238  +
    pub(crate) message: ::std::option::Option<::std::string::String>,
         239  +
    pub(crate) resource_id: ::std::option::Option<::std::string::String>,
         240  +
    pub(crate) resource_type: ::std::option::Option<::std::string::String>,
         241  +
    pub(crate) quota_code: ::std::option::Option<::std::string::String>,
         242  +
    pub(crate) service_code: ::std::option::Option<::std::string::String>,
         243  +
    meta: std::option::Option<::aws_smithy_types::error::ErrorMetadata>,
         244  +
}
         245  +
impl ServiceQuotaExceededExceptionBuilder {
         246  +
    #[allow(missing_docs)] // documentation missing in model
         247  +
    /// This field is required.
         248  +
    pub fn message(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         249  +
        self.message = ::std::option::Option::Some(input.into());
         250  +
        self
         251  +
    }
         252  +
    #[allow(missing_docs)] // documentation missing in model
         253  +
    pub fn set_message(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         254  +
        self.message = input;
         255  +
        self
         256  +
    }
         257  +
    #[allow(missing_docs)] // documentation missing in model
         258  +
    pub fn get_message(&self) -> &::std::option::Option<::std::string::String> {
         259  +
        &self.message
         260  +
    }
         261  +
    /// <p>The unique ID of the resource referenced in the failed request.</p>
         262  +
    pub fn resource_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         263  +
        self.resource_id = ::std::option::Option::Some(input.into());
         264  +
        self
         265  +
    }
         266  +
    /// <p>The unique ID of the resource referenced in the failed request.</p>
         267  +
    pub fn set_resource_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         268  +
        self.resource_id = input;
         269  +
        self
         270  +
    }
         271  +
    /// <p>The unique ID of the resource referenced in the failed request.</p>
         272  +
    pub fn get_resource_id(&self) -> &::std::option::Option<::std::string::String> {
         273  +
        &self.resource_id
         274  +
    }
         275  +
    /// <p>The resource type of the resource referenced in the failed request.</p>
         276  +
    pub fn resource_type(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         277  +
        self.resource_type = ::std::option::Option::Some(input.into());
         278  +
        self
         279  +
    }
         280  +
    /// <p>The resource type of the resource referenced in the failed request.</p>
         281  +
    pub fn set_resource_type(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         282  +
        self.resource_type = input;
         283  +
        self
         284  +
    }
         285  +
    /// <p>The resource type of the resource referenced in the failed request.</p>
         286  +
    pub fn get_resource_type(&self) -> &::std::option::Option<::std::string::String> {
         287  +
        &self.resource_type
         288  +
    }
         289  +
    /// <p>The quota code recognized by the Amazon Web Services Service Quotas service.</p>
         290  +
    /// This field is required.
         291  +
    pub fn quota_code(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         292  +
        self.quota_code = ::std::option::Option::Some(input.into());
         293  +
        self
         294  +
    }
         295  +
    /// <p>The quota code recognized by the Amazon Web Services Service Quotas service.</p>
         296  +
    pub fn set_quota_code(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         297  +
        self.quota_code = input;
         298  +
        self
         299  +
    }
         300  +
    /// <p>The quota code recognized by the Amazon Web Services Service Quotas service.</p>
         301  +
    pub fn get_quota_code(&self) -> &::std::option::Option<::std::string::String> {
         302  +
        &self.quota_code
         303  +
    }
         304  +
    /// <p>The code for the Amazon Web Services service that owns the quota.</p>
         305  +
    /// This field is required.
         306  +
    pub fn service_code(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         307  +
        self.service_code = ::std::option::Option::Some(input.into());
         308  +
        self
         309  +
    }
         310  +
    /// <p>The code for the Amazon Web Services service that owns the quota.</p>
         311  +
    pub fn set_service_code(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         312  +
        self.service_code = input;
         313  +
        self
         314  +
    }
         315  +
    /// <p>The code for the Amazon Web Services service that owns the quota.</p>
         316  +
    pub fn get_service_code(&self) -> &::std::option::Option<::std::string::String> {
         317  +
        &self.service_code
         318  +
    }
         319  +
    /// Sets error metadata
         320  +
    pub fn meta(mut self, meta: ::aws_smithy_types::error::ErrorMetadata) -> Self {
         321  +
        self.meta = Some(meta);
         322  +
        self
         323  +
    }
         324  +
         325  +
    /// Sets error metadata
         326  +
    pub fn set_meta(&mut self, meta: std::option::Option<::aws_smithy_types::error::ErrorMetadata>) -> &mut Self {
         327  +
        self.meta = meta;
         328  +
        self
         329  +
    }
         330  +
    /// Consumes the builder and constructs a [`ServiceQuotaExceededException`](crate::types::error::ServiceQuotaExceededException).
         331  +
    /// This method will fail if any of the following fields are not set:
         332  +
    /// - [`message`](crate::types::error::builders::ServiceQuotaExceededExceptionBuilder::message)
         333  +
    /// - [`quota_code`](crate::types::error::builders::ServiceQuotaExceededExceptionBuilder::quota_code)
         334  +
    /// - [`service_code`](crate::types::error::builders::ServiceQuotaExceededExceptionBuilder::service_code)
         335  +
    pub fn build(
         336  +
        self,
         337  +
    ) -> ::std::result::Result<crate::types::error::ServiceQuotaExceededException, ::aws_smithy_types::error::operation::BuildError> {
         338  +
        ::std::result::Result::Ok(crate::types::error::ServiceQuotaExceededException {
         339  +
            message: self.message.ok_or_else(|| {
         340  +
                ::aws_smithy_types::error::operation::BuildError::missing_field(
         341  +
                    "message",
         342  +
                    "message was not specified but it is required when building ServiceQuotaExceededException",
         343  +
                )
         344  +
            })?,
         345  +
            resource_id: self.resource_id,
         346  +
            resource_type: self.resource_type,
         347  +
            quota_code: self.quota_code.ok_or_else(|| {
         348  +
                ::aws_smithy_types::error::operation::BuildError::missing_field(
         349  +
                    "quota_code",
         350  +
                    "quota_code was not specified but it is required when building ServiceQuotaExceededException",
         351  +
                )
         352  +
            })?,
         353  +
            service_code: self.service_code.ok_or_else(|| {
         354  +
                ::aws_smithy_types::error::operation::BuildError::missing_field(
         355  +
                    "service_code",
         356  +
                    "service_code was not specified but it is required when building ServiceQuotaExceededException",
         357  +
                )
         358  +
            })?,
         359  +
            meta: self.meta.unwrap_or_default(),
         360  +
        })
         361  +
    }
         362  +
}

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

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