AWS SDK

AWS SDK

rev. ec7b2441254af868911fccffe8d8dca83aff0045

Files changed:

tmp-codegen-diff/aws-sdk/sdk/s3control/src/types/error/_invalid_request_exception.rs

@@ -1,1 +102,113 @@
   13     13   
    "com.amazonaws.s3control",
   14     14   
    "InvalidRequestException",
   15     15   
);
   16     16   
static INVALIDREQUESTEXCEPTION_MEMBER_MESSAGE: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   17     17   
    ::aws_smithy_schema::ShapeId::from_static(
   18     18   
        "com.amazonaws.s3control#InvalidRequestException$Message",
   19     19   
        "com.amazonaws.s3control",
   20     20   
        "InvalidRequestException",
   21     21   
    ),
   22     22   
    ::aws_smithy_schema::ShapeType::String,
   23         -
    "message",
          23  +
    "Message",
   24     24   
    0,
   25     25   
);
   26     26   
static INVALIDREQUESTEXCEPTION_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
   27     27   
    INVALIDREQUESTEXCEPTION_SCHEMA_ID,
   28     28   
    ::aws_smithy_schema::ShapeType::Structure,
   29     29   
    &[&INVALIDREQUESTEXCEPTION_MEMBER_MESSAGE],
   30     30   
);
   31     31   
impl InvalidRequestException {
   32     32   
    /// The schema for this shape.
   33     33   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &INVALIDREQUESTEXCEPTION_SCHEMA;
   34     34   
}
   35     35   
impl ::aws_smithy_schema::serde::SerializableStruct for InvalidRequestException {
   36     36   
    #[allow(unused_variables, clippy::diverging_sub_expression)]
   37     37   
    fn serialize_members(
   38     38   
        &self,
   39     39   
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
   40     40   
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
   41     41   
        if let Some(ref val) = self.message {
   42     42   
            ser.write_string(&INVALIDREQUESTEXCEPTION_MEMBER_MESSAGE, val)?;
   43     43   
        }
   44     44   
        Ok(())
   45     45   
    }
   46     46   
}
   47     47   
impl InvalidRequestException {
   48     48   
    /// Deserializes this structure from a [`ShapeDeserializer`].
   49         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
   50         -
        deserializer: &mut D,
          49  +
    pub fn deserialize(
          50  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
   51     51   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
   52     52   
        #[allow(unused_variables, unused_mut)]
   53     53   
        let mut builder = Self::builder();
   54     54   
        #[allow(
   55     55   
            unused_variables,
   56     56   
            unreachable_code,
   57     57   
            clippy::single_match,
   58     58   
            clippy::match_single_binding,
   59     59   
            clippy::diverging_sub_expression
   60     60   
        )]
   61         -
        deserializer.read_struct(&INVALIDREQUESTEXCEPTION_SCHEMA, (), |_, member, deser| {
          61  +
        deserializer.read_struct(&INVALIDREQUESTEXCEPTION_SCHEMA, &mut |member, deser| {
   62     62   
            match member.member_index() {
   63     63   
                Some(0) => {
   64     64   
                    builder.message = Some(deser.read_string(member)?);
   65     65   
                }
   66     66   
                _ => {}
   67     67   
            }
   68     68   
            Ok(())
   69     69   
        })?;
   70     70   
        Ok(builder.build())
   71     71   
    }
   72     72   
}
          73  +
impl InvalidRequestException {
          74  +
    /// Deserializes this structure from a body deserializer and HTTP response.
          75  +
    pub fn deserialize_with_response(
          76  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
          77  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
          78  +
        _status: u16,
          79  +
        _body: &[u8],
          80  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
          81  +
        Self::deserialize(deserializer)
          82  +
    }
          83  +
}
   73     84   
impl InvalidRequestException {
   74     85   
    /// Returns the error message.
   75     86   
    pub fn message(&self) -> ::std::option::Option<&str> {
   76     87   
        self.message.as_deref()
   77     88   
    }
   78     89   
}
   79     90   
impl ::std::fmt::Display for InvalidRequestException {
   80     91   
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
   81     92   
        ::std::write!(f, "InvalidRequestException")?;
   82     93   
        if let ::std::option::Option::Some(inner_1) = &self.message {

tmp-codegen-diff/aws-sdk/sdk/s3control/src/types/error/_job_status_exception.rs

@@ -1,1 +102,113 @@
   13     13   
    "com.amazonaws.s3control",
   14     14   
    "JobStatusException",
   15     15   
);
   16     16   
static JOBSTATUSEXCEPTION_MEMBER_MESSAGE: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   17     17   
    ::aws_smithy_schema::ShapeId::from_static(
   18     18   
        "com.amazonaws.s3control#JobStatusException$Message",
   19     19   
        "com.amazonaws.s3control",
   20     20   
        "JobStatusException",
   21     21   
    ),
   22     22   
    ::aws_smithy_schema::ShapeType::String,
   23         -
    "message",
          23  +
    "Message",
   24     24   
    0,
   25     25   
);
   26     26   
static JOBSTATUSEXCEPTION_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
   27     27   
    JOBSTATUSEXCEPTION_SCHEMA_ID,
   28     28   
    ::aws_smithy_schema::ShapeType::Structure,
   29     29   
    &[&JOBSTATUSEXCEPTION_MEMBER_MESSAGE],
   30     30   
);
   31     31   
impl JobStatusException {
   32     32   
    /// The schema for this shape.
   33     33   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &JOBSTATUSEXCEPTION_SCHEMA;
   34     34   
}
   35     35   
impl ::aws_smithy_schema::serde::SerializableStruct for JobStatusException {
   36     36   
    #[allow(unused_variables, clippy::diverging_sub_expression)]
   37     37   
    fn serialize_members(
   38     38   
        &self,
   39     39   
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
   40     40   
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
   41     41   
        if let Some(ref val) = self.message {
   42     42   
            ser.write_string(&JOBSTATUSEXCEPTION_MEMBER_MESSAGE, val)?;
   43     43   
        }
   44     44   
        Ok(())
   45     45   
    }
   46     46   
}
   47     47   
impl JobStatusException {
   48     48   
    /// Deserializes this structure from a [`ShapeDeserializer`].
   49         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
   50         -
        deserializer: &mut D,
          49  +
    pub fn deserialize(
          50  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
   51     51   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
   52     52   
        #[allow(unused_variables, unused_mut)]
   53     53   
        let mut builder = Self::builder();
   54     54   
        #[allow(
   55     55   
            unused_variables,
   56     56   
            unreachable_code,
   57     57   
            clippy::single_match,
   58     58   
            clippy::match_single_binding,
   59     59   
            clippy::diverging_sub_expression
   60     60   
        )]
   61         -
        deserializer.read_struct(&JOBSTATUSEXCEPTION_SCHEMA, (), |_, member, deser| {
          61  +
        deserializer.read_struct(&JOBSTATUSEXCEPTION_SCHEMA, &mut |member, deser| {
   62     62   
            match member.member_index() {
   63     63   
                Some(0) => {
   64     64   
                    builder.message = Some(deser.read_string(member)?);
   65     65   
                }
   66     66   
                _ => {}
   67     67   
            }
   68     68   
            Ok(())
   69     69   
        })?;
   70     70   
        Ok(builder.build())
   71     71   
    }
   72     72   
}
          73  +
impl JobStatusException {
          74  +
    /// Deserializes this structure from a body deserializer and HTTP response.
          75  +
    pub fn deserialize_with_response(
          76  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
          77  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
          78  +
        _status: u16,
          79  +
        _body: &[u8],
          80  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
          81  +
        Self::deserialize(deserializer)
          82  +
    }
          83  +
}
   73     84   
impl JobStatusException {
   74     85   
    /// Returns the error message.
   75     86   
    pub fn message(&self) -> ::std::option::Option<&str> {
   76     87   
        self.message.as_deref()
   77     88   
    }
   78     89   
}
   79     90   
impl ::std::fmt::Display for JobStatusException {
   80     91   
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
   81     92   
        ::std::write!(f, "JobStatusException")?;
   82     93   
        if let ::std::option::Option::Some(inner_1) = &self.message {

tmp-codegen-diff/aws-sdk/sdk/s3control/src/types/error/_no_such_public_access_block_configuration.rs

@@ -1,1 +102,113 @@
   13     13   
    "com.amazonaws.s3control",
   14     14   
    "NoSuchPublicAccessBlockConfiguration",
   15     15   
);
   16     16   
static NOSUCHPUBLICACCESSBLOCKCONFIGURATION_MEMBER_MESSAGE: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   17     17   
    ::aws_smithy_schema::ShapeId::from_static(
   18     18   
        "com.amazonaws.s3control#NoSuchPublicAccessBlockConfiguration$Message",
   19     19   
        "com.amazonaws.s3control",
   20     20   
        "NoSuchPublicAccessBlockConfiguration",
   21     21   
    ),
   22     22   
    ::aws_smithy_schema::ShapeType::String,
   23         -
    "message",
          23  +
    "Message",
   24     24   
    0,
   25     25   
);
   26     26   
static NOSUCHPUBLICACCESSBLOCKCONFIGURATION_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
   27     27   
    NOSUCHPUBLICACCESSBLOCKCONFIGURATION_SCHEMA_ID,
   28     28   
    ::aws_smithy_schema::ShapeType::Structure,
   29     29   
    &[&NOSUCHPUBLICACCESSBLOCKCONFIGURATION_MEMBER_MESSAGE],
   30     30   
);
   31     31   
