AWS SDK

AWS SDK

rev. 97ba95e6039d206ffea5b866ddc214d34f7f88c3 (ignoring whitespace)

Files changed:

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

@@ -0,1 +0,342 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
           3  +
/// <p>The request caused OpsItems to exceed one or more quotas.</p>
           4  +
#[non_exhaustive]
           5  +
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
           6  +
pub struct OpsItemLimitExceededException {
           7  +
    #[allow(missing_docs)] // documentation missing in model
           8  +
    pub resource_types: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
           9  +
    #[allow(missing_docs)] // documentation missing in model
          10  +
    pub limit: i32,
          11  +
    #[allow(missing_docs)] // documentation missing in model
          12  +
    pub limit_type: ::std::option::Option<::std::string::String>,
          13  +
    #[allow(missing_docs)] // documentation missing in model
          14  +
    pub message: ::std::option::Option<::std::string::String>,
          15  +
    pub(crate) meta: ::aws_smithy_types::error::ErrorMetadata,
          16  +
}
          17  +
impl OpsItemLimitExceededException {
          18  +
    #[allow(missing_docs)] // documentation missing in model
          19  +
    ///
          20  +
    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.resource_types.is_none()`.
          21  +
    pub fn resource_types(&self) -> &[::std::string::String] {
          22  +
        self.resource_types.as_deref().unwrap_or_default()
          23  +
    }
          24  +
    #[allow(missing_docs)] // documentation missing in model
          25  +
    pub fn limit(&self) -> i32 {
          26  +
        self.limit
          27  +
    }
          28  +
    #[allow(missing_docs)] // documentation missing in model
          29  +
    pub fn limit_type(&self) -> ::std::option::Option<&str> {
          30  +
        self.limit_type.as_deref()
          31  +
    }
          32  +
}
          33  +
static OPSITEMLIMITEXCEEDEDEXCEPTION_MEMBER_RESOURCE_TYPES_MEMBER: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          34  +
    ::aws_smithy_schema::ShapeId::from_parts(
          35  +
        "com.amazonaws.ssm#OpsItemParameterNamesList$member",
          36  +
        "com.amazonaws.ssm",
          37  +
        "OpsItemParameterNamesList",
          38  +
    ),
          39  +
    ::aws_smithy_schema::ShapeType::String,
          40  +
    "member",
          41  +
    0,
          42  +
);
          43  +
static OPSITEMLIMITEXCEEDEDEXCEPTION_MEMBER_RESOURCE_TYPES: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          44  +
    ::aws_smithy_schema::ShapeId::from_parts(
          45  +
        "com.amazonaws.ssm#OpsItemLimitExceededException$ResourceTypes",
          46  +
        "com.amazonaws.ssm",
          47  +
        "OpsItemLimitExceededException",
          48  +
    ),
          49  +
    ::aws_smithy_schema::ShapeType::List,
          50  +
    "ResourceTypes",
          51  +
    0,
          52  +
)
          53  +
.with_list_member(&OPSITEMLIMITEXCEEDEDEXCEPTION_MEMBER_RESOURCE_TYPES_MEMBER);
          54  +
static OPSITEMLIMITEXCEEDEDEXCEPTION_MEMBER_LIMIT: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          55  +
    ::aws_smithy_schema::ShapeId::from_parts(
          56  +
        "com.amazonaws.ssm#OpsItemLimitExceededException$Limit",
          57  +
        "com.amazonaws.ssm",
          58  +
        "OpsItemLimitExceededException",
          59  +
    ),
          60  +
    ::aws_smithy_schema::ShapeType::Integer,
          61  +
    "Limit",
          62  +
    1,
          63  +
);
          64  +
static OPSITEMLIMITEXCEEDEDEXCEPTION_MEMBER_LIMIT_TYPE: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          65  +
    ::aws_smithy_schema::ShapeId::from_parts(
          66  +
        "com.amazonaws.ssm#OpsItemLimitExceededException$LimitType",
          67  +
        "com.amazonaws.ssm",
          68  +
        "OpsItemLimitExceededException",
          69  +
    ),
          70  +
    ::aws_smithy_schema::ShapeType::String,
          71  +
    "LimitType",
          72  +
    2,
          73  +
);
          74  +
static OPSITEMLIMITEXCEEDEDEXCEPTION_MEMBER_MESSAGE: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          75  +
    ::aws_smithy_schema::ShapeId::from_parts(
          76  +
        "com.amazonaws.ssm#OpsItemLimitExceededException$Message",
          77  +
        "com.amazonaws.ssm",
          78  +
        "OpsItemLimitExceededException",
          79  +
    ),
          80  +
    ::aws_smithy_schema::ShapeType::String,
          81  +
    "Message",
          82  +
    3,
          83  +
);
          84  +
static OPSITEMLIMITEXCEEDEDEXCEPTION_TRAITS: std::sync::LazyLock<::aws_smithy_schema::TraitMap> = std::sync::LazyLock::new(|| {
          85  +
    let mut map = ::aws_smithy_schema::TraitMap::new();
          86  +
    map.insert(Box::new(::aws_smithy_schema::DocumentTrait::new(
          87  +
        ::aws_smithy_schema::ShapeId::from_parts("aws.protocols#awsQueryError", "aws.protocols", "awsQueryError"),
          88  +
        {
          89  +
            let mut obj = ::aws_smithy_types::document::DocumentObject::new();
          90  +
            obj.insert(
          91  +
                "code".to_string(),
          92  +
                ::aws_smithy_types::Document::String("OpsItemLimitExceededException".to_string()),
          93  +
            );
          94  +
            obj.insert(
          95  +
                "httpResponseCode".to_string(),
          96  +
                ::aws_smithy_types::Document::Number(::aws_smithy_types::Number::PosInt(400u64)),
          97  +
            );
          98  +
            ::aws_smithy_types::Document::Object(obj)
          99  +
        },
         100  +
    )));
         101  +
    map
         102  +
});
         103  +
static OPSITEMLIMITEXCEEDEDEXCEPTION_SCHEMA: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_struct(
         104  +
    ::aws_smithy_schema::ShapeId::from_parts(
         105  +
        "com.amazonaws.ssm#OpsItemLimitExceededException",
         106  +
        "com.amazonaws.ssm",
         107  +
        "OpsItemLimitExceededException",
         108  +
    ),
         109  +
    ::aws_smithy_schema::ShapeType::Structure,
         110  +
    &[
         111  +
        &OPSITEMLIMITEXCEEDEDEXCEPTION_MEMBER_RESOURCE_TYPES,
         112  +
        &OPSITEMLIMITEXCEEDEDEXCEPTION_MEMBER_LIMIT,
         113  +
        &OPSITEMLIMITEXCEEDEDEXCEPTION_MEMBER_LIMIT_TYPE,
         114  +
        &OPSITEMLIMITEXCEEDEDEXCEPTION_MEMBER_MESSAGE,
         115  +
    ],
         116  +
)
         117  +
.with_traits(&OPSITEMLIMITEXCEEDEDEXCEPTION_TRAITS);
         118  +
impl OpsItemLimitExceededException {
         119  +
    /// The schema for this shape.
         120  +
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema<'static> = &OPSITEMLIMITEXCEEDEDEXCEPTION_SCHEMA;
         121  +
}
         122  +
impl ::aws_smithy_schema::serde::SerializableStruct for OpsItemLimitExceededException {
         123  +
    #[allow(unused_variables, clippy::diverging_sub_expression)]
         124  +
    fn serialize_members(
         125  +
        &self,
         126  +
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
         127  +
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
         128  +
        if let Some(ref val) = self.resource_types {
         129  +
            ser.write_list(
         130  +
                &OPSITEMLIMITEXCEEDEDEXCEPTION_MEMBER_RESOURCE_TYPES,
         131  +
                &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
         132  +
                    for item in val {
         133  +
                        ser.write_string(&aws_smithy_schema::prelude::STRING, item)?;
         134  +
                    }
         135  +
                    Ok(())
         136  +
                },
         137  +
            )?;
         138  +
        }
         139  +
        {
         140  +
            let val = &self.limit;
         141  +
            ser.write_integer(&OPSITEMLIMITEXCEEDEDEXCEPTION_MEMBER_LIMIT, *val)?;
         142  +
        }
         143  +
        if let Some(ref val) = self.limit_type {
         144  +
            ser.write_string(&OPSITEMLIMITEXCEEDEDEXCEPTION_MEMBER_LIMIT_TYPE, val)?;
         145  +
        }
         146  +
        if let Some(ref val) = self.message {
         147  +
            ser.write_string(&OPSITEMLIMITEXCEEDEDEXCEPTION_MEMBER_MESSAGE, val)?;
         148  +
        }
         149  +
        Ok(())
         150  +
    }
         151  +
}
         152  +
impl OpsItemLimitExceededException {
         153  +
    /// Deserializes this structure from a [`ShapeDeserializer`].
         154  +
    pub fn deserialize(
         155  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         156  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         157  +
        #[allow(unused_variables, unused_mut)]
         158  +
        let mut builder = Self::builder();
         159  +
        #[allow(
         160  +
            unused_variables,
         161  +
            unreachable_code,
         162  +
            clippy::single_match,
         163  +
            clippy::match_single_binding,
         164  +
            clippy::diverging_sub_expression
         165  +
        )]
         166  +
        deserializer.read_struct(&OPSITEMLIMITEXCEEDEDEXCEPTION_SCHEMA, &mut |member, deser| {
         167  +
            match member.member_index() {
         168  +
                Some(0) => {
         169  +
                    if deser.is_null() {
         170  +
                        deser.read_null()?;
         171  +
                    } else {
         172  +
                        builder.resource_types = Some(deser.read_string_list(member)?);
         173  +
                    }
         174  +
                }
         175  +
                Some(1) => {
         176  +
                    builder.limit = Some(deser.read_integer(member)?);
         177  +
                }
         178  +
                Some(2) => {
         179  +
                    if deser.is_null() {
         180  +
                        deser.read_null()?;
         181  +
                    } else {
         182  +
                        builder.limit_type = Some(deser.read_string(member)?);
         183  +
                    }
         184  +
                }
         185  +
                Some(3) => {
         186  +
                    if deser.is_null() {
         187  +
                        deser.read_null()?;
         188  +
                    } else {
         189  +
                        builder.message = Some(deser.read_string(member)?);
         190  +
                    }
         191  +
                }
         192  +
                _ => {}
         193  +
            }
         194  +
            Ok(())
         195  +
        })?;
         196  +
        Ok(builder.build())
         197  +
    }
         198  +
}
         199  +
impl OpsItemLimitExceededException {
         200  +
    /// Deserializes this structure from a body deserializer and HTTP response.
         201  +
    pub fn deserialize_with_response(
         202  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         203  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
         204  +
        _status: u16,
         205  +
        body: &[u8],
         206  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         207  +
        if body.is_empty() {
         208  +
            return Ok(Self::builder().build());
         209  +
        }
         210  +
        Self::deserialize(deserializer)
         211  +
    }
         212  +
}
         213  +
impl OpsItemLimitExceededException {
         214  +
    /// Returns the error message.
         215  +
    pub fn message(&self) -> ::std::option::Option<&str> {
         216  +
        self.message.as_deref()
         217  +
    }
         218  +
}
         219  +
impl ::std::fmt::Display for OpsItemLimitExceededException {
         220  +
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
         221  +
        ::std::write!(f, "OpsItemLimitExceededException")?;
         222  +
        if let ::std::option::Option::Some(inner_1) = &self.message {
         223  +
            {
         224  +
                ::std::write!(f, ": {inner_1}")?;
         225  +
            }
         226  +
        }
         227  +
        Ok(())
         228  +
    }
         229  +
}
         230  +
impl ::std::error::Error for OpsItemLimitExceededException {}
         231  +
impl ::aws_types::request_id::RequestId for crate::types::error::OpsItemLimitExceededException {
         232  +
    fn request_id(&self) -> Option<&str> {
         233  +
        use ::aws_smithy_types::error::metadata::ProvideErrorMetadata;
         234  +
        self.meta().request_id()
         235  +
    }
         236  +
}
         237  +
impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for OpsItemLimitExceededException {
         238  +
    fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
         239  +
        &self.meta
         240  +
    }
         241  +
}
         242  +
impl OpsItemLimitExceededException {
         243  +
    /// Creates a new builder-style object to manufacture [`OpsItemLimitExceededException`](crate::types::error::OpsItemLimitExceededException).
         244  +
    pub fn builder() -> crate::types::error::builders::OpsItemLimitExceededExceptionBuilder {
         245  +
        crate::types::error::builders::OpsItemLimitExceededExceptionBuilder::default()
         246  +
    }
         247  +
}
         248  +
         249  +
/// A builder for [`OpsItemLimitExceededException`](crate::types::error::OpsItemLimitExceededException).
         250  +
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
         251  +
#[non_exhaustive]
         252  +
pub struct OpsItemLimitExceededExceptionBuilder {
         253  +
    pub(crate) resource_types: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
         254  +
    pub(crate) limit: ::std::option::Option<i32>,
         255  +
    pub(crate) limit_type: ::std::option::Option<::std::string::String>,
         256  +
    pub(crate) message: ::std::option::Option<::std::string::String>,
         257  +
    meta: std::option::Option<::aws_smithy_types::error::ErrorMetadata>,
         258  +
}
         259  +
impl OpsItemLimitExceededExceptionBuilder {
         260  +
    /// Appends an item to `resource_types`.
         261  +
    ///
         262  +
    /// To override the contents of this collection use [`set_resource_types`](Self::set_resource_types).
         263  +
    ///
         264  +
    pub fn resource_types(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         265  +
        let mut v = self.resource_types.unwrap_or_default();
         266  +
        v.push(input.into());
         267  +
        self.resource_types = ::std::option::Option::Some(v);
         268  +
        self
         269  +
    }
         270  +
    #[allow(missing_docs)] // documentation missing in model
         271  +
    pub fn set_resource_types(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
         272  +
        self.resource_types = input;
         273  +
        self
         274  +
    }
         275  +
    #[allow(missing_docs)] // documentation missing in model
         276  +
    pub fn get_resource_types(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
         277  +
        &self.resource_types
         278  +
    }
         279  +
    #[allow(missing_docs)] // documentation missing in model
         280  +
    pub fn limit(mut self, input: i32) -> Self {
         281  +
        self.limit = ::std::option::Option::Some(input);
         282  +
        self
         283  +
    }
         284  +
    #[allow(missing_docs)] // documentation missing in model
         285  +
    pub fn set_limit(mut self, input: ::std::option::Option<i32>) -> Self {
         286  +
        self.limit = input;
         287  +
        self
         288  +
    }
         289  +
    #[allow(missing_docs)] // documentation missing in model
         290  +
    pub fn get_limit(&self) -> &::std::option::Option<i32> {
         291  +
        &self.limit
         292  +
    }
         293  +
    #[allow(missing_docs)] // documentation missing in model
         294  +
    pub fn limit_type(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         295  +
        self.limit_type = ::std::option::Option::Some(input.into());
         296  +
        self
         297  +
    }
         298  +
    #[allow(missing_docs)] // documentation missing in model
         299  +
    pub fn set_limit_type(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         300  +
        self.limit_type = input;
         301  +
        self
         302  +
    }
         303  +
    #[allow(missing_docs)] // documentation missing in model
         304  +
    pub fn get_limit_type(&self) -> &::std::option::Option<::std::string::String> {
         305  +
        &self.limit_type
         306  +
    }
         307  +
    #[allow(missing_docs)] // documentation missing in model
         308  +
    pub fn message(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         309  +
        self.message = ::std::option::Option::Some(input.into());
         310  +
        self
         311  +
    }
         312  +
    #[allow(missing_docs)] // documentation missing in model
         313  +
    pub fn set_message(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         314  +
        self.message = input;
         315  +
        self
         316  +
    }
         317  +
    #[allow(missing_docs)] // documentation missing in model
         318  +
    pub fn get_message(&self) -> &::std::option::Option<::std::string::String> {
         319  +
        &self.message
         320  +
    }
         321  +
    /// Sets error metadata
         322  +
    pub fn meta(mut self, meta: ::aws_smithy_types::error::ErrorMetadata) -> Self {
         323  +
        self.meta = Some(meta);
         324  +
        self
         325  +
    }
         326  +
         327  +
    /// Sets error metadata
         328  +
    pub fn set_meta(&mut self, meta: std::option::Option<::aws_smithy_types::error::ErrorMetadata>) -> &mut Self {
         329  +
        self.meta = meta;
         330  +
        self
         331  +
    }
         332  +
    /// Consumes the builder and constructs a [`OpsItemLimitExceededException`](crate::types::error::OpsItemLimitExceededException).
         333  +
    pub fn build(self) -> crate::types::error::OpsItemLimitExceededException {
         334  +
        crate::types::error::OpsItemLimitExceededException {
         335  +
            resource_types: self.resource_types,
         336  +
            limit: self.limit.unwrap_or_default(),
         337  +
            limit_type: self.limit_type,
         338  +
            message: self.message,
         339  +
            meta: self.meta.unwrap_or_default(),
         340  +
        }
         341  +
    }
         342  +
}

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

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

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

@@ -0,1 +0,276 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
           3  +
/// <p>The Amazon Resource Name (ARN) is already associated with the OpsItem.</p>
           4  +
#[non_exhaustive]
           5  +
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
           6  +
pub struct OpsItemRelatedItemAlreadyExistsException {
           7  +
    #[allow(missing_docs)] // documentation missing in model
           8  +
    pub message: ::std::option::Option<::std::string::String>,
           9  +
    #[allow(missing_docs)] // documentation missing in model
          10  +
    pub resource_uri: ::std::option::Option<::std::string::String>,
          11  +
    #[allow(missing_docs)] // documentation missing in model
          12  +
    pub ops_item_id: ::std::option::Option<::std::string::String>,
          13  +
    pub(crate) meta: ::aws_smithy_types::error::ErrorMetadata,
          14  +
}
          15  +
impl OpsItemRelatedItemAlreadyExistsException {
          16  +
    #[allow(missing_docs)] // documentation missing in model
          17  +
    pub fn resource_uri(&self) -> ::std::option::Option<&str> {
          18  +
        self.resource_uri.as_deref()
          19  +
    }
          20  +
    #[allow(missing_docs)] // documentation missing in model
          21  +
    pub fn ops_item_id(&self) -> ::std::option::Option<&str> {
          22  +
        self.ops_item_id.as_deref()
          23  +
    }
          24  +
}
          25  +
static OPSITEMRELATEDITEMALREADYEXISTSEXCEPTION_MEMBER_MESSAGE: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          26  +
    ::aws_smithy_schema::ShapeId::from_parts(
          27  +
        "com.amazonaws.ssm#OpsItemRelatedItemAlreadyExistsException$Message",
          28  +
        "com.amazonaws.ssm",
          29  +
        "OpsItemRelatedItemAlreadyExistsException",
          30  +
    ),
          31  +
    ::aws_smithy_schema::ShapeType::String,
          32  +
    "Message",
          33  +
    0,
          34  +
);
          35  +
static OPSITEMRELATEDITEMALREADYEXISTSEXCEPTION_MEMBER_RESOURCE_URI: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          36  +
    ::aws_smithy_schema::ShapeId::from_parts(
          37  +
        "com.amazonaws.ssm#OpsItemRelatedItemAlreadyExistsException$ResourceUri",
          38  +
        "com.amazonaws.ssm",
          39  +
        "OpsItemRelatedItemAlreadyExistsException",
          40  +
    ),
          41  +
    ::aws_smithy_schema::ShapeType::String,
          42  +
    "ResourceUri",
          43  +
    1,
          44  +
);
          45  +
static OPSITEMRELATEDITEMALREADYEXISTSEXCEPTION_MEMBER_OPS_ITEM_ID: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          46  +
    ::aws_smithy_schema::ShapeId::from_parts(
          47  +
        "com.amazonaws.ssm#OpsItemRelatedItemAlreadyExistsException$OpsItemId",
          48  +
        "com.amazonaws.ssm",
          49  +
        "OpsItemRelatedItemAlreadyExistsException",
          50  +
    ),
          51  +
    ::aws_smithy_schema::ShapeType::String,
          52  +
    "OpsItemId",
          53  +
    2,
          54  +
);
          55  +
static OPSITEMRELATEDITEMALREADYEXISTSEXCEPTION_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("OpsItemRelatedItemAlreadyExistsException".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 OPSITEMRELATEDITEMALREADYEXISTSEXCEPTION_SCHEMA: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_struct(
          75  +
    ::aws_smithy_schema::ShapeId::from_parts(
          76  +
        "com.amazonaws.ssm#OpsItemRelatedItemAlreadyExistsException",
          77  +
        "com.amazonaws.ssm",
          78  +
        "OpsItemRelatedItemAlreadyExistsException",
          79  +
    ),
          80  +
    ::aws_smithy_schema::ShapeType::Structure,
          81  +
    &[
          82  +
        &OPSITEMRELATEDITEMALREADYEXISTSEXCEPTION_MEMBER_MESSAGE,
          83  +
        &OPSITEMRELATEDITEMALREADYEXISTSEXCEPTION_MEMBER_RESOURCE_URI,
          84  +
        &OPSITEMRELATEDITEMALREADYEXISTSEXCEPTION_MEMBER_OPS_ITEM_ID,
          85  +
    ],
          86  +
)
          87  +
.with_traits(&OPSITEMRELATEDITEMALREADYEXISTSEXCEPTION_TRAITS);
          88  +
impl OpsItemRelatedItemAlreadyExistsException {
          89  +
    /// The schema for this shape.
          90  +
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema<'static> = &OPSITEMRELATEDITEMALREADYEXISTSEXCEPTION_SCHEMA;
          91  +
}
          92  +
impl ::aws_smithy_schema::serde::SerializableStruct for OpsItemRelatedItemAlreadyExistsException {
          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  +
        if let Some(ref val) = self.message {
          99  +
            ser.write_string(&OPSITEMRELATEDITEMALREADYEXISTSEXCEPTION_MEMBER_MESSAGE, val)?;
         100  +
        }
         101  +
        if let Some(ref val) = self.resource_uri {
         102  +
            ser.write_string(&OPSITEMRELATEDITEMALREADYEXISTSEXCEPTION_MEMBER_RESOURCE_URI, val)?;
         103  +
        }
         104  +
        if let Some(ref val) = self.ops_item_id {
         105  +
            ser.write_string(&OPSITEMRELATEDITEMALREADYEXISTSEXCEPTION_MEMBER_OPS_ITEM_ID, val)?;
         106  +
        }
         107  +
        Ok(())
         108  +
    }
         109  +
}
         110  +
impl OpsItemRelatedItemAlreadyExistsException {
         111  +
    /// Deserializes this structure from a [`ShapeDeserializer`].
         112  +
    pub fn deserialize(
         113  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         114  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         115  +
        #[allow(unused_variables, unused_mut)]
         116  +
        let mut builder = Self::builder();
         117  +
        #[allow(
         118  +
            unused_variables,
         119  +
            unreachable_code,
         120  +
            clippy::single_match,
         121  +
            clippy::match_single_binding,
         122  +
            clippy::diverging_sub_expression
         123  +
        )]
         124  +
        deserializer.read_struct(&OPSITEMRELATEDITEMALREADYEXISTSEXCEPTION_SCHEMA, &mut |member, deser| {
         125  +
            match member.member_index() {
         126  +
                Some(0) => {
         127  +
                    if deser.is_null() {
         128  +
                        deser.read_null()?;
         129  +
                    } else {
         130  +
                        builder.message = Some(deser.read_string(member)?);
         131  +
                    }
         132  +
                }
         133  +
                Some(1) => {
         134  +
                    if deser.is_null() {
         135  +
                        deser.read_null()?;
         136  +
                    } else {
         137  +
                        builder.resource_uri = Some(deser.read_string(member)?);
         138  +
                    }
         139  +
                }
         140  +
                Some(2) => {
         141  +
                    if deser.is_null() {
         142  +
                        deser.read_null()?;
         143  +
                    } else {
         144  +
                        builder.ops_item_id = Some(deser.read_string(member)?);
         145  +
                    }
         146  +
                }
         147  +
                _ => {}
         148  +
            }
         149  +
            Ok(())
         150  +
        })?;
         151  +
        Ok(builder.build())
         152  +
    }
         153  +
}
         154  +
impl OpsItemRelatedItemAlreadyExistsException {
         155  +
    /// Deserializes this structure from a body deserializer and HTTP response.
         156  +
    pub fn deserialize_with_response(
         157  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         158  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
         159  +
        _status: u16,
         160  +
        body: &[u8],
         161  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         162  +
        if body.is_empty() {
         163  +
            return Ok(Self::builder().build());
         164  +
        }
         165  +
        Self::deserialize(deserializer)
         166  +
    }
         167  +
}
         168  +
impl OpsItemRelatedItemAlreadyExistsException {
         169  +
    /// Returns the error message.
         170  +
    pub fn message(&self) -> ::std::option::Option<&str> {
         171  +
        self.message.as_deref()
         172  +
    }
         173  +
}
         174  +
impl ::std::fmt::Display for OpsItemRelatedItemAlreadyExistsException {
         175  +
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
         176  +
        ::std::write!(f, "OpsItemRelatedItemAlreadyExistsException")?;
         177  +
        if let ::std::option::Option::Some(inner_1) = &self.message {
         178  +
            {
         179  +
                ::std::write!(f, ": {inner_1}")?;
         180  +
            }
         181  +
        }
         182  +
        Ok(())
         183  +
    }
         184  +
}
         185  +
impl ::std::error::Error for OpsItemRelatedItemAlreadyExistsException {}
         186  +
impl ::aws_types::request_id::RequestId for crate::types::error::OpsItemRelatedItemAlreadyExistsException {
         187  +
    fn request_id(&self) -> Option<&str> {
         188  +
        use ::aws_smithy_types::error::metadata::ProvideErrorMetadata;
         189  +
        self.meta().request_id()
         190  +
    }
         191  +
}
         192  +
impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for OpsItemRelatedItemAlreadyExistsException {
         193  +
    fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
         194  +
        &self.meta
         195  +
    }
         196  +
}
         197  +
impl OpsItemRelatedItemAlreadyExistsException {
         198  +
    /// Creates a new builder-style object to manufacture [`OpsItemRelatedItemAlreadyExistsException`](crate::types::error::OpsItemRelatedItemAlreadyExistsException).
         199  +
    pub fn builder() -> crate::types::error::builders::OpsItemRelatedItemAlreadyExistsExceptionBuilder {
         200  +
        crate::types::error::builders::OpsItemRelatedItemAlreadyExistsExceptionBuilder::default()
         201  +
    }
         202  +
}
         203  +
         204  +
/// A builder for [`OpsItemRelatedItemAlreadyExistsException`](crate::types::error::OpsItemRelatedItemAlreadyExistsException).
         205  +
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
         206  +
#[non_exhaustive]
         207  +
pub struct OpsItemRelatedItemAlreadyExistsExceptionBuilder {
         208  +
    pub(crate) message: ::std::option::Option<::std::string::String>,
         209  +
    pub(crate) resource_uri: ::std::option::Option<::std::string::String>,
         210  +
    pub(crate) ops_item_id: ::std::option::Option<::std::string::String>,
         211  +
    meta: std::option::Option<::aws_smithy_types::error::ErrorMetadata>,
         212  +
}
         213  +
impl OpsItemRelatedItemAlreadyExistsExceptionBuilder {
         214  +
    #[allow(missing_docs)] // documentation missing in model
         215  +
    pub fn message(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         216  +
        self.message = ::std::option::Option::Some(input.into());
         217  +
        self
         218  +
    }
         219  +
    #[allow(missing_docs)] // documentation missing in model
         220  +
    pub fn set_message(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         221  +
        self.message = input;
         222  +
        self
         223  +
    }
         224  +
    #[allow(missing_docs)] // documentation missing in model
         225  +
    pub fn get_message(&self) -> &::std::option::Option<::std::string::String> {
         226  +
        &self.message
         227  +
    }
         228  +
    #[allow(missing_docs)] // documentation missing in model
         229  +
    pub fn resource_uri(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         230  +
        self.resource_uri = ::std::option::Option::Some(input.into());
         231  +
        self
         232  +
    }
         233  +
    #[allow(missing_docs)] // documentation missing in model
         234  +
    pub fn set_resource_uri(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         235  +
        self.resource_uri = input;
         236  +
        self
         237  +
    }
         238  +
    #[allow(missing_docs)] // documentation missing in model
         239  +
    pub fn get_resource_uri(&self) -> &::std::option::Option<::std::string::String> {
         240  +
        &self.resource_uri
         241  +
    }
         242  +
    #[allow(missing_docs)] // documentation missing in model
         243  +
    pub fn ops_item_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         244  +
        self.ops_item_id = ::std::option::Option::Some(input.into());
         245  +
        self
         246  +
    }
         247  +
    #[allow(missing_docs)] // documentation missing in model
         248  +
    pub fn set_ops_item_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         249  +
        self.ops_item_id = input;
         250  +
        self
         251  +
    }
         252  +
    #[allow(missing_docs)] // documentation missing in model
         253  +
    pub fn get_ops_item_id(&self) -> &::std::option::Option<::std::string::String> {
         254  +
        &self.ops_item_id
         255  +
    }
         256  +
    /// Sets error metadata
         257  +
    pub fn meta(mut self, meta: ::aws_smithy_types::error::ErrorMetadata) -> Self {
         258  +
        self.meta = Some(meta);
         259  +
        self
         260  +
    }
         261  +
         262  +
    /// Sets error metadata
         263  +
    pub fn set_meta(&mut self, meta: std::option::Option<::aws_smithy_types::error::ErrorMetadata>) -> &mut Self {
         264  +
        self.meta = meta;
         265  +
        self
         266  +
    }
         267  +
    /// Consumes the builder and constructs a [`OpsItemRelatedItemAlreadyExistsException`](crate::types::error::OpsItemRelatedItemAlreadyExistsException).
         268  +
    pub fn build(self) -> crate::types::error::OpsItemRelatedItemAlreadyExistsException {
         269  +
        crate::types::error::OpsItemRelatedItemAlreadyExistsException {
         270  +
            message: self.message,
         271  +
            resource_uri: self.resource_uri,
         272  +
            ops_item_id: self.ops_item_id,
         273  +
            meta: self.meta.unwrap_or_default(),
         274  +
        }
         275  +
    }
         276  +
}

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

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

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

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