impl NoSuchPublicAccessBlockConfiguration {
   32     32   
    /// The schema for this shape.
   33     33   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &NOSUCHPUBLICACCESSBLOCKCONFIGURATION_SCHEMA;
   34     34   
}
   35     35   
impl ::aws_smithy_schema::serde::SerializableStruct for NoSuchPublicAccessBlockConfiguration {
   36     36   
    #[allow(unused_variables, clippy::diverging_sub_expression)]
   37     37   
    fn serialize_members(
   38     38   
        &self,
   39     39   
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
   40     40   
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
   41     41   
        if let Some(ref val) = self.message {
   42     42   
            ser.write_string(&NOSUCHPUBLICACCESSBLOCKCONFIGURATION_MEMBER_MESSAGE, val)?;
   43     43   
        }
   44     44   
        Ok(())
   45     45   
    }
   46     46   
}
   47     47   
impl NoSuchPublicAccessBlockConfiguration {
   48     48   
    /// Deserializes this structure from a [`ShapeDeserializer`].
   49         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
   50         -
        deserializer: &mut D,
          49  +
    pub fn deserialize(
          50  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
   51     51   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
   52     52   
        #[allow(unused_variables, unused_mut)]
   53     53   
        let mut builder = Self::builder();
   54     54   
        #[allow(
   55     55   
            unused_variables,
   56     56   
            unreachable_code,
   57     57   
            clippy::single_match,
   58     58   
            clippy::match_single_binding,
   59     59   
            clippy::diverging_sub_expression
   60     60   
        )]
   61         -
        deserializer.read_struct(&NOSUCHPUBLICACCESSBLOCKCONFIGURATION_SCHEMA, (), |_, member, deser| {
          61  +
        deserializer.read_struct(&NOSUCHPUBLICACCESSBLOCKCONFIGURATION_SCHEMA, &mut |member, deser| {
   62     62   
            match member.member_index() {
   63     63   
                Some(0) => {
   64     64   
                    builder.message = Some(deser.read_string(member)?);
   65     65   
                }
   66     66   
                _ => {}
   67     67   
            }
   68     68   
            Ok(())
   69     69   
        })?;
   70     70   
        Ok(builder.build())
   71     71   
    }
   72     72   
}
          73  +
impl NoSuchPublicAccessBlockConfiguration {
          74  +
    /// Deserializes this structure from a body deserializer and HTTP response.
          75  +
    pub fn deserialize_with_response(
          76  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
          77  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
          78  +
        _status: u16,
          79  +
        _body: &[u8],
          80  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
          81  +
        Self::deserialize(deserializer)
          82  +
    }
          83  +
}
   73     84   
impl NoSuchPublicAccessBlockConfiguration {
   74     85   
    /// Returns the error message.
   75     86   
    pub fn message(&self) -> ::std::option::Option<&str> {
   76     87   
        self.message.as_deref()
   77     88   
    }
   78     89   
}
   79     90   
impl ::std::fmt::Display for NoSuchPublicAccessBlockConfiguration {
   80     91   
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
   81     92   
        ::std::write!(f, "NoSuchPublicAccessBlockConfiguration")?;
   82     93   
        if let ::std::option::Option::Some(inner_1) = &self.message {

tmp-codegen-diff/aws-sdk/sdk/s3control/src/types/error/_not_found_exception.rs

@@ -1,1 +102,113 @@
   13     13   
    "com.amazonaws.s3control",
   14     14   
    "NotFoundException",
   15     15   
);
   16     16   
static NOTFOUNDEXCEPTION_MEMBER_MESSAGE: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   17     17   
    ::aws_smithy_schema::ShapeId::from_static(
   18     18   
        "com.amazonaws.s3control#NotFoundException$Message",
   19     19   
        "com.amazonaws.s3control",
   20     20   
        "NotFoundException",
   21     21   
    ),
   22     22   
    ::aws_smithy_schema::ShapeType::String,
   23         -
    "message",
          23  +
    "Message",
   24     24   
    0,
   25     25   
);
   26     26   
static NOTFOUNDEXCEPTION_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
   27     27   
    NOTFOUNDEXCEPTION_SCHEMA_ID,
   28     28   
    ::aws_smithy_schema::ShapeType::Structure,
   29     29   
    &[&NOTFOUNDEXCEPTION_MEMBER_MESSAGE],
   30     30   
);
   31     31   
impl NotFoundException {
   32     32   
    /// The schema for this shape.
   33     33   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &NOTFOUNDEXCEPTION_SCHEMA;
   34     34   
}
   35     35   
impl ::aws_smithy_schema::serde::SerializableStruct for NotFoundException {
   36     36   
    #[allow(unused_variables, clippy::diverging_sub_expression)]
   37     37   
    fn serialize_members(
   38     38   
        &self,
   39     39   
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
   40     40   
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
   41     41   
        if let Some(ref val) = self.message {
   42     42   
            ser.write_string(&NOTFOUNDEXCEPTION_MEMBER_MESSAGE, val)?;
   43     43   
        }
   44     44   
        Ok(())
   45     45   
    }
   46     46   
}
   47     47   
impl NotFoundException {
   48     48   
    /// Deserializes this structure from a [`ShapeDeserializer`].
   49         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
   50         -
        deserializer: &mut D,
          49  +
    pub fn deserialize(
          50  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
   51     51   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
   52     52   
        #[allow(unused_variables, unused_mut)]
   53     53   
        let mut builder = Self::builder();
   54     54   
        #[allow(
   55     55   
            unused_variables,
   56     56   
            unreachable_code,
   57     57   
            clippy::single_match,
   58     58   
            clippy::match_single_binding,
   59     59   
            clippy::diverging_sub_expression
   60     60   
        )]
   61         -
        deserializer.read_struct(&NOTFOUNDEXCEPTION_SCHEMA, (), |_, member, deser| {
          61  +
        deserializer.read_struct(&NOTFOUNDEXCEPTION_SCHEMA, &mut |member, deser| {
   62     62   
            match member.member_index() {
   63     63   
                Some(0) => {
   64     64   
                    builder.message = Some(deser.read_string(member)?);
   65     65   
                }
   66     66   
                _ => {}
   67     67   
            }
   68     68   
            Ok(())
   69     69   
        })?;
   70     70   
        Ok(builder.build())
   71     71   
    }
   72     72   
}
          73  +
impl NotFoundException {
          74  +
    /// Deserializes this structure from a body deserializer and HTTP response.
          75  +
    pub fn deserialize_with_response(
          76  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
          77  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
          78  +
        _status: u16,
          79  +
        _body: &[u8],
          80  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
          81  +
        Self::deserialize(deserializer)
          82  +
    }
          83  +
}
   73     84   
impl NotFoundException {
   74     85   
    /// Returns the error message.
   75     86   
    pub fn message(&self) -> ::std::option::Option<&str> {
   76     87   
        self.message.as_deref()
   77     88   
    }
   78     89   
}
   79     90   
impl ::std::fmt::Display for NotFoundException {
   80     91   
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
   81     92   
        ::std::write!(f, "NotFoundException")?;
   82     93   
        if let ::std::option::Option::Some(inner_1) = &self.message {

tmp-codegen-diff/aws-sdk/sdk/s3control/src/types/error/_too_many_requests_exception.rs

@@ -1,1 +102,113 @@
   13     13   
    "com.amazonaws.s3control",
   14     14   
    "TooManyRequestsException",
   15     15   
);
   16     16   
static TOOMANYREQUESTSEXCEPTION_MEMBER_MESSAGE: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   17     17   
    ::aws_smithy_schema::ShapeId::from_static(
   18     18   
        "com.amazonaws.s3control#TooManyRequestsException$Message",
   19     19   
        "com.amazonaws.s3control",
   20     20   
        "TooManyRequestsException",
   21     21   
    ),
   22     22   
    ::aws_smithy_schema::ShapeType::String,
   23         -
    "message",
          23  +
    "Message",
   24     24   
    0,
   25     25   
);
   26     26   
static TOOMANYREQUESTSEXCEPTION_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
   27     27   
    TOOMANYREQUESTSEXCEPTION_SCHEMA_ID,
   28     28   
    ::aws_smithy_schema::ShapeType::Structure,
   29     29   
    &[&TOOMANYREQUESTSEXCEPTION_MEMBER_MESSAGE],
   30     30   
);
   31     31   
impl TooManyRequestsException {
   32     32   
    /// The schema for this shape.
   33     33   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &TOOMANYREQUESTSEXCEPTION_SCHEMA;
   34     34   
}
   35     35   
impl ::aws_smithy_schema::serde::SerializableStruct for TooManyRequestsException {
   36     36   
    #[allow(unused_variables, clippy::diverging_sub_expression)]
   37     37   
    fn serialize_members(
   38     38   
        &self,
   39     39   
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
   40     40   
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
   41     41   
        if let Some(ref val) = self.message {
   42     42   
            ser.write_string(&TOOMANYREQUESTSEXCEPTION_MEMBER_MESSAGE, val)?;
   43     43   
        }
   44     44   
        Ok(())
   45     45   
    }
   46     46   
}
   47     47   
impl TooManyRequestsException {
   48     48   
    /// Deserializes this structure from a [`ShapeDeserializer`].
   49         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
   50         -
        deserializer: &mut D,
          49  +
    pub fn deserialize(
          50  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
   51     51   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
   52     52   
        #[allow(unused_variables, unused_mut)]
   53     53   
        let mut builder = Self::builder();
   54     54   
        #[allow(
   55     55   
            unused_variables,
   56     56   
            unreachable_code,
   57     57   
            clippy::single_match,
   58     58   
            clippy::match_single_binding,
   59     59   
            clippy::diverging_sub_expression
   60     60   
        )]
   61         -
        deserializer.read_struct(&TOOMANYREQUESTSEXCEPTION_SCHEMA, (), |_, member, deser| {
          61  +
        deserializer.read_struct(&TOOMANYREQUESTSEXCEPTION_SCHEMA, &mut |member, deser| {
   62     62   
            match member.member_index() {
   63     63   
                Some(0) => {
   64     64   
                    builder.message = Some(deser.read_string(member)?);
   65     65   
                }
   66     66   
                _ => {}
   67     67   
            }
   68     68   
            Ok(())
   69     69   
        })?;
   70     70   
        Ok(builder.build())
   71     71   
    }
   72     72   
}
          73  +
impl TooManyRequestsException {
          74  +
    /// Deserializes this structure from a body deserializer and HTTP response.
          75  +
    pub fn deserialize_with_response(
          76  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
          77  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
          78  +
        _status: u16,
          79  +
        _body: &[u8],
          80  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
          81  +
        Self::deserialize(deserializer)
          82  +
    }
          83  +
}
   73     84   
impl TooManyRequestsException {
   74     85   
    /// Returns the error message.
   75     86   
    pub fn message(&self) -> ::std::option::Option<&str> {
   76     87   
        self.message.as_deref()
   77     88   
    }
   78     89   
}
   79     90   
impl ::std::fmt::Display for TooManyRequestsException {
   80     91   
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
   81     92   
        ::std::write!(f, "TooManyRequestsException")?;
   82     93   
        if let ::std::option::Option::Some(inner_1) = &self.message {

tmp-codegen-diff/aws-sdk/sdk/s3control/src/types/error/_too_many_tags_exception.rs

@@ -1,1 +102,113 @@
   13     13   
    "com.amazonaws.s3control",
   14     14   
    "TooManyTagsException",
   15     15   
);
   16     16   
static TOOMANYTAGSEXCEPTION_MEMBER_MESSAGE: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   17     17   
    ::aws_smithy_schema::ShapeId::from_static(
   18     18   
        "com.amazonaws.s3control#TooManyTagsException$Message",
   19     19   
        "com.amazonaws.s3control",
   20     20   
        "TooManyTagsException",
   21     21   
    ),
   22     22   
    ::aws_smithy_schema::ShapeType::String,
   23         -
    "message",
          23  +
    "Message",
   24     24   
    0,
   25     25   
);
   26     26   
static TOOMANYTAGSEXCEPTION_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
   27     27   
    TOOMANYTAGSEXCEPTION_SCHEMA_ID,
   28     28   
    ::aws_smithy_schema::ShapeType::Structure,
   29     29   
    &[&TOOMANYTAGSEXCEPTION_MEMBER_MESSAGE],
   30     30   
);
   31     31   
impl TooManyTagsException {
   32     32   
    /// The schema for this shape.
   33     33   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &TOOMANYTAGSEXCEPTION_SCHEMA;
   34     34   
}
   35     35   
impl ::aws_smithy_schema::serde::SerializableStruct for TooManyTagsException {
   36     36   
    #[allow(unused_variables, clippy::diverging_sub_expression)]
   37     37   
    fn serialize_members(
   38     38   
        &self,
   39     39   
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
   40     40   
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
   41     41   
        if let Some(ref val) = self.message {
   42     42   
            ser.write_string(&TOOMANYTAGSEXCEPTION_MEMBER_MESSAGE, val)?;
   43     43   
        }
   44     44   
        Ok(())
   45     45   
    }
   46     46   
}
   47     47   
impl TooManyTagsException {
   48     48   
    /// Deserializes this structure from a [`ShapeDeserializer`].
   49         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
   50         -
        deserializer: &mut D,
          49  +
    pub fn deserialize(
          50  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
   51     51   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
   52     52   
        #[allow(unused_variables, unused_mut)]
   53     53   
        let mut builder = Self::builder();
   54     54   
        #[allow(
   55     55   
            unused_variables,
   56     56   
            unreachable_code,
   57     57   
            clippy::single_match,
   58     58   
            clippy::match_single_binding,
   59     59   
            clippy::diverging_sub_expression
   60     60   
        )]
   61         -
        deserializer.read_struct(&TOOMANYTAGSEXCEPTION_SCHEMA, (), |_, member, deser| {
          61  +
        deserializer.read_struct(&TOOMANYTAGSEXCEPTION_SCHEMA, &mut |member, deser| {
   62     62   
            match member.member_index() {
   63     63   
                Some(0) => {
   64     64   
                    builder.message = Some(deser.read_string(member)?);
   65     65   
                }
   66     66   
                _ => {}
   67     67   
            }
   68     68   
            Ok(())
   69     69   
        })?;
   70     70   
        Ok(builder.build())
   71     71   
    }
   72     72   
}
          73  +
impl TooManyTagsException {
          74  +
    /// Deserializes this structure from a body deserializer and HTTP response.
          75  +
    pub fn deserialize_with_response(
          76  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
          77  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
          78  +
        _status: u16,
          79  +
        _body: &[u8],
          80  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
          81  +
        Self::deserialize(deserializer)
          82  +
    }
          83  +
}
   73     84   
impl TooManyTagsException {
   74     85   
    /// Returns the error message.
   75     86   
    pub fn message(&self) -> ::std::option::Option<&str> {
   76     87   
        self.message.as_deref()
   77     88   
    }
   78     89   
}
   79     90   
impl ::std::fmt::Display for TooManyTagsException {
   80     91   
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
   81     92   
        ::std::write!(f, "TooManyTagsException")?;
   82     93   
        if let ::std::option::Option::Some(inner_1) = &self.message {

tmp-codegen-diff/aws-sdk/sdk/signin/Cargo.toml

@@ -15,15 +80,80 @@
   35     35   
path = "../aws-smithy-json"
   36     36   
version = "0.62.6"
   37     37   
   38     38   
[dependencies.aws-smithy-observability]
   39     39   
path = "../aws-smithy-observability"
   40     40   
version = "0.2.6"
   41     41   
   42     42   
[dependencies.aws-smithy-runtime]
   43     43   
path = "../aws-smithy-runtime"
   44     44   
features = ["client"]
   45         -
version = "1.10.3"
          45  +
version = "1.10.4"
   46     46   
   47     47   
[dependencies.aws-smithy-runtime-api]
   48     48   
path = "../aws-smithy-runtime-api"
   49     49   
features = ["client", "http-1x"]
   50         -
version = "1.11.6"
          50  +
version = "1.11.7"
   51     51   
   52     52   
[dependencies.aws-smithy-schema]
   53     53   
path = "../aws-smithy-schema"
   54     54   
version = "1.0.0"
   55     55   
   56     56   
[dependencies.aws-smithy-types]
   57     57   
path = "../aws-smithy-types"
   58     58   
features = ["http-body-1-x"]
   59     59   
version = "1.4.7"
   60     60   

tmp-codegen-diff/aws-sdk/sdk/signin/src/config.rs

@@ -23,23 +82,86 @@
   43     43   
            config: self.cloneable.clone(),
   44     44   
            runtime_components: self.runtime_components.clone(),
   45     45   
            runtime_plugins: self.runtime_plugins.clone(),
   46     46   
            behavior_version: self.behavior_version,
   47     47   
        }
   48     48   
    }
   49     49   
    /// Return a reference to the stalled stream protection configuration contained in this config, if any.
   50     50   
    pub fn stalled_stream_protection(&self) -> ::std::option::Option<&crate::config::StalledStreamProtectionConfig> {
   51     51   
        self.config.load::<crate::config::StalledStreamProtectionConfig>()
   52     52   
    }
          53  +
    /// Returns the client protocol used for serialization and deserialization.
          54  +
    pub fn protocol(&self) -> ::std::option::Option<&::aws_smithy_schema::protocol::SharedClientProtocol> {
          55  +
        self.config.load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
          56  +
    }
   53     57   
    /// Return the [`SharedHttpClient`](crate::config::SharedHttpClient) to use when making requests, if any.
   54     58   
    pub fn http_client(&self) -> Option<crate::config::SharedHttpClient> {
   55     59   
        self.runtime_components.http_client()
   56     60   
    }
   57     61   
    /// Return the auth schemes configured on this service config
   58     62   
    pub fn auth_schemes(&self) -> impl Iterator<Item = ::aws_smithy_runtime_api::client::auth::SharedAuthScheme> + '_ {
   59     63   
        self.runtime_components.auth_schemes()
   60     64   
    }
   61     65   
   62     66   
    /// Return the auth scheme resolver configured on this service config
@@ -153,157 +238,261 @@
  173    177   
    ///
  174    178   
    pub fn new() -> Self {
  175    179   
        Self::default()
  176    180   
    }
  177    181   
    /// Constructs a config builder from the given `config_bag`, setting only fields stored in the config bag,
  178    182   
    /// but not those in runtime components.
  179    183   
    #[allow(unused)]
  180    184   
    pub(crate) fn from_config_bag(config_bag: &::aws_smithy_types::config_bag::ConfigBag) -> Self {
  181    185   
        let mut builder = Self::new();
  182    186   
        builder.set_stalled_stream_protection(config_bag.load::<crate::config::StalledStreamProtectionConfig>().cloned());
         187  +
        if let ::std::option::Option::Some(protocol) = config_bag.load::<::aws_smithy_schema::protocol::SharedClientProtocol>().cloned() {
         188  +
            builder.set_protocol(::std::option::Option::Some(protocol));
         189  +
        }
  183    190   
        builder.set_auth_scheme_preference(config_bag.load::<::aws_smithy_runtime_api::client::auth::AuthSchemePreference>().cloned());
  184    191   
        builder.set_retry_config(config_bag.load::<::aws_smithy_types::retry::RetryConfig>().cloned());
  185    192   
        builder.set_timeout_config(config_bag.load::<::aws_smithy_types::timeout::TimeoutConfig>().cloned());
  186    193   
        builder.set_retry_partition(config_bag.load::<::aws_smithy_runtime::client::retries::RetryPartition>().cloned());
  187    194   
        builder.set_app_name(config_bag.load::<::aws_types::app_name::AppName>().cloned());
  188    195   
        builder.set_endpoint_url(config_bag.load::<::aws_types::endpoint_config::EndpointUrl>().map(|ty| ty.0.clone()));
  189    196   
        builder.set_use_dual_stack(config_bag.load::<::aws_types::endpoint_config::UseDualStack>().map(|ty| ty.0));
  190    197   
        builder.set_use_fips(config_bag.load::<::aws_types::endpoint_config::UseFips>().map(|ty| ty.0));
  191    198   
        builder.set_region(config_bag.load::<crate::config::Region>().cloned());
  192    199   
        builder
  193    200   
    }
  194    201   
    /// Set the [`StalledStreamProtectionConfig`](crate::config::StalledStreamProtectionConfig)
  195    202   
    /// to configure protection for stalled streams.
  196    203   
    pub fn stalled_stream_protection(mut self, stalled_stream_protection_config: crate::config::StalledStreamProtectionConfig) -> Self {
  197    204   
        self.set_stalled_stream_protection(::std::option::Option::Some(stalled_stream_protection_config));
  198    205   
        self
  199    206   
    }
  200    207   
    /// Set the [`StalledStreamProtectionConfig`](crate::config::StalledStreamProtectionConfig)
  201    208   
    /// to configure protection for stalled streams.
  202    209   
    pub fn set_stalled_stream_protection(
  203    210   
        &mut self,
  204    211   
        stalled_stream_protection_config: ::std::option::Option<crate::config::StalledStreamProtectionConfig>,
  205    212   
    ) -> &mut Self {
  206    213   
        self.config.store_or_unset(stalled_stream_protection_config);
  207    214   
        self
  208    215   
    }
         216  +
    /// Sets the client protocol to use for serialization and deserialization.
         217  +
    ///
         218  +
    /// This overrides the default protocol determined by the service model,
         219  +
    /// enabling runtime protocol selection.
         220  +
    pub fn protocol(mut self, protocol: impl ::aws_smithy_schema::protocol::ClientProtocol + 'static) -> Self {
         221  +
        self.set_protocol(::std::option::Option::Some(::aws_smithy_schema::protocol::SharedClientProtocol::new(
         222  +
            protocol,
         223  +
        )));
         224  +
        self
         225  +
    }
         226  +
         227  +
    /// Sets the client protocol to use for serialization and deserialization.
         228  +
    pub fn set_protocol(&mut self, protocol: ::std::option::Option<::aws_smithy_schema::protocol::SharedClientProtocol>) -> &mut Self {
         229  +
        self.config.store_or_unset(protocol);
         230  +
        self
         231  +
    }
  209    232   
    /// Sets the HTTP client to use when making requests.
  210    233   
    ///
  211    234   
    /// # Examples
  212    235   
    /// ```no_run
  213    236   
    /// # #[cfg(test)]
  214    237   
    /// # mod tests {
  215    238   
    /// # #[test]
  216    239   
    /// # fn example() {
  217    240   
    /// use std::time::Duration;
  218    241   
    /// use aws_sdk_signin::config::Config;
@@ -1272,1295 +1331,1359 @@
 1292   1315   
#[derive(::std::fmt::Debug)]
 1293   1316   
pub(crate) struct ServiceRuntimePlugin {
 1294   1317   
    config: ::std::option::Option<::aws_smithy_types::config_bag::FrozenLayer>,
 1295   1318   
    runtime_components: ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder,
 1296   1319   
}
 1297   1320   
 1298   1321   
impl ServiceRuntimePlugin {
 1299   1322   
    pub fn new(_service_config: crate::config::Config) -> Self {
 1300   1323   
        let config = {
 1301   1324   
            let mut cfg = ::aws_smithy_types::config_bag::Layer::new("Signin");
        1325  +
            if _service_config.protocol().is_none() {
        1326  +
                cfg.store_put(::aws_smithy_schema::protocol::SharedClientProtocol::new(
        1327  +
                    ::aws_smithy_json::protocol::aws_rest_json_1::AwsRestJsonProtocol::new(),
        1328  +
                ));
        1329  +
            }
 1302   1330   
            cfg.store_put(::aws_smithy_runtime::client::orchestrator::AuthSchemeAndEndpointOrchestrationV2);
 1303   1331   
            ::std::option::Option::Some(cfg.freeze())
 1304   1332   
        };
 1305   1333   
        let mut runtime_components = ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder::new("ServiceRuntimePlugin");
 1306   1334   
        runtime_components.set_auth_scheme_option_resolver(::std::option::Option::Some({
 1307   1335   
            use crate::config::auth::ResolveAuthScheme;
 1308   1336   
            crate::config::auth::DefaultAuthSchemeResolver::default().into_shared_resolver()
 1309   1337   
        }));
 1310   1338   
        runtime_components.set_endpoint_resolver(::std::option::Option::Some({
 1311   1339   
            use crate::config::endpoint::ResolveEndpoint;
@@ -1407,1435 +1466,1497 @@
 1427   1455   
        }
 1428   1456   
        // resiliency
 1429   1457   
        builder.set_retry_config(input.retry_config().cloned());
 1430   1458   
        builder.set_timeout_config(input.timeout_config().cloned());
 1431   1459   
        builder.set_sleep_impl(input.sleep_impl());
 1432   1460   
 1433   1461   
        builder.set_http_client(input.http_client());
 1434   1462   
        builder.set_time_source(input.time_source());
 1435   1463   
        builder.set_behavior_version(input.behavior_version());
 1436   1464   
        builder.set_auth_scheme_preference(input.auth_scheme_preference().cloned());
        1465  +
        if let Some(protocol) = input.protocol() {
        1466  +
            builder.set_protocol(Some(protocol.clone()));
        1467  +
        }
 1437   1468   
        // setting `None` here removes the default
 1438   1469   
        if let Some(config) = input.stalled_stream_protection() {
 1439   1470   
            builder.set_stalled_stream_protection(Some(config));
 1440   1471   
        }
 1441   1472   
 1442   1473   
        if let Some(cache) = input.identity_cache() {
 1443   1474   
            builder.set_identity_cache(cache);
 1444   1475   
        }
 1445   1476   
        builder.set_app_name(input.app_name().cloned());
 1446   1477   

tmp-codegen-diff/aws-sdk/sdk/signin/src/lib.rs

@@ -104,104 +143,139 @@
  124    124   
  125    125   
/// Data structures used by operation inputs/outputs.
  126    126   
pub mod types;
  127    127   
  128    128   
mod observability_feature;
  129    129   
  130    130   
pub(crate) mod protocol_serde;
  131    131   
  132    132   
mod sdk_feature_tracker;
  133    133   
  134         -
mod serialization_settings;
  135         -
  136    134   
mod endpoint_lib;
  137    135   
  138         -
mod serde_util;
  139         -
  140    136   
mod json_errors;
  141    137   
  142    138   
#[doc(inline)]
  143    139   
pub use client::Client;

tmp-codegen-diff/aws-sdk/sdk/signin/src/operation/create_o_auth2_token.rs

@@ -1,1 +40,44 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2      2   
/// Orchestration and serialization glue logic for `CreateOAuth2Token`.
    3      3   
#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
    4      4   
#[non_exhaustive]
    5      5   
pub struct CreateOAuth2Token;
    6      6   
impl CreateOAuth2Token {
    7      7   
    /// Creates a new `CreateOAuth2Token`
    8      8   
    pub fn new() -> Self {
    9      9   
        Self
   10     10   
    }
          11  +
    /// The schema for this operation's input shape.
          12  +
    pub const INPUT_SCHEMA: &'static ::aws_smithy_schema::Schema = crate::operation::create_o_auth2_token::CreateOAuth2TokenInput::SCHEMA;
          13  +
    /// The schema for this operation's output shape.
          14  +
    pub const OUTPUT_SCHEMA: &'static ::aws_smithy_schema::Schema = crate::operation::create_o_auth2_token::CreateOAuth2TokenOutput::SCHEMA;
   11     15   
    pub(crate) async fn orchestrate(
   12     16   
        runtime_plugins: &::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins,
   13     17   
        input: crate::operation::create_o_auth2_token::CreateOAuth2TokenInput,
   14     18   
    ) -> ::std::result::Result<
   15     19   
        crate::operation::create_o_auth2_token::CreateOAuth2TokenOutput,
   16     20   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     21   
            crate::operation::create_o_auth2_token::CreateOAuth2TokenError,
   18     22   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     23   
        >,
   20     24   
    > {
@@ -109,113 +233,337 @@
  129    133   
                crate::operation::create_o_auth2_token::CreateOAuth2TokenError,
  130    134   
            >::new());
  131    135   
  132    136   
        ::std::borrow::Cow::Owned(rcb)
  133    137   
    }
  134    138   
}
  135    139   
  136    140   
#[derive(Debug)]
  137    141   
struct CreateOAuth2TokenResponseDeserializer;
  138    142   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for CreateOAuth2TokenResponseDeserializer {
  139         -
    fn deserialize_nonstreaming(
         143  +
    fn deserialize_nonstreaming_with_config(
  140    144   
        &self,
  141    145   
        response: &::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
         146  +
        _cfg: &::aws_smithy_types::config_bag::ConfigBag,
  142    147   
    ) -> ::aws_smithy_runtime_api::client::interceptors::context::OutputOrError {
  143    148   
        let (success, status) = (response.status().is_success(), response.status().as_u16());
  144         -
        let headers = response.headers();
  145         -
        let body = response.body().bytes().expect("body loaded");
  146    149   
        #[allow(unused_mut)]
  147    150   
        let mut force_error = false;
  148    151   
        ::tracing::debug!(request_id = ?::aws_types::request_id::RequestId::request_id(response));
  149         -
        let parse_result = if !success && status != 200 || force_error {
  150         -
            crate::protocol_serde::shape_create_o_auth2_token::de_create_o_auth2_token_http_error(status, headers, body)
         152  +
        if !success && status != 200 || force_error {
         153  +
            let headers = response.headers();
         154  +
            let body = response.body().bytes().expect("body loaded");
         155  +
            #[allow(unused_mut)]
         156  +
            let mut generic_builder = crate::protocol_serde::parse_http_error_metadata(status, headers, body).map_err(|e| {
         157  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         158  +
            })?;
         159  +
            generic_builder = ::aws_types::request_id::apply_request_id(generic_builder, headers);
         160  +
            let generic = generic_builder.build();
         161  +
            let error_code = match generic.code() {
         162  +
                ::std::option::Option::Some(code) => code,
         163  +
                ::std::option::Option::None => {
         164  +
                    return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         165  +
                        ::aws_smithy_runtime_api::box_error::BoxError::from(
         166  +
                            crate::operation::create_o_auth2_token::CreateOAuth2TokenError::unhandled(generic),
         167  +
                        ),
         168  +
                    ))
         169  +
                }
         170  +
            };
         171  +
            let _error_message = generic.message().map(|msg| msg.to_owned());
         172  +
            let protocol = _cfg
         173  +
                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         174  +
                .expect("a SharedClientProtocol is required");
         175  +
            let err = match error_code {
         176  +
                "AccessDeniedException" => crate::operation::create_o_auth2_token::CreateOAuth2TokenError::AccessDeniedException({
         177  +
                    let mut tmp = match protocol
         178  +
                        .deserialize_response(response, crate::types::error::AccessDeniedException::SCHEMA, _cfg)
         179  +
                        .and_then(|mut deser| {
         180  +
                            crate::types::error::AccessDeniedException::deserialize_with_response(
         181  +
                                &mut *deser,
         182  +
                                response.headers(),
         183  +
                                response.status().into(),
         184  +
                                body,
         185  +
                            )
         186  +
                        }) {
         187  +
                        ::std::result::Result::Ok(val) => val,
         188  +
                        ::std::result::Result::Err(e) => {
         189  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         190  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         191  +
                            ))
         192  +
                        }
         193  +
                    };
         194  +
                    tmp.meta = generic;
         195  +
                    tmp
         196  +
                }),
         197  +
                "InternalServerException" => crate::operation::create_o_auth2_token::CreateOAuth2TokenError::InternalServerException({
         198  +
                    let mut tmp = match protocol
         199  +
                        .deserialize_response(response, crate::types::error::InternalServerException::SCHEMA, _cfg)
         200  +
                        .and_then(|mut deser| {
         201  +
                            crate::types::error::InternalServerException::deserialize_with_response(
         202  +
                                &mut *deser,
         203  +
                                response.headers(),
         204  +
                                response.status().into(),
         205  +
                                body,
         206  +
                            )
         207  +
                        }) {
         208  +
                        ::std::result::Result::Ok(val) => val,
         209  +
                        ::std::result::Result::Err(e) => {
         210  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         211  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         212  +
                            ))
         213  +
                        }
         214  +
                    };
         215  +
                    tmp.meta = generic;
         216  +
                    tmp
         217  +
                }),
         218  +
                "TooManyRequestsError" => crate::operation::create_o_auth2_token::CreateOAuth2TokenError::TooManyRequestsError({
         219  +
                    let mut tmp = match protocol
         220  +
                        .deserialize_response(response, crate::types::error::TooManyRequestsError::SCHEMA, _cfg)
         221  +
                        .and_then(|mut deser| {
         222  +
                            crate::types::error::TooManyRequestsError::deserialize_with_response(
         223  +
                                &mut *deser,
         224  +
                                response.headers(),
         225  +
                                response.status().into(),
         226  +
                                body,
         227  +
                            )
         228  +
                        }) {
         229  +
                        ::std::result::Result::Ok(val) => val,
         230  +
                        ::std::result::Result::Err(e) => {
         231  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         232  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         233  +
                            ))
         234  +
                        }
         235  +
                    };
         236  +
                    tmp.meta = generic;
         237  +
                    tmp
         238  +
                }),
         239  +
                "ValidationException" => crate::operation::create_o_auth2_token::CreateOAuth2TokenError::ValidationException({
         240  +
                    let mut tmp = match protocol
         241  +
                        .deserialize_response(response, crate::types::error::ValidationException::SCHEMA, _cfg)
         242  +
                        .and_then(|mut deser| {
         243  +
                            crate::types::error::ValidationException::deserialize_with_response(
         244  +
                                &mut *deser,
         245  +
                                response.headers(),
         246  +
                                response.status().into(),
         247  +
                                body,
         248  +
                            )
         249  +
                        }) {
         250  +
                        ::std::result::Result::Ok(val) => val,
         251  +
                        ::std::result::Result::Err(e) => {
         252  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         253  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         254  +
                            ))
         255  +
                        }
         256  +
                    };
         257  +
                    tmp.meta = generic;
         258  +
                    tmp
         259  +
                }),
         260  +
                _ => crate::operation::create_o_auth2_token::CreateOAuth2TokenError::generic(generic),
         261  +
            };
         262  +
            ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::operation(
         263  +
                ::aws_smithy_runtime_api::client::interceptors::context::Error::erase(err),
         264  +
            ))
  151    265   
        } else {
  152         -
            crate::protocol_serde::shape_create_o_auth2_token::de_create_o_auth2_token_http_response(status, headers, body)
  153         -
        };
  154         -
        crate::protocol_serde::type_erase_result(parse_result)
         266  +
            let protocol = _cfg
         267  +
                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         268  +
                .expect("a SharedClientProtocol is required");
         269  +
            let mut deser = protocol
         270  +
                .deserialize_response(response, CreateOAuth2Token::OUTPUT_SCHEMA, _cfg)
         271  +
                .map_err(|e| {
         272  +
                    ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         273  +
                })?;
         274  +
            let body = response.body().bytes().expect("body loaded");
         275  +
            let output = crate::operation::create_o_auth2_token::CreateOAuth2TokenOutput::deserialize_with_response(
         276  +
                &mut *deser,
         277  +
                response.headers(),
         278  +
                response.status().into(),
         279  +
                body,
         280  +
            )
         281  +
            .map_err(|e| {
         282  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         283  +
            })?;
         284  +
            ::std::result::Result::Ok(::aws_smithy_runtime_api::client::interceptors::context::Output::erase(output))
         285  +
        }
  155    286   
    }
  156    287   
}
  157    288   
#[derive(Debug)]
  158    289   
struct CreateOAuth2TokenRequestSerializer;
  159    290   
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for CreateOAuth2TokenRequestSerializer {
  160    291   
    #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
  161    292   
    fn serialize_input(
  162    293   
        &self,
  163    294   
        input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
  164    295   
        _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  165    296   
    ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
  166    297   
        let input = input
  167    298   
            .downcast::<crate::operation::create_o_auth2_token::CreateOAuth2TokenInput>()
  168    299   
            .expect("correct type");
  169         -
        let _header_serialization_settings = _cfg
  170         -
            .load::<crate::serialization_settings::HeaderSerializationSettings>()
  171         -
            .cloned()
  172         -
            .unwrap_or_default();
  173         -
        let mut request_builder = {
  174         -
            #[allow(clippy::uninlined_format_args)]
  175         -
            fn uri_base(
  176         -
                _input: &crate::operation::create_o_auth2_token::CreateOAuth2TokenInput,
  177         -
                output: &mut ::std::string::String,
  178         -
            ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
  179         -
                use ::std::fmt::Write as _;
  180         -
                ::std::write!(output, "/v1/token").expect("formatting should succeed");
  181         -
                ::std::result::Result::Ok(())
  182         -
            }
  183         -
            #[allow(clippy::unnecessary_wraps)]
  184         -
            fn update_http_builder(
  185         -
                input: &crate::operation::create_o_auth2_token::CreateOAuth2TokenInput,
  186         -
                builder: ::http_1x::request::Builder,
  187         -
            ) -> ::std::result::Result<::http_1x::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
  188         -
                let mut uri = ::std::string::String::new();
  189         -
                uri_base(input, &mut uri)?;
  190         -
                ::std::result::Result::Ok(builder.method("POST").uri(uri))
  191         -
            }
  192         -
            let mut builder = update_http_builder(&input, ::http_1x::request::Builder::new())?;
  193         -
            builder = _header_serialization_settings.set_default_header(builder, ::http_1x::header::CONTENT_TYPE, "application/json");
  194         -
            builder
  195         -
        };
  196         -
        let body = ::aws_smithy_types::body::SdkBody::from(crate::protocol_serde::shape_create_o_auth2_token_input::ser_token_input_http_payload(
  197         -
            &input.token_input,
  198         -
        )?);
  199         -
        if let Some(content_length) = body.content_length() {
  200         -
            let content_length = content_length.to_string();
  201         -
            request_builder = _header_serialization_settings.set_default_header(request_builder, ::http_1x::header::CONTENT_LENGTH, &content_length);
  202         -
        }
  203         -
        ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
         300  +
        let protocol = _cfg
         301  +
            .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         302  +
            .expect("a SharedClientProtocol is required");
         303  +
        let mut request = protocol
         304  +
            .serialize_request(&input, CreateOAuth2Token::INPUT_SCHEMA, "", _cfg)
         305  +
            .map_err(::aws_smithy_runtime_api::box_error::BoxError::from)?;
         306  +
         307  +
        return ::std::result::Result::Ok(request);
  204    308   
    }
  205    309   
}
  206    310   
#[derive(Debug)]
  207    311   
struct CreateOAuth2TokenEndpointParamsInterceptor;
  208    312   
  209    313   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for CreateOAuth2TokenEndpointParamsInterceptor {
  210    314   
    fn name(&self) -> &'static str {
  211    315   
        "CreateOAuth2TokenEndpointParamsInterceptor"
  212    316   
    }
  213    317   

tmp-codegen-diff/aws-sdk/sdk/signin/src/operation/create_o_auth2_token/_create_o_auth2_token_input.rs

@@ -1,1 +110,131 @@
   18     18   
    "com.amazonaws.signin.synthetic",
   19     19   
    "CreateOAuth2TokenInput",
   20     20   
);
   21     21   
static CREATEOAUTH2TOKENINPUT_MEMBER_TOKEN_INPUT: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   22     22   
    ::aws_smithy_schema::ShapeId::from_static(
   23     23   
        "com.amazonaws.signin.synthetic#CreateOAuth2TokenInput$tokenInput",
   24     24   
        "com.amazonaws.signin.synthetic",
   25     25   
        "CreateOAuth2TokenInput",
   26     26   
    ),
   27     27   
    ::aws_smithy_schema::ShapeType::Structure,
   28         -
    "token_input",
          28  +
    "tokenInput",
   29     29   
    0,
   30     30   
)
   31     31   
.with_http_payload();
   32     32   
static CREATEOAUTH2TOKENINPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
   33     33   
    CREATEOAUTH2TOKENINPUT_SCHEMA_ID,
   34     34   
    ::aws_smithy_schema::ShapeType::Structure,
   35     35   
    &[&CREATEOAUTH2TOKENINPUT_MEMBER_TOKEN_INPUT],
   36         -
);
          36  +
)
          37  +
.with_http(aws_smithy_schema::traits::HttpTrait::new("POST", "/v1/token", None));
   37     38   
impl CreateOAuth2TokenInput {
   38     39   
    /// The schema for this shape.
   39     40   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &CREATEOAUTH2TOKENINPUT_SCHEMA;
   40     41   
}
   41     42   
impl ::aws_smithy_schema::serde::SerializableStruct for CreateOAuth2TokenInput {
   42     43   
    #[allow(unused_variables, clippy::diverging_sub_expression)]
   43     44   
    fn serialize_members(
   44     45   
        &self,
   45     46   
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
   46     47   
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
   47     48   
        if let Some(ref val) = self.token_input {
   48     49   
            ser.write_struct(&CREATEOAUTH2TOKENINPUT_MEMBER_TOKEN_INPUT, val)?;
   49     50   
        }
   50     51   
        Ok(())
   51     52   
    }
   52     53   
}
   53     54   
impl CreateOAuth2TokenInput {
   54     55   
    /// Deserializes this structure from a [`ShapeDeserializer`].
   55         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
   56         -
        deserializer: &mut D,
          56  +
    pub fn deserialize(
          57  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
   57     58   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
   58     59   
        #[allow(unused_variables, unused_mut)]
   59     60   
        let mut builder = Self::builder();
   60     61   
        #[allow(
   61     62   
            unused_variables,
   62     63   
            unreachable_code,
   63     64   
            clippy::single_match,
   64     65   
            clippy::match_single_binding,
   65     66   
            clippy::diverging_sub_expression
   66     67   
        )]
   67         -
        deserializer.read_struct(&CREATEOAUTH2TOKENINPUT_SCHEMA, (), |_, member, deser| {
          68  +
        deserializer.read_struct(&CREATEOAUTH2TOKENINPUT_SCHEMA, &mut |member, deser| {
   68     69   
            match member.member_index() {
   69     70   
                Some(0) => {
   70     71   
                    builder.token_input = Some(crate::types::CreateOAuth2TokenRequestBody::deserialize(deser)?);
   71     72   
                }
   72     73   
                _ => {}
   73     74   
            }
   74     75   
            Ok(())
   75     76   
        })?;
   76     77   
        builder
   77     78   
            .build()
   78     79   
            .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
   79     80   
    }
   80     81   
}
          82  +
impl CreateOAuth2TokenInput {
          83  +
    /// Deserializes this structure from a body deserializer and HTTP response headers.
          84  +
    /// Header-bound members are read directly from headers, avoiding runtime
          85  +
    /// member iteration overhead. Body members are read via the deserializer.
          86  +
    pub fn deserialize_with_response(
          87  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
          88  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
          89  +
        _status: u16,
          90  +
        body: &[u8],
          91  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
          92  +
        #[allow(unused_variables, unused_mut)]
          93  +
        let mut builder = Self::builder();
          94  +
        if !body.is_empty() {
          95  +
            builder.token_input = Some(crate::types::CreateOAuth2TokenRequestBody::deserialize(deserializer)?);
          96  +
        }
          97  +
        builder
          98  +
            .build()
          99  +
            .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
         100  +
    }
         101  +
}
   81    102   
impl CreateOAuth2TokenInput {
   82    103   
    /// Creates a new builder-style object to manufacture [`CreateOAuth2TokenInput`](crate::operation::create_o_auth2_token::CreateOAuth2TokenInput).
   83    104   
    pub fn builder() -> crate::operation::create_o_auth2_token::builders::CreateOAuth2TokenInputBuilder {
   84    105   
        crate::operation::create_o_auth2_token::builders::CreateOAuth2TokenInputBuilder::default()
   85    106   
    }
   86    107   
}
   87    108   
   88    109   
/// A builder for [`CreateOAuth2TokenInput`](crate::operation::create_o_auth2_token::CreateOAuth2TokenInput).
   89    110   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
   90    111   
#[non_exhaustive]

tmp-codegen-diff/aws-sdk/sdk/signin/src/operation/create_o_auth2_token/_create_o_auth2_token_output.rs

@@ -1,1 +109,140 @@
   19     19   
    "com.amazonaws.signin.synthetic",
   20     20   
    "CreateOAuth2TokenOutput",
   21     21   
);
   22     22   
static CREATEOAUTH2TOKENOUTPUT_MEMBER_TOKEN_OUTPUT: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   23     23   
    ::aws_smithy_schema::ShapeId::from_static(
   24     24   
        "com.amazonaws.signin.synthetic#CreateOAuth2TokenOutput$tokenOutput",
   25     25   
        "com.amazonaws.signin.synthetic",
   26     26   
        "CreateOAuth2TokenOutput",
   27     27   
    ),
   28     28   
    ::aws_smithy_schema::ShapeType::Structure,
   29         -
    "token_output",
          29  +
    "tokenOutput",
   30     30   
    0,
   31     31   
)
   32     32   
.with_http_payload();
          33  +
static CREATEOAUTH2TOKENOUTPUT_MEMBER__REQUEST_ID: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
          34  +
    ::aws_smithy_schema::ShapeId::from_static("synthetic#request_id", "synthetic", "request_id"),
          35  +
    ::aws_smithy_schema::ShapeType::String,
          36  +
    "request_id",
          37  +
    1,
          38  +
)
          39  +
.with_http_header("x-amzn-requestid");
   33     40   
static CREATEOAUTH2TOKENOUTPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
   34     41   
    CREATEOAUTH2TOKENOUTPUT_SCHEMA_ID,
   35     42   
    ::aws_smithy_schema::ShapeType::Structure,
   36         -
    &[&CREATEOAUTH2TOKENOUTPUT_MEMBER_TOKEN_OUTPUT],
          43  +
    &[&CREATEOAUTH2TOKENOUTPUT_MEMBER_TOKEN_OUTPUT, &CREATEOAUTH2TOKENOUTPUT_MEMBER__REQUEST_ID],
   37     44   
);
   38     45   
impl CreateOAuth2TokenOutput {
   39     46   
    /// The schema for this shape.
   40     47   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &CREATEOAUTH2TOKENOUTPUT_SCHEMA;
   41     48   
}
   42     49   
impl ::aws_smithy_schema::serde::SerializableStruct for CreateOAuth2TokenOutput {
   43     50   
    #[allow(unused_variables, clippy::diverging_sub_expression)]
   44     51   
    fn serialize_members(
   45     52   
        &self,
   46     53   
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
   47     54   
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
   48     55   
        if let Some(ref val) = self.token_output {
   49     56   
            ser.write_struct(&CREATEOAUTH2TOKENOUTPUT_MEMBER_TOKEN_OUTPUT, val)?;
   50     57   
        }
   51     58   
        Ok(())
   52     59   
    }
   53     60   
}
   54     61   
impl CreateOAuth2TokenOutput {
   55     62   
    /// Deserializes this structure from a [`ShapeDeserializer`].
   56         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
   57         -
        deserializer: &mut D,
          63  +
    pub fn deserialize(
          64  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
   58     65   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
   59     66   
        #[allow(unused_variables, unused_mut)]
   60     67   
        let mut builder = Self::builder();
   61     68   
        #[allow(
   62     69   
            unused_variables,
   63     70   
            unreachable_code,
   64     71   
            clippy::single_match,
   65     72   
            clippy::match_single_binding,
   66     73   
            clippy::diverging_sub_expression
   67     74   
        )]
   68         -
        deserializer.read_struct(&CREATEOAUTH2TOKENOUTPUT_SCHEMA, (), |_, member, deser| {
          75  +
        deserializer.read_struct(&CREATEOAUTH2TOKENOUTPUT_SCHEMA, &mut |member, deser| {
   69     76   
            match member.member_index() {
   70     77   
                Some(0) => {
   71     78   
                    builder.token_output = Some(crate::types::CreateOAuth2TokenResponseBody::deserialize(deser)?);
   72     79   
                }
          80  +
                Some(1) => {
          81  +
                    builder._request_id = Some(deser.read_string(member)?);
          82  +
                }
   73     83   
                _ => {}
   74     84   
            }
   75     85   
            Ok(())
   76     86   
        })?;
   77     87   
        Ok(builder.build())
   78     88   
    }
   79     89   
}
          90  +
impl CreateOAuth2TokenOutput {
          91  +
    /// Deserializes this structure from a body deserializer and HTTP response headers.
          92  +
    /// Header-bound members are read directly from headers, avoiding runtime
          93  +
    /// member iteration overhead. Body members are read via the deserializer.
          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  +
        #[allow(unused_variables, unused_mut)]
         101  +
        let mut builder = Self::builder();
         102  +
        if let Some(val) = headers.get("x-amzn-requestid") {
         103  +
            builder._request_id = Some(val.to_string());
         104  +
        }
         105  +
        if !body.is_empty() {
         106  +
            builder.token_output = Some(crate::types::CreateOAuth2TokenResponseBody::deserialize(deserializer)?);
         107  +
        }
         108  +
        Ok(builder.build())
         109  +
    }
         110  +
}
   80    111   
impl ::aws_types::request_id::RequestId for CreateOAuth2TokenOutput {
   81    112   
    fn request_id(&self) -> Option<&str> {
   82    113   
        self._request_id.as_deref()
   83    114   
    }
   84    115   
}
   85    116   
impl CreateOAuth2TokenOutput {
   86    117   
    /// Creates a new builder-style object to manufacture [`CreateOAuth2TokenOutput`](crate::operation::create_o_auth2_token::CreateOAuth2TokenOutput).
   87    118   
    pub fn builder() -> crate::operation::create_o_auth2_token::builders::CreateOAuth2TokenOutputBuilder {
   88    119   
        crate::operation::create_o_auth2_token::builders::CreateOAuth2TokenOutputBuilder::default()
   89    120   
    }

tmp-codegen-diff/aws-sdk/sdk/signin/src/protocol_serde.rs

@@ -1,1 +56,0 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub(crate) fn type_erase_result<O, E>(
    3         -
    result: ::std::result::Result<O, E>,
    4         -
) -> ::std::result::Result<
    5         -
    ::aws_smithy_runtime_api::client::interceptors::context::Output,
    6         -
    ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError<::aws_smithy_runtime_api::client::interceptors::context::Error>,
    7         -
>
    8         -
where
    9         -
    O: ::std::fmt::Debug + ::std::marker::Send + ::std::marker::Sync + 'static,
   10         -
    E: ::std::error::Error + std::fmt::Debug + ::std::marker::Send + ::std::marker::Sync + 'static,
   11         -
{
   12         -
    result
   13         -
        .map(|output| ::aws_smithy_runtime_api::client::interceptors::context::Output::erase(output))
   14         -
        .map_err(|error| ::aws_smithy_runtime_api::client::interceptors::context::Error::erase(error))
   15         -
        .map_err(::std::convert::Into::into)
   16         -
}
   17         -
   18      2   
pub fn parse_http_error_metadata(
   19      3   
    _response_status: u16,
   20      4   
    response_headers: &::aws_smithy_runtime_api::http::Headers,
   21      5   
    response_body: &[u8],
   22      6   
) -> ::std::result::Result<::aws_smithy_types::error::metadata::Builder, ::aws_smithy_json::deserialize::error::DeserializeError> {
   23      7   
    crate::json_errors::parse_error_metadata(response_body, response_headers)
   24      8   
}
   25         -
   26         -
pub(crate) mod shape_create_o_auth2_token;
   27         -
   28         -
pub fn rest_json_unset_struct_payload() -> ::std::vec::Vec<u8> {
   29         -
    b"{}"[..].into()
   30         -
}
   31         -
   32         -
pub(crate) mod shape_create_o_auth2_token_input;
   33         -
   34         -
pub(crate) fn or_empty_doc(data: &[u8]) -> &[u8] {
   35         -
    if data.is_empty() {
   36         -
        b"{}"
   37         -
    } else {
   38         -
        data
   39         -
    }
   40         -
}
   41         -
   42         -
pub(crate) mod shape_access_denied_exception;
   43         -
   44         -
pub(crate) mod shape_create_o_auth2_token_output;
   45         -
   46         -
pub(crate) mod shape_internal_server_exception;
   47         -
   48         -
pub(crate) mod shape_too_many_requests_error;
   49         -
   50         -
pub(crate) mod shape_validation_exception;
   51         -
   52         -
pub(crate) mod shape_create_o_auth2_token_request_body;
   53         -
   54         -
pub(crate) mod shape_create_o_auth2_token_response_body;
   55         -
   56         -
pub(crate) mod shape_access_token;

tmp-codegen-diff/aws-sdk/sdk/signin/src/protocol_serde/shape_access_denied_exception.rs

@@ -1,0 +42,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub(crate) fn de_access_denied_exception_json_err(
    3         -
    _value: &[u8],
    4         -
    mut builder: crate::types::error::builders::AccessDeniedExceptionBuilder,
    5         -
) -> ::std::result::Result<crate::types::error::builders::AccessDeniedExceptionBuilder, ::aws_smithy_json::deserialize::error::DeserializeError> {
    6         -
    let mut tokens_owned = ::aws_smithy_json::deserialize::json_token_iter(crate::protocol_serde::or_empty_doc(_value)).peekable();
    7         -
    let tokens = &mut tokens_owned;
    8         -
    ::aws_smithy_json::deserialize::token::expect_start_object(tokens.next())?;
    9         -
    loop {
   10         -
        match tokens.next().transpose()? {
   11         -
            Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
   12         -
            Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => match key.to_unescaped()?.as_ref() {
   13         -
                "error" => {
   14         -
                    builder = builder.set_error(
   15         -
                        ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
   16         -
                            .map(|s| s.to_unescaped().map(|u| crate::types::OAuth2ErrorCode::from(u.as_ref())))
   17         -
                            .transpose()?,
   18         -
                    );
   19         -
                }
   20         -
                "message" => {
   21         -
                    builder = builder.set_message(
   22         -
                        ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
   23         -
                            .map(|s| s.to_unescaped().map(|u| u.into_owned()))
   24         -
                            .transpose()?,
   25         -
                    );
   26         -
                }
   27         -
                _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?,
   28         -
            },
   29         -
            other => {
   30         -
                return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
   31         -
                    "expected object key or end object, found: {other:?}"
   32         -
                )))
   33         -
            }
   34         -
        }
   35         -
    }
   36         -
    if tokens.next().is_some() {
   37         -
        return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
   38         -
            "found more JSON tokens after completing parsing",
   39         -
        ));
   40         -
    }
   41         -
    Ok(builder)
   42         -
}

tmp-codegen-diff/aws-sdk/sdk/signin/src/protocol_serde/shape_access_token.rs

@@ -1,0 +56,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub(crate) fn de_access_token<'a, I>(
    3         -
    tokens: &mut ::std::iter::Peekable<I>,
    4         -
    _value: &'a [u8],
    5         -
) -> ::std::result::Result<Option<crate::types::AccessToken>, ::aws_smithy_json::deserialize::error::DeserializeError>
    6         -
where
    7         -
    I: Iterator<Item = Result<::aws_smithy_json::deserialize::Token<'a>, ::aws_smithy_json::deserialize::error::DeserializeError>>,
    8         -
{
    9         -
    match tokens.next().transpose()? {
   10         -
        Some(::aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None),
   11         -
        Some(::aws_smithy_json::deserialize::Token::StartObject { .. }) => {
   12         -
            #[allow(unused_mut)]
   13         -
            let mut builder = crate::types::builders::AccessTokenBuilder::default();
   14         -
            loop {
   15         -
                match tokens.next().transpose()? {
   16         -
                    Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
   17         -
                    Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => match key.to_unescaped()?.as_ref() {
   18         -
                        "accessKeyId" => {
   19         -
                            builder = builder.set_access_key_id(
   20         -
                                ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
   21         -
                                    .map(|s| s.to_unescaped().map(|u| u.into_owned()))
   22         -
                                    .transpose()?,
   23         -
                            );
   24         -
                        }
   25         -
                        "secretAccessKey" => {
   26         -
                            builder = builder.set_secret_access_key(
   27         -
                                ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
   28         -
                                    .map(|s| s.to_unescaped().map(|u| u.into_owned()))
   29         -
                                    .transpose()?,
   30         -
                            );
   31         -
                        }
   32         -
                        "sessionToken" => {
   33         -
                            builder = builder.set_session_token(
   34         -
                                ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
   35         -
                                    .map(|s| s.to_unescaped().map(|u| u.into_owned()))
   36         -
                                    .transpose()?,
   37         -
                            );
   38         -
                        }
   39         -
                        _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?,
   40         -
                    },
   41         -
                    other => {
   42         -
                        return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
   43         -
                            "expected object key or end object, found: {other:?}"
   44         -
                        )))
   45         -
                    }
   46         -
                }
   47         -
            }
   48         -
            Ok(Some(crate::serde_util::access_token_correct_errors(builder).build().map_err(|err| {
   49         -
                ::aws_smithy_json::deserialize::error::DeserializeError::custom_source("Response was invalid", err)
   50         -
            })?))
   51         -
        }
   52         -
        _ => Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
   53         -
            "expected start object or null",
   54         -
        )),
   55         -
    }
   56         -
}

tmp-codegen-diff/aws-sdk/sdk/signin/src/protocol_serde/shape_create_o_auth2_token.rs

@@ -1,0 +101,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
#[allow(clippy::unnecessary_wraps)]
    3         -
pub fn de_create_o_auth2_token_http_error(
    4         -
    _response_status: u16,
    5         -
    _response_headers: &::aws_smithy_runtime_api::http::Headers,
    6         -
    _response_body: &[u8],
    7         -
) -> std::result::Result<
    8         -
    crate::operation::create_o_auth2_token::CreateOAuth2TokenOutput,
    9         -
    crate::operation::create_o_auth2_token::CreateOAuth2TokenError,
   10         -
> {
   11         -
    #[allow(unused_mut)]
   12         -
    let mut generic_builder = crate::protocol_serde::parse_http_error_metadata(_response_status, _response_headers, _response_body)
   13         -
        .map_err(crate::operation::create_o_auth2_token::CreateOAuth2TokenError::unhandled)?;
   14         -
    generic_builder = ::aws_types::request_id::apply_request_id(generic_builder, _response_headers);
   15         -
    let generic = generic_builder.build();
   16         -
    let error_code = match generic.code() {
   17         -
        Some(code) => code,
   18         -
        None => return Err(crate::operation::create_o_auth2_token::CreateOAuth2TokenError::unhandled(generic)),
   19         -
    };
   20         -
   21         -
    let _error_message = generic.message().map(|msg| msg.to_owned());
   22         -
    Err(match error_code {
   23         -
        "AccessDeniedException" => crate::operation::create_o_auth2_token::CreateOAuth2TokenError::AccessDeniedException({
   24         -
            #[allow(unused_mut)]
   25         -
            let mut tmp = {
   26         -
                #[allow(unused_mut)]
   27         -
                let mut output = crate::types::error::builders::AccessDeniedExceptionBuilder::default();
   28         -
                output = crate::protocol_serde::shape_access_denied_exception::de_access_denied_exception_json_err(_response_body, output)
   29         -
                    .map_err(crate::operation::create_o_auth2_token::CreateOAuth2TokenError::unhandled)?;
   30         -
                let output = output.meta(generic);
   31         -
                crate::serde_util::access_denied_exception_correct_errors(output)
   32         -
                    .build()
   33         -
                    .map_err(crate::operation::create_o_auth2_token::CreateOAuth2TokenError::unhandled)?
   34         -
            };
   35         -
            tmp
   36         -
        }),
   37         -
        "InternalServerException" => crate::operation::create_o_auth2_token::CreateOAuth2TokenError::InternalServerException({
   38         -
            #[allow(unused_mut)]
   39         -
            let mut tmp = {
   40         -
                #[allow(unused_mut)]
   41         -
                let mut output = crate::types::error::builders::InternalServerExceptionBuilder::default();
   42         -
                output = crate::protocol_serde::shape_internal_server_exception::de_internal_server_exception_json_err(_response_body, output)
   43         -
                    .map_err(crate::operation::create_o_auth2_token::CreateOAuth2TokenError::unhandled)?;
   44         -
                let output = output.meta(generic);
   45         -
                crate::serde_util::internal_server_exception_correct_errors(output)
   46         -
                    .build()
   47         -
                    .map_err(crate::operation::create_o_auth2_token::CreateOAuth2TokenError::unhandled)?
   48         -
            };
   49         -
            tmp
   50         -
        }),
   51         -
        "TooManyRequestsError" => crate::operation::create_o_auth2_token::CreateOAuth2TokenError::TooManyRequestsError({
   52         -
            #[allow(unused_mut)]
   53         -
            let mut tmp = {
   54         -
                #[allow(unused_mut)]
   55         -
                let mut output = crate::types::error::builders::TooManyRequestsErrorBuilder::default();
   56         -
                output = crate::protocol_serde::shape_too_many_requests_error::de_too_many_requests_error_json_err(_response_body, output)
   57         -
                    .map_err(crate::operation::create_o_auth2_token::CreateOAuth2TokenError::unhandled)?;
   58         -
                let output = output.meta(generic);
   59         -
                crate::serde_util::too_many_requests_error_correct_errors(output)
   60         -
                    .build()
   61         -
                    .map_err(crate::operation::create_o_auth2_token::CreateOAuth2TokenError::unhandled)?
   62         -
            };
   63         -
            tmp
   64         -
        }),
   65         -
        "ValidationException" => crate::operation::create_o_auth2_token::CreateOAuth2TokenError::ValidationException({
   66         -
            #[allow(unused_mut)]
   67         -
            let mut tmp = {
   68         -
                #[allow(unused_mut)]
   69         -
                let mut output = crate::types::error::builders::ValidationExceptionBuilder::default();
   70         -
                output = crate::protocol_serde::shape_validation_exception::de_validation_exception_json_err(_response_body, output)
   71         -
                    .map_err(crate::operation::create_o_auth2_token::CreateOAuth2TokenError::unhandled)?;
   72         -
                let output = output.meta(generic);
   73         -
                crate::serde_util::validation_exception_correct_errors(output)
   74         -
                    .build()
   75         -
                    .map_err(crate::operation::create_o_auth2_token::CreateOAuth2TokenError::unhandled)?
   76         -
            };
   77         -
            tmp
   78         -
        }),
   79         -
        _ => crate::operation::create_o_auth2_token::CreateOAuth2TokenError::generic(generic),
   80         -
    })
   81         -
}
   82         -
   83         -
#[allow(clippy::unnecessary_wraps)]
   84         -
pub fn de_create_o_auth2_token_http_response(
   85         -
    _response_status: u16,
   86         -
    _response_headers: &::aws_smithy_runtime_api::http::Headers,
   87         -
    _response_body: &[u8],
   88         -
) -> std::result::Result<
   89         -
    crate::operation::create_o_auth2_token::CreateOAuth2TokenOutput,
   90         -
    crate::operation::create_o_auth2_token::CreateOAuth2TokenError,
   91         -
> {
   92         -
    Ok({
   93         -
        #[allow(unused_mut)]
   94         -
        let mut output = crate::operation::create_o_auth2_token::builders::CreateOAuth2TokenOutputBuilder::default();
   95         -
        output = output.set_token_output(crate::protocol_serde::shape_create_o_auth2_token_output::de_token_output_payload(
   96         -
            _response_body,
   97         -
        )?);
   98         -
        output._set_request_id(::aws_types::request_id::RequestId::request_id(_response_headers).map(str::to_string));
   99         -
        crate::serde_util::create_o_auth2_token_output_output_correct_errors(output).build()
  100         -
    })
  101         -
